Javascript buttons return error 401 from graphql with Sanbox client-id
mpoletiek1
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Apr-18-2020
09:39 PM
Hello,
Without any code changes on my site, all of a sudden, my sandbox client-id's don't seem to be working anymore. However, I'm not sure if this error is strictly related to my account. The full error is as follows.
update_client_config_error:
/graphql returned status 401\nCe/<@https://www.sandbox.paypal.com/smart/buttons?style.label=paypal&style.layout=vertical&style.color=wh..."
Can anyone help me troubleshoot this?
My Javascript looks like the following...
paypal.Buttons({
style: {
shape: 'pill',
color: 'white',
layout: 'vertical',
label: 'paypal',
},
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '24.00'
}
}]
});
},
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
// Call your server to save the transaction
return fetch('/pp/getOrder.php', {
method: 'post',
headers: {
'content-type': 'application/json'
},
body: JSON.stringify({
orderID: data.orderID,
checkout: 'u5o5LI5RnKMQEM7J9hdCH5Bj2yGcPQas',
customer: 100,
cmd: 'newPlan'
})
}).then(function(val) { window.location.href='/ovpn/account.php'; });
});
}
}).render('#paypal-button-container');
I'm also using Cloudflare.
Thanks for your time.
0 REPLIES 0
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
- Order capture started to return 403 after account type was changed from personal to business in Sandbox Environment
- .. does not ship to this location. Please use a different address. in PayPal Payments Standard
- Getting "Expecting an order id" error in Javascript SDK in Sandbox Environment
- Something went wrong on our end - Please help in REST APIs
- Venmo button disappears when I move from staging to production in PayPal Payments Standard