IAP Codeless restore problem

I’m having some troubles in implementing IAP codeless restore.

I have added 2 IAP buttons in 2 different scenes for non consumables products, I can buy them (already tested live in alpha closed group), problems come when I unistall/reinstall the app and I try to restore my previous purchases.
I’m using UnityIAP version 1.22.0 and playerPrefs to save the product settings.
Once a user buy the “No Ads” option the relative IAP button are disabled and Ads disappear, this should happen again when I reinstall my app, but it doesn’t.

My questions are:

  1. I’ve understood that I have to implement 2 IAP listener and check if user have already payed for the products but for some reason it doesn’t work, am I missing something?

  2. Should I add a listener for each scene where IAP buttons are present, or should I use a single listener at the app start up?

  3. In IAP listener should I retrieve product ID or similar in order to enable the purchases or this should be automatic?

Below the implementation of a listener:

4710968--445202--IAP Listener.png

At the moment, as you can see below, in AcquistiMain.ListenerAcquistoCompletato(Product product) there is only a function that log the call To IAP Listener, Set PlayerPrefs Settings and refresh the scene.

    public void ListenerAcquistoCompletato(Product product)
    {
        Debug.Log("IAPListener OK");
        PlayerPrefs.SetInt("noAds", 1);
        SceneManager.LoadScene(SceneManager.GetActiveScene().name);
    }

Thanks in advance to everybody for you suggestions and your patience.

Have a nice day

Riccardo

You only want one listener launched at startup, and make it a singleton. But since you are beginning to customize your app, I would highly recommend not using codeless and go the scripted route instead. Use the template here: Sample IAP Project

Jeff,

Thanks so much for your reply, I’ll check it out in the next days.

Riccardo