PHP Common utilities for Mexican CFDI 3.2, 3.3 & 4.0.
This library provides helper objects to work with Mexican CFDI (Comprobante Fiscal Digital por Internet).
🇲🇽 Visita la documentación en español de esta librería en Read the docs. También te esperamos en el canal #phpcfdi de discord.
The documentation related to this library and its API is on Read the docs. It is written in spanish language since is the language of the intented audience.
Nota: Este proyecto será migrado a phpcfdi/cfdiutils
, aún no tenemos fecha planeada
No olvides visitar https://www.phpcfdi.com donde contamos con muchas más librerías relacionadas con
CFDI y herramientas del SAT. Y próximamente el lugar donde publicaremos la versión 3.y.z
.
- Create CFDI version 3.3 & 4.0 based on a friendly extendable non-xml objects (
nodes
). - Read CFDI version 3.2, 3.3 & 4.0.
- Validate CFDI version 3.3 & 4.0 against schemas, cfdi signature (
Sello
) and custom rules. - Validate that the Timbre Fiscal Digital signature match with the CFDI 3.3 & CFDI 4.0, if not then the document has been modified after signature.
- Validates the "Complemento de recepción de pagos".
- Helper objects to deal with:
Cadena de origen
generation.- Extract information from CER files or
Certificado
attribute. - Calculate
Comprobante
sums based on the list ofConceptos
. - Retrieve the CFDI version information.
- Keep a local copy of the tree of XSD and XSLT file dependences from SAT.
- Keep a local copy of certificates to avoid downloads them each time.
- Check the SAT WebService to get the status of a CFDI (Estado, EsCancelable y EstatusCancelacion) without WSDL.
Use composer, so please run
composer require eclipxe/cfdiutils
- Version 1.x deprecated was deprecated time ago, that version didn't do much anyway.
- Version 2.x current has a lot of features and helper objects.
- Version 3.x future will be released with backward compatibility breaks.
- See docs/CHANGELOG.md for backward compatibility breaks.
- It may change to PHP 8.0.
- It could be possible to migrate to phpcfdi/cfdi-utils under phpCfdi organization.
This library is compatible with PHP 7.3 and above. Please, try to use the language's full potential.
The intended support is to be aligned with oldest Active support PHP Branch. See https://www.php.net/supported-versions.php for more details.
CfdiUtils | PHP Supported versions | Since |
---|---|---|
1.0 | 7.0, 7.1 | 2017-09-27 |
2.0 | 7.0, 7.1 | 2018-01-01 |
2.0.1 | 7.0, 7.1, 7.2 | 2018-01-03 |
2.8.1 | 7.0, 7.1, 7.2, 7.3 | 2019-03-05 |
2.12.7 | 7.0, 7.1, 7.2, 7.3, 7.4 | 2019-12-04 |
2.15.0 | 7.3, 7.4, 8.0 | 2021-03-17 |
Contributions are welcome! Please read CONTRIBUTING for details and don't forget to take a look in the TODO and CHANGELOG files.
The eclipxe/CfdiUtils
library is copyright © Carlos C Soto
and licensed for use under the MIT License (MIT). Please see LICENSE for more information.