0
我試圖啓動並運行使用nvp安裝快速結賬。 我已經在沙箱中設置了業務帳戶並生成了api訪問簽名憑證。在使用nvp設置快速結帳時使用curl卡住授權/驗證
$this->NVPCredentials = 'USER=' . credentials['username'];
$this->NVPCredentials .= '&PWD=' . credentials['password'];
$this->NVPCredentials .= '&VERSION=108.0';
$this->NVPCredentials .= '&SIGNATURE=' . credentials['signature'];
包裹的憑證如上圖+所有創建的NVP串及以下所需的付款細節細節是捲曲的呼叫
$curl = curl_init('https://api-3t.sandbox.paypal.com/nvp');
curl_setopt($curl, CURLOPT_VERBOSE, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $Request);
$請求存放傳遞的NVP字符串。
我確保所有必填字段都已設置,但我總是收到10002 |認證/授權失敗|您無權進行此API調用
我認爲這是簽名問題,因此我刪除了簽名,而是創建了一個證書文件,將其從沙箱帳戶下載並用於替代,但仍然相同錯誤。無論我改變什麼,它總會拋出同樣的錯誤。
curl_setopt($ curl,CURLOPT_SSLCERT,$ pathtocertpem);
我用盡了想法的東西。請不要猶豫,詢問更多細節,如果任何人有任何想法我可能做錯了,請不要猶豫。這將不勝感激。
問候,
泥盆