当前位置:网站首页>[FAQ] common reasons and solutions for the failure of in app payment services to pull up the payment page
[FAQ] common reasons and solutions for the failure of in app payment services to pull up the payment page
2022-07-22 13:08:00 【Huawei mobile services】
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 .
- The currently logged in Huawei account belongs to the sandbox account
- 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 :GitHub、Gitee
Pay attention to our , The first time to understand HMS Core Latest technical information ~
边栏推荐
- Merge two linked lists
- Configure SSL certificate for Baidu cloud virtual machine BCH
- 【开源的串口可视化工具——Serial Studio】
- Multiple backpack notes
- 2022大健康产业展,山东大健康展会,健康膳食展,特医食品展
- Four redis cluster schemes and their advantages and disadvantages
- LEGO loam run through and source code learning
- Explore the implementation of hash table through redis source code
- B-end product manager learning: data analysis - Zhuge IO, Shence data
- 【技术】uniapp 之引入 u-charts 部分demo
猜你喜欢
Pychart configuration in Anaconda environment
B-end product manager learning: data analysis - Zhuge IO, Shence data
华为无线设备配置攻击检测功能
【技术】uniapp 之引入 u-charts 部分demo
ACL - ijcai - Sigir top Conference Paper presentation Conference (ais 2022) Note 2: Analysis and interpretability
C # read and write data to PLC in conjunction with kepserver
New energy_ Photovoltaic inverter
Nightmare of concurrent programs -- data competition
超干货!彻底搞懂单工、半双工、全双工的区别与联系
Mongodb learning journey
随机推荐
Acl-ijcai-sigir top conference paper report meeting (AIS 2022) Note 1: recommendation system
【技术】uniapp 之引入 u-charts 部分demo
多重背包笔记
The graduation design of wechat hotel reservation applet (3) background function
Nightmare of concurrent programs -- data competition
ECCV 2022 | the role of shape, texture and color in visual recognition
小程序毕设作品之微信酒店预订小程序毕业设计(2)小程序功能
: use of class in the project
华为机试:叠书
十年架构五年生活-04第一个工作转折点
力扣分发饼干问题
2022.07.18
华为无线设备配置WIDS和WIPS
Ioinputstream type
数据类型与变量
Huawei wireless device configuration attack detection function
[高数] 用定义证明 a 的 1/n 次幂的极限为 1
em与rem的区别
The cloud XR platform supports the rapid landing of immersive experience applications
[higher number] prove by definition that the limit of 1/n power of a is 1