Location>code7788 >text

【FAQ】HarmonyOS SDK closed source open capability — IAP Kit (6)

Popularity:984 ℃/2025-04-15 10:59:44

1. Problem description:

In the payment scenario, it is that all products can run normally in the sandbox situation, but in the non-sandbox situation, online purchase annual package of 1,800 yuan will be paid for Huawei. After entering the password, an internal error will be reported.

Solution:

The reason for the error is that the payment limit is 1,000, which has exceeded the limit.

2. Problem description:

What is the entrance for users to initiate refunds in their mobile phone application market and system settings?

Solution:

Specific operation portal: In the settings -> account -> payment and bill -> order details, only the game is available.

For non-game apps expected to be available in November, please be patient.

3. Problem description:

Both the application and the meta service are connected to the IAP capabilities. The user pays to purchase a member in the meta service, and then downloads the application. How to be a member in the application without repeated purchases?

Solution:

The application and metaservice sharing status: the silent login interface obtains code and unionId; the background login is based on code authorization, and the session information is associated with unionId; the metaservice and application can get the same session information.

4. Problem description:

/consumer/cn/doc/harmonyos-references-V5/iap-jwt-description-V5 official code, official certificate, running code error reported : invalid key format

Solution:

During the development process of HarmonyOS, when encountering the certificate resolution error ": invalid key format", the possible causes and solutions are as follows:

Possible Causes

1. Certificate file format error: There may be format problems with the certificate file, resulting in parsing failure.

2. The certificate chain is incomplete or invalid: A certificate in the certificate chain may be missing or expired, resulting in parsing failure.

3. Keystore password error: If the keystore (p12) file is used, the wrong password will cause the parsing to fail.

Solution

1. Check the certificate file:

  • Make sure the certificate file is formatted correctly and has not been tampered with.

  • Check that each certificate in the certificate chain is complete and valid, and make sure that the order of the root CA certificate and the intermediate certificate is correct.

2. Check the keystore password:

  • If the keystore (p12) file is used, make sure the entered keystore password and key password are correct.

  • In DevEco Studio, the issue can be resolved by re-signing:

1. Click File > Project Structure > Project > Signing Configs to open the Signature Configuration page.

2. Check "Automatically generate signing" (if it is a HarmonyOS project, you need to check "Support HarmonyOS" at the same time), wait for re-signing, and then click OK.

3. Check the matching of the keystore and certificate chain:

  • Make sure the keystore and certificate chain used match and no certificates are missing.

Through the above steps, you can effectively troubleshoot and resolve certificate resolution errors

5. Problem description:

In-app purchases - How to apply for a refund?

Solution:

There are two types of refunds for in-app payment:

(1) Users contact Huawei to make a refund

(2) User contacts the merchant to refund

For (1), users can call Huawei customer service hotline for refunds. Huawei's business operations will contact the developer and then the developer will decide whether to refund the user, as well as the specific amount of the refund, part of the refund or full refund (partial benefits may involve partial refunds for subscribed products)

For (2), generally speaking, the developer connects with Huawei's business operations and sends detailed refunds to the business operations. Then the business operations come to the management station to operate the refund application.

If Huawei's business operations are not connected, according to the previous dual framework, the intermodal operation personnel can be notified through email. Developers can send an email to joinoperation@ (formerly special email for refund for dual-frame intermodal applications), including Huawei order number, application name/course name, refund amount, reason for refund, etc.

Single-frame refunds, double-frame refunds are basically the same for ordinary orders.

Note: The dual-frame server provides refund interfaces such as revoking subscriptions and returning subscription fees. Currently, single frameworks do not support API call refunds.

For the refund of the dual-frame subscription fee, please refer to:

/consumer/cn/doc/HMSCore-References/api-refund-subscription-fee-0000001050986131