Afiphp allows you to operate with web services regarding AFIP, mainly related to electronic invoicing.
You can install the package via composer:
composer require afiphp/afiphp
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;
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.