ASP/.NET Web Hosting
* 3 Months FREE *
CLICK HERE!
 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
165 active users
3163 visitors today
4726 pages today
how is this done?
ASP.NET Showcase
ASP.NET Graph and Chart Component with FREE developer version

ASP.NET Shopping Cart and E-commerce Control with FREE trial download

ASP.NET Web Hosting with free month and setup

$15 Domain Name Registration from .DNR.
As seen on these sites
Special thanks go to the sites that support me by publishing my articles.
See more

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

ASP.NET Blog
ASPRSS
ShawThing

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

Selling products online - read how James does it now



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!

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?