Reputation: 21
I have the following lines of code in my project:
$queryString = http_build_query($data);
$hCurl = $this->_setApiEndpoint($queryString);
$headers = array('Content-type: multipart/form-data');
curl_setopt($hCurl, CURLOPT_HTTPHEADER, $headers);
//turning off the server and peer verification(TrustManager Concept).
curl_setopt($hCurl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($hCurl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($hCurl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
parse_str($response, $result);
This is our paypal integration. We are using diffrent API endpoints and everything is working mostly fine. This code is in production and it is working. But only one Method is not working in the sandbox (DoExpressCheckoutPayment). I thought already that it is a Bug inside the Sandbox, but curl_error and curl_errno prints an error and I also tried it with Postman and it worked.
curl_errno = 56
curl_error = SSL read: error:00000000:lib(0):func(0):reason(0), errno 104
The request a fired inside a docker machine and we use https local. Thanks for help everyone.
Upvotes: 2
Views: 376
Reputation: 33
I've found a solution. You should use POST instead of GET. Of course this is not mentioned anywhere in the PayPal docs.. The error message is also pretty cryptic.
Upvotes: 1