After integrating the IAP in Unity Project, IAP is not initializing in the Repack APK but it is working in UDP APK.
I have used 2.2.2 version Unity Distribution Portal package for In App Purchase. While testing the app in UDP apk, it seems working well. After that, when we upload that apk to Unity dashboard for Repack, the IAP is not initializing(Means can able to see the welcome xxxx, after that nothing happened.)
https://assetstore.unity.com/packages/add-ons/services/billing/unity-distribution-portal-138507
The below code shows the clear picture.
private class InitListener : IInitListener
{
public void OnInitialized(UserInfo userInfo)
{
Debug.Log("[Game]On Initialized succeeded");
Show("Initialize succeeded. Start query inventory."); - It's calling till here.
StoreService.QueryInventory(MPurchaseListener);
_mInitialized = true;
}
public void OnInitializeFailed(string message)
{
Debug.Log("[Game]OnInitializeFailed: " + message);
Show("Initialize Failed: " + message);
}
}
Dependency list:
implementation 'com.huawei.hms:base:5.0.3.300'
implementation 'com.huawei.hms:hwid:5.2.0.300'
implementation 'com.huawei.hms:iap:5.0.4.301'
can any one suggest me to solve the issue. Thanks in advance!