authorize.net won't display errors

Recommended Posts

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

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.

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?

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

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.

Share this post

Link to post

Share on other sites

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.

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 ...

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

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.