Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Play Billing 4 will be required by Play Store from August 2, 2022 (new) / 1 November, 2022 (updates) #35

Closed
NianoTT opened this issue Aug 26, 2022 · 34 comments

Comments

@NianoTT
Copy link

NianoTT commented Aug 26, 2022

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?

@nathanfranke
Copy link

Yeah, a new release would be greatly appreciated so I don't need to build myself 😃

@akien-mga
Copy link
Collaborator

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.

@timoschwarzer
Copy link
Collaborator

@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 (#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.

@timoschwarzer
Copy link
Collaborator

This was referenced Sep 1, 2022
@NianoTT
Copy link
Author

NianoTT commented Sep 1, 2022

@timoschwarzer Thank you! :)

Is any documentation on the API changes available? I would test it then.

@timoschwarzer
Copy link
Collaborator

@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

@zarmath
Copy link

zarmath commented Sep 7, 2022

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.

@nathanfranke
Copy link

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.

@timoschwarzer
Copy link
Collaborator

@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.

@mmicoe
Copy link

mmicoe commented Sep 10, 2022

Hi, I tested the [2.0.0-rc.1] release on Google Play:

  1. The purchase is successful. The notification arrives on Google Play.
  2. 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

@nathanfranke
Copy link

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.

@timoschwarzer
Copy link
Collaborator

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.

Note this thread is for the 2.x of this library. querySkuDetails does not exist in 2.x.

@NianoTT
Copy link
Author

NianoTT commented Sep 10, 2022

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.

@timoschwarzer
Copy link
Collaborator

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.

@NianoTT
Copy link
Author

NianoTT commented Sep 14, 2022

@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).

@mmicoe
Copy link

mmicoe commented Sep 14, 2022

@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

@SnailRabbids
Copy link

@timoschwarzer
Hi, when do you think we can expect the final release? Winter is coming :D

@timoschwarzer
Copy link
Collaborator

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.

@avnerh1
Copy link

avnerh1 commented Oct 9, 2022

@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:
bf09bf2

@mmicoe
Copy link

mmicoe commented Nov 7, 2022

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

@zarmath
Copy link

zarmath commented Nov 8, 2022

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

@mmicoe
Copy link

mmicoe commented Nov 8, 2022

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

@chazzledazzle10
Copy link

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

@chazzledazzle10
Copy link

Could someone tell me exactly what i have to change as its not clear Please?

@AlecAcosta
Copy link

AlecAcosta commented Nov 28, 2022

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

@NianoTT
Copy link
Author

NianoTT commented Nov 29, 2022

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.

@chazzledazzle10
Copy link

chazzledazzle10 commented Nov 29, 2022

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

@chazzledazzle10
Copy link

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
image

@ghostbutter-games
Copy link

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?

@Overvault-64
Copy link

Overvault-64 commented Jul 9, 2023

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

@al-bezd
Copy link

al-bezd commented Sep 25, 2023

я только что попробовал еще раз на своем телефоне, и он выдает ту же ошибку, и да, я определенно использую версию 2.x для своего проекта изображение

i have same problem

@NianoTT
Copy link
Author

NianoTT commented Sep 25, 2023

The current maintained version is by finepointcgi, you can get the release here:
https://github.com/finepointcgi/godot-google-play-billing/releases/tag/1.1.2

It uses the same API as the legacy version thats documented in the Godot docs.
I'd suggest using that version instead of 2.0.0-rc1.

@kyadalu1
Copy link

kyadalu1 commented Jan 6, 2024

Try this

@syntaxerror247
Copy link
Collaborator

The plugin has been updated and should now be working as expected. I will go ahead and close this issue. If the problem persists, feel free to comment to reopen it. Thanks for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests