PHP code example of phpcfdi / sat-catalogos
1. Go to this page and download the library: Download phpcfdi/sat-catalogos 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/ */
phpcfdi / sat-catalogos example snippets
declare(strict_types=1);
use PhpCfdi\SatCatalogos\Factory;
$dsn = sprintf('sqlite://%s/catalogos.db', __DIR__);
$factory = new Factory();
$satCatalogos = $factory->catalogosFromDsn($dsn);
$aduanas = $satCatalogos->aduanas();
$aduana = $aduanas->obtain('24');
echo $aduana->texto(); // NUEVO LAREDO, NUEVO LAREDO, TAMAULIPAS.