Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

How to know which payment method is selected On Stripe iOS when using PaymentMethodsViewController #653

Open
sarthak199526 opened this issue Aug 28, 2019 · 3 comments

Comments

@sarthak199526
Copy link

sarthak199526 commented Aug 28, 2019

It should have a delegate method like below

public void PaymentMethodsViewControllerSelectedPaymentMethod(PaymentMethodsViewController paymentMethodsViewController,PaymentMethod paymentMethod)
{
//DismissViewController(true, null);
}

The one we have is which call when user selects method is

public void PaymentMethodsViewControllerFinished(PaymentMethodsViewController paymentMethodsViewController)
{

    }

But it does not give any payment method information Which I am gonna need to generate Token

Thanks

@sarthak199526
Copy link
Author

image

@sarthak199526
Copy link
Author

sarthak199526 commented Aug 28, 2019

I need the last method from above image this is from stripe documentation from iOS

func paymentOptionsViewController(_ paymentOptionsViewController: STPPaymentOptionsViewController, didSelect paymentOption: STPPaymentOption) {
// Save selected payment option
selectedPaymentOption = paymentOption
}
Thanks

@sarthak199526
Copy link
Author

I found out we have An extension method
public void PaymentMethodsViewControllerSelectedPaymentMethod(PaymentMethodsViewController paymentMethodsViewController,IPaymentMethod paymentMethod)
{

    }

For IPaymentMethodsViewControllerDelegate But I do not know how to implement that method it's not in sample too

Can anybody help me in this ?
Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant