Download the PHP package amephia/sri-ec without Composer

On this page you can find all versions of the php package amephia/sri-ec. 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 sri-ec

🇪🇨 amephia/sri-ec

Última Versión en Packagist

Librería profesional y de alto rendimiento para Facturación Electrónica del SRI Ecuador. Simplifica el proceso de generación, firma y autorización de documentos electrónicos según los últimos requerimientos técnicos del SRI.

✨ Características Principales

🔐 Proveedores de Firma Soportados

Esta librería ha sido probada y ajustada para soportar certificados de:

📋 Tipos de Comprobantes Soportados

Tipo Código Método
Factura 01 facturaFromArray()
Nota de Crédito 04 notaCreditoFromArray()
Nota de Débito 05 notaDebitoFromArray()
Guía de Remisión 06 guiaRemisionFromArray()
Comprobante de Retención 07 retencionFromArray()

🔄 Flujo de Trabajo

🚀 Instalación

🛠 Requisitos

📖 Uso

Configuración Básica

Procesar una Factura

Procesar Nota de Crédito

Procesar Comprobante de Retención

Consultar Estado de Autorización

Solo Firmar XML (Sin Enviar)

🏗 Uso Avanzado

Para implementaciones personalizadas, puedes usar ComprobanteInterface:

📂 Estructura del Proyecto

🔐 Estructura de Firma XAdES-BES

La firma digital cumple con el estándar XAdES-BES requerido por el SRI:

🔧 Troubleshooting

Error: "Could not read p12 file" o "error:0308010C:digital envelope routines::unsupported"

Causa: Certificados P12 legacy (pre-2024) usan algoritmos de cifrado RC2/3DES que OpenSSL 3.0+ rechaza por defecto.

Solución: Esta librería automáticamente usa OpenSSL 1.1 cuando está disponible. En macOS con Homebrew:

La librería detectará automáticamente la instalación y la usará para certificados legacy.

Error: "FECHA EMISIÓN EXTEMPORÁNEA"

Causa: El SRI rechaza facturas con fechas que no coinciden con la fecha/hora actual del servidor SRI.

Solución:

  1. Generar y enviar la factura inmediatamente (no guardar para enviar después)
  2. Usar la zona horaria de Ecuador: America/Guayaquil
  3. Formato de fecha correcto: dd/MM/yyyy (ej: 01/02/2026)

Error: "Class 'Teran\Sri\Exceptions\SignatureException' not found"

Causa: Problema de autoloading (solo en versiones antiguas del paquete).

Solución: Actualizar a la última versión:

Error: "No matching global element declaration available"

Causa: XSD con validación strict para firma digital (solo en versiones antiguas).

Solución: Actualizar a la última versión que incluye XSD con processContents="lax".

Certificados Soportados

Funcionan correctamente:

🤝 Contribuir

¡Las contribuciones son bienvenidas! No dudes en enviar un Pull Request.

📄 Licencia

Licencia MIT. Por favor consulta el Archivo de Licencia para más información.


Desarrollado con ❤️ por Jonathan Terán


All versions of sri-ec with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-bcmath Version *
ext-curl Version *
ext-dom Version *
ext-libxml Version *
ext-openssl Version *
ext-soap Version *
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/log Version ^3.0
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 amephia/sri-ec contains the following files

Loading the files please wait ...