IAP restore

Hi friendly people,

A couple of In-App Purchasing questions:

  1. Is it mandatory to offer a ‘restore’ button/option? I’ve read that buying something you already bought makes the same purchase again but you don’t have to pay again so in that way just a ‘buy’ button could be enough, no - for non-consumables.
  2. How does the restore option know who you are? Is that through the mac-ID you set for the store?
  3. What do we need to do with the receipt and originalreceipt thingies? Can we just ignore these or do we need to store them somewhere?
  4. What does restoring return as event.transaction? Is it “purchased” just like regular first-time buying?

thanks,
Thomas

p.s. It still amazes me after 5 months how well Corona works for me! [import]uid: 70134 topic_id: 20491 reply_id: 320491[/import]

Hey, Thomas, I use IAP in my game-still-in-development, but I haven’t really thought about restore routine. I suppose having restore button would be more elegant. I’m sure more experienced developers can give us better idea as to what to do & expect, but here are my thoughts:

  1. I don’t know if “restore” button is mandatory. If so, I’d like to know. Meanwhile, after a user buy a non-consumable item, if he/she tries to purchase the same item, IAP restores it and notifies the user that he/she already has it. This notification comes in the form of a native alert message.

  2. IAP knows who you are when you’re signed in. And you can’t buy things without signing in first.

  3. I don’t do anything with receipts at the moment. Not sure if developers are required to store them.

  4. I don’t know what event.transaction gets returned. All I’ve noticed is the native alert that pops up with a pre-canned message when the non-consumable item is restored.

Naomi
[import]uid: 67217 topic_id: 20491 reply_id: 80479[/import]

ad 1) I think restore function is useful, when there is lots of products to buy. You can “buy” them again in a single action instead of rebuy them all one by one. However, I implemented restore even if I have got only single product to buy, “premium content”. Users might be used to it.

ad 2) As Naomi explained, just try to go to Settings/Store in your device and log out. You will see, that system will prompt you for your login information when purchasing something.

ad 3) I would like to know it too. The transaction information seems to be important, but I found it useless.

ad 4) Restoring calls the same callback as purchase. In purchase case the event.transaction.state is set to “purchased”. In restore case the event.transaction.state is set to “restored”. [import]uid: 104645 topic_id: 20491 reply_id: 81260[/import]

As for number 3) I don’t do anything with the receipt, and my app was approved by Apple.
I only have one non-consumable though. It *might* be required for consumables or subscriptions… [import]uid: 70847 topic_id: 20491 reply_id: 81289[/import]

I have question regarding a similar situation about what you need to use and not need to use. When you use store.restore(), does it call transactionCallBack() for every product you have listed in the store for your app? and when you call it does it just call the transaction.state == “recovered” that many times if you have them all purchased? not clear how the calling works in the documentation. [import]uid: 149275 topic_id: 20491 reply_id: 113537[/import]

@mikeatmarvel Yes, you get a callback for every non-consumables restored.
[import]uid: 41124 topic_id: 20491 reply_id: 114974[/import]

So did I read correctly that store.restore() is not required?

Although, in my case I may need it:
I have 72 levels, you can download the app free but with only 6 levels playable. Pressing a BUY button will trigger an IAP, which will unlock the rest of the levels. If someone downloads the game, then buys the IAP, then deletes the game, then re-downloads it, at this point it looks like he will need a restore button if he wants the full game unlocked again…Is that correct thinking?

It would be nice for the user to re-download the game and for it to already know or to check if the IAP has been purchased, and to display or not display a restore button accordingly. But my peabrain can’t tell if that’s possible.

I have never seen a restore button in a game before, anyone know of a game I can try (preferably similar to my setup) that utilizes a restore button?

It sounds like people are having trouble with store.restore() not giving a callback if there is no purchase to restore…Trying to figure out what my options are: To forget about restore() [and possibly cause some rebooters to pay twice?], put a restore button [and possibly cause some users unresponsive app?], any other options?

Much thanks as always,
Dane
[import]uid: 117490 topic_id: 20491 reply_id: 115519[/import]

I re-read this thread; @Naomi, when you said

“Meanwhile, after a user buy a non-consumable item, if he/she tries to purchase the same item, IAP restores it and notifies the user that he/she already has it. This notification comes in the form of a native alert message.”

do you mean the user has deleted the app in between her double purchase, or not? Perhaps that does not matter? I am getting the feeling that store.restore()'s entire purpose is for restoring a bunch of purchases such as all of your “consumable” weapons etc. Whereas a one-off full game purchase can just be dealt with by the user pressing the download button again…?

Thanks again.
Dane [import]uid: 117490 topic_id: 20491 reply_id: 115520[/import]

@Dane,

FYI, I do use IAP for a simple one non-consumable item into my app.

I`ve never implemented a restore button at all until now. (am thinking about it as yet).

BTW, I do not see ANY problem with my IAP implementation as after 5 months with the app out there LIVE I`ve never seen any user problem as well (as paying twice for example).

What happens is that after the user buy it, if he deletes the app or even install the same app (via his same iTC account username/mail) into other iDevice, when clicking on the button of the IAP, it will connect with Apple servers and will come back with a simple message saying that “the user has already bought the product” and SO he is able to dowload it again for FREE without paying twice!

PS: BUT if he is logged into iTC with one another account, SO it will try to charge the user again because there isn`t the same account that he has bought the first time.

I see all it working as expected until now.

PS: Im only thinking about implementing a RESTORE button into my next apps update because I think it is easier for the USER visualize that with a RESTORE button he can just restore the purchase made before without think on “paying again”, just it.
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 20491 reply_id: 115537[/import]