예제 #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);
 }
예제 #2
0
 public function calculateTransactionFee(Loan $loan)
 {
     return $loan->getNativeDisbursedAmount() * (5 / 100);
     //TODO. change nativeAmount to USD
 }