search
top

Get creditcard type in Magento

Hello All,

I am writing here a script snippet for getting the credit card type used in the order

$order_id = 100; //order id goes here
$_order = Mage::getModel('sales/order')->load($order_id);       
$_cctype = '';
if(!empty($_order))
{           
    $_cctype = $_order->getPayment()->getCcTypeName();
}
echo $_cctype;

Leave a Reply

top