Acontplus.FactElect
1.2.2
See the version list below for details.
dotnet add package Acontplus.FactElect --version 1.2.2
NuGet\Install-Package Acontplus.FactElect -Version 1.2.2
<PackageReference Include="Acontplus.FactElect" Version="1.2.2" />
<PackageVersion Include="Acontplus.FactElect" Version="1.2.2" />
<PackageReference Include="Acontplus.FactElect" />
paket add Acontplus.FactElect --version 1.2.2
#r "nuget: Acontplus.FactElect, 1.2.2"
#:package Acontplus.FactElect@1.2.2
#addin nuget:?package=Acontplus.FactElect&version=1.2.2
#tool nuget:?package=Acontplus.FactElect&version=1.2.2
Acontplus.FactElect
A comprehensive .NET 9+ library for electronic invoicing and digital document handling in Ecuador, providing models, services, and utilities to facilitate integration with SRI (Servicio de Rentas Internas) systems.
π Features
- Electronic document models (invoices, credit notes, etc.)
- XML document generation, validation, and parsing
- SRI (Ecuadorian Tax Authority) web service integration
- Document validation and verification
- CAPTCHA handling for human verification processes
- ID card (cΓ©dula) and RUC validation
- XML to HTML/PDF document conversion
- Token-based authentication management
- Dependency Injection support
π¦ Installation
NuGet Package Manager
Install-Package Acontplus.FactElect
.NET CLI
dotnet add package Acontplus.FactElect
PackageReference
<ItemGroup>
<PackageReference Include="Acontplus.FactElect" Version="1.0.17" />
</ItemGroup>
π― Quick Start
1. Configure Services
// In Startup.cs or Program.cs
services.AddFactElectServices(Configuration);
2. Configuration in appsettings.json
{
"FactElect": {
"Environment": "Development",
"ValidateBeforeSend": true,
"DefaultTimeoutSeconds": 30,
"DocumentStoragePath": "Documents",
"CompanyRuc": "0991234567001",
"CompanyLegalName": "ACME COMPANY S.A.",
"CompanyCommercialName": "ACME",
"EnableCaching": true,
"CacheDurationMinutes": 60,
"SriConnection": {
"BaseUrl": "https://celcer.sri.gob.ec/",
"TimeoutSeconds": 30,
"MaxRetryAttempts": 3,
"ValidateSslCertificate": true
}
}
}
3. Usage Examples
Validate Ecuadorian ID Card
public class IdentityValidator
{
private readonly ICedulaService _cedulaService;
public IdentityValidator(ICedulaService cedulaService) => _cedulaService = cedulaService;
public bool ValidateIdentity(string cedula) => _cedulaService.ValidateCedula(cedula);
}
Generate Electronic Invoice XML
public class InvoiceGenerator
{
private readonly IXmlService _xmlService;
public InvoiceGenerator(IXmlService xmlService) => _xmlService = xmlService;
public string GenerateInvoice(ComprobanteElectronico comprobante) => _xmlService.GenerateInvoiceXml(comprobante);
}
Send Document to SRI
public class DocumentSender
{
private readonly ISriWebService _sriService;
public DocumentSender(ISriWebService sriService) => _sriService = sriService;
public async Task<ResponseSri> SendDocumentAsync(string xmlContent, string username, string password)
{
var token = await _sriService.AuthenticateAsync(username, password);
return await _sriService.SendDocumentAsync(xmlContent, token);
}
}
Convert XML to HTML for Display
public class DocumentRenderer
{
private readonly IDocumentConverter _converter;
public DocumentRenderer(IDocumentConverter converter) => _converter = converter;
public string RenderDocument(string xmlContent) => _converter.ConvertToHtml(xmlContent);
}
π API Documentation
ICedulaService
,IRucService
- Ecuadorian ID and RUC validationIXmlService
- XML generation and parsingISriWebService
- SRI integration and authenticationIDocumentConverter
- XML to HTML/PDF conversionComprobanteElectronico
- Electronic document modelResponseSri
- SRI response model
π€ Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Development Setup
git clone https://github.com/Acontplus-S-A-S/acontplus-dotnet-libs.git
cd acontplus-dotnet-libs
dotnet restore
dotnet build
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Support
- π§ Email: proyectos@acontplus.com
- π Issues: GitHub Issues
- π Documentation: Wiki
π¨βπ» Author
Ivan Paz - @iferpaz7
π’ Company
Acontplus S.A.S. - Enterprise software solutions
Built with β€οΈ for the .NET community
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Acontplus.Barcode (>= 1.0.1)
- Acontplus.Core (>= 1.3.0)
- Acontplus.Utilities (>= 1.2.2)
- BCrypt.Net-Next (>= 4.0.3)
- Microsoft.Extensions.DependencyInjection (>= 9.0.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.7)
- SkiaSharp.NativeAssets.Linux (>= 3.116.1)
- System.Drawing.Common (>= 9.0.7)
- ZXing.Net (>= 0.16.10)
- ZXing.Net.Bindings.SkiaSharp (>= 0.16.21)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.2.3 | 44 | 7/18/2025 |
1.2.2 | 129 | 7/15/2025 |
1.2.1 | 124 | 7/15/2025 |
1.2.0 | 127 | 7/14/2025 |
1.1.0 | 128 | 7/14/2025 |
1.0.21 | 72 | 7/11/2025 |
1.0.20 | 76 | 7/11/2025 |
1.0.19 | 132 | 7/10/2025 |
1.0.18 | 126 | 7/10/2025 |
1.0.17 | 119 | 7/10/2025 |
1.0.16 | 122 | 7/9/2025 |
1.0.15 | 125 | 7/9/2025 |
1.0.14 | 122 | 7/9/2025 |
1.0.13 | 120 | 7/7/2025 |
1.0.12 | 119 | 7/6/2025 |
1.0.11 | 116 | 7/6/2025 |
1.0.10 | 117 | 7/6/2025 |
1.0.9 | 67 | 7/4/2025 |
1.0.8 | 124 | 7/3/2025 |
1.0.7 | 124 | 7/2/2025 |
1.0.6 | 130 | 7/2/2025 |
1.0.5 | 131 | 7/1/2025 |
Updated for .NET 9+ with async/await, SRI integration, and enhanced documentation.