Skip to content

When trying with Invalid card details in Live throwing 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast #265

@SoorajSoman

Description

@SoorajSoman

First of all thanks for this great library. I'm trying stripe payment with Invalid card details (valid card number and invalid expiry or ccv combination ) in Live mode throwing exception 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast while Stripe.instance.confirmPaymentMethod is called.I checked the other issues reported with same exception but it is of different context hence raising as a new one.

I'm following https://github.com/flutter-stripe/flutter_stripe/blob/main/example/lib/screens/webhook_payment_screen.dart implementation

To Reproduce
Steps to reproduce the behavior:

  1. Entering number test card 4242 into the cardfield in live
  2. Tapping the confirm button.
  3. Observe a failure with exception (including the part of the stack trace, belonging to this package)
    'Null' is not a subtype of type 'Map<String, dynamic>' in type cast while Stripe.instance.confirmPaymentMethod is called.

Expected behavior
Any response from library to handle invalid card details

Additional context
Could any one please confirm whether this is achievable with current version of library and implementation I'm following?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions