iphone – 恢复自动续订订阅的订阅购买
发布时间:2020-12-14 19:42:57 所属栏目:百科 来源:网络整理
导读:当我在我的应用程序中购买以前购买的“Auto-Renewable Subscriptions”时,它说 You're currently subscribed to this... 当我点击OK时,在支付队列的代表中.. - (void) paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions{ f
当我在我的应用程序中购买以前购买的“Auto-Renewable Subscriptions”时,它说
You're currently subscribed to this... 当我点击OK时,在支付队列的代表中.. - (void) paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions { for (SKPaymentTransaction * transaction in transactions) { switch (transaction.transactionState) { case SKPaymentTransactionStatePurchased: [self completeTransaction:transaction]; break; case SKPaymentTransactionStateFailed: [self failedTransaction:transaction]; // Why this is called? break; case SKPaymentTransactionStateRestored: [self restoreTransaction:transaction]; default: break; } } } 返回的transaction.transactionState是SKPaymentTransactionStateFailed而不是SKPaymentTransactionStateRestored,这是正常的吗? 那我该如何正确处理呢? 解决方法
我有同样的问题,我认为没有办法区分这个事件与其他错误(它返回错误代码SKErrorPaymentCancelled).我认为你可以处理它的唯一方法是通过“恢复购买”按钮,并在用户按下它时调用[[SKPaymentQueue defaultQueue] restoreCompletedTransactions].
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |