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
33 active users
1873 visitors today
2414 pages today
(only part of today)
Tools I use

CoverYourASP
Copyright © 1999-2010 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



See my source code
wherever you see this icon...

You can also download the entire site source code for FREE!


New Proposal Kit Professional 5.1
Brand yourself as a top professional: create quotes and amazing proposals and get many legal documents free!

The latter saved me 3 times the purchase price on the first day I owned it!