Coder Social home page Coder Social logo

raiff-cli's Introduction

Command line interface for Raiffeisen online

This project allows to do basic actions on the Bulgarian Raiffeissen Online banking software through the command line. I wrote this because I have RSI and cannot use a mouse, and it is very difficult for me to use the website. It will also be useful for people that have a visual disability, or of you simply prefer to use the command line.

For the moment there is only support for creating basic transactions in leva.

Raiffeisen does not offer an API, so this works by emulating an able mouse user clicking through the website.

Requirements

This requires PHP 7.1 or higher, and either Selenium 2 or PhantomJS.

Running Selenium 2:

$ java -jar selenium-server-standalone.jar 2>&1 >> /dev/null &

Running PhantomJS:

$ phantomjs --ssl-protocol=any --ignore-ssl-errors=true ./vendor/jcalderonzumba/gastonjs/src/Client/main.js 8510 1024 768 2>&1 >> /dev/null &

Installation

First install the dependencies:

$ composer install

Then create a configuration file config/config.yml and in here store your user name and password, and the browser driver you want to use (either "selenium2" or "phantomjs"):

credentials:
  username: 'my username'
  password: 'my password'

mink:
  default_session: 'selenium2'

Usage

First you should set up your account names for your individual and corporate accounts with the 'account:add' command. Use the "short name" for the account, this looks similar to '1234567890 BGN'.

$ ./raiffcli account:add

Add some recipients. Recipients consist of a name, IBAN and a unique alias.

$ ./raiffcli recipient:add

Then you can create a transaction with the 'transfer:in-leva' command. It will ask you for the details.

$ ./raiffcli transfer:in-leva

Finally you can sign the transactions using the Digipass device.

$ ./raiffcli transfer:sign

raiff-cli's People

Contributors

pfrenssen avatar

Watchers

James Cloos avatar  avatar

raiff-cli's Issues

Populate the accounts automatically

Currently the individual and corporate accounts need to be added manually, but these can be retrieved automatically from the Raiffeisen website.

Check if web driver is available

If Selenium or PhantomJS is not running an error is thrown when the web communication starts, which can be at the end of a lengthy procedure of entering transactions. It would be better to check this at the start and fail immediately, to prevent users from losing entered data.

Crash when signing foreign transaction

Encountered the following exception right after displaying the challenge, possibly I accidentally entered an empty value in the prompt when switching windows:

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to RaiffCli\Command\CommandBase::numericValidator() must be of the type string, null given in /home/pieter/v/raiff-cli/src/Command/CommandBase.php:291
Stack trace:
#0 [internal function]: RaiffCli\Command\CommandBase::numericValidator(NULL)
#1 /home/pieter/v/raiff-cli/vendor/symfony/console/Helper/QuestionHelper.php(421): call_user_func(Array, NULL)
#2 /home/pieter/v/raiff-cli/vendor/symfony/console/Helper/QuestionHelper.php(68): Symfony\Component\Console\Helper\QuestionHelper->validateAttempts(Object(Closure), Object(Symfony\Component\Console\Output\StreamOutput), Object(Symfony\Component\Console\Question\Question))
#3 /home/pieter/v/raiff-cli/src/Command/Transfer/Sign.php(102): Symfony\Component\Console\Helper\QuestionHelper->ask(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\StreamOutput), Object(Symfony\Component\Console\Question\Question))
#4 /home/pieter/v/raiff-cli/vendor/symfony/console/Command/Command.php(262): RaiffCli in /home/pieter/v/raiff-cli/src/Command/CommandBase.php on line 291

Show a helpful error message when authentication fails

Currently when authentication fails (e.g. because the username or password are incorrect) the following error is displayed:

[Zumba\GastonJS\Exception\BrowserError]
There was an error inside the PhantomJS portion of GastonJS.
This is probably a bug, so please report it:
click
html body div.ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-draggable.ui-resizable div#lbSecutiryWarnings.text.filter.ui-dialog-content.ui-widget-content

It would be better to show a helpful error message.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.