url
https://bhisshomologa.pbh.gov.br/bhiss-ws/nfseoperation
GerarNfseaction
http://ws.bhiss.pbh.gov.br/GerarNfsesoapver
1.2parameters
[0] => Content-Type: text/xml;charset=UTF-8
[1] => SOAPAction: "http://ws.bhiss.pbh.gov.br/GerarNfse"
[2] => Content-length: 9734header
Content-Type: text/xml;charset=UTF-8 SOAPAction: "http://ws.bhiss.pbh.gov.br/GerarNfse" Content-length: 9734namespaces
body
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.bhiss.pbh.gov.br"> <soapenv:Header/> <soapenv:Body> <ws:GerarNfseRequest> <nfseCabecMsg><![CDATA[<cabecalho xmlns="http://www.abrasf.org.br/nfse.xsd" versao="1.00"><versaoDados>1.00</versaoDados></cabecalho>]]></nfseCabecMsg> <nfseDadosMsg><![CDATA[<GerarNfseEnvio xmlns="http://www.abrasf.org.br/nfse.xsd"><LoteRps Id="Lote1" versao="1.00"><NumeroLote>1</NumeroLote> </soapenv:Body> </soapenv:Envelope>
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', 'On'); | |
require_once '../bootstrap.php'; | |
use NFePHP\Common\Certificate; | |
use NFePHP\NFSeBHISS\Tools; | |
use NFePHP\NFSeBHISS\Rps; | |
try { | |
$config = [ | |
'cnpj' => '99999999000191', | |
'im' => '1733160024', | |
'cmun' => '3136702', //2611606 3106200 3136702 3304557 3300100 3301702 3302007 3302601 3304524 3501608 4314902 | |
'razao' => 'Empresa Test Ltda', | |
'tpamb' => 1 | |
]; | |
$configJson = json_encode($config); | |
$content = file_get_contents('expired_certificate.pfx'); | |
$password = 'associacao'; | |
$cert = Certificate::readPfx($content, $password); | |
$tools = new Tools($configJson, $cert); | |
$std = new \stdClass(); | |
$std->version = '1.00'; | |
$std->IdentificacaoRps = new \stdClass(); | |
$std->IdentificacaoRps->Numero = 11; //limite 15 digitos | |
$std->IdentificacaoRps->Serie = '1'; //BH deve ser string numerico | |
$std->IdentificacaoRps->Tipo = 1; //1 - RPS 2-Nota Fiscal Conjugada (Mista) 3-Cupom | |
$std->DataEmissao = '2018-10-31T12:33:22'; | |
$std->NaturezaOperacao = 1; // 1 – Tributação no município | |
// 2 - Tributação fora do município | |
// 3 - Isenção | |
// 4 - Imune | |
// 5 – Exigibilidade suspensa por decisão judicial | |
// 6 – Exigibilidade suspensa por procedimento administrativo | |
$std->RegimeEspecialTributacao = 3; // 1 – Microempresa municipal | |
// 2 - Estimativa | |
// 3 – Sociedade de profissionais | |
// 4 – Cooperativa | |
// 5 – MEI – Simples Nacional | |
// 6 – ME EPP – Simples Nacional | |
$std->OptanteSimplesNacional = 1; //1 - SIM 2 - Não | |
$std->IncentivadorCultural = 2; //1 - SIM 2 - Não | |
$std->Status = 1; // 1 – Normal 2 – Cancelado | |
$std->Tomador = new \stdClass(); | |
$std->Tomador->Cnpj = "99999999000191"; | |
$std->Tomador->Cpf = "12345678901"; | |
$std->Tomador->RazaoSocial = "Fulano de Tal"; | |
$std->Tomador->Endereco = new \stdClass(); | |
$std->Tomador->Endereco->Endereco = 'Rua das Rosas'; | |
$std->Tomador->Endereco->Numero = '111'; | |
$std->Tomador->Endereco->Complemento = 'Sobre Loja'; | |
$std->Tomador->Endereco->Bairro = 'Centro'; | |
$std->Tomador->Endereco->CodigoMunicipio = 3106200; | |
$std->Tomador->Endereco->Uf = 'MG'; | |
$std->Tomador->Endereco->Cep = 30160010; | |
$std->Servico = new \stdClass(); | |
$std->Servico->ItemListaServico = '11.01'; | |
$std->Servico->CodigoTributacaoMunicipio = '522310000'; | |
$std->Servico->Discriminacao = 'Teste de RPS'; | |
$std->Servico->CodigoMunicipio = 3106200; | |
$std->Servico->Valores = new \stdClass(); | |
$std->Servico->Valores->ValorServicos = 100.00; | |
$std->Servico->Valores->ValorDeducoes = 10.00; | |
$std->Servico->Valores->ValorPis = 10.00; | |
$std->Servico->Valores->ValorCofins = 10.00; | |
$std->Servico->Valores->ValorInss = 10.00; | |
$std->Servico->Valores->ValorIr = 10.00; | |
$std->Servico->Valores->ValorCsll = 10.00; | |
$std->Servico->Valores->IssRetido = 1; | |
$std->Servico->Valores->ValorIss = 10.00; | |
$std->Servico->Valores->OutrasRetencoes = 10.00; | |
$std->Servico->Valores->Aliquota = 5; | |
$std->Servico->Valores->DescontoIncondicionado = 10.00; | |
$std->Servico->Valores->DescontoCondicionado = 10.00; | |
$std->IntermediarioServico = new \stdClass(); | |
$std->IntermediarioServico->RazaoSocial = 'INSCRICAO DE TESTE SIATU - D AGUA -PAULINO S'; | |
$std->IntermediarioServico->Cnpj = '99999999000191'; | |
$std->IntermediarioServico->InscricaoMunicipal = '8041700010'; | |
$std->ConstrucaoCivil = new \stdClass(); | |
$std->ConstrucaoCivil->CodigoObra = '1234'; | |
$std->ConstrucaoCivil->Art = '1234'; | |
$rps = new Rps($std); | |
$lote = 1; | |
$response = $tools->gerarNfse($rps, $lote); | |
header('Content-Type: application/xml; charset=utf-8'); echo $response; | |
} catch (\Exception $e) { | |
echo $e->getMessage(); | |
} |
--
--
Você recebeu esta mensagem porque está inscrito no Grupo "NFePHP".
Para Postar: nfe...@googlegroups.com
Para Sair do Grupo: nfephp+un...@googlegroups.com
Link: http://groups.google.com.br/group/nfephp?hl=pt-BR
-------
Repositórios: https://github.com/nfephp-org
---
Você recebeu essa mensagem porque está inscrito no grupo "NFePHP" dos Grupos do Google.
Para cancelar inscrição nesse grupo e parar de receber e-mails dele, envie um e-mail para nfephp+un...@googlegroups.com.
Para ver essa discussão na Web, acesse https://groups.google.com/d/msgid/nfephp/b0fb7ff7-0e85-4825-89fe-0f22f81e43e0n%40googlegroups.com.