当前位置:网站首页>[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 06:40:00 【HMS Core】
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<IsEnvReadyResult> 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 ~
边栏推荐
- unity 3中获取指定gameObject的方式
- Leetcode skimming: balanced binary tree and flipped binary tree
- rider 切换主题
- Episode 1 best B tutorial of VMware virtual machine installation (12 days)
- Interview problems
- Idea shortcut key (day 16)
- Animation, and basic use of animation
- Using LINGO to solve simple linear programming problems
- Episode 2 best B tutorial of VMware virtual machine installation (13 days)
- 表格表单的样式
猜你喜欢
Use of Seaborn
LeetCode 814 二叉树剪枝[dfs] HERODING的LeetCode之路
Leetcode skimming: reverse the linked list and the intermediate nodes in the linked list
. Review the old and know the new: [6] what is LINQ
化合物修饰壳聚糖水凝胶:丙烯酸接枝/聚乙烯醇/温敏淫羊藿苷/醛-亚胺-壳聚糖水凝胶的制备
IP地址分类及范围
unity GetAxis(string axisName); axisName 值怎么来的
Leetcode skimming: bit operation (find numbers that are different and appear only once)
U++ learning note component and collision
Software testing: equivalence testing, decision table based testing and comprehensive problem analysis
随机推荐
Preparation method of polyether / polyacrylamide monomethyl / Polyacrylamide / granular poly (N-isopropylacrylamide) chitosan hydrogel
三菱PLC FX3U脉冲轴回原功能块(MC_Home_P)
rider 切换主题
关于面试的问题2
while和do-while循环
Preparation of chitosan grafted polyglycolic acid copolymer hydrogel / sodium lignosulfonate / polysialic acid chitosan derivative hydrogel
15秒带货120W,这样的爆款视频你也能拍
攻防演练进行时|知道创宇赵伟:让安全能力长在云上
Correlation analysis of position attribute value
To create a private Ca, I use OpenSSL
第3集 vmware虚拟机安装最牛B教程(14天)
Using jsonwebtoken to realize JWT authentication in node project
Western Agricultural University C plus
Western Agricultural University C plus
Horizontal layout, vertical layout, shadows and fillets
Credentials of browser cross domain requests
Leetcode skimming: bit operation (find numbers that are different and appear only once)
Node+Express实现文件的上传下载与删除
Dynamics CRM 365 OP版的经典模式,选项卡是滚动查看的,是否可以调成和UCI界面一样,通过Tab展示呢
Episode 1 VMware Virtual Machine installation Best B tutoriel (12 jours)