We have an issue in JP production. While loading, Apple Pay popup adds two extra zeros to the price before reverting back to the correct price. Please see below :
Looking a little in the Apple Pay code of the Adyen/adyen-web, I see that there is a system that formats the price according to currency. I think we should use the same logic to correct this bug.
Describe the bug
We have an issue in JP production. While loading, Apple Pay popup adds two extra zeros to the price before reverting back to the correct price. Please see below :
Looking a little in the Apple Pay code of the
Adyen/adyen-web
, I see that there is a system that formats the price according to currency. I think we should use the same logic to correct this bug.packages/lib/src/components/ApplePay/payment-request.test.ts
https://github.com/Adyen/adyen-web/blob/7854997038bc384ed3acd47f702c58ee2cb7ebe6/packages/lib/src/utils/amount-util.ts#L27-L30
https://github.com/Adyen/adyen-web/blob/7854997038bc384ed3acd47f702c58ee2cb7ebe6/packages/lib/src/utils/amount-util.ts#L10
https://github.com/Adyen/adyen-web/blob/7854997038bc384ed3acd47f702c58ee2cb7ebe6/packages/lib/src/utils/constants/currency-decimals.ts#L1-L4
To Reproduce
Steps to reproduce the behavior:
JPY
currencyExpected behavior
The price must be correctly formatted.