Paypal SandBox IPN always returns INVALID

前端 未结 9 1443
予麋鹿
予麋鹿 2020-12-03 08:33

As mentioned in one of the comments in an answer below, I tried following this tutorial. So now I have the following:


The ipn.php file:

9条回答
  •  猫巷女王i
    2020-12-03 09:12

    1. Got it working using the basic sample code 4b,

    2. Cleared $ipnNotificationUrl = ""; from the basic sample code as I had a value in there which I added myself,

    3. Created a seller account instead of a business pro account in sandbox,

    4. Set the seller account to enable the ipn url,

    5. Used the following PHP 5.2 sample code for the ipn listener

    6. Added the 2 lines into the listener, as described here, the 2 lines can be seen below:

    7. Downloaded the cacert.pem certificate to my server from here and put it in the same directory as the ipn listener:

    The 2 lines mentioned in point 6:

    CURLOPT_SSL_VERIFYPEER => TRUE,
    CURLOPT_CAINFO => 'cacert.pem',
    

    I have no idea why the sandbox business pro account does not let me set an ipn url, but the seller account does.

提交回复
热议问题