-
Notifications
You must be signed in to change notification settings - Fork 451
Can't access sandbox - Client Authentication failed #141
Comments
You are using your sandbox credentials? Also no extra characters in your config string? |
I am using the sandbox credentials. And I don't see any extra characters in On Fri, Mar 4, 2016 at 12:09 PM Randy notifications@github.com wrote:
|
I was able to resolve the issue. |
Yes you need to Create REST API app here: https://developer.paypal.com/developer/applications/ |
Thanks for your help. On Fri, Mar 4, 2016 at 12:44 PM Randy notifications@github.com wrote:
|
Use the below code in helper.js make sure to change
Reference:
|
Hi,
I am trying to integrate paypal-rest-sdk with my node application. The following is my code:
var paypal = require('paypal-rest-sdk');
paypal.configure(Config.paypal_info.api);
Where api is:
'api': {
'host' : 'api.sandbox.paypal.com',
'mode': 'sandbox',
'client_id' : 'my client id based on Business-Pro account ',
'client_secret' : 'client secret here'
}
And my payment object is:
var paymentJSON = {
"intent": "sale",
"payer": {
"payment_method": "paypal"
},
"redirect_urls": {
"return_url": Config.paypal_info.return_url,
"cancel_url": Config.paypal_info.cancel_url
},
"transactions": [{
"item_list": {
"items": [{
"name": "Activation",
"sku": pProviderID,
"price": Config.paypal_info.price,
"currency": "USD",
"quantity": 1
}]
},
"amount": {
"currency": "USD",
"total": Config.paypal_info.price,
},
"description": ""
}]
};
paypal.payment.create(paymentJSON, function (error, payment) {...});
Yet I keep getting the following error:
{"error":"invalid_client","error_description":"Client Authentication failed"}
The rest of error message is:
{"Authorization":"Basic cmF5LmthaG4tZmFjaWxpdGF0b3JfYXBpMS52b29temkuY29tOjVHS0RKTTZYREhGN1dCS1k=","Accept":"application/json","Content-Type":"application/x-www-form-urlencoded","Content-Length":29,"PayPal-Request-Id":"33a71ad3-c2e5-4ce8-af58-a367b70a8d5b","User-Agent":"PayPalSDK/PayPal-node-SDK 1.6.8 (node v4.2.2-x64-darwin; OpenSSL 1.0.2d)"}'
'grant_type=client_credentials'
paypal-debug-id: 56c2c2b7647f9, 56c2c2b7647f9
Can't figure out what the issue is.
Thanks in advance.
The text was updated successfully, but these errors were encountered: