简体   繁体   English

恢复应用内购买

[英]Restoring In-App purchases

I'm creating a game where the player can buy non-consumable items, there are 10 to buy and once bought they stay bought. 我正在创造一个游戏,玩家可以购买非消耗品,有10个购买,一旦购买,他们就可以购买。 The transactions for these items (a simple boolean for each item) is recorded on a server (Parse.com). 这些项目的事务(每个项目的简单布尔值)记录在服务器(Parse.com)上。

So I'm unsure what I need to do with my restore button as it doesn't matter what device the player signs into my game on, as long as they use the same account (which is tied to their GameCenter details) the game will know what items they have bought anyway, so there's no need for my game to have a restore button, but Apple says I need one, so what should I do? 所以我不确定我需要用我的恢复按钮做什么,因为无论播放器在我的游戏中登录什么设备都没关系,只要他们使用相同的帐户(这与他们的GameCenter细节相关)游戏将会知道他们买了什么物品,所以我的游戏没有必要有一个恢复按钮,但Apple说我需要一个,所以我该怎么办?

With non-consumable items ,you may not have a "restore button" but you must have a restore function. 对于非消耗品,您可能没有“恢复按钮”,但您必须具有恢复功能。 My app has no restore button , but has a restore function , and it also approved by apple. 我的应用程序没有恢复按钮,但具有恢复功能,它也被苹果批准。 But it is better to has a restore function for non-consumable items. 但是对于非消耗品具有恢复功能更好。 And you must has a restore function 而且你必须具有恢复功能

And Why non-consumable items need restore ? 为什么非消耗品需要恢复?

In my app , When user purchase my items and my local app has a transactions , At this time , the device maybe offline suddenly. 在我的应用程序中,当用户购买我的商品并且我的本地应用程序有交易时,此时设备可能会突然离线。 So his payment success but purchasing failed , this situation should restore. 所以他的付款成功但购买失败,这种情况应该恢复。 And another situation , When user purchase my items and my local app has a transactions, I pass the transactions to my server . 另一种情况是,当用户购买我的商品并且我的本地应用程序有交易时,我将交易传递给我的服务器。 My server check the transactions with apple server , At this time , my server is down .So his payment success but purchasing failed , this situation also should restore. 我的服务器检查与苹果服务器的交易,此时,我的服务器已关闭。因此他的支付成功但购买失败,这种情况也应该恢复。

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

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