My game can not find any IAP productID even I already add them in Google Play Console

Hi Unity Techinicals

My game can not find my product IDs even I already created them on Google Play Console.

I post some pictures bellow, please help to check why the IAP not working


I have already activated play game platform

I use Unity IAP package
8684388--1171008--upload_2022-12-24_9-36-15.png
and enable it

When I click buy button, it has an no reference error.

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

@John_Corbett , @Yannick_D , @JeffDUnity3D , anyone please help on this issue.

Hello,

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



8707368--1176204--upload_2023-1-5_21-37-40.png

8707368--1176204--upload_2023-1-5_21-37-40.png

This is how I code buying a product
8707374--1176213--upload_2023-1-5_21-40-4.png

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

Hello @Yannick_D
My account is in the testing list and it is in the account in my Play Store in my mobile phone.

Please take a look at the attached pictures.





@Yannick_D
More pictures



Thank you for the screenshots!

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?

Hi @Yannick_D

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



8752000--1185883--upload_2023-1-24_8-7-30.png

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.

  1. Try adding a trace to see what your 5 product IDs are before Initialize is called:
public void InitializePurchasing()
{
    var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
    builder.AddProduct(food, ProductType.Consumable);
    builder.AddProduct(meat, ProductType.Consumable);
    builder.AddProduct(med, ProductType.Consumable);
    builder.AddProduct(weapon, ProductType.Consumable);
    builder.AddProduct(all, ProductType.Consumable);
  
    Debug.Log($"Products: {food} {meat} {med} {weapon} {all}");
    UnityPurchasing.Initialize(this, builder);
}
  1. Try replacing the variables with the correct string to see if the problem is the variables or if it’s something else:
public void InitializePurchasing()
{
    var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
    builder.AddProduct("org.game4everyone.rattunnelrevolution.meat", ProductType.Consumable);
    builder.AddProduct("org.game4everyone.rattunnelrevolution.food", ProductType.Consumable);
    builder.AddProduct("org.game4everyone.rattunnelrevolution.medicine", ProductType.Consumable);
    builder.AddProduct("org.game4everyone.rattunnelrevolution.weapon", ProductType.Consumable);
    builder.AddProduct("org.game4everyone.rattunnelrevolution.all", ProductType.Consumable);

    UnityPurchasing.Initialize(this, builder);
}

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