2012-07-21 55 views
0

我的应用程序将具有非消耗品和自动续订订阅。我正在通过应用程序中的非消费品使用个人歌曲购买。并计划通过订阅销售歌曲(歌曲组)。关于在应用程序购买中实施汽车可再生的问题

我已经实现了在应用程序内购买非消耗性在我application.The方式我所做的是如下

1) Stored product identifiers from my web server. 

2) fetched and displayed the products. 

3) when the user taps "buy" for single song, the payment will be done and i will check the 
transaction receipt with apple server using my webserver. 

4) if the receipt status is 0, i will make entry into my webserver database as that particular user has purchased that particular song.(by sending user id and product identifer) 

5) then i deliver the content. 

我这是怎么done.Now我正在开始实施汽车再生subscription.generate共享秘密和存储在iphone应用程序。

按照该文档,验证交易收据与苹果服务器时,需要发送共享秘密also.Now我想知道下面的东西

1) does my non consumable in app purchase makes sense? or am i left anything? 

2) for the auto renewable subscription, once the transaction receipt is valid, what are the information i need to store in my web server.i mean, how can i know when the subscription going to expire, expire date, etc ? 

3) how to check whether the subscription is valid before delivering the content? 

4) if my steps to do are wrong pls suggest me how can i proceed? please share your opinion 
sorry to be dumb 
+0

请帮助别人 – user198725878 2012-07-21 11:23:56

回答

0
  1. 是的,我认为非消耗品,这是有道理的。由于您只购买一次,将信息输入到您的网络服务器数据库应该没问题。

  2. 交易收据正是您的信息来源:它不是“一次有效”,但要确定订阅是否已过期,您应该存储收据。在您的应用程序的每次启动(因为这是资源消耗)时,您可以再次将收据发送给Apple以“验证” - 事实上,这会检查订阅是否仍然与Appe一起生效(即已在适当的时间)。从Apple返回的答案包含(在JSON字典中)有关到期日期等的信息(请参见https://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/RenewableSubscriptions/RenewableSubscriptions.html#//apple_ref/doc/uid/TP40008267-CH4-SW2

  3. 然后,您可以存储信息订阅在您的应用中是否处于活动状态(非永久),因此您知道是否在实际运行期间提供内容。