You can link with any of the following languages that support HTML FORMS using the
POST method. If there are any other solutions required, please
contact us.
- ASP Code
The URL the form tag must post to eWAY gateway payment page is
https://www.eway.com.au/gateway/payment.asp
ASP Code sample - copy and paste, then modify values using form elements or a querystring.
<%
'set this infromation from your shopping cart or database
'your eWAY customer details
ewayCustomerID = "87654321"
'amount in cents, here we have 10c
ewayTotalAmount = "10"
'order details
ewayCustomerFirstName = "Roxarne"
ewayCustomerLastName = "Paton"
ewayCustomerEmail = "sales@eway.com.au"
ewayCustomerAddress = "18 Mayne Street Parkes NSW"
ewayCustomerPostcode = "2870"
ewayCustomerInvoiceDescription = "ASP code e-postcard"
ewayCustomerInvoiceRef = "webactive002"
ewayURL = "http://www.webactive.com.au/eway/result.asp"
ewaySiteTitle = "WebActive"
ewayAutoRedirect = "1"
'additional information you can pass
eWAYoption1 = "book"
eWAYoption2 = "section1.xls"
eWAYoption3 = ""
ewayTrxnNumber = "2323"
%>
<table border="1" width="70%" cellspacing="0" cellpadding="5" bordercolor="#000080">
<tr>
<td width="22%" valign="top"><p class="subtitle"><a href="http://www.eway.com.au"
target="_blank"><img alt="eWAY - a total e commerce solution" border="0" height="91"
src="http://www.eway.com.au/images/logos/eway.gif" width="200" /></a><p><p></p></td>
<td width="78%" valign="top" bgcolor="#ffffff">
<form method="post"
action="https://www.eway.com.au/gateway/payment.asp"
>
<input type="hidden" name="ewayCustomerID" value="<%=CStr(ewayCustomerID)%>"
/>
<input type="hidden" name="ewayTotalAmount" value="<%=CStr(ewayTotalAmount)%>"
/>
<input type="hidden" name="ewayCustomerFirstName" value="<%=CStr(ewayCustomerFirstName)%>"
/>
<input type="hidden" name="ewayCustomerLastName" value="<%=CStr(ewayCustomerLastName)%>"
/>
<input type="hidden" name="ewayCustomerEmail" value="<%=CStr(ewayCustomerEmail)%>"
/>
<input type="hidden" name="ewayCustomerAddress" value="<%=CStr(ewayCustomerAddress)%>"
/>
<input type="hidden" name="ewayCustomerPostcode" value="<%=CStr(ewayCustomerPostcode)%>"
/>
<input type="hidden" name="ewayCustomerInvoiceDescription" value="<%=CStr(ewayCustomerInvoiceDescription)%>"
/>
<input type="hidden" name="ewayCustomerInvoiceRef" value="<%=CStr(ewayCustomerInvoiceRef)%>"
/>
<input type="hidden" name="ewayURL" value="<%=CStr(ewayURL)%>" />
<input type="hidden" name="ewaySiteTitle" value="<%=CStr(ewaySiteTitle)%>"
/>
<input type="hidden" name="ewayAutoRedirect" value="<%=CStr(ewayAutoRedirect)%>"
/>
<input type="hidden" name="eWAYoption1" value="<%=CStr(eWAYoption1)%>"
/>
<input type="hidden" name="eWAYoption2" value="<%=CStr(eWAYoption2)%>"
/>
<input type="hidden" name="eWAYoption3" value="<%=CStr(eWAYoption3)%>"
/>
<input type="hidden" name="ewayTrxnNumber" value="<%=CStr(ewayTrxnNumber)%>"
/>
<p><input type="submit" value="Process Secure Credit Card Transaction using
eWAY" name="submit" /><p><p></p>
</form>
</td>
</tr>
</table>
ASP Code sample - result page on YOUR site.
result = Request("ewayTrxnStatus")
trxnReference = Request("ewayTrxnReference")
transaction_number = Request("ewayTrxnNumber")
if transaction_number = "" then
transaction_number = "NOT DEFINED"
end if
option1 = Request("eWAYoption1")
option2 = Request("eWAYoption2")
option3 = Request("eWAYoption3")
%>
<table border="1" width="70%" cellspacing="0" cellpadding="5" bordercolor="#000080">
<tr>
<td width="22%" valign="top"><p class="subtitle">
<a href="http://www.eway.com.au" target="_blank">
<img alt="eWAY - a total e commerce solution" border="0" height="91" src="http://www.eway.com.au/images/logos/eway.gif"
width="200" />
</a><p></p>
</td>
<td width="78%" valign="top" bgcolor="#ffffff">
<p>Transaction status is <b><%=result%></b> for transaction
<b><%=CStr(trxnReference) %></b>, your reference is
<b><%=CStr(transaction_number) %></b>
The following additional information was passed <br />
option1 <b><%= CStr(option1) %></b><br />
option2 <b><%= CStr(option2) %></b><br />
option3 <b><%= CStr(option3) %></b>
<p></p><a href="http://www.eway.com.au">Return to eWAY website</a>
</td>
</tr>
</table>
- PHP Code
- Perl - Linux/UNIX
The URL the form tag must post to eWAY gateway payment page is...
https://www.eway.com.au/gateway/payment.asp
- ColdFusion
The URL the form tag must post to eWAY gateway payment page is...
https://www.eway.com.au/gateway/payment.asp
Below is an example of the Cold Fusion code required to link to eWAY.
- VB .NET
- C# .NET
You can build and test your site to link to eWAY before you have
joined. All you need to do is pass the required test account information. This uses the real payment page so there is little
changes required once you have joined eWAY.
In order to test the Shared Payment solution you will need to pass the following
information:
CustomerID: 87654321
Test Credit Card: 4444333322221111
Result: The transaction result is based on the CENT value of the transaction
for more information see the
testing section.
The gateway URL is https://www.eway.com.au/gateway/payment.asp
A demo test page is available for download.
(Right click on this link and select "Save as..")
A successful transaction returns (Example):
- ewayTrxnStatus = "True"
- ewayTrxnReference = "1010054" (Varies)
- eWAYresponseCode = "08"
- eWAYresponseText = "TRANSACTION APPROVED(Test Gateway)"
- eWAYAuthCode = "123456"
While a failed transaction returns (Example):
- ewayTrxnStatus = "False"
- ewayTrxnReference = "1010055" (Varies)
- eWAYresponseCode = "31"
- eWAYresponseText = "CARD NOT VALID(Test Gateway)"
- eWAYAuthCode = ""
PLEASE MAKE SURE YOU PASS YOUR ewayCustomerID or the eWAYTESTID of "87654321"
ONLY - passing any other ID may result in funds being deposited into
another bank account other than your own.