setTemplate('payment/info/checkmo.phtml'); } /** * Enter description here... * * @return string */ public function getPayableTo() { if (is_null($this->_payableTo)) { $this->_convertAdditionalData(); } return $this->_payableTo; } /** * Enter description here... * * @return string */ public function getMailingAddress() { if (is_null($this->_mailingAddress)) { $this->_convertAdditionalData(); } return $this->_mailingAddress; } /** * Enter description here... * * @return Mage_Payment_Block_Info_Checkmo */ protected function _convertAdditionalData() { $details = false; try { $details = Mage::helper('core/unserializeArray') ->unserialize($this->getInfo()->getAdditionalData()); } catch (Exception $e) { Mage::logException($e); } if (is_array($details)) { $this->_payableTo = isset($details['payable_to']) ? (string) $details['payable_to'] : ''; $this->_mailingAddress = isset($details['mailing_address']) ? (string) $details['mailing_address'] : ''; } else { $this->_payableTo = ''; $this->_mailingAddress = ''; } return $this; } public function toPdf() { $this->setTemplate('payment/info/pdf/checkmo.phtml'); return $this->toHtml(); } }