Hello all together, I want to implement the PayPal Checkout Button on my website. During the first steps the buyer can choose several products with different prices. After all I sum up all price values of the purchased products. This value is saved in a PHP - session variable. For payment via PayPal I'd like to commit the value of this PHP - session variable to the value of the payment function of the PayPal button. Like the following example. payment: function (data, actions) {
return actions.payment.create({
payment: {
transactions: [
{
amount: {
total: '<?php echo $_SESSION["totalamount"]; ?>',
currency: 'EUR'
}
}
]
}
});
}, But this doesn't work. It will only work if I commit a variable which is defined directly on that page where the Checkout button appears. But not with a session - variable which is handed over from one page to the other page. Do you have any idea how to fix this? Thanks a lot. Greets from Germany Tom
... View more