Simple IAP System  5.0
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Events | List of all members
XsollaManager

Manager integrating Xsolla's Store SDK for handling all related web requests, such as logging in and syncing Simple IAP System storage (purchases, player data, currency) with Xsolla. More...

Inheritance diagram for XsollaManager:

Public Member Functions

UserInfo GetLoginResult ()
 Return raw LoginResult data from Xsolla. Can be null if not logged in yet. More...
 

Static Public Member Functions

static XsollaManager GetInstance ()
 Returns a static reference to this script. More...
 
static void RedeemCoupon (string code)
 
static void SetPurchase (List< KeyValuePair< string, int >> products)
 Grant products to the user's inventory on Xsolla, for free. Requires server. As this is a security risk you should have some server validations in place. This method is additive, calling it multiple times will result in multiple granted items. More...
 
static void SetPlayerData ()
 Uploads local player data to Xsolla. Call this after manipulating player data manually, e.g. via DBManager.AddPlayerData. More...
 
static void SetCurrency (Dictionary< string, int > toAdd=null)
 Uploads local currency balance to Xsolla. Requires server. Call this after setting currency manually, e.g. via DBManager.AddCurrency (with amount to add) or SetCurrency (no arguments). As this is a security risk you should have some server validations in place. More...
 
static void SetSelected ()
 Uploads local item selection states to Xsolla. Call this after manual selections, e.g. via DBManager.SetSelected. Note that selection states are synced automatically when selecting or deseleting items in the shop. More...
 
static void RegisterAccount (string emailAddress, string password)
 Register a new account by using the email address and password provided. More...
 
static void LoginWithEmail (string emailAddress, string password)
 Login via email by using the email address and password provided. More...
 
static void LoginWithSocial (string providerName)
 Login via various social providers usually by entering email address or username and password. More...
 
static void ForgotPassword (string emailAddress)
 Request an account recovery email (new password) to the email passed in. More...
 
static void Logout ()
 

Public Attributes

string serverUrl
 

Static Public Attributes

static string userId
 Xsolla account id of the user logged in. More...
 

Events

static Action< UserInfo > loginSucceededEvent
 Fired when the user successfully logged in to a Xsolla account. More...
 
static Action< string > loginFailedEvent
 Fired when logging in fails due to authentication or other issues. More...
 

Detailed Description

Manager integrating Xsolla's Store SDK for handling all related web requests, such as logging in and syncing Simple IAP System storage (purchases, player data, currency) with Xsolla.

Member Function Documentation

static void ForgotPassword ( string  emailAddress)
static

Request an account recovery email (new password) to the email passed in.

static XsollaManager GetInstance ( )
static

Returns a static reference to this script.

UserInfo GetLoginResult ( )

Return raw LoginResult data from Xsolla. Can be null if not logged in yet.

Returns
static void LoginWithEmail ( string  emailAddress,
string  password 
)
static

Login via email by using the email address and password provided.

static void LoginWithSocial ( string  providerName)
static

Login via various social providers usually by entering email address or username and password.

static void Logout ( )
static
static void RedeemCoupon ( string  code)
static
static void RegisterAccount ( string  emailAddress,
string  password 
)
static

Register a new account by using the email address and password provided.

static void SetCurrency ( Dictionary< string, int >  toAdd = null)
static

Uploads local currency balance to Xsolla. Requires server. Call this after setting currency manually, e.g. via DBManager.AddCurrency (with amount to add) or SetCurrency (no arguments). As this is a security risk you should have some server validations in place.

static void SetPlayerData ( )
static

Uploads local player data to Xsolla. Call this after manipulating player data manually, e.g. via DBManager.AddPlayerData.

static void SetPurchase ( List< KeyValuePair< string, int >>  products)
static

Grant products to the user's inventory on Xsolla, for free. Requires server. As this is a security risk you should have some server validations in place. This method is additive, calling it multiple times will result in multiple granted items.

static void SetSelected ( )
static

Uploads local item selection states to Xsolla. Call this after manual selections, e.g. via DBManager.SetSelected. Note that selection states are synced automatically when selecting or deseleting items in the shop.

Member Data Documentation

string serverUrl

string userId
static

Xsolla account id of the user logged in.

Event Documentation

Action<string> loginFailedEvent
static

Fired when logging in fails due to authentication or other issues.

Action<UserInfo> loginSucceededEvent
static

Fired when the user successfully logged in to a Xsolla account.


The documentation for this class was generated from the following file: