1
我想通過使用SDK的示例腳本的最新Github Paypal SDK獲取計劃。當調用API,它拋出:通過SDK檢索paypal計劃給出錯誤代碼400 - 無請求負載
'PayPal\Exception\PayPalConnectionException' with message 'Got Http response code 400 when accessing https://api.sandbox.paypal.com/v1/payments/billing-plans/P-0B085781ML2192537TXPEZ6I.'
這些日誌文件關注的臺詞:
[18-05-2016 12:26:16] PayPal\Core\PayPalHttpConnection : INFO: GET https://api.sandbox.paypal.com/v1/payments/billing-plans/P-0B085781ML2192537TXPEZ6I
[18-05-2016 12:26:16] PayPal\Core\PayPalHttpConnection : INFO: Invalid or no certificate authority found - Retrying using bundled CA certs file
[18-05-2016 12:26:18] PayPal\Core\PayPalHttpConnection : DEBUG: Request Headers : GET /v1/payments/billing-plans/P-0B085781ML2192537TXPEZ6I HTTP/1.1, Host: api.sandbox.paypal.com, Accept: */*, Content-Type: application/json, User-Agent: PayPalSDK/PayPal-PHP-SDK 1.7.1 (platform-ver=5.6.12; bit=32; os=Windows_NT_6.2; machine=i586; crypto-lib-ver=1.0.1p; curl=7.42.1), Authorization: Bearer ..., ,
[18-05-2016 12:26:18] PayPal\Core\PayPalHttpConnection : DEBUG: No Request Payload
-----------------------------------------------------------------------
[18-05-2016 12:26:18] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 400
[18-05-2016 12:26:18] PayPal\Core\PayPalHttpConnection : DEBUG: Response Headers : HTTP/1.1 400 Bad Request, Date: Tue, 17 May 2016 22:26:19 GMT, Server: Apache, PROXY_SERVER_INFO: host=slcsbplatformapiserv3002.slc.paypal.com;threadId=311, Paypal-Debug-Id: dc99bbb98dc5e, CORRELATION-ID: dc99bbb98dc5e, Content-Language: *, Connection: close, Connection: close, Paypal-Debug-Id: dc99bbb98dc5e, Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dplatformapiserv%26TIME%3D2342140759%26HTTP_X_PP_AZ_LOCATOR%3D; Expires=Tue, 17 May 2016 22:56:20 GMT; domain=.paypal.com; path=/; Secure; HttpOnly, Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT, Vary: Authorization, Content-Length: 0, Content-Type: text/xml, ,
[18-05-2016 12:26:18] PayPal\Core\PayPalHttpConnection : ERROR: Got Http response code 400 when accessing https://api.sandbox.paypal.com/v1/payments/billing-plans/P-0B085781ML2192537TXPEZ6I.
[18-05-2016 12:26:18] PayPal\Core\PayPalHttpConnection : DEBUG:
從我從日誌條目瞭解,到目前爲止我嘗試:交換證書,當然關閉卷邊部分的SSL驗證和不同的活動計劃ID。
BTW所有其他的貝寶電話按預期返回數據。這只是獲得計劃的電話。
如果有任何幫助,我在Windows上使用XAMPP localhost。
任何人都可以指出我正確的方向嗎?