godot-google-play-billing
godot-google-play-billing copied to clipboard
Google Play Billing 4 will be required by Play Store from August 2, 2022 (new) / 1 November, 2022 (updates)
Source: https://developer.android.com/google/play/billing/deprecation-faq
Also getting warnings by Play Store. If I understand it correctly, the latest code already uses V4, but there is no compiled version for it yet?
Yeah, a new release would be greatly appreciated so I don't need to build myself :smiley:
CC @timoschwarzer @m4gr3d
I can have a look into making a new release myself if needed but if either of you is available, feel free to.
As I understand it this repo used to use Travis CI to make official builds? IINM Travis no longer offers its service to open source projects so this should likely be replaced by a GitHub Action workflow.
@akien-mga I'm very sorry for not responding for so long, I've been and still am quite busy recently.
I upgraded the Google Play Billing Library in a branch and opened a PR (https://github.com/godotengine/godot-google-play-billing/pull/36).
I also created a release on GitHub (Prerelease, 2.0.0-rc.1) so people can upgrade right away. Please note that this update contains breaking API changes (mostly due to the breaking changes in the Google Play Billing Library) and I did not test anything due to lack of a test environment.
Link to the release: https://github.com/godotengine/godot-google-play-billing/releases/tag/2.0.0-rc.1
@timoschwarzer Thank you! :)
Is any documentation on the API changes available? I would test it then.
@NanitesNanites didn't have time to update the docs, mainly because I'm not able to test this. Most changes are within the returned Dictionaries of information. Please see here for reference: https://github.com/godotengine/godot-google-play-billing/blob/billing-v5/godot-google-play-billing/src/main/java/org/godotengine/godot/plugin/googleplaybilling/utils/GooglePlayBillingUtils.java
I have changed:
payment.connect("sku_details_query_completed", self, "_on_sku_details_query_completed") payment.connect("sku_details_query_error", self, "_on_sku_details_query_error")
by:
payment.connect("product_details_query_completed", self, "_on_sku_details_query_completed") payment.connect("product_details_query_error", self, "_on_sku_details_query_error")
and
queryPurchases por queryPurchasesAsync
but it gives me error in the verification of the purchase so I guess I have to make some more changes but I don't know very well which one.
sku
was changed to product
? If so, there should still be sku
signals for compatibility. I am maintaining game from another developer, so the less I have to interact with the fragile code, the better.
@nathanfranke I'm against maintaining a compatibility layer between the Google Play Billing library and its Godot integration. The Godot integration should reflect the GPB API as closely as possible. Because the API changed in GPB, I changed it in the library as well and released it with a new major version.
Hi, I tested the [2.0.0-rc.1] release on Google Play:
- The purchase is successful. The notification arrives on Google Play.
- The refund is done correctly.
but the purchase id is not detetected: in func _on_purchases_updated(purchases): and func _on_connected():
I am using the same code as version 1.0.1 If there are any changes in code vs 1.0.1, please, link the documentation....
In the end I have uploaded the game with version 1.0.1 that works correctly.
Thank you very much for your wonderful work.
All the best, Mauro
I get this on internal testing on google play
09-10 13:10:27.236 13930 13956 W BillingClient: Querying product details is not supported.
09-10 13:10:27.236 13930 13956 W GodotPlugin: Invalid type for argument #2. Should be of type [Ljava.lang.String;
Not reproducible in release or debug apk. Can't test google play production, because they are still reviewing my app. I am passing inapp
to querySkuDetails
.
I get this on internal testing on google play
09-10 13:10:27.236 13930 13956 W BillingClient: Querying product details is not supported. 09-10 13:10:27.236 13930 13956 W GodotPlugin: Invalid type for argument #2. Should be of type [Ljava.lang.String;
Not reproducible in release or debug apk. Can't test google play production, because they are still reviewing my app. I am passing
inapp
toquerySkuDetails
.
Note this thread is for the 2.x of this library. querySkuDetails
does not exist in 2.x.
Note this thread is for the 2.x of this library.
querySkuDetails
does not exist in 2.x.
https://github.com/godotengine/godot-google-play-billing/blob/billing-v5/godot-google-play-billing/src/main/java/org/godotengine/godot/plugin/googleplaybilling/GodotGooglePlayBilling.java#L136
I also used it. Was it supposed to be named "queryProductDetailsAsync"? I actually wondered when looking through the code but forgot to ask.
Note this thread is for the 2.x of this library.
querySkuDetails
does not exist in 2.x.https://github.com/godotengine/godot-google-play-billing/blob/billing-v5/godot-google-play-billing/src/main/java/org/godotengine/godot/plugin/googleplaybilling/GodotGooglePlayBilling.java#L136
I also used it. Was it supposed to be named "queryProductDetailsAsync"? I actually wondered when looking through the code but forgot to ask.
Sorry, I was wrong. It's actually called querySkuDetails but it's not supposed to 😅 I'll rename it to queryProductDetails in the final release.
@mmicoe
I am using the same code as version 1.0.1
You can not use the same code for 2.0 - queryPurchases is now async, some function names and especially the dictionaries they returned changed, so you need to update your code (keep in mind 1.x won't work anymore after November and already does not for new apps).
@NanitesNanites oh, I know it. I published the game using 1.0.1 in Google Play two days ago. I will wait to use 2.0 Godot, at the next update of my games, until the billiing 2.0 documentation is complete and well detailed. I hope so. Thank you for your clarification. (Please add a link to the new 2.0 documentation when the library is stable) Regards, Mauro
@timoschwarzer Hi, when do you think we can expect the final release? Winter is coming :D
As it seems, everything is working. Except for one typo (where it's still called SKU instead of Product) I should be able to release this.
Unfortunately, I'm very limited on time right now and need help updating the docs. I'm also not able to do the release before Oct 10th.
@mmicoe
I am using the same code as version 1.0.1
You can not use the same code for 2.0 - queryPurchases is now async, some function names and especially the dictionaries they returned changed, so you need to update your code (keep in mind 1.x won't work anymore after November and already does not for new apps).
Thanks for the summary. For anyone interested in the details, I'd recommend reading the release notes: https://github.com/godotengine/godot-google-play-billing/commit/bf09bf29bf5fa973d72ac2743a9ce8205dd9e0fa
Hi, I would like to report that I have implemented the 2.0.0-rc.1 (com.android.billingclient:billing:5.0.0) library and tested it on Google Play. Everything works perfectly. I'll post the code with a link shortly in case anyone is interested.
Thank you for the library! Now I will be able to update all my Android games. All the best. Mauro
Hi, I would like to report that I have implemented the 2.0.0-rc.1 (com.android.billingclient:billing:5.0.0) library and tested it on Google Play. Everything works perfectly. I'll post the code with a link shortly in case anyone is interested.
Thank you for the library! Now I will be able to update all my Android games. All the best. Mauro
It would be a great help to me if you could share the code
plugin.googleplaybilling 5 CODE Hola. Aquí está Godot In App Purchases 5
(Si tienes algo de idea sobre iOS y ATT, te agradecería un poco de ayuda) Saudos, Mauro
hey guys i keep getting an error in my command line debugger saying that the "Google Play In-app Billing API version is less than 3". although im not sure what changes i have to make? is it skuDetails or productDetails??? im guessing its sku details as the guy above me posted a link to his code where he uses skudetails??? ive set up google pay on my device and still no luck
Could someone tell me exactly what i have to change as its not clear Please?
hi, i made this gdscript to use it with 2.0.0rc1, I tested it for one time items (like premium) and consumables (like coins) https://www.mediafire.com/file/32dujcmzqloe59y/Google_Play_Billing_1_0_0_rc1_gdscript.zip/file I hope you find it useful
it has two arrays, one for non consumable items, and one for consumables, so the script automatically knows if it has to consume immediately after purchasing or not
hey guys i keep getting an error in my command line debugger saying that the "Google Play In-app Billing API version is less than 3". although im not sure what changes i have to make? is it skuDetails or productDetails??? im guessing its sku details as the guy above me posted a link to his code where he uses skudetails??? ive set up google pay on my device and still no luck
If you get that error I assume you use the old 1.x version of this plugin? You need to use 2.x by now (link to release above in this thread). It implements V5 of the Billing API, while the old 1.x uses V3 which is now outdaten and not accepted by Google anymore.
yes i found the 2.0x version and replaced the 1x files for it. so deleted all the files from the plugin folder in the godot engine and put the new ones in so i dont know why its throwing an error, but i will check again.
edit yes i can confirm that im using 2.x in my project
thank you so much for the help
i just tried it again on my phone and it gives me the same error and yes im definetly using the 2.x release for my project
Does this work for Godot 4.0.x? Also, the billing library v4 will be deprecated this August and only work with v5, apparently, so this would require another maintenance update.
If this plugin is not currently working with Godot 4, is there any alternative to get IAP working on Android/Google Play currently?
Does this work for Godot 4.0.x?
I couldn't use it in a production environment but it works fine with test transactions. I made an API to make some tests in Godot 4.1