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

Stripe.instance.confirmSetupIntent: Unhandled Exception: Invalid argument(s): CashApp is not one of the supported value #1639

Closed
Anonymous644 opened this issue Feb 13, 2024 · 3 comments
Labels
needs triage Needs triage

Comments

@Anonymous644
Copy link

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 values

I 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): 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/enum_helpers.dart:83:5)
E/flutter (10667): #1 _$$SetupIntentImplFromJson. (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/setup_intent.g.dart:19:12)
E/flutter (10667): #9 new _$SetupIntentImpl.fromJson (package:stripe_platform_interface/src/models/setup_intent.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):


Please Fix this as soon as you can.
Thank You!

@Anonymous644 Anonymous644 added the needs triage Needs triage label Feb 13, 2024
@Anonymous644 Anonymous644 changed the title Stripe.instance.confirmSetupInten Unhandled Exception: Invalid argument(s): CashApp is not one of the supported value Stripe.instance.confirmSetupIntent: Unhandled Exception: Invalid argument(s): CashApp is not one of the supported value Feb 13, 2024
@remonh87
Copy link
Member

duplicate of #1637

@garylevansjr
Copy link

+1

@diegoveloper
Copy link

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)

@remonh87 remonh87 reopened this Mar 5, 2024
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

4 participants