Hi
I have developed an app in unity engine 5.3 & has implemented Unity IAP. My user of my developed app could able to purchase a non consumable product. My app is available at google play store. Currently I am storing successful purchase information is in playerprefs. But I guess this is not the right way. I want to know how to query google play store to know whether the user has purchased the non consumable product or not?
If user has purchased the nonconsumable then user has access to all levels.
Hope you understand the question. Thanks in advance.
Unity IAP does not handle any inventory management by default. We allow developers to determine the best way to store purchased products. Some developers use PlayerPrefs while others save the purchases on a server.
We don’t explicitly keep a record of the products that a user has purchased. However, some users have found ways to use our receipts to track that information. You can find some examples in the forums:
Please emphasize this in your manual and how-tos. I spent way too much time and troubleshooting effort to conclude that Product.hasReceipt is NOT meant to be reliable (= to function equally in Editor and across other runtime platforms). It is super simple to build up some minimal local inventory (like serialize/deserialize a List inventory, check inventory.Contains(productId) when you need to query), but when searching for proper how-tos all I’ve gotten are the manual which somehow skims over this and a bunch of old questions all over the web, sometimes leading to failed attempts like mine with the unreliable receipt data.