Question

In my application the user should have the ability to buy a code that he is able to redeem on another device. The problem with this is that In-app billing doesn't automatically generate a code for you. However, it does generate a purchase token. I have come up with two possible solutions, but I don't know what to do. Here are my options:

  1. Use an algorithm to make the purchase token shorter and use that as the code. (Not sure if this will have security concerns as the code may be redeems from another device.)
  2. Use a server and the Purchase Status to generate a code and manage the available and used codes.
Was it helpful?

Solution

This is very bold to implement something like this. If you want to give users opportunity to give codes to others as a present, then you will need to have a server and keep your codes, as well as information on who and when redeemed it on the server. And this must be very secure and very reliable. This sounds as the option two.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top