我正在使用paypal AngellEYE库。
我在我的localhost上测试脚本,它运行得很好。我尝试了我的实时服务器,但它没有工作。
当
在DoDirectPayment方法
function CURLRequest($Request = "", $APIName = "", $APIOperation = "")
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_VERBOSE, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_URL, $this->EndPointURL);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $Request);
if($this->APIMode == 'Certificate')
{
curl_setopt($curl, CURLOPT_SSLCERT, $this->PathToCertKeyPEM);
}
$Response = curl_exec($curl);
$r = curl_getinfo($curl) ;
echo '<pre>';
print_r($Response);
die;
curl_close($curl);
}
Localhost I print_r curl_getinfo($ ch)。
TIMESTAMP=2015%2d09%2d29T06%3a50%3a14Z&CORRELATIONID=a574165dd749a&ACK=Success&VERSION=98%2e0&BUILD=000000&AMT=35%2e00&CURRENCYCODE=USD&AVSCODE=X&CVV2MATCH=M&TRANSACTIONID=8KK333442W014904SArray
(
[url] => https://api-3t.sandbox.paypal.com/nvp
[content_type] => text/plain; charset=utf-8
[http_code] => 200
[header_size] => 413
[request_size] => 1014
[filetime] => -1
[ssl_verify_result] => 20
[redirect_count] => 0
[total_time] => 16.646
[namelookup_time] => 0
[connect_time] => 0.328
[pretransfer_time] => 0.952
[size_upload] => 876
[size_download] => 189
[speed_download] => 11
[speed_upload] => 52
[download_content_length] => 189
[upload_content_length] => 876
[starttransfer_time] => 16.646
[redirect_time] => 0
[certinfo] => Array
(
)
[primary_ip] => 173.0.82.83
[primary_port] => 443
[local_ip] => 192.168.1.8
[local_port] => 54396
[redirect_url] =>
)
实时测试我print_r curl_getinfo($ ch)。
Array
(
[url] => https://api-3t.sandbox.paypal.com/nvp
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 0.211927
[connect_time] => 0
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => -1
[starttransfer_time] => 0
[redirect_time] => 0
[certinfo] => Array
(
)
[primary_ip] => 173.0.82.83
[redirect_url] =>
)