public GetBankAccountsByPlayerIdResponse GetBankAccountsByPlayerId(Guid playerId)
        {
            var bankAccount = _paymentQueries.GetBankAccountsForAdminOfflineDepositRequest(playerId);

            return(new GetBankAccountsByPlayerIdResponse
            {
                BankAccounts = Mapper.Map <IEnumerable <BankAccountDto> >(bankAccount)
            });
        }
        public ActionResult GetBankAccounts(Guid depositId)
        {
            var deposit      = _paymentQueries.GetDepositById(depositId);
            var bankAccounts = _paymentQueries.GetBankAccountsForAdminOfflineDepositRequest(deposit.PlayerId);

            return(this.Success(new
            {
                BankAccounts = bankAccounts.Select(o => new
                {
                    Id = o.Id,
                    AccountId = o.AccountId,
                    AccountName = o.AccountName,
                    AccountNumber = o.AccountNumber,
                    BankName = o.Bank.BankName,
                    Province = o.Province,
                    Branch = o.Branch
                })
            }));
        }
示例#3
0
        public OfflineDepositBankAccountResponse GetBankAccountsForOfflineDeposit()
        {
            var player = _playerQueries.GetPlayer(PlayerId);
            var bankAccountsForAdminOfflineDepositRequest =
                _paymentQueries.GetBankAccountsForAdminOfflineDepositRequest(PlayerId);

            if (player == null || bankAccountsForAdminOfflineDepositRequest == null)
            {
                throw new RegoException(ErrorMessagesEnum.ServiceUnavailable.ToString());
            }

            return(new OfflineDepositBankAccountResponse
            {
                BankAccounts = bankAccountsForAdminOfflineDepositRequest
                               .Select(o => new BankAccountDto
                {
                    Id = o.Id,
                    AccountName = o.AccountName,
                    BankName = o.Bank.BankName
                })
            });
        }