Search Unity

[Solved] Question: will the system initialize if some product IDs are not registered on the store

Discussion in 'Unity IAP' started by Qdot543, Mar 16, 2017.

Thread Status:
Not open for further replies.
  1. Qdot543

    Qdot543

    Joined:
    Mar 9, 2014
    Posts:
    30
    Hello.

    On our project we have begun looking into the IAP system.
    I have a simple question regarding how the system may behave that I would like to ask before going into implementing it.

    if you provide the IAP configuration builder with a product ID that has not been registered on the store side (Apple App Store, Google Play Store), will the entire initialization fail, or will it omit invalid products from the IStoreController's product list

    the reason we want to do this is because our in app purchases will be updated with items dynamically from a database. I am aware that individual products must be registered on the store first. This isnt really an issue for us. As a workaround, I was thinking of only showing products on the app that have a corresponding valid ID on the store side. That allows us to add the item information to the database on our side, and then we register the id on the app store when we want it to go live, allowing our users to use the app unhindered, while we prepare the content.

    However, as I'm reading through the documentation, I'm not certain how that would be handled.
    Would the IAP system return a failed initialization because one product id is not valid on the store side
    Or, will that one invalid product id be omitted from IStoreController product collection.

    Thank you to those whom reply.
     
  2. Qdot543

    Qdot543

    Joined:
    Mar 9, 2014
    Posts:
    30
    Just to clarify

    The store (apple, google, tenzin, etc) needs each individual in app purchase to be registered before the in app purchase can go live.

    when the IAP is initialized, its given a list of product IDs via the configuration builder, which needs to match the IDs on the store. What I'm asking, is what happens during the initialization process, if one of those IDs is not registered on the app store.

    for instance
    the following IDs are registered on the apple store

    com.company.app.weaponUpgradeA
    com.company.app.weaponUpgradeB

    but when the IAP system is initialized, it is passed the following

    com.company.app.weaponUpgradeA
    com.company.app.weaponUpgradeB
    com.company.app.weaponUpgradeC

    Weapon Upgrade C is not yet registered on the apple store. But the code base will be initializing the system with com.company.app.weaponUpgradeC.

    My question is will OnInitializedFailed be called or will OnInitialized be called with the IStoreController product list not containing the invalid product com.company.app.weaponUpgradeC as it was not registered on the store.

    and obviously this is a bumb post.
     
  3. JayR

    JayR

    Joined:
    Aug 2, 2016
    Posts:
    84
    Hi,

    As long as at least one item is available for purchase on a given store then initialization should succeed. You can then use your IStoreController to confirm which products are actually available prior to attempting a purchase.
     
Thread Status:
Not open for further replies.