0

I have integrated the Huawei IAP SDK 4.0.4.300 ,But I always fail to launch HUAWEI In-App Purchases (IAP).When a payment request is initialized, the payment page is not displayed. And I have checked Common Products (Consumables/Non-Consumables) has been activated. Can you help me about this issue, thank you very much.

Nithin
  • 932
  • 7
  • 14
  • Do you have log file for the error to share? – Zinna Feb 13 '21 at 05:56
  • You can rectify the fault based on the this [docs](https://developer.huawei.com/consumer/en/doc/development/HMSCore-References-V5/client-error-code-0000001050746111-V5?ha_source=hms1). And if the issue is still not rectified, pls provide specific logs for us to rectify it. :) – zhangxaochen Feb 18 '21 at 03:59

1 Answers1

0

There could be various reasons to cause this IAP problem. First :

• Check the result code returned by the HMS Core SDK, and perform a check by referring to the official documentation. • Capture all app logs and search for the keyword hms_pay to locate the fault.

And then check the following areas:

  1. Login HW AppGallery Connect and check if the IAP product is activated: You can create consumables, non-consumables, and subscriptions in AppGallery Connect. When you create a product in AppGallery Connect, the product is not activated by default. A user cannot pay for a product that is not activated. enter image description here

  2. Also check the Product ID set in HW AppGallery Connect and the Product ID set in your code and make sure they match each other: The ID of the product to be paid needs to be passed in the createPurchaseIntent API. If the product ID has not been configured in AppGallery Connect or if they don’t match the productID in your code, no ID will be passed and IAP, therefore, cannot be launched. enter image description here

enter image description here

  1. Check all the settings for IAP product Items, make sure they are all in place: e.g. prices, if there are multi-languages, make sure you set up for all languages

enter image description here

  1. Some error return codes and log examples for your reference:

    • Result code: 60003 (indicating incorrect product information)

    • Search for the keyword hms_pay. The following log information will be found:

2020-09-30 14:48:52.850 21970-17650/? E/hms_pay: hms_pay
[Network-Request]parse createOrder, responseCode = 6, subErrCode = 214, responseMessage = Product info cannot be found. 2020-09-30 14:48:52.850 21970-17650/? I/hms_pay: hms_pay baseBiz result:: get result Success 2020-09-30 14:48:52.850 21970-17650/? I/hms_pay: hms_pay createOrder onResponse responseCode:6,responseMessage:Product info cannot be found. 2020-09-30 14:48:52.851 21970-17650/? E/hms_pay: hms_pay
createOrder fail, returnCode: 6

Subscriptions Not Activated

•   Result code: -1 (indicating common failure)
•    Search for the keyword hms_pay. The following log information will be found:

2020-09-30 15:20:38.940 21970-22803/? E/hms_pay: hms_pay    [Network-Request]parse createOrder, responseCode = 6, subErrCode = 221, responseMessage = product status must 0(online)
2020-09-30 15:20:38.940 21970-22803/? I/hms_pay: hms_pay    baseBiz result:: get result Success
2020-09-30 15:20:38.943 21970-22803/? I/hms_pay: hms_pay    getCurrentTime error, content is inValid
2020-09-30 15:20:38.945 21970-22803/? I/hms_pay: hms_pay    no InAppPurchaseData
2020-09-30 15:20:38.946 21970-22803/? E/hms_pay: hms_pay    SubscribeRequestInterceptor createOrder, errorCode: 6
Zinna
  • 1,947
  • 2
  • 5
  • 20