This code bellow will get you all active Magento payment modules. This example below return an array which you can use to create drop down menu or something else in Magento’s front-end or admin sections.
class Inchoo_Vendor_Model_Activpayment
{
public function getActivPaymentMethods()
{
$payments = Mage::getSingleton('payment/config')->getActiveMethods();
$methods = array(array('value'=>'', 'label'=>Mage::helper('adminhtml')->__('--Please Select--')));
foreach ($payments as $paymentCode=>$paymentModel) {
$paymentTitle = Mage::getStoreConfig('payment/'.$paymentCode.'/title');
$methods[$paymentCode] = array(
'label' => $paymentTitle,
'value' => $paymentCode,
);
}
return $methods;
}
}
Source : http://inchoo.net/ecommerce/magento/magento-how-to-get-all-active-payment-modules/
Hello
ReplyDeleteNice information but I want to make extension that has installment option as I see on FME Extensions, but thanks for this information