Answer the question
In order to leave comments, you need to log in
How to implement in-app purchases for different logins on the same device?
There is an application with authorization to your account (as in FB or VK or mail, etc). It is possible to buy a number of additional attachments after authorization. I would like to make sure that the attachments purchased by user A are not those for user B on the same iPhone.
How?
So far, there are only 3 possible solutions in my head, and everything is potentially on the verge of rejection:
1) buy virtual currency and immediately buy appendages for it
pluses: convenient link to the login, no need to restore purchases
minuses: not exactly right yet, but sort of The rules for consumables say that the internal currency must somehow be displayed. Plus, it's not clear how to validate consumable purchases, according to stackoverflow, consumable is not validated on the server, which means relying on the client, which is not good.
2) buy with a dynamic product id, add the login itself to the id and filter out all non-related pluses -
minuses are
validated by the server - God only knows how to do this in itunes connect.
As far as I understand, only static product ids can be entered there
3) rely on the information from the server and, even if the appendage is purchased in another login, ignore it and display it as not purchased. Well and, accordingly, to undertake repeated purchase?
pros - I didn’t find
cons - as I understand it, Apple won’t let you buy what you already bought a second time, and this is potentially a loss of money.
Who can tell me how best to proceed?
Answer the question
In order to leave comments, you need to log in
Why dynamic product id? Just processing the purchase - remember it on your server.
If you have a Login or another unique user identifier, then you can simply check on the server whether the add-on was purchased on this account or not. If not, send an In-app purchase request, after which you remember it on your server. Thus, people will not be able to re-login to get your appendage.
Also, do not forget about the restore purchase function. If a person is logged in and no add-on was found, he must press the "restore purchase" button, after which the application looks on its server to see if he has previously purchased this purchase, plus checks this with Apple mechanisms.
As for the "second time bought" purchase - they just have 2 types of in-house purchases, one of which you choose when you add it to iTunes Connect:
One of them is a one-time purchase, the other is just a purchase. Suitable, for example, for buying in-game currency.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question