Mage_Payment_Block_Info_Cc Class Reference

Inheritance diagram for Mage_Payment_Block_Info_Cc:

Mage_Payment_Block_Info Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object Mage_Payment_Block_Info_Ccsave Mage_PaypalUk_Block_Direct_Info

List of all members.

Public Member Functions

 getCcTypeName ()
 getCcExpMonth ()
 getCcExpDate ()
 toPdf ()

Protected Member Functions

 _construct ()


Detailed Description

Definition at line 28 of file Cc.php.


Member Function Documentation

_construct (  )  [protected]

Init default template for block

Reimplemented from Mage_Payment_Block_Info.

Reimplemented in Mage_Payment_Block_Info_Ccsave, and Mage_PaypalUk_Block_Direct_Info.

Definition at line 33 of file Cc.php.

00034     {
00035         parent::_construct();
00036         $this->setTemplate('payment/info/cc.phtml');
00037     }

getCcExpDate (  ) 

Retrieve CC expiration date

Returns:
Zend_Date

Definition at line 72 of file Cc.php.

00073     {
00074         $date = Mage::app()->getLocale()->date(0);
00075         $date->setYear($this->getInfo()->getCcExpYear());
00076         $date->setMonth($this->getInfo()->getCcExpMonth());
00077         return $date;
00078     }

getCcExpMonth (  ) 

Retrieve CC expiration month

Returns:
string

Definition at line 58 of file Cc.php.

00059     {
00060         $month = $this->getInfo()->getCcExpMonth();
00061         if ($month<10) {
00062             $month = '0'.$month;
00063         }
00064         return $month;
00065     }

getCcTypeName (  ) 

Retrieve credit card type name

Returns:
string

Reimplemented in Mage_PaypalUk_Block_Direct_Info.

Definition at line 44 of file Cc.php.

00045     {
00046         $types = Mage::getSingleton('payment/config')->getCcTypes();
00047         if (isset($types[$this->getInfo()->getCcType()])) {
00048             return $types[$this->getInfo()->getCcType()];
00049         }
00050         return $this->getInfo()->getCcType();
00051     }

toPdf (  ) 

Reimplemented from Mage_Payment_Block_Info.

Reimplemented in Mage_Payment_Block_Info_Ccsave, and Mage_PaypalUk_Block_Direct_Info.

Definition at line 80 of file Cc.php.

00081     {
00082         $this->setTemplate('payment/info/pdf/cc.phtml');
00083         return $this->toHtml();
00084     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:31 2009 for Magento by  doxygen 1.5.8