/**
* Retrieve all active payment methods
*/
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;
}
Created
June 30, 2016 14:26
-
-
Save evgv/c4639601a491111a64a3a7ec9f2e1bd8 to your computer and use it in GitHub Desktop.
Magento. Get all active payment methods.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment