Search Unity

Consumable plus Non Consumable as bonus - Best Approach

Discussion in 'Unity IAP' started by Jbs_GameZone, Jan 27, 2020.

  1. Jbs_GameZone

    Jbs_GameZone

    Joined:
    Dec 14, 2018
    Posts:
    118
    Hello everyone,

    I'm new to IAP and been browsing the forum and manuals for the last days but didn't find a clear answer or implementation example for my need.
    I have many bundles that mix consumables with non consumables but the simplest example is to allow the user to buy different amounts of coins, and if he buys enough of them than he will be rewarded with no ads :
    IAP_1.png

    How should I model / define my IAP products ? The main issue I consider is proper restoration.

    NO_ADS can be bought individually in the game as a non_consumable product, but I don't want to trigger 2 purchases (needing 2 user confirmations) when the user buys a large coin amount.
    I can't set the entire coin pack + ads as a non_consumable either since that will now allow the user to perform a second purchase for that non_consumable product.

    My idea so far is this :
    1) For every coin + no_ads bundle create a non_consumable product that is duplicated by a consumable one :
    2000CoinsPlusNoAds (non_consumable)
    4500CoinsPlusNoAds (non_consumable)
    7500CoinsPlusNoAds (non_consumable)
    2000Coins (consumable)
    4500Coins (consumable)
    7500Coins (consumable)

    2) At first (if ads are still visible) than all coin+no_ads buy buttons should target the purchase of non_consumable products.
    3) After a non_consumable purchase has been perform (&ads are no longer visible) than all buttons should target the purchase of consumable products (coins only).
    4) Distinguish between user purchase of non_consumables and restoration since one will grant the users the coins and the other won't :
    4.1) On Apple is straight fwd since it is user triggered (a check if the callback has arrived right after the user pressed restore button).
    4.2) On Google I'll use this recommendation https://forum.unity.com/threads/solved-android-auto-restore-vs-normal-purchase.432253/

    I afraid of over complicating things, so if anyone has a better recommendation please share it, I'm sure this is fairly common feature seen in other games as well.

    Thanks,
    Jbs
     
    hankRLG likes this.