Huawei IAP - product list is empty in react native hms iap

168 Views Asked by At

I implemented react-native-hms-iap in my react native project. I configured all the details mentioned in here. Also I can assure that there is no signature issue because react-native-hms-account login with huawei id is working fine in my app.

I have configured 'subscription' product in Product Management. enter image description here

But this subscription product is not reflect in my react native app. I am getting empty AvailableProductList.

[Fri Sep 24 2021 18:22:25.188]  LOG      isEnvReady:Success
[Fri Sep 24 2021 18:22:27.192]  LOG      PurchasedRecordListView :: []
[Fri Sep 24 2021 18:22:27.323]  LOG      obtainOwnedPurchases success:: []
[Fri Sep 24 2021 18:22:27.568]  LOG      obtainOwnedPurchases success:: []
[Fri Sep 24 2021 18:22:27.572]  LOG      PurchasedRecordListView :: []
[Fri Sep 24 2021 18:22:27.652]  LOG      AvailableProductList :: {"status":{"hashCode":(hashcode),"describeContents":0,"isCanceled":false,"hasResolution":false,"isSuccess":true,"statusMessage":"success","isInterrupted":false,"statusCode":0,"errorString":"success"},"productInfoList":[],"errMsg":"success","returnCode":0}
[Fri Sep 24 2021 18:22:27.738]  LOG      AvailableProductList :: {"status":{"hashCode":(hashcode),"describeContents":0,"isCanceled":false,"hasResolution":false,"isSuccess":true,"statusMessage":"success","isInterrupted":false,"statusCode":0,"errorString":"success"},"productInfoList":[],"errMsg":"success","returnCode":0}
[Fri Sep 24 2021 18:22:27.804]  LOG      obtainOwnedPurchases success:: []
[Fri Sep 24 2021 18:22:27.855]  LOG      AvailableProductList :: {"status":{"hashCode":(hashcode),"describeContents":0,"isCanceled":false,"hasResolution":false,"isSuccess":true,"statusMessage":"success","isInterrupted":false,"statusCode":0,"errorString":"success"},"productInfoList":[],"errMsg":"success","returnCode":0}
[Fri Sep 24 2021 18:22:27.859]  LOG      PurchasedRecordListView :: []

enter image description here

What is the reason that available product list to be empty ? Is there a time period I should wait to reflect available products ?

Is there any signature should I define specifically for IAP rather than the one defined for Account ID ?

Thank you.

1

There are 1 best solutions below

0
On BEST ANSWER

Okay I have figured out the case. That was totally my mistake. I forgot to pass product sku to HMSIapModule.obtainOwnedPurchases() method. After I passed the product sku it is working well.