API/Autodoc/Classes/RuStoreGodotPayClient.en.md


RuStoreGodotPayClient

class_name RuStoreGodotPayClient extends Object

The class implements API for integrating payments into a mobile application.

Public Member Functions

static func get_instance() -> RuStoreGodotPayClient:
Get the RuStoreGodotPayClient instance.
Returns a pointer to the only RuStoreGodotPayClient instance (Singleton pattern implementation).
If the instance does not exist yet, creates it.
func get_user_authorization_status():
Checking the user's authorization status.
func get_purchase_availability():
Checking payment availability.
func is_rustore_installed() -> bool:
Check if RuStore is installed on the user's device.
Returns true if RuStore is installed, otherwise false.
func get_products(productIds: Array[RuStorePayProductId]):
Retrieve a list of products added to your application via the RuStore console.
productIds — List of product identifiers (set when creating a product in the developer console).
The product list is limited to 1000 items.
func get_purchases(product_type: Variant = null, # ERuStorePayProductType.Item purchase_status: Variant = null # ERuStorePayPurchaseStatusFilter.Item):
Retrieve the list of user purchases.
func get_purchase(purchase_id: RuStorePayPurchaseId):
Retrieve purchase information.
purchaseId — Product identifier assigned to the product in the RuStore console.
func purchase(parameters: RuStorePayProductPurchaseParams, preferred_purchase_type: ERuStorePayPreferredPurchaseType.Item = ERuStorePayPreferredPurchaseType.Item.ONE_STEP, sdk_theme: ERuStorePaySdkTheme.Item = ERuStorePaySdkTheme.Item.LIGHT, enable_purchase_event_listener: bool = false,):
Purchase product.
parameters — Product purchase parameters.
preferred_purchase_type — Preferred purchase type.
sdk_theme — Color theme of the payment sheet.
enable_purchase_event_listener — Additional set of callback functions.
func purchase_two_step(parameters: RuStorePayProductPurchaseParams, sdk_theme: ERuStorePaySdkTheme.Item = ERuStorePaySdkTheme.Item.LIGHT, enable_purchase_event_listener: bool = false,):
Purchase product with two-stage payment.
parameters — Product purchase parameters.
sdk_theme — Color theme of the payment sheet.
enable_purchase_event_listener — Additional set of callback functions.
func confirm_two_step_purchase(purchase_id: RuStorePayPurchaseId, developer_payload: RuStorePayDeveloperPayload = null):
Consumption (confirmation) of purchase.
After calling confirmation, the purchase will transition to CONFIRMED status.
The request for consumption (confirmation) of the purchase must be accompanied by the issuance of the item.
purchase_id — Purchase identifier.
developer_payload — A string containing additional order information (optional parameter).
func cancel_two_step_purchase(purchase_id: RuStorePayPurchaseId):
Cancel purchase.
The request for consumption (confirmation) of the purchase must be accompanied by the issuance of the item.
purchase_id — Purchase identifier.

Signals

signal on_get_user_authorization_status_success
Action performed when the get_user_authorization_status operation completes successfully.
signal on_get_user_authorization_status_failure
Action performed in case of error in get_user_authorization_status.
signal on_get_purchase_availability_success
Action performed when the get_purchase_availability operation completes successfully.
signal on_get_purchase_availability_failure
Action performed in case of error in get_purchase_availability.
signal on_get_products_success
Action performed when the get_products operation completes successfully.
signal on_get_products_failure
Action performed in case of error in get_products.
signal on_get_purchases_success
Action performed when the get_purchases operation completes successfully.
signal on_get_purchases_failure
Action performed in case of error in get_purchases.
signal on_get_purchase_success
Action performed when the get_purchase operation completes successfully.
signal on_get_purchase_failure
Action performed in case of error in get_purchase.
signal on_purchase_success
Action performed when the purchase operation completes successfully.
signal on_purchase_failure
Action performed in case of error in purchase.
signal on_purchase_two_step_success
Action performed when the purchase_two_step operation completes successfully.
signal on_purchase_two_step_failure
Action performed in case of error in purchase_two_step.
signal on_confirm_two_step_purchase_success
Action performed when the confirm_two_step_purchase operation completes successfully.
signal on_confirm_two_step_purchase_failure
Action performed in case of error in confirm_two_step_purchase.
signal on_cancel_two_step_purchase_success
Action performed when the cancel_two_step_purchas operation completes successfully.
signal on_cancel_two_step_purchase_failure
Action performed in case of error in cancel_two_step_purchas.
signal on_payment_completed
Action performed when payment completes successfully.
signal on_payment_failed
Action performed when payment fails.
signal on_payment_started
Action performed when the payment process starts.
signal on_purchase_cancelled
Action performed when the purchase is cancelled by the user.
signal on_purchase_created
Action performed when a purchase is created.
Назад