Huawei Mobile Services IAP Unable to make purchases -5 Core Error

189 views Asked by At

I have integrated HMS IAP, these are the dependencies:

classpath 'com.huawei.agconnect:agcp:1.2.1.301'

huaweiImplementation 'com.huawei.hms:ads-identifier:3.4.32.300'
huaweiImplementation 'com.huawei.hms:ads-lite:13.4.32.300'
huaweiImplementation 'com.huawei.hms:iap:5.0.1.300'
huaweiImplementation 'com.huawei.hms:hwid:4.0.4.300'

I have also downloaded and added agconnect-services.json

When I launch my app, I don't see my IAP products and my logcat shows:

2020-09-24 15:08:30 15575-15575/? V/UpgradePurchase: Unable to make purchases: -5: Core error

This is the check to see if the device isEnvReady, I do not see documentation with that error code. Can anyone let me know what -5 stands for? What should I change in my project?

Thank you.

1

There are 1 answers

0
wchw On

Looks like this is an issue with United States HUAWEI ID issue. I received official support that IAP is not supported in US. I changed my phone settings > login using a HAUWEI ID from a country that supports HMS IAP (like Germany) and I was able to see IAP interface.