Is there a function to get all available payment methods in magento ? YES
app/code/core/Mage/Payment/Model/Config.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | public function getActiveMethods( $store =null) { $methods = array (); $config = Mage::getStoreConfig( 'payment' , $store ); foreach ( $config as $code => $methodConfig ) { if (Mage::getStoreConfigFlag( 'payment/' . $code . '/active' , $store )) { if ( array_key_exists ( 'model' , $methodConfig )) { $methodModel = Mage::getModel( $methodConfig [ 'model' ]); if ( $methodModel && $methodModel ->getConfigData( 'active' , $store )) { $methods [ $code ] = $this ->_getMethod( $code , $methodConfig ); } } } } return $methods ; } |