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 }); }
public async Task LoseBet(string roundId, string placeBetTxId, string gameProviderCode) { await _gameCommands.LoseBetAsync( GameActionData.NewGameActionData(roundId, 0, "CAD", transactionReferenceId: placeBetTxId), new GameActionContext { GameProviderCode = gameProviderCode }); }
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); }