【问题标题】:Implementing Stripe with iPhone用 iPhone 实现 Stripe
【发布时间】:2015-03-29 06:26:59
【问题描述】:

我正在尝试将 Stripe 与 ios 集成。我正在关注this 指南。

我在“使用 STPCard”时遇到了 here

当我开始输入 [Stripe createTokenWithCard:card...Xcodes 'Intelligent code completion' 时,会出现一条红线(有点像贬低某些东西时)。

这是代码。

[Stripe createTokenWithCard:card completion:^(STPToken *token, NSError *error) {
    if (error) {
      [self handleError:error];
    } else {
      [self createBackendChargeWithToken:token];
    }
  }];

【问题讨论】:

  • 你在当前班级中声明了handleError:吗?
  • 没有。我猜 Stripe 想让我们创建 handleError 类。
  • @IanMacDonald 我要编辑问题,并取出有关“handleError”的问题。
  • 刚刚在这里找到了答案:stackoverflow.com/questions/28082195/…,但它很快,我在目标 c 中需要它
  • [[STPAPIClient sharedClient] createTokenWithCard:card completion:completion] 适合你吗?

标签: ios objective-c in-app-purchase stripe-payments


【解决方案1】:

他们的 API 在您使用教程后已经更新。

对此的新访问方法是:

[[STPAPIClient sharedClient] createTokenWithCard:card completion:completion]

【讨论】:

    猜你喜欢
    • 2014-09-03
    • 1970-01-01
    • 2017-02-26
    • 2018-02-22
    • 2019-09-26
    • 2021-10-30
    • 1970-01-01
    • 2018-03-10
    • 2014-07-07
    相关资源
    最近更新 更多