Esempio n. 1
0
 public function repaymentAmountForLenders()
 {
     // TODO use disbursed amount in lenderInterest
     $totalLendersAmount = $this->loan->getNativeDisbursedAmount()->add($this->lenderInterest());
     $ratio = $this->loan->getNativeDisbursedAmount()->divide($totalLendersAmount);
     $repaymentAmountForLenders = $this->repaymentAmount->subtract($this->installmentServiceFee());
     return $repaymentAmountForLenders->multiply($ratio);
 }
Esempio n. 2
0
 public function calculateTransactionFee(Loan $loan)
 {
     return $loan->getNativeDisbursedAmount() * (5 / 100);
     //TODO. change nativeAmount to USD
 }