C# Class Soomla.Store.SoomlaStore

This class holds the basic assets needed to operate the Store. You can use it to purchase products from the mobile store. This is the only class you need to initialize in order to use the SOOMLA SDK.
ファイルを表示 Open project: fi-content2-games-platform/FIcontent.Gaming.Enabler.phenomobilecharactermanager Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
BuyMarketItem ( string productId, string payload ) : void

Starts a purchase process in the market.

Initialize ( IStoreAssets storeAssets ) : bool

Initializes the SOOMLA SDK.

RefreshInventory ( ) : void

This method will run RestoreTransactions followed by RefreshMarketItemsDetails

RefreshMarketItemsDetails ( ) : void

Creates a list of all metadata stored in the Market (the items that have been purchased). The metadata includes the item's name, description, price, product id, etc... Posts a MarketItemsRefreshed event with the list just created. Upon failure, prints error message.

RestoreTransactions ( ) : void

Initiates the restore transactions process.

StartIabServiceInBg ( ) : void

Starts in-app billing service in background.

StopIabServiceInBg ( ) : void

Stops in-app billing service in background.

TransactionsAlreadyRestored ( ) : bool

Checks if transactions were already restored.

Protected Methods

Method Description
_buyMarketItem ( string productId, string payload ) : void
_loadBillingService ( ) : void
_refreshInventory ( ) : void
_refreshMarketItemsDetails ( ) : void
_restoreTransactions ( ) : void
_startIabServiceInBg ( ) : void
_stopIabServiceInBg ( ) : void
_transactionsAlreadyRestored ( ) : bool

Method Details

BuyMarketItem() public static method

Starts a purchase process in the market.
public static BuyMarketItem ( string productId, string payload ) : void
productId string product id of the item to buy. This id is the one you set up on itunesconnect or Google Play developer console.
payload string Some text you want to get back when the purchasing process is completed.
return void

Initialize() public static method

Initializes the SOOMLA SDK.
Thrown if soomlaSecret is missing or has not been changed.
public static Initialize ( IStoreAssets storeAssets ) : bool
storeAssets IStoreAssets Your game's economy.
return bool

RefreshInventory() public static method

This method will run RestoreTransactions followed by RefreshMarketItemsDetails
public static RefreshInventory ( ) : void
return void

RefreshMarketItemsDetails() public static method

Creates a list of all metadata stored in the Market (the items that have been purchased). The metadata includes the item's name, description, price, product id, etc... Posts a MarketItemsRefreshed event with the list just created. Upon failure, prints error message.
public static RefreshMarketItemsDetails ( ) : void
return void

RestoreTransactions() public static method

Initiates the restore transactions process.
public static RestoreTransactions ( ) : void
return void

StartIabServiceInBg() public static method

Starts in-app billing service in background.
public static StartIabServiceInBg ( ) : void
return void

StopIabServiceInBg() public static method

Stops in-app billing service in background.
public static StopIabServiceInBg ( ) : void
return void

TransactionsAlreadyRestored() public static method

Checks if transactions were already restored.
public static TransactionsAlreadyRestored ( ) : bool
return bool

_buyMarketItem() protected method

protected _buyMarketItem ( string productId, string payload ) : void
productId string
payload string
return void

_loadBillingService() protected method

protected _loadBillingService ( ) : void
return void

_refreshInventory() protected method

protected _refreshInventory ( ) : void
return void

_refreshMarketItemsDetails() protected method

protected _refreshMarketItemsDetails ( ) : void
return void

_restoreTransactions() protected method

protected _restoreTransactions ( ) : void
return void

_startIabServiceInBg() protected method

protected _startIabServiceInBg ( ) : void
return void

_stopIabServiceInBg() protected method

protected _stopIabServiceInBg ( ) : void
return void

_transactionsAlreadyRestored() protected method

protected _transactionsAlreadyRestored ( ) : bool
return bool