コード例 #1
0
        AdjustTransactionResponse ICommonGameActionsProvider.AdjustTransaction(AdjustTransaction request)
        {
            using (var scope = _transactionScope.GetTransactionScope())
            {
                var playerId = GetPlayerIdFromToken(request);

                var result = request.Transactions.Select(tx => AdjustTransaction(tx)).ToList();

                var balance = _gameQueries.GetPlayableBalance(playerId);

                scope.Complete();

                return(new AdjustTransactionResponse
                {
                    Balance = balance.Balance,
                    CurrencyCode = balance.CurrencyCode,
                    Transactions = result
                });
            }
        }