Xsolla::Orders::XsollaOrders
Public Functions
| Name | |
|---|---|
| static void | OpenPurchaseUI(string paymentToken, bool forcePlatformBrowser =false, Action< BrowserCloseInfo > onBrowserClosed =null) Opens Pay Station in the browser with a retrieved Pay Station token. |
| static void | CheckOrderStatus(int orderId, Action< OrderStatus > onSuccess, Action< Error > onError, SdkType sdkType =SdkType.Store) Returns status of the specified order. |
| static void | CreatePaymentToken(float amount, string currency, string description, Action< PaymentToken > onSuccess, Action< Error > onError, string locale =null, string externalID =null, int? paymentMethod =null, object customParameters =null, PurchaseParams purchaseParams =null) Creates a new payment token. |
| static void | CreatePaymentToken(float amount, string currency, PaymentTokenItem[] items, Action< PaymentToken > onSuccess, Action< Error > onError, string locale =null, string externalID =null, int? paymentMethod =null, object customParameters =null, PurchaseParams purchaseParams =null) Creates a new payment token. |
| static void | GetUnprocessedEvents(Action< Events > onSuccess, Action< Error > onError) Get unprocessed events for user. NOTE: Enable the XsollaEvent API before using this method. For setup instructions, see the documentation. |
| static void | MarkEventAsProcessed(int eventId, Action onSuccess, Action< Error > onError) Mark event as processed. NOTE: Enable the XsollaEvent API before using this method. For setup instructions, see the documentation. |
Public Functions Documentation
function OpenPurchaseUI
- C#
1static void OpenPurchaseUI(
2 string paymentToken,
3 bool forcePlatformBrowser =false,
4 Action< BrowserCloseInfo > onBrowserClosed =null
5)
Opens Pay Station in the browser with a retrieved Pay Station token.
More about the use cases:
- Cart purchase
- Purchase in one click
- Ordering free itemspaymentTokenPay Station token for the purchase.
forcePlatformBrowserWhether to force platform browser usage ignoring plug-in settings.
onBrowserClosedCalled after the browser was closed.
XsollaWebBrowser
function CheckOrderStatus
- C#
1static void CheckOrderStatus(
2 int orderId,
3 Action< OrderStatus > onSuccess,
4 Action< Error > onError,
5 SdkType sdkType =SdkType.Store
6)
Returns status of the specified order.
Parameters:
- orderId Unique order identifier.
- onSuccess Called after server response.
- onError Called after the request resulted with an error.
- sdkType SDK type. Used for internal analytics.
See: XsollaCatalog.CreateOrderByVirtualCurrency
function CreatePaymentToken
- C#
1static void CreatePaymentToken(
2 float amount,
3 string currency,
4 string description,
5 Action< PaymentToken > onSuccess,
6 Action< Error > onError,
7 string locale =null,
8 string externalID =null,
9 int? paymentMethod =null,
10 object customParameters =null,
11 PurchaseParams purchaseParams =null
12)
Creates a new payment token.
Parameters:
- amount The total amount to be paid by the user.
- currency Default purchase currency (USD by default). Three-letter currency code per ISO 4217. Check the documentation for detailed information about currencies supported by Xsolla.
- description Purchase description. Used to describe the purchase if there are no specific items.
- onSuccess Called after the successful item purchase.
- onError Called after the request resulted with an error.
- locale Interface language. Two-letter lowercase language code. Leave empty to use the default value.
- externalID Transaction’s external ID.
- paymentMethod Payment method ID.
- customParameters Project specific parameters represented as a valid JSON set of key-value pairs.
- purchaseParams Additional purchase parameters used for user payload fields (e.g., mapping to
user.mobile_app.install_sourceand platform metadata).
function CreatePaymentToken
- C#
1static void CreatePaymentToken(
2 float amount,
3 string currency,
4 PaymentTokenItem[] items,
5 Action< PaymentToken > onSuccess,
6 Action< Error > onError,
7 string locale =null,
8 string externalID =null,
9 int? paymentMethod =null,
10 object customParameters =null,
11 PurchaseParams purchaseParams =null
12)
Creates a new payment token.
Parameters:
- amount The total amount to be paid by the user.
- currency Default purchase currency (USD by default). Three-letter currency code per ISO 4217. Check the documentation for detailed information about currencies supported by Xsolla.
- items Used to describe a purchase if it includes a list of specific items.
- onSuccess Called after the successful item purchase.
- onError Called after the request resulted with an error.
- locale Interface language. Two-letter lowercase language code. Leave empty to use the default value.
- externalID Transaction’s external ID.
- paymentMethod Payment method ID.
- customParameters Project specific parameters represented as a valid JSON set of key-value pairs.
- purchaseParams Additional purchase parameters used for user payload fields (e.g., mapping to
user.mobile_app.install_sourceand platform metadata).
function GetUnprocessedEvents
- C#
1static void GetUnprocessedEvents(
2 Action< Events > onSuccess,
3 Action< Error > onError
4)
Get unprocessed events for user. NOTE: Enable the XsollaEvent API before using this method. For setup instructions, see the documentation.
Parameters:
- onSuccess Called after receiving data successfully.
- onError Called after the request resulted with an error.
function MarkEventAsProcessed
- C#
1static void MarkEventAsProcessed(
2 int eventId,
3 Action onSuccess,
4 Action< Error > onError
5)
Mark event as processed. NOTE: Enable the XsollaEvent API before using this method. For setup instructions, see the documentation.
Parameters:
- eventId Event ID to mark as processed.
- onSuccess Called after the event was successfully marked as processed.
- onError Called after the request resulted with an error.
Found a typo or other text error? Select the text and press Ctrl+Enter.