CyanoFresh / privatbank-api

PHP layer for PrivatBank API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

PHP layer for PrivatBank API

License:MIT License


Languages

Language:PHP 100.0%