Codeless IAP Button not finding product ID
Hi all,
I have been trying to set up a consumable IAP purchase with Google Play using the Codeless IAP feature. I have set up a product in the IAP Catalog in Unity and given it an ID. I have made an IAP Button and given it this product ID from the generated list.
I have connected to Google Play and created a managed product with the same ID. The product says it is 'Active' in the Google Play Console.
I have published the app to an internal testing track and downloaded the app through the opt in URL. I downloaded to my phone through the Google Play Store.
The IAP button appears to respond to the tap but I don't see anything appear related to the IAP. I get this log from adb:
09-29 13:16:23.414 5174 5191 I Unity : IAPButton.PurchaseProduct() with product ID:
09-29 13:16:23.414 5174 5191 I Unity :
09-29 13:16:23.414 5174 5191 I Unity : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
09-29 13:16:23.414 5174 5191 I Unity :
09-29 13:16:23.414 5174 5191 W Unity : Unable to purchase unknown product with id: {0}:
09-29 13:16:23.414 5174 5191 W Unity :
09-29 13:16:23.414 5174 5191 W Unity : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
09-29 13:16:23.414 5174 5191 W Unity :
09-29 13:16:23.414 5174 5191 I Unity : Trying to purchase null Product
09-29 13:16:23.414 5174 5191 I Unity :
09-29 13:16:23.414 5174 5191 I Unity : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
09-29 13:16:23.414 5174 5191 I Unity :
Reading the logs, it seems the product ID is missing, but as far as I can tell, my IAP button is set up correctly, with the ID from the product catalog selected. I feel like there must be something very obvious I'm missing - why would my product ID not be being found?
The purchase "works" in the unity editor test environment: my success callback is called.
I'm using my developer account to test - as of a few days ago this is now a valid test account on Google Play.
Thanks for reading, please let me know if you need any more info!
Answer by MikeyPB · Sep 30, 2018 at 06:41 PM
Hi all, I solved the problem - hope this helps somebody.
Whilst trying to solve this problem I updated unity. This issue was apparent in 2017.3 and it remained in 2018.2
However, reimporting all assets in 2018.2 solved the problem. This is in addition to the automatic reimport that happens when loading the new version for the first time: I had to manually trigger the reimport in Unity.
Your answer
Follow this Question
Related Questions
Privacy policy for google play 1 Answer
Retrieving a list of available in app products from google store 0 Answers
Unity's IAP Security alert google play 0 Answers
Mark in app product as obtained 0 Answers