Skip to content

Latest commit

 

History

History
76 lines (43 loc) · 3.54 KB

HOWTO.md

File metadata and controls

76 lines (43 loc) · 3.54 KB

Setup

Compile the project (minimum java 1.88)

  mvn install
  mvn exec:java  -Dexec.mainClass=org.kopi.ebics.client.EbicsClient -Dexec.args="--help"

Usage

Once you configured ebics.txt you can create the user and send the INI and HIA request.

  mvn exec:java  -Dexec.mainClass=org.kopi.ebics.client.EbicsClient -Dexec.args="--create"

  mvn exec:java  -Dexec.mainClass=org.kopi.ebics.client.EbicsClient -Dexec.args="--ini --hia"

Then you need to print the generated initialization letters, they are generated in text format, you can convert them to PDF if you prefer: The letter are in ./client/users/<userId>/letters/

recode utf-8..latin1 < A005Letter.txt | enscript  --output=-  | ps2pdf - > A005Letter.pdf
recode utf-8..latin1 < E002Letter.txt | enscript  --output=-  | ps2pdf - > E002Letter.pdf
recode utf-8..latin1 < X002Letter.txt | enscript  --output=-  | ps2pdf - > X002Letter.pdf

Print them and send them to your bank. They will then compare the letters with the INI and HIA request you sent and activate your account.

After this you can send the HPB request to fetch the bank parameters.

mvn exec:java  -Dexec.mainClass=org.kopi.ebics.client.EbicsClient -Dexec.args="--hpb"

Then you need to compare the if the bank encryption keys from the HPB request match with the keys you see in your documents.

Now the client is ready to use, you can fetch the account data with a STA request

mvn exec:java  -Dexec.mainClass=org.kopi.ebics.client.EbicsClient -Dexec.args="--sta -o sta.txt"

Usage with docker image

Instead of compiling and maven you may use the docker image directly:

    docker run e36io/ebics-cli --help

The Ebics client needs a working persisent directory with ebics.txt which also contains the output files - mount an external directory into the docker image:

    docker run -v $HOME/ebics:/root/ebics e36io/ebics-cli --help

Work locally with docker image

Some usefully commands:

docker build . -t client
docker run  -v $HOME/ebics:/root/ebics client --help
docker run  -v $HOME/ebics:/root/ebics client --sta -o sta.txt
docker run  -v $HOME/ebics:/root/ebics -v $HOME/ghworkspace/ebics-java-service/out:/root/out   client  --xe2  -i /root/out/pain001-1622059635.xml -o /root/out
# inside the container
docker  run -it --entrypoint sh client 
java -cp "ebics-cli-*.jar:lib/*" org.kopi.ebics.client.EbicsClient --help
java -cp "ebics-cli-*.jar:lib/*" org.kopi.ebics.client.EbicsClient --sta -o sta.txt

SOCKS

If your bank allows requests only from a specific IP address (eg your server machine), it is convenient to use a SOCKS proxy so that you can send requests from your local machine during initialization / testing.

ssh -D localhost:55555  user@yourserver

mvn exec:java  -DsocksProxyHost=localhost -DsocksProxyPort=55555   ....