Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

CyanoFresh/privatbank-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PrivatBank API client

Unofficial PHP wrapper for PrivatBank API.

For now can only fetch card balance and statements.

Inspired by yehor-manzhula/privatbank-api.

Feel free for contribute ;)

Installation

composer require cyanofresh/privatbank-api

Usage

<?php

require './vendor/autoload.php';

$merchant = new \CyanoFresh\PrivatBankAPI\Merchant('MERCHANT ID HERE', 'MERCHANT PASSWORD HERE');

// Get balance of the card
$merchant->getBalanceInfo('CARD NUMBER HERE');

// Get statements for card for last 1 week
$merchant->getStatements('CARD NUMBER HERE', (new DateTime())->modify('-1 week'), new DateTime());

Some demo can be found in the demo/index.php. But remember, it's only demo.