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.
Afficher le fichier Open project: fi-content2-games-platform/FIcontent.Gaming.Enabler.phenomobilecharactermanager Class Usage Examples

Private Properties

Свойство Type Description

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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.
Résultat void

Initialize() public static méthode

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.
Résultat bool

RefreshInventory() public static méthode

This method will run RestoreTransactions followed by RefreshMarketItemsDetails
public static RefreshInventory ( ) : void
Résultat void

RefreshMarketItemsDetails() public static méthode

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
Résultat void

RestoreTransactions() public static méthode

Initiates the restore transactions process.
public static RestoreTransactions ( ) : void
Résultat void

StartIabServiceInBg() public static méthode

Starts in-app billing service in background.
public static StartIabServiceInBg ( ) : void
Résultat void

StopIabServiceInBg() public static méthode

Stops in-app billing service in background.
public static StopIabServiceInBg ( ) : void
Résultat void

TransactionsAlreadyRestored() public static méthode

Checks if transactions were already restored.
public static TransactionsAlreadyRestored ( ) : bool
Résultat bool

_buyMarketItem() protected méthode

protected _buyMarketItem ( string productId, string payload ) : void
productId string
payload string
Résultat void

_loadBillingService() protected méthode

protected _loadBillingService ( ) : void
Résultat void

_refreshInventory() protected méthode

protected _refreshInventory ( ) : void
Résultat void

_refreshMarketItemsDetails() protected méthode

protected _refreshMarketItemsDetails ( ) : void
Résultat void

_restoreTransactions() protected méthode

protected _restoreTransactions ( ) : void
Résultat void

_startIabServiceInBg() protected méthode

protected _startIabServiceInBg ( ) : void
Résultat void

_stopIabServiceInBg() protected méthode

protected _stopIabServiceInBg ( ) : void
Résultat void

_transactionsAlreadyRestored() protected méthode

protected _transactionsAlreadyRestored ( ) : bool
Résultat bool