We have a problem with "sort order" of IPN requests from PayPal. PayPal sends two IPN requests to some of our orders (that were created at external POS). First is "pending" and second is "complete", but our server sometimes receives these requests in reverse order. So we are receiving something like:
[04/Sep/2018:07:13:55 +0000] <= time when server receives first IPN ... payment_date=23:52:21 Sep 03, 2018 PDT <= payment time payment_status=Completed ... [04/Sep/2018:07:14:04 +0000] <= time when server receives second IPN ... payment_date=23:52:13 Sep 03, 2018 PDT <= payment time payment_status=Pending ...
Problem is that first IPN setup the order state to "Processing" and second IPN changes the order state back to "Pending Payment" - so admin does not know that order is paid. We are using standard Mage_PayPal (but maybe some 3rd party module rewrites them, I am not sure now).
I would like to ask you, Is there anyone who has meets this problem? Is the changing the order state to "Pedning Payment" a standard behaviour? Any idea how to solve it?
Very thank you.