cyanofresh/privatbank-api

此包已被放弃,不再维护。未建议替代包。

PrivatBank API 的 PHP 封装器

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

不官方的 PrivatBank API 的 PHP 封装器。[链接](https://api.privatbank.ua)

目前只能获取卡片 余额账单

yehor-manzhula/privatbank-api 启发。

欢迎贡献 ;)

安装

composer require cyanofresh/privatbank-api

用法

<?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());

一些示例可以在 demo/index.php 中找到。但请记住,这只是一个示例。