Public Member Functions | |
getCcAvailableTypes () | |
getCcMonths () | |
getCcYears () | |
hasVerification () | |
Protected Member Functions | |
_construct () | |
_getConfig () |
Definition at line 28 of file Cc.php.
_construct | ( | ) | [protected] |
Internal constructor, that is called from real constructor
Please override this one instead of overriding real __construct constructor
Please override this one instead of overriding real __construct constructor
Reimplemented from Mage_Core_Block_Abstract.
Reimplemented in Mage_Payment_Block_Form_Ccsave, and Mage_PaypalUk_Block_Direct_Form.
Definition at line 30 of file Cc.php.
00031 { 00032 parent::_construct(); 00033 $this->setTemplate('payment/form/cc.phtml'); 00034 }
_getConfig | ( | ) | [protected] |
Retrieve payment configuration object
Definition at line 41 of file Cc.php.
00042 { 00043 return Mage::getSingleton('payment/config'); 00044 }
getCcAvailableTypes | ( | ) |
Retrieve availables credit card types
Reimplemented in Mage_PaypalUk_Block_Direct_Form.
Definition at line 51 of file Cc.php.
00052 { 00053 $types = $this->_getConfig()->getCcTypes(); 00054 if ($method = $this->getMethod()) { 00055 $availableTypes = $method->getConfigData('cctypes'); 00056 if ($availableTypes) { 00057 $availableTypes = explode(',', $availableTypes); 00058 foreach ($types as $code=>$name) { 00059 if (!in_array($code, $availableTypes)) { 00060 unset($types[$code]); 00061 } 00062 } 00063 } 00064 } 00065 return $types; 00066 }
getCcMonths | ( | ) |
Retrieve credit card expire months
Definition at line 73 of file Cc.php.
00074 { 00075 $months = $this->getData('cc_months'); 00076 if (is_null($months)) { 00077 $months[0] = $this->__('Month'); 00078 $months = array_merge($months, $this->_getConfig()->getMonths()); 00079 $this->setData('cc_months', $months); 00080 } 00081 return $months; 00082 }
getCcYears | ( | ) |
Retrieve credit card expire years
Definition at line 89 of file Cc.php.
00090 { 00091 $years = $this->getData('cc_years'); 00092 if (is_null($years)) { 00093 $years = $this->_getConfig()->getYears(); 00094 $years = array(0=>$this->__('Year'))+$years; 00095 $this->setData('cc_years', $years); 00096 } 00097 return $years; 00098 }
hasVerification | ( | ) |
Retrive has verification configuration
Definition at line 105 of file Cc.php.
00106 { 00107 if ($this->getMethod()) { 00108 $configData = $this->getMethod()->getConfigData('useccv'); 00109 if(is_null($configData)){ 00110 return true; 00111 } 00112 return (bool) $configData; 00113 } 00114 return true; 00115 }