Credit Card Processing with Revolution |
|
1. Sign up for a merchant account with e-onlinedata.com (an Authorize.net reseller). Seems any valid business will likely be accepted. This provides the processing gateway. Cost is under $100. Takes a couple of days.
2. Download the Comodo CA root certificate from here:
3. Put this certificate anywhere you like. Then in your code:
4. Here's the main code:set the sslcertificates to "the path to this certificate"
on processCard
local tPostData
set the sslcertificates to "the path to that certificate"
-- gather the minimum data requiring by Authorize.net
-- very detailed information on all of this and other options
-- are available in the pdf guide you get from Authorize
put 1.0 into tPostData["x_cpversion"]
put 2 into tPostData["x_market_type"]
put 5 into tPostData["x_device_type"]
put 1 into tPostData["response_format"]
put totalcharge into tPostData["x_amount"]
put "AUTH_CAPTURE" into tPostData["x_type"]
--these next two items use your Login name and a transaction key
--received from Authorize.net
put the urlEncode of pLogin into tPostData["x_login"]
put the urlEncode of pTranKey into tPostData["x_tran_key"]
-- this next line can be done a number of different ways,
-- depending on how you want to input the card data
put the urlEncode of cardData into tPostData["x_track1"]
-- Turn the array into a string in suitable 'query' style...
combine tPostData with "&" and "="
-- Do the post...
post tPostData to URL
"https://cardpresent.authorize.net/gateway/transact.dll"
-- Get the response from Authorize
put it into tResponse
end processCard
That's it! Rev takes care of all the security issues behind the scenes.
Works like a charm.
Posted 2/8/2005 by Richard Miller to the Use Revolution List