How do I submit my Stripe Client card list?
I just want to show the default payment method to the default user in the iOS app.
I'm trying to click STPPaymentMethodsViewController
on viewController
. The line clearly indicates what I need to create STPCustomerContext
. Should I also create STPPaymentContext
? I don't want to create STPPaymentContext
because it requires 4 methods that I will not use in this part of my application ... This is what I have but no dice.
Also, the Stripe docs tell you that you are creating the clientContext, but don't tell you how this is passed STPPaymentMethodsViewController
. What am I missing?
https://stripe.com/docs/mobile/ios/custom
//AppDelegate.swift
var customerContext: STPCustomerContext?
func setupStripe() {
self.customerContext = STPCustomerContext(keyProvider: MyAPIClient.sharedClient)
}
From the custom VC settings, I am trying to do the following:
func paymentMethodsButtonTapped() {
let paymentMethodsViewController = STPPaymentMethodsViewController()
paymentMethodsViewController.delegate = self // ERROR HERE: Cannot assign to property: 'delegate' is get only
let navigationController = UINavigationController(rootViewController: paymentMethodsViewController)
self.present(navigationController, animated: true, completion: nil)
}
source to share
No one has answered this question yet
Check out similar questions: