'Huawei IAP React Native

I am integrating Huawei in app payment module in my react native application, I have followed all the guidelines for setup. Every thing is going smooth but when i try to call a method it returns error.

HMSIapModule.isSandboxActivated()
       .then((isSandboxActivatedResult) => {
         console.log(JSON.stringify(isSandboxActivatedResult), 'result');
       })
       .catch((err) => {
         console.log(JSON.stringify(err), 'err');
       });

I have also implemented different methods of this module but it gives the same error every time. I have also searched for the status code of error in Huawei but it not giving any complete guideline to resolve it.

Error :{"statusCode":907135000,"isSuccess":"false"}



Solution 1:[1]

It is recommended that you follow this docs to check whether there are any omissions in the integration process.

Check the following items:

  1. Check whether app_id in the agconnect-services.json file is the same as that on the AGC, and whether the package name in the agconnect-services.json file is correct.

Check whether the agconnect-services.json configuration and the agconnect-services.json file are stored in a proper place. Note that the downloaded agconnect-services.json file should copy to the app directory.

enter image description here

  1. Check whether apply plugin:'com.huawei.agconnect' is added to build.gradle.

  2. Register the app product information on the AGC and have the APPID corresponding to the environment.

  3. Generating signature certificate Fingerprints.

The signing certificate fingerprint is used to verify the authenticity of an app. Before releasing an app, you must generate a signing certificate fingerprint locally based on the signing certificate and configure it in AppGallery Connect. Check whether the JKS certificate file is stored in the app level directory and whether the certificate signature in the app level build.gradle file is correct. Kindly follow this docs.

enter image description here

If the preceding information is correct but the issue persists, maybe caused by the HMS Core (APK) cache. You could try to uninstall and reinstall the HMS Core (APK), disconnect and reconnect to the device network, and restart the app. If the problem cannot be solved, please provide a detailed error log. (Logs can be uploaded by editing the question you asked.)


Error :{"statusCode":907135000,"isSuccess":"false"}

According to this docs, you are advised to check whether the input parameter is incorrect.

If it does not fix the issue, please provide more info, like your integration steps, detail logs, etc. :)

enter image description here

Solution 2:[2]

The error 907135000 indicates that there is a problem with the agconnect-services.json file. Make sure the agconnect-services.json file is downloaded and added correctly.

enter image description here

enter image description here

Please follow HMS IAP detailed guide to see if there is any minor thing missing? https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides-V1/integrating-sdk-0000001050726210-V1

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2