Skip to content

Commit

Permalink
Merge pull request #80 from samuelbasso/master
Browse files Browse the repository at this point in the history
Merge com develop
  • Loading branch information
samuelbasso authored Dec 22, 2016
2 parents 5f20821 + 344445e commit 2ea8e48
Show file tree
Hide file tree
Showing 15 changed files with 2,484 additions and 845 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Caso você encontre algum problema relativo a segurança, por favor envie um ema
- Samuel Basso (Mantenedor)
- Gleidson Brito (Colaborador)
- Giovani Paseto (Colaborador)
- Mailson Kendi Sakamoto (Colaborador)
- Maison Kendi Sakamoto (Colaborador)
- Everton Xavier (Colaborador)


Expand Down Expand Up @@ -80,4 +80,4 @@ Este pacote está diponibilizado sob GPLv3 ou LGPLv3 ou MIT License (MIT). Leia
[link-issues]: https://github.com/nfephp-org/sped-cte/issues
[link-forks]: https://github.com/nfephp-org/sped-cte/network
[link-stars]: https://github.com/nfephp-org/sped-cte/stargazers
[link-gitter]: https://gitter.im/nfephp-org/sped-cte?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[link-gitter]: https://gitter.im/nfephp-org/sped-cte?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
6 changes: 3 additions & 3 deletions config/cte_ws2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<CteRetRecepcao method='CTeRetRecepcao' operation='CteRetRecepcao' version='2.00'>https://hcte.fazenda.mg.gov.br/cte/services/CteRetRecepcao</CteRetRecepcao>
<CteCancelamento method='CTeCancelamento' operation='CteCancelamento' version='2.00'>https://hcte.fazenda.mg.gov.br/cte/services/CteCancelamento</CteCancelamento>
<CteInutilizacao method='CTeInutilizacao' operation='CteInutilizacao' version='2.00'>https://hcte.fazenda.mg.gov.br/cte/services/CteInutilizacao</CteInutilizacao>
<CteConsultaProtocolo method='cteConsultaCT' operation='CteConsultaProtocolo' version='2.00'>https://hcte.fazenda.mg.gov.br/cte/services/CteConsulta</CteConsultaProtocolo>
<CteConsultaProtocolo method='cteConsultaCT' operation='CteConsulta' version='2.00'>https://hcte.fazenda.mg.gov.br/cte/services/CteConsulta</CteConsultaProtocolo>
<CteStatusServico method='cteStatusServicoCT' operation='CteStatusServico' version='2.00'>https://hcte.fazenda.mg.gov.br/cte/services/CteStatusServico</CteStatusServico>
<CteRecepcaoEvento method='cteRecepcaoEvento' operation='CteRecepcaoEvento' version='2.00'>https://hcte.fazenda.mg.gov.br/cte/services/RecepcaoEvento</CteRecepcaoEvento>
</homologacao>
Expand All @@ -19,7 +19,7 @@
<CteRetRecepcao method='CTeRetRecepcao' operation='CteRetRecepcao' version='2.00'>https://cte.fazenda.mg.gov.br/cte/services/CteRetRecepcao</CteRetRecepcao>
<CteCancelamento method='CTeCancelamento' operation='CteCancelamento' version='2.00'>https://cte.fazenda.mg.gov.br/cte/services/CteCancelamento</CteCancelamento>
<CteInutilizacao method='CTeInutilizacao' operation='CteInutilizacao' version='2.00'>https://cte.fazenda.mg.gov.br/cte/services/CteInutilizacao</CteInutilizacao>
<CteConsultaProtocolo method='cteConsultaCT' operation='CteConsultaProtocolo' version='2.00'>https://cte.fazenda.mg.gov.br/cte/services/CteConsulta</CteConsultaProtocolo>
<CteConsultaProtocolo method='cteConsultaCT' operation='CteConsulta' version='2.00'>https://cte.fazenda.mg.gov.br/cte/services/CteConsulta</CteConsultaProtocolo>
<CteStatusServico method='cteStatusServicoCT' operation='CteStatusServico' version='2.00'>https://cte.fazenda.mg.gov.br/cte/services/CteStatusServico</CteStatusServico>
<CteRecepcaoEvento method='cteRecepcaoEvento' operation='CteRecepcaoEvento' version='2.00'>https://cte.fazenda.mg.gov.br/cte/services/RecepcaoEvento</CteRecepcaoEvento>
</producao>
Expand Down Expand Up @@ -167,4 +167,4 @@
<CteStatusServico method='cteStatusServicoCT' operation='CteStatusServico' version='2.00'>https://nfe.fazenda.sp.gov.br/cteWEB/services/CteStatusServico.asmx</CteStatusServico>
</producao>
</UF>
</WS>
</WS>
586 changes: 304 additions & 282 deletions examples/testaMakeCTe.php

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions install/certchk.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace NFePHP\install;

require_once('../bootstrap.php');

use NFePHP\Common\Configure\Configure;

