Hello, I am using the Paypal Smart Button SDK. I need to display the order amounts and cart details on Paypal's checkout page. Here is the start of my implementation, but it does not show the totals to the customers. Can I also display the cart items to the customer? var that = this;
paypal.Buttons({
intent: "CAPTURE",
createOrder: function(data, actions) {
// Set up the transaction
return actions.order.create({
purchase_units: [{
amount: {
value: that.cart.total.toFixed(2)
},
}],
amount_breakdown: {
item_total: {
currency_code: 'USD',
value: that.cart.subTotal.toFixed(2)
},
shipping: {
currency_code: 'USD',
value: that.cart.shipping.total.toFixed(2)
},
tax_total: {
currency_code: 'USD',
value: that.cart.taxTotal.toFixed(2)
},
}
});
},
... View more