ezet / stripe-sdk

A simple and flexible Stripe library for Flutter with complete support for SCA and PSD2.
https://pub.dev/packages/stripe_sdk
Other
137 stars 137 forks source link

confirmPayment #99

Closed nouhouari closed 3 years ago

nouhouari commented 3 years ago

Hi,

I would like to know how we can achieve the confirmation of the payment intent.

I'm trying to follow this guide: https://stripe.com/docs/connect/collect-then-transfer-guide

And I need some guidance on how to confirm the payment intent with a credit card and the client secret. In my use case, when the user checkout an article, he will receive a client secret from backend and should use it to confirm the payment. Can we do this with the library ?

This correspond at this piece of code: https://github.com/stripe-samples/accept-a-card-payment/blob/dd18f67b7d1a26a7fd4dd2d8f02457d5531a01f4/using-webhooks/client/android/app/src/main/java/com/example/app/CheckoutActivityKotlin.kt#L117

ezet commented 3 years ago

Yes, you can perform confirmation using this SDK. StripeUI.confirmPaymentIntent() should work

nouhouari commented 3 years ago

Thanks. I've found how to do it.