how do i use GodotGooglePlayBilling addons , or how can i impliment in-app purchase in godot ....?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By pixistone

i am trying to implement a add remove in-app purchase system… i am not legendary in godot. so i need help, i have watched ( Android in-app purchases — Godot Engine (stable) documentation in English )…
but, i am dum… i create a GodotGooglePlayBilling.gd with node2d and setup it as autoload… with this coad,
var payment

func _ready():
if Engine.has_singleton(“GodotGooglePlayBilling”):
payment = Engine.get_singleton(“GodotGooglePlayBilling”)

    # These are all signals supported by the API
    # You can drop some of these based on your needs
    payment.connect("connected", self, "_on_connected") # No params
    payment.connect("disconnected", self, "_on_disconnected") # No params
    payment.connect("connect_error", self, "_on_connect_error") # Response ID (int), Debug message (string)
    payment.connect("purchases_updated", self, "_on_purchases_updated") # Purchases (Dictionary[])
    payment.connect("purchase_error", self, "_on_purchase_error") # Response ID (int), Debug message (string)
    payment.connect("sku_details_query_completed", self, "_on_sku_details_query_completed") # SKUs (Dictionary[])
    payment.connect("sku_details_query_error", self, "_on_sku_details_query_error") # Response ID (int), Debug message (string), Queried SKUs (string[])
    payment.connect("purchase_acknowledged", self, "_on_purchase_acknowledged") # Purchase token (string)
    payment.connect("purchase_acknowledgement_error", self, "_on_purchase_acknowledgement_error") # Response ID (int), Debug message (string), Purchase token (string)
    payment.connect("purchase_consumed", self, "_on_purchase_consumed") # Purchase token (string)
    payment.connect("purchase_consumption_error", self, "_on_purchase_consumption_error") # Response ID (int), Debug message (string), Purchase token (string)

    payment.startConnection()
else:
    print("Android IAP support is not enabled. Make sure you have enabled 'Custom Build' and the GodotGooglePlayBilling plugin in your Android export settings! IAP will not work.")

but its showing…
Android IAP support is not enabled. Make sure you have enabled ‘Custom Build’ and the GodotGooglePlayBilling plugin in your Android export settings! IAP will not work.

:bust_in_silhouette: Reply From: Bernard Cloutier

but its showing…
Android IAP support is not enabled. Make sure you have enabled ‘Custom Build’ and the GodotGooglePlayBilling plugin in your Android export settings! IAP will not work.

That message comes from the else part of the code you posted. Meaning this if statement is failing: if Engine.has_singleton("GodotGooglePlayBilling")

Did you put the plugin binary from the release page in res://android/plugins? Just copy-pasting the _ready function won’t work if you don’t have the plugin.