Credit Card Getting Charged Twice
Hey Folks,
I have had this issue for almost a year now, and am attempting to resolve it.
About once a week, I get 2 receipts from Authorize.net from the same person in the same minute. I only get ONE order from zen cart, but the credit card is charged twice, both transactions within seconds of each other.
There are 3 parties here: My credit card gateway, Authorize.net, my web hosting service, GoDaddy, and my eCommerce software, Zen Cart.
What Authorize.net says: Each charge is sending them a separate invoice. The customer may have clicked the SUBMIT ORDER button twice. These are not being identified as duplicate transactions since they have separate Invoice numbers.
Can someone tell me if this is a GoDaddy response time issue? Or, is there some sort of timeout I can set in Zen Cart to prevent this from happening?
I have ruled out Authorize.net from being the culprit, but need another lead to follow. Also, should I even be using GoDaddy with this eCommerce solution?
Thanks so much!
Aurora
Re: Credit Card Getting Charged Twice
I had the same issue on a client site recently and it appears to have been a timing issue. The default time for the checkout button to be disabled is 4 seconds. I made the following change to includes/modules/pages/checkout_confirmation.php on a 1.5.1 site:
Original
PHP Code:
function submitonce()
{
var button = document.getElementById("btn_submit");
button.style.cursor="wait";
button.disabled = true;
setTimeout('button_timeout()', 4000);
return false;
}
New
PHP Code:
function submitonce()
{
var button = document.getElementById("btn_submit");
button.style.cursor="wait";
button.disabled = true;
setTimeout('button_timeout()', 20000);
return false;
}
4000 becomes 20000
They have not had a duplicate order since making this change.
Re: Credit Card Getting Charged Twice
Multiple possible causes:
- Anytime GoDaddy is mentioned it usually causes peoples eyes to wrinkle if they've ever used GoDaddy before. Ya, they can sometimes be the performance bottleneck.
- Your v.1.3.9 edition of Zen Cart was released 6 years ago, and lots of bugfixes have been posted since then as well as 5 new releases, all with improvements around performance, payment processing, and minimizing user-error.
Like badarac mentioned:
- One of the fixes to bandage your issue until you do an upgrade could be to add some javascript to prevent double-submissions of the checkout form. Newer versions of Zen Cart have something for this built-in.
Re: Credit Card Getting Charged Twice
Fantastic!
Badarac, I will give that a shot as a shortcut in the meantime. Thanks for that!
DrByte, what hosting service do you recommend instead of GoDaddy? Lastly, can I just upgrade to the latest version from my current version following the latest instructions?
Thanks all!
Aurora
Re: Credit Card Getting Charged Twice
backup ,and then upgrade zencart version would be the best choice.
Re: Credit Card Getting Charged Twice
Quote:
Originally Posted by
nerdgirlie
About once a week, I get 2 receipts from Authorize.net from the same person in the same minute. I only get ONE order from zen cart, but the credit card is charged twice, both transactions within seconds of each other.
What Authorize.net says: Each charge is sending them a separate invoice. The customer may have clicked the SUBMIT ORDER button twice. These are not being identified as duplicate transactions since they have separate Invoice numbers.
i'm a bit curious here. if you have 2 charges at authorize.net with separate invoice numbers, and only 1 order in zen-cart, what has happened to the second invoice number sent to authorize.net? does that invoice/order number NOT exist on your zen-cart system? if it does not, do you have missing invoice/order numbers in your orders table?
in my experience dealing with authorize.net, they are rarely, if ever, at fault. they effectively process whatever you send them.
i think the solutions presented here are all sound, but if authorize.net says they have separate invoice numbers for the transactions, it should not be too hard to track that back to your ZC orders table, and see if those orders exist.
good luck!
Re: Credit Card Getting Charged Twice
Happened to me once with the eWay payments module.
Did what badarac recommended (extended the timeout) and added a few lines of jscript and php code to display an animated gif image "Please Wait - processing ....". Details in the eWay thread.
Never had that problem ever again.