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

SOLVED: subscription_offer_details=null for subscriptions in billing-v5 #57

Open
PickleJesus123 opened this issue Oct 28, 2023 · 3 comments

Comments

@PickleJesus123
Copy link

PickleJesus123 commented Oct 28, 2023

I am trying to access the "formatted price string" of a subscription using its subscription_offer_details in plugin release 2.0.0-rc.1 and Godot 4.1.2. However, when I retrieve a subscription product using query_product_details(), it seems to be "null"

@PickleJesus123 PickleJesus123 changed the title No way to retrieve price of subscription in 2.0.0-rc.1? No way to retrieve localized price string of subscription in 2.0.0-rc.1? Oct 31, 2023
@PickleJesus123 PickleJesus123 changed the title No way to retrieve localized price string of subscription in 2.0.0-rc.1? No way to retrieve "localized price" string of subscription in 2.0.0-rc.1? Oct 31, 2023
@PickleJesus123 PickleJesus123 changed the title No way to retrieve "localized price" string of subscription in 2.0.0-rc.1? Bug: no "localized price" string for "backwards compatible" subscriptions in 2.0.0-rc.1 Oct 31, 2023
@PickleJesus123
Copy link
Author

PickleJesus123 commented Oct 31, 2023

I solved it. In GooglePlayBillingUtils.java, convertProductDetailsToDictionary() was using ArrayList<Dictionary>, which was turning to null when passed to Godot. I upgraded the code so that is converts it to Object[] before dictionary.put(), and now it now I can read all the data from subscription_offer_details. Here are the specific updates to GooglePlayBillingUtils.java:

changes

@PickleJesus123 PickleJesus123 changed the title Bug: no "localized price" string for "backwards compatible" subscriptions in 2.0.0-rc.1 SOLVED: no "localized price" string for subscriptions in 2.0.0-rc.1 Oct 31, 2023
@PickleJesus123 PickleJesus123 changed the title SOLVED: no "localized price" string for subscriptions in 2.0.0-rc.1 SOLVED: subscription_offer_details=null for subscriptions in 2.0.0-rc.1 Oct 31, 2023
@PickleJesus123
Copy link
Author

I created a PR for this fix: #58

I'll leave this open in the mean time, so that anyone else dealing with this issue will know what to do, until the PR is merged with the main branch

@PickleJesus123 PickleJesus123 changed the title SOLVED: subscription_offer_details=null for subscriptions in 2.0.0-rc.1 SOLVED: subscription_offer_details=null for subscriptions in billing-v5 Nov 1, 2023
@kyadalu1
Copy link

kyadalu1 commented Jan 6, 2024

Try this

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

2 participants