PHP code example of arquivei / lite-api-php

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

    

arquivei / lite-api-php example snippets



$httpClient = new \Arquivei\LiteApi\Sdk\Dependencies\HttpGuzzleAdapter(new \GuzzleHttp\Client);

$nfeRequest = new Arquivei\LiteApi\Sdk\Requests\NFe();
$nfeRequest->setAccessKey("KEY");

$nfeEndpoint = new \Arquivei\LiteApi\Sdk\Endpoints\NFe();
$nfeEndpointResponse = $nfeEndpoint->execute($httpClient, $nfeRequest, new \Arquivei\LiteApi\Sdk\Config());


$liteApiFacade = new \Arquivei\LiteApi\Sdk\Facade();
$nfeEndpointResponse = $liteApiFacade->nfe("KEY");


$httpClient = new \Arquivei\LiteApi\Sdk\Dependencies\HttpGuzzleAdapter(new \GuzzleHttp\Client);

$statusRequest = new Arquivei\LiteApi\Sdk\Requests\Status();
$statusRequest->setAccessKey("KEY");

$statusEndpoint = new \Arquivei\LiteApi\Sdk\Endpoints\Status();
$statusEndpointResponse = $statusEndpoint->execute($httpClient, $statusRequest, new \Arquivei\LiteApi\Sdk\Config());



$liteApiFacade = new \Arquivei\LiteApi\Sdk\Facade();
$statusEndpointResponse = $liteApiFacade->status("KEY");
bash
composer