Reputation: 569
I've suddenly started getting: {error: "invalid_client", error_description: "Client credentials are missing"} error : "invalid_client" error_description : "Client credentials are missing"
The code I was using worked fine and then just stopped and I've no idea why?
Code is:
paypal.Button.render({
env: 'sandbox',
client: {
sandbox: 'A Sandbox api key k',
production: 'NONE'
},
commit: true, // Show a 'Pay Now' button
payment: function(data, actions) {
return actions.payment.create({
payment: {
transactions: [
{
item_list:
{
items: test
}
,
amount: amounthold
}
]
}
});
},
onAuthorize: function(data, actions) {
return actions.payment.execute().then(function(payment) {
tansact = payment.transactions;
details = payment.payer;
runAjax("authoriseResult",tansact,details);
});
},
onCancel: function(data) {
jQuery('#checkoutHolder').html('<h1>The checkout failed please refresh the page and try again.</h1>');
jQuery(".payPalButton").hide();
}
}, '#paypal-button');
It works with when I switch from sandbox to production but sandbox just keeps failing.
Any ideas?
Upvotes: 1
Views: 1491
Reputation: 569
Okay so today 72 hours later it's just started to work - no code change, nothing at all changed!. I guess that the sandbox system isn't too robust.
So if you're reading this in the future I suggest you check to see if your code works using the live api - production - and if that's working chances are your code is good and the paypal sandbox isn't working properly. Even if their system says it's all okay! Wait 72 hours and try again.
Upvotes: 1