DecryptWeb Blog

Opensource Web Solutions

Get payment method of quote in Magento

Hello All,

Please check the below script that will help you find the payment method information set in Magento quote



$quote = Mage::getModel("sales/quote")->loadByIdWithoutStore($quoteId); //$quoteId to be replaced with your required id

if ($quote) {
$_qid = $quote->getId();
	if (!empty($_qid))
	{
		$_paymentObj = $quote->getPayment();
		if(!empty($_paymentObj))
		{
			$_paymentMethod = $quote->getPayment()->getMethodInstance();
		}
	}
}
print_r($_paymentMethod->getCode());	
Scroll to top