public RegisterSuccessfullPayment ( string accountNumber, decimal amount ) : void | ||
accountNumber | string | |
amount | decimal | |
return | 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);
}
}