adding paymentMethodTypes within SetupPaymentSheetParameters intentConfiguration has no effect on ios
Opened this issue · 0 comments
Describe the bug
Adding paymentMethodTypes to the payment sheet intentConfiguration works on android but not iOS.
To Reproduce
Steps to reproduce the behavior:
configure the payment sheet with the intentConfiguration property. enable some methods on the stripe dashboard, and add the identifiers for these methods to the intentConfiguration paymentMethodTypes list.
Additionally, omitting this list does not automatically use the methods from the stripe dashboard as stated by the comment on payment_sheer.dart line 124: /// If not set, the payment sheet will display all the payment methods enabled in your Stripe dashboard.
Expected behavior
I expect these payment methods to appear on the sheet on both platforms, but currently the payment methods provided in the list appear on the payment sheet in android but not in iOS.
Smartphone / tablet
- Device: iPhone 12 / iPhone 16 simulator
- OS: ios 17.5.1
- Package version: 11.3.0
- Flutter version 3.24.3
Additional context
payment sheet setup:
await Stripe.instance.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
primaryButtonLabel: payButtonString,
merchantDisplayName: checkout.description,
allowsDelayedPaymentMethods: true,
intentConfiguration: IntentConfiguration(
mode: const IntentMode.paymentMode(
currencyCode: 'GBP',
amount: 1500,
),
paymentMethodTypes: [
//"customer_balance", //this is the identifier for bank transfers but throws an error
"paypal",
"klarna",
"card",
],
confirmHandler: (method, saveFuture) {
// This is the method where you call the server to create a paymentintent for the payment method id supplied in the callback.
_createIntentAndConfirmToUser(method.id);
}),
),
);