Closed Biran0 closed 2 years ago
purchase.products is a dictionary, so you need to check like that:
if "your_product" in purchase["products"]:
the check itself, performed like that, works for me without issues.
Thank you!
Indeed
if "your_product" in purchase["products"]:
works perfectly!
I will update my post on Reddit ,so I wont confuse any people there.
Is it normal that
if purchase.products == .. returns always True ?
I have only one product for in app purchase (Full_game). And purchase.products indeed returns "Full_game" but when I try to check
if purchase.products == "what-ever-I-put-here" it returns always True
(I can purchase product fine, and acknowledge purchase fine, I just cant get name of already purchased products)
I tried to get my product name using Purchase.getSkus() but it crashes
..from the notes of the change-log for GodotGooglePlayBilling.2.0.0 , it looks like I should call inside
func _on_query_purchases_response(query_result): var scus = query_result.getSkus()
right?
ps: I also tried
for purchase in query_result.purchases: var scus = purchase.getSkus()
ps2: I'm trying to figure it out (asking in Reddit etc) for almost a month now. (purchases etc work fine , its just very difficult to find out how to get name of already purchased products)
Thank you.