Closed Anonymous644 closed 5 months ago
duplicate of #1637
+1
Can you reopen this issue? I have the same issue using the latest version flutter_stripe: ^10.1.0
and I'm testing on iOS
flutter: Unhandled error Invalid argument(s): `CashApp` is not one of the supported values: AfterpayClearpay, Card, CashAppPay, Alipay, Grabpay, Ideal, Fpx, CardPresent, SepaDebit, AuBecsDebit, BacsDebit, Giropay, P24, Eps, Bancontact, Oxxo, PayPal, Sofort, Upi, USBankAccount, RevolutPay, Unknown occurred in Instance of 'AddPaymentAccountDrawerBloc'.
#0 $enumDecode (package:json_annotation/src/enum_helpers.dart:83:5)
#1 _$$SetupIntentImplFromJson.<anonymous closure> (package:stripe_platform_interface/src/models/setup_intent.g.dart:18:23)
#2 MappedListIterable.elementAt (dart:_internal/iterable.dart:425:31)
#3 ListIterator.moveNext (dart:_internal/iterable.dart:354:26)
#4 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
#5 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#6 new List.of (dart:core-patch/array_patch.dart:39:18)
Using flutter_stripe: ^10.0.0
To add a debit card when I call this method Stripe.instance.confirmSetupIntent, It throws an Exception Unhandled Exception: Invalid argument(s):
CashApp
is not one of the supported valuesI have tested this method a lot of times before and it worked perfectly so, this issue was not here before, it is introduced recently. I am using the testing debit card (4242 4242 4242 4242)
I think stripe has added a new Enum Value in their SetupIntent Class so you may need to update that in SetupIntent.fromJson method.
=================== ====== Stack Trace =====
E/flutter (10667): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): (package:stripe_platform_interface/src/models/setup_intent.g.dart:18:23)
E/flutter (10667): #2 MappedListIterable.elementAt (dart:_internal/iterable.dart:425:31)
E/flutter (10667): #3 ListIterator.moveNext (dart:_internal/iterable.dart:354:26)
E/flutter (10667): #4 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
E/flutter (10667): #5 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
E/flutter (10667): #6 new List.of (dart:core-patch/array_patch.dart:39:18)
E/flutter (10667): #7 ListIterable.toList (dart:internal/iterable.dart:224:7)
E/flutter (10667): #8 $$SetupIntentImplFromJson (package:stripe_platform_interface/src/models/setupintent.g.dart:19:12)
E/flutter (10667): #9 new $SetupIntentImpl.fromJson (package:stripe_platform_interface/src/models/setupintent.freezed.dart:336:7)
E/flutter (10667): #10 $SetupIntentFromJson (package:stripe_platform_interface/src/models/setup_intent.freezed.dart:18:23)
E/flutter (10667): #11 new SetupIntent.fromJson (package:stripe_platform_interface/src/models/setup_intent.dart:65:7)
E/flutter (10667): #12 MethodChannelStripe.confirmSetupIntent. (package:stripe_platform_interface/src/method_channel_stripe.dart:125:40)
E/flutter (10667): #13 ResultParser.parse (package:stripe_platform_interface/src/result_parser.dart:14:24)
E/flutter (10667): #14 MethodChannelStripe.confirmSetupIntent (package:stripe_platform_interface/src/method_channel_stripe.dart:126:7)
E/flutter (10667):
E/flutter (10667): #15 Stripe.confirmSetupIntent (package:flutter_stripe/src/stripe.dart:414:27)
E/flutter (10667):
E/flutter (10667): #16 _AddStripeDebitCardPaymentMethodScreenState.addStripeDebitCard (package:bahunar_customer/Screens/Account/PaymentMethodScreens/AddPaymentMethod/AddStripeDebitCardPaymentMethodScreen.dart:160:31)
E/flutter (10667):
E/flutter (10667):
CashApp
is not one of the supported values: AfterpayClearpay, Card, CashAppPay, Alipay, Grabpay, Ideal, Fpx, CardPresent, SepaDebit, AuBecsDebit, BacsDebit, Giropay, P24, Eps, Bancontact, Oxxo, PayPal, Sofort, Upi, USBankAccount, RevolutPay, Unknown E/flutter (10667): #0 $enumDecode (package:json_annotation/src/enumhelpers.dart:83:5) E/flutter (10667): #1 $$SetupIntentImplFromJson.Please Fix this as soon as you can. Thank You!