I have the Payment Action set to Authorize only in the backend of my Magento store. When I go to capture the order at a later time through my backend, I get an error stating "Invalid order amount". Anyone know why?
04-11-2012 07:26 AM
I meant "Invalid Capture Amount".
04-11-2012 08:11 AM
This will probably be something that has to be answered by an expert on Magento. The specific error text of "Invalid Capture Amount" doesn't exist in our system. We have similar messages for when an attempt is made to capture a transaction for more than what was authorized, but I have no way of knowing what's going on when you hit that capture button.
04-12-2012 10:50 AM
/**
* Send capture request to gateway
*
* @param Mage_Payment_Model_Info $payment
* @param decimal $amount
* @return Mage_Paygate_Model_Authorizenet
*/
public function capture(Varien_Object $payment, $amount)
{
if ($amount <= 0) {
Mage::throwException(Mage::helper('paygate')->__('Invalid amount for capture.'));
}
$this->_initCardsStorage($payment);
if ($this->_isPreauthorizeCapture($payment)) {
$this->_preauthorizeCapture($payment, $amount);
} else if ($this->isPartialAuthorization($payment)) {
$this->_partialAuthorization($payment, $amount, self::REQUEST_TYPE_AUTH_CAPTURE);
} else {
$this->_place($payment, $amount, self::REQUEST_TYPE_AUTH_CAPTURE);
}
$payment->setSkipTransactionCreation(true);
return $this;
}
This the code from the back of magento. Its trying to capture $0. Do you know why?
04-30-2012 09:56 AM
Hey novidecor,
Unfortunately, we're still not going to be able to help you out with this as it's too Magento-specific. I would really suggest contacting them to see if they can help you out.
Thanks,
Michelle
Developer Community Manager
05-08-2012 12:40 PM
You need to comment in a file app/code/core/Mage/Paygate/Model/Authorizenet.php following code
if ($this->_formatAmount(
$cardsStorage->getProcessedAmount() - $cardsStorage->getCapturedAmount()) < $requestedAmount
) {
//Mage::throwException(Mage::helper('paygate')->__('Invalid amount for capture.'));
}
06-12-2020 11:53 AM
You need to comment in a file app/code/core/Mage/Paygate/Model/Authorizenet.php following code
if ($this->_formatAmount(
$cardsStorage->getProcessedAmount() - $cardsStorage->getCapturedAmount()) < $requestedAmount
) {
//Mage::throwException(Mage::helper('paygate')->__('Invalid amount for capture.'));
}
06-12-2020 11:55 AM