Reputation: 6965
In real (not Sandbox) environment Paypal IPN sends POST data with payment_status = Completed. But when I tried to get transaction confirmation from Paypal (using CURL) I receive an empty string (not "VERIFIED" or "INVALID").
CURL does not return any error. For confirmation in real environment I use https://www.paypal.com/cgi-bin/webscr (that's for sure). Moreover in Sandbox everything works properly.
The error appeared about 2 months ago. I noticed that paypal had changed a little design of the site. Perhaps confirmation process is also changed. But I did not find any updates in the documentation.
Has anybody met a similar problem?
Upvotes: 2
Views: 3199
Reputation: 143
Late to the game, but just in case anyone else asks.
I've been troubleshooting this for a few hours, and as it happened in my case, PayPal requires you use the full URL for IPN testing with Sandbox.
eg, use this URL "https://www.sandbox.paypal.com/cgi-bin/webscr" rather than "https://sandbox.paypal.com/cgi-bin/webscr". You need to include the www or PayPal will throw you an empty string. It won't return INVALID and it won't Verify - it just gets you an empty.
It worked for me anyway. Once I changed this everything's been up and running fine.
Upvotes: 0
Reputation: 1336
If you get empty responses, just retry. If all retries fail, send out a 500 Internal Server Error and the PayPal IPN server will retry later. Also, you might want to log the full server response (including headers) whenever you get an empty response.
Upvotes: 2