ryadnov / zenmoney-php-api-library
v1.0.0
2017-06-25 17:08 UTC
Requires
- guzzlehttp/guzzle: ~6.3
- symfony/options-resolver: ~3.3
This package is not auto-updated.
Last update: 2024-04-28 01:11:12 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 ]);