Adyen / adyen-magento2-express-checkout

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

[ECP-8486][ECP-8595] Grand total without tax reported to GPay, Apple Pay #37

Open brain-effect opened 1 year ago

brain-effect commented 1 year ago

Describe the bug Magento 2.4.4-p4 + Adyen Express Checkout 1.1.2 + Adyen Payment 8.19.0. Adyen in Test mode. The grand total without the tax included is reported to GPay and Apple Pay as the final amount. The final amount reported to Adyen, however, will be the grand total with tax, which will (most likely?) cause errors in live system.

To Reproduce Steps to reproduce the behavior:

  1. Enable express method buttons, for example in minicart.
  2. Add any taxable product to cart.
  3. Click on GPay or Apple Pay express buttons.
  4. The grand total without tax is reported to GPay and Apple Pay as the final amount.

Expected behavior The grand total with tax included should be reported to GPay and Apple Pay as the final amount.

Screenshots Screenshot 2023-07-03 at 1 42 41 PM

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Probably related to https://github.com/magento/magento2/issues/34649

candemiralp commented 1 year ago

Hello @brain-effect,

Thank you for raising this issue. We've created a PR for Apple Pay tax calculation on express payment here. We are currently working on Google Pay fix.

Best Regards, Can

smiroshnyk commented 1 year ago

Hello. It still doesn't work even for Apple Pay.

photo_2023-09-11 15 55 37 image

You changed it in one place, but you set grant_total in 4 places.

The steps to reproduce are the same as in this issue description.

joselopr commented 11 months ago

@candemiralp

candemiralp commented 11 months ago

Hello @joselopr,

Thank you mentioning the consequent issues related to Apple Pay express and apologies for the late response. We will test Apple Pay tax issue once again. Let me update you soon.

Best Regards, Can

dimitriBouteille commented 10 months ago

Hi @candemiralp @raoulritter Why in version 1.2.0 the fix is not visible ?

In 1.1.3 :

applePayShippingContactUpdate.newTotal = {
    label: $t('Grand Total'),
    amount: (response.grand_total + response.tax_amount).toString()
};

In 1.2.0 :

applePayShippingContactUpdate.newTotal = {
    label: this.getMerchantName(),
    amount: (response.grand_total).toString()
};

I have this error when I try to place order with version 1.2.0

{
   "status" : 422,
   "errorCode" : "5_001",
   "message" : "ApplePay token amount-mismatch",
   "errorType" : "validation",
   "pspReference" : "R3TB5Q4HKJHKGK82"
}

It's possible to fix this issue quickly ? :heart: