PayPal Express Checkout PHP not getting a response

2019-02-27 21:35发布

问题:

I'm currently trying to get PayPal express checkout working using the angelleye codeigniter library (https://github.com/angelleye/paypal-codeigniter). I'm not getting a response or any errors from PayPal. The only error I am getting is an undefined index of ACK due to there not being a response. There are not any curl errors and the PayPal response comes back with an empty array.

Is there a way of checking where this is failing?

Running on:

Ubuntu 12.04.5

curl 7.37.0

PHP 5.5.32

Apache 2.4.12

OpenSSL 1.0.1

回答1:

In /application/libraries/paypal/Paypal_pro.php find the CURLRequest() function. Should be at line 589.

After this line in the function:

$Response = curl_exec($curl);

Add the following, add the following:

if($Response === FALSE) {
  echo "cURL Error: " . curl_error($curl);
  exit();
}

Then run another test. If there is a curl error happening you should be able to see it.