PHP code example of bgtecnologia / wm-nfse

1. Go to this page and download the library: Download bgtecnologia/wm-nfse library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bgtecnologia / wm-nfse example snippets


composer 



\Webmaniabr\Nfse\Api\Connection::getInstance()->setBearerToken(SEU_BEARER_TOKEN); // A classe Connection aplica o padrão Singleton, e sempre deve ser chamada pelo menos uma vez antes da emissão para definir o valor do Bearer Token
$nfse = new \Webmaniabr\Nfse\Models\NFSe();
$nfse->Servico->valorServico = 200;
$nfse->Servico->discriminacao = "Descrição do serviço prestado";
$nfse->Tomador->nomeCompleto = "Fulano Ciclano Beltrano";
$nfse->Tomador->cpf = "00000000000";
//...
echo $nfse->emitir()->getMessage();