We handle 10-20 payments daily using Paypals IPN system.
The past hour or so Paypal has been sending the IPNs in the wrong order.
Our payments are subscriptions.
So generally they send.
Subscr_signup
& shortly after that
susbcr_payment.
But today they've been sending the subscr_payment before the subscr_signup every time. Which messed up our flow since the payment tries to link itself with a subscriber which it can't so it throws an error. This has forced us to manually add all the information which is a headache.
Any ideas on how I should solve this?
IPN is an asynchronous, best-effort delivery service. The "Instant" in its name, can be misleading, since that service was created a long time ago, and it was instant relative to, say, waiting for an email and processing things manually.
Since payments and subscription profile creations are separate events in separate systems, you may receive notifications of each event in any order.
You should be able to create new/temporary/placeholder subscriber objects with the first subscr_payment event alone -- and if necessary fill in any missing information (or activate the placeholder) when you do receive a subscr_signup even.
Paypal IPN sent in the wrong order