I would like to add one thing. I changed the all product ID to lower case already. For example org.Game4Everyone.RatTunnelRevolution to org.game4everyone.rattunnelrevolution
why the game is still searching for the uppercase product ID when the fact is that I ve already changed it to lowercase?
a mi me sucedio que tampoco encontraba nada y lo que hize fue subir la aplicacion a Google Console como una aplicacion de Prueba interna para que estuviera disponoble en Google Play y de alli la descargue e instale en mi celular y funciono. Y asi es como le hago cuando quiero hacer las pruebas.
ya que si solamnete lo instalo en el celular cuando quiero comprar me aparece el cartel de “Este producto no esta disponible”
pero si la aplicacion la paso como Prueba Interna para que este en la Playstore y la instalo desde alli. Cuando le doy comprar me aparece ahora si poder hacer la compra con mi tarjeta de credito
Thanks for your experience sharing. I tried to upload my game to internal test as well and test, but it still does not work. The IAP product id still unavailable
Based on the “Unavailable product” message, both the product id and the store specific product id are still not in lower case.
If you are using codeless, double check in your catalog that the store specific id is in lower case.
If you are using coded, make sure that your calls to AddProduct uses the lower case name.
If this doesn’t work, could you provide a screenshot and/or the code adding the products?
Also, have you published your app into a new closed testing track on the Google Play Console?
If not, follow these steps:
Hello Yannick. THanks for your answer.
I used coded version and I did change the uppercase to lowercase. I dont use catalog.
Indeed, I did not test the IAP in closed test.
Here are screenshot of the code
The code looks good, so this seems to be an issue between your app and the Google Play Store.
Based on the error “NoProductsAvailable”, it seems the Google Play Store is not returning any products.
You will have to add a closed testing track if you want to test it, follow these instructions and it should work:
Hi @Yannick_D
I have uploaded the latest game to a closed testing track, but the IAP is still not working.
I initialize Unity Game services right at the time the game is launched as follows. Please check if there is anything not OK.
void Awake()
{
Initialize(OnSuccess, OnError);
}
void Initialize(Action onSuccess, Action onError)
{
try
{
var options = new InitializationOptions().SetEnvironmentName(k_Environment);
UnityServices.InitializeAsync(options).ContinueWith(task => onSuccess());
}
catch (Exception exception)
{
onError(exception.Message);
}
}
void OnSuccess()
{
var text = “Congratulations!\nUnity Gaming Services has been successfully initialized.”;
informationText.text = text;
Debug.Log(text);
}
void OnError(string message)
{
var text = $“Unity Gaming Services failed to initialize with error: {message}.”;
informationText.text = text;
Debug.LogError(text);
}
private void Start()
{
a = true;
if (UnityServices.State == ServicesInitializationState.Uninitialized)
{
var text =
“Error: Unity Gaming Services not initialized.\n” +
"To initialize Unity Gaming Services, open the file "InitializeGamingServices.cs" " +
“and uncomment the line "Initialize(OnSuccess, OnError);" in the "Awake" method.”;
informationText.text = text;
Debug.LogError(text);
}
//InitializeSdk();
//DontDestroyOnLoad(GameObject.Find(“Yodo1AdCanvas”));
}
The script seems good and even if that didn’t work, IAP still functions without this, so that wouldn’t be the issue.
Have you also added your account to the License Testing and validated on your device’s Google Play Store that it is the same account logged on?
If that still doesn’t work, could you post the following:
-Screenshot of your Google Play Console products where the full Product ID is visible
-Screenshot of one product details (View in-app product on the Google Play Console)
-Unity log with the warnings for each Unavailable product
From what I can see, the problem is the name mismatch between the Google Play Store and IAP.
On the Google Play Store, the product IDs are in lower case (org.game4everyone.rattunnelrevolution.meat), but on the IAP side, some characters are in upper case (org.Game4everyone.RatTunnelRevolution.meat).
These have to match, otherwise IAP cannot associate the products with the ones returned from the Google Play Store.
Hi @Yannick_D
Actually, I did change the IDs to all lower cases months ago. Till now, the mismatch is still there. It seems Google Play did not accept the change.
As far as I know, the uppercase is not allowed by Google Play.
Can you please check further?
In your screenshot “IAP 2.png”, the “Unavailable product” warning still has upper case characters in the product ids.
These are product IDs on the IAP side, so it seems there might be something changing your product IDs or the code above isn’t being executed properly.
Are your strings correctly named when calling the UnityPurchasing.Initialize?
Do you have any catalogs that could also be adding products (Codeless IAP Catalog with the “Automatically initialize UnityPurchasing” or a call to SetCatalogProvider)?
I can’t see it in the screenshot, but do you still have the “NoProductsAvailable” message?
Thanks a lot for your reply. Yes, I still have the no product available messages.
I execute the UnityPurchasing.Initialize at the start . Furthermore, I deleted all items in IAP catalog.
I did not find any Initialize Unity Purchasing or set catalog provider. I think it is in previous version.
I am using Unity 2022.1.20f1
The “Automatically initialize UnityPurchasing” can only be active if you have products in the catalog, so this is disabled in your case which is good.
At this point, I would suggest adding some traces to validate that your product IDs are correct. Since your products are Serializable (via HideInInspector), they might be modified elsewhere in your project.
Try adding a trace to see what your 5 product IDs are before Initialize is called:
Hi @Yannick_D
I tried all this but they are both not working. What I do is that, I change the names of the variables, and now it is matching with the product id on Google Play. Do you know why it is happening?
Now, I tested the IAP offline, it seems working. I have just uploaded the game to Google Play and wait for review