LIVE Authorization error

randavis
Contributor
Contributor

This seems to be a common issue - my app works in the Sandbox great with PayPal and then fails in the LIVE environment.  I have copied some text from my debug log.  It appears that I receive a valid token in the LIVE area, but the payment fails with an UNAUTHORIZED_PAYMENT error.

 

How can I get more details regarding the cause of the error?  You can see that I am showing the token in the log...

 

DEBUG 2020-04-30 22:16:53,803 PayPal.Api.PayPalResource (Line:0) - User-Agent:PayPalSDK/PayPal-NET-SDK 1.9.1 (lang=DOTNET;v=4.5.1;clr=4.0.30319.42000;bit=64;os=Microsoft Windows NT 10.0.18363.0)
DEBUG 2020-04-30 22:16:53,804 PayPal.Api.PayPalResource (Line:0) - Authorization:Bearer A21AAG_46wJsn-r5owa6wsDL9Q4RddouBM8zoFG5tklZ0LSFTRG9IjMJjPfDQZQVB04j-NfeSmQIBj6P2rBuTtr5lVXKFlYMA
DEBUG 2020-04-30 22:16:53,804 PayPal.Api.PayPalResource (Line:0) - PayPal-Request-Id:5356791d-688c-4482-a0de-067575984278
DEBUG 2020-04-30 22:16:53,805 PayPal.Api.HttpConnection (Line:0) - Request details are hidden in live mode.
ERROR 2020-04-30 22:16:54,151 PayPal.Api.HttpConnection (Line:0) - Error response:
ERROR 2020-04-30 22:16:54,153 PayPal.Api.HttpConnection (Line:0) - {"name":"UNAUTHORIZED_PAYMENT","message":"Unauthorized payment.","information_link":"https://developer.paypal.com/docs/api/payments/#errors","debug_id":"8516e66efe81d"}
ERROR 2020-04-30 22:16:54,153 PayPal.Api.HttpConnection (Line:0) - The remote server returned an error: (401) Unauthorized.
ERROR 2020-04-30 22:16:54,167 PayPal.PayPalException (Line:0) - Identity Exception:
Error:
Message:
URI:

ERROR 2020-04-30 22:16:54,200 MyskeetCore (Line:927) - The remote server returned an error: (401) Unauthorized.
DEBUG 2020-04-30 22:16:54,205 MyskeetCore (Line:342) - <<< Performance Timer [ >>> ModelConversion.UpdateModel(Models.paypal_log, PayPalResponse)]: 0.1 seconds >>>
INFO 2020-04-30 22:16:54,410 MyskeetCore (Line:98) - <<< Performance Timer [ >>> PayPalLogDal.Insert(PayPalResponse)]: 0.207 seconds >>>

Login to Me Too
1 REPLY 1

MTS_Chiranjeevi
Moderator
Moderator

Hi @randavis,

 

Thank you for contacting PayPal community.

 

We apologize for any inconvenience.

 

Upon checking our internal logs using "debug_id": "8516e66efe81d", we could confirm that your trying to process DCC(Direct Credit Card) payments via REST API which is currently restricted.

 

The use of the PayPal REST /payments APIs to accept credit card payments is restricted. Instead, you can accept credit card payments with Braintree Direct

 

Please refer the guide link.

 

Sincerely,

Chiranjeevi

PayPal, Inc.

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.