$cnpj = filter_input(INPUT_GET, 'cnpj', FILTER_SANITIZE_STRING);
$pathCertsFiles = filter_input(INPUT_GET, 'pathCertsFiles', FILTER_SANITIZE_STRING);
$certPfxName = filter_input(INPUT_GET, 'certPfxName', FILTER_SANITIZE_STRING);
$certPassword = filter_input(INPUT_GET, 'certPassword', FILTER_SANITIZE_STRING);
$certPhrase = filter_input(INPUT_GET, 'certPhrase', FILTER_SANITIZE_STRING);
$cnpj = preg_replace('/[^0-9]/', '', $cnpj);

$aResp = Configure::checkCerts($cnpj, $pathCertsFiles, $certPfxName, $certPassword);

print json_encode($aResp);
82 changes: 82 additions & 0 deletions install/criaJsonConfig.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php

if (!defined('PATH_NFEPHP')) {
define('PATH_NFEPHP', dirname(dirname(__FILE__)));
}

$aDocFormat = array(
'format'=>'P',
'paper' => 'A4',
'southpaw' => true,
'pathLogoFile' => PATH_NFEPHP . 'images/logo.jpg',
'logoPosition' => 'L',
'font' => 'Times',
'printer' => ''
);

$aMailConf = array(
'mailAuth' => true,
'mailFrom' => '[email protected]',
'mailSmtp' => 'smtp.suaempresa.com.br',
'mailUser'=>'[email protected]',
'mailPass'=>'senha',
'mailProtocol'=>'',
'mailPort'=>'587',
'mailFromMail'=>'[email protected]',
'mailFromName'=>'NFe',
'mailReplayToMail'=> '[email protected]',
'mailReplayToName' => 'NFe',
'mailImapHost' => 'imap.suaempresa.com.br',
'mailImapPort' => '143',
'mailImapSecurity'=> 'tls',
'mailImapNocerts'=> 'novalidate-cert',
'mailImapBox'=>'INBOX'
);

$aProxyConf = array(
'proxyIp' => '',
'proxyPort' => '',
'proxyUser' => '',
'proxyPass' => ''
);

$aConfig = array(
'atualizacao' => date('Y-m-d h:i:s'),
'tpAmb' => '2',
'pathXmlUrlFileNFe' => 'nfe_ws3_mod55.xml',
'pathXmlUrlFileCTe' => 'cte_ws2.xml',
'pathXmlUrlFileMDFe' => 'mdfe_ws1.xml',
'pathXmlUrlFileCLe' => '',
'pathXmlUrlFileNFSe' => '',
'pathNFeFiles' => '/var/www/nfe',
'pathCTeFiles'=> '/var/www/cte',
'pathMDFeFiles'=> '/var/www/mdfe',
'pathCLeFiles'=> '/var/www/cle',
'pathNFSeFiles'=> '/var/www/nfse',
'pathCertsFiles' => PATH_NFEPHP . 'certs/',
'siteUrl' => str_replace('criaJsonConfig.php', '', 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["SCRIPT_NAME"]),
'schemasNFe' => 'PL_008f',
'schemasCTe' => 'PL_CTe_200',
'schemasMDFe' => 'PL_MDFe_100',
'schemasCLe' => '',
'schemasNFSe' => '',
'razaosocial' => 'Sua Empresa Ltda',
'siglaUF'=> 'SP',
'cnpj' => '9999999999999',
'tokenIBPT' => '',
'tokenNFCe' => '',
'tokenNFCeId' => '',
'certPfxName' => 'certificado.pfx',
'certPassword' => 'senha',
'certPhrase' => '',
'aDocFormat' => $aDocFormat,
'aMailConf' => $aMailConf,
'aProxyConf' => $aProxyConf
);

print_r($aConfig);
echo "<BR><BR><BR>";

$config = json_encode($aConfig);
$filename = '../config/config.json';
file_put_contents($filename, $config);
18 changes: 18 additions & 0 deletions install/folderchk.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace NFePHP\install;

require_once('../bootstrap.php');

use NFePHP\Common\Configure\Configure;

$pathnfe = filter_input(INPUT_GET, 'pathNFeFiles', FILTER_SANITIZE_STRING);
$pathcte = filter_input(INPUT_GET, 'pathCTeFiles', FILTER_SANITIZE_STRING);
$pathmdfe = filter_input(INPUT_GET, 'pathMDFeFiles', FILTER_SANITIZE_STRING);
$pathcle = filter_input(INPUT_GET, 'pathCLeFiles', FILTER_SANITIZE_STRING);
$pathnfse = filter_input(INPUT_GET, 'pathNFSeFiles', FILTER_SANITIZE_STRING);
$pathcerts = filter_input(INPUT_GET, 'pathCertsFiles', FILTER_SANITIZE_STRING);

$aResp = Configure::checkFolders($pathnfe, $pathcte, $pathmdfe, $pathcle, $pathnfse, $pathcerts);

print json_encode($aResp);
Loading

0 comments on commit 2ea8e48

Please sign in to comment.