Huawei In app payment services (In-App Purchases) Provide users with a good in app payment experience through a simple access process , However, in the actual access process , Some developers report that the payment page cannot be pulled up normally during the test , The following will analyze the problems in detail 5 Kinds of situations , And give the solution , Hope to provide reference for developers who encounter similar problems .

situation 1:AGC On the console API Payment in management API Already opened , The created product is also effective , But check the log and find an error 60002

Cause analysis : Yes IAP The payment public key is required for the verification of the request result of , Conduct SHA256WithRSA Signature verification , This public key developer is not configured .

resolvent : Please carefully check whether the following three points are set :

(1)API Payment in management API Already opened ( Be careful : The user is opening IAP service , It takes about half an hour to take effect )

Please refer to Official documents

(2) Make sure the public key switch is activated on , And the public key is used correctly

(3) stay AGC backstage PMS( Commodity management system ) Corresponding types of goods are configured on , And activation succeeded

situation 2: Developers enter the membership center to edit the subscription page , Display exception , Report errors 60051

see Official document , Error code 60051 It means purchased goods or subscription goods , Cannot buy again ;

Cause analysis

When we reproduce the problem, we find , After the subscription is completed, there is a refresh action when returning to the Member Center , Clicking on the subscription before refreshing will cause an exception , Clicking after refreshing is normal . This is because if there is no refresh or the refresh is not timely , There will be the last cached data . After clicking on a subscription product , Click to subscribe to another product now , Will put the first subscription products id Into the , But it's time to id It's not the latest subscription product id, Thus causing data mismatch , It eventually leads to an error report , Unable to display the edit page .

resolvent

It is suggested that developers optimize the timing of page effect refresh , Avoid renewing without refreshing .

situation 3: An error is reported when using Huawei mobile phones for payment debugging 60003, but PMS Products in the system ID No problem found in the configuration .

Cause analysis : First of all, report an error 60003 Usually in PMS There is a problem with the commodity information configuration in the system , You can go to AGC Website backstage , In my app -> operating -> Commodity management -> List of goods , Check whether the corresponding product exists or whether the required information is correct and complete ( E.g. product name , goods ID, Price , Commodity type , Whether to activate ).

In addition, you can check the goods ID Whether it is correctly filled in the client code , Whether or not AGC Backstage goods ID bring into correspondence with , Please focus on checking whether there is a problem with the fields passed in the client code .

Another thing to note is whether the service location of the Huawei account logged in on the device is IAP Within the scope of coverage . You can call Task isEnvReady() The interface determines the service country of the current device login account / Whether the region is Huawei IAP Countries where payment services support settlement / Regional .

Solution

after CP The investigation found that it was the product imported by the client-side code ID and AGC Products configured in the background ID atypism , The problem has been solved after modification .

situation 4: Call the payment pull up cashier interface , Successfully pull up the successful payment page for the first time , Then click Cancel to return , Why can't I pull up the payment page the second time I continue to call this interface ?

Cause analysis : After purchasing consumable goods , The consumption of goods must be completed first , Then you can buy again , Otherwise, an error will be reported 60051 Wait for the error code .

resolvent : Make up orders for consumable goods

Developers need to trigger the replenishment mechanism in the following four scenarios :

· When app starts

· Purchase request return -1(OrderStatusCode.ORDER_STATE_FAILED) when

· Purchase request return 60051(OrderStatusCode.ORDER_PRODUCT_OWNED) when

· Purchase request return 1(OrderStatusCode.ORDER_STATE_DEFAULT_CODE) when

If IAP The refund callback address configured in the background is wrong , Need to reconfigure . For details, please refer to file

In addition to the problem of being unable to pull up the payment page , How to confirm whether to enter the sandbox environment is also a common problem .

situation 5: Test with sandbox account , There is no prompt pop-up box at the end of the sandbox environment , How to confirm whether to enter the sandbox environment ?

Cause analysis : First, enter the sandbox test environment , Under normal circumstances, the following pop-up box will be prompted

But in meeting the sandbox environment 2 After three necessary conditions , Still unable to prompt the dialog , Does it mean that you have not entered the sandbox test ?

The following is what the developer passed isSandboxActivated Relevant data printed out by the interface

From the printed logs : Meet the sandbox environment 2 Necessary conditions .

  1. The currently logged in Huawei account belongs to the sandbox account

  2. VersionCode Greater than the online version of the application market ( The APK The application market has not been released yet , So the version number returned by the application market is 0)

Obviously, from the results, in theory, it should enter the sandbox testing environment . Is there any other way to confirm ?

resolvent : Whether you have successfully entered the sandbox environment , You can check through the following methods

a) View the returned purchase data , Refer to the below :

If Huawei order number payOrderId With SandBox start , Then it seems that this order belongs to the order generated by sandbox test .

b) View the payment report

You can see Payment statement , If there is no such order in the payment report , Explain that the order comes from the sandbox test .( notes : Payment report data is not updated in real time , If the order purchased on the same day , To judge accuracy , You can refresh the report for verification the next day )

c) eliminate HMS Core cache

You can try to clear HMSCore cache , The end side pop-up frame is judged according to the corresponding field identification , This value may not be refreshed in time due to caching . By setting –> Applications and services -> Application management ->HMS Core Do cache cleanup .

Learn more >>

visit Official website of Huawei developer Alliance

obtain Development guidance document

Huawei mobile service open source warehouse address :GitHubGitee

Pay attention to our , The first time to understand HMS Core Latest technical information ~

【FAQ】 More related articles on common reasons and solutions for the failure of in app payment services to pull up the payment page

  1. iPhone Anywehre Virtual location tips “ Background service not started , Please re install the app and use ” Solutions for

    Problem description : iPhone Escaped from prison , After the Cydia Install in Anywhere Virtual positioning , But turn it on app Tips : Background service not started , Please re install the app and use . The program doesn't work properly ... resolvent : open Cydia- already installed , ...

  2. 【 Cluster practice 】NFS Service common troubleshooting and solutions

    NFS, Full name Network File System, It is called network file system in Chinese , yes Linux.UNIX A component of the distributed file system of the system , The remote file system can be shared on different networks . NFS from Sun Companies to develop , At present ...

  3. start-up weblogic The service , Also need to enter the user name and password solution

    When to start weblogic The service , You also need to enter a user name and password , Quite complicated , as follows : And in the production environment , It is generally required that you do not enter the user name and password every time you start , So you can do this with some simple configuration , There are two common approaches : 1. modify ...

  4. bootstrap Use the modal box , When you enter in the input box in the mode box , The problem of mode box closing automatically and its solution

    Use bootstrap Next modal box , Build form submission page , But enter directly in the input box , I wanted to do some validation , But it causes the modal box to close automatically . In the face of such a problem , Just disable carriage return to trigger form submission             $(do ...

  5. 【FAQ】 Access HMS Core Summary of some common problems in the process of in app payment service

    HMS Core In app payment services (In-App Purchases,IAP) Provide convenient in app payment experience and simple access process for applications . Application integration for developers IAP SDK after , call IAP SDK Interface , start-up IAP Cashier , namely ...

  6. 【FAQ】 Dry cargo is full. , Access HMS Core Summary of some common problems in the process of in app payment service (2) Come on.

    HMS Core In app payment services (In-App Purchases,IAP) Provide convenient in app payment experience and simple access process for applications . The service supports two development forms: client and server , Please refer to official documents for details The last time , We share and always ...

  7. Alipay pay -APP Payment server details

    Alipay APP Payment server details Wechat payment in front , Compared with wechat payment , Alipay APP Payment provides the payment sub packing class , Alipay will be implemented below. APP payment . Order inquiry . Asynchronous notification of payment results .APP Description of payment application parameters , And server return APP Start from the end ...

  8. iOS Development —— advanced technology & Buy in service

    Buy in service Everybody knows how to do iOS There are three sources of income from development itself : Sell apps . Internal shopping and advertising . Domestic users usually seldom directly Buy apps , So for developers ( Especially individual developers ), Internal purchase and advertising revenue become the main source of income . Internal purchase marketing mode , through ...

  9. Hive Learning notes ( Starting mode , Built in service )

    One .Hive Introduce Hive Is based on Hadoop A data warehouse ,Hive To be able to SQL The sentence is translated into MapReduce Task to run . Hive The architecture diagram is divided into the following four parts . 1. The user interface Hive There are three user interfaces : command ...

  10. 360sdk Online game payment service

    Online game payment service   Catalog 1. Process introduction 2. The interface is introduced 2.1 Payment interface [ Client calls ]( It's a must )2.2 Payment result notification interface – The application server provides interfaces , from 360 Server callback ( It's a must )2.3 Order verification interface – Server side interface , Application service ...

Random recommendation

  1. SQL Return

    1. PL/SQL escape select order#, ………  from **** select col1 from A where col2 like '%\_keywors%' escape ' ...

  2. linux It's for work

    SSH by Secure Shell Abbreviation , from IETF Network working group of (Network Working Group) Established by :SSH For security protocols based on application layer and transport layer . SSH It is more reliable at present , ...

  3. oracle ebs Application product security - Cross validation rules

    from : http://blog.itpub.net/298600/viewspace-625138/ Definition : Oracle The key elastic field can be defined according to the rules defined when customizing the key elastic field , Perform automatic cross validation of segment value combinations . Use ...

  4. HTML5 Learning summary -06 WebWorker

    One WebWorkder It allows developers to write background programs that can run for a long time without being interrupted by users , To perform a transaction or logic , And at the same time, ensure the response of the page to the user . In short , Is to allow JavaScript Create multiple threads , But sub threads are completely ...

  5. HiveContext VS SQLContext

    There are two ways to create context in Spark SQL: SqlContext:scala> import org.apache.spark.sql. ...

  6. WPF RichTextBox How to scroll to the cursor position 、 Scroll bar operation

    1. Get the current scroll bar position // Get the current scroll bar position richTextBox.VerticalOffset; richTextBox.HorizontalOffset; // Get the current cursor position richTex ...

  7. Use MyEclipse Simple implementation Servlet Program

    1. Create an inheritance from GenericServlet Class 3. rewrite Server Method package cn.school; import java.io.IOException; import javax ...

  8. DataTables ajax + bootstrap Pagination / Search for / Sort / common problem

    The recent school website construction needs , Attempted to use the following Jquery dataTables Control , Come into contact with C# Everyone knows ,C# It also contains a DataTable, But it has nothing to do with what we are talking about today I use the latest on the official website DataTabl ...

  9. hyperledge Tools -configtxgen

    Reference resources http://www.blockchainbrother.com/article/1339 configtxgen yes Hyperledger Fabric Utilities provided for channel configuration , It mainly generates the following 3 ...

  10. Lua Doc Generation tool

    Luadoc http://keplerproject.github.io/luadoc/ Overview LuaDoc is a documentation generator tool for ...