views:

172

answers:

1

i am trying to sell a few products off my website, and i need to just accept a credit card and be able to push a download to the buyer.

here's an excellent way to do this with paypal items

http://www.ngcoders.com/php/selling-digital-goods-with-paypal-ipn-and-php

do you know if i can do the same thing authorize.net?

+1  A: 

There are 3 ways to integrate your application with authorize.net:

  • Simple Checkout
  • Server Integration Method (SIM)
  • Advanced Integration Method (AIM)

You are most likely to use the 2nd approach.

Sample code can be downloaded here: http://developer.authorize.net/samplecode/

Basically, the form will look like this:

<FORM method='post' action='<?= $url ?>' >
    <INPUT type='hidden' name='x_login' value='<?= $loginID %>' />
    <INPUT type='hidden' name='x_amount' value='<?= $amount %>' />
    <INPUT type='hidden' name='x_description' value='<?= $description %>' />
    <INPUT type='hidden' name='x_invoice_num' value='<?= $invoice %>' />
    <INPUT type='hidden' name='x_fp_sequence' value='<?= $sequence %>' />
    <INPUT type='hidden' name='x_fp_timestamp' value='<?= $timeStamp %>' />
    <INPUT type='hidden' name='x_fp_hash' value='<?= $fingerprint %>' />
    <INPUT type='hidden' name='x_test_request' value='<?= $testMode %>' />
    <INPUT type='hidden' name='x_show_form' value='PAYMENT_FORM' />
    <input type='submit' value='<?= $label %>' />
</FORM>

And the URL is one of the following:

// Testing
$url = "https://test.authorize.net/gateway/transact.dll" ;
// Real account
$url = "https://secure.authorize.net/gateway/transact.dll" ;

See the sample code for more details.

St.Woland
how do i get a login for each user?
I__
http://developer.authorize.net/faqs/#gettranskeyAPI Login ID is what you need.
St.Woland
so is it really this easy to have the user buy an item at a set price? all i do is make this form and thats it?
I__
basically, yes ;) testing should help
St.Woland