Mage_Payment_Model_Source_Cctype Class Reference

Inheritance diagram for Mage_Payment_Model_Source_Cctype:

Mage_Paygate_Model_Authorizenet_Source_Cctype Mage_Paygate_Model_Payflow_Source_Cctype Mage_Paypal_Model_Source_Cctype Mage_PaypalUk_Model_Source_Cctype

List of all members.

Public Member Functions

 getAllowedTypes ()
 toOptionArray ()


Detailed Description

Definition at line 34 of file Cctype.php.


Member Function Documentation

getAllowedTypes (  ) 

Return allowed cc types for current method

Returns:
array

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     }


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

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