Public Member Functions | |
getAllowedTypes () | |
toOptionArray () |
Definition at line 34 of file Cctype.php.
getAllowedTypes | ( | ) |
Return allowed cc types for current method
Reimplemented in Mage_Paygate_Model_Authorizenet_Source_Cctype, Mage_Paygate_Model_Payflow_Source_Cctype, Mage_Paypal_Model_Source_Cctype, and Mage_PaypalUk_Model_Source_Cctype.
Definition at line 41 of file Cctype.php.
00042 { 00043 return array(); 00044 }
toOptionArray | ( | ) |
making filter by allowed cards
Definition at line 46 of file Cctype.php.
00047 { 00048 /** 00049 * making filter by allowed cards 00050 */ 00051 $allowed = $this->getAllowedTypes(); 00052 $options = array(); 00053 00054 foreach (Mage::getSingleton('payment/config')->getCcTypes() as $code => $name) { 00055 if (in_array($code, $allowed) || !count($allowed)) { 00056 $options[] = array( 00057 'value' => $code, 00058 'label' => $name 00059 ); 00060 } 00061 } 00062 00063 return $options; 00064 }