The weird thing is that I am not doing anything with PayPal.
To Reproduce
I'm on flutter_stripe 9.3.0
Flutter 3.10.6
Dart 3.0.6
I am using the following function
final setupIntentResult = await Stripe.instance.confirmSetupIntent( paymentIntentClientSecret: data['setupIntent'] as String, params: PaymentMethodParams.card( paymentMethodData: PaymentMethodData( billingDetails: _billingDetails, ), ), options: const PaymentMethodOptions( setupFutureUsage: PaymentIntentsFutureUsage.OffSession, ), );
Describe the bug I am getting an error when trying to confirm a setup intent. The error is as follows:
E/flutter (28795): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s):
PayPalis not one of the supported values: AfterpayClearpay, Card, CashAppPay, Alipay, Grabpay, Ideal, Fpx, CardPresent, SepaDebit, AuBecsDebit, BacsDebit, Giropay, P24, Eps, Bancontact, Oxxo, Sofort, Upi, USBankAccount, Unknown E/flutter (28795): #0 $enumDecode (package:json_annotation/src/enum_helpers.dart:83:5) E/flutter (28795): #1 _$$_SetupIntentFromJson.<anonymous closure> (package:stripe_platform_interface/src/models/setup_intent.g.dart:18:23) E/flutter (28795): #2 MappedListIterable.elementAt (dart:_internal/iterable.dart:415:31) E/flutter (28795): #3 ListIterator.moveNext (dart:_internal/iterable.dart:344:26) E/flutter (28795): #4 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27) E/flutter (28795): #5 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28) E/flutter (28795): #6 new List.of (dart:core-patch/array_patch.dart:47:28) E/flutter (28795): #7 ListIterable.toList (dart:_internal/iterable.dart:214:7) E/flutter (28795): #8 _$$_SetupIntentFromJson (package:stripe_platform_interface/src/models/setup_intent.g.dart:19:12) E/flutter (28795): #9 new _$_SetupIntent.fromJson (package:stripe_platform_interface/src/models/setup_intent.freezed.dart:336:7) E/flutter (28795): #10 _$SetupIntentFromJson (package:stripe_platform_interface/src/models/setup_intent.freezed.dart:18:23) E/flutter (28795): #11 new SetupIntent.fromJson (package:stripe_platform_interface/src/models/setup_intent.dart:65:7) E/flutter (28795): #12 MethodChannelStripe.confirmSetupIntent.<anonymous closure> (package:stripe_platform_interface/src/method_channel_stripe.dart:121:40) E/flutter (28795): #13 ResultParser.parse (package:stripe_platform_interface/src/result_parser.dart:14:24) E/flutter (28795): #14 MethodChannelStripe.confirmSetupIntent (package:stripe_platform_interface/src/method_channel_stripe.dart:122:7) E/flutter (28795): <asynchronous suspension> E/flutter (28795): #15 Stripe.confirmSetupIntent (package:flutter_stripe/src/stripe.dart:465:27)
The weird thing is that I am not doing anything with PayPal.
To Reproduce
final setupIntentResult = await Stripe.instance.confirmSetupIntent( paymentIntentClientSecret: data['setupIntent'] as String, params: PaymentMethodParams.card( paymentMethodData: PaymentMethodData( billingDetails: _billingDetails, ), ), options: const PaymentMethodOptions( setupFutureUsage: PaymentIntentsFutureUsage.OffSession, ), );
Smartphone / tablet