I am working on integrating Stripe in our app. I want to add and accept cards through either a DialogFragment
or an Activity
with a custom layout instead of the Stripe-provided activities. I know I can use the provided views like CardInputWidget
individually to build a UI, and I am successful in creating a DialogFragment
that can take input for card information and perform validation accordingly.
But the problem is in setting up a flow to get results from the DialogFragment
. Stripe uses onActivityResult to know whether the payment session was successful or not in adding a card. Is there a workaround to do this in my DialogFragment
? If not, then how can I create an Activity
with a custom layout to handle all this?