following code in callback() method
Code: Select all
$sql = "update `order` set `order_status_id` = '?' where `reference` = '?' and `order_status_id` = '?'";
$parsed = $this->database->parse($sql, $paidUnconfirmedStatus, $reference, $pendingStatus);
i think it should be...
Code: Select all
$sql = "update `order` set `order_status_id` = '?' where `reference` = '?' and `order_status_id` = '?'";
$parsed = $this->database->parse($sql, $pendingStatus, $reference, $paidUnconfirmedStatus);
2. so if we have to tackle this problem, we need 1 "if-else" each in process() and callback() methods. please if u got time do us a favour...or i'll try to make it if i got time...
from bruce
Hi asif. Thanks for the feedback. The race between paypal and your store to process the order still exists with the "if-else" you propose. Both paypal and your store could be trying to process the order at the same time, one deleting data that the other is trying to copy because the process function does not use locking or transactions. Your issue could be addressed, but the solution is not that simple.
However, the beauty of this mechanism is that there is no reliance on the callback. If the callback fails, the situation is exactly the same as if the callback does not come.
I have posted the bug fix that you provided http://www.opencart.com/contribution/in ... tion_id/33
Cheers
Bruce