Reputation: 59
Hi I'm using nodejs and paypal-rest-sdk "^1.6.0" with express 4.13.1 .
When i make live payement i have this error :
{ [Error: Response Status : 401]
response:
{ error: 'invalid_client',
error_description: 'Client Authentication failed',
httpStatusCode: 401 },
httpStatusCode: 401 }
But when i use the sandebox host, I don't have any error.
does anybody have an odea of what i doing wrong ?
ps: sorry for my bad english, i do my best ;)
Upvotes: 1
Views: 1161
Reputation: 788
Based on the error, my first guess would be that you're trying to use your sandbox credentials (client id and secret) when trying to use the live environment.
Here's how you get those credentials:
Now, when you are configuring your Node application, use the following (with your client id and secret):
paypal.configure({
'mode': 'live',
'client_id': 'YOUR LIVE CLIENT ID',
'client_secret': 'YOUR LIVE SECRET'
});
Hopefully that should solve the problem.
Upvotes: 4