Hello, when i change the client-id into the live client-id, the javascript will not work.
paypal.Buttons({
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '0.01',
currency_code: 'EUR'
},
description: 'test'
}]
});
},
style: {
layout: 'vertical',
color: 'silver',
shape: 'rect',
label: 'paypal',
},
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
//alert('Bestellung erfolgreich ' + details.payer.name.given_name);
window.location.href = 'fertig.php?amount=rwar';
return fetch('/paypal-transaction-complete', {
method: 'post',
headers: {
'content-type': 'application/json'
},
body: JSON.stringify({
orderID: data.orderID
})
});
});
}
}).render('#paypal-button-container');
... View more