PayPal Instant Payment Notification Warning (IPN)

Even though payments are coming through, and members are being registered, and everything onsite looks ok, I receive the following email from PayPal every day:

PayPal Instant Payment Notification Warning

Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing:

https://www.mydomain.com/paypal-central-ipn.php

If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information. If this problem continues, IPNs may be disabled for your account.

Thank you for your prompt attention to this issue.

Now, I have read that there are other IPN threads on the s2member forums here, and am no clearer as to why this might be happening. If I check my logs I see:


gateway-core-ipn.log: [12] => Storing IPN signup vars now. These are associated with a User’s account record; for future reference.

Which seems to imply everything has been successfully processed. What is PayPal’s (or my) problem?

ps. I’m using s2member Version 200301 + s2Member Pro v200301

R.

Have a look in your Apache / NGINX logs and see if the PayPal IPN is being received and see what response code is being sent back.

If PayPal is complaining then it is either receiving no response to its API call or it is receiving an error code. Whichever it is will tell us if this is a server problem, a firewall problem. or an s2member problem.

hi Tim,

if you mean the nginx access.log, then I see this entry:

[14/Apr/2020:15:36:38 +0000] "GET /standalone/t2/?s2p-option&s2member_paypal_xco=s2member_pro_paypal_checkout_ret
urn&token=EC-92H912345D12345F HTTP/2.0" 302 0 "https://www.paypal.com/webapps/hermes?flow=1-P&ulReturn=true&token=EC-92H912345D12345F" "Mozilla/5.0 (X11;
Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"

Which appears to me to be fairly positive: ulReturn=true and a return code of 302, but I’m not sure if that’s what you mean I should be looking for not? I don’t see anything else remotely resempling PayPal or IPN in any other logs (besides what I included in the OP).

R.

This shows that the response to the request was a 302 redirect.

So when the Paypal callback to the following function is made:

/standalone/t2/?s2p-option&s2member_paypal_xco=s2member_pro_paypal_checkout_ret
urn&token=EC-92H912345D12345F

the server is redirecting back to PayPal using a 302 redirect

https://www.paypal.com/webapps/hermes?flow=1-P&ulReturn=true&token=EC-92H912345D12345F

That seems odd. I would expect to see a 200 response.

curiouser and curiouser. When I fetch this URL, using the correct domain + token, I land on the s2 template page (in this case .../t2/). I’m wondering now whether my template should be “handing off” the call to the /?s2p-option path component in some way.

Fairly sure I’m following the documentation. Hmmm…

Ok, so it seems to be working now. The fix for me was to ensure that the paypal-central-ipn.php script was being executed correctly via php. In my case this involved placing it in the root directory of a WP installation. FYI in case it helps anyone else.

(exactly why this wasn’t the case earlier is too labyrinthine to explain).