【支付】Google支付配置

问题:Google支付通过,但无法正常发货

{ "error": { "code": 403, "message": "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.", "errors": [ { "message": "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.", "domain": "androidpublisher", "reason": "projectNotLinked" } ] } }

一、Google Cloud配置

网址:console.cloud.google.com/

1、增加服务账号

登录Google开发者账号,首页==》菜单==》IAM和管理==》服务账号,打开页面点击顶部菜单栏的"创建服务账号",账号信息填写名称不做限制,建议使用"payment"表示支付,服务说明填写"用户支付验证",点击下一步后选择访问权角色选择"Owner",第3部忽略直接点击完成即可。

备注:项目使用默认的即可

2、生成密钥

基于第1步创建账号成功后回到对应的列表查看到新增加的账号,右侧点击操作选择密钥管理菜单进入对应页面,

二、Google Play配置

1、API权限开启

网址:play.google.com/console/u/0...

打开控制台网址登录对应游戏的管理了Google开发者账号,点击左侧菜单==》设置==》API权限,在页面中"Google Cloud 项目"启用"Google Play Android Developer API"

2、服务账号权限

在第1步的当前页面下方"服务账号"模块找到前面添加的账号,点击右侧的"查看play管理中心权限",修改账号权限为"管理员",有效期不做设置,保存更改

三、项目代码变更

1、上传密钥

前面创建的密钥保存到\enplat\configs\google_json\目录

2、修改配置代码

在\enplat\configs\open.php文件中数组openChannels[android][key][key][游戏ID]下的json路径地址,同时修改变更redis_key规避缓存,如果代码上线没有生效重启服务即可

备注:切换支付服务 /data/devops/enplatpay 执行 php start.php restart -d

相关推荐
冬奇Lab1 天前
Android触摸事件分发、手势识别与输入优化实战
android·源码阅读
城东米粉儿1 天前
Android MediaPlayer 笔记
android
Jony_1 天前
Android 启动优化方案
android
阿巴斯甜1 天前
Android studio 报错:Cause: error=86, Bad CPU type in executable
android
张小潇1 天前
AOSP15 Input专题InputReader源码分析
android
_小马快跑_1 天前
Kotlin | 协程调度器选择:何时用CoroutineScope配置,何时用launch指定?
android
_小马快跑_1 天前
Kotlin | 从SparseArray、ArrayMap的set操作符看类型检查的不同
android
_小马快跑_1 天前
Android | 为什么有了ArrayMap还要再设计SparseArray?
android
_小马快跑_1 天前
Android TextView图标对齐优化:使用LayerList精准控制drawable位置
android
_小马快跑_1 天前
Kotlin协程并发控制:多线程环境下的顺序执行
android