2017 © Pedro Peláez
 

yii2-extension yii2-infakt

Infakt component for Yii 2 framework

image

mrstroz/yii2-infakt

Infakt component for Yii 2 framework

  • Monday, May 7, 2018
  • by mrstroz
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

yii2-infakt

Infakt component for Yii 2 framework, (*1)

inFakt API Documentation, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Run, (*4)

composer require "mrstroz/yii2-infakt" "*"

or add, (*5)

"mrstroz/yii2-infakt": "*"

to the require section of your composer.json file., (*6)

Usage

  1. Add component to your config file
'components' => [
    // ...
    'infakt' => [
        'class' => 'mrstroz\infakt\Infakt',
        'apiKey' => 'xxxxxx',
    ],
]
  1. 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'
        ]
    ]
);
  1. Get client by ID
/** @var Infakt $inFakt */
$inFakt = Yii::$app->infakt;
$response = $inFakt->call('clients/xxxxxx', 'GET');
  1. 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., (*7)

The Versions

07/05 2018

dev-master

9999999-dev

Infakt component for Yii 2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires

07/05 2018

0.0.1

0.0.1.0

Infakt component for Yii 2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires