Hello,
I am trying to implement a payment module, the problem I am having is that whatever happens in the transaction page I receive a message that says my transaction was successful but in reality it was supposed to say transaction failed, because I am entering wrong CC info.
Above code is in the payment module page and it is invoked in includes/modules/checkout_process.php as belowPHP Code:function before_process() {
global $_POST, $messageStack;
if ($_POST['Succeed'] == '0') return;
if ($_POST['Succeed'] == '1') {
$messageStack->add_session('checkout_payment', MODULE_PAYMENT_ASIANPAY_TEXT_DECLINED_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)
$messageStack->add_session('checkout_payment', MODULE_PAYMENT_ASIANPAY_TEXT_ERROR_MESSAGE, 'error');
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
}
This code does not seem to work properly. Somehow the system bypasses before_process() function. Where do I make mistake? Could anyone help me please? Thank you.PHP Code:// load the before_process function from the payment modules
$payment_modules->before_process();



