Post by parisarms » Sun Dec 09, 2018 9:36 am

To keep from getting a lot of charge backs due to fraud I've limited my credit card processor to only accept if the CVV2 matches, as well as the AVS returns a match for the zip and address. However when someone checks out on the store using an incorrect address the only message they receive is: "This transaction has been declined."

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'));
				}
However I'm not sure what the proper response codes would be or the proper way to change it? Any help?

Newbie

Posts

Joined
Mon Dec 11, 2017 2:35 pm

Post by parisarms » Mon Dec 17, 2018 6:02 am

I was hoping there would be more interest in this. Surely others have wanted their customers to know why their transaction didn't go through?

Newbie

Posts

Joined
Mon Dec 11, 2017 2:35 pm
Who is online

Users browsing this forum: No registered users and 7 guests