I don't feel that's helpful enough and it should tell the customer what the reason was, whether it be an issue with their CVV2 not matching or an AVS problem. I've looked at the Authorize.Net documentation but couldn't find what I was looking for there.
I believe the section of code that I'm looking to change is in the catalog/controller/extension/payment/authorizenet_aim.php file beginning at line 132:
Code: Select all
if ($response_info[1] == '1') {
$message = '';
if (isset($response_info['5'])) {
$message .= 'Authorization Code: ' . $response_info['5'] . "\n";
}
if (isset($response_info['6'])) {
$message .= 'AVS Response: ' . $response_info['6'] . "\n";
}
if (isset($response_info['7'])) {
$message .= 'Transaction ID: ' . $response_info['7'] . "\n";
}
if (isset($response_info['39'])) {
$message .= 'Card Code Response: ' . $response_info['39'] . "\n";
}
if (isset($response_info['40'])) {
$message .= 'Cardholder Authentication Verification Response: ' . $response_info['40'] . "\n";
}
if (!$this->config->get('payment_authorizenet_aim_hash') || (strtoupper($response_info[38]) == strtoupper(md5($this->config->get('payment_authorizenet_aim_hash') . $this->config->get('payment_authorizenet_aim_login') . $response_info[7] . $this->currency->format($order_info['total'], $order_info['currency_code'], 1.00000, false))))) {
$this->model_checkout_order->addOrderHistory($this->session->data['order_id'], $this->config->get('payment_authorizenet_aim_order_status_id'), $message, false);
} else {
$this->model_checkout_order->addOrderHistory($this->session->data['order_id'], $this->config->get('config_order_status_id'));
}