title: How to get transaction id on magento success page?
body: <p>I am trying to get authorize.net transaction id on magento's success page. Here's the code I am using:</p>
  
  <pre><code>$orders = Mage::getModel('sales/order')-&gt;getCollection();
  $order = $orders-&gt;getLastItem();
  
  $transactionId = $order-&gt;getPayment()-&gt;getTransactionId();
  </code></pre>
  
  <p>As a result, $transactionId is an empty string.</p>
  
  <p>Thank you</p>