李帅

1.使用服务账号登录

......@@ -38,9 +38,18 @@ class DevGoogle extends Command
*/
public function handle()
{
// dd(1);
$gp = new GooglePayment();
$validator =new \Google_Service_AndroidPublisher($gp->client);
$credentials_file = public_path().'/pc-api-7482901338487549764-603-566eccf76b91.json';
$client = new \Google_Client();
$client->setAuthConfig($credentials_file);
$client->setApplicationName("Client_Library_Examples");
$client->setScopes(
[
\Google_Service_AndroidPublisher::ANDROIDPUBLISHER,
]
);
$validator =new \Google_Service_AndroidPublisher($client);
$resp = $validator->purchases_subscriptions->get('pub.yiyan.parlando.Parlando', 'monthly_yiyan_vip', 'aa');
dd($resp);
......