The second IPN response after sending cmd=_notify-validate to www.sandbox.paypal.com returns HTTP Error 302.
If I change the URL to www.paypal.com, it returns INVALID response. I am not sure where I am wrong.
Should I use www.paypal.com as a host to validate the IPN in sandbox? I don't think so?
I am really struggling to get this sorted. Any help please?
I had the same issue and it appears that sandbox has switched to ssl. I had to change my code from:
$fp = fsockopen ($paypalUrl, "80", $errno, $errstr, 30);
to:
$fp = fsockopen ('ssl://'.$paypalUrl, "443", $errno, $errstr, 30);
and it worked. I found this solution at http://www.jomres.net/jomres-forum/General-discussion/10590-PayPal-IPN----IP-Address-Expansion
That's not an HTTP error, that's the HTTP response code for accessing https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_notify-validate
You should be looking at the contents of the page, not the HTTP response code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With