afiphp / afiphp
Webservices AFIP
Fund package maintenance!
1.1.1
2025-04-10 18:18 UTC
Requires
- php: >=7.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- pestphp/pest: ^1.18
- symfony/var-dumper: ^5.3
- vimeo/psalm: ^4.8
README
Afiphp allows you to operate with web services regarding AFIP, mainly related to electronic invoicing.
Installation
You can install the package via composer:
composer require afiphp/afiphp
Usage
use Afiphp\Webservices\WsFev1; use Afiphp\Entities\Customer; use Afiphp\Entities\Invoice; use Afiphp\Enums\InvoiceType; use Afiphp\Enums\IdentityDocumentType; $wsfe = new WsFev1('20111111112', __DIR__ . '/resources'); $invoice = Invoice::createProductInvoice( InvoiceType::FACTURA_A, 2, // sales point 150, // taxed amount 0, // untaxed amount 0, // exempt amount new Customer(IdentityDocumentType::CUIT, '20111111112') ) ->addTax( 5, // code 150, // taxable base 31.5 // amount ); $cae = $wsfe->createCaeFromInvoice($invoice); echo $cae->number;
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
License
The MIT License (MIT). Please see License File for more information.