NodsDorf Posted August 18, 2011 Posted August 18, 2011 I've been dealing with a problem I can't seem to isolate with the AIM module, I'm hoping one of you more advanced guys may have some suggestions. Info: Oscommerce Version: MS 2.2 RC2a Payment Methods: Authorize.net AIM (only) STS 4.8 Problem: Entering invalid credit card data or incomplete data only returns the general error. "There has been an error processing your credit card Please try again and if problems persist, please try another payment method." Expected: Accurate information (error codes) ie.. Invalid Credit Card Number, Credit Card Type Not Accepted, Transaction Declined By Issuer. It appears that error responses are coded into the AIM module but for some reason we are not getting anything but the general error when a credit card is unsuccessful which isn't very helpful to the customer. I have used the AIM module on other sites without a problem so I'm at a lose for what would cause this problem. I thought the problem was related to the API transaction details on Auth.net so I enabled this feature but that didn't fix it. Any advice very much appreciated.
NodsDorf Posted August 19, 2011 Author Posted August 19, 2011 Still have this issue. What I've also noticed is in the code for the authorize_aim module there is a section of code that appears to handle the errors and pass them to the URL Example when I enter a credit card that is has the wrong number I get the redirect back to URL htttps ://website.com/ checkout_payment.php?payment_error=authorizenet_cc_aim&error=declined . But the page is still just echoing the general error from the case statement. When it should be echoing the MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_DECLINED additionally if I enter a wrong CCV code I get the URL with the error=cvc but still am echoing the general error. if ($regs[0] == '1') { if (tep_not_null(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_MD5_HASH)) { if (strtoupper($regs[37]) != strtoupper(md5(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_MD5_HASH . MODULE_PAYMENT_AUTHORIZENET_CC_AIM_LOGIN_ID . $regs[6] . $this->format_raw($order->info['total'])))) { $error = 'general'; } } } else { switch ($regs[2]) { case '7': $error = 'invalid_expiration_date'; break; case '8': $error = 'expired'; break; case '6': case '17': case '28': $error = 'declined'; break; case '78': $error = 'cvc'; break; default: $error = 'general'; break; } } if ($error != false) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . '&error=' . $error, 'SSL')); } } function after_process() { return false; } function get_error() { global $HTTP_GET_VARS; $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_GENERAL; switch ($HTTP_GET_VARS['error']) { case 'invalid_expiration_date': $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_INVALID_EXP_DATE; break; case 'expired': $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_EXPIRED; break; case 'declined': $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_DECLINED; break; case 'cvc': $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_CVC; break; default: $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_GENERAL; break; } $error = array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_TITLE, 'error' => $error_message); return $error; } I have never ran into this before and I'm not certain as to what the issue could be. I see the lanugaes defined, the errors listed, the correct error being appended to the url but just not the right statement on the page. I don't know what I should look for next. Again any help is appreciated. Thanks, Don
NodsDorf Posted August 25, 2011 Author Posted August 25, 2011 Anybody have a thought on my errors from the case statement not being echoed on the checkout_payment.php page? This is a new issue for me, and I've looked over the code many times and can not see an issue, but I will admit I don't understand how every function is suppose to work.
NodsDorf Posted August 27, 2011 Author Posted August 27, 2011 I willing to look into any idea here. I have tried everything I can think of. A little push or any suggestion even if its just a guess would be appreciated.
satish Posted August 28, 2011 Posted August 28, 2011 You need to collect what respose you got from Authorize.net site. Then analyse code flow as to why error messeage in general was displayed. After getting respose just analyse this function function get_error() { global $HTTP_GET_VARS; $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_GENERAL; switch ($HTTP_GET_VARS['error']) { case 'invalid_expiration_date': $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_INVALID_EXP_DATE; break; case 'expired': $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_EXPIRED; break; case 'declined': $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_DECLINED; break; case 'cvc': $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_CVC; break; default: $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_GENERAL; break; } $error = array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_TITLE, 'error' => $error_message); return $error; } Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Guest Posted December 4, 2011 Posted December 4, 2011 I don't get it. I'm fighting with this error myself. I made sure my SSL was set correctly, made sure my config files showed the right secure domain. I even switched my Log-in Id for my transaction key - the error message changed, so at least I know I'm communicating with Authorize.net. But still, I can't make a sale. Loosing sales every day, and approaching desperate. Anybody have a work around? Authorize.net is actually declining the sale with recording it. It has to be in the error message. Anybody have code to show the error message from Authorize? The generic errors in version 2.3.1 don't give enough detail. The actual error code would help, at least Authorize's website will give the details. error 8, 18, 28? something should help!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.