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

Creating Payment method: Unhandled Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast #198

Closed
ericel opened this issue Jul 10, 2021 · 2 comments
Assignees

Comments

@ericel
Copy link

ericel commented Jul 10, 2021

Describe the bug
I am getting the following error trying to use creae payment method for card:

[VERBOSE-2:ui_dart_state.cc(199)] Unhandled Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast
#0 MethodChannelStripe.createPaymentMethod
package:stripe_platform_interface/src/method_channel_stripe.dart:61

#1 Stripe.createPaymentMethod
package:flutter_stripe/src/stripe.dart:133

To Reproduce

final billingDetails = BillingDetails(
      email: 'email@stripe.com',
      phone: '+48888000888',
      address: Address(
        city: 'Houston',
        country: 'US',
        line1: '1459  Circle Drive',
        line2: '',
        state: 'Texas',
        postalCode: '77063',
      ),
    ); // mocked data for tests

    // 2. Create payment method
    final paymentMethod =
        await Stripe.instance.createPaymentMethod(PaymentMethodParams.card(
      billingDetails: billingDetails,
    ));
    print(paymentMethod);

Smartphone / tablet

  • Device: [e.g. iPhone X]
  • OS: [e.g. iOS 11]
@ericel ericel closed this as completed Jul 10, 2021
@jonasbark
Copy link
Member

Can you tell us how you resolved this?

@ericel
Copy link
Author

ericel commented Jul 13, 2021

I didn't solve it. I closed because there is an open case about this..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants