You are viewing a plain-jane printable version of http://CoverYourASP.com/CreditCards3.asp.
See how this was done

 

The form

First, take a look at my payment form. What makes this form different from my other forms?
Posting the form to Authorize.net
One thing that is certainly different is that I'm not processing the form - Authorize.net is. To do this, I just specify their URL as the form target:

Out ( '<form method="post" action="https://secure.authorize.net/gateway/transact.dll">' );

Two things to note here. First, the URL starts "https" - denoting that this is a page secured by SSL. Secondly, due to the enormous amount of traffic that Authorize.net has, they have implemented a COM component to process the form. Read how easy this is in my article.

Data hidden in the form
There are around 40 pieces of information that you can pass into Authorize.net's system, most of which are passed as hidden fields in the form. Here are the ones I use:

Out ( '<input type="hidden" name="x_Version" value="3.0">' );
Out ( '<input type="hidden" name="x_Login" value="shacom">' );
Out ( '<input type="hidden" name="x_Show_Form" value="PAYMENT_FORM">' );

I then expose two of the fields on the form so the user can enter values. I could just as easily have got the values from a database and kept the fields hidden if necessary.

Out ( 'Invoice #: <input type="text" name="x_Invoice_Num" size="8">' );
Out ( 'Amount: $<input type="text" name="x_Amount" size="8">' );

And finally, show a button to submit the form to Authorize.net.

Out ( '<input type="submit" value="Click here for secure payment form">' );

Part 4: The secure form...