我在Payment对象上从getAdditionalInformation()
获取空数组。交易详细信息附在订单上。不知怎的,我无法检索它们。我得到空数组。这是我的代码
$magorder = Mage::getModel('sales/order')->load($valor);
$payment = $magorder->getPayment()->getAdditionalInformation();
请某人指出我正确的方向。感谢
答案 0 :(得分:0)
我已经解决了。代码如下:
$magorder = Mage::getModel('sales/order')->load($valor);
$payment = $magorder->getPayment();
$collection = Mage::getModel('sales/order_payment_transaction')->getCollection()
->addPaymentIdFilter($payment->getId());
foreach ($collection as $col)
{
print_r ($col->getAdditionalInformation());
}