flutter_stripe
flutter_stripe copied to clipboard
collectBankAccount returns PlatformException
Describe the bug
Calling collectBankAccount on both iOS and Android returns PlatformException(Invalid Params, , , null)
To Reproduce Call this function
const billingDetails = BillingDetails(
name: 'Flutter Stipe',
email: '[email protected]',
phone: '+48888000888',
address: Address(
city: 'Houston',
country: 'US',
line1: '1459 Circle Drive',
line2: 'S',
state: 'Texas',
postalCode: '77063',
),
);
await Stripe.instance.collectBankAccount(
isPaymentIntent: true,
clientSecret: paymentInfo.clientSecret,
params: const CollectBankAccountParams(
paymentMethodType: PaymentMethodType.USBankAccount,
billingDetails: billingDetails,
),
);
This is returned:
[ +1 ms] flutter: PlatformException(Invalid Params, , , null)
[ ] flutter:
#0 JSONMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:171:7)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:310:18)
<asynchronous suspension>
#2 MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:510:43)
<asynchronous suspension>
#3 MethodChannelStripe.collectBankAccount (package:stripe_platform_interface/src/method_channel_stripe.dart:429:20)
<asynchronous suspension>
#4 Stripe.collectBankAccount (package:flutter_stripe/src/stripe.dart:583:12)
<asynchronous suspension>
Expected behavior I expect a modal to show up to collect bank details after calling this method with required parameters
Package version: flutter_stripe: 9.5.0+1 Flutter version: stable, 3.13.0
Additional context Is this the wrong usage or a bug? Every parameter is filled
Hey @chilimsv any update on the above issue?
Hey @chilimsv any update on the above issue?
No luck. Decided to collect the bank details on our client side as a workaround
Hey, any update on this? collectBankAccount still doesn't work.
I've found 2 problems:
-
Flutter plugin send
'isPaymentIntent':isPaymentIntentand ios side use wrong keylet isPaymentIntent = arguments["intentType"] as? Bool, -
Flutter plugin send as params
CollectBankAccountParamsparsed to json and both ios and android side try to extract this bypaymentMethodDatawhich is not in that model.
What with this draft PR?