public function testeInstanciar()
 {
     $cnpj = '99999090910270';
     $pathCertsFiles = dirname(dirname(dirname(__FILE__))) . '/fixtures/certs/certificado_teste.pfx';
     $certPfxName = 'certificado_teste.pfx';
     $certPassword = '******';
     $aResp = Configure::checkCerts($cnpj, $pathCertsFiles, $certPfxName, $certPassword);
 }
Example #2
0
 * @author    Roberto L. Machado <linux.rlm at gmail dot com>
 *
 *          CONTRIBUIDORES (por ordem alfabetica):
 *              Clauber Santos <cload_info at yahoo dot com dot br>
 *              Leandro C. Lopez <*****@*****.**>
 * 
**/
if (!defined('PATH_NFEPHP')) {
    define('PATH_NFEPHP', dirname(dirname(__FILE__)));
}
error_reporting(E_ALL);
ini_set('display_errors', 'On');
require_once '../bootstrap.php';
use NFePHP\Common\Configure\Configure;
use NFePHP\Common\Files\FilesFolders;
$htmod = Configure::chkModules();
//variaveis da configuraĆ§Ć£o
$tpAmb = 2;
$pathXmlUrlFileNFe = 'nfe_ws3_mod55.xml';
$pathXmlUrlFileCTe = 'cte_ws2.xml';
$pathXmlUrlFileMDFe = 'mdf2_ws1.xml';
$pathXmlUrlFileCLe = '';
$pathXmlUrlFileNFSe = '';
$pathNFeFiles = '';
$pathCTeFiles = '';
$pathMDFeFiles = '';
$pathCLeFiles = '';
$pathNFSeFiles = '';
$pathCertsFiles = PATH_NFEPHP . DIRECTORY_SEPARATOR . 'certs' . DIRECTORY_SEPARATOR;
$siteUrl = str_replace('index.php', '', 'http://' . $_SERVER["SERVER_NAME"] . $_SERVER["SCRIPT_NAME"]);
$schemesNFe = 'PL_008i2';
Example #3
0
<?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);
Example #4
0
<?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);