If you only have the cc code ('VI'
, 'MA'
, etc.) at that point you could use:
// $sType = 'VI';
$sType = $payment->getCcType();
$aType = Mage::getSingleton('payment/config')->getCcTypes();
if (isset($aType[$sType])) {
$sName = $aType[$sType];
}
else {
$sName = Mage::helper('payment')->__('N/A');
}
If you already have the Mage_Payment_Model_Info
block at that point you could use:
$sName = $payment->getMethod()->getInfoInstance()->getCcTypeName();