如何将 Stripe STPPaymentOptionsViewController 与 Swift 5 集成?

问题描述

以前我在 Swift 中集成了 STPAddCardViewController,用户可以在其中提供卡片详细信息,然后我将令牌发送到后端。现在我必须将 STPAddCardViewController 与 swift5 集成。我检查了条纹文档 - https://stripe.com/docs/mobile/ios/basic。 无法设置临时密钥,也无法进行一些构造操作。我继承了 STPPaymentOptionsViewControllerDelegate 和委托方法

func paymentOptionsViewController(_ paymentOptionsViewController: STPPaymentOptionsViewController,didFailToLoadWithError 错误: 错误) {

}

func paymentOptionsViewControllerDidFinish(_ paymentOptionsViewController: STPPaymentOptionsViewController) {
   
}

func paymentOptionsViewControllerDidCancel(_ paymentOptionsViewController: STPPaymentOptionsViewController) {
    
}
But I am unable to send the token to backend.When we used card the token used to be like this start like this -> "tok_ ..." Now if used Payment then token will start with "P.."

如果有任何机构在这方面帮助我,我将非常感激。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)