|
Authorize.Net® offers two secure online payment-processing connection methods that allow Internet-based businesses to authorize, process, and manage credit card
transactions directly and automatically from an e-commerce website. To learn more about connecting your website to the Authorize.Net Payment Gateway, see the AIM and SIM Implementation Guides.
Advanced Integration Method (AIM) is the preferred Authorize.Net integration solution,
and uses secure sockets layer (SSL) digital certificate technology to connect securely and
directly to the Payment Gatewayachieving the highest security for the Internet connection
between a merchant and the gateway.
Simple Integration Method (SIM) optimizes the
security, encryption, and authentication of transactions for merchants that do not
have an SSL digital certificate.
AIM and SIM provide the highest levels of secure transaction infrastructure available to
merchants building an e-commerce business and directly connecting that their website to
the Authorize.Net Payment Gateway.
There are also several other options for connecting to the Authorize.Net Payment Gateway,
including our Shopping Cart software and web-hosting solutions.
HTML CODE SNIPPETS for SIMPLE INTEGRATION METHOD
Example 1
Example 2
Example 3
Example 4
EXAMPLE 1 – Minimum requirements for requesting a Payment Form
The following HTML code along with the server-side
script represents the minimum data that would need to be inserted into a page
to provide a connection to the system. It shows that the fingerprint, time stamp,
and the sequence number are inserted into the HTML form POST along with Login
ID and other required fields. The result of this HTML code snippet is a button.
Clicking on the button will take the user to the gateway’s Payment Form.
A call to generate the fingerprint should be
made when the button is clicked and before the Payment Form request is made
to the gateway. A sequence number should be generated and the total amount of
the tranaction calculated before the call to generate the fingerprint is made.
The function used to generate the fingerprint takes these fields (amount, transaction
key, Login ID, and sequence number) The transaction amount should not change
after the fingerprint is generated. All trailing spaces need to be removed from
the fields used to generate the fingerprint
<!--#INCLUDE FILE="simlib.asp"-->
<FORM METHOD=POST ACTION="https://secure.authorize.net/gateway/transact.dll">
<% ret = InsertFP (loginid, txnkey, amount, sequence) %>
<INPUT TYPE=HIDDEN NAME="x_Login" VALUE="your login ID goes here">
<INPUT TYPE=HIDDEN NAME="x_Show_Form" VALUE="PAYMENT_FORM">
<INPUT TYPE=HIDDEN NAME="x_Amount" VALUE="amount goes here">
<INPUT TYPE=SUBMIT VALUE="Click here for secure payment form">
</FORM>
The function InsertFP is provided by the gateway and can be downloaded from the Merchant Interface. This function must be called within a server-side script on the merchant Web server. The above example shows the call being made in an ASP scripting environment.
Back to Top
EXAMPLE 2 – Using a form to gather information
The following HTML code along with the server-side
script demonstrates the ability to send additional information to the system,
including information that is specified by the customer. The result of this
HTML code snippet is a page that displays a form allowing the customer to specify
their name and any specific shipping instructions. The x_First_Name and
x_Last_Name fields are normal fields recognized by the system. The Shipping_Instructions
field is not a field recognized by the system, and so it is treated as a
user field. System-recognized fields can also be used for normal shipping information.
The code also shows that the fingerprint, time stamp, and the sequence number
are inserted into the HTML form POST along with Login ID and other required
fields.
<!--#INCLUDE FILE="simlib.asp"-->
<FORM METHOD=POST ACTION="https://secure.authorize.net/gateway/transact.dll">
<% ret = InsertFP (loginid, txnkey, amount, sequence) %>
<INPUT TYPE=HIDDEN NAME="x_Login" VALUE="your login ID goes here">
<INPUT TYPE=HIDDEN NAME="x_Show_Form" VALUE="PAYMENT_FORM">
<INPUT TYPE=HIDDEN NAME="x_Amount" VALUE="amount goes here">
<INPUT TYPE=HIDDEN NAME="x_Cust_ID" VALUE="a unique customer ID goes here">
<INPUT TYPE=HIDDEN NAME="x_Description" VALUE="description of transaction">
<INPUT TYPE=HIDDEN NAME="x_Invoice_Num" VALUE="invoice number goes here">
Enter your first name:
<INPUT TYPE=TEXT NAME="x_First_Name"><BR>
Enter your last name:
<INPUT TYPE=TEXT NAME="x_Last_Name"><BR>
Enter Any special shipping instructions:
<INPUT TYPE=TEXT NAME="Shipping_Instructions"><BR>
<INPUT TYPE=SUBMIT VALUE="Click here for secure payment form">
</FORM>
The function InsertFP is provided by the gateway and can be downloaded from the Merchant Interface. This function must be called within a server-side script on the merchant Web server. The above example shows the call being made in an ASP scripting environment.
Back to Top
EXAMPLE 3 – Requesting a Receipt Page
The following HTML code shows the request for the Receipt Page, including generating the fingerprint and sending it along with rest of the fields.
<!--#INCLUDE FILE="simlib.asp"-->
<FORM METHOD=POST ACTION="https://secure.authorize.net/gateway/transact.dll”>
<% ret = InsertFP (loginid, txnkey, amount, sequence) %>
<INPUT TYPE=HIDDEN NAME="x_Version" VALUE="3.1">
<INPUT TYPE=HIDDEN NAME="x_Login" VALUE="your login ID goes here">
<INPUT TYPE=HIDDEN NAME="x_Card_Num" VALUE="customer’s credit card number">
<INPUT TYPE=HIDDEN NAME="x_Exp_Date" VALUE="customer’s credit card expiration date goes here">
<INPUT TYPE=HIDDEN NAME="x_Amount" VALUE="amount goes here">
<INPUT TYPE=SUBMIT VALUE="Submit">
</FORM>
Back to Top
EXAMPLE 4 - Requesting a Payment Form and a Relay Response
The following are the minimum requirements for requesting a Relay Response from the gateway. This code includes the function for generating the fingerprint and sending it along with rest of the fields.
<!--#INCLUDE FILE="simlib.asp"-->
<FORM METHOD=POST ACTION="https://secure.authorize.net/gatewaytransact.dll/">
<% ret = InsertFP (loginid, txnkey, amount,
sequence) %>
<INPUT TYPE=HIDDEN NAME="x_Login"
VALUE="your login ID goes here">
<INPUT TYPE=HIDDEN NAME="x_Amount"
VALUE="amount goes here">
<INPUT TYPE=HIDDEN NAME="x_Relay_Response"
VALUE="True">
<INPUT TYPE=HIDDEN NAME="x_Relay_URL"
VALUE="Any valid URL">
<INPUT TYPE=SUBMIT VALUE="Click here
for secure payment form">
</FORM>
The function InsertFP is provided by the gateway
and can be downloaded from the Merchant Interface.
Since the HTML code that is returned to the
browser appears to come from the gateway server, any links to images need to
be absolute URLs with the full path to the server on which the images reside.
If relative URLs are used, the customer’s browser will try to load the images
from the gateway server and would fail.
Back to Top
|