Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to customize when to send “Payment Failed” emails? 
 
philortiz7
Jr. Member
 
Total Posts:  5
Joined:  2010-11-16
 

Hi,

I noticed with Magento 1.4 that it always sends a “Payment Failed” email even if it’s something that’s clearly the customer’s mistake, such as the customer entering the wrong billing address or CVV number. I need to look for the module to edit so that I can filter these types of errors. I don’t need Magento to email me every time for the customer’s mistakes (after all there is already an error message in the checkout page for that). It just fills up my email inbox with useless Payment Failed messages. Of course I still need to get error messages of a technical nature, but for messages like this:

The credit card number is invalid.
The transaction has been declined because of an AVS mismatch. The address provided does not match billing address of cardholder.

etc.

These types of messages don’t have to email me all the time. Would anyone happen to know what file I have to edit so that I can filter out these types of messages? I’ve been looking at the code and this is all I’m getting (in the Authorize.net module)

/app/code/core/Mage/Paygate/Model/Authorizenet.php

public function capture(Varien_Object $payment, $amount)
{

.....

if ($result->getResponseReasonText()) {
Mage::throwException($this->_wrapGatewayError($result->getResponseReasonText()));
}
Mage::throwException(Mage::helper(’paygate’)->__(’Error in capturing the payment.’));
}

In that line the error message is thrown as an exception....but it doesn’t seem to be the one that tells magento to send out an email. Where could i find that in the code?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top