0
失敗我使用這個庫: https://github.com/amirduran/duranius-paypal-rest-api-php-library快速結賬DPaypal PHP工作生活,但在沙箱
在現場模式下,一切都很好,但是當我嘗試使用沙箱我只是得到:INT(35)
$requestParameters = array(
"USER" => $this->username,
"PWD" => $this->password,
"SIGNATURE" => $this->apiSignature,
"METHOD" => $method,
"VERSION" => $this->apiVersion,
);
$requestParameters+=$requestData;
$finalRequest = http_build_query($requestParameters);
$ch = curl_init();
$this->curl=$ch;
$curlOptions=$this->getcURLOptions();
$curlOptions[CURLOPT_POSTFIELDS]=$finalRequest;
curl_setopt_array($ch, $curlOptions);
$serverResponse = curl_exec($ch);
curl_getinfo($ CH)結果:
array(26) {
["url"]=>
string(37) "https://api-3t.sandbox.paypal.com/nvp"
["content_type"]=>
NULL
["http_code"]=>
int(0)
["header_size"]=>
int(0)
["request_size"]=>
int(0)
["filetime"]=>
int(-1)
["ssl_verify_result"]=>
int(1)
["redirect_count"]=>
int(0)
["total_time"]=>
float(0.228482)
["namelookup_time"]=>
float(0.027594)
["connect_time"]=>
float(0.175784)
["pretransfer_time"]=>
float(0)
["size_upload"]=>
float(0)
["size_download"]=>
float(0)
["speed_download"]=>
float(0)
["speed_upload"]=>
float(0)
["download_content_length"]=>
float(-1)
["upload_content_length"]=>
float(-1)
["starttransfer_time"]=>
float(0)
["redirect_time"]=>
float(0)
["redirect_url"]=>
string(0) ""
["primary_ip"]=>
string(11) "173.0.82.83"
["certinfo"]=>
array(0) {
}
["primary_port"]=>
int(443)
["local_ip"]=>
string(13) "192.168.1.100"
["local_port"]=>
int(53117)
}
如果我只是改變的URL https://api-3t.paypal.com/nvp我會得到一個成功或失敗響應。 我已經檢查了所有的憑證,清理了所有的cookies,登錄到真實賬戶和沙箱賬戶,幾個月前我已經使用它,沒有任何問題。
謝謝!