This mis my code: <script>
var CREATE_PAYMENT_URL = 'https://my-store.com/paypal/create-payment';
paypal.Button.render({
env: '<?php echo $paypal_vars['env']; ?>',
locale: '<?php echo $paypal_vars['locale']; ?>',
style: {
tagline: false,
label: 'checkout', // checkout | credit
size: 'responsive', // small | medium | responsive
shape: 'pill', // pill | rect
color: 'gold', // gold | blue | silver
label: 'pay' // checkout | credit | pay
},
client: {
<?php echo $paypal_vars['env']; ?>: '<?php echo $paypal_vars['client_id']; ?>'
},
commit: true,
payment: function(data, actions) {
return actions.payment.create(
{
payment: {
intent: 'sale',
payer: { payment_method: 'paypal' },
transactions: [
{
reference_id: '<?php echo $paypal_vars['order_id']; ?>',
amount: {
total: '<?php echo $paypal_vars['amount_total']; ?>',
currency: '<?php echo $paypal_vars['amount_currency'] ?>'
},
payee: {
merchant_id: '<?php echo $paypal_vars['merchant_id']; ?>'
},
description: '<?php echo $paypal_vars['description']; ?>',
}
],
redirect_urls: {
return_url: '<?php echo $paypal_vars['return_url']; ?>',
cancel_url: '<?php echo $paypal_vars['cancel_url']; ?>'
}
},
experience: {
input_fields: {
no_shipping: 1
}
}
}
);
},
onAuthorize: function(data, actions) {
return actions.payment.execute().then(function() {
return actions.redirect();
});
},
onCancel: function(data, actions) {
return actions.redirect();
},
onError: function(err) {
window.alert('ERROR: ' + err);
}
}, '#paypal-button-container');
</script> I get this error: ERROR: Error: Request to post https://www.sandbox.paypal.com/v1/payments/payment failed with 500 error. Correlation id: 8b7d6f3a71a31, 8b7d6f3a71a31
{
"name": "INTERNAL_SERVICE_ERROR",
"message": "An internal service error has occurred",
"information_link": "https://developer.paypal.com/docs/api/payments/#errors",
"debug_id": "8b7d6f3a71a31"
}
request/</<@https://www.paypalobjects.com/api/checkout.js:14232:39
./node_modules/post-robot/src/index.js/_RECEIVE_MESSAGE_TYPE[conf.b.POST_MESSAGE_TYPE.RESPONSE]@https://www.paypalobjects.com/api/checkout.js:3192:31
receiveMessage@https://www.paypalobjects.com/api/checkout.js:2742:25
messageListener@https://www.paypalobjects.com/api/checkout.js:2763:13
./node_modules/post-robot/src/index.js/_RECEIVE_MESSAGE_TYPE[conf.b.POST_MESSAGE_TYPE.RESPONSE]@https://www.paypalobjects.com/api/checkout.js:3192:31
receiveMessage@https://www.paypalobjects.com/api/checkout.js:2742:25
messageListener@https://www.paypalobjects.com/api/checkout.js:2763:13 Can you help me? Thanks in advance.
... View more