C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
_buyMarketItem ( string productId, string payload ) : void
_loadBillingService ( ) : void
_refreshInventory ( ) : void
_refreshMarketItemsDetails ( ) : void
_restoreTransactions ( ) : void
_startIabServiceInBg ( ) : void
_stopIabServiceInBg ( ) : void
_transactionsAlreadyRestored ( ) : bool

Описание методов

BuyMarketItem() публичный статический Метод

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.
Результат void

Initialize() публичный статический Метод

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.
Результат bool

RefreshInventory() публичный статический Метод

This method will run RestoreTransactions followed by RefreshMarketItemsDetails
public static RefreshInventory ( ) : void
Результат void

RefreshMarketItemsDetails() публичный статический Метод

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
Результат void

RestoreTransactions() публичный статический Метод

Initiates the restore transactions process.
public static RestoreTransactions ( ) : void
Результат void

StartIabServiceInBg() публичный статический Метод

Starts in-app billing service in background.
public static StartIabServiceInBg ( ) : void
Результат void

StopIabServiceInBg() публичный статический Метод

Stops in-app billing service in background.
public static StopIabServiceInBg ( ) : void
Результат void

TransactionsAlreadyRestored() публичный статический Метод

Checks if transactions were already restored.
public static TransactionsAlreadyRestored ( ) : bool
Результат bool

_buyMarketItem() защищенный Метод

protected _buyMarketItem ( string productId, string payload ) : void
productId string
payload string
Результат void

_loadBillingService() защищенный Метод

protected _loadBillingService ( ) : void
Результат void

_refreshInventory() защищенный Метод

protected _refreshInventory ( ) : void
Результат void

_refreshMarketItemsDetails() защищенный Метод

protected _refreshMarketItemsDetails ( ) : void
Результат void

_restoreTransactions() защищенный Метод

protected _restoreTransactions ( ) : void
Результат void

_startIabServiceInBg() защищенный Метод

protected _startIabServiceInBg ( ) : void
Результат void

_stopIabServiceInBg() защищенный Метод

protected _stopIabServiceInBg ( ) : void
Результат void

_transactionsAlreadyRestored() защищенный Метод

protected _transactionsAlreadyRestored ( ) : bool
Результат bool