PHP code example of pixan / cfdi

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

    

pixan / cfdi example snippets


Pixan\Cfdi\CfdiServiceProvider::class,

$config = [
    'certificate' => $certificateFileContents,
    'pem' => $pemFileContents
];
$cfdi = new Cfdi($config);
$seal = $cfdi->seal($xml);

$config = [
    'certificate' => $certificateFileContents,
    'pem' => $pemFileContents
];
$cfdi = new Cfdi($config);
$seal = $cfdi->stamp($xml);
bash
php artisan vendor:publish
bash
config/cfdi.php