The eWAY 3-D Secure Payment Solution uses HTML <FORMS> which is HTML-specific,
not operating-system specific. Any web page that can POST an HTML FORM can communicate
with the eWAY Shared Payment Solution, on any operating system, eg Windows,
Linux, Mac etc.
- ASP Code
The URL the form tag must post to eWAY gateway payment page is...
https://www.eway.com.au/gateway_3d/payment.asp
Below is an example of the ASP code required to link to eWAY.
<%
ewayCustomerID = "87654321"
ewayTotalAmount = "10"
ewayCustomerFirstName = "John"
ewayCustomerLastName = "Smith"
ewayCustomerEmail = "sales@eway.com.au"
ewayCustomerAddress = "18 Mayne Street Parkes NSW"
ewayCustomerPostcode = "2870"
ewayCustomerInvoiceDescription = "ASP code e-postcard"
ewayCustomerInvoiceRef = "webactive002"
ewayURL = "http:ewaySiteTitle = "WebActive"
ewayAutoRedirect = "1"
eWAYoption1 = "book"
eWAYoption2 = "section1.xls"
eWAYoption3 = ""
ewayTrxnNumber = "2323"
%>
<table border="1" width="70%" cellspacing="0" cellpadding="5" bordercolor=" <tr>
<td width="22%" valign="top">
<p class="subtitle"><a href="http: </td>
<td width="78%" valign="top" bgcolor=" <form method="post" action="https: <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>
</form>
</td>
</tr>
</table>
<%
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=" <tr>
<td width="22%" valign="top"><p class="subtitle">
<a href="http: <img alt="eWAY - a total e commerce solution" border="0" height="91" src="http: </a>
</td>
<td width="78%" valign="top" bgcolor=" <p>Transaction status is <b><%=result%></b> for transaction<br/>
<b><%=CStr(trxnReference) %></b>, your reference is<br/>
<b><%=CStr(transaction_number) %></b>
</p>
The following additional information was passed <br/>
option1 <b><%= CStr(option1) %></b> <br/>
option2 <b><%= CStr(option2) %></b> <br/>
option3 <b><%= CStr(option3) %></b> <br/>
<p></p><a href="http: </td>
</tr>
</table>
PLEASE MAKE SURE YOU PASS YOUR eWAYCUSTOMERID ONLY -
passing any other ID may result in funds being deposited into another bank account
other than your own. Change the eWAYCustomerID in the sample code from 87654321
to your OWN eWAYcustomerID.
- ColdFusion
The URL the form tag must post to eWAY gateway payment page is...
https://www.eway.com.au/gateway_3d/payment.asp
Below is an example of the Cold Fusion code required to link to eWAY.
<head>
title>eWAY Linking Code</title>
</head>
<cfparam name="ewayCustomerID" default="87654321">
<cfparam name="ewayTotalAmount" default="10">
<cfparam name="ewayCustomerFirstName" default="John">
<cfparam name="ewayCustomerLastName" default="Smith">
<cfparam name="ewayCustomerEmail" default="sales@eway.com.au">
<cfparam name="ewayCustomerAddress" default="18 Mayne Street Parkes NSW">
<cfparam name="ewayCustomerPostcode" default="2870">
<cfparam name="ewayCustomerInvoiceDescription" default="ASP code e-postcard">
<cfparam name="ewayCustomerInvoiceRef" default="webactive002">
<cfparam name="ewayURL" default="http:<cfparam name="ewaySiteTitle" default="WebActive">
<cfparam name="ewayAutoRedirect" default="1">
<cfparam name="ewayoption1" default="book">
<cfparam name="ewayoption2" default="section1.xls">
<cfparam name="ewayoption3" default="card">
<cfparam name="ewayTrxnNumber" default="2323">
<table width="70%" border="1" cellpadding="5" align="center" bordercolor=" <tr>
<td width="22%" valign="top">
<a href="http: <img alt="eWAY - a total e-commerce solution" border="0" height = "91" src="http: </a>
</td>
<td width="78%" valign="top" bgcolor=" <form method="post" action="https: <input type="hidden" name="ewayCustomerID" value="<cfoutput> <input type="hidden" name="ewayTotalAmount" value="<cfoutput> <input type="hidden" name="ewayCustomerFirstName" value="<cfoutput> <input type="hidden" name="ewayCustomerLastName" value="<cfoutput> <input type="hidden" name="ewayCustomerEmail" value="<cfoutput> <input type="hidden" name="ewayCustomerAddress" value="<cfoutput> <input type="hidden" name="ewayCustomerPostcode" value="<cfoutput> <input type="hidden" name="ewayCustomerInvoiceDescription" value="<cfoutput> <input type="hidden" name="ewayCustomerInvoiceRef" value="<cfoutput> <input type="hidden" name="ewayURL" value="<cfoutput> <input type="hidden" name="ewaySiteTitle" value="<cfoutput> <input type="hidden" name="ewayAutoRedirect" value="<cfoutput> <input type="hidden" name="ewayoption1" value="<cfoutput> <input type="hidden" name="ewayoption2" value="<cfoutput> <input type="hidden" name="ewayoption3" value="<cfoutput> <input type="hidden" name="ewayTrxnNumber" value="<cfoutput>
<p><input type="submit" value="Process Secure Credit Card Transaction using eWAY" name="submit" /><p></p>
</form>
</td>
</tr>
</table>
<head>
<title>eWAY Result Code</title>
</head>
<cfparam name="TrxnStatus" default=(FORM.ewayTrxnStatus)>
<cfparam name="TrxnReference" default=(FORM.ewayTrxnReference)>
<cfparam name="TrxnNumber" default=(FORM.ewayTrxnNumber)>
<cfparam name="option1" default=(FORM.ewayoption1)>
<cfparam name="option2" default=(FORM.ewayoption2)>
<cfparam name="option3" default=(FORM.ewayoption3)>
<table border="1" width="70%" cellspacing="0" cellpadding="5" bordercolor=" <tr>
<td width="22%" valign="top"><p class="subtitle">
<a href="http: <img alt="eWAY - a total e commerce solution" border="0" height="91" src="http: </td>
<td width="78%" valign="top" bgcolor=" <p>
Transaction status is <b><cfoutput> <b><cfoutput> <b><cfoutput> The following additional information was passed <br/>
option1 <b><cfoutput> option2 <b><cfoutput> option3 <b><cfoutput> </p>
<p></p>
<a href="http: </td>
</tr>
<tr>
<td align=center>
<font face="Arial, Helvetica, sans-serif" size="1" color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <br />
<span class="footertext">Web Active Corporation Pty Ltd ACN 086 209 403 - Copyright 1998 - 2006 - ABN 32 086 209 403</span> </font>
</td>
<td>
<a href="../about/privacy.asp"><img border="0" src="../images/truste/finalmark.gif" width="116" height="31" /></a>
</td>
</tr>
</table>
PLEASE MAKE SURE YOU PASS YOUR eWAYCUSTOMERID ONLY -
passing any other ID may result in funds being deposited into another bank account
other than your own. Change the eWAYCustomerID in the sample code from 87654321
to your OWN eWAYcustomerID.
- VB .NET
The URL the form tag must post to eWAY gateway payment page is...
https://www.eway.com.au/gateway_3d/payment.asp
Below is an example of the VB.NET code required to link to eWAY.
PLEASE MAKE SURE YOU PASS YOUR eWAYCUSTOMERID ONLY -
passing any other ID may result in funds being deposited into another bank account
other than your own. Change the eWAYCustomerID in the sample code from 87654321
to your OWN eWAYcustomerID.
- C# .NET
The URL the form tag must post to eWAY gateway payment page is...
https://www.eway.com.au/gateway_3d/payment.asp
Below is an example of the C#.NET code required to link to eWAY.
PLEASE MAKE SURE YOU PASS YOUR eWAYCUSTOMERID ONLY -
passing any other ID may result in funds being deposited into another bank account
other than your own. Change the eWAYCustomerID in the sample code from 87654321
to your OWN eWAYcustomerID.
- Perl
The URL the form tag must post to eWAY gateway payment page is...
https://www.eway.com.au/gateway_3d/payment.asp
Below is an example of the PERL code required to link to eWAY.
$ewayCustomerID = "87654321"
$ewayTotalAmount = "9100"
$cust_firstname = "John";
$cust_lastname = "Smith";
$cust_email = "somebody@somewhere.com";
$cust_address = "38 Paton Street Parkes NSW";
$cust_postcode = "3029";
$cust_invoiceref = "432432";
$invc_descript = "1 Blue Sock";
$invc_option1 = "Cotton Material";
$return_url = "http:$site_title = "This Site Name";
print "Content-type: text/html\n\n";
print <<HTML_SECTION;
<table border="1" width="70%" cellspacing="0" cellpadding="5" bordercolor=" <tr>
<td width="22%" valign="top"><p class="subtitle">
<a href="http: <img alt="eWAY - a total e commerce solution" border="0" height="91" src="../images/logos/eway.gif" width="200" /></a>
</td>
<td width="78%" valign="top" bgcolor=" <form method="post" action="https: <input type="hidden" name="ewayCustomerID" value="$ewayCustomerID" />
<input type="hidden" name="ewayTotalAmount" value="$ewayTotalAmount" />
<input type="hidden" name="ewayCustomerFirstName" value="$cust_firstname" />
<input type="hidden" name="ewayCustomerLastName" value="$cust_lastname" />
<input type="hidden" name="ewayCustomerEmail" value="$cust_email" />
<input type="hidden" name="ewayCustomerAddress" value="$cust_address" />
<input type="hidden" name="ewayCustomerPostcode" value="$cust_postcode" />
<input type="hidden" name="ewayCustomerInvoiceDescription" value="$invc_descript" />
<input type="hidden" name="ewayCustomerInvoiceRef" value="$cust_invoiceref" />
<input type="hidden" name="ewayOption1" value="$invc_option1" />
<input type="hidden" name="ewayURL" value="$return_url" />
<input type="hidden" name="ewaySiteTitle" value="$site_title" />
<input type="submit" value="Process Transaction" name="submit" />
<p></p>
</form>
</td>
</tr>
</table>
HTML_SECTION
use CGI qw/:standard/;
print "Content-type: text/html\n\n";
$trxn_status = lc(param(if($trxn_status =~ /true/) {
$message = "Success! Your transaction was completed. Thankyou for your business.";
} elsif($trxn_status =~ /false/) {
$message = "Sorry, your transaction was not processed.";
} else {
$message = "Um... something is not configured right!";
}
print <<HTML_SECTION
<head>
<title>Page Title</title>
</head>
<p>$message</p>
<table>
<tr>
<td align=center>
<font face="Arial, Helvetica, sans-serif" size="1" color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <span class="footertext">Web Active Corporation Pty Ltd ACN 086 209 403 - Copyright 1998 - 2006 - ABN 32 086 209 403</span> </font>
</td>
<td>
<a href="../about/privacy.asp">
<img border="0" src="../images/truste/finalmark.gif" width="116" height="31" /></a>
</td>
</tr>
</table>
HTML_SECTION
PLEASE MAKE SURE YOU PASS YOUR eWAYCUSTOMERID ONLY -
passing any other ID may result in funds being deposited into another bank account
other than your own. Change the eWAYCustomerID in the sample code from 87654321
to your OWN eWAYcustomerID.
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.
Pass the following information:
1. eWAYCustomerId = "87654321" (eWAYTestID)
2. The value passed in eWAYTotalAmount will generate
the Response Code, Response Text, and determine whether or not the transaction was
successful. The cents value (last 2 digits) of the amount passed will be the Response
Code returned - e.g. if "100" is passed ($1.00), the Response Code will be "00",
or if "1015" is passed ($10.15), the Resonse Code will be "15". These Response Codes
also generate the Response Text, and thus the value returned in ewayTrxnError.
View All Response Codes, and associated Response Text
Note: Your eWAYCustomerID is emailed to you in
your "eWAY Welcome Letter" when you join eWAY.
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:
- eWayTrxnStatus = "False"
- eWayTrxnReference = "1010055" (Varies)
- eWAYresponseCode = "31"
- eWAYresponseText = "CARD NOT VALID(Test Gateway)"
- eWAYAuthCode = ""
Address of the payment page is
https://www.eWAY.com.au/gateway_3d/payment.asp.
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.