I am making a custom payment gateway and I have it in the capture payment
in Magento when a payment has been through:
$payment->setTransactionAdditionalInfo
(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS,array
('TransactionGUId'=>$result['transaction_guid'], 'TransactionId'=>$result
['transaction_id'],'Messages'=>$result['messages']));
Which writes the payment transaction additional information. I need to get in the refund these additional informations to send them to the payment Gateway. I tried:
$collection = Mage::getModel('sales/order_payment_transaction')->getCollection()
->addAttributeToFilter('order_id', array('eq' => $payment->getOrder()->getEntityId()))
->addAttributeToFilter('txn_type', array('eq' => 'capture'))
->addPaymentIdFilter($payment->getId());
$transaction = $collection->getAdditionalInformation('transactionId');
$transactionGUId = $collection->getAdditionalInformation('transactionGUId');
but it returns an error.