API/Autodoc/Classes/URuStorePayClient.en.md


URuStorePayClient

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

#include <URuStorePayClient.h>

Inherits from UObject, RuStoreSDK::RuStoreListenerContainer

Public Functions

Name
bool GetIsInitialized()
Check if the manager is initialized.
bool Init()
Initializes the singleton URuStorePayClient.
void Dispose()
Deinitializes the singleton if no further work with the object is planned.
void ConditionalBeginDestroy()
long GetUserAuthorizationStatus(TFunction< void(long, EURuStorePayUserAuthorizationStatus)> onSuccess, TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure)
Check the user authorization status.
long GetPurchaseAvailability(TFunction< void(long, TSharedPtr< FURuStorePayPurchaseAvailabilityResult, ESPMode::ThreadSafe >)> onSuccess, TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure)
Check payment availability. If all conditions are met, FURuStorePayPurchaseAvailabilityResult::isAvailable == true is returned. Otherwise, FURuStorePayPurchaseAvailabilityResult::isAvailable == false is returned.
long GetProducts(TArray< URuStorePayProductId * > & productIds, TFunction< void(long, TSharedPtr< TArray< FURuStorePayProduct >, ESPMode::ThreadSafe >)> onSuccess, TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure)
Get the list of products added to your application via the RuStore console.
long GetPurchases(TFunction< void(long, TSharedPtr< TArray< FURuStorePayPurchase >, ESPMode::ThreadSafe >)> onSuccess, TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure)
Get the list of user purchases.
long GetPurchases(bool bUseProductType, bool bUsePurchaseStatusFilter, bool bUseAcknowledgementState, EURuStorePayProductType productType, EURuStorePayPurchaseStatusFilter purchaseStatusFilter, EURuStorePayAcknowledgementState acknowledgementState, TFunction< void(long, TSharedPtr< TArray< FURuStorePayPurchase >, ESPMode::ThreadSafe >)> onSuccess, TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure)
Get the list of user purchases.
long GetPurchase(URuStorePayPurchaseId * purchaseId, TFunction< void(long, TSharedPtr< FURuStorePayPurchase, ESPMode::ThreadSafe >)> onSuccess, TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure)
Get purchase information.
long Purchase(FURuStorePayProductPurchaseParams & productPurchaseParams, EURuStorePayPreferredPurchaseType preferredPurchaseType, EURuStorePaySdkTheme sdkTheme, TFunction< void(long, TSharedPtr< FURuStorePayProductPurchaseResult, ESPMode::ThreadSafe >)> onSuccess, TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure, TSharedPtr< RuStoreSDK::Pay::PurchaseEventListenerImpl, ESPMode::ThreadSafe > purchaseEventListener =nullptr)
Purchase a product.
long PurchaseTwoStep(FURuStorePayProductPurchaseParams & productPurchaseParams, EURuStorePaySdkTheme sdkTheme, TFunction< void(long, TSharedPtr< FURuStorePayProductPurchaseResult, ESPMode::ThreadSafe >)> onSuccess, TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure, TSharedPtr< RuStoreSDK::Pay::PurchaseEventListenerImpl, ESPMode::ThreadSafe > purchaseEventListener =nullptr)
Purchase a product with two-stage payment.
long ConfirmTwoStepPurchase(URuStorePayPurchaseId * purchaseId, URuStorePayDeveloperPayload * developerPayload, TFunction< void(long)> onSuccess, TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure)
Consume (confirm) a purchase. After confirmation, the purchase status changes to CONFIRMED. The consume (confirm) request must be accompanied by the delivery of the product.
long CancelTwoStepPurchase(URuStorePayPurchaseId * purchaseId, TFunction< void(long)> onSuccess, TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure)
Cancel a purchase. The consume (confirm) request must be accompanied by the delivery of the product.
long UpdateAcknowledgementState(URuStorePayPurchaseId * purchaseId, EURuStorePayAcknowledgementState state, URuStorePayDeveloperPayload * developerPayload, TFunction< void(long, EURuStorePayAcknowledgementState)> onSuccess, TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure)
Update the purchase acknowledgement state.
bool IsRuStoreInstalled()
Check if RuStore is installed on the user’s device.
URuStorePayClient * Instance()
Get the URuStorePayClient instance.
URuStorePayProductId * MakeProductId(FString productId)
Creates a product identifier object.
TArray< URuStorePayProductId * > MakeProductIdArray(TArray< FString > productIds)
Creates an array of product identifier objects.
URuStorePayQuantity * MakeQuantity(int value =1)
Creates an object representing the product quantity.
URuStorePayOrderId * MakeOrderId(FString value)
Creates a unique payment identifier object.
URuStorePayDeveloperPayload * MakeDeveloperPayload(FString value)
Creates a developer payload object.
URuStorePayAppUserId * MakeAppUserId(FString value)
Creates an internal user ID object.
URuStorePayAppUserEmail * MakeAppUserEmail(FString value)
Creates a user email address object.
FURuStorePayProductPurchaseParams MakeProductPurchaseParams(URuStorePayProductId * productId, URuStorePayAppUserEmail * appUserEmail =nullptr, URuStorePayAppUserId * appUserId =nullptr, URuStorePayDeveloperPayload * developerPayload =nullptr, URuStorePayOrderId * orderId =nullptr, URuStorePayQuantity * quantity =nullptr)
Creates a product purchase parameters structure.

