A simple Rev credit card processing solution
wow at together.net
Tue Feb 8 06:38:12 CST 2005
Thanks to help from Rev technical support, I can now post a simple,
effective, secure solution to processing a credit card through Rev.
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:
set the sslcertificates to "the path to this certificate"
4. Here's the main code:
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
-- Get the response from Authorize
put it into tResponse
That's it! Rev takes care of all the security issues behind the scenes.
Works like a charm.
Email if you have any questions.
More information about the use-livecode