【发布时间】:2018-12-11 08:32:12
【问题描述】:
我使用 STPPaymentMethodsViewController 进行 Stripe 付款。谁能帮助我如何从其委托方法中获取付款令牌?
let paymentMethodViewController = STPPaymentMethodsViewController(configuration: STPPaymentConfiguration.shared(),
theme: STPTheme.default(),
customerContext: self.customerContext,
delegate: self)
let navigationController = UINavigationController(rootViewController: paymentMethodViewController)
self.present(navigationController, animated: true, completion: nil)
那么如何使用它的委托方法获取支付令牌,以便我可以将该令牌发送到我的服务器?
提前致谢:)
【问题讨论】:
-
你可以实现它的委托方法
-
我已经实现了它的委托方法,但是哪个委托方法可以用来获取支付令牌? @RahulGUsai
-
使用stripe.github.io/stripe-ios/docs/Protocols/…stpaddcardviewcontroller
-
你能再读一遍我的问题吗?我使用的是 STPPaymentMethodsViewController 而不是 STPAddCardViewController。 @RahulGUsai
-
是的,我已经仔细阅读了你的问题,这就是为什么我给你文档链接,使用 stpaddcardview 控制器你可以获得令牌,因为它的委托方法返回令牌请参考我给出的文档链接
标签: ios swift sdk stripe-payments