You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been banging my head against a wall on this question. I can't find any examples anywhere of how to check the result of an in-app billing acknowledge call for one-time purchases and subscriptions.
The Google docs for the basic REST api call state the response body will be empty on success. It doesn't say anything about errors and I can't find anything on errors in the client libraries.
Using the pattern...
$client = new Google\Client();
$service = new Google\Service\AndroidPublisher($client);
$service->purchases_products->acknowledge(..params..);
I figure there must be a way to get a better status indicator for success than just an empty response as an empty response could also just be a failed attempt. If there are errors then what form does that messaging take?
If I've missed some docs you can point me too, I'll happily read those.
Thank you.
The text was updated successfully, but these errors were encountered:
I have figured out a few things and have got closer to an solution. As I have seen often reported by others on forums, the google docs are not terribly helpful to a beginner starting out with Google API's and in-app purchases (especially if you're not using java or python).
I figured out that the api user registered in the credentials has to have access to financial permissions turned on in the Play Console. Also that you have to turn on Developer API access in the cloud project system. After doing that I was finally able to execute a call to Method: purchases.subscriptions.acknowledge and inspect what the library was returning: GuzzleHttp\Psr7\Response Object and see the properties.
So from that object I was finally able to call $oGuzzleResponse->getStatusCode() to get the http status code (This is what I was asking for originally, how to get to the status code).
So the last item I am lacking is a list of the possible response codes and what they mean for success or failure. The REST resources page doesn't talk about this or give any links to a resource for it. (https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptions/acknowledge0.
For instance... what constitutes a success code: 200, 201, 202? Anything under 300? What are the error statuses and their meanings. If someone has a link to the doc page that would be great. I just need a starting hint.
I have been banging my head against a wall on this question. I can't find any examples anywhere of how to check the result of an in-app billing acknowledge call for one-time purchases and subscriptions.
The Google docs for the basic REST api call state the response body will be empty on success. It doesn't say anything about errors and I can't find anything on errors in the client libraries.
Using the pattern...
I figure there must be a way to get a better status indicator for success than just an empty response as an empty response could also just be a failed attempt. If there are errors then what form does that messaging take?
If I've missed some docs you can point me too, I'll happily read those.
Thank you.
The text was updated successfully, but these errors were encountered: