Godot Version 4.6
I’m trying to connect In-Game Purchases. (for Yandex Games)
I don’t understand what needs to be written in the config file.
I only understand what “test_product” needs to be replaced with.
What should I write instead of “playgama”, “amount”, “playdeck”, “amount”, “description”?
"payments": [
{
"id": "test_product",
"playgama": {
"amount": 1 // int price in Gam
},
"playdeck": {
"amount": 1, // int price in Telegram Stars
"description": "TEST PRODUCT"
}
}
]
(after exporting the project) when calling this function success always returns false and purchases returns only [ ]
func _ready():
Bridge.payments.get_purchases(Callable(self, "_on_get_purchases_completed"))
func _on_get_purchases_completed(success, purchases):
print(success)
What should I write in var options = { } or can I leave it empty?
func _ready():
var id = "test_product" # id you specified in the config file
var options = { } # optional
Bridge.payments.purchase(id, options, Callable(self, "_on_purchase_completed"))
func _on_purchase_completed(success, purchase):
print(success)
print(purchase)