Forums / PayPal Website Payments Pro support / HTTP 406 error on invalid credit card

HTTP 406 error on invalid credit card

Locked

Views: 4,101

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
17 Jan 2008, 6:59 PM
#1
stagebrace avatar

stagebrace

Totally Zenned

Join Date:
Jan 2005
Location:
Tennessee
Posts:
985
Plugin Contributions:
0

HTTP 406 error on invalid credit card

When using the direct payment module, I add a CC number but change the last number to something incorrect (simulating a user error). Add the date and CVV values and submit the form. Every time I get the HTTP 406 - The resource cannot be displayed.

18 Jan 2008, 4:18 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: HTTP 406 error on invalid credit card

The cause of a 406 error should show in your server error logs.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Jan 2008, 4:24 AM
#3
stagebrace avatar

stagebrace

Totally Zenned

Join Date:
Jan 2005
Location:
Tennessee
Posts:
985
Plugin Contributions:
0

Re: HTTP 406 error on invalid credit card

Yep, What can I do so the program shows a pop up instead of an error page?

    • [17/Jan/2008:12:55:30 -0600] "GET /usa/index.php?main_page=checkout_payment&The%20credit%20card%20number%20entered%20is%20invalid.%20Please%20check%20the%20number%20and%20try%20again.&zenid=HTTP/1.1" 406 5 "https://www.brandnamebatteries.com/usa/index.php?main_page=checkout_payment&zenid=" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)"
18 Jan 2008, 5:14 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: HTTP 406 error on invalid credit card

It's probably a mod_security thing that's triggering the 406 error due to a somewhat malformed URL ... the error message doesn't have a variable assigned to it.

I gather you're using PayPal Website Payments Pro in this case, since you posted in this section of the forum.

You have a couple options:
edit /includes/modules/payment/paypaldp.php
a) around line 363 you'll see a line like this:zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, [B]$error[/B], 'SSL', true, false));Change it to this:```
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, [B]'error=' . $error[/B], 'SSL', true, false));

or b) change it to this:```
      zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, [B]''[/B], 'SSL', true, false));

The first option will correctly form the URL with the error message. The second skips the error message from the URL altogether, allowing the message to simply happen by the built-in messageStack.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Jan 2008, 8:44 PM
#5
stagebrace avatar

stagebrace

Totally Zenned

Join Date:
Jan 2005
Location:
Tennessee
Posts:
985
Plugin Contributions:
0

Re: HTTP 406 error on invalid credit card

Works great now. Thank you sir.:clap: