REST API | 401 Unauthorized
-
Hey folks,
We’re getting the following error from api.paypal.com, when using the REST API.
[23-05-2018 04:01:18] PayPal\Core\PayPalHttpConnection: INFO : Response Status : 401
[23-05-2018 04:01:18] PayPal\Core\PayPalHttpConnection: DEBUG : Response Headers : HTTP/1.1 401 Unauthorized, Date: Wed, 23 May 2018 16:01:18 GMT, Server: Apache, paypal-debug-id: 368c587942888, Content-Language: *, Paypal-Debug-Id: 368c587942888, Set-Cookie: X-PP-SILOVER=name%3DLIVE3.API.1%26silo_version%3D880%26app%3Dapiplatformproxyserv%26TIME%3D1318061403%26HTTP_X_PP_AZ_LOCATOR%3D; Expires=Wed, 23 May 2018 16:31:18 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: 168, Connection: close, Content-Type: application/json, ,
[23-05-2018 04:01:18] PayPal\Core\PayPalHttpConnection: ERROR : Got Http response code 401 when accessing https://api.paypal.com/v1/payments/payment. {“name”:”UNAUTHORIZED_PAYMENT”,”message”:”Unauthorized payment.”,”information_link”:”https://developer.paypal.com/docs/api/payments/#errors”,”debug_id”:”368c587942888″}
[23-05-2018 04:01:18] PayPal\Core\PayPalHttpConnection: DEBUG :Here is the initial call (with certain values redacted):
[23-05-2018 04:01:17] PayPal\Core\PayPalHttpConnection: INFO : POST https://api.paypal.com/v1/payments/payment
[23-05-2018 04:01:18] PayPal\Core\PayPalHttpConnection: DEBUG : Request Headers : POST /v1/payments/payment HTTP/1.1, Host: api.paypal.com, Accept: */*, Content-Type: application/json, User-Agent: PayPalSDK/PayPal-PHP-SDK 1.6.4 (platform-ver=7.0.30; bit=64; os=Linux_3.10.0-862.2.3.el7.x86_64; machine=x86_64; crypto-lib-ver=1.0.2o; curl=7.60.0), Authorization: Bearer A21AAGxksqgsWpn-Ir2FTlhVzMm5bOHm6sRXz4CYD51GZC8i0Kj6bOcgqBV9-SeVdvNY6vrdyhBqiNttwBsWN8mX59-do_u0w, PayPal-Request-Id: 280929588119520152709127737943, PayPal-Partner-Attribution-Id: AngellEYE_SP_WooCommerce, Content-Length: 670, ,
[23-05-2018 04:01:18] PayPal\Core\PayPalHttpConnection: DEBUG : Request Data : {“intent”:”sale”,”payer”:{“payment_method”:”credit_card”,”funding_instruments”:[{“credit_card”:{“type”:”visa”,”number”:”481582102XXXXXXX”,”expire_month”:”07″,”expire_year”:20XX,”cvv2″:”XXX”,”first_name”:”Mike”,”last_name”:”XXXXX”}}]},”transactions”:[{“amount”:{“currency”:”USD”,”total”:”1.00″,”details”:{“shipping”:”0.00″,”tax”:”0.00″,”subtotal”:”1.00″}},”item_list”:{“items”:[{“name”:”F3 Advertising Package – Moral Code – Monthly”,”currency”:”USD”,”quantity”:1,”price”:”1.00″}]},”description”:”Payment description”,”invoice_number”:”5b05904d59edb”,”custom”:”{\”order_id\”:12976,\”order_key\”:\”wc_order_5b058d0404c05\”}”,”soft_descriptor”:”Ask Andy”}]}I see the call being logged in our developer.paypal.com account, and I’ve reconfirmed we’re using the correct Production API credential information.
Any ideas?
The page I need help with: [log in to see the link]
- The topic ‘REST API | 401 Unauthorized’ is closed to new replies.