Hello,
I just followed the tutorial about Understanding In App Purchases.
There was used In App Product to remove ads (banners) from game. I have also implemented the same product, tested it and it works fine. When transaction was successful I saved that info in the table mySettings which is later saved in json file (same as in the above tutorial).
But, I will need one more product to unlock more characters in the game and in the tutorial while saving purchase info author used one variable:
mySettings.isPaid = true
I will save info for every purchased product so I will need 2 variables in table mySettings:
mySettings.removeAds = true mySettings.moreCharacters = true
The problem is the following:
In the transactionCallback method it checks the state and saves variable in the table. For eg. if it’s purchased it will save mySettings.isPaid as true.
This whole code is intended to use for only one product and I need it for more products (removeAds and moreCharacters). What do I need to change to make it work? Do I need to add some other booleans and then check them (before checking tstate) to know which product is purchased.
I need this information because I am storing it in json table so I’ll know what one has purchased.
PS, take a look on the transactionCallback method in the above tutorial .
Thanks and kindly Regards!