<?php /* # ---------------------------------------------------------------------- # VERITRANS - SUBMIT: CONTROL # ---------------------------------------------------------------------- */ include "get.php"; include "update.php"; $_get = new PAYMENT_GET(); $_update = new PAYMENT_UPDATE(); $order_number = filter_var($_REQUEST['order_number'], FILTER_SANITIZE_STRING); $count_order = $_get->count_order($order_number); $data_order = $_get->get_order($order_number, 1); if ($count_order->rows > 0) { if (!isset($_SESSION['paypal'])) { $_SESSION['paypal']['order_number'] = $data_order->order_number; $_SESSION['paypal']['order_total'] = $data_order->order_total_amount; } else { unset($_SESSION['paypal']); $_SESSION['paypal']['order_number'] = $data_order->order_number; $_SESSION['paypal']['order_total'] = $data_order->order_total_amount; } $page = 'email-paypal-customer-pending/' . $order_number; } else { $page = 'home'; $type = 'danger'; $msg = 'Transaction Error please contact ' . $_global_notification->email_order; set_alert($type, $msg); } safe_redirect($page);
<?php /* # ---------------------------------------------------------------------- # VERITRANS - BACK: CONTROL # ---------------------------------------------------------------------- */ include "get.php"; include "update.php"; $_get = new PAYMENT_GET(); $_update = new PAYMENT_UPDATE(); $order_number = filter_var(substr(strrchr(CURR_URL, '='), 1), FILTER_SANITIZE_STRING); $count_order = $_get->count_order($order_number); $data_order = $_get->get_order($order_number, $count_order->rows); foreach ($data_order as $key => $data_order) { //$current_stock = $_get->get_item_stock($data_order->type_id, $data_order->stock_name); //$recover_Stock = $current_stock->stock_quantity + $data_order->item_quantity; //$_update->update_stock($recover_Stock, $data_order->type_id, $data_order->stock_name); $_update->delete_order_user($data_order->order_id); $_update->delete_order_item($data_order->order_id); $_update->delete_order($data_order->order_id); } $page = 'bag'; safe_redirect($page);
<?php /* # ---------------------------------------------------------------------- # SETTINGS - PAYMENT: CONTROL # ---------------------------------------------------------------------- */ $_get = new PAYMENT_GET(); $_update = new PAYMENT_UPDATE(); $payments = $_get->count_payment(1); if ($payments->rows > 0) { $payment_bank = $_get->get_payment(1); } else { $payment_bank->id = ''; /* $payment_bank->live_code = ''; $payment_bank->sandbox_code = ''; $payment_bank->environment = ''; $payment_bank->_3dsecure = ''; $payment_bank->status = ''; */ } /* --- BUTTON HANDLER --- */ if (isset($_POST['btn-payment']) && $_POST['btn-payment'] == 'Save Changes') { $live_code = filter_var($_POST['live'], FILTER_SANITIZE_STRING); $sandbox_code = filter_var($_POST['sandbox'], FILTER_SANITIZE_STRING); $environment = filter_var($_POST['environment'], FILTER_SANITIZE_STRING); $_3dsecure = filter_var($_POST['secure'], FILTER_SANITIZE_NUMBER_INT); $status = filter_var($_POST['status'], FILTER_SANITIZE_NUMBER_INT); if ($payments->rows > 0) { $id = $payment_bank->id;
<?php /* # ---------------------------------------------------------------------- # SETTINGS - PAYMENT: CONTROL # ---------------------------------------------------------------------- */ $_get = new PAYMENT_GET(); $_update = new PAYMENT_UPDATE(); $payments = $_get->get_payments(); $payment_bank = $_get->get_payment('bank'); /* --- BUTTON HANDLER --- */ if (isset($_POST['btn-payment']) && $_POST['btn-payment'] == 'Save Changes') { $payment_id = filter_var($_POST['account_id'], FILTER_SANITIZE_STRING); $type = filter_var($_POST['method'], FILTER_SANITIZE_STRING); $payment_bank = filter_var($_POST['name'], FILTER_SANITIZE_STRING); $payment_number = filter_var($_POST['number'], FILTER_SANITIZE_STRING); $payment_name = filter_var($_POST['account'], FILTER_SANITIZE_STRING); if ($payment_id == 'new') { $_update->insert_account($type, $payment_bank, $payment_number, $payment_name); $type = 'success'; $msg = 'New payment method successfully saved'; } else { $_update->update_account($payment_bank, $payment_number, $payment_name, $payment_id); $type = 'success'; $msg = 'Changes successfully saved.'; } $page = 'payment'; set_alert($type, $msg); safe_redirect($page); }