PHP code example of sergeynezbritskiy / privatbank-api
1. Go to this page and download the library: Download sergeynezbritskiy/privatbank-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sergeynezbritskiy / privatbank-api example snippets
//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');