
August 2nd, 2004, 01:01 PM
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Random cart 'card declined' error but still charges card
I'm hoping someone can suggest what to check ehgre because Im driving myself crazy and spending alot of money to have this fixed and no one can seem to do it. My website processes a transaction through the Authorize.net gateway. Seemingly at random, users will get a "0" string returned after the cart sends the information to the gateway, which will display the card declined msg. If the cart gets a "1", it displays no error, and will send orders and invoices via email. Authorize.net shows no issues or declinations in their records, and the card is charged, but somehow the cart still gets the declined string, and breaks function, thereby not emailing an order copy to user, not sending me an invoice, and not entering the transation as a sale. The charge then needs to be voided since there is no record of the sale or way to contact the user. This usually results in a lost sale. I have included the code that belive to be troublesome, but one thing that makes no sense is that it happens sporadically & randomly, but once it happens once it seems to STAY broken until I re-upload a copy of the file..... even though there have been no changes to the live files. Has anyone else had code gnomes screw with them? I am going CRAZY and losing $$... can someone offer some ways to pin this down? If there is any info I neglected to include, post what I missed and I'll try and post it back.
Code:
<!-- Above this is the DB connection include, and a card # validation routine-->
Set xobj = CreateObject("SOFTWING.ASPtear")
cpost="x_Version='3.0'&x_Login='*******'&x_Password='******'&x_Trans_ID="&hour(now())&minute(now())&second(now())&"&"
cpost=cpost&"x_Card_Num='"&ccnumber&"'&x_Exp_Date='"&ccdate&"'&x_Address='"&basic_rs.fields("address1")&"'&x_Zip='"&basic_rs.fields("zip")&"'&"
cpost=cpost&"x_Amount="&request.form("grandtotal")&"&x_Test_Request='FALSE'&x_ADC_Delim_Data='TRUE'&x_ADC_URL='FALSE'"
' Request to AuthorizeNet
strRetval = xobj.Retrieve(https://*****.*****.com/secure/gateway/URL/, 1, cpost, "", "")
'response.write strRetval
if left(strRetVal,1)=1 then
success=1
end if
if success = 0 then
msg=server.urlencode("Your credit card was declined. If you feel this is an error, please call us Toll Free at....")
response.redirect "checkoutc.asp?msg="&msg
else
<!-- Below this is the order's entry into the DB, &the templates for the invoice/order copies & mail function -->
|