/**
  * Fetch transaction details info
  *
  * @param Mage_Payment_Model_Info $payment
  * @param string $transactionId
  * @return array
  */
 public function fetchTransactionInfo(Mage_Payment_Model_Info $payment, $transactionId)
 {
     /** @var Mage_Sales_Model_Order_Payment_Transaction $transaction */
     $transaction = Mage::getModel('sales/order_payment_transaction')->load($transactionId, 'txn_id');
     $checkout_transaction = $transaction->getOrder()->getPayment()->lookupTransaction(null, Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER);
     $reconcile = $this->reconcile($checkout_transaction->getTxnId());
     // Get the current details
     $transaction_details = $payment->getAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
     // Try to extract transaction details from the Gateway response
     if ($reconcile->unique_id == $transactionId) {
         $transaction_details = $reconcile;
     } else {
         if ($reconcile->payment_transaction instanceof stdClass) {
             if ($reconcile->payment_transaction->unique_id == $transactionId) {
                 $transaction_details = $reconcile->payment_transaction;
             }
         }
         if ($reconcile->payment_transaction instanceof ArrayObject) {
             foreach ($reconcile->payment_transaction as $payment_transaction) {
                 if ($payment_transaction->unique_id == $transactionId) {
                     $transaction_details = $payment_transaction;
                 }
             }
         }
     }
     // Remove the current details
     $payment->unsAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
     // Set the default/updated transaction details
     $payment->setAdditionalInformation(array(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS => $this->getHelper()->getArrayFromGatewayResponse($transaction_details)), null);
     $payment->save();
     return $payment->getAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
 }
 /**
  * Fetch transaction details info
  *
  * @param Mage_Payment_Model_Info $payment
  * @param string $transactionId
  *
  * @return array
  */
 public function fetchTransactionInfo(Mage_Payment_Model_Info $payment, $transactionId)
 {
     $reconcile = $this->reconcile($transactionId);
     // Remove the current details
     $payment->unsAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
     // Set the default/updated transaction details
     $payment->setAdditionalInformation(array(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS => $this->getHelper()->getArrayFromGatewayResponse($reconcile)), null);
     $payment->save();
     return $payment->getAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
 }