public function postProcess() { include dirname(__FILE__) . '/cripto.php'; $currency = new Currency(intval($this->context->cookie->id_currency)); $order_n = $this->context->cookie->cod_frac; $order_rvc = Tools::getValue('id_pedido'); //$order_n = encriptar($order_n); $id_status = Configuration::get('frac_id_status'); $fracc_res = Tools::getValue('status'); $total = floatval(number_format($this->context->cart->getOrderTotal(true, 3), 2, '.', '')); if ($order_rvc === $order_n && $fracc_res === 'autorizada') { $mailVars = array(); $modulename = new fracciona(); $modulename->validateOrder($this->context->cart->id, $id_status, $total, $modulename->displayName, $order_rvc, $mailVars, $currency->id, false, $this->context->customer->secure_key); $order = new Order($modulename->currentOrder); } else { if ($order_rvc === $order_n && $fracc_res === 'evaluada') { $mailVars = array(); $modulename = new fracciona(); $modulename->validateOrder($this->context->cart->id, $id_status, $total, $modulename->displayName, $order_rvc, $mailVars, $currency->id, false, $this->context->customer->secure_key); $order = new Order($modulename->currentOrder); } else { if ($order_rvc === $order_n && $fracc_res === 'denegada') { } } } $this->context->smarty->assign(array('status' => $fracc_res)); $this->setTemplate('finalProcess.tpl'); }
public function postProcess() { include dirname(__FILE__) . '/cripto.php'; $currency = new Currency(intval($this->context->cookie->id_currency)); $order_n = $this->context->cookie->cod_frac; $order_rvc = Tools::getValue('NPEDIDO'); $order_n = encriptar($order_n); $id_status = Configuration::get('frac_id_status'); $total = floatval(number_format($this->context->cart->getOrderTotal(true, 3), 2, '.', '')); echo "una " . $order_rvc . " una"; echo $order_n; if ($order_rvc == $order_n) { $mailVars = array(); $modulename = new fracciona(); $modulename->validateOrder($this->context->cart->id, $id_status, $total, $modulename->displayName, $order_rvc, $mailVars, $currency->id, false, $this->context->customer->secure_key); $order = new Order($modulename->currentOrder); } else { echo "error: el pago no coincide"; } }