ios - 使用 Parse : kPFErrorPaymentDisabled 在 App Purchase 中进行沙盒测试

标签 ios parse-platform in-app-purchase

我尝试使用 Parse SDK 为我的 iOS 应用设置应用内购买 (IAP)。

  • 我在开发者门户中为我的应用启用了 IAP。
  • 我在我的 XCode 应用程序项目设置中启用了 IAP
  • 我在 iTunes Connect 中创建了一个可消费的 IAP。它显示正在等待屏幕截图,并且您目前没有有效的 iOS 付费应用程序契约(Contract)。但这两者都不会影响沙盒测试。
  • 我创建了一个用于 IAP 测试的沙盒帐户
  • 我在测试设备上注销了我的 iTunes 和 Appstore 帐户。我没有在设置中登录沙盒帐户

这是我在代码中执行 IAP 的方式:

        PFPurchase.buyProduct("com.domain.MyIdentifier", block: { (error: NSError?) in
            if error != nil {
                print(error?.localizedDescription)
        })

我在 AppDelegate 中注册了一个处理程序

    PFPurchase.addObserverForProduct("com.domain.MyIdentifier") { (transaction:SKPaymentTransaction) in
        print("purchased")
    }

不提示登录我想输入我的沙箱帐户凭据的地方。我从 Parse 收到 kPFErrorPaymentDisabled 错误。

这是什么意思?

最佳答案

如果通过设置中的 Restrictions 禁用了 IAP,则会出现此错误。

关于ios - 使用 Parse : kPFErrorPaymentDisabled 在 App Purchase 中进行沙盒测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36341982/

相关文章:

ios - Parse.com findObjects() 获取数据

ios - Apple 的 "No cancellation of the current subscription is allowed during active subscription period."是什么意思?

ios - 弹出窗口中的 uiBarButtonItem 框架最佳选择

ios - 如何在 UITableView 原型(prototype)单元格上设置自定义 UILabel 文本

ios - 解析是否支持原子性?

ios - 如何在应用程序购买中通过 iOS 使非消耗品可用于多次购买?

ios - iOS 11.1.2 中的 Apple 应用内购买错误

core-data - Core Data 可以在 iOS 上延迟获取 BLOB 属性吗?

iphone - 调整 TableViewCell 大小以适应 RSS Feed 详细信息

xcode - Swift 2 + 解析 : Unexpectedly found nil while unwrapping an Optional value