Is there a way to fix this Stripe Payment Create Token with bank account error in flutter?

Viewed 319

[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: PlatformException(NullPointerException, Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference, null, null)

I have this issue with Stripe payment create Token with Bank Account, I can't create a token because I got and error like this

[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: PlatformException(NullPointerException, Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference, null, null)

At first creating token with bank account was working fine, but after awhile I tried testing it again before integrating to an api it doesn't work now and got that error. Can anyone help me solve this problem? I've been stuck to this issue for days already. Thank you.

Here is may code snippets :

var newBank = await StripePayment.createTokenWithBankAccount(
                                    BankAccount(
                                      accountHolderName: 'Jenney Rogers',
                                      routingNumber: '110000000',
                                      accountNumber: '000123456789',
                                      countryCode: "US",
                                      currency: "usd",
                                    ),
                                  );
                                  print(newBank.tokenId);
0 Answers
Related