flutter_stripe icon indicating copy to clipboard operation
flutter_stripe copied to clipboard

P24 not showing up on IOS

Open juliuszmandrosz opened this issue 2 years ago • 8 comments

Hi, I am creating payment intent with card and P24 as payment methods. On Android everything works fine and I can see P24 method, however on IOS it is not showing up, I will be grateful for any help!

image image image image

To Reproduce Steps to reproduce the behavior:

  1. Add P24 to payment methods creating payment intent in API
  2. Present payment sheet on client side

Expected behavior Payment sheet should show P24 payment method

  • Device: Iphone SE Simulator
  • OS: IOS 15.5
  • Package version: 3.1.0
  • Flutter version 3.0.2

juliuszmandrosz avatar Jun 17 '22 13:06 juliuszmandrosz

Thank you for the excellent problem description. I can reproduce the behavior and I see a crash on iOS related to this. I will create a ticket on the stripe sdk repo.

remonh87 avatar Jun 21 '22 18:06 remonh87

Hi, I have exact same issue using https://github.com/capacitor-community/stripe I've changed stripe pod version to 21.13.0. It should be compatible with p24 but it didn't help.

Only using p24

grzesebe avatar Jun 22 '22 12:06 grzesebe

So I got it working when you specify a return url in the initPaymentSheet parameters. This is a required for the P24 method but it should not crash so thats why I keep it open.

Example:

await Stripe.instance.initPaymentSheet(
        paymentSheetParameters: SetupPaymentSheetParameters(
          // Main params
          paymentIntentClientSecret: data['paymentIntent'],
          merchantDisplayName: 'Flutter Stripe Store Demo',
          // Customer params
          customerId: data['customer'],
          returnURL: 'flutterstripe://safepay',
}

remonh87 avatar Jun 26 '22 13:06 remonh87

Thank you, it works perfectly. By the way, what this parameter is responsible for? The documentation does not explain much about it

juliuszmandrosz avatar Jun 26 '22 14:06 juliuszmandrosz

The return url is: to redirect your customer back to after they authenticate or cancel their payment on the payment method’s app or site. For example on P24 and also iDeal you will enter an external web page where the customer handles the payment. When completed you ideally want to close the webview and make the user return to your app.

remonh87 avatar Jun 26 '22 15:06 remonh87

Thanks for explanation, however now I am facing another issue with return url provided. I used deep link to return back to my app after the successful payment, but when I am trying to authorize payment on P24 test page, I am not redirected back to the application but payment is being fulfilled in the background, I will be grateful for any help in this case.

juliuszmandrosz avatar Jul 14 '22 15:07 juliuszmandrosz

Did you also add the deeplink in flutter like: https://docs.flutter.dev/development/ui/navigation/deep-linking ?

remonh87 avatar Jul 20 '22 08:07 remonh87

Yes, I did it, but the problem is not with the app itself, when payment is successful I can just see infinite loader on P24 page

juliuszmandrosz avatar Jul 20 '22 11:07 juliuszmandrosz

last versions (try 5.0.0) incorporated some fixes for deeplinking if the issue still persists ping me and I will further investigate it.

remonh87 avatar Sep 12 '22 20:09 remonh87