5.0.1 -iOS :FetchPurchases not work in production environment

Hi,

I encountered a strange issue where I was using IAP 5.0.1 on iOS .

everything was normal in a sandbox environment. However, when I released it on the App Store, I purchased several non consumable items in the production environment and tried to retrieve them through fetchPurchases, but did not receive any information or error output. Here is my code

        controller = UnityIAPServices.StoreController();
        
        await controller.Connect();

        controller.OnStoreDisconnected += failure =>
        {
            Debug.Log("Store disconnected " + failure?.message);
        };
        controller.OnPurchasePending += OnPurchasePending;
        controller.OnProductsFetched += OnProductsFetched;
        controller.OnPurchasesFetched += OnPurchasesFetched;
        controller.OnPurchaseFailed += OnPurchaseFailed;
        controller.OnPurchaseConfirmed += OnPurchaseConfirmed;
        controller.OnCheckEntitlement += OnCheckEntitlement;
        controller.OnProductsFetchFailed += failed =>
        {
            Debug.Log("fetch product failed " + failed.FailureReason);
        };
        controller.OnPurchasesFetchFailed += failed =>
        {
            Debug.Log("fetch purchases failed " + failed.FailureReason);
        };
       .....
        controller.FetchProducts(initialProductsToFetch);
.....

private void OnProductsFetched(List<Product> products)
    {
        ....
        controller.FetchPurchases();
    }
private void OnPurchasesFetched(Orders orders)
    {
        Debug.Log("purchased fetched");
       } 

I got all the products with the call of FetchProducts, but nothing with FetchPurchases, event I wait this for more than 30 minutes.

Any suggestions?

Thanks in advance.

Hey @fandlr,

Do you have any device logs that might help us diagnose the issue further?

Problem sovled. It turns out that I tried to fetch an in-app-purchase product which was not submited for review. It is ok in sandbox, but not in production enviroment.