Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Currency error #1777

Open
TongCong12138 opened this issue May 16, 2024 · 3 comments
Open

iOS Currency error #1777

TongCong12138 opened this issue May 16, 2024 · 3 comments
Labels
needs triage Needs triage

Comments

@TongCong12138
Copy link

我发现一个问题,我的金额是500,在UGX和IDR为货币单位时,SDK要求传入的金额*100,然后在支付后,金额的确也是500的。但是在调起弹窗的时候,iOS端的金额显示为50000,Andriod端是正常的。
这是我的代码:
await Stripe.instance.initPaymentSheet( paymentSheetParameters: SetupPaymentSheetParameters( customFlow: false, merchantDisplayName: kStripeMerchantId, paymentIntentClientSecret: data['paymentIntent'], allowsDelayedPaymentMethods: true, applePay: const PaymentSheetApplePay( merchantCountryCode: 'UG', ), // googlePay: const PaymentSheetGooglePay( // merchantCountryCode: 'zh-CN', // testEnv: true, // ), style: ThemeMode.light, ), ); await Stripe.instance.presentPaymentSheet();

IMG_0514 PNG

@TongCong12138 TongCong12138 added the needs triage Needs triage label May 16, 2024
@TongCong12138
Copy link
Author

I found an issue where my amount is 500. When UGX and IDR are currency units, the SDK requires the incoming amount to be multiplied by 100, and after payment, the amount is indeed 500. But when the pop-up window is activated, the amount displayed on the iOS end is 50000, while on the Android end it is normal.
This is my code:

await Stripe.instance.initPaymentSheet(
        paymentSheetParameters: SetupPaymentSheetParameters(
          customFlow: false,
          merchantDisplayName: kStripeMerchantId,
          paymentIntentClientSecret: data['paymentIntent'],
          allowsDelayedPaymentMethods: true,
          applePay: const PaymentSheetApplePay(
            merchantCountryCode: 'UG',
          ),
          // googlePay: const PaymentSheetGooglePay(
          //   merchantCountryCode: 'zh-CN',
          //   testEnv: true,
          // ),
          style: ThemeMode.light,
        ),
      );
      await Stripe.instance.presentPaymentSheet();

flutter_stripe: ^10.1.1
[✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-arm64 (Rosetta), locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] Android Studio (version 2023.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
[✓] VS Code (version 1.86.0)
[✓] VS Code (version 1.90.0-insider)

@TongCong12138
Copy link
Author

I don't have anywhere to manually modify this amount, and I shouldn't have done so. This is automatically obtained based on the paymentIntentClientSecret, which is normal for other currencies, except for UGX and IDR, which have issues displaying on iOS. What should I do?

@TongCong12138
Copy link
Author

IMG_0515 HEIC

The amount is correct on Android models

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Needs triage
Projects
None yet
Development

No branches or pull requests

1 participant