Check Non Consumable

Hi, could anyone tell me what is the recommended method to check if a non-consumable object has been purchased? I use the following code but I encounter problems with some users

public bool CheckProductPurchased(string productId)
    {
        if (!IsInitialized())
        {             
            return false;
        }
        Product product = m_StoreController.products.WithID(productId);
        if (product != null && product.hasReceipt)
        {
            return true;
        }
        return false;
    }

You may want to go one step further and check to see if the receipt is valid.

Check out the following example in the documentation:

1 Like

Please elaborate on the problems some users see, does it work in your testing?

Most users find no problems. There are some users who, although they say they are connected and send us the order receipt on google play, don’t have the product unlocked but cannot even re-purchase it. I think the problem is that the purchase system does not initialize properly.

We have heard of this behavior also, and we are looking into it.

1 Like

is there no way to get around this?

Not at this time, we are looking into it.