PHP code example of redgirasol / signature-manager

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

    

redgirasol / signature-manager example snippets


public function setUp()
{
    $this->cadena = 'XXXXXXX';
    $this->signature = null;
    $this->signer = null;
    $this->valida = null;
    $this->keypair = '/path/to/keypair.pkcs12';
    $this->cert = '/path/to/certificate.pem';
    $this->password = getenv('KEY_PASSWORD');
} 
 
sh
#ejemplo con php en versión 7.3 para otra versión colocar php{version}-curl
apt-get install php7.3-curl
apt-get install php7.3-mbstring
sh
export KEY_PASSWORD=your_password
sh
export PRIVATE_KEY_FILE=pri_key.pem
export CERTIFICATE_FILE=certificate.pem
export SUBJECT=/C=MX/ST=MX/L=MX/O=CDC/CN=CDC
export PKCS12_FILE=keypair.p12
export ALIAS=circulo_de_credito