Example #1
0
 /**
  * Set data to block
  *
  * @return string
  */
 protected function _toHtml()
 {
     $this->_loadPaymentMethods();
     $this->setBackUrl($this->getUrl('*/billing_agreement/'));
     if ($this->_billingAgreementInstance) {
         $this->setReferenceId($this->_billingAgreementInstance->getReferenceId());
         $this->setCanCancel($this->_billingAgreementInstance->canCancel());
         $this->setCancelUrl($this->getUrl('*/billing_agreement/cancel', array('_current' => true, 'payment_method' => $this->_billingAgreementInstance->getMethodCode())));
         $paymentMethodTitle = $this->_billingAgreementInstance->getAgreementLabel();
         $this->setPaymentMethodTitle($paymentMethodTitle);
         $createdAt = $this->_billingAgreementInstance->getCreatedAt();
         $updatedAt = $this->_billingAgreementInstance->getUpdatedAt();
         $this->setAgreementCreatedAt($createdAt ? $this->helper('core')->formatDate($createdAt, 'short', true) : $this->__('N/A'));
         if ($updatedAt) {
             $this->setAgreementUpdatedAt($this->helper('core')->formatDate($updatedAt, 'short', true));
         }
         $this->setAgreementStatus($this->_billingAgreementInstance->getStatusLabel());
     }
     return parent::_toHtml();
 }