IAP integration was pretty smooth and easy, but there is one corner case I’m stuck on.
In the Google Play Developer Console, products can be Active or Inactive. I’m trying to protect my code against the situation where I decide to deactivate a product from within Google Play and no longer want it to be purchasable in the app.
When I disable the product, .availableToPurchase still returns true, and it isn’t until I call .InitiatePurchase that it gives bad behavior. When that gets called, Google pops up a dialog that says “Authentication is required. You need to sign into your Google Account.”
Is there any way to detect that a product is Inactive in Google Play before you would make a call to .InitiatePurchase? Obviously from a UX perspective, I’d like to just remove that product from my in-game store if it detects that it is Inactive in Google. Obviously I can setup another server side service that keeps track of this for me, but that then requires me to keep that service in-sync with Google. Ideally there would just be a way in Unity IAP to query this information.
Thanks for the help.