2012-07-21 58 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. 然後,您可以存儲信息訂閱在您的應用中是否處於活動狀態(非永久),因此您知道是否在實際運行期間提供內容。