public void ProcessContract(Contract contract, int mounths, OnlinePaymentService paymentService) { for (int i = 1; i <= mounths; i++) { double totalPay = paymentService.PaymentFee(paymentService.Interest(contract.TotalValue / mounths, i)); contract.InstallmentsList.Add(new Installment(contract.Date.AddMonths(i), totalPay)); } }
public ContractService(OnlinePaymentService onlinePaymentService) { _onlinePaymentService = onlinePaymentService; }