📜 ⬆️ ⬇️

Zen-mani and Yandex.Money - automatic accounting of finances

image We have been waiting for this for a long time and are now happy to tell you about the first integration of the financial accounting system and Yandex.Money.

Zen-mani is an online service that allows you to keep track of cash, cards, deposits, loans and mutual funds, draw up a financial plan, plan goals and receive recommendations for their achievement.

Under the cut screencast (as it works in Zen-mani) and our PHP library for integration with Yandex.Money.

The basis of any home accounting is accounting for the movement of money, and, unfortunately, this is the most difficult part of it. Daily manual fixation of income and expenses is not easy, and few survive it for more than two weeks. Therefore, it is vital for any home bookkeeping to have simple (and preferably automatic) accounting of finances.
')
Thanks to the open API, importing transactions from Yandex.Money is fully automated. After the wallet is connected to Zen-mani, the history of payments and replenishment will be imported, and in the future all Yandex.Money payments will be immediately taken into account in Zen-mani. This is the first and very important precedent that may further affect the opening of the API by banks and management companies.

How does the connection of the Ya. Denigi account to Zen-mani proceed? We recorded in the screencast:


We want to share not only the good news, but also our developments. For those who are just going to connect to the Yandex.Money API, it was a little easier. To do this, we post a set of php classes for oAuth authorization and import transaction history from Yandex.Money.

Example of use:
<?php class ZayacController { protected static $client_id = 'E60T8WY3PHSYG0S60T8SPTU-E57Y-76-57-WRUGHOTER7870E567-5UIPUYPOR6T80R77PO'; public function yandexAction() { $scope = 'operation-history account-info'; ZenYandexClient::setClientId(self::$client_id); ZenYandexClient::authorize($scope, 'http://' . $_SERVER['SERVER_NAME'] . '/zayac/callback/'); } public function callbackAction() { ZenYandexClient::setClientId(self::$client_id); $access_token = ZenYandexClient::convertAuthToken(); $zayac = new ZenYandexClient($access_token); $account = $zayac->getAccountInformation(); $operations = array(); while (false !== ($operation = $zayac->next())) { $operations[] = $operation; } var_dump($operations); } } ?> 


We are going to continue to support and develop this library, so who are interested, add the project page to your bookmarks.

Library page
Example of implementation (requires authorization in the service)
Archive with library
Documentation

Source: https://habr.com/ru/post/118161/


All Articles