Jump to content
Latest News: (loading..)
Sign in to follow this  
hebert01

authorize.net won't display errors

Recommended Posts

Hi-

 

I'm a bit of an osC newbie in the process of building my second site with osC. For both sites' payment modules, I've used the default authorize.net payment module included in osC2.2MS2. The first site went forward without a hitch, and authorize.net is functioning quite well. The second one is giving me some grief.

 

My specific problem occurs when processing a credit card number that I know should be declined.

 

When processing the payment using the "to be declined" CC number, and continuing on to the processing page at https://secure.authorize.net/gateway/transact.dll, my first site correctly returns a red box saying "Your credit card was declined. Please try another card or contact your bank for more info."

 

My new site returns no error at all, and simply returns the visitor to the payment information page without displaying any error information whatsoever.

 

To the best of my knowledge, I've done nothing differently in these installs. I've compared the authorizenet.php files on both sites to each other, and they are identical.

 

Can anyone lend a hand, or give me a suggestion as to what files I might investigate to look for the bug? I did search the forum archives, but was unable to find a similar issue.

 

Thanks in advance.

Share this post


Link to post
Share on other sites

...anyone?

 

Even if you could give me some suggestions as to which file(s) handle the logic for the generation of these errors, I may be able to troubleshoot it from there. OR, if this topic has been covered before and I've missed it on the archive search, please direct me to a URL.

 

Again, thank you for any help!

Share this post


Link to post
Share on other sites

I'm having the same problem....no error messages displayed on the screen, but they show up in the URL.

Edited by cgraham

Share this post


Link to post
Share on other sites

Can ANYONE give some guidance on how to get error messages to print on the checkout screen?

 

The error message is being returned (it shows in the URL) it just does not display on the checkout screen. As a result, the purchaser is just shuffled back to the credit card information entry screen with no explanation as to why they are being sent back.

 

Any help on this would be greatly appreciated.

Thanks!

Share this post


Link to post
Share on other sites

The same thing is happening to me...when a declined credit card is used, it brings the customer back to the payment information page without indicating why. No message is being given to tell customer that the card is declined. Does anyone know how to fix this problem?

Thank you

Share this post


Link to post
Share on other sites

Make sure that the declined URL is checkout_payment.php - this is the code that outputs the error in that file:

 

<?php
 if (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']}) && ($error = ${$HTTP_GET_VARS['payment_error']}->get_error())) {
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b><?php echo tep_output_string_protected($error['title']); ?></b></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBoxNotice">
         <tr class="infoBoxNoticeContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td class="main" width="100%" valign="top"><?php echo tep_output_string_protected($error['error']); ?></td>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 }
?>

 

Matti


Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites

john- no I don't have the authorizenet curl contribution installed - on both my sites I'm using the preinstalled payment module for authorizenet (one with success, and one not so much).

 

I'm not familiar...can you please explain what the curl contribution adds? the only difficulty I'm having is this one error not displaying (on one site). I've compared my checkout_payment.php files on both sites, and they're identical.

Share this post


Link to post
Share on other sites

I just tried installing the Authorize.net gateway and when I try and complete an order I get an error message:

 

There has been an error processing your credit card. Please try again.

 

What am I doing wrong?

 

Bob

Share this post


Link to post
Share on other sites

For everyone who is having the problem that AuthorizeNet is returning error (you can see them in the URL) but the errors are not getting diplayed on the page, I finally found a post that actually addresses the issue and give a step by step on how to correct it.

 

You can view the post HERE

 

This does NOT address any particular error or how to correct errors, it only address the issue of error messages not being displayed on the page.

Share this post


Link to post
Share on other sites

Good afternoon,

 

Do you still know the solution ?

 

I'm stuck with some errors only displaying in the URL and not via a pop-up or via the messagestack...

 

Friendly greetings,

 

 

 

For everyone who is having the problem that AuthorizeNet is returning error (you can see them in the URL) but the errors are not getting diplayed on the page, I finally found a post that actually addresses the issue and give a step by step on how to correct it.

 

You can view the post HERE

 

This does NOT address any particular error or how to correct errors, it only address the issue of error messages not being displayed on the page.

Share this post


Link to post
Share on other sites

I am also having the same issue. If anyone out there knows where the thread with the solution is located please let me know. This error has cost me a good number of sales.

 

Thanks,

 

Josh

Share this post


Link to post
Share on other sites
Make sure that the declined URL is checkout_payment.php - this is the code that outputs the error in that file:

Where do we find where the declined URL is defined? I can't find that option in the authorizenet settings area.

 

I have search all over the forums and I can not find anywhere how to get the error that is in the URL to be displayed on the page the customer gets returned to when their card is declined for any reason. If the card data is entered correctly and the card is not declined, I get orders to go through fine. Otherwise, when the customer clicks "order confirmation" they get looped back to checkout_payment.php with errors only up in the url!!

 

Any help would be greatly appreciated!!

Much Thanks,

Ashley

Share this post


Link to post
Share on other sites
Where do we find where the declined URL is defined? I can't find that option in the authorizenet settings area.

 

I believe what that means is when you get looped back to the payment screen, make sure the URL is checkout_payment.php (in the address bar). Does it look something like "www.yoursite.com/catalog/checkout_payment.php?payment_error=This+is+your+error"?

 

I was having this problem using the standard Authorize.net module that came with oscommerce, but when i went with the contribution of the Authorize.net AIM module, that problem was fixed. Which are you using?

Share this post


Link to post
Share on other sites

Has anyone found a solution to this? I'm using the latest Authorize NET AIM package. Here is what I've seen. Using an expired credit card. If I set the expiry date to one in the past I do get the error message ..Credit card error.. the expiry date .... and the url ends with checkout_payment.php?=authorizenet_aim&error=The+expiry+date+entered .......

 

If I use one of the guarenteed to decline cards, set a good expiry date, cvv2 numbers, it will be initially accepted and I'm taken to the checkout_confirmation.php page. Now when I click the confirm order button I'm taken back to the checkout_payment.php page with following url ...

checkout_payment.php?error_message=This%20transaction%20has%20been%20declined%20-%20 .......

 

So it looks like the formatting of the error message is different and because of that will not display properly. Has anyone come up with a fix for this yet? I'm not proficient enough in php to include the code to check for this condition or rewrite the way checkout_confirmation.php returns you back to checkout_payment.php.

 

 

Thanks.

 

PS.. Poor guy. One of my customers today must have entered every credit he had twice trying to buy our product. He had no idea his credit card was declining.

Share this post


Link to post
Share on other sites

OK here is a fix for this problem.

 

file is code in catalog/includes/modules/payment/authorizenet_aim.php

 

/

/ If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message
  if ($x_response_code != '1') {
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . $x_response_text . ' - ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE), 'SSL', true, false));

 

and replace it with this ...

 

// If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message
  if ($x_response_code != '1') {
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . '&error=' . urlencode(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE), 'SSL', true, false));

 

Now you can go edit the file catalog/includes/languages/english/modules/payment/authorizenet.aim_php

and replace the text in MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE to whatever you want.

 

Hope this helps.

 

Rob

Share this post


Link to post
Share on other sites

Oh boy, I've been struggling with this same problem where authorize.net would not display errors for the better part of a day. I thought I'd post MY experience so as to maybe help someone else in the future who has the same problem.

 

* My problems started after I had a server crash (bad blocks on the HD) *

 

I had to re-install the O/S but all my osCommerce files and what-not were fine. Once the O/S was re-installed (without formatting the drive, obviously) everything came back up as expected. osCommerce was working just fine for my site, including SSL and my mail server, and my VoIP server, and all sorts of other custom configuration stuff that I have on my server. Oh, I self-host with commercial cable modem service and static IP address at my house.

 

The only issue I had was that now, nobody could process a payment through osCommerce. The problem manifested itself as first of all, a message from what would have been a customer who said he could not buy my product because the payment screen would just take him back to the checkout confirmation page without processing his payment.

 

Next, I was trying to see if there was a problem and I was having the same issue as in this thread, that I would get returned to the checkout confirmation page without any error message about why the payment was denied.

 

AIM settings were all still correct, I've processed many orders successfully over the last couple of years. It was only after the server crash that orders stopped happening even though everything else seemed to be working just fine.

 

ANYWAY, after many frustrating hours of looking through these threads and digging up obscure documentation for PHP, mySQL, etc. I finally FIGURED IT OUT. I know most everyone here has been through this sort of frustration and then, when you get it work, the immense sense of relief. Whew! :)

 

The solution turned out to be my server hostname. When re-installing the O/S, it asked for a hostname and I just put in the usual server names I always use, which is ex-girlfriends first names. I have Sarah, Kelli, Lisa, etc. as various servers around the house :). Well, of course when using SSL, one must use the PROPER host name, specifically my domain name.

 

Furthermore, after changing the hostname via commandline: "hostname NEW_HOSTNAME" (which is not permanent, by the way), you must ALSO restart your web server.

 

So, the moral of this story is, make sure your hostname is set properly to what authorize.net and your SSL cert are expecting.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×