I have in-app billing active in my game and everything works great with my test accounts, i can purchase, the purchased content works as expected, the canceled or failed callbacks work fine but my questions are with the other features of in app billing. I’m sure these questions have been asked before but i cant seem to find a clear answer. First, how do I handle refunds and removing the refunded content, since the refunds have to be approved by the developer(me) they are not in any way instant so i cannot receive a refund callback from the google play store so i have no way of telling the app that it has been refunded and to remove content. Secondly, since restore is not supported on android then how should i go about restoring someones purchased products if they happen to get a new phone or uninstall/reinstall or am i just outta luck on this aspect? Thanks in advance for any help. [import]uid: 126161 topic_id: 24874 reply_id: 324874[/import]
Any suggestions on this, i would consider this to be a pretty big problem if i cannot handle refunds and restores. [import]uid: 126161 topic_id: 24874 reply_id: 101407[/import]
Well i had the question about refunds answered in a different thread. But there is still the serious question of what to do to restore the paid content on an android device if someone has to get a new phone or uninstalls/reinstalls. Any suggestions would be greatly appreciated. [import]uid: 126161 topic_id: 24874 reply_id: 102325[/import]
The [lua]store.restore()[/lua] function will fetch all purchased content from the Android Marketplace (and iTunes on iOS). It was designed for exactly the scenario that you’ve mentioned, when a user migrates to a new Android device and wants to retrieve all content purchased on another device.
Please see the following API documentation for more details…
http://developer.anscamobile.com/reference/index/storerestore
Calling this function will cause your transaction callback to be called for every purchase made. So, expect it to be called multiple times in one shot. You would normally handle the restored transactions just like how you would handle purchases. Just unlock the content and call [lua] store.finishTransaction()[/lua] on them. The one major difference compared to Apple restores is that Android does not different between a restored transaction or a purchase transaction… so restored transactions will have a [lua]event.transaction.state[/lua] of “purchased” instead of “restored”.
I hope this helps! [import]uid: 32256 topic_id: 24874 reply_id: 102934[/import]
Thanks for the information Joshua, I checked that API but it didn’t say it supported android under the supported platforms and when i was reading the how to blog it said that android will never reach the “restored” state. I misunderstood, I didn’t realize that it would get a purchased state back. I appreciate you clearing this up for me and that was my biggest concern Thanks for your help! [import]uid: 126161 topic_id: 24874 reply_id: 103033[/import]
Sorry about the confusion. Yeah, it’s just the state that won’t be flagged as “restored”. And our API documentation is in a transition state where we’re about to switch over to something completely new. We’ll get it sorted out.
And sorry about the late response. We don’t always notice forum questions since they get lost in a sea of other forum posts. Although our forums is great to get free community support. We tend to notice the more lively threads and jump on those.
For faster response times, I recommend that you contact our tech-support group. If it is a bug, then just click the “Report a Bug” link at the top of the web page. For other support related questions or feature requests, you can go to the following web page…
http://developer.anscamobile.com/forms/support [import]uid: 32256 topic_id: 24874 reply_id: 103134[/import]
Thanks again Joshua, you have been a big help with this. I don’t mind the wait, besides when I or others ask questions here, it might help countless others with the same questions. [import]uid: 126161 topic_id: 24874 reply_id: 103176[/import]
Ah, this clears up so much! Nowhere in the documentation did I see anything about checking event.transaction.state. I was just like 3Dreams and called store.purchase all the time because how I read the tutorial it said not to differentiate between restore/purchase.
The tutorial should be updated, as well as the documentation. [import]uid: 84258 topic_id: 24874 reply_id: 103378[/import]