Public Attributes

Name
const FString PluginVersion — Plugin version.

Additional inherited members

Public Functions inherited from RuStoreSDK::RuStoreListenerContainer

Name
TSharedPtr< RuStoreListener, ESPMode::ThreadSafe > ListenerBind(RuStoreListener * item)
void ListenerUnbind(long id)
void ListenerUnbind(RuStoreListener * item)
void ListenerUnbind(TSharedPtr< RuStoreListener, ESPMode::ThreadSafe > item)
void ListenerRemoveAll()

function GetIsInitialized

bool GetIsInitialized()

Check if the manager is initialized.

Return: Returns true if the singleton is initialized, otherwise false.

function Init

bool Init()

Initializes the singleton URuStorePayClient.

Return: Returns true if initialization was successful, otherwise false.

function Dispose

void Dispose()

Deinitializes the singleton if no further work with the object is planned.

function ConditionalBeginDestroy

void ConditionalBeginDestroy()

function GetUserAuthorizationStatus

long GetUserAuthorizationStatus(
    TFunction< void(long, EURuStorePayUserAuthorizationStatus)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Check the user authorization status.

Parameters:

  • onSuccess Action performed upon successful completion. Returns requestId (long) and an EURuStorePayUserAuthorizationStatus value with information about the user authorization status.
  • onFailure Action performed in case of an error. Returns requestId (long) and an FURuStoreError object with error information.

Return: Returns a requestId unique within a single application launch.

function GetPurchaseAvailability

long GetPurchaseAvailability(
    TFunction< void(long, TSharedPtr< FURuStorePayPurchaseAvailabilityResult, ESPMode::ThreadSafe >)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Check payment availability. If all conditions are met, FURuStorePayPurchaseAvailabilityResult::isAvailable == true is returned. Otherwise, FURuStorePayPurchaseAvailabilityResult::isAvailable == false is returned.

Parameters:

  • onSuccess Action performed upon successful completion. Returns requestId (long) and an FURuStorePayPurchaseAvailabilityResult object with information about payment availability.
  • onFailure Action performed in case of an error. Returns requestId (long) and an FURuStoreError object with error information.

Return: Returns a requestId unique within a single application launch.

function GetProducts

long GetProducts(
    TArray< URuStorePayProductId * > & productIds,
    TFunction< void(long, TSharedPtr< TArray< FURuStorePayProduct >, ESPMode::ThreadSafe >)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Get the list of products added to your application via the RuStore console.

Parameters:

  • productIds List of product identifiers (defined when creating the product in the developer console). The list has a maximum size of 1000 elements.
  • onSuccess Action performed upon successful completion. Returns requestId (long) and a list of FURuStorePayProduct objects with product information.
  • onFailure Action performed in case of an error. Returns requestId (long) and an FURuStoreError object with error information.

Return: Returns a requestId unique within a single application launch.

function GetPurchases

long GetPurchases(
    TFunction< void(long, TSharedPtr< TArray< FURuStorePayPurchase >, ESPMode::ThreadSafe >)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Get the list of user purchases.

Parameters:

  • onSuccess Action performed upon successful completion. Returns requestId (long) and a list of FURuStorePayPurchase objects with purchase information.
  • onFailure Action performed in case of an error. Returns requestId (long) and an FURuStoreError object with error information.

Return: Returns a requestId unique within a single application launch.

function GetPurchases

long GetPurchases(
    bool bUseProductType,
    bool bUsePurchaseStatusFilter,
    bool bUseAcknowledgementState,
    EURuStorePayProductType productType,
    EURuStorePayPurchaseStatusFilter purchaseStatusFilter,
    EURuStorePayAcknowledgementState acknowledgementState,
    TFunction< void(long, TSharedPtr< TArray< FURuStorePayPurchase >, ESPMode::ThreadSafe >)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Get the list of user purchases.

Parameters:

  • bUseProductType Indicates whether to filter by product type.
  • bUsePurchaseStatusFilter Indicates whether to filter by purchase status.
  • bUseAcknowledgementState Indicates whether to filter by acknowledgement state.
  • productType Product type filter.
  • purchaseStatusFilter Purchase status filter.
  • acknowledgementState Acknowledgement state filter.
  • onSuccess Action performed upon successful completion. Returns requestId (long) and a list of FURuStorePayPurchase objects with purchase information.
  • onFailure Action performed in case of an error. Returns requestId (long) and an FURuStoreError object with error information.

Return: Returns a requestId unique within a single application launch.

function GetPurchase

long GetPurchase(
    URuStorePayPurchaseId * purchaseId,
    TFunction< void(long, TSharedPtr< FURuStorePayPurchase, ESPMode::ThreadSafe >)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Get purchase information.

Parameters:

  • purchaseId Purchase identifier.
  • onSuccess Action performed upon successful completion. Returns requestId (long) and an FURuStorePayPurchase object with purchase information.
  • onFailure Action performed in case of an error. Returns requestId (long) and an FURuStoreError object with error information.

Return: Returns a requestId unique within a single application launch.

function Purchase

long Purchase(
    FURuStorePayProductPurchaseParams & productPurchaseParams,
    EURuStorePayPreferredPurchaseType preferredPurchaseType,
    EURuStorePaySdkTheme sdkTheme,
    TFunction< void(long, TSharedPtr< FURuStorePayProductPurchaseResult, ESPMode::ThreadSafe >)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure,
    TSharedPtr< RuStoreSDK::Pay::PurchaseEventListenerImpl, ESPMode::ThreadSafe > purchaseEventListener =nullptr
)

Purchase a product.

Parameters:

  • productPurchaseParams Product purchase parameters.
  • preferredPurchaseType Preferred purchase type.
  • sdkTheme SDK theme.
  • onSuccess Action performed upon successful completion. Returns requestId (long) and an FURuStorePayProductPurchaseResult object with the purchase result.
  • onFailure Action performed in case of an error. Returns requestId (long) and an FURuStoreError object with error information.
  • purchaseEventListener Event listener for purchase events.

Return: Returns a requestId unique within a single application launch.

function PurchaseTwoStep

long PurchaseTwoStep(
    FURuStorePayProductPurchaseParams & productPurchaseParams,
    EURuStorePaySdkTheme sdkTheme,
    TFunction< void(long, TSharedPtr< FURuStorePayProductPurchaseResult, ESPMode::ThreadSafe >)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure,
    TSharedPtr< RuStoreSDK::Pay::PurchaseEventListenerImpl, ESPMode::ThreadSafe > purchaseEventListener =nullptr
)

Purchase a product with two-stage payment.

Parameters:

  • productPurchaseParams Product purchase parameters.
  • sdkTheme SDK theme.
  • onSuccess Action performed upon successful completion. Returns requestId (long) and an FURuStorePayProductPurchaseResult object with the purchase result.
  • onFailure Action performed in case of an error. Returns requestId (long) and an FURuStoreError object with error information.
  • purchaseEventListener Event listener for purchase events.

Return: Returns a requestId unique within a single application launch.

function ConfirmTwoStepPurchase

long ConfirmTwoStepPurchase(
    URuStorePayPurchaseId * purchaseId,
    URuStorePayDeveloperPayload * developerPayload,
    TFunction< void(long)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Consume (confirm) a purchase. After confirmation, the purchase status changes to CONFIRMED. The consume (confirm) request must be accompanied by the delivery of the product.

Parameters:

  • purchaseId Purchase identifier.
  • developerPayload Developer payload.
  • onSuccess Action performed upon successful completion. Returns requestId (long).
  • onFailure Action performed in case of an error. Returns requestId (long) and an FURuStoreError object with error information.

Return: Returns a requestId unique within a single application launch.

function CancelTwoStepPurchase

long CancelTwoStepPurchase(
    URuStorePayPurchaseId * purchaseId,
    TFunction< void(long)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Cancel a purchase. The consume (confirm) request must be accompanied by the delivery of the product.

Parameters:

  • purchaseId Purchase identifier.
  • onSuccess Action performed upon successful completion. Returns requestId (long).
  • onFailure Action performed in case of an error. Returns requestId (long) and an FURuStoreError object with error information.

Return: Returns a requestId unique within a single application launch.

function UpdateAcknowledgementState

long UpdateAcknowledgementState(
    URuStorePayPurchaseId * purchaseId,
    EURuStorePayAcknowledgementState state,
    URuStorePayDeveloperPayload * developerPayload,
    TFunction< void(long, EURuStorePayAcknowledgementState)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Update the purchase acknowledgement state.

Parameters:

  • purchaseId Purchase identifier.
  • state New acknowledgement state.
  • developerPayload Developer payload.
  • onSuccess Action performed upon successful completion. Returns requestId (long) and the updated EURuStorePayAcknowledgementState.
  • onFailure Action performed in case of an error. Returns requestId (long) and an FURuStoreError object with error information.

Return: Returns a requestId unique within a single application launch.

function IsRuStoreInstalled

bool IsRuStoreInstalled()

Check if RuStore is installed on the user’s device.

Return: Returns true if RuStore is installed, otherwise false.

function Instance

URuStorePayClient * Instance()

Get the URuStorePayClient instance.

Return: Returns a pointer to the URuStorePayClient singleton instance.

function MakeProductId

URuStorePayProductId * MakeProductId(
    FString productId
)

Creates a product identifier object.

Parameters:

  • productId Product identifier string.

Return: Returns a pointer to the created URuStorePayProductId object.

function MakeProductIdArray

TArray< URuStorePayProductId * > MakeProductIdArray(
    TArray< FString > productIds
)

Creates an array of product identifier objects.

Parameters:

  • productIds Array of product identifier strings.

Return: Returns an array of pointers to URuStorePayProductId objects.

function MakeQuantity

URuStorePayQuantity * MakeQuantity(
    int value =1
)

Creates an object representing the product quantity.

Parameters:

  • value Quantity value (default 1).

Return: Returns a pointer to the created URuStorePayQuantity object.

function MakeOrderId

URuStorePayOrderId * MakeOrderId(
    FString value
)

Creates a unique payment identifier object.

Parameters:

  • value Identifier string.

Return: Returns a pointer to the created URuStorePayOrderId object.

function MakeDeveloperPayload

URuStorePayDeveloperPayload * MakeDeveloperPayload(
    FString value
)

Creates a developer payload object.

Parameters:

  • value Payload string.

Return: Returns a pointer to the created URuStorePayDeveloperPayload object.

function MakeAppUserId

URuStorePayAppUserId * MakeAppUserId(
    FString value
)

Creates an internal user ID object.

Parameters:

  • value User ID string.

Return: Returns a pointer to the created URuStorePayAppUserId object.

function MakeAppUserEmail

URuStorePayAppUserEmail * MakeAppUserEmail(
    FString value
)

Creates a user email address object.

Parameters:

  • value Email string.

Return: Returns a pointer to the created URuStorePayAppUserEmail object.

function MakeProductPurchaseParams

FURuStorePayProductPurchaseParams MakeProductPurchaseParams(
    URuStorePayProductId * productId,
    URuStorePayAppUserEmail * appUserEmail =nullptr,
    URuStorePayAppUserId * appUserId =nullptr,
    URuStorePayDeveloperPayload * developerPayload =nullptr,
    URuStorePayOrderId * orderId =nullptr,
    URuStorePayQuantity * quantity =nullptr
)

Creates a product purchase parameters structure.

Parameters:

  • productId Product identifier.
  • appUserEmail User email (optional).
  • appUserId Internal user ID (optional).
  • developerPayload Developer payload (optional).
  • orderId Unique payment identifier (optional).
  • quantity Product quantity (optional).

Return: Returns an FURuStorePayProductPurchaseParams structure.

function GetPurchases

long GetPurchases(
    TFunction< void(long, TSharedPtr< TArray< FURuStorePayPurchase >, ESPMode::ThreadSafe >)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Retrieves the list of user purchases.

Parameters:

  • onSuccess Action executed upon successful completion of the operation. Returns a requestId of type long and a list of FURuStorePayPurchase objects with purchase information.
  • onFailure Action executed in case of an error. Returns a requestId of type long and an object of type FURuStoreError with error information.

Return: Returns a requestId unique within a single application launch.

function GetPurchases

long GetPurchases(
    bool bUseProductType,
    bool bUsePurchaseStatusFilter,
    bool bUseAcknowledgementState,
    EURuStorePayProductType productType,
    EURuStorePayPurchaseStatusFilter purchaseStatusFilter,
    EURuStorePayAcknowledgementState acknowledgementState,
    TFunction< void(long, TSharedPtr< TArray< FURuStorePayPurchase >, ESPMode::ThreadSafe >)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Retrieves the list of user purchases.

Parameters:

  • bUseProductType Use filtering by product type.
  • bUsePurchaseStatusFilter Use filtering by purchase status.
  • bUseAcknowledgementState Use filtering by purchase acknowledgment state.
  • productType Optional filtering by product type (consumable or non-consumable products).
  • purchaseStatusFilter Optional filtering by purchase status. Supported statuses: PAID and CONFIRMED for purchases, ACTIVE and PAUSED for subscriptions.
  • acknowledgementState Optional filtering by purchase acknowledgment state. Supported states: PENDING, ACKNOWLEDGED, and UNKNOWN.
  • onSuccess Action executed upon successful completion of the operation. Returns a requestId of type long and a list of FURuStorePayPurchase objects with purchase information.
  • onFailure Action executed in case of an error. Returns a requestId of type long and an object of type FURuStoreError with error information.

Return: Returns a requestId unique within a single application launch.

function GetPurchase

long GetPurchase(
    URuStorePayPurchaseId * purchaseId,
    TFunction< void(long, TSharedPtr< FURuStorePayPurchase, ESPMode::ThreadSafe >)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Retrieves information about a purchase.

Parameters:

  • purchaseId The product identifier assigned to the product in the RuStore Console.
  • onSuccess Action executed upon successful completion of the operation. Returns a requestId of type long and an FURuStorePayPurchase object with purchase information.
  • onFailure Action executed in case of an error. Returns a requestId of type long and an object of type FURuStoreError with error information.

Return: Returns a requestId unique within a single application launch.

function Purchase

long Purchase(
    FURuStorePayProductPurchaseParams & productPurchaseParams,
    EURuStorePayPreferredPurchaseType preferredPurchaseType,
    EURuStorePaySdkTheme sdkTheme,
    TFunction< void(long, TSharedPtr< FURuStorePayProductPurchaseResult, ESPMode::ThreadSafe >)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure,
    TSharedPtr< RuStoreSDK::Pay::PurchaseEventListenerImpl, ESPMode::ThreadSafe > purchaseEventListener =nullptr
)

Purchases a product.

Parameters:

  • productPurchaseParams Product purchase parameters.
  • preferredPurchaseType Preferred purchase type.
  • sdkTheme Color theme of the payment sheet.
  • onSuccess Action executed upon successful completion of the operation. Returns a requestId of type long and an object implementing the FURuStorePayProductPurchaseResult interface with information about the purchase result.
  • onFailure Action executed in case of an error. Returns a requestId of type long and an object of type FURuStoreError with error information.
  • purchaseEventListener A set of callback functions that allow receiving data about invoiceId and purchaseId at different stages of the purchase — optional.

Return: Returns a requestId unique within a single application launch.

function PurchaseTwoStep

long PurchaseTwoStep(
    FURuStorePayProductPurchaseParams & productPurchaseParams,
    EURuStorePaySdkTheme sdkTheme,
    TFunction< void(long, TSharedPtr< FURuStorePayProductPurchaseResult, ESPMode::ThreadSafe >)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure,
    TSharedPtr< RuStoreSDK::Pay::PurchaseEventListenerImpl, ESPMode::ThreadSafe > purchaseEventListener =nullptr
)

Purchases a product with two-stage payment.

Parameters:

  • productPurchaseParams Product purchase parameters.
  • sdkTheme Color theme of the payment sheet.
  • onSuccess Action executed upon successful completion of the operation. Returns a requestId of type long and an object implementing the FURuStorePayProductPurchaseResult interface with information about the purchase result.
  • onFailure Action executed in case of an error. Returns a requestId of type long and an object of type FURuStoreError with error information.
  • purchaseEventListener A set of callback functions that allow receiving data about invoiceId and purchaseId at different stages of the purchase — optional.

Return: Returns a requestId unique within a single application launch.

function ConfirmTwoStepPurchase

long ConfirmTwoStepPurchase(
    URuStorePayPurchaseId * purchaseId,
    URuStorePayDeveloperPayload * developerPayload,
    TFunction< void(long)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Consumption (acknowledgment) of a purchase. After calling confirmation, the purchase will transition to the CONFIRMED status. The consumption (acknowledgment) request must be accompanied by the delivery of the product.

Parameters:

  • purchaseId Purchase identifier.
  • developerPayload String containing additional order information (optional parameter).
  • onSuccess Action executed upon successful completion of the operation.
  • onFailure Action executed in case of an error. Returns a requestId of type long and an object of type FURuStoreError with error information.

Return: Returns a requestId unique within a single application launch.

function CancelTwoStepPurchase

long CancelTwoStepPurchase(
    URuStorePayPurchaseId * purchaseId,
    TFunction< void(long)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Cancels a purchase. The consumption (acknowledgment) request must be accompanied by the delivery of the product.

Parameters:

  • purchaseId Purchase identifier.
  • onSuccess Action executed upon successful completion of the operation.
  • onFailure Action executed in case of an error. Returns a requestId of type long and an object of type FURuStoreError with error information.

Return: Returns a requestId unique within a single application launch.

function UpdateAcknowledgementState

long UpdateAcknowledgementState(
    URuStorePayPurchaseId * purchaseId,
    EURuStorePayAcknowledgementState state,
    URuStorePayDeveloperPayload * developerPayload,
    TFunction< void(long, EURuStorePayAcknowledgementState)> onSuccess,
    TFunction< void(long, TSharedPtr< FURuStoreError, ESPMode::ThreadSafe >)> onFailure
)

Updates the purchase acknowledgment state.

Parameters:

  • purchaseId Purchase identifier.
  • state New purchase acknowledgment state.
  • developerPayload String containing additional order information (optional parameter).
  • onSuccess Action executed upon successful completion of the operation. Returns a requestId of type long and an EURuStorePayAcknowledgementState value with the new purchase acknowledgment state.
  • onFailure Action executed in case of an error. Returns a requestId of type long and an object of type FURuStoreError with error information.

Return: Returns a requestId unique within a single application launch.

function IsRuStoreInstalled

bool IsRuStoreInstalled()

Checks whether RuStore is installed on the user’s device.

Return: Returns true if RuStore is installed, otherwise false.

function Instance

static URuStorePayClient * Instance()

Gets the instance of URuStorePayClient.

Return: Returns a pointer to the single instance of URuStorePayClient (Singleton pattern implementation). If the instance has not been created yet, it creates one.

function MakeProductId

static URuStorePayProductId * MakeProductId(
    FString productId
)

Creates a product identifier object.

Parameters:

  • productId String containing the identifier.

Return: An object of type URuStorePayProductId.

function MakeProductIdArray

static TArray< URuStorePayProductId * > MakeProductIdArray(
    TArray< FString > productIds
)

Creates an array of product identifier objects.

Parameters:

  • productIds Array of strings representing product identifiers.

Return: Array of pointers to objects of type URuStorePayProductId.

function MakeQuantity

static URuStorePayQuantity * MakeQuantity(
    int value =1
)

Creates an object representing the product quantity.

Parameters:

  • value Integer value representing the product quantity. Default is 1.

Return: An object of type URuStorePayQuantity.

function MakeOrderId

static URuStorePayOrderId * MakeOrderId(
    FString value
)

Creates a unique payment identifier object.

Parameters:

  • value String containing the identifier.

Return: An object of type URuStorePayOrderId.

function MakeDeveloperPayload

static URuStorePayDeveloperPayload * MakeDeveloperPayload(
    FString value
)

Creates a developer payload object.

Parameters:

  • value String containing additional order information.

Return: An object of type URuStorePayDeveloperPayload.

function MakeAppUserId

static URuStorePayAppUserId * MakeAppUserId(
    FString value
)

Creates an internal user ID object in the application.

Parameters:

  • value String representing the identifier.

Return: An object of type URuStorePayAppUserId.

function MakeAppUserEmail

static URuStorePayAppUserEmail * MakeAppUserEmail(
    FString value
)

Creates a user email address object.

Parameters:

  • value String representing the email address.

Return: An object of type URuStorePayAppUserEmail.

function MakeProductPurchaseParams

static FURuStorePayProductPurchaseParams MakeProductPurchaseParams(
    URuStorePayProductId * productId,
    URuStorePayAppUserEmail * appUserEmail =nullptr,
    URuStorePayAppUserId * appUserId =nullptr,
    URuStorePayDeveloperPayload * developerPayload =nullptr,
    URuStorePayOrderId * orderId =nullptr,
    URuStorePayQuantity * quantity =nullptr
)

Creates a product purchase parameters structure.

Parameters:

  • productId The product identifier specified when creating the product in the developer console.
  • appUserEmail User email address — optional.
  • appUserId Internal user ID in the application — optional.
  • developerPayload Developer-specified string containing additional order information — optional.
  • orderId Unique payment identifier, specified by the developer or generated automatically (uuid) — optional.
  • quantity Product quantity — optional.

Return: An object of type FURuStorePayProductPurchaseParams with purchase parameter information.

variable PluginVersion

static const FString PluginVersion = "10.5.0";

Plugin version.

Назад