应用程序应该如何处理延迟的SKPaymentTransaction? [英] What should the app do in response to a deferred SKPaymentTransaction?

查看:123
本文介绍了应用程序应该如何处理延迟的SKPaymentTransaction?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用中进行了应用内购买,iOS 8的新用户是延期交易,部分描述于技术说明

I have in-app purchases in my app, and new to iOS 8 are "deferred" transactions, partially described in a tech note

我理解它的作用,我不需要阻止用户界面,并更新我的UI反映事务状态是延迟的。但是我应该在方法中放置什么 - (void)transactionDeferred:(SKPaymentTransaction *)交易暂时忽略交易?

I understand what it does and that I need to not block the UI, and update my UI to reflect that the transaction state is deferred. But what am I supposed to place in the method -(void)transactionDeferred:(SKPaymentTransaction *)transaction to disregard the transaction for the time being?

我是否只更新了用户界面? UI的内容应该是什么?我是否需要用您的购买延期等替换价格标签?我认为没有办法测试这个,至少我没有看到任何与我的沙箱测试帐户有关的事情。如果有办法完成整个过程并看看它是如何工作的,那对我来说会更有意义。

Do I only have update the UI? Also what should the content of the UI be? Do I need to replace the price label with something like "Your purchase is deferred"? I don't think there is a way to test this, at least I haven't seen anything about it with my sandbox test account. If there was a way to go through the process and see how it works, it would make a lot more sense to me.

推荐答案

我在做的是:


  1. 停止指标动画

  2. 激活购买恢复按钮

  3. 显示提醒:

  1. Stopping indicator animation
  2. Activating buy and restore buttons
  3. Showing an alert:




等待批准

谢谢!您的购买正在等待父母的批准,您可以继续使用Altershot。

Waiting For Approval
Thank you! You can continue to use Altershot while your purchase is pending an approval from your parent.

我观看了WWDC 14视频。 Apple说你不应该阻止UI并允许再次单击购买按钮。我认为我们需要这个以防父母错过警报,所以孩子可以再发一次。

I watched WWDC 14 video. Apple says you should't block UI and allow to click on buy button again. I think we need this in case parent miss alert, so child can send one more.

我知道我们不应该致电以下延期交易的方法:

What I know is that we should not call following method for deferred transactions:

[[SKPaymentQueue defaultQueue] finishTransaction:transaction];

这篇关于应用程序应该如何处理延迟的SKPaymentTransaction?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