You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using logcat | grep godot to checking the output.
+++
If using iap.purchase("pid1") and return godot : purchase_success : pid1.
But when I exit game then comeback, it's not return has_purchased : pid1 as I expect.
+++
If I set iap.set_auto_consume(false) at the beginning of the game, my purchased item return has_purchased : pid1 after I exit the game.
So if my game has both Consumables and Non-Consumables, how can I save my items purchased.
+++
I try to test iap.consume("pid1") (replace my source code iap.purchase("pid1")), but it's not return anything. Steps to reproduce:
1/ Set up IAP and set purchase button:
a. iap.sku_details_query(["pid1"]) iap.connect("has_purchased",self,"iap_has_purchased") iap.request_purchased() #iap.set_auto_consume(false)
.... func iap_has_purchased(item_name): print("iap_has_purchased :: " + str(item_name))
b. func _on_NoAds_pressed() -> void: iap.purchase("pid1") #iap.consume("pid1") iap.connect("purchase_success",self,"iap_purchase_success") iap.connect("consume_success",self,"on_consume_success")
2/ Remove comment iap.set_auto_consume(false)
3/ Comment #iap.set_auto_consume(false) and #iap.purchase("pid1")
Remove comment iap.consume("pid1")
=> not return anything. Minimal reproduction project:
The text was updated successfully, but these errors were encountered:
Is this problem new for 3.1?
I haven't used inapp in a while but consume() method is not meant to return anything as far as I remember. You should implement consume_sucess signal. The function linked to this signal is a good place to provide the item to the user. Also as far as I know you can't just consume item just after sending a request to purchase it - because of how network communication works you first need to wait for the purchase_success signal call (before this call client can't know if the item has been purchased successfully)
Is this problem new for 3.1?
I haven't used inapp in a while but consume() method is not meant to return anything as far as I remember. You should implement consume_sucess signal. The function linked to this signal is a good place to provide the item to the user. Also as far as I know you can't just consume item just after sending a request to purchase it - because of how network communication works you first need to wait for the purchase_success signal call (before this call client can't know if the item has been purchased successfully)
I have not test on other version. The consume() function does not return anything on play.google.com > Order management. With purchase("pid1"), Order management changed status to Charged but when I check on logcat, it's still not return has_purchased : pid1
Godot version:
Godot 3.1 beta 3
OS/device including version:
Android
Issue description:
I am using
logcat | grep godot
to checking the output.+++
If using
iap.purchase("pid1")
and returngodot : purchase_success : pid1
.But when I exit game then comeback, it's not return
has_purchased : pid1
as I expect.+++
If I set
iap.set_auto_consume(false)
at the beginning of the game, my purchased item returnhas_purchased : pid1
after I exit the game.So if my game has both Consumables and Non-Consumables, how can I save my items purchased.
+++
I try to test
iap.consume("pid1")
(replace my source codeiap.purchase("pid1")
), but it's not return anything.Steps to reproduce:
1/ Set up IAP and set purchase button:
a.
iap.sku_details_query(["pid1"])
iap.connect("has_purchased",self,"iap_has_purchased")
iap.request_purchased()
#iap.set_auto_consume(false)
....
func iap_has_purchased(item_name):
print("iap_has_purchased :: " + str(item_name))
b.
func _on_NoAds_pressed() -> void:
iap.purchase("pid1")
#iap.consume("pid1")
iap.connect("purchase_success",self,"iap_purchase_success")
iap.connect("consume_success",self,"on_consume_success")
2/ Remove comment
iap.set_auto_consume(false)
3/ Comment
#iap.set_auto_consume(false)
and#iap.purchase("pid1")
Remove comment
iap.consume("pid1")
=> not return anything.
Minimal reproduction project:
The text was updated successfully, but these errors were encountered: