Zen Follower
- Join Date:
- Apr 2019
- Posts:
- 382
- Plugin Contributions:
- 0
Post #2501 by njcyx
njcyx:
Update. My live site still received intermittent duplicated orders, like once per week. Nowadays, customers are really mad at this...
Anyway, I did some further changes today and I will report if helps.
I change AJAX time-out from 6s to 8s. A few months ago, I changed it from 4s to 6s. Not sure if it helps.
According to the following post
I change the setTimeout('button_timeout()', 4000) from 4s to 20s. There are two files uses this function:
\includes\modules\pages\checkout_confirmation\jscript_double_submit.php
\includes\modules\pages\checkout_one_confirmation\jscript_main.phpI changed both to 20s. Here is a similar post from Stripe.com plug-in
https://www.zen-cart.com/showthread.php?201999-Stripe-com-payment-integration-module&p=1386282
The author recommended to re-enable the submit button after 9s. So if 20s works on my end, I may try 10s instead.
Background: I'm using zc 1.5.7d, opc 2.4.4b2, paypal pro and express, php 7.4
Update: this trick doesn't help. Two weeks later I received another duplicated order case.