Download the PHP package controlaltjeff/p7m-fattura-decoder without Composer

On this page you can find all versions of the php package controlaltjeff/p7m-fattura-decoder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package p7m-fattura-decoder

P7M Decoder — PHP Fattura Elettronica PKCS#7

CI Packagist Version Packagist Downloads PHP Version Require PHPStan Level

PHP library per decodificare file .p7m (PKCS#7 signed) ed estrarre il contenuto XML. Progettata per la Fattura Elettronica italiana ma funziona con qualsiasi file P7M.

Indice

Installazione

Requisiti

Nota per ambienti PHP 5.3/7.x: gli strumenti di sviluppo (PHPUnit, PHPStan) richiedono PHP 8.1+. Installa con --no-dev per evitare conflitti:

Utilizzo rapido

API

P7MDecoder::decodeFile(string $path): ?string

Decodifica un file .p7m e restituisce il suo contenuto XML, oppure null in caso di errore.

P7MDecoder::decodeString(string $content): ?string

Decodifica contenuto P7M da una stringa (DER, PEM, Base64, o XML valido).

P7MDecoder::getLastCorrections(): array

Restituisce la lista delle correzioni ai tag applicate durante l'ultimo'operazione di decodifica.

Come funziona

La libreria tenta la decodifica usando 8 strategie in ordine, fermandosi al primo successo:

# Strategia Descrizione
1 Plain XML Se il contenuto e' gia' XML valido, lo restituisce direttamente
2 OpenSSL DER openssl smime -verify -inform DER
3 Base64 → DER Decodifica Base64 + verifica DER
4 OpenSSL PEM openssl smime -verify -inform PEM (include conversione Base64 → PEM)
5 PHP openssl_pkcs7_verify() Fallback via estensione PHP
6 Estrazione manuale Ricerca fragment XML nel binario
7 Correzione tag Ricerca fuzzy (Levenshtein) su tag XML danneggiati
8 Base64 + estrazione manuale Decodifica Base64 + fragment XML

Correzioni automatiche

Oltre alla decodifica, la libreria applica correzioni automatiche su:

Le correzioni applicate sono accessibili via P7MDecoder::getLastCorrections().

Casi d'uso

Elaborare file FatturaPA ricevuti dal SDI

Elaborare piu' file

Gestire file danneggiati da OCR

Sviluppo

Per mutation testing (richiede pcov o xdebug):

Contribuire

I contributi sono ben accetti! Consulta CONTRIBUTING.md per le linee guida.

Licenza

Licenza MIT. Vedi LICENSE per i dettagli.


All versions of p7m-fattura-decoder with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
ext-dom Version *
ext-libxml Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package controlaltjeff/p7m-fattura-decoder contains the following files

Loading the files please wait ...