应用内购买错误会以编程方式迅速清除4

时间:2019-03-10 12:09:04

标签: ios swift iphone in-app-purchase

此问题发生在我身上:通过带锁的电影购买订阅。我单击相机按钮。订阅视图打开。我进行购买:我显示一条错误消息(但购买仍然成功)。

    func subscribe(sub: SubscriptionType) {
DispatchQueue.main.async { let _ = MBProgressHUD.standardHud(over: self.managedView) }
FS2Recipes.subscribe(sku: sub.sku()).then { _ in
    self.subscribed()
}.catch { error in
    debugPrint("Error \(error.localizedDescription)")
    let alert = UIAlertController(title: "Ooops", message: "There was an error processing your purchase. Try again later!", preferredStyle: UIAlertControllerStyle.alert)
    alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { [weak self] _ in
        self?.dismiss()
    }))
    self.present(alert, animated: true, completion: nil)
}.always {
    DispatchQueue.main.async { let _ = MBProgressHUD.hide(for: self.managedView, animated: true) }
}

错误在于,即使证明购买不成功,实际上还是成功,并且购买被撤消。

error

0 个答案:

没有答案