Issues with Google IAP

Implementing Google IAP was a cinch since most of the code for Apple IAP could be used. Thanks Ancsa!

I’ve managed to get everything working on Android, however there are a few issues that might need to be addressed.

First, when calling store.restore(), I noticed that the transaction state returned in the callback when using Google is “purchased” and not “restored” as I had expected. Apple returns “restored”. Is this a bug or is it just how Google handles the transaction?

Secondly, there’s a scenario that isn’t handled when using restore with the Apple IAP as well.
If you call store.restore() using an AppleID that hasn’t purchased an IAP product, the callback function is never called. I would expect the callback to be called even if there are no products to be restored.
This scenario is very likely to happen when providing a Restore button in an app. Some users will try to restore even if they know they haven’t purchased an IAP product, and this needs to be handled by the app somehow.

Third, when and how is the “refunded” state returned for Google transactions?

Other than this, everything is working really well…
[import]uid: 70847 topic_id: 23202 reply_id: 323202[/import]

I’ll be readying the Android version of my app so I’ll see what I can find, thanks for sharing your experience.

Hopefully we can get some updated docs on this… A guide for Tutorial Tuesdays tomorrow would certainly be welcome as well. [import]uid: 87138 topic_id: 23202 reply_id: 92895[/import]

@ingemar and @Revaerie, I’ve implementing In-App Billing, and successfully completed the end-to-end purchase test using my own Product ID.

But I am seeing a problem with Refund process. Have you successfully refunded a test user (or live/production users for that matter), and were you able to revert the purchased product to un-purchased state?

Here’s what I did:

  1. Purchased an unmanaged product (which is equivalent to consumable item in iOS version);

  2. Purchase has completed and I got the product I bought.

  3. Went to the Google Checkout immediately after and cancelled the transaction (credit card was not charged yet.)

  4. An alert popped up over the game and let me know that the transaction was cancelled, but it didn’t really revert the purchase as far as the purchased item was concerned. I believe it is because cancellation process is handled differently between iOS IAP and Androide IAP (with iOS, the purchase transaction does not complete if I cancel the purchase (by not confirming the transaction) but with Android, it appears I’ll need to code the reverse purchase.)

  5. Next, I wanted to check the Refund process, so I again bought an unmanaged product, waited overnight, went to the Google Checkout, saw that the credit card was charged this time and transaction was completed.

  6. While on Google Checkout, I refunded the test user, and the test user was properly refunded (with a refund notification email sent to the test user.)

  7. I launched the game on test user’s Android phone, and checked to see if the game would process the Refund mechanism I implemented (i.e., reversing the purchase) – but nothing changed, which leads me to the very same question @ingemar asked: “when and how is the “refunded” state returned for Google transactions?”

Are we seeing a bug here?

Naomi
[import]uid: 67217 topic_id: 23202 reply_id: 101094[/import]

I don’t think that the refund state is active for android from my experience, unless there is a way to pull from the information from the merchant account to see what items have been purchased. After reading some info i noticed that the refunds are the responsibility of the developer to approve. Therefore it could be a week down the road when you refund so a refund callback during the purchase transaction is useless from what I’ve seen. Also with what i was reading, the restore function does not work with google so from the best that i can tell all we can do is allow people to buy. I really hope i’m wrong because I see some bad ratings coming when people go to uninstall and reinstall apps and they don’t get any of their purchased items back. [import]uid: 126161 topic_id: 23202 reply_id: 101110[/import]

Thank you for sharing your observation, @3 Dreams Gaming.

I just did a new set of testing, and here’s what I found:

  1. I generated a new build, uninstalled the previous build, installed the new build, launched the new build on Android phone, and then went ahead and purchased an unmanaged product.

  2. As soon as I successfully made the purchase, it popped up a REFUND alert! And… wow, it did revert the previously purchased item to un-purchased state, just like I wanted it to do (which, as a result, basically, cancelled the purchase I just made, because I bought the exact same un-managed product that I refunded for.) So, it looks like REFUND would work only if the user chooses to launch a purchase process again.

  3. I then went to Google Checkout and logged in as the merchant. It shows the latest purchase. I cancelled it (while I still had my game open on the Android phone) – and as soon as I cancelled the transaction, my game responded and removed the purchased item from the game (and as a result, it shows negative ownership of the unmanaged product, which is exactly what I expected it to do under this scenario.)

So, refund and cancellation both worked – but with a catch. It looks like, with the case of a refund that takes place some time later after the purchase takes place (which is definitely not immediately after the purchase), returning to the game alone won’t trigger the refund event. It only gets triggered after the user places an order again – which I suppose sends the accumulated transaction event responses from the Google Checkout. At least that’s what it seems like to me. I have a feeling that cancellation works the same way.

I haven’t tested this with managed products (and I do see that restore state is only applicable to iOS IAP as per the tutorial blog post), but I suppose we can work with this “catch” (although it’s not ideal user experience)…

Naomi

Edit: Is there a way for the game/app to trigger access to Google Checkout to see if some event responses are waiting to be handled by the game/app? If theres’s a way to do this, the “catch” I noted above won’t be a “catch” anymore. It would certainly make it more normal (or expected) experience for the users. [import]uid: 67217 topic_id: 23202 reply_id: 101128[/import]

I’m going to try it! Thanks for the great news! Miami personal injury lawyer is always ready to help you with legal needs especially with cases involving personal injuries & car accidents. [import]uid: 159781 topic_id: 23202 reply_id: 113269[/import]