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.1.0.0
- * @ Author : DeZender
- * @ Release on : 15.05.2020
- * @ Official site : http://DeZender.Net
- *
- */
- function _get_status($url, $app, $servername, $domain)
- {
- $cURL = curl_init();
- curl_setopt_array($cURL, [
- CURLOPT_RETURNTRANSFER => 1,
- CURLOPT_SSL_VERIFYPEER => false,
- CURLOPT_SSL_VERIFYHOST => false,
- CURLOPT_URL => $url,
- CURLOPT_USERAGENT => 'cURL Request',
- CURLOPT_POST => 1,
- CURLOPT_POSTFIELDS => ['app' => $app, 'domain' => $domain, 'server' => $servername, 'ip' => $_SERVER['REMOTE_ADDR']]
- ]);
- $result = curl_exec($cURL);
- $erro = '';
- if ($result === false) {
- $erro = curl_error($cURL);
- }
- $response = curl_getinfo($cURL, CURLINFO_HTTP_CODE);
- $result = json_decode($result);
- curl_close($cURL);
- return (object) ['response' => $response, 'result' => $result, 'erro' => $erro];
- }
- function faturaMP($mp_data, $obj)
- {
- $itens_p = [];
- $items_mp = [];
- $obj->select()->from('lista')->where('lista_pedido = ' . $obj->pedido_id)->execute();
- if ($obj->result()) {
- $obj->cut('lista_title', 60, '...');
- $itens = $obj->data;
- foreach ($itens as $i) {
- $obj->map($i);
- $obj->lista_preco = preg_replace('/\\,/', '', $obj->lista_preco);
- $itens_p['id'] = $obj->lista_item;
- $itens_p['title'] = (string) $obj->lista_title;
- $itens_p['quantity'] = $obj->lista_qtde;
- $itens_p['description'] = (string) $obj->lista_title;
- $itens_p['category_id'] = 'Produtos';
- $itens_p['unit_price'] = $obj->lista_preco;
- $items_mp[] = $itens_p;
- }
- }
- $cli_zip = str_replace('-', '', $obj->endereco_cep);
- $cliente_email = $obj->cliente_email;
- $cli_rua = $obj->endereco_rua;
- $cli_num = $obj->endereco_num;
- if (isset($_POST['cardholderName']) && !empty($_POST['cardholderName'])) {
- $cliente_full = explode(' ', $_POST['cardholderName']);
- if (isset($cliente_full[0]) && !empty($cliente_full[0])) {
- $cliente_nome = $cliente_full[0];
- }
- else {
- $cliente_nome = '';
- }
- if (isset($cliente_full[1]) && !empty($cliente_full[1])) {
- $cliente_sobrenome = $cliente_full[1];
- }
- else {
- $cliente_sobrenome = '';
- }
- }
- else {
- $cliente_nome = $obj->cliente_nome;
- $cliente_sobrenome = $obj->cliente_sobrenome;
- .......................................................................
- ..........................................
- .................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement