« Previous Next »

Thread: Random cart 'card declined' error but still charge

Last post 08-02-2004 3:11 PM by Bill_K. 0 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (1 items)

Sort Posts:

  • 08-02-2004, 2:18 PM

    • Bill_K
    • Not Ranked
    • Joined on 08-02-2004, 10:16 AM
    • Posts 0

    Random cart 'card declined' error but still charge

    I'm hoping someone can suggest what to check here 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([url]https://*****.*****.com/secure/gateway/URL/[/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 -->

    [/CODE]
Page 1 of 1 (1 items)
Microsoft Communities