ryadnov/zenmoney-php-api-library

Installs: 60

Dependents: 0

Suggesters: 0

Security: 0

Stars: 7

Watchers: 2

Forks: 3

Open Issues: 0

pkg:composer/ryadnov/zenmoney-php-api-library

v1.0.0 2017-06-25 17:08 UTC

This package is not auto-updated.

Last update: 2025-09-28 07:57:51 UTC


README

To receive a consumer_key and consumer_secret, register a new application at http://developers.zenmoney.ru/index.html

use Ryadnov\ZenMoney\Api\Auth\OAuth2;
use Ryadnov\ZenMoney\Api\V8\RequestDiff;

$auth       = new OAuth2([
    'consumer_key'    => 'XXXXXXXX',
    'consumer_secret' => 'XXXXXXXX',
    'username'        => 'XXXXXXXX',
    'password'        => 'XXXXXXXX',
]);
$token_info = $auth->getToken();

$request = new RequestDiff([
    'token' => $token_info['access_token'],
]);
$data    = $request->execute([
    'serverTimestamp' => 0, // first sync
]);