ApplicationService.AccountService.RegisterSuccessfullPayment C# (CSharp) Метод

RegisterSuccessfullPayment() публичный Метод

public RegisterSuccessfullPayment ( string accountNumber, decimal amount ) : void
accountNumber string
amount decimal
Результат void
        public void RegisterSuccessfullPayment(string accountNumber, decimal amount)
        {
            try
            {
                Account account = accountRepository.Get(accountNumber);
                account.RegisterPayment(BillingResult.PaymentMade(amount, DateTime.Today));
                unitOfWork.Commit();
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }
        }