public function getInterestAmount($amount, $installmentQuantity)
    {
        $minimumAmountNoInterest = $this->getMinimumAmountNoInterest($installmentQuantity);

        if (
            ($minimumAmountNoInterest === null) ||
            ($minimumAmountNoInterest !== null) && ($amount < $minimumAmountNoInterest)
        ) {
            $interestRateForInstallment = $this->getInterestRateForInstallment($installmentQuantity);
        } else {

            $interestRateForInstallment = 1;
        }

        $totalInstallmentAmount = $interestRateForInstallment * $amount;
        return ($totalInstallmentAmount - $amount);
    }
public function getInterestAmount($amount, $installmentQuantity)
    {
        $minimumAmountNoInterest = $this->getMinimumAmountNoInterest($installmentQuantity);

        if (
            ($minimumAmountNoInterest === null) ||
            ($minimumAmountNoInterest !== null) && ($amount < $minimumAmountNoInterest)
        ) {
            $interestRateForInstallment = $this->getInterestRateForInstallment($installmentQuantity);
        } else {

            $interestRateForInstallment = 1;
        }

        $totalInstallmentAmount = $interestRateForInstallment * $amount;
        return ($totalInstallmentAmount - $amount);
    }
public function getInterestAmount ( $ amount , $ installmentQuantity ) { $ minimumAmountNoInterest = $ this -> getMinimumAmountNoInterest ( $ installmentQuantity ) ; if ( ( $ minimumAmountNoInterest === null ) || ( $ minimumAmountNoInterest !== null ) && ( $ amount < $ minimumAmountNoInterest ) ) { $ interestRateForInstallment = $ this -> getInterestRateForInstallment ( $ installmentQuantity ) ; } else { $ interestRateForInstallment = 1 ; } $ totalInstallmentAmount = $ interestRateForInstallment * $ amount ; return ( $ totalInstallmentAmount - $ amount ) ; }
Returns the interest fee for a given amount and interest rate
@param float $amount
@param int $installmentQuantity
@return float
Returns the interest fee for a given amount and interest rate