Hi,
Since payment modules are intended to use the messageStack functionality from Zen Cart 1.3.9 onwards I think the following lines in checkout_payment/header_php.php will be defunct from 1.3.9 onwards and should be removed:
PHP Code:
if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) {
$messageStack->add('checkout_payment', $error['error'], 'error');
}
The maximum length of any error message would be 43 characters in the PayPalWPP module, and for any third party modules it would seem pointless to manage the message passing using session variables when messageStack's add_session method could just be used instead, before redirecting back to the payment page.
For these reasons I recommend that you remove support for get_error method in payment modules from 1.3.9 onwards.
This will ensure that other authors of payment modules will also update their error handling code and won't fall foul of the soon-to-be-introduced "contamination" functionality.
Hope that helps!
All the best...
Conor
Bookmarks