Copyright (c) 2014 osCommerce Released under the GNU General Public License */ chdir('../../../../../'); require 'includes/application_top.php'; if (!isset($_SESSION['customer_id'])) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } if (defined('MODULE_PAYMENT_INSTALLED') && tep_not_null(MODULE_PAYMENT_INSTALLED) && in_array('braintree_cc.php', explode(';', MODULE_PAYMENT_INSTALLED))) { if (!class_exists('braintree_cc')) { include DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/braintree_cc.php'; include DIR_WS_MODULES . 'payment/braintree_cc.php'; } $braintree_cc = new braintree_cc(); if (!$braintree_cc->enabled) { tep_redirect(tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); } } else { tep_redirect(tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); } require DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/content/account/cm_account_braintree_cards.php'; require 'includes/modules/content/account/cm_account_braintree_cards.php'; $braintree_cards = new cm_account_braintree_cards(); if (!$braintree_cards->isEnabled()) { tep_redirect(tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); } if (isset($_GET['action'])) { if ($_GET['action'] == 'delete' && isset($_GET['id']) && is_numeric($_GET['id']) && isset($_GET['formid']) && $_GET['formid'] == md5($_SESSION['sessiontoken'])) { $token_query = tep_db_query("select id, braintree_token from customers_braintree_tokens where id = '" . (int) $_GET['id'] . "' and customers_id = '" . (int) $customer_id . "'");
Released under the GNU General Public License */ use OSC\OM\HTML; use OSC\OM\OSCOM; chdir('../../../../../'); require 'includes/application_top.php'; if (!isset($_SESSION['customer_id'])) { $_SESSION['navigation']->set_snapshot(); OSCOM::redirect('index.php', 'Account&LogIn', 'SSL'); } if (defined('MODULE_PAYMENT_INSTALLED') && tep_not_null(MODULE_PAYMENT_INSTALLED) && in_array('braintree_cc.php', explode(';', MODULE_PAYMENT_INSTALLED))) { if (!class_exists('braintree_cc')) { include DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/braintree_cc.php'; include DIR_WS_MODULES . 'payment/braintree_cc.php'; } $braintree_cc = new braintree_cc(); if (!$braintree_cc->enabled) { OSCOM::redirect('account.php', '', 'SSL'); } } else { OSCOM::redirect('account.php', '', 'SSL'); } require DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/content/account/cm_account_braintree_cards.php'; require 'includes/modules/content/account/cm_account_braintree_cards.php'; $braintree_cards = new cm_account_braintree_cards(); if (!$braintree_cards->isEnabled()) { OSCOM::redirect('account.php', '', 'SSL'); } if (isset($_GET['action'])) { if ($_GET['action'] == 'delete' && isset($_GET['id']) && is_numeric($_GET['id']) && isset($_GET['formid']) && $_GET['formid'] == md5($_SESSION['sessiontoken'])) { $Qtoken = $OSCOM_Db->get('customers_braintree_tokens', ['id', 'braintree_token'], ['id' => $_GET['id'], 'customers_id' => $_SESSION['customer_id']]);