/** * 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; }