Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This plugin was initially built with version 3 as the targeted API version. Adjustments were made to get it to work as a version 5 plugin but significant amounts of deprecated methods and workflows were being used. My game needs a functional billing library that's up-to-date, so I built this plugin from the ground up. Google's current API is now version 7.0.0, which is the new target. The Google Play Billing Library has changed quite a bit since the plugin was first created so here are some of the top changes.
There are now three primary methods for starting a purchase that depend on the purchase type.
purchaseNonConsumable
method. This only requires a single product ID.purchaseConsumable.
A top reason why these should be separated is because this version of the API now supports the ability to purchase consumable items with varying quantities. So this requires an array of product IDs, but of course can also accept just one.purchaseSubscription
which requires not only aproductId
but also aplanId
which is the tier of subscription that the user is choosing.Additional functionality like setting the personalized price flag is now supported.
This plugin modernization also absorbs my other work with adapting the plugin as a version 2 Godot Android Plugin. I've included an updated
.gdap
file for backwards compatibility purposes but the new way of consuming Android plugins is with an editor addon which I've also built and included.Of course there are a lot more changes but these are the top differences. Acknowledging purchases and querying for product details is about the same workflow those just needed revisions on what methods need to be called.
This is a work in progress. My initial testing seems to show that things are working properly but I would not treat this as production-level yet because I'm not an expert with Android development. So, I'd be happy to receive feedback.
I'm a C# user, so the next thing I plan on contributing are the bindings to convert the Godot dictionaries to their corresponding Google Play Billing class.