What’s the recommendation for storing receipts of purchases securely in Corona?
I’ve been wondering myself. However, I revized the general steps.
General Steps
The general steps for in-app-purchases are:
If network connection isn’t present then check player prefs to see if the full game has been unlocked.
If network connection is available, check receipts for the purchase.
If the purchase is found in receipts, set the player prefs that the game is unlocked.
If the purchase is not found in receipts, show the store/buy button and remove full game unlocked from player prefs.
When the buy button is pressed, request a purchase.
Upon successful purchase set the player prefs for full game unlocked.
If the player prefs has full game unlocked, show a visual change that the game is unlocked.
For now I have decided to store the receipts in the app’s save data file which I now encrypted and base64 encode.
I’ve been wondering myself. However, I revized the general steps.
General Steps
The general steps for in-app-purchases are:
If network connection isn’t present then check player prefs to see if the full game has been unlocked.
If network connection is available, check receipts for the purchase.
If the purchase is found in receipts, set the player prefs that the game is unlocked.
If the purchase is not found in receipts, show the store/buy button and remove full game unlocked from player prefs.
When the buy button is pressed, request a purchase.
Upon successful purchase set the player prefs for full game unlocked.
If the player prefs has full game unlocked, show a visual change that the game is unlocked.
For now I have decided to store the receipts in the app’s save data file which I now encrypted and base64 encode.
I should definitely expose the OuyaFacade.putData and getData which uses an encrypted database for save information. That data also lives if the app is uninstalled and reinstalled later.
I should definitely expose the OuyaFacade.putData and getData which uses an encrypted database for save information. That data also lives if the app is uninstalled and reinstalled later.