PHP code example of catuva / firmadigital

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

    

catuva / firmadigital example snippets


$objFirma = new Signature();
$flg_firma = 0; //posicion del nodo donde se firma en el XML
$ruta_archivo_xml = '../xml/b001-2.xml';
$ruta_firma = '../certificado/certificado.pfx';
$pass_firma = 'aaaaaaa'; //contraseña del certificado
$objFirma->signature_xml($flg_firma, $ruta_archivo_xml, $ruta_firma, $pass_firma);