7

I am trying to implement a call to the Google Play Voided Purchases API from our PHP server.

I understand that I should call

GET https://www.googleapis.com/androidpublisher/v2/applications/
your_package_name/purchases/voidedpurchases?access_token=your_auth_token

To have access_token I created a service account and got the private key JSON file. I saw that it's complicated to use it directly in order to get the access_token and the recommended method is to use Google Client API libraries.

However the PHP client library is in Beta stage and the sample I found is using Google_Service_Books. In the library code I saw the class AndroidPublisher/VoidedPurchase.php but I don't understand how to use it.

Can anyone provide an example for calling the void purchases API from PHP, using the client library or without it? or how to get the access_token from the service account JSON key file?


I have already read the following instructions:

0 Answers0