I seem to have exactly the same problem, the entire amount breakdown except the total amount does not seem to be updated. One simple example: Create an order with items with some taxes and shipping values: createOrder: function(data, actions) {
// This function sets up the details of the transaction, including the amount and line item details.
return actions.order.create({
purchase_units: [{
amount: {
value: '11.00',
currency_code: 'CAD',
breakdown: {
item_total: {
currency_code: 'CAD',
value: "3.00"
},
shipping: {
currency_code: 'CAD',
value: "5.00"
},
tax_total: {
currency_code: 'CAD',
value: "3.00"
}
}
},
items: [{
name: 'a',
quantity: '1',
sku: '1223',
tax: {
currency_code: 'CAD',
value: '3.00'
},
unit_amount: {
currency_code: 'CAD',
value: '3.00'
}
}]
}]
});
}, Patch the order on shipping address change callback and update these values(taxes, shipping cost etc - region based taxes), onShippingChange: function(data, actions) {
// Patch the shipping amount
return actions.order.patch([
{
op: 'replace',
path: '/purchase_units/@reference_id==\'default\'',
value: {
amount: {
currency_code: 'CAD',
value: "19.00",
breakdown: {
item_total: {
currency_code: 'CAD',
value: "3.00"
},
shipping: {
currency_code: 'CAD',
value: "10.00"
},
tax_total: {
currency_code: 'CAD',
value: "6.00"
}
}
},
items: [{
name: 'a',
quantity: '1',
sku: '1223',
tax: {
currency_code: 'CAD',
value: '6.00'
},
unit_amount: {
currency_code: 'CAD',
value: '3.00'
}
}]
}
}
]);
}, Only the total amount is changed, the breakdown is ignored in the payment sheet. In this example i tried replacing the entire purchase unit, replacing just the amount seems behave exactly the same. Any solutions?
... View more