PHP code example of infolusa / php-facturalusa

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

    

infolusa / php-facturalusa example snippets


$facturalusa = new \Facturalusa\FacturalusaClient('api_token');
$customer = new \Facturalusa\Customer\Customer($facturalusa);
$customer->create([...]);

print_r($facturalusa->response());

// Outro endpoint chamado
$customer->create(['param1' => 'value1']);
print_r($facturalusa->response());

// Outra forma de chamar
(new \Facturalusa\Customer\Customer($facturalusa))->create(['param1' => 'value1']);

// Também pode ser atribuída a resposta à variável
$response = $customer->create();
shell
$ composer 
$array