Hello, the payment is working with server api. But how to add additional POST parameters to the actions.request.post call ? For example the Product id so that the server knows what to actually checkout ? Cheers Marc paypal.Button.render({
env: 'sandbox',
locale: 'en_US',
style: {
size: 'small',
color: 'gold',
shape: 'pill',
},
payment: function(data, actions)
{
return actions.request.post('/api/create-payment/') //<------- add post parameter here ?
.then( function( res ) {
return res.id;
});
},
onAuthorize: function (data, actions)
{
return actions.request.post('/api/execute-payment/', {
paymentID: data.paymentID,
payerID: data.payerID
})
.then( function( res ) {
console.log('confirmation message',res);
});
}
}, '#paypal-button_{{@i.id}}'); Cheers Marc
... View more