|
<< previous page next page >> back to guide
Direct.aspx
4. Link a website directly to the EZ Payment Gateway - direct.aspx
If you have not read the EZ Payment Gateway overview above, please read it NOW before continuing. |
• Requirements for your web site
At the very minimum, your web site must do the following in order to be linked properly with the EZ Payment Gateway Secure transaction gateway:
- Your web site must calculate a total amount that is to be authorized by the EZ Payment Gateway system. The EZ Payment Gateway code samples below DO NOT demonstrate how to calculate totals; calculating a total amount is not part of the EZ Payment Gateway system, and usually requires script programming in your web site.
- Your web site must pass at least the merchant name (assigned by goEmerchant.com), the unique order ID, associated with the shopping cart, the total amount, a URL to return transaction information to the EZ Payment Gateway.
- Any other fields, such as Invoice, Customer ID, Name, Address, etc. MUST be stored in a data file on your system that can be retrieved via the OrderID field that will be passed back to your system.
|
• Allowed fields
You must pass the following fields to the EZ Payment Gateway system. To work properly, the fields must be named exactly (case sensitive) as they are named here:
| Key |
Value |
| Merchant |
Merchant name assigned by GoEmerchant.com |
| OrderID |
unique order ID |
| total |
US dollars without '$' |
| email |
billing email address (optional) |
| URL |
the website in which GoEmerchant.com will redirect the user after transaction |
| Cardname |
type of credit card |
| 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) | |
• Example One - Suggested minimum requirements
The following HTML code snippet represents the bare minimum requirements: (Note - You must have generated a unique OrderID, Calculated your total, and have a script/URL to process the variables that will be returned to your server.)
<form method="POST" action="https://secure.goemerchant.com/secure/gateway/direct.aspx"> <input type="hidden" name="Merchant" value="Merchant Name assigned by goEmerchant.com"> <input type="hidden" name="OrderID" value="Unique OrderID value"> <input type="hidden" name="email" value="Customers email address (OPTIONAL)"> <input type="hidden" name="total" value="total calculated transaction amount value"> <input type="hidden" name="URL" value="http://Your Web Site Address/script name to receive variables">
Example -- http://www.mystore.com/CGI-bin/receipt.aspx" (Note - You may call your script anything you please. The name receipt is used for example only!)
<input type="text" name="Cardname"><Br> <input type="text" name="Cardnum1"><Br> <input type="text" name="Cardnum2"><Br> <input type="text" name="Cardnum3"><Br> <input type="text" name="Cardnum4"><Br> <input type="text" name="NameonCard"><Br> <input type="text" name="Cardstreet"><Br> <input type="text" name="Cardcity"><Br> <input type="text" name="Cardstate"><Br> <input type="text" name="Cardzip"><Br> <input type="text" name="Cardcountry"><Br> <input type="text" name="CardexpM"><Br> <input type="text" name="CardexpY"><Br> <input type="text" name="CVV2"><Br> </form> |
The result of the above HTML code snippet on a web site is a simple button that is programmed to pass a total dollar amount to the EZ Payment Gateway secure payment form.
The EZ Payment Gateway system will return the following variables to your program indicating a successful or failed transaction.
| 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) |
(Note: These key = value pairs will return in a URL query string for credit card transactions like the example below)
http://www.yourservername.com/CGI-bin/receipt.aspx?Status=1&approval_code=41111& authresponse=AUTH%20APPROVED&avs=Y&OrderID=100&total=1.00& Cardname=Visa&NameonCard=John%20Doe&Cardstreet=123%20Street& Cardcity=Nowhere&Cardstate=NJ&Cardzip=08000&Cardcountry=US&email=test@test.com | << previous page next page >> back to guide
| | |