Esempio n. 1
0
 protected function _construct()
 {
     $this->_rateNumber = trim($this->getSession()->getBillpayRates());
     if (!$this->getCalculation()->isIntVal($this->_rateNumber) || $this->_rateNumber <= 0) {
         $this->_validationError = Mage::helper('sales')->__('billpay_invalid_ratecount');
     } else {
         $baseAmount = $this->getCalculationBaseAmount(false);
         $baseAmount = $this->getApi()->currencyToSmallerUnit($baseAmount);
         if (!$this->getSession()->validateRateOptions($baseAmount)) {
             $options = $this->performApiCall();
             if ($options) {
                 $this->getSession()->setCurrentRateOptions($baseAmount, $options);
                 // Calculate fee net amount and store it in session
                 $feeAmountNet = $this->calculateFeeAmountNet();
                 $this->getSession()->setTransationFeeNet($feeAmountNet);
             }
         }
         $this->_interestRate = $this->getSession()->getInterestRate();
         $this->_anualPercentageRate = $this->getSession()->getAnualPercentageRate();
         $this->_surchargeAmount = $this->getSession()->getSurchargeAmount();
         $this->_intermediateAmount = $this->getSession()->getIntermediateAmount();
         $this->_totalPaymentAmount = $this->getSession()->getTotalPaymentAmount();
         $this->_dues = $this->getSession()->getDues();
         $this->_transactionFee = $this->getSession()->getTransationFee();
     }
     $this->setTemplate('billpay/form/rat/calculation.phtml');
     parent::_construct();
 }
Esempio n. 2
0
 protected function _construct()
 {
     $this->setTemplate('billpay/form/rat/step2.phtml');
     parent::_construct();
 }