flutter_stripe icon indicating copy to clipboard operation
flutter_stripe copied to clipboard

PaymentMethod Sofort / Klarna not working on Android

Open warin123 opened this issue 2 years ago • 4 comments

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);

warin123 avatar Jun 06 '22 12:06 warin123

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

remonh87 avatar Jun 06 '22 18:06 remonh87

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,
            ),
       ),
);

warin123 avatar Jun 09 '22 10:06 warin123

I can reproduce it something is wrong in the plugin on the Android side

remonh87 avatar Jun 10 '22 05:06 remonh87

a fix is bound to be released soon https://github.com/stripe/stripe-react-native/pull/987/files

jonasbark avatar Jun 10 '22 17:06 jonasbark