spbernitt Posted May 4, 2007 Share Posted May 4, 2007 I'm working on a clients site with authorize.net as my credit module. With STS v4.5 installed error messages sent back from authorize do not appear. I need a work around quick. I know it has been discussed in the forums it's just like finding a needle in a haystack. Quote Link to comment Share on other sites More sharing options...
bkellum Posted May 4, 2007 Share Posted May 4, 2007 I'm working on a clients site with authorize.net as my credit module. With STS v4.5 installed error messages sent back from authorize do not appear. I need a work around quick. I know it has been discussed in the forums it's just like finding a needle in a haystack. I know two bugs have been resolved with v4.5.2 but neither had anything to do with errors with any of the payment modules. I would suspect something wrong on the payment module end that has nothing to do with STS. Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
spbernitt Posted May 5, 2007 Author Share Posted May 5, 2007 I know two bugs have been resolved with v4.5.2 but neither had anything to do with errors with any of the payment modules. I would suspect something wrong on the payment module end that has nothing to do with STS. My main concern is getting the error messages that authorize net sends out if it declines a card to show, if I disable the sts module these error messages show. My client wants them enabled so customers know when a card is declined. I really do appreciate your help. Scott Quote Link to comment Share on other sites More sharing options...
bkellum Posted May 5, 2007 Share Posted May 5, 2007 My main concern is getting the error messages that authorize net sends out if it declines a card to show, if I disable the sts module these error messages show. My client wants them enabled so customers know when a card is declined. I really do appreciate your help. Scott OK...This STS fix should solve problems with any contribution that is supposed to display error messages during checkout (including Authroize.Net, Discount Coupons, Gift Vouchers,etc.): In your catalog/includes/classes/sts.php, Find this: // Add messages before the content if ($messageStack->size('header') > 0) { $this->template['content'] = $messageStack->output('header') . $this->template['content']; } And Replace it with this: // Add messages before the content if ($messageStack->size('header') > 0) { $template['content'] = $messageStack->output('header') . $template['content']; } ////////Start Error Messages - Bill Kellum modified version of Tom Wojcik code for use with STS 4x if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) { $messageStack->add('error_message', $HTTP_GET_VARS['error_message']); $this->template['content'] = $messageStack->output('error_message') . $this->template['content']; } ////// End Error Messages I really think this will work for you. Please let me know. Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
spbernitt Posted May 6, 2007 Author Share Posted May 6, 2007 OK...This STS fix should solve problems with any contribution that is supposed to display error messages during checkout (including Authroize.Net, Discount Coupons, Gift Vouchers,etc.):In your catalog/includes/classes/sts.php, Find this: // Add messages before the content if ($messageStack->size('header') > 0) { $this->template['content'] = $messageStack->output('header') . $this->template['content']; } And Replace it with this: // Add messages before the content if ($messageStack->size('header') > 0) { $template['content'] = $messageStack->output('header') . $template['content']; } ////////Start Error Messages - Bill Kellum modified version of Tom Wojcik code for use with STS 4x if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) { $messageStack->add('error_message', $HTTP_GET_VARS['error_message']); $this->template['content'] = $messageStack->output('error_message') . $this->template['content']; } ////// End Error Messages I really think this will work for you. Please let me know. When authorize.net declines a card I do not get the error message :-(. The code works if the card number is wrong. Scott Quote Link to comment Share on other sites More sharing options...
bkellum Posted May 7, 2007 Share Posted May 7, 2007 When authorize.net declines a card I do not get the error message :-(. The code works if the card number is wrong. Scott I suggest posting this in the Authorize.net thread and see if someone over there has a solution for you. If the error messages are coming through, just some of them do not, then it appears that the Authorize.net payment module is using a custom script to pass on error messages for specific scenarios. Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
spbernitt Posted May 7, 2007 Author Share Posted May 7, 2007 I suggest posting this in the Authorize.net thread and see if someone over there has a solution for you. If the error messages are coming through, just some of them do not, then it appears that the Authorize.net payment module is using a custom script to pass on error messages for specific scenarios. Thanks for all your help, I really do appreciate it. Actually, I figured out the issue although it might be a little clumsy. I just followed the code that ya suggested and made another template variable that calls for the specific error. It works. Scott Quote Link to comment Share on other sites More sharing options...
bkellum Posted May 7, 2007 Share Posted May 7, 2007 Thanks for all your help, I really do appreciate it. Actually, I figured out the issue although it might be a little clumsy. I just followed the code that ya suggested and made another template variable that calls for the specific error. It works. Scott Scott, exactly what did you do? I would like to make a note of it in case someone else runs into the same issue. Thanks, Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
spbernitt Posted May 7, 2007 Author Share Posted May 7, 2007 Scott, exactly what did you do? I would like to make a note of it in case someone else runs into the same issue. Thanks, I added this line of code to the general.php $sts->template['error'] = '<span class="headerError"><b>'. $HTTP_GET_VARS['error_message'].'</span></b>'; As you know it makes another item I can add to the templates $error. It was a quick and dirty solution to my issue, I'm sure there are better ways to get it done. Scott Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.