Results 1 to 10 of 15

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Payment module stuck at checkout_process & before_process function?

    What's the payment module? Looks like it's designed for much older versions of Zen Cart, and is passing unacceptable parameters, or parameters with very long values, both of which will cause a blank page when before_process() is run.
    .

    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.

  2. #2
    Join Date
    Aug 2011
    Posts
    8
    Plugin Contributions
    0

    Default Re: Payment module stuck at checkout_process & before_process function?

    Thanks a ton for the prompt response, really encouraging to see some support on here.

    I'm fairly certain you're correct. My clients gateway is EVO Canada, and they've supplied me with a credit card payment module that is supposed to be compatible with Zen, but it's entirely possible that it is only compatible with a much older version. It seems to be sending error messages via URL and other old-style things like that.

    Are we going to need to migrate to a different provider? Unfortunately I doubt I have the time nor experience to modify their payment module to work with the updated Zen - is a different provider our only option?

    Thanks!

  3. #3
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Payment module stuck at checkout_process & before_process function?

    Post the code from the before_process() function of the module, and we'll see what we can do with it.
    .

    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.

  4. #4
    Join Date
    Aug 2011
    Posts
    8
    Plugin Contributions
    0

    Default Re: Payment module stuck at checkout_process & before_process function?

    Here she is:

    function before_process() {

    if ($_GET['response'] == '1') return;
    if ($_GET['response'] == '2') {
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_DECLINED_MESSAGE), 'SSL', true, false));
    }
    // Code 3 is an error - but anything else is an error too (IMHO)
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_ERROR_MESSAGE), 'SSL', true, false));
    }

    Any help/direction is appreciated.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Payment module stuck at checkout_process & before_process function?

    Wow, that's *extremely* basic.

    You will need to rewrite both of those zen_redirect segments so that the error_message is passed via the messageStack instead of in the zen_href_link. And you'll want to skip the urlencoding.
    An example of the changes you need to make is here: http://www.zen-cart.com/forum/showth...33#post1054133

    Or just make sure the language definitions for both of those MODULE_PAYMENT_xxxxxxxx_MESSAGE constants are less than 40 characters each.
    .

    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.

  6. #6
    Join Date
    Aug 2011
    Posts
    8
    Plugin Contributions
    0

    Default Re: Payment module stuck at checkout_process & before_process function?

    Thanks again for the prompt response - tried it again with your suggestions and unfortunately I'm still receiving a blank page with a fairly length URL beginning with the checkout_process.php.

    My new module looks like:

    function before_process() {

    if ($_GET['response'] == '1') return;
    if ($_GET['response'] == '2') {
    global $messageStack;
    $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NET1_TEXT_ERROR_MESSAGE, 'error');
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
    }
    // Code 3 is an error - but anything else is an error too (IMHO)
    global $messageStack;
    $messageStack->add_session('checkout_payment', MODULE_PAYMENT_NET1_TEXT_ERROR_MESSAGE, 'error');
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
    }

    Hopefully this was implemented correctly - let me know! Again, thanks for the help, but still having the same issue! Oh, and I ran the echo's again, and the checkout_process is still getting caught up at before_process.

    -kyle

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

    Default Re: Payment module stuck at checkout_process & before_process function?

    Ah, ignore my error messages there... those don't apply to my payment module. I inserted the correct ones and it still displays the blank. Appreciate your thoughts.

 

 

Similar Threads

  1. v154 using the payment module function get_error
    By torvista in forum Addon Payment Modules
    Replies: 5
    Last Post: 7 Nov 2024, 09:46 PM
  2. v154 BrainTree Payment Module before_process - DP-5 Errors
    By RJR in forum Addon Payment Modules
    Replies: 1
    Last Post: 7 Jan 2016, 10:15 PM
  3. v139h blank checkout_process page when using moneris payment module 1.24 or 1.25
    By riomaha in forum Addon Payment Modules
    Replies: 9
    Last Post: 1 Nov 2013, 10:45 PM
  4. Replies: 1
    Last Post: 26 Jun 2012, 01:09 AM
  5. Understanding checkout flow regarding paypal, checkout_process.php and before_process
    By s_p_ike in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 1 Sep 2009, 12:50 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