sergeynezbritskiy / privatbank-api
Library for connecting to PrivatBank API
Installs: 2 300
Dependents: 0
Suggesters: 0
Security: 0
Stars: 12
Watchers: 3
Forks: 11
Open Issues: 4
Requires
- php: ~7.1.0|~7.2.0|~7.3.0
- ext-dom: *
- ext-libxml: *
- guzzlehttp/guzzle: ~6.0
- sergeynezbritskiy/xml-io: ^5.0.0
Requires (Dev)
- phpmd/phpmd: @stable
- phpunit/phpunit: @stable
- squizlabs/php_codesniffer: @stable
This package is auto-updated.
Last update: 2024-10-30 02:04:56 UTC
README
Library for connecting your PHP application with PrivatBank API
Installation
The easiest way to install module is using Composer
composer require sergeynezbritskiy/privatbank-api:"^3.0"
Notes
For more details please visit [https://api.privatbank.ua/]
Simple usage
Using library is as easy as possible
//create public client for connecting with API $client = new \SergeyNezbritskiy\PrivatBank\PublicClient(); //run the request $result = $client->infrastructure(\SergeyNezbritskiy\PrivatBank\Request\InfrastructureRequest::TYPE_ATM, 'Днепр'); //create authorized client for connecting with API $client = new \SergeyNezbritskiy\PrivatBank\AuthorizedClient(); //create merchant $merchant = new \SergeyNezbritskiy\PrivatBank\Merchant('<your_merchant_id>', '<your_merchant_secret>'); $client->setMerchant($merchant); //run the request $result = $client->balance('4111111111111111');