I tried to add IAP but faced a problem on initialization.
Code almost same as here Unity IAP - Unity Learn
Just deleted all but one managed product.
First thing that confusing is ProductType Consumable, NonConsumable and Subscription. Now there are only Managed and Subscription in Google play.
My product is Managed, so I selected NonConsumable (I’m not going to consume it).
Here is logs:
11-02 21:17:23.703 7935-23630/? I/UnityIAP: Starting in-app billing setup.
11-02 21:17:23.709 7935-7935/? I/UnityIAP: Billing service connected.
11-02 21:17:23.715 7935-23986/? I/UnityIAP: invoking callback
11-02 21:17:23.715 7935-23986/? I/UnityIAP: Checking for in-app billing 3 support.
11-02 21:17:23.728 7935-23986/? I/UnityIAP: In-app billing version 3 supported for package_name
11-02 21:17:23.739 7935-23986/? I/UnityIAP: Subscriptions AVAILABLE.
11-02 21:17:23.748 7935-23986/? I/UnityIAP: Subscription upgrade and downgrade are AVAILABLE.
11-02 21:17:23.763 7935-23986/? I/UnityIAP: Subscriptions information parse AVAILABLE.
11-02 21:17:23.771 7935-23986/? I/UnityIAP: VR supported.
11-02 21:17:23.772 7935-23986/? I/UnityIAP: onIabSetupFinished: 0
11-02 21:17:23.772 7935-23986/? I/UnityIAP: Requesting 1 products
11-02 21:17:23.772 7935-23986/? I/UnityIAP: QueryInventory: 1
11-02 21:17:23.772 7935-23986/? I/UnityIAP: invoking callback
11-02 21:17:23.772 7935-23986/? I/UnityIAP: Querying owned items, item type: inapp
11-02 21:17:23.772 7935-23986/? I/UnityIAP: Package name: package_name
11-02 21:17:23.772 7935-23986/? I/UnityIAP: Calling getPurchases with continuation token: null
11-02 21:17:23.784 7935-23986/? I/UnityIAP: Owned items response: 0
11-02 21:17:23.784 7935-23986/? I/UnityIAP: Continuation token: null
11-02 21:17:23.784 7935-23986/? I/UnityIAP: Querying SKU details.
11-02 21:17:24.238 7935-23986/? I/UnityIAP: Querying owned items, item type: subs
11-02 21:17:24.238 7935-23986/? I/UnityIAP: Package name: package_name
11-02 21:17:24.238 7935-23986/? I/UnityIAP: Calling getPurchases with continuation token: null
11-02 21:17:24.253 7935-23986/? I/UnityIAP: Owned items response: 0
11-02 21:17:24.253 7935-23986/? I/UnityIAP: Continuation token: null
11-02 21:17:24.253 7935-23986/? I/UnityIAP: Querying SKU details.
11-02 21:17:24.415 7935-23846/? I/UnityAds: com.unity3d.ads.api.Sdk.logInfo() (line:70) :: AdPlan received with 1 campaigns and refreshDelay 3600
11-02 21:17:24.481 7935-23986/? I/UnityIAP: Querying owned items’ purchase history, item type: subs
11-02 21:17:24.481 7935-23986/? I/UnityIAP: Package name: package_name
11-02 21:17:24.481 7935-23986/? I/UnityIAP: Calling getPurchaseHistory with continuation token: null
11-02 21:17:24.746 7935-23986/? I/UnityIAP: Purchase history response: 0
11-02 21:17:24.746 7935-23986/? I/UnityIAP: Continuation token: null
11-02 21:17:24.746 7935-23986/? I/UnityIAP: onQueryInventoryFinished: true
11-02 21:17:24.746 7935-23986/? I/UnityIAP: Inventory refresh successful. (response: 0:OK)
11-02 21:17:24.746 7935-23986/? I/UnityIAP: The number of owned skus is0
11-02 21:17:24.746 7935-23986/? I/UnityIAP: The number of purchased skus is0
11-02 21:17:24.746 7935-23986/? I/UnityIAP: The number of subscriptions purchased history is0
11-02 21:17:24.766 7935-23630/? W/Unity: Unavailable product package_name.disable_ads -package_name.disable_ads
Game downloaded from Google Play store via internal test, product created and active.
Nothing shows on trying to buy.
Also I’ve tried to use android.test.purchase id – same result.
What is going wrong?
