Showing
1 changed file
with
12 additions
and
3 deletions
| ... | @@ -38,9 +38,18 @@ class DevGoogle extends Command | ... | @@ -38,9 +38,18 @@ class DevGoogle extends Command |
| 38 | */ | 38 | */ |
| 39 | public function handle() | 39 | public function handle() |
| 40 | { | 40 | { |
| 41 | -// dd(1); | 41 | + |
| 42 | - $gp = new GooglePayment(); | 42 | + $credentials_file = public_path().'/pc-api-7482901338487549764-603-566eccf76b91.json'; |
| 43 | - $validator =new \Google_Service_AndroidPublisher($gp->client); | 43 | + $client = new \Google_Client(); |
| 44 | + $client->setAuthConfig($credentials_file); | ||
| 45 | + $client->setApplicationName("Client_Library_Examples"); | ||
| 46 | + $client->setScopes( | ||
| 47 | + [ | ||
| 48 | + \Google_Service_AndroidPublisher::ANDROIDPUBLISHER, | ||
| 49 | + ] | ||
| 50 | + ); | ||
| 51 | + | ||
| 52 | + $validator =new \Google_Service_AndroidPublisher($client); | ||
| 44 | $resp = $validator->purchases_subscriptions->get('pub.yiyan.parlando.Parlando', 'monthly_yiyan_vip', 'aa'); | 53 | $resp = $validator->purchases_subscriptions->get('pub.yiyan.parlando.Parlando', 'monthly_yiyan_vip', 'aa'); |
| 45 | dd($resp); | 54 | dd($resp); |
| 46 | 55 | ... | ... |
-
Please register or login to post a comment