PHP code example of blacktrue / cfdi-reader

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

    

blacktrue / cfdi-reader example snippets




use Blacktrue\Reader\Cfdi;

$cfdi = new Cfdi;
$cfdi->setXml(file_get_contents('F13132.xml'));

echo $cfdi->UUID;
echo $cfdi->subTotal;
echo $cfdi->total;
echo $cfdi->getTotalImpuestosTrasladados();