Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

IsOwned returning TRUE for previously owned product.

Discussion in 'Unity IAP' started by paulogodinhoaq, Jun 26, 2020.

  1. paulogodinhoaq

    paulogodinhoaq

    Joined:
    Aug 22, 2018
    Posts:
    5
    Hi, we dropped relying on ProcessPurchase to restore user NonConsumables, and instead are checking against products with IsOwned every time the application is opened.

    This solves two issues:
    - Users having to re-install multiple times the app in case ProcessPurchase was not called when reinstalling
    - Allows for the revocation of NonConsumables, mainly due to refunding.

    This workflow seems to work without problems but there is a small bug that happens for a user that had previously owned a product, had it revoked and is now buying again.

    - The user buys the full version of the game.
    - Plays for a while.
    - Get product revoked using the Google Play Console.
    - No longer able to play the full version of the game.
    - User tap BUY button inside the game
    - Google purchase overlay appears
    - User closes the game
    - User opens the game
    - He has full version, IsOwned is returning TRUE

    If you close the game again and reopen, IsOwned will return FALSE, but it can be exploited by hitting buy, closing the game, and entering Airplane Mode to keep the cached variable inside the game TRUE forever. It can also be exploited by simply hitting buy, closing, and reopening, to enjoy the free full game experience whenever you want.

    It is important that this only happens to a user that had previously owned a product and had it revoked.

    Thank you.
     
    DRACHEVSKY likes this.
  2. lowLevell

    lowLevell

    Joined:
    Nov 22, 2013
    Posts:
    27
    What is the IAP version?
     
  3. paulogodinhoaq

    paulogodinhoaq

    Joined:
    Aug 22, 2018
    Posts:
    5
    1.23.2
     
  4. lowLevell

    lowLevell

    Joined:
    Nov 22, 2013
    Posts:
    27
    paulogodinhoaq likes this.
  5. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    You would use ProcessPurchase for Restore, this is a store requirement. 1.23.2 has issues however, as mentioned.