0 votes

Recently they've dropped the old system for the new plugin, and the docs page information is very limited, and the demo project leads to a 404 error. I was hoping someone could explain a few things to me, or point me to some resources, I've read this, but it really doesn't go into much detail about how it works, additionally, the excerpts throw syntax errors, because they reference variables that are not declared. Are these in the singleton? It doesn't seem to be an ordinary gd script, so I'm not sure how to add the singleton and access the variables that the doc recommends.

So, can someone explain:
1. At what point do you query an SKU, and when do you acknowledge the purchase?
2. Does the singleton throw a signal when the item is paid for in the play store?
3. The docs list a "full example", here:

func _on_connected():
   payment.querySkuDetails(["my_iap_item"], "inapp") # "subs" for subscriptions

func _on_sku_details_query_completed(sku_details):
    for available_sku in sku_details:
    print(available_sku)

Where are available_sku and sku_details declared?
4. The docs say queryPurchases will return a dictionary with all the purchases and an error code. Where are these error codes, to help us interpret whatever issues might arise?

in Engine by (273 points)

Did you find an answer tot his?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.