We have provided sample code for ASP, PHP and ASP.NET (C#) programming languages.
Basically, all you need to do, per transaction, is:
- Send the XML document via HTTPS, using SSL.
- Parse the XML document returned
from eWAY.
- ASP Code
This ZIP file contains the following 3 Active Server Pages:
- ePayment.asa - Creates and sends the XML document to eWAY.
- paymentForm.htm - An example of a form to send to the process.asp page. Be
sure to include a valid eWAYCustomerID when you go live, this will be issued to
you after you join eWAY.
- process.asp - This includes the ePayment.asa file and displays the transaction
results.
For more information on passing XML, please see the Field specifications tab.
Download the XML ASP sample code
- PHP Code
This ZIP file contains the following two files:
- EPayment.php - PHP class which you can call from your own PHP code
to process a transaction.
- testform.php - Sample code to process a test transaction. Show
the main functions that you will probably need to call.
For more information on passing XML, please the Field specifications tab.
Download the PHP sample code
- C# Code
This ZIP file contains several C#.NET Pages and should be added to a Visual Studio
Project:
- WebForm1.aspx - An example of a form to send to the eWAY gateway.
Be sure to include a valid eWAYCustomerID when you go live. This ID will be issued
to you once you've joined eWAY.
- WebForm1.aspx.cs - C# Server-side code for the WebForm1.aspx
page.
- GatewayConnector.cs - This page connects to the eWAY gateway, sends an
XML request and receives the XML response.
- GatewayRequest.cs - This takes the fields from the WebForm1.aspx
page, and converts it to an XML string to pass to the GatewayConnector.cs page.
- GatewayResponse.cs - This passes the eWAY Gateway response back
to the WebForm1.aspx page.
- web.config - This holds the configuration settings for the live
and test gateway URLs, as well as your eWAY Customer ID and the ID used for testing.
For more information on passing XML, please see the Field specifications tab.
»
Download the C# source code
There is currently no test account for this facility. Transactions are not processed
immediately with this facility, so to test its functionality you should use the
Live gateway. Transactions can then be deleted through your
eWAY Business Centre
. Stored transactions incur no fee until they are processed.
The Live gateway address is:
https://www.eway.com.au/gateway/xmlstored.asp