Description
Is your feature request related to a problem? Please describe.
I've implemented payment flow like described in this article paymentsheet-flowcontroller. Docs says that after using flowController.presentPaymentOptions()
we will handle selected PaymentOption
through PaymentOptionCallback
to update our own UI if needed. In my case it's needed but PaymentOption
doesn't contain all needed information. It has only label
and icon
but in my case I need to know what type of PaymentMethod
was selected like paypal
/klarna
/card
/etc...
Describe the solution you'd like
Add more usefull information about selected payment to PaymentOption
, mostly needed information are exists in PaymentMethod
class like type
/id
.
Describe alternatives you've considered
Would be perfect if we can receive and PaymentOption
and PaymentMethod
at the same time, so we can update our UI according to selected type of payment
Additional context
Currently to properly update our UI I have to fake
start payment process and pass invalid clientSecret
on CreateIntentCallback
because I want to receive PaymentMethod
and then I'm updating our UI with adjusted prices and then I'm again doing reconfig of FlowController
and then I'm waiting for user starts payment process. I would like to avoid any fake
actions