コード例 #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
ファイル: LoanService.php プロジェクト: Junyue/zidisha2
 public function calculateTransactionFee(Loan $loan)
 {
     return $loan->getNativeDisbursedAmount() * (5 / 100);
     //TODO. change nativeAmount to USD
 }