We're dumping Authorize.Net in favor of Verisign. Authorize.net causes us issues because they occasionally have problems and they hang. When they do, they cause our servers to hang too. This is largely because the <@URL> tag doesn't have an attribute that we can set to make it "time out". Therefore if Authorize.Net is having problems and doesn't respond in a reasonable time, the user on our site would get stuck.

 

I wrote a workaround, but it isn't as great as I would like it to be.

 

Verisign uses an object that we can hit that times out locally, rather than waiting for a server somewhere else to time out, in the event that it times out, I can bypass it and still allow the customer to have a good experience.

 

Here is the code you are looking for it has been in place for 2 years, processed over 400,000 credit card transactions and has never given us any trouble (note, it is copied from a TCF file and cleaned to present here):

 

<@ASSIGN NAME="clientId" VALUE="YOUR VALUE" SCOPE="Local">

<@ASSIGN NAME="orderId" VALUE="YOUR VALUE" SCOPE="Local">

<@ASSIGN NAME="orderTotal" VALUE="YOUR VALUE" SCOPE="Local">

<@ASSIGN NAME="badd1" VALUE="YOUR VALUE" SCOPE="Local">

<@ASSIGN NAME="bzip" VALUE="YOUR VALUE" SCOPE="Local">

<@ASSIGN NAME="cNumber" VALUE="YOUR VALUE" SCOPE="Local">

<@ASSIGN NAME="cExpM" VALUE="YOUR VALUE" SCOPE="Local">

<@ASSIGN NAME="cExpY" VALUE="YOUR VALUE" SCOPE="Local">

<@ASSIGN NAME="cVC" VALUE="YOUR VALUE" SCOPE="Local">

<@ASSIGN NAME="merchantLogin" VALUE="YOUR VALUE" SCOPE="Local">

<@ASSIGN NAME="merchantPassword" VALUE="YOUR VALUE" SCOPE="Local">

 

<@IF "@@local$cNumber != PLACE A TEST CC NUM HERE TO BYPASS AUTHNET">

   <@ASSIGN NAME="argList" VALUE="x_version=3.1&x_local=CC&x_delim_data=True&x_delim_char=~&x_encap_char=^&x_login=<@VAR merchantLogin scope=local>&x_password=<@VAR merchantPassword scope=local>&x_amount=@@local$orderTotal&x_card_num=@@local$cNumber&x_exp_date=@@local$cExpM@@local$cExpY&x_type=AUTH_CAPTURE&x_test_request=False&x_address=<@URLENCODE STR='@@local$badd1'>&x_zip=@@local$bzip&x_cust_id=@@local$clientId&x_invoice_num=@@local$orderId&x_card_code=@@local$cVC&x_description=@@local$internalTransactionCode" SCOPE="local">

   <@ASSIGN NAME="ccProcessPath" VALUE="https://secure.authorize.net/gateway/transact.dll" SCOPE="local">

   <@ASSIGN NAME="package" VALUE='<@URL LOCATION="<@VAR ccProcessPath SCOPE=local>" POSTARGS="@@local$argList">' SCOPE="local">

   <@ASSIGN NAME="finalPackage" VALUE="@@local$package" SCOPE="local">

   <@ASSIGN NAME="package" VALUE='<@TOKENIZE VALUE="@@local$package" CHARS="~">' SCOPE="local">

   <@IF '<@REPLACE STR="<@VAR package[1,1] SCOPE=local>" FINDSTR="^" REPLACESTR=""> = 1'>

      <@ASSIGN NAME="ssl_result" VALUE="0" SCOPE="local">

   <@ELSE>

      <@ASSIGN NAME="ssl_result" VALUE='<@REPLACE STR="<@VAR package[1,1] SCOPE=local>" FINDSTR="^" REPLACESTR="">' SCOPE="local">

   </@IF>

   <@ASSIGN NAME="ssl_approval_code" VALUE='<@REPLACE STR="<@VAR package[1,5] SCOPE=local>" FINDSTR="^" REPLACESTR="">' SCOPE="local">

   <@ASSIGN NAME="ssl_avs_response" VALUE='<@REPLACE STR="<@VAR package[1,6] SCOPE=local>" FINDSTR="^" REPLACESTR="">' SCOPE="local">

   <@ASSIGN NAME="ssl_txn_id" VALUE='<@REPLACE STR="<@VAR package[1,7] SCOPE=local>" FINDSTR="^" REPLACESTR="">' SCOPE="local">

   <@ASSIGN NAME="ssl_result_message" VALUE='<@REPLACE STR="<@VAR package[1,4] SCOPE=local>" FINDSTR="^" REPLACESTR="">' SCOPE="local">

   <@ASSIGN NAME="cvc_match" VALUE=<@REPLACE STR="<@VAR package[1,39] SCOPE=local>" FINDSTR="^" REPLACESTR=""> SCOPE="local">

   <@IF "@@local$ssl_result = ''">

      <@ASSIGN NAME="ssl_result" VALUE="0" SCOPE="local">

      <@ASSIGN NAME="ssl_approval_code" VALUE="tmp000" SCOPE="local">

      <@ASSIGN NAME="ssl_avs_response" VALUE="server not responding" SCOPE="local">

      <@ASSIGN NAME="ssl_result_message" VALUE="server not responding" SCOPE="local">

   </@IF>

<@ELSE>

   <@ASSIGN NAME="ssl_result" VALUE="0" SCOPE="local">

   <@ASSIGN NAME="ssl_approval_code" VALUE="testOrder" SCOPE="local">

   <@ASSIGN NAME="ssl_avs_response" VALUE="test order" SCOPE="local">

   <@ASSIGN NAME="ssl_result_message" VALUE="test order" SCOPE="local">

</@IF>

 


From: Wolf, Gene [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 23, 2005 3:12 PM
To: [email protected]
Subject: Witango-Talk: Authorize.net - Shopping Cart, charting, etc.

 

   Hutch,

 

   Please make sure you complain to these folks that you would like to see examples in Witango code. Also, for everyone else using a third party piece of software or utility that gives examples in everything but Witango, please do the same. I have done so with Corda, but they have said they have never heard of Witango and never received a request other than mine. If we make ourselves heard instead of just accepting that this is the status quo, maybe that will change with some of these vendors.

-----Original Message-----
From: Hutch White [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 17, 2005 7:22 PM
To: [email protected]
Subject: Witango-Talk: Authorize.net - Shopping Cart

I’ve been so busy listening to the good ideas and discussion on this list that I’ve never needed to  post.  Has anyone written code to authenticate credit card sales to authorize.net?  They have given examples in perl, .net and php, but I sure could use some help setting it up in Tango.

 

Thanks in advance.

 

Hutch White

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to