Authorize.net
Richard Kreiss
rkreiss at verizon.net
Tue Nov 3 13:17:37 PST 2009
From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
[mailto:filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com] On
Behalf Of Tyler
Sent: Tuesday, November 03, 2009 11:13 AM
To: filepro-list at lists.celestial.com
Subject: Authorize.net
I don't know how many people use authorize.net, but I thought I'd share the
way I am going to use from inside filepro. Here's my crude sample code
using fp 5.0.14r4 on SCO Openserver 6 with cURL installed:
::DECLARE flags; DECLARE querystr:
::DECLARE url; DECLARE outputfile:
::DECLARE x_login; DECLARE x_tran_key;:
::x_login="redacted"; x_tran_key="redacted":
::flags="-k":
::querystr="-d \"":
::querystr=querystr{"x_login="{x_login{"&x_tran_key="{x_tran_key{"&x_version
=3.1&x_delim_data=TRUE":
::querystr=querystr{"&x_delim_char=%7C&x_relay_response=FALSE&_type=AUTH_CAP
TURE&x_method=CC&x_card_num=4111111111111111":
::querystr=querystr{"&x_exp_date=0115&x_amount=19.99&x_description=Inv%3A555
666%3BCus%3A333222%28Doe%2CJohn%29":
::querystr=querystr{"&x_last_name=Doe&x_address=1234+Street&x_state=WA&x_zip
=98004":
::querystr=querystr{"\"":
::url="\"https//secure.authorize.net/gateway/transact.dll\"":
:@PM eq "test":url="\"https//test.authorize.net/gateway/transact.dll\"":
::outputfile="/tmp/deleteme.txt":
::system "curl" <flags <querystr <url <">" <outputfile <"2> /dev/null":
Hopefully other people may find it of use :)
Tyler,
Suggestion, you can use just one(1) declare
::DECLARE flags, querystr,url,outputfile,x_login, x_tran_key:
In a declare each long variable is separated by a comma.
Richard Kreiss
GCC Consulting
rkreiss at gccconsulting.net
More information about the Filepro-list
mailing list