New Zenner
- Join Date:
- Mar 2004
- Posts:
- 54
- Plugin Contributions:
- 0
Preventing Credit Card Slamming
The issue has been discussed before:
http://www.zen-cart.com/forum/showthread.php?t=52483&page=2#17
Through some trial and error we have come up with several code changes that are working well in our test cases.
The first being how to logout a customer automatically after X failed payment attempts with this snippet in modules/checkout_process.php:
if(! isset($_SESSION['payment_attempt'])) $_SESSION['payment_attempt'] = 0;
$_SESSION['payment_attempt']++;
if($_SESSION['payment_attempt'] > 6) { // change 6 to change how many attempts to allow before auto logout
// destroy session to log customer out
zen_session_destroy();
// redirect to timeout page or create new page to redirect to
zen_redirect(zen_href_link(FILENAME_TIME_OUT, '', 'SSL'));
}
Complete details on using this snippet may be found at:
http://damonparker.org/blog/2007/06/22/zencart-hack-logout-customer-automatically-after-x-failed-payment-attempts/
cheers
damonparker.org
freelance web app dev
ZenCart Sites: pimpcostumes.com | platinumcostumes.com | costumeshoes.com