Пример #1
0
        public async Task <string> AddUserVirtualCurrency(string playFabId, int Amount)
        {
            var reqAddUserVirtualCurrency = new AddUserVirtualCurrencyRequest
            {
                PlayFabId       = playFabId,
                Amount          = Amount,
                VirtualCurrency = configuration.Currency
            };

            var result = await PlayFabAdminAPI.AddUserVirtualCurrencyAsync(reqAddUserVirtualCurrency);

            if (result.Error != null)
            {
                throw new Exception(result.Error.ErrorMessage);
            }

            return(await UpdateBudget());
        }