简体   繁体   English

使用Sandbox在iOS中测试应用内购买的问题

[英]Issues on testing In-App-purchase in iOS with Sandbox

I am facing a strange behavior with In-App-Purchase in iOS while testing with sandbox. 在使用沙箱进行测试时,我在iOS中使用应用程序内购买面临一种奇怪的行为。 Few things I observed, Please make your comments where I am wrong. 我观察到的东西很少,请在我错的地方发表评论。

  1. I know sandbox has small time interval for subscriptions like 30 minutes for 6 month subscription. 我知道沙盒的订阅时间间隔很短,例如6个月订阅需要30分钟。 I am using subscription model, when I am trying to purchase same item multiple time, it allows. 我使用订阅模式,当我尝试多次购买同一项目时,它允许。 Is that OK ? 这可以吗 ? As per my understanding, it should allow only once to purchase and in subsequent call, it should say "Already purchased". 据我了解,它只能购买一次,在随后的通话中,应该说“已购买”。
  2. When I am restoring my previous purchase. 当我恢复以前的购买时。 Storekit is calling updateTransations with large number of previous transactions. Storekit正在调用带有大量先前交易的updateTransations。 Don't know why it is returning these large amount like 100, 200 ,245, 360, 650 seems like Random in every restore. 不知道为什么它会在每次还原中都返回100、200、245、360、650之类的这么大的数字。

Please make your comments. 请发表您的评论。 Thanks in advance. 提前致谢。

Regards, OP 问候,OP

Dear All, 亲爱的大家,

           As I did not get reply on this thread. We have done testing an make the app live, app is working fine. Here are my comments that might be helpful to others.
  1. When testing with sandbox, since time interval is not same as live app. 在使用沙盒进行测试时,由于时间间隔与实时应用不同。 You get 5 minutes for 3 month subscription and so on, so once your subscription expire your subscription will be renewed. 您获得5分钟的3个月订阅时间,依此类推,因此当您的订阅到期时,您的订阅将被续订。 If you will make one more payment request if subscription is live, you will get popup for already purchased. 如果订阅是实时的,如果您再次提出付款请求,则将弹出已购买的弹出窗口。
  2. Apple sends a large number of transactions, we need to add condition by our own, so that we will identify the current transaction and will process that only, rest will be ignored. 苹果发送大量交易,我们需要自己添加条件,以便我们识别当前交易并只处理当前交易,其余交易将被忽略。

Hope this will help you all. 希望这对大家有帮助。

Thanks, Om 谢谢哦

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM