Forums / Addon Payment Modules / Barclays epdq - Redirect/Email upon Payment Failure

Barclays epdq - Redirect/Email upon Payment Failure

Locked

Views: 2,577

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
7 Jul 2006, 5:38 PM
#1
gooseman avatar

gooseman

New Zenner

Join Date:
Jul 2006
Posts:
23
Plugin Contributions:
0

Barclays epdq - Redirect/Email upon Payment Failure

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

9 Jul 2006, 9:38 PM
#2
gooseman avatar

gooseman

New Zenner

Join Date:
Jul 2006
Posts:
23
Plugin Contributions:
0

Re: Barclays epdq - Redirect/Email upon Payment Failure

BUMP + I will post this in the general questions section now so please reply there.

Thanks Goose