Hi there,
I am new to zenCart but have experience elsewhere - I have been hired by my client to fix their zencart site. They are using epdq. One of the problems they have is that upon a card payment failing, the customer is not redirected back to the payment page to try again nor are they sent an email saying this. I would like upon failure for the user to be returned to the payment page and, if possible to also have an email sent to them notifying them of the failure. The code that matters (I think - correct me if I am wrong) is 'epdqcpi_redirector.php' and the current code is as follows:
<?
.....
require('includes/application_top.php');
$txn_status=epdqcpi_transaction_status($_GET['oid']);
switch (true) {
case ($txn_status == 'Success') :
zen_redirect(zen_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL', true)) ;
break;
case (substr($txn_status,0,8) == 'DECLINED') :
case (substr($txn_status,0,23) == 'Awaiting confirmation. ') :
default: // errors and problems with systems etc
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true)) ;
break;
}
zen_exit();
?>
Please can someone advise me as to the correct code on how to fix this and some more info on it - I should learn what is occuring not just the exact fix.
Thanks
Gooseman
Bookmarks