Problem description:

In the test of in-app payment, the payment interface could not be pulled up. The log report error is as follows:

We found in the document error code that this error means that the payment service switch is not open. After checking, the payment still cannot be made.

Problem analysis:

1. Confirm whether the payment service switch of the application has been turned on and whether the payment service parameters have been configured, as shown in the figure below:

2, Android Studio SDK integration: download agconnect-services.json file (download path refer to the following picture) and put it in the root directory of the application project:

Eclipse download access to the SDK: check the manifest in the configuration of APPID, CPID is correct.

The configuration format is as follows:

<meta-data android:name="com.huawei.hms.client.appid" <! -- The value "XXX" is replaced with the actual application ID of the application, derived from the application details. - -> android:value="appid=xxx"> </meta-data> <! The value "XXX" is replaced with the payment ID of the developer who actually applied, derived from the application's payment service information. --> <meta-data android:name="com.huawei.hms.client.cpid" android:value="cpid=xxx"> </meta-data>

3. After the above operation is confirmed, if the payment still cannot be made, it may be because of the cache problem, and there will be a one-hour delay time. It is suggested to wait for about one hour and then try again.

The original link: https://developer.huawei.com/… Author: Mayism