* @copyright 2007-2017 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ class AsiapayConfirmationModuleFrontController extends ModuleFrontController { public function postProcess() { $cart_id = $_REQUEST['cart_id']; $cart = new Cart($cart_id); $customer = new Customer(intval($cart->id_customer)); $asiapay = new asiapay(); if(isset($_REQUEST['success'])) { $id_order = Order::getOrderByCartId((int)$cart_id); $customer = new Customer(intval($cart->id_customer)); Tools::redirect('index.php?controller=order-confirmation&id_cart='.(int)($cart_id).'&id_module='.(int)($asiapay->id).'&id_order='.$id_order.'&key='.$customer->secure_key); } else if(isset($_REQUEST['fail'])) { $id_order = Order::getOrderByCartId((int)$cart_id); Tools::redirect('index.php?controller=order-confirmation&id_cart='.(int)($cart_id).'&id_module='.(int)($asiapay->id).'&id_order='.$id_order.'&key='.$customer->secure_key); } else if(isset($_REQUEST['cancel'])){ Tools::redirect("index.php?controller=order&step=3", __PS_BASE_URI__, null); } } }