Exemplo n.º 1
0
 public function render($versao, $remetenteTipoDoc, $remetenteCNPJCPF, $inscricaoMunicipal, $lote, $rpss)
 {
     $method = 'EnviarLoteRpsEnvio';
     $xsd = 'servico_enviar_lote_rps_envio';
     $qtdRps = count($rpss);
     $content = "<EnviarLoteRpsEnvio " . "xmlns=\"http://www.issnetonline.com.br/webserviceabrasf/vsd/{$xsd}.xsd\" " . "xmlns:tc=\"http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_complexos.xsd\">";
     $content .= "<LoteRps>";
     $content .= "<tc:NumeroLote>{$lote}</tc:NumeroLote>";
     $content .= "<tc:CpfCnpj>";
     if ($remetenteTipoDoc == '2') {
         $content .= "<tc:Cnpj>{$remetenteCNPJCPF}</tc:Cnpj>";
     } else {
         $content .= "<tc:Cpf>{$remetenteCNPJCPF}</tc:Cpf>";
     }
     $content .= "</tc:CpfCnpj>";
     $content .= "<tc:InscricaoMunicipal>{$inscricaoMunicipal}</tc:InscricaoMunicipal>";
     $content .= "<tc:QuantidadeRps>{$qtdRps}</tc:QuantidadeRps>";
     $content .= "<tc:ListaRps>";
     foreach ($rpss as $rps) {
         $content .= RenderRPS::toXml($rps, $this->timezone, $this->algorithm);
     }
     $content .= "</tc:ListaRps>";
     $content .= "</LoteRps>";
     $content .= "</EnviarLoteRpsEnvio>";
     $body = Signer::sign($this->certificate, $content, 'LoteRps', '', $this->algorithm, [false, false, null, null]);
     $body = $this->clear($body);
     $this->validar($versao, $body, 'Issnet', $xsd, '');
     return $body;
 }
Exemplo n.º 2
0
 public function render($versao, $remetenteTipoDoc, $remetenteCNPJCPF, $remetenteIM, $codigoMunicipio, $numero, $codigoCancelamento)
 {
     $method = "CancelarNfseEnvio";
     $xsd = 'servico_cancelar_nfse_envio';
     $content = "<p1:" . $method . " " . "xmlns:p1=\"http://www.issnetonline.com.br/webserviceabrasf/vsd/{$xsd}.xsd\" " . "xmlns:tc=\"http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_complexos.xsd\" " . "xmlns:ts=\"http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_simples.xsd\"" . ">";
     $content .= "<Pedido>";
     $content .= "<tc:InfPedidoCancelamento>";
     $content .= "<tc:IdentificacaoNfse>";
     $content .= "<tc:Numero>{$numero}</tc:Numero>";
     $content .= "<tc:Cnpj>{$remetenteCNPJCPF}</tc:Cnpj>";
     $content .= "<tc:InscricaoMunicipal>{$remetenteIM}</tc:InscricaoMunicipal>";
     $content .= "<tc:CodigoMunicipio>{$codigoMunicipio}</tc:CodigoMunicipio>";
     $content .= "</tc:IdentificacaoNfse>";
     $content .= "<tc:CodigoCancelamento>{$codigoCancelamento}</tc:CodigoCancelamento>";
     $content .= "</tc:InfPedidoCancelamento>";
     $content .= "</Pedido>";
     $content .= "</p1:CancelarNfseEnvio>";
     $body = Signer::sign($this->certificate, $content, 'InfPedidoCancelamento', 'http://www.w3.org/TR/2000/REC-xhtml1-20000126/', $this->algorithm, [false, false, null, null], 'Pedido');
     $body = $this->clear($body);
     $this->validar($versao, $body, 'Issnet', $xsd, '');
     return $body;
 }