Wife/Girlfriend/Sister?
Pepper Spray &
Stun Gun Specials!
KEEP THEM SAFE.
 CoverYourASP --> Accepting credit cards on your site --> Part 3

Free membership

Join in the fun! Sign in
Member Services

Site navigation
Download the entire site!
Search my articles
Free Magazines
Browse the directory

Send me feedback
Buy my boxer shorts

Recommend this page
Printer-friendly page

Resources I recommend
Link to my site
Advertising slashed!
About your privacy
Legal stuff
Site statistics
14 active users
30 visitors today
113 pages today
how is this done?
Tools I use

CoverYourASP
Copyright © 1999-2012 James Shaw.
All rights reserved.

ASP.NET Blog
RSS submissions
E-commerce

Now open source with SourceForge!

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...

Featured sponsor
My favorite resources

Tiki Statues - Tiki Masks - Tiki Totems



I share my content

Supporting ASPRSS

Do you need a quick and easy way to link to my articles? All the information you need is published with ASPRSS...

CoverYourASP Mugs, T-shirts, caps - even Boxer shorts...
I don't make a penny from these, but they're a lot of fun! Don't you need a new mouse mat?