开发者

IPN simulator 403 with codeigniter

开发者 https://www.devze.com 2023-01-17 10:46 出处:网络
i get a 403 with开发者_如何学运维 the IPN simulator my site is online (not on localhost) and i m using the paypal_lib library any idea what could cause this?

i get a 403 with开发者_如何学运维 the IPN simulator my site is online (not on localhost) and i m using the paypal_lib library any idea what could cause this?

this is the message from the IPN simulator : IPN delivery failed. HTTP error code 403: Forbidden


Nobody answered this one yet - it's odd you got 403 forbidden. Most of the people on SO who got that were using the Django PayPal IPN library and fell foul of CSRF authentication, but your CodeIgniter installation likely doesn't have anything like that.

Is the URL you were using definitely available (and not e.g. in a password protected part of your site)?

I would suggest connecting your site to the sandbox and enabling IPN calls from the sandbox, so you can see exactly what is going on. Also I've just released an alternative PayPal IPN library for CodeIgniter, which has much more logging than Paypal_Lib, and has a debugging mode as well for testing the IPN directly. I hope you find it useful:

https://github.com/orderly/codeigniter-paypal-ipn


I just finished going through the same nightmare except not with PayPal, with AlertPay. Chances are the issues are similar.

As it turns out, in my case at least, the 403 Forbidden code is very misleading. I had an error in my button code. I was using the same argument twice. I had copied a custom argument line to add another custom argument but I had forgotten to change the name of the argument.

So I was submitting the button with a duplicate argument and it gave me a 403 Forbidden error. Not a very helpful error as it led me to look in all the wrong places. I too thought it was a permissions issue on my ipn listener but it had nothing to do with that.

In a related matter, after I got this resolved I started getting a 500 (Internal Server Error). This 500 error turned out to be another coding error on my part but this time in my ipn listener script. I had used a "break;" statement inside an "if" statement (PHP) which is not allowed. It's not technically a syntax error so the script was still loading and the code was still executing all around it, but it was an illegal statement and this was causing the 500 Internal Server Error on my IPN.

Hopefully this will help somebody else with the same problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消