关键词
鸿蒙,IAP
问题描述
游戏接入华为应用内支付服务,调用支付createPurcahse接口,报错如下:
CreateBusinessError errCode: 1001860056 errMsg: BusinessError 1001860056: The user is not allowed to make purchase.
问题分析
看IAP支付接口错误码文档,该错误码对应描述如下:

显示支付被风控,再看日志发现以下报错:
HACommonReportUtil external api[iap_game_pre_purchase-2] end error:1002000007 The app to which the product belongs is not released in a specified location.
看意思是商品所属的应用未在指定地区开放,文档描述如下:

问题解决
按照处理步骤,将应用的分布地区修改为中国大陆,再测试支付,问题解决。
更多问题可关注:
鸿蒙游戏官方网站:https://developer.huawei.com/consumer/cn/games/
公开课:华为开发者学堂