避免Google Play支付验证的陷阱(禁止googleplay服务更新)(禁止googleplay服务更新)

访客 128 0

标准的流程如下:请参考 https://github.com/googleapis/google-api-php-client。

```php
// 安卓支付成功后传过来的 $product_id = '0001';
$purchase_token = 'xxxxxxx';
$package_name = 'com.xxxxx';

// 注册好 service account 后下载秘钥 json 文件
putenv('GOOGLE_APPLICATION_CREDENTIALS=/path/to/xxxx.json');

$google_client = new \Google_Client();
$google_client->useApplicationDefault();
```
 
哎呀,这个错误码一直是401。真没道理啊!我可是用项目所有者身份创建的服务帐号,为什么会出现这个问题呢? 

将新创建的服务账号的电子邮件地址添加到测试组中。

避免Google Play支付验证的陷阱(禁止googleplay服务更新)(禁止googleplay服务更新)-第1张图片-谷歌商店上架

接着,你明白的事情就发生了...

标签: 谷歌商店上架 用项 陷阱

发表评论 (已有0条评论)

还木有评论哦,快来抢沙发吧~