mrstroz / yii2-infakt
Infakt component for Yii 2 framework
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.6.0
- yiisoft/yii2: ~2.0.6
Requires (Dev)
- php: >=5.4.0
- yiisoft/yii2: ~2.0.6
This package is auto-updated.
Last update: 2025-02-26 02:39:22 UTC
README
Infakt component for Yii 2 framework
Installation
The preferred way to install this extension is through composer.
Run
composer require "mrstroz/yii2-infakt" "*"
or add
"mrstroz/yii2-infakt": "*"
to the require section of your composer.json
file.
Usage
- Add component to your config file
'components' => [ // ... 'infakt' => [ 'class' => 'mrstroz\infakt\Infakt', 'apiKey' => 'xxxxxx', ], ]
- Add new client
/** @var Infakt $inFakt */ $inFakt = Yii::$app->infakt; $response = $inFakt->call('clients', 'POST', ['client' => [ 'company_name' => 'Infakt biuro rachunkowe', 'nip' => '888-888-88-88' ] ] );
- Get client by ID
/** @var Infakt $inFakt */ $inFakt = Yii::$app->infakt; $response = $inFakt->call('clients/xxxxxx', 'GET');
- Add new invoice
/** @var Infakt $inFakt */ $inFakt = Yii::$app->infakt; $response = $inFakt->call('invoices', 'POST', ['invoice' => [ 'payment_method' => 'payu', 'client_id' => 6567050, 'services' => [ [ 'name' => 'Przykładowa Usługa', 'gross_price' => 6623, 'tax_symbol' => 23 ] ] ] ] );
Check inFakt API Documentation for all available options.