Add cart simulation adjustments

This commit is contained in:
Pedro Silva 2023-10-13 10:04:17 +01:00
parent 9db41ee34e
commit 799e06a7dd
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3

View file

@ -229,6 +229,11 @@ class GooglepayButton {
const updateData = new UpdatePaymentData(this.buttonConfig.ajax.update_payment_data)
const updatedData = await updateData.update(paymentData);
const transactionInfo = await this.contextHandler.transactionInfo();
updatedData.country_code = transactionInfo.countryCode;
updatedData.currency_code = transactionInfo.currencyCode;
updatedData.total_str = transactionInfo.totalPrice;
// Handle unserviceable address.
if(!updatedData.shipping_options || !updatedData.shipping_options.shippingOptions.length) {