PHP example of ePay subscriptions

This example code will show you how to make subscriptions with ePay. On the accept page you will be able to make new payments based on the subscription.

The first page (payment.php) will show you how to open up the ePay Standard Payment Window to make payment and add subscriber.

The second page (accept.php) will show you how to setup a payment receipt page with information of the payment made. On this page you will be able to handle the payment and the subscription.

(callback.php) is called by ePay when the payment is made. Tip! Change the $email variable in the callback.php to receive an e-mail when the payment is made.

(epaysoap.php) contains functions used by handle_payment.php to call the ePay Webservice (API).

(handle_payment.php) is an example of using the ePay Webservice to capture, credit and delete a transaction. This file is included in accept.php. Remember! You need to change merchantnumber in line 4.

(handle_subscription.php) handles when capture, credit, delete or authorize transactions.

Notice!
In order to test you need a test merchant number. To obtain a test merchant number please sign up for a FREE ePay test account here: Get ePay test account.
When you have obtained this test account you can in this programming example enter the test merchant number in the field named merchantnumber on the next page.

Remember!
For this example to work you must have an ePay Business subscription.


To get started just click this link: Start subscription payment.



Support
For support please contact us at one of the following mails:
Danish support@epay.dk
Swedish support@epay.se
English support@epay.eu