Search code examples
phpcurlpaypal-ipnhttp-status-code-403

PHP - Paypal IPN returns HTTP 403 error since 12.Nov.2019


I just can't figure it out what happened since 12th November.

Everything was working fine and no changes to the server were made, but as of that day the IPN just started returning failed messages with 403 error.

I've also tried debuging mode but its not working as error is 403 and it can't return the status.

Edit: My issue was Cloudflare 'under attack mode' was blocking the paypal ipn url


Solution

  • To troubleshoot and solve this issue your best course of action is to:

    1. Contact PayPal directly. Make sure they didn't make any changes to Paypal IPN or its requirements, and ensure your account is in good standing and allowed capture payments.
    2. Next, look at your hosting environment. Have you updated any software packages, or made any changes?
    3. Has anyone else worked on this software, or managed developer settings in the PayPal account? They could have invalidated the API credentials. Make sure they're current too.
    4. Make sure all of the data you're sending is valid. For example: I've seen PayPal reject payments because they shared the same Invoice Number with an existing payment. The seller had two online stores, and both had started order numbers at #0 and were seeing conflicts.