Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.0.5.1
- * @ Author : DeZender
- * @ Release on : 28.07.2018
- * @ Official site : http://DeZender.Net
- *
- */
- class BpagseguroRepagamentoModuleFrontController extends ModuleFrontController
- {
- public function postProcess()
- {
- global $cookie;
- $serial = Configuration::get('BPAGSEGURO_SERIAL');
- $this->verificaSerial($serial);
- $id_pedido = (int) $_GET['id_order'];
- $pedido = new Order((int) $id_pedido);
- $cart = new Cart($pedido->id_cart);
- $id_customer = $pedido->id_customer;
- $id_customer_atual = $this->context->customer->id;
- $dados = DB::getInstance()->getRow('SELECT module, cpf, telefone FROM apagseguro WHERE id_order=' . $id_pedido);
- if (($cart->id_customer == 0) || ($cart->id_address_delivery == 0) || ($cart->id_address_invoice == 0) || !$this->module->active || ($id_customer != $id_customer_atual) || (($dados['module'] != 'A') && ($dados['module'] != 'C'))) {
- Tools::redirect('index.php');
- }
- $authorized = false;
- foreach (Module::getPaymentModules() as $module) {
- if ($module['name'] == 'bpagseguro') {
- $authorized = true;
- break;
- }
- }
- if (!$authorized) {
- exit($this->trans('This payment method is not available.', [], 'Modules.Bpagseguro.Shop'));
- }
- $customer = new Customer($cart->id_customer);
- $currency = $cart->id_currency;
- $total = (double) $cart->getOrderTotal(true, Cart::BOTH);
- $hash = $_GET['sender_hash'];
- $email = $customer->email;
- $telefone = (string) preg_replace('/[^0-9]/', '', $dados['telefone']);
- ...........................................................
- ...........................
- ............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement