Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2009
    Posts
    7
    Plugin Contributions
    0

    Default Credit Card errors not showing

    I have added a payment gateway for my zen cart. the problem is that once i complete the final step (step 3) to confirm the order, it just returns to the step 2 rather than displaying a error message or success message. but in the address bar it shows the error

    index.php?main_page=checkout_payment&error_message=There+has+been+an+error+proce ssing+your+credit+card.+Please+try+again.
    how do i get it to show in the checkout page ??

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Credit Card errors not showing

    Depends which payment module addon you're using. Many are using the older method of showing long error messages via the URL, which can be problematic since it may make it look like hacker activity. The newer correct approach is to pass such messages via the $messageStack, which means you'll have to change the code to have it do that.
    .

    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
    Nov 2009
    Posts
    7
    Plugin Contributions
    0

    Default Re: Credit Card errors not showing

    i am using the Voice Commerce gateway. can u explain roughly how can i do it through the $messagestack?
    do i have to edit the given module files or the zen cart core file??

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Credit Card errors not showing

    You'd have to edit the 3rd-party module's code. I can't tell you exactly what line, because I've never heard of the module you're referring to, and it's not available in our contributed addons area.

    Chances are you'll find a line like the following in both the confirmation() and before_process() methods of the class:
    Code:
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'SSL', true, false));
    There may be LOTS of other zen_redirect calls in the file, and they should not be touched, so do exercise caution when editing.

    The use of $payment_error_return as a variable containing a parameter such as 'error_message=xxxxxxxxxxxxxxxxxxxxxxxxx' is the problem. In those cases, that line should be replaced with 3 lines:
    Code:
          global $messageStack;
          $messageStack->add_session('checkout_payment', $error, 'error');
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
    The variable $payment_error_return may be different in your module ... it all depends on what the author of the module chose to use for her variable names.
    .

    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. Credit Card Sidebox not showing
    By zynmax in forum Addon Sideboxes
    Replies: 0
    Last Post: 29 Jul 2008, 12:59 AM
  2. Credit Card Numbers not showing up
    By phenn in forum Managing Customers and Orders
    Replies: 1
    Last Post: 19 Feb 2008, 07:15 PM
  3. Credit Card Number not Showing
    By coastalfog in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 8 Aug 2006, 11:59 PM

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