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?