Huawei Unity IAP Kit integration getting error code -1, error code 6004

Viewed 110

I have integrated Huawei IAP kit in unity and I have checked in sandbox testing, the payment is not getting failed and showing INVALID REQUEST.

I checked the logs and Huawei IAP showing error as -1. Also getting below log

17:26684 SourceFile:723] checkPermission, appID:*********, permission:com.huawei.android.hms.game.base, accountIndex:null, checkexpiredTimeFlag:1
17:26684 SourceFile:731] permission not exist
ce 20017:26684 SourceFile:457] Failed to check the permission, appID: *********, errorCode: 6004, permission: com.huawei.android.hms.game.base, checkExpiredTimeFlag: 1
1 Answers

By seeing your logs it seems CP have not applied required permissions from AGC.

6004 : API authentication: Permission not granted from HUAWEI Developers

For details , please refer below official link: https://developer.huawei.com/consumer/en/doc/development/HMSCore-References/error-code-0000001050045846

Below are the common preconditions in HMS which must be enabled from AGC to use this service:

  1. Huawei Account activated
  2. Merchant Account activated
  3. In App purchasing API enabled
  4. Once enabled above services ---->Add Products to AppGallery Connect.
Related