Open ldr2273 opened 6 months ago
7764001-zen
This issue impacts Express checkout buttons
, so assigning to @Automattic/heisenberg (based on team responsibilities Pc2DNy-3z-p2) cc team lead @FangedParakeet.
Assigning as part of Gamma Triage process PcreKM-yM-p2.
Thanks for the report @ldr2273! I was passing by and checked this a bit further. I can see that the problem happens regardless of the currency and is tied to the decimal number setting of the currency under WooCommerce -> General -> Currency options
, the place you also mentioned. Below is the example with EUR
Having said that, although some currencies technically will always have decimals, WooPayments needs to handle any other decimals setting for a currency coming from WooCommerce.
While testing this I've noticed that decimal setting might lead to some bad outcomes in checkout blocks:
This problem happens because Stripe expects all API requests' amounts to be provided in a currency’s smallest unit. . E.g. for EUR 20 it should be 20000 while we're sending the plain total (20) in this place..
cc @FangedParakeet
@timur27 - thanks for the feedback and additional testing!
I can confirm that the PRB implementation with tokenized carts will fix the issue for the majority of currencies, regardless of the number of decimals in the configuration:
Euro with one decimal:
Euro with zero decimals:
The problem will be fixed also if the currency selected is a zero-decimals currency within Stripe:
We just need these changes for the tokenized cart implementation: https://github.com/Automattic/woocommerce-payments/pull/8998
CC @FangedParakeet
Describe the bug
When using Hungarian Forint as a currency and setting the decimal place to "0" (because Hungarian Forint doesn't have cents), Google and Apple Pay still show the total with decimal places.
To Reproduce
0
.This is a bit odd considering Ft doesn't have cents.
Expected behavior
It would be expected that the total would pass to Google/Apple Pay without decimal places.
Desktop (please complete the following information):
All latest versions.
Additional context
This does happen with Stripe as well, but after chatting with the developers, it appears the payment request buttons and the total that gets sent is from the WooPayments side.