Adyen / adyen-magento2-express-checkout

Adyen Magento 2 Express Checkout Module
MIT License
8 stars 2 forks source link

[PW-8440] Update the quote with the selected shipping method for GooglePay Express #35

Closed RokPopov closed 1 year ago

RokPopov commented 1 year ago

Summary

This PR solves the problem of the grand_total amount not being correctly updated upon the shipping method change from the GooglePay popup modal. The reason behind this is that when the shopper selects a different shipping method, we are calling setTotalsInfo helper that doesn't update the quote. Therefore, this PR introduces a solution of calling the setShippingInformation helper to do the above mentioned before calling the setTotalsInfo.

Tested scenarios

Change the shipping method in GooglePay popup and make sure that the necessary db fields (quote->grand_total, quote_address->shipping_method, shipping_description, shipping_amount) are updated correctly and real-time.