如何在Magento上获取付款信息? [英] how to get payment information on Magento?
本文介绍了如何在Magento上获取付款信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须将订单导出到文件中,这是我要通过订单执行的代码:
I have to export the orders to a file, here is my code to go through the orders:
$orders = Mage::getModel('sales/order')->getCollection()
->addAttributeToSelect(array('status', 'ncm'))
->addFieldToFilter(
array(
array('attribute' => 'status', 'eq' => 'complete')
)
);
$order = $orders->getFirstItem();
//print_r($order);
//exit;
//foreach($orders as $order){
$id = $order->getIncrementId();
$payment = $order->getPayment();
$method = $payment->getMethodInstance();
print_r($payment);
//}
我需要打印一些有关付款的信息 像方法,金额,拆分多少个月,如果是信用卡,我需要交易的重新编号,因此清单继续
I need to print some information about the payment like the method, the amount, how many months it was split, if was credit card, i need the reutrning id of the transaction and so the list goes on
我该怎么做?
推荐答案
我认为将会
$payment = $order->getPayment();
它将检索当前的订单付款实例.
It will retrieve the current order payment instance.
这篇关于如何在Magento上获取付款信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文