/**
  * Load the transaction object by specified txn_id
  *
  * @param Mage_Paypal_Model_Payment_Transaction $transaction
  * @param string $txnId
  */
 public function loadObjectByTxnId(Mage_Paypal_Model_Payment_Transaction $transaction, $txnId)
 {
     $select = $this->_getLoadByUniqueKeySelect($txnId);
     $data = $this->_getWriteAdapter()->fetchRow($select);
     $transaction->setData($data);
     $this->unserializeFields($transaction);
     $this->_afterLoad($transaction);
 }
 /**
  * Check Transaction
  *
  * @param Mage_Paypal_Model_Payment_Transaction $transaction
  * @param mixed $amount
  * @return Mage_Paypal_Model_Payflowlink
  */
 protected function _checkTransaction($transaction, $amount)
 {
     if (!$transaction->getId()) {
         Mage::throwException(Mage::helper('paypal')->__(self::SHOPPING_CART_CHANGED_ERROR_MSG));
     }
     $authorizedAmt = $transaction->getAdditionalInformation('amt');
     if (!$authorizedAmt || $amount > $authorizedAmt) {
         Mage::throwException(Mage::helper('paypal')->__(self::SHOPPING_CART_CHANGED_ERROR_MSG));
     }
     return $this;
 }