public function setInstallmentDataBeforeAuthorization($installmentQuantity)
    {
        if ($this->_calculator === null) {
            throw new LocalizedException(new Phrase('You need to set an installment calculator befor prior to' .
            'installments'));
        }

        /* @var Quote $quote */
        $quote = $this->_getQuote();
        $interestRate = $this->_getCalculator()->getInterestRateForInstallment($installmentQuantity);
        $interestAmount = $this->_getCalculator()->getInterestAmount($this->_getPaymentAmount(), $installmentQuantity);
        $baseinterestAmount = $this->_getCalculator()
            ->getInterestAmount($this->_getBasePaymentAmount(), $installmentQuantity);

        $quote
            ->setGabrielqsInstallmentsQty($installmentQuantity)
            ->setGabrielqsInstallmentsInterestRate($interestRate)
            ->setGabrielqsInstallmentsInterestAmount($interestAmount)
            ->setBaseGabrielqsInstallmentsInterestAmount($baseinterestAmount)
            ->setTotalsCollectedFlag(false)
            ->collectTotals();
    }
public function setInstallmentDataBeforeAuthorization($installmentQuantity)
    {
        if ($this->_calculator === null) {
            throw new LocalizedException(new Phrase('You need to set an installment calculator befor prior to' .
            'installments'));
        }

        /* @var Quote $quote */
        $quote = $this->_getQuote();
        $interestRate = $this->_getCalculator()->getInterestRateForInstallment($installmentQuantity);
        $interestAmount = $this->_getCalculator()->getInterestAmount($this->_getPaymentAmount(), $installmentQuantity);
        $baseinterestAmount = $this->_getCalculator()
            ->getInterestAmount($this->_getBasePaymentAmount(), $installmentQuantity);

        $quote
            ->setGabrielqsInstallmentsQty($installmentQuantity)
            ->setGabrielqsInstallmentsInterestRate($interestRate)
            ->setGabrielqsInstallmentsInterestAmount($interestAmount)
            ->setBaseGabrielqsInstallmentsInterestAmount($baseinterestAmount)
            ->setTotalsCollectedFlag(false)
            ->collectTotals();
    }
public function setInstallmentDataBeforeAuthorization ( $ installmentQuantity ) { if ( $ this -> _calculator === null ) { throw new LocalizedException ( new Phrase ( 'You need to set an installment calculator befor prior to' . 'installments' ) ) ; } /* @var Quote $quote */ $ quote = $ this -> _getQuote ( ) ; $ interestRate = $ this -> _getCalculator ( ) -> getInterestRateForInstallment ( $ installmentQuantity ) ; $ interestAmount = $ this -> _getCalculator ( ) -> getInterestAmount ( $ this -> _getPaymentAmount ( ) , $ installmentQuantity ) ; $ baseinterestAmount = $ this -> _getCalculator ( ) -> getInterestAmount ( $ this -> _getBasePaymentAmount ( ) , $ installmentQuantity ) ; $ quote -> setGabrielqsInstallmentsQty ( $ installmentQuantity ) -> setGabrielqsInstallmentsInterestRate ( $ interestRate ) -> setGabrielqsInstallmentsInterestAmount ( $ interestAmount ) -> setBaseGabrielqsInstallmentsInterestAmount ( $ baseinterestAmount ) -> setTotalsCollectedFlag ( false ) -> collectTotals ( ) ; }
Sets interest info on order object with help from the installments order manager class
@param int $installmentQuantity
@return void
@throws LocalizedException
Sets interest info on order object with help from the installments order manager class