function uc_credit_exit in Ubercart 6.2
Same name and namespace in other branches
- 5 payment/uc_credit/uc_credit.module \uc_credit_exit()
- 7.3 payment/uc_credit/uc_credit.module \uc_credit_exit()
Implements hook_exit().
File
- payment/
uc_credit/ uc_credit.module, line 250 - Defines the credit card payment method and hooks in payment gateways.
Code
function uc_credit_exit() {
// Make sure sensitive checkout session data doesn't persist on other pages.
if (isset($_SESSION['sescrd'])) {
if (isset($_GET['q'])) {
// Separate the args ourself since the arg() function may not be loaded.
$args = explode('/', $_GET['q']);
if (!isset($args[1]) || $args[1] != 'checkout') {
unset($_SESSION['sescrd']);
}
}
else {
unset($_SESSION['sescrd']);
}
}
}