PayPal.IdentityException: The remote server returned an error: (401) Unauthorized.
tekspace
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Jun-19-2018
11:31 AM
I am using REST API of pay pal. My application is working fine with sandbox but when i press Live and get client Id and secret from developer account then i am getting this error on payment process of credit card.
The remote server returned an error: (401) Unauthorized.
at PayPal.Api.PayPalResource.ConfigureAndExecute[T](APIContext apiContext, HttpMethod httpMethod, String resource, String payload, String endpoint, Boolean setAuthorizationHeader)
at PayPal.Api.Payment.Create(APIContext apiContext, Payment payment)
at PayPal.Api.Payment.Create(APIContext apiContext)
Please guide me about this error it is related to what?
Thanks
1 REPLY 1
tekspace
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun-19-2018
11:53 AM
I had to set Mode = Live
private Dictionary<string, string> GetConfig()
{
var properties = ConfigManager.Instance.GetProperties();
if (properties["mode"] != null)
{
properties["mode"] = _mode;
}
else
{
properties.Add("mode", _mode);
}
return properties;
}
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Change the button from Sandbox to Production in REST APIs
- Handling payouts that are being on hold/blocked in REST APIs
- Re: Enable the return of billing address in Sandbox Environment
- Cart dropps items, fails to return customer to previous window in PayPal Payments Standard
- why can't I have auto return on standard buttons in PayPal Payments Standard