public OfflineDeposit Confirm( OfflineDepositConfirm depositConfirm, string confirmedBy, byte[] idFrontImage, byte[] idBackImage, byte[] receiptImage) { var offlineDeposit = _repository.GetDepositById(depositConfirm.Id); var frontImageId = SaveFile(depositConfirm.IdFrontImage, idFrontImage, offlineDeposit.Data.PlayerId); var backImageId = SaveFile(depositConfirm.IdBackImage, idBackImage, offlineDeposit.Data.PlayerId); var receiptImageId = SaveFile(depositConfirm.ReceiptImage, receiptImage, offlineDeposit.Data.PlayerId); using (var scope = CustomTransactionScope.GetTransactionScope()) { ValidateLimits(depositConfirm); var confirmEvent = offlineDeposit.Confirm( depositConfirm.PlayerAccountName, depositConfirm.PlayerAccountNumber, depositConfirm.ReferenceNumber, depositConfirm.Amount, depositConfirm.TransferType, depositConfirm.OfflineDepositType, depositConfirm.Remark, confirmedBy, frontImageId, backImageId, receiptImageId); _repository.SaveChanges(); confirmEvent.EventCreated = DateTimeOffset.Now.ToBrandOffset(offlineDeposit.Data.Player.Brand.TimezoneId); _eventBus.Publish(confirmEvent); scope.Complete(); } return(_paymentQueries.GetDepositById(depositConfirm.Id)); }
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 }) })); }