Re: Duplicate Orders/Order Confirmation
I was having very similar issues and I was able to fix it. See this and this for my OG post.
I had changed from the PHP email method to SMTP/SMTPAUTH and duplicate orders started. Changed it back and not a single duplicate order.
Despite not being as secure and spam friendly as SMTP/SMTPAUTH, it works as it has for three years.
Re: Duplicate Orders/Order Confirmation
Anyone get definitive answer to this yet? I have 1.3.9g, and am also getting occasional duplicate orders with web paypal pro. I am looking at going to 1.3.9h, but don't see that this will have any affect in the area.
Looking at logs for recent triplicate: there are different transaction ids, and timestamp is 14 secs apart for each of the 3.
I'm guessing from reading posts that this is multiple clicks. In pages/checkout_confirmation/jscript_main.php, I have the submitonce stuff in. Just wondering, why have 4 sec timeout on disable? Can this just never reenable the submit button? Presumably, on error they'd have to do something else anyway.
Re: Duplicate Orders/Order Confirmation
Quote:
Originally Posted by
dlcohenzc
Anyone get definitive answer to this yet? I have 1.3.9g, and am also getting occasional duplicate orders with web paypal pro. I am looking at going to 1.3.9h, but don't see that this will have any affect in the area.
Looking at logs for recent triplicate: there are different transaction ids, and timestamp is 14 secs apart for each of the 3.
I'm guessing from reading posts that this is multiple clicks. In pages/checkout_confirmation/jscript_main.php, I have the submitonce stuff in. Just wondering, why have 4 sec timeout on disable? Can this just never reenable the submit button? Presumably, on error they'd have to do something else anyway.
According to the logs you shared, yours looks very much like the button was pressed repeatedly, or the customer thought it was taking too long to respond and they refreshed the page in their browser and clicked submit again.
Zen Cart isn't going to submit the transactions multiple times on its own. That has to be initiated by the customer.
Others in this discussion are typically reporting the duplicates which are occurring from a different cause. Your logs show that yours are pretty clearly a result of the customer submitting multiple times.
I still recommend doing the simple upgrade from 1.3.9g to 1.3.9h.
Re: Duplicate Orders/Order Confirmation
Thanks much for the reply. Duplicate clicking was my guess as well. I am going to add a message to only click once, and also in submitonce function not reenable the button after 4 second timeout, just leave it disabled. (Sound reasonable?)
I just upgraded to 1.3.9h
BTW, after working with new customer on their 2 ZC stores, I think I am an old-time osCommerce convert (I did massive osc customizations that ZC gives me for free now...)
- Dave
Re: Duplicate Orders/Order Confirmation
Quote:
Originally Posted by
DrByte
According to the logs you shared, yours looks very much like the button was pressed repeatedly,
In which log-file and how can it be seen?
I am asking because I experience the same problem sometimes since around 10 days. I am using version 1.3.9h and nothing has been changed from my side. Just suddenly this problem occured.
The point which is really annoying is that I can not simply delete the order and do an auto-restock. Some items are deducted, others are not. So every item of the deleted double order has to be checked manually.
Re: Duplicate Orders/Order Confirmation
Just had 6 duplicate orders in a row but 4 were PayPal the other was Google checkout so this looks like a zen issue not a paypal issue dose anyone have a fix on this yet ?
I have lost a bit of money for this happening as I missed some of them to start with.
Re: Duplicate Orders/Order Confirmation
Sounds more like a template issue. The default template automatically disables the Submit button once it's clicked the first time. If you've changed things in a way that breaks that normal functionality then it's possible that your customers are clicking multiple times, resulting in multiple charges.
Re: Duplicate Orders/Order Confirmation
I looked at info regarding the submit button and it is in the template to stop multi clicks emailed one of the customers and he said he hit the back button on his mouse by accident after he clicked submit.
Google order is showing first order as Google processing the second is showing as Google new with no data.
Re: Duplicate Orders/Order Confirmation
Quote:
Originally Posted by
klevans
I looked at info regarding the submit button and it is in the template to stop multi clicks emailed one of the customers and he said he hit the back button on his mouse by accident after he clicked submit.
So, user error.
Quote:
Originally Posted by
klevans
Google order is showing first order as Google processing the second is showing as Google new with no data.
Those are normal symptoms.
Re: Duplicate Orders/Order Confirmation
I belie the reason is too many REQUEST coming to ipn_main_handler.php for same Checkout. so it start to process all POST request parallel and this causes duplicate order.
because the code ipn_main_handler.php already have duplicate request check control. so why this control not works lets see step by step
PHP Code:
$lookupData = ipn_lookup_transaction($_POST);
.....
$new_record_needed = ($txn_type == 'unique' ? true : false);
1.POST1 comes to ipn_main_handler.php
2.POST1 start processing check is there same PayPal request processed NO (check paypal table)
3.POST1 INSERT New Order to orders table
4.POST2 comes to ipn_main_handler.php
5.POST2 start processing check is there same PayPal request processed NO (check paypal table) (NO Because We haven't Insert POST1 row to paypal table
6.POST1 INSERT New Order to orders table
7.POST1 insert row to paypal table
8.POST2 insert row to paypal table
as you can see there is time lag between 7. step and 5. step. because of this parallel processing, is unique papal order checking fails and system process both post data as a new order.
i checked the Apache behavior with following code. when i send a two request from different browsers it procesed same page at same time(paralley).
PHP Code:
for($i=0;$i<8;$i++)
{
echo "$i. ".date("H:i:s", time())." <br>";
sleep(1);
}
and solution for this problem is using a table which keeps txn_id | (and process status)
and before start to process
1.update table txn_id|inprogress
2.second Post data checks if its in in progress then wait 5 seconds and check again until first process changed to txn_id|done
it have same weakness but if you don't use auto increment key. sytem have to wait for eacother because of SQL insert integrity or it gives duplicate key error.
This is my Theory of Duplicate orders. if you have any comments or different views on this analyze i love to hear. i have to solve duplicate problem.
anyone solved the problem ?? please share your solution...
thanks