Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2011
    Posts
    7
    Plugin Contributions
    0

    Default Server Error 406 on EBS Payment Gateway return URL

    I am getting the below error when I am testing my integration with the payment gateway:

    Server Error
    406 - Client browser does not accept the MIME type of the requested page.
    The page you are looking for cannot be opened by your browser because it has a file name extension that your browser does not accept.

    After checkout from Zencart, I am taken to the payment gateway, I enter the credit card details, the payment gets registered in the payment gateway database. However, when the payment gateway returns the message back to the zencart, the above message is displayed on the browser.

    The URL is as below:

    http://www.zencartFolder/index.php?m...ease+try+again.

    So, from the URL, it appears that there was some error in the credit card details and hence the payment gateway returns the error message. However, if the user enters incorrect credit card details in a live scenario, it should take me back to Zencart and display the error message.

    Any idea how I can resolve this?

  2. #2
    Join Date
    Jan 2011
    Posts
    7
    Plugin Contributions
    0

    Default Server Error 406 on EBS Payment Gateway return URL

    I am getting the below error when I am testing my integration with the payment gateway:

    Server Error
    406 - Client browser does not accept the MIME type of the requested page.
    The page you are looking for cannot be opened by your browser because it has a file name extension that your browser does not accept.

    After checkout from Zencart, I am taken to the payment gateway, I enter the credit card details, the payment gets registered in the payment gateway database. However, when the payment gateway returns the message back to the zencart, the above message is displayed on the browser.

    The URL is as below:

    http:/ /www.my_zencartFolder/index.php?main_page=checkout_payment&error_message=There+has+been+an+error+proce ssing+your+credit+card.+Please+try+again

    So, from the URL, it appears that there was some error in the credit card details and hence the payment gateway returns the error message. However, if the user enters incorrect credit card details in a live scenario, it should take me back to Zencart and display the error message.

    Any idea how I can resolve this?

  3. #3
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Server Error 406 on Payment Gateway return URL

    What gateway module are you using?
    Zen-Venom Get Bitten

  4. #4
    Join Date
    Jan 2011
    Posts
    7
    Plugin Contributions
    0

    Default Re: Server Error 406 on Payment Gateway return URL

    I am using EBS Payment Gateway. secure.ebs.in

  5. #5
    Join Date
    Jan 2011
    Posts
    7
    Plugin Contributions
    0

    Default Payment Gateway Integration Error!!! Payment Gateway EBS

    I am integrating Zencart with the Payment Gateway EBS.

    I am able to checkout, navigate to payment gateway, and provide CCard details. The URL returned by Payment gateway is

    http://zencart/index.php?main_page=checkout_process&DR=$OP+dgG1+lqFQBe7E4kZcEkKEDKivrv9juvLUPmh NU2L7BzFg1aJTYfhIjEHCotqxDGsu0zXxmQgWO0UQp6kNh/kVsxEnaZ94X1YHt5r7D++ma9vcUhNiDA41LdMyIWaaWbfHRTbfxoLx0c9jCMlOWMLpBCz9UxooeJs6z5 8VRmjsN2U4oQVOqPL9bQKje/o9/n36vso6Q8ZeyQUEmj6xnekSkYKomjfmhsxMmVoXx6Q+dLWnQiOPwrgnDX2KtoPWr+GurtWTmZvj5AzcV hWO7aITspvT

    This is giving me a 406 error on IIS (browser does not recognize page extension)

    The Return URL has to be in the following format to receive the response from EBS Server,

    http://www.yourdomainname.com/response.extension?DR={DR}

    I am not sure why I am getting the "There was an error processing your credit card. Please try again" error.

    Any idea what I can try out or change to get out of this problem soon?!

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

    Default Re: Payment Gateway Integration Error!!! Payment Gateway EBS

    That's because Zen Cart throws a 406 error whenever very long GET strings are passed in the URL, because that's one of the most common things that hackers/bots and other rogue visitors do to look for security holes.
    It would be better to use another method to pass back a response.
    .

    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.

  7. #7
    Join Date
    Jan 2011
    Posts
    7
    Plugin Contributions
    0

    red flag Re: Payment Gateway Integration Error!!! Payment Gateway EBS

    Thank you for your reply.

    I have a difficulty understanding "It would be better to use another method to pass back a response."

    The long URL that I am getting is from EBS i.e. the payment gateway. Are you suggesting I talk to my payment gateway people to send back a different kind of response that has a lesser URL length?


    In case the Payment gateway provider is not ready to change the response, is there a way in Zencart to accept long URLs?
    Can I change code in Zencart to be able to accept a long URL like this?

  8. #8
    Join Date
    Jan 2011
    Posts
    7
    Plugin Contributions
    0

    red flag Re: Payment Gateway Integration Error!!! Payment Gateway EBS

    The piece of code that is throwing me the error is below:


    if (!isset($response['ResponseCode']) || !is_numeric($response['ResponseCode']) || $response['ResponseCode'] != '0') {

    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_TEXT_ERROR_MESSAGE), 'SSL', true, false));
    }


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

    Default Re: Payment Gateway Integration Error!!! Payment Gateway EBS

    Quote Originally Posted by MartinKneeshaw View Post
    The long URL that I am getting is from EBS i.e. the payment gateway. Are you suggesting I talk to my payment gateway people to send back a different kind of response that has a lesser URL length?
    Not exactly. I'm suggesting that they not send ANYTHING long via the URL.
    Quote Originally Posted by MartinKneeshaw View Post
    In case the Payment gateway provider is not ready to change the response, is there a way in Zencart to accept long URLs?
    Can I change code in Zencart to be able to accept a long URL like this?
    Yes, you could break the protection logic in application_top and let it receive any junk you want to let through.

    But that's not the recommended approach.
    .

    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.

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

    Default Re: Payment Gateway Integration Error!!! Payment Gateway EBS

    Quote Originally Posted by MartinKneeshaw View Post
    The piece of code that is throwing me the error is below:


    if (!isset($response['ResponseCode']) || !is_numeric($response['ResponseCode']) || $response['ResponseCode'] != '0') {

    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_TEXT_ERROR_MESSAGE), 'SSL', true, false));
    }

    Okay, if that's the line that's causing you problems, then rewrite it by removing the long error message, like the existing built-in modules do. ie:
    Code:
          global $messageStack;
          $messageStack->add_session('header', MODULE_PAYMENT_TEXT_ERROR_MESSAGE, 'error');
            zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
    .

    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.

 

 

Similar Threads

  1. v151 Next Step After Payment Server: Return URL
    By jmnduc in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 20 Apr 2013, 09:43 AM
  2. ebs.in payment gateway issue
    By wowemall in forum Addon Payment Modules
    Replies: 4
    Last Post: 1 Nov 2012, 11:14 AM
  3. ebs payment gateway problem
    By nagrgk in forum Addon Payment Modules
    Replies: 0
    Last Post: 14 Apr 2010, 07:34 AM
  4. EBS Payment Gateway Module
    By biju in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 13 Apr 2009, 11:42 AM

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