首页 文章

捕获[[SKPaymentQueue defaultQueue] restoreCompletedTransactions]的取消事件

提问于
浏览
3

什么是程序员,apple发布了storekit,当用户输入他/她的电子邮件和密码时,我们甚至无法获得取消事件的任何回调

[[SKPaymentQueue defaultQueue] restoreCompletedTransactions]

. 在取消购买时不要通过推送取消来解决此问题,这是在尝试恢复交易时推送取消 . 用户按下取消,甚至按下确定按钮都没有回拨 . 您收到的唯一回调是来自服务器的信息返回时指示它是否成功 . 不能接受的 . 如果有人有答案,请回答 . 谢谢

1 回答

  • 11

    试试这个:

    @protocol SKPaymentTransactionObserver <NSObject>
    
    ....
    
    @optional
    
    // Sent when an error is encountered while adding transactions from the user's purchase history back to the queue.
    - (void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
    
    
    @end
    

相关问题