zmbakh / nurkassa-php-sdk
This package is abandoned and no longer maintained.
No replacement package was suggested.
A PHP SDK for working with the API of Nurkassa. Created by the owner company.
1.3.2
2020-04-02 11:47 UTC
Requires
- php: >=7.1
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- guzzlehttp/guzzle: ~6.0
- phpunit/phpunit: 8.*
This package is auto-updated.
Last update: 2021-02-10 04:48:48 UTC
README
Installation
The Nurkassa PHP SDK can be installed with Composer. Run this command:
composer require zmbakh/nurkassa-php-sdk
Please be aware, that SDK only works with cURL or Guzzle 6.x out of the box.
Usage
Note: The SDK requires PHP 7.2 or greater.
Simple GET example of a list of the POSes.
require_once __DIR__ . '/vendor/autoload.php'; // change path as needed $nurkassa = new Nurkassa\Nurkassa(); $nurkassa->setAccessToken('h2rOjGoWhofLZHLO9K0xW3h8Pyfml7RG7ikLXSemHNhmaSgBrgDXNu5NMNs6'); //Example token. $pos = new \Nurkassa\Models\ProgrammingMode\PosModel(); $request = $pos->index(); $response = $nurkassa->handleRequest($request);
The $response variable in the expample above contains headers, body and status code of the response.
The Models return a NurkassaRequest instance and were made to make easier request building. See here to introduce with all the Models.