Search Unity

Android IAP problem

Discussion in 'Unity IAP' started by AlexNagorny, Jun 9, 2019.

  1. AlexNagorny

    AlexNagorny

    Joined:
    Apr 22, 2015
    Posts:
    4
    Hi!
    On iOS IAP works fine, on released version i can make a success purchase, but on Android i have a problem. Nothing happen after m_StoreController.InitiatePurchase(product);
    In Previous game build i use Codeless IAP and on Android works fine, but in Unity 2019 have some problem with Codless IAP Button on iOS, now i use code to add product and initiate purchase and all works fine but not on Android.
    The system of communicating vessels?
    - i see metadata from store (price)
    - debug log give me a product is not null and product available
    - after m_StoreController.InitiatePurchase(product) nothing happen
    - same code works fine on iOS
     
    Last edited: Jun 9, 2019
  2. AlexNagorny

    AlexNagorny

    Joined:
    Apr 22, 2015
    Posts:
    4
    Log:

    E/Unity (23836): Exception: Error: called non-existent method System.Boolean UnityEngine.VR.VRSettings::get_enabled()
    E/Unity (23836): at UnityEngine.VR.VRSettings.get_enabled () [0x00000] in <00000000000000000000000000000000>:0
    E/Unity (23836): at UnityEngine.Purchasing.GooglePlayAndroidJavaStore.Purchase (System.String productJSON, System.String developerPayload) [0x00000] in <00000000000000000000000000000000>:0
    E/Unity (23836): at UnityEngine.Purchasing.JSONStore.Purchase (UnityEngine.Purchasing.ProductDefinition product, System.String developerPayload) [0x00000] in <00000000000000000000000000000000>:0
    E/Unity (23836): at UnityEngine.Purchasing.PurchasingManager.InitiatePurchase (UnityEngine.Purchasing.Product product, System.String developerPayload) [0x00000] in <00000000000000000000000000000000>:0
    E/Unity (23836): at MyIAPManager.BuyProductID (System.String productId) [0x00000] in <00000000000000000000000000000000>:0
    E/Unity (23836): at realItem.BuyItem () [0x00000] in <00000000000000000000000000000000>:0
    E/Unity (23836): at UnityEngine.Events.UnityAction.Invoke () [0x00000] in <00000000000000000000000000000000>:0
     
  3. icebear007

    icebear007

    Joined:
    Jun 8, 2016
    Posts:
    67
  4. AlexNagorny

    AlexNagorny

    Joined:
    Apr 22, 2015
    Posts:
    4
unityunity