PHP code example of pablosanches / ibpt

1. Go to this page and download the library: Download pablosanches/ibpt 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/ */

    

pablosanches / ibpt example snippets



    use PabloSanches\IBPT\IBPTClient;

    $config = array(
        'token' => '--your token here--'
    );

    self::$IBPT = IBPTClient::config($config);

    $response = static::$IBPT->Produto()->get(array(
        "cnpj" => "",
        "codigo" => "",
        "uf" => "",
        "descricao" => "",
        "unidadeMedida" => "",
        "valor" => 0
    ));

    $response = static::$IBPT->Servico()->get(array(
        "cnpj" => "",
        "codigo" => "",
        "uf" => "",
        "descricao" => "",
        "unidadeMedida" => "",
        "valor" => 0
    ));