PHP guide of the ePay relay-script

This example code will show you how to implement the ePay relay-script by using PHP.

The first page (relay.php) will show you howto setup the payment form through the relay-script with a standard set of test parameters.

The second page (accept.php) will show you how to setup a payment receipt page with information of the payment made.

The third page (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.

The fourth page (EpaySoap.php) contains functions used by handle_payment.php to call the ePay Webservice (API).

The fifth page (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

The lib folder contains the nuSOAP library which in this example is used to connect to the ePay Webservice (API)

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.


On the accept page you will be able to capture, credit and delete the transaction by using the ePay Webservice. Notice! This will require a ePay Business subscription.
Remember to change the merchant number in handle_payment.php for this to work.

The relay-server will load the payment form and show it through a certified secure encrypted line.

This is done by addding:
https://relay.ditonlinebetalingssystem.dk/relay/v2/relay.cgi/
in front of the payment form URL.

In this example it is:
https://relay.ditonlinebetalingssystem.dk/relay/v2/relay.cgi/http://tech.epay.dk/test/php-relay/relay.php

To start with integrated layout (relay) click here.

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