00001 <?php
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 class Mage_PaypalUk_Block_Direct_Info extends Mage_Payment_Block_Info_Cc
00029 {
00030     protected function _construct()
00031     {
00032         parent::_construct();
00033         $this->setTemplate('paypaluk/direct/info.phtml');
00034     }
00035 
00036     protected function _getDirect()
00037     {
00038         return Mage::getSingleton('paypaluk/direct');
00039     }
00040 
00041 
00042 
00043 
00044 
00045 
00046     public function getCcTypeName()
00047     {
00048         $types = $this->_getDirect()->getApi()->getCcTypes();
00049         if (isset($types[$this->getInfo()->getCcType()])) {
00050             return $types[$this->getInfo()->getCcType()];
00051         }
00052         return $this->getInfo()->getCcType();
00053     }
00054 
00055 
00056 
00057 
00058 
00059 
00060     public function getCcStartMonth()
00061     {
00062         $month = $this->getInfo()->getCcSsStartMonth();
00063         if ($month<10) {
00064             $month = '0'.$month;
00065         }
00066         return $month;
00067     }
00068     
00069     public function toPdf()
00070     {
00071         $this->setTemplate('paypaluk/direct/pdf/info.phtml');
00072         return $this->toHtml();
00073     }
00074 }