flutter_stripe
flutter_stripe copied to clipboard
PaymentMethod Sofort / Klarna not working on Android
Creating a payment method Sofort / Klarna fails every time on Android with the error 'Card details not complete'. The error message does not make any sense to me as no card details can be provided using those payment methods.
Steps to reproduce the behavior:
final paymentMethodDataSofort = stripe.PaymentMethodDataSofort(country: 'de'); final paymentMethodSofort = stripe.PaymentMethodParams.sofort(paymentMethodData: paymentMethodDataSofort); final paymentMethod = await stripe.Stripe.instance.createPaymentMethod(paymentMethodSofort);
can you send me more details about klarna? because for me it is working. Remember that for klarna you need to provide email and country in the billingdetails
I use flutter_stripe: ^3.1.0 and my flutter version is 3.0.1. This code runs without any problems on iOS only on android it does not work:
final billingDetails = BillingDetails(
email: '[email protected]',
address: Address(
country: 'DE',
postalCode: '',
city: '',
state: '',
line1: '',
line2: '',
),
);
final paymentMethod = await Stripe.instance.createPaymentMethod(
PaymentMethodParams.klarna(
paymentMethodData: PaymentMethodData(
billingDetails: billingDetails,
),
),
);
I can reproduce it something is wrong in the plugin on the Android side
a fix is bound to be released soon https://github.com/stripe/stripe-react-native/pull/987/files