Forums / General Questions / Credit Card Getting Charged Twice

Credit Card Getting Charged Twice

Views: 5,473

Results 1 to 7 of 7
22 Aug 2016, 5:33 PM
#1
nerdgirlie avatar

nerdgirlie

New Zenner

Join Date:
Jul 2011
Posts:
16
Plugin Contributions:
0

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

22 Aug 2016, 7:20 PM
#2
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

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

function submitonce()
{
  var button = document.getElementById("btn_submit");
  button.style.cursor="wait";
  button.disabled = true;
  setTimeout('button_timeout()', 4000);
  return false;
}

New

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.

22 Aug 2016, 7:21 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Aug 2016, 7:27 PM
#4
nerdgirlie avatar

nerdgirlie

New Zenner

Join Date:
Jul 2011
Posts:
16
Plugin Contributions:
0

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

23 Aug 2016, 2:20 AM
#5
win8win avatar

win8win

Zen Follower

Join Date:
Apr 2012
Location:
beijing
Posts:
258
Plugin Contributions:
1

Re: Credit Card Getting Charged Twice

backup ,and then upgrade zencart version would be the best choice.

focus on the open source for online shoping website.
my site: best shop 24h.com

24 Aug 2016, 5:11 PM
#6
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

Re: Credit Card Getting Charged Twice

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!

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

25 Aug 2016, 7:42 AM
#7
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

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.

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.