godot-google-play-billing
godot-google-play-billing copied to clipboard
SOLVED: subscription_offer_details=null for subscriptions in billing-v5
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"
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:
I created a PR for this fix: https://github.com/godotengine/godot-google-play-billing/pull/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
Try this