From March 25 PayPal doesn't support HTTP/1.0, see details here. You can find helpfull this post
Paypal SANDBOX SetExpressCheckout stopped working
Question
For some reason, when I try to connect to paypal sandbox API and do SetExpressCheckout using my XAMPP server it fails. I turned error reporting on and this is the message I get:
Warning: file_get_contents(https://api-3t.sandbox.paypal.com/nvp/): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden
I've done some tests and it just does not make sense:
- I can connect to the live API with correct credentials.
- I can connect to the live API with incorrect credentials.
- I cannot connect to the sandbox API with correct or incorrect credentials.
- I can connect to live API and sandbox API using web browser using correct or incorrect credentials.
- If I put in an invalid website name, it gives me a different warning (below).
Warning:
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: No such host is known.
So why is it that when I connect to https://api-3t.sandbox.paypal.com/nvp/ using my local server there is no response? I have not changed the code and it still works with Paypal live so what's going on here suddenly?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow