stripe / stripe-ios

Stripe iOS SDK
https://stripe.com
MIT License
2.05k stars 956 forks source link

[BUG] Fix IDR Formatting #3747

Open doganaltinbas opened 3 days ago

doganaltinbas commented 3 days ago

Summary

When processing payments in Indonesian Rupiah (IDR), the SDK adds two extra zeros to the displayed amount. For example, an amount of 186,332 IDR is shown as 18,633,200 IDR at the checkout button as it can be seen below.

checkout_button

iOS version

iOS 17.5

Installation method

SPM

SDK version

23.27.5

yuki-stripe commented 3 days ago

Hi @doganaltinbas, thank you for the report. Can you provide a PaymentIntent id with 186,332 IDR as the amount and currency?

yuki-stripe commented 3 days ago

I believe you're actually providing an amount of 186,332,200 IDR on the PaymentIntent. If so, based on my research we should indeed show "IDR 186,332" in that case.

doganaltinbas commented 3 days ago

Hi @yuki-stripe, In test environment, you can check this PaymentIntent id: pi_3PYivxHrTWtWHJGF0u48xwRu