In Google I/O 2019, Google released Google Play Billing Library 2.0 contains Pending Transaction( such as support iOS Promoting purchase ), Developer Payload support, and API changes.
Most important things is purchases must be acknowledged within three days.
(BTW, Google explained Billing Library 2.0 EoL comes 2021, same as this project currently uses 1.x)
Does this project supports Google Play Billing Library 2.0 ?
N/A
N/A
Android
N/A
N/A
N/A
N/A
@keima This is built with 2.0.1 see Link. However, feature like acknowledging purchases are not yet supported. We need community help. Maybe you can have a change 😃
Acknowledging purchases is very important, or else they will be cancelled automatically after 3 days (or 5 minutes in license test environment). I think this is something we should at least write about in the readme, and maybe also implement. I implemented acknowledge in backend using this library:
https://github.com/googleapis/google-api-nodejs-client/
androidpublisher.purchases.subscriptions.acknowledge
@mifi Thanks for the issue! I've just realized that this is very important after you've pointed out. I knew that acknowledgePurchase feature has risen in android but missed out that this will be canceled automatically. I am planning to release this is 3.2.0 in #557.
@mifi Could you do me a favor? When 3.2.0 is merged, I hope you can provide us a way to acknowledgePurchase in backend for user below < 3.2.0 and above > 2 in readme.
Awesome work man! Do you mean an example for how to do it in backend? It will depend on what kind of backend technology, but I have code in Node.js, I could share some of that
@mifi It would be nice if you provide your sample code in acknowledging purchase in backend before readme on #acknowledge-purchase-in-android
It would look like (below is just an example)
Since acknowledgePurchase has been implemented in 3.2.0, you should acknowledgePurchase in your backend when you are using below version 3.2.0.
(your code)
Hope you can give us a PR to help others.
Do we still need an example for validating a purchase in node?
It's preferred to validate receipt on your backend.
It's preferred to validate
receipton your backend.
yes :)
But above you asked for a PR to update docs with the required backend code. I could not find it so I was wondering if I should do it.
@tobiaseisenschenk That will be highly appreciated!!
I pulled out the gist of subscription validation handling in Node.js from my working production code. It's a bit long to put inside readme, so I put it in a github repo:
https://github.com/mifi/in-app-subscription-example
@mifi Really cool~ Thanks for this! Well, I think you can still put that in our readme for user to direct to that repo.
Most helpful comment
I pulled out the gist of subscription validation handling in Node.js from my working production code. It's a bit long to put inside readme, so I put it in a github repo:
https://github.com/mifi/in-app-subscription-example