Open TongCong12138 opened 3 months ago
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)
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?
The amount is correct on Android models
我发现一个问题,我的金额是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();