cyanofresh/privatbank-api

This package is abandoned and no longer maintained. No replacement package was suggested.

PHP wrapper for PrivatBank API

v1.0.2 2018-08-16 02:03 UTC

This package is not auto-updated.

Last update: 2022-06-25 17:00:32 UTC


README

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.