Currently running a sandbox integration of PayPal Buttons. After clicking on PayPal Button, the createOrder method in:
paypal.Buttons({
createOrder: function() {
return fetch('php/registerPayPalPayment.php', {
method: 'post',
body: JSON.stringify({orderID: <?php echo $orderID; ?>}),
headers: {
'content-type': 'application/json'
}
}).then(function (res) {
console.log("Paypal: CreateOrder");
console.log(res);
return res.json();
}).then(function (data) {
console.log(data);
return data.id; // Use the same key name for order ID on the client and server
});
}
returns a successfull response:
{id: "32509608BX945762G", links: Array(4), status: "CREATED"}
After log in into PayPal Sandbox account. An error occurrs within the "create" call:
ack: "error"
message: "Unhandled api error"
meta: {calc: "dc72e617fec59",…}
server: "Hkq76r..."
I don´t know where the problem is, it previously worked fine in december 2019.