• Resolved rtddev

    (@rtddev)


    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]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor angelleyesupport

    (@angelleyesupport)

    @rtddev , Sorry for the trouble,

    Can you tell me if you have Direct Credit Cards ( DCC ) enabled against your PayPal account? Rest actually need that specifically enabled in account to process Rest credit cards.
    Please talk to your PayPal Merchant support about that and let me know if you still continue to see this same error.

    Thanks!

    Thread Starter rtddev

    (@rtddev)

    @angelleyesupport – Thanks Oliver.

    I’ll give them a call, see what they say, and report back here in a bit.

    Thread Starter rtddev

    (@rtddev)

    @angelleyesupport – Looks like we never signed up for PayPal Pro on this particular PayPal account.

    Just signed-up, so I think we’ll be good to go once our application has been processed/approved.

    I’m going to go ahead and mark this as resolved since it’s not related to the plugin.

    Thanks for your timely response!

    Plugin Contributor angelleyesupport

    (@angelleyesupport)

    Happy to help, If you have a moment to leave a review for our plugin , that would be greatly appreciated.
    Thanks!

    Thread Starter rtddev

    (@rtddev)

    @angelleyesupport – done! Thanks.

    Thread Starter rtddev

    (@rtddev)

    @angelleyesupport – one other thing I just learned.

    PayPal is not enabling any new accounts with the ability to process credit card payments via the REST API.

    Some older accounts are grandfathered into having the ability to use the REST API, but any newer accounts won’t be able to use the REST API.

    They’ll have to use Websites Payment Pro, Payments Pro 2.0 (PayFlow), or Braintree.

    If you use Braintree, then you don’t have the convenience of going to one single account to see both Credit Card & PayPal transactions.

    I do recall reading something about the above limitation somewhere before, but PayPal Manager support just confirmed to me that the REST API is in a temporary holding pattern.

    As such, instead of REST, we’re now using PayFlow within the plugin, and everything is working good so far.

    Plugin Contributor angelleye

    (@angelleye)

    Yes, that is correct. REST DCC is no longer available for new merchants. I’m glad you were able to get PayFlow working for you. Just let us know if anything else comes up. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘REST API | 401 Unauthorized’ is closed to new replies.