Exemplo n.º 1
0
        private void CancelBet(string roundId, decimal amount, string transactionIdToCancel, string gameProviderCode)
        {
            var newBet = GameActionData.NewGameActionData(roundId, amount, "CAD");

            newBet.TransactionReferenceId = transactionIdToCancel;

            _gameCommands.CancelTransactionAsync(newBet, new GameActionContext()
            {
                GameProviderCode = gameProviderCode
            });
        }
Exemplo n.º 2
0
 public async Task LoseBet(string roundId, string placeBetTxId, string gameProviderCode)
 {
     await _gameCommands.LoseBetAsync(
         GameActionData.NewGameActionData(roundId,
                                          0,
                                          "CAD",
                                          transactionReferenceId: placeBetTxId),
         new GameActionContext
     {
         GameProviderCode = gameProviderCode
     });
 }
Exemplo n.º 3
0
        public async Task <string> PlaceBet(decimal amount, Guid playerId, string gameProviderCode, string gameId, string roundId = null, string transactionId = null)
        {
            roundId = roundId ?? Guid.NewGuid().ToString();
            await _gameCommands.PlaceBetAsync(
                GameActionData.NewGameActionData(roundId, amount, "CAD",
                                                 gameId,
                                                 transactionId),
                new GameActionContext
            {
                GameProviderCode = gameProviderCode
            }, playerId);

            return(roundId);
        }