Reputation: 3870
It is probably not the best practice but in a simple project of mine I've been using the following link in the Emails being sent to my customers once they fill out my Google form.
In my listener I simply process the POST data from IPN and post it to a simple google sheet so I know whether my customers paid or not.
It's been working fine (Hundreds of transactions have been recorded without any error) until lately I read this on Paypal's IPN instruction page
Although it says my listener MUST respond to EVERY IPN message, I never did that, nor do I think I ever got any resending messages. Ironically, today while I am just writing this I noticed a recent transaction was reported twice in my Google Sheet, and this is the only abnormal record. I then sent a test payment but this time it didn't get reported twice.
I went into the Paypal account and checked IPN hisotry, the transaction in question does have "No. of retries" as "1", as the picture below shows: So this explains why my Google Sheet shows two identical transactions. And it partly matches the behavior described in the IPN instruction page, although there is only 1 retry, in contrast to "keep retrying until my listener responds".
Anyone knows why the actual behavior is so different from what they say on their own page?
Also, since my listener is actually working perfectly, I don't want to touch it at this time. But will it cause potential problems if I leave it as is?
Upvotes: 0
Views: 149
Reputation: 30359
Your IPN listener must reply with an HTTP 2xx success status when PayPal posts to it, or PayPal will keep retrying (up to around 20 times) until it does so.
So if the listener replies with e.g. an HTTP 4xx, 5xx, or gives no reply at all or can't be connected to -- PayPal will keep retrying.
I'm not sure what the specific confusion is here; the behavior is as described. You screenshot shows a 200 for the last status.
Upvotes: 1