The following provides a programmer's guide to connect a merchant website with the EZ Payment Gateway for authorizing credit card. To connect to the gateway,
some minor programming, in any language, must be performed by the merchant or its ISP. This documentation provides sample code that demonstrates how to send and receive transaction information via CGI (Perl) and ASP (VBScript).
EditThe merchant's website must be able to generate a unique OrderID (like an invoice number), the total amount for the transaction, and have a URL that is a working script for the gateway to return the authorization information.
There are two different scripts that can be posted to when using the EZ Payment Gateway - either via a standard form
process.aspx or directly to the gateway itself called
direct.aspx.
TopEditYou would want to use the
process.aspx script when you DO NOT have a digital certificate (providing an https connection). Credit card information must be entered into a secured page, the
process.aspx script requires certain information from the page that is connecting to it. The
process-aspx page will also ask the user for their billing information (including credit card). The variables that must be pass to the
process.aspx script are:
| Key |
Value |
| Merchant |
Merchant name assigned by Merchant Services |
| OrderID |
unique order ID |
| total |
US dollars without '$' |
| email |
billing email address (optional) |
| URL |
the website to which the gateway will redirect the user after transaction |
- Note that the Keys represent how the variables need to be named (case sensitive)
TopEditThe
direct.aspx script is for merchants who will be taking the user's credit card information on their own secured server. The
direct.aspx script requires the merchant to POST the below information:
| Key |
Value |
| Merchant |
Merchant name assigned by Merchant Services |
| OrderID |
unique order ID |
| total |
US dollars without '$' |
| email |
billing email address (optional) |
| URL |
the website to which the gateway will redirect the user after transaction |
| Cardname |
type of credit card |
| Cardnum1 |
first 4 numbers on card |
| Cardnum2 |
second 4 numbers on card |
| Cardnum3 |
third 4 numbers on card |
| Cardnum4 |
fourth 4 numbers on card |
| NameonCard |
name of cardholder |
| Cardstreet |
street of cardholder |
| Cardcity |
city of cardholder |
| Cardstate |
state of cardholder |
| Cardzip |
zip code of cardholder |
| Cardcountry |
country of cardholder |
| CardexpM |
expiration month, format ex: 04 |
| CardexpY |
expiration year, format ex: 05 |
| CVV2 |
format ###(#) (3 digits for Visa/Mastercard and 4 digits for Amex) |
| email |
email address of customer (optional) |
TopEditThe gateway script will use the GET method to return the following information to the URL that it was given:
| Key |
Value |
| OrderID |
echoed back from the server that was provided in the secure post |
| total |
total amount authed |
| Status |
will return 1 if success, 0 if failed |
| approval_code |
approval code returned by bank |
| authresponse |
authorization response returned by bank |
| avs |
the avs (address verification service) code returned by the bank |
| Cardname |
type of credit card |
| NameonCard |
name of cardholder |
| Cardstreet |
street of cardholder |
| Cardcity |
city of cardholder |
| Cardstate |
state of cardholder |
| Cardzip |
zip code of cardholder |
| Cardcountry |
country of cardholder |
| email |
email address of customer (optional) |