Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2005
    Location
    Tennessee
    Posts
    1,128
    Plugin Contributions
    0

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

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: HTTP 406 - The resource cannot be displayed

    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.

  3. #3
    Join Date
    Jan 2005
    Location
    Tennessee
    Posts
    1,128
    Plugin Contributions
    0

    Default Re: HTTP 406 - The resource cannot be displayed

    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)"

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: HTTP 406 - The resource cannot be displayed

    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:
    Code:
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, $error, 'SSL', true, false));
    Change it to this:
    Code:
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error=' . $error, 'SSL', true, false));
    or b) change it to this:
    Code:
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', '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.

  5. #5
    Join Date
    Jan 2005
    Location
    Tennessee
    Posts
    1,128
    Plugin Contributions
    0

    Default Re: HTTP 406 error on invalid credit card

    Works great now. Thank you sir.

 

 

Similar Threads

  1. v151 HTTP 406 error (Not acceptable) when Submit Sitemap to goole
    By louisapple in forum General Questions
    Replies: 1
    Last Post: 13 Mar 2013, 10:48 AM
  2. Virtual Merchant HTTP 406 error
    By talk2kmf in forum Addon Payment Modules
    Replies: 0
    Last Post: 3 Dec 2009, 10:59 AM
  3. HTTP 406 Error when updating any products
    By oxxyfx in forum General Questions
    Replies: 3
    Last Post: 26 Oct 2009, 07:40 AM
  4. System Setup HTTP 406 Error
    By kscully1 in forum Installing on a Linux/Unix Server
    Replies: 14
    Last Post: 11 Jul 2007, 12:20 PM
  5. Credit Card Invalid
    By lhhgbh in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 22 Jan 2007, 06:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR