PHP code example of solodkiy / alfabank-ru-client

1. Go to this page and download the library: Download solodkiy/alfabank-ru-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

solodkiy / alfabank-ru-client example snippets


$logger = new SimpleLogger();
$driver = createWebDriver($config['selenium_host'], $config['selenium_port']);
$client = new Solodkiy\AlfaBankRuClient\AlfaBankWebClient($driver, $config['bank_login'], $config['bank_pass']);
$client->setLogger($logger);

$accounts = $client->getAccountsList();
if (count($accounts)) {
    $account = $accounts[0];
    $logger->info($account->getName() . ': ' . $account->getNumber());
    $csv = $client->downloadAccountHistory($account->getNumber());
    $logger->info($csv);
}
bash
# Копируем конфиг
cp examples/_config.dist.php examples/_config.php

# Заполняем логин и пароль от альфа-клика
vim examples/_config.php

# Запускаем smart-selenium
docker run -p4444:4444 -d solodkiy/smart-selenium

# Запускаем пример
php examples/client.php