PHPackages                             dazza-dev/sri-sender - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. dazza-dev/sri-sender

ActiveLibrary[API Development](/categories/api)

dazza-dev/sri-sender
====================

Paquete para hacer recepción y autorización de XML firmados (Factura, Guía de remisión, Nota crédito, Nota débito y Comprobante de retención) a los servidores SRI (Ecuador).

v1.0.0(8mo ago)079↓86.7%11MITPHPPHP &gt;=8.0

Since Oct 17Pushed 8mo agoCompare

[ Source](https://github.com/dazza-dev/sri-sender)[ Packagist](https://packagist.org/packages/dazza-dev/sri-sender)[ RSS](/packages/dazza-dev-sri-sender/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (1)

SRI Sender 🇪🇨
=============

[](#sri-sender-)

Paquete para hacer recepción y autorización de XML firmados (Factura, Guía de remisión, Nota crédito, Nota débito y Comprobante de retención) a los servidores SRI (Ecuador).

Instalación
-----------

[](#instalación)

```
composer require dazza-dev/sri-sender
```

Uso
---

[](#uso)

```
use DazzaDev\SriSender\Sender;

// Instanciar el sender
$sender = new Sender(test: true); // Usar entorno de pruebas (test: true)

// XML como string
$xmlContent = file_get_contents(__DIR__ . '/factura.xml');

// Enviar XML a recepción
$validationResult = $sender->validate($xmlContent);

// Enviar XML a autorización
$accessKey = 'clave_acceso_del_documento';
$authorizationResult = $sender->authorize($accessKey);
```

### Recepción y Autorización en un solo paso

[](#recepción-y-autorización-en-un-solo-paso)

```
// Enviar XML a recepción y autorización en un solo paso
$result = $sender->send($accessKey, $xmlContent);

if ($result['success']) {
    echo "Validación y autorización exitosas!";
    echo "Status: " . $result['status'];
} else {
    echo "Validación y/o autorización fallidas: " . $result['error'];
}
```

### Uso con Configuración Personalizada

[](#uso-con-configuración-personalizada)

```
use DazzaDev\SriSender\Sender;
use DazzaDev\SriSender\Config\SriConfig;

// Configuración personalizada
$config = new SriConfig(
    soapOptions: [
        'connection_timeout' => 300,
        'default_socket_timeout' => 300,
        'user_agent' => 'My Custom Agent'
    ],
    retryConfig: [
        'maxAttempts' => 3,
        'delaySeconds' => 2
    ]
);

// Instanciar el sender con la configuración personalizada
$sender = new Sender(test: false, $config);

// Validar XML
try {
    $result = $sender->validate($xmlContent);

    if ($result['success']) {
        echo "Validación exitosa!";
        echo "Status: " . $result['status'];
    } else {
        echo "Validación fallida: " . $result['error'];
    }
} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}
```

Generar y Firmar XML
--------------------

[](#generar-y-firmar-xml)

Para generar y firmar XML, puedes utilizar los paquetes:

- [SRI XML Generator](https://github.com/dazza-dev/sri-xml-generator)
- [SRI Signer](https://github.com/dazza-dev/sri-signer)

Contribuciones
--------------

[](#contribuciones)

Contribuciones son bienvenidas. Si encuentras algún error o tienes ideas para mejoras, por favor abre un issue o envía un pull request. Asegúrate de seguir las guías de contribución.

Autor
-----

[](#autor)

SRI Sender fue creado por [DAZZA](https://github.com/dazza-dev).

Licencia
--------

[](#licencia)

Este proyecto está licenciado bajo la [Licencia MIT](https://opensource.org/licenses/MIT).

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance59

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

259d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/21293561?v=4)[Dazza](/maintainers/dazza-dev)[@dazza-dev](https://github.com/dazza-dev)

---

Top Contributors

[![dazza-dev](https://avatars.githubusercontent.com/u/21293561?v=4)](https://github.com/dazza-dev "dazza-dev (1 commits)")

---

Tags

sriecuadorfactura-electronicafirmar xml

### Embed Badge

![Health badge](/badges/dazza-dev-sri-sender/health.svg)

```
[![Health](https://phpackages.com/badges/dazza-dev-sri-sender/health.svg)](https://phpackages.com/packages/dazza-dev-sri-sender)
```

###  Alternatives

[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)[multinexo/php-afip-ws

Librería PHP para interactuar con el webservice de AFIP (Argentina -&gt; factura electrónica).

2210.2k](/packages/multinexo-php-afip-ws)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
