Advertisement
Guest User

Untitled

a guest
Sep 10th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.0.5.1
  8. * @ Author : DeZender
  9. * @ Release on : 28.07.2018
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class BpagseguroRepagamentoModuleFrontController extends ModuleFrontController
  15. {
  16. public function postProcess()
  17. {
  18. global $cookie;
  19. $serial = Configuration::get('BPAGSEGURO_SERIAL');
  20. $this->verificaSerial($serial);
  21. $id_pedido = (int) $_GET['id_order'];
  22. $pedido = new Order((int) $id_pedido);
  23. $cart = new Cart($pedido->id_cart);
  24. $id_customer = $pedido->id_customer;
  25. $id_customer_atual = $this->context->customer->id;
  26. $dados = DB::getInstance()->getRow('SELECT module, cpf, telefone FROM apagseguro WHERE id_order=' . $id_pedido);
  27. 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'))) {
  28. Tools::redirect('index.php');
  29. }
  30.  
  31. $authorized = false;
  32.  
  33. foreach (Module::getPaymentModules() as $module) {
  34. if ($module['name'] == 'bpagseguro') {
  35. $authorized = true;
  36. break;
  37. }
  38. }
  39.  
  40. if (!$authorized) {
  41. exit($this->trans('This payment method is not available.', [], 'Modules.Bpagseguro.Shop'));
  42. }
  43.  
  44. $customer = new Customer($cart->id_customer);
  45. $currency = $cart->id_currency;
  46. $total = (double) $cart->getOrderTotal(true, Cart::BOTH);
  47. $hash = $_GET['sender_hash'];
  48. $email = $customer->email;
  49. $telefone = (string) preg_replace('/[^0-9]/', '', $dados['telefone']);
  50. ...........................................................
  51. ...........................
  52. ............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement