简体   繁体   中英

Windows 8.1 Durable In-app purchases

I'm testing in-app purchases and have trouble with durable products. I can't buy any durable product more then once per game session. I'm receiving ProductPurchaseStatus.AlreadyPurchased after first buy. But if I restart app - I can purchase durable product once again. I checked my WindowsStoreProxy.xml it's same to microsoft's example. How can I puchase multiple times one durable product with simulator?

You should take a look at Consumable IAPs not Durable . Durable last for a specified amount of time, when Consumable can be bought multiple times (after you fulfill it).

You will also have to notify the Store that the request is fulfilled - by calling ReportConsumableFulfillmentAsync() method .

You can also take a look at MSDN sample .

Durable items are designed to be purchased only once (unless you're running on Windows Phone 8.1+ in which case you can set the Product Lifetime to a value other than "Forever" which will force the user to purchase it again to keep using it).

From the docs :

Durable A product that's bought and owned by the buyer forever, like a game level. Durable products aren't consumed.

And from VS Magazine ( emphasis added ):

BuySuperWeapon will demonstrate an example of a durable ( an item that can be purchased only once ). [...] once a user has purchased it, he can use it as long as he plays the game

If you want to allow a user to purchase multiple of the same thing (even if "in game" they will be available forever - for example an upgrade slot or something), you need to use the Consumable product type.

Note that in the simulator, the phone is torn down and reset each time you stop it, so in real use the user will not be able purchase more of your durable items even in different game sessions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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