GooglePlay gives error(invalidClient) for "You already own this item" scenario - how to handle?

Background:  I have Google Play IAP working fine for managed & un-managed products.  Can purchase a managed item, delete the app, reinstall the app, and then use the “restore” approach to retrieve them an update the game.

Problem Scenario: If you delete/redownload the app and go to the normal purchase button for the managed item the user gets the google play dialog box “Error - You already own this item”.  Then Corona provides back an error with error Type of “invalidClient”, and no errorString.    

With Apple I note in the above case the app store would have just given your a “purchase” back and your app could just proceed to re-instate the non-consumable as it’s just another purchase, albeit one the customer didn’t have to pay again for.

Issue: How do I handle this scenario for Google?  What do people do here:

a) Identify it as already owned & add back in app, but:

  • How can one identify this is the case with the errorType=“invalidClient”, errorString="" response however?

  • That is versus other errors?  

  • I note in the Google v3 API it has a server response code of BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED available…, but until Corona supports v3 is there a work around way to check?  

b) Always have for every errored response, “your error may have been due to you already owning the item, in which case go to the application options page and hit the Restore Purchases button”…  obviously not a good option but is this the only one available?

We are working on V3, but I don’t know when it will be released.

Is there a reason you can’t detect the presence of a first run of the app and if so call store.restore(). I know Apple wants people to have a “Restore Purchases” button, which you could also do.

Rob

ok Rob - I could probably do this in the meantime (now that I already have the restore button implemented)…

We are working on V3, but I don’t know when it will be released.

Is there a reason you can’t detect the presence of a first run of the app and if so call store.restore(). I know Apple wants people to have a “Restore Purchases” button, which you could also do.

Rob

ok Rob - I could probably do this in the meantime (now that I already have the restore button implemented)…