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