mirror of
https://github.com/node-ebics/node-ebics-client.git
synced 2025-08-14 11:45:35 +00:00
Compare commits
64 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d0c6d76431 | ||
|
936e103c3f | ||
|
9ee2be97c4 | ||
|
f9fb6d3dc9 | ||
|
2d580c0d44 | ||
|
5c8139e1bc | ||
|
cecaa782c9 | ||
|
3eb997e3df | ||
|
2b35ed072a | ||
|
9ef50081ca | ||
|
d192e61d29 | ||
|
0e56947b07 | ||
|
e6420244dc | ||
|
c8220f6d45 | ||
|
f6dfc73ff2 | ||
|
6921f8d503 | ||
|
043caedc94 | ||
|
13f6d03cb2 | ||
|
546d371193 | ||
|
374560b14a | ||
|
500737dbc7 | ||
|
57a15f0722 | ||
|
bff972f354 | ||
|
de92265c95 | ||
|
61581d1af7 | ||
|
8af3cb50c5 | ||
|
a628e00b9b | ||
|
b8ec1e228e | ||
|
f027bc4048 | ||
|
a998538316 | ||
|
b44ff0f44c | ||
|
2ba095fbdd | ||
|
c28a6f7f09 | ||
|
0585ecd396 | ||
|
21a46832fc | ||
|
d5a24f9537 | ||
|
a9bbdd95c6 | ||
|
acd5a1897c | ||
|
bd11a410f1 | ||
|
4e5d8c2ea5 | ||
|
f913f95b64 | ||
|
f232b81fc3 | ||
|
3a18b213d5 | ||
|
7053a03286 | ||
|
be76a52ae5 | ||
|
99f0bd9622 | ||
|
e57316c6cb | ||
|
4b0bf0eba6 | ||
|
e060863356 | ||
|
fb464078dc | ||
|
3d4c94dff8 | ||
|
e98a1f8cc3 | ||
|
c5e59414f3 | ||
|
5e73d3ce5e | ||
|
c7e739f767 | ||
|
478571e447 | ||
|
f6dfdf4c40 | ||
|
fcbf4ca165 | ||
|
6187902ae5 | ||
|
65658ab131 | ||
|
d38460011c | ||
|
b9058fac93 | ||
|
c3d3decd6a | ||
|
a5b65f815e |
160
CHANGELOG.md
160
CHANGELOG.md
@@ -1,108 +1,164 @@
|
||||
### Changelog
|
||||
|
||||
#### [v0.1.3](https://github.com/eCollect/node-ebics-client/compare/v0.1.2...v0.1.3)
|
||||
#### [v0.2.0](https://github.com/node-ebics/node-ebics-client/compare/v0.1.7...v0.2.0)
|
||||
|
||||
> 30 March 2021
|
||||
|
||||
- chore(deps): bump y18n from 4.0.0 to 4.0.1 [`#56`](https://github.com/node-ebics/node-ebics-client/pull/56)
|
||||
- Add additional bank configuration items [`#53`](https://github.com/node-ebics/node-ebics-client/pull/53)
|
||||
- chore(deps): bump xmldom from 0.3.0 to 0.5.0 [`#46`](https://github.com/node-ebics/node-ebics-client/pull/46)
|
||||
- Cryto.js: Nasty workaround for incorrect signature (257 vs 256) and h… [`#50`](https://github.com/node-ebics/node-ebics-client/pull/50)
|
||||
- Examples: Improve config implementation for multibank [`#51`](https://github.com/node-ebics/node-ebics-client/pull/51)
|
||||
- README.md: Add J.P. Morgan to tested banks [`#55`](https://github.com/node-ebics/node-ebics-client/pull/55)
|
||||
- Add support for Bank GPB AO (Gazprombank Russia) [`#49`](https://github.com/node-ebics/node-ebics-client/pull/49)
|
||||
- Add sample code for zipped CAMT statements [`#48`](https://github.com/node-ebics/node-ebics-client/pull/48)
|
||||
|
||||
- chore: cleanup & bump [`f9fb6d3`](https://github.com/node-ebics/node-ebics-client/commit/f9fb6d3dc94c27a0c983205ce0ef00e4a18f95ff)
|
||||
- merge [`2d580c0`](https://github.com/node-ebics/node-ebics-client/commit/2d580c0d443b0ec0d103a94b64c803bfa1dd6b0b)
|
||||
- chore: update deps [`e642024`](https://github.com/node-ebics/node-ebics-client/commit/e6420244dc5d218926ede3b0123897096fb6dfd9)
|
||||
|
||||
#### [v0.1.7](https://github.com/node-ebics/node-ebics-client/compare/v0.1.6...v0.1.7)
|
||||
|
||||
> 5 February 2021
|
||||
|
||||
- fix high severity vulnerabilities [`#44`](https://github.com/node-ebics/node-ebics-client/pull/44)
|
||||
- chore(deps): bump lodash from 4.17.15 to 4.17.19 [`#39`](https://github.com/node-ebics/node-ebics-client/pull/39)
|
||||
|
||||
- chore: fix dev dependencies voulnarbilities [`d5a24f9`](https://github.com/node-ebics/node-ebics-client/commit/d5a24f9537f676ded8d1996928ed7e76b7b9ba3f)
|
||||
- changelog [`a998538`](https://github.com/node-ebics/node-ebics-client/commit/a998538316c963896c0e7ca76002513f9ea4a01a)
|
||||
- chore: changelog [`a9bbdd9`](https://github.com/node-ebics/node-ebics-client/commit/a9bbdd95c6ce0fdb9cac5452af6fedb4f04b10cb)
|
||||
|
||||
#### [v0.1.6](https://github.com/node-ebics/node-ebics-client/compare/v0.1.4...v0.1.6)
|
||||
|
||||
> 9 May 2020
|
||||
|
||||
- chore(deps): bump acorn from 7.1.0 to 7.1.1 [`#34`](https://github.com/node-ebics/node-ebics-client/pull/34)
|
||||
- feat: Wait until the keys are generated [`#33`](https://github.com/node-ebics/node-ebics-client/pull/33)
|
||||
|
||||
- chore: update deps [`bd11a41`](https://github.com/node-ebics/node-ebics-client/commit/bd11a410f1d2444cdfdfba965df7be37cedcc14a)
|
||||
- chore: update deps [`7053a03`](https://github.com/node-ebics/node-ebics-client/commit/7053a03286c700106bb1988fce72338f51ca9a96)
|
||||
- changelog [`c5e5941`](https://github.com/node-ebics/node-ebics-client/commit/c5e59414f35a9634e12a6b74163f1b7fa6403de5)
|
||||
|
||||
#### [v0.1.4](https://github.com/node-ebics/node-ebics-client/compare/v0.1.3...v0.1.4)
|
||||
|
||||
> 18 December 2019
|
||||
|
||||
- examples: Externalize configuration values and allow for multiple env… [`#28`](https://github.com/node-ebics/node-ebics-client/pull/28)
|
||||
- Add XG1 order type and example [`#29`](https://github.com/node-ebics/node-ebics-client/pull/29)
|
||||
- README.md: Add Bank GPB International S.A. to supported bank list [`#27`](https://github.com/node-ebics/node-ebics-client/pull/27)
|
||||
|
||||
- feat: generalize examples [`f6dfdf4`](https://github.com/node-ebics/node-ebics-client/commit/f6dfdf4c40621d9d6d9bcd64b8698d614307ea61)
|
||||
- examples: Externalize configuration values and allow for multiple environments [`c3d3dec`](https://github.com/node-ebics/node-ebics-client/commit/c3d3decd6a17f733b41ea9f24ed5df8b0b7364f6)
|
||||
- lock [`c7e739f`](https://github.com/node-ebics/node-ebics-client/commit/c7e739f7670856cff5af8fc93a341baf98e01546)
|
||||
|
||||
#### [v0.1.3](https://github.com/node-ebics/node-ebics-client/compare/v0.1.2...v0.1.3)
|
||||
|
||||
> 26 November 2019
|
||||
|
||||
- * Add DKI, C52, C53 order types. [`#26`](https://github.com/eCollect/node-ebics-client/pull/26)
|
||||
- Bank Letter: Add English template & flexible generation [`95403cb`](https://github.com/eCollect/node-ebics-client/commit/95403cbe6f90c81a696bb589533d713a4ba04873)
|
||||
- * Add DKI, C52, C53 order types. [`#26`](https://github.com/node-ebics/node-ebics-client/pull/26)
|
||||
- feat: Add English template & flexible generation [`#24`](https://github.com/node-ebics/node-ebics-client/pull/24)
|
||||
- chore: Various fixes for spelling [`#23`](https://github.com/node-ebics/node-ebics-client/pull/23)
|
||||
|
||||
#### [v0.1.2](https://github.com/eCollect/node-ebics-client/compare/v0.1.1...v0.1.2)
|
||||
- test: add additional tests [`6d73ef7`](https://github.com/node-ebics/node-ebics-client/commit/6d73ef77d4454ff966b733f995b64d6dfd7c18b2)
|
||||
- test: add more tests [`67d74cf`](https://github.com/node-ebics/node-ebics-client/commit/67d74cfa0060d97c948bb747885eaba26294663b)
|
||||
- Bank Letter: Add English template & flexible generation [`95403cb`](https://github.com/node-ebics/node-ebics-client/commit/95403cbe6f90c81a696bb589533d713a4ba04873)
|
||||
|
||||
#### [v0.1.2](https://github.com/node-ebics/node-ebics-client/compare/v0.1.1...v0.1.2)
|
||||
|
||||
> 7 November 2019
|
||||
|
||||
- chore: add changelog configoration [`#22`](https://github.com/eCollect/node-ebics-client/pull/22)
|
||||
- Closes #17 and #13 [`#21`](https://github.com/eCollect/node-ebics-client/pull/21)
|
||||
- Drop moment dependency [`#20`](https://github.com/eCollect/node-ebics-client/pull/20)
|
||||
- chore: add changelog configoration [`#22`](https://github.com/node-ebics/node-ebics-client/pull/22)
|
||||
- Closes #17 and #13 [`#21`](https://github.com/node-ebics/node-ebics-client/pull/21)
|
||||
- Drop moment dependency [`#20`](https://github.com/node-ebics/node-ebics-client/pull/20)
|
||||
|
||||
- feat: add nyc and cleanup .gitignore [`3e95478`](https://github.com/eCollect/node-ebics-client/commit/3e95478b3be719c86f32c7df10c42e46b7518669)
|
||||
- feat: drop bn.js [`eea0a49`](https://github.com/eCollect/node-ebics-client/commit/eea0a49130e30c123b110120c69d7b7c19fd12ba)
|
||||
- add changelog configoration [`1f34dcb`](https://github.com/eCollect/node-ebics-client/commit/1f34dcbfb6e0febbb93d5356fa36ac57d697a990)
|
||||
- feat: add nyc and cleanup .gitignore [`3e95478`](https://github.com/node-ebics/node-ebics-client/commit/3e95478b3be719c86f32c7df10c42e46b7518669)
|
||||
- feat: drop bn.js [`eea0a49`](https://github.com/node-ebics/node-ebics-client/commit/eea0a49130e30c123b110120c69d7b7c19fd12ba)
|
||||
- add changelog configoration [`1f34dcb`](https://github.com/node-ebics/node-ebics-client/commit/1f34dcbfb6e0febbb93d5356fa36ac57d697a990)
|
||||
|
||||
#### [v0.1.1](https://github.com/eCollect/node-ebics-client/compare/v0.1.0...v0.1.1)
|
||||
#### [v0.1.1](https://github.com/node-ebics/node-ebics-client/compare/v0.1.0...v0.1.1)
|
||||
|
||||
> 5 November 2019
|
||||
|
||||
- chore: update license [`9aabe93`](https://github.com/eCollect/node-ebics-client/commit/9aabe933e91b506ea38820b952ce8e5e58b4c2ff)
|
||||
- chore: update license [`9aabe93`](https://github.com/node-ebics/node-ebics-client/commit/9aabe933e91b506ea38820b952ce8e5e58b4c2ff)
|
||||
|
||||
#### [v0.1.0](https://github.com/eCollect/node-ebics-client/compare/v0.0.8...v0.1.0)
|
||||
#### [v0.1.0](https://github.com/node-ebics/node-ebics-client/compare/v0.0.8...v0.1.0)
|
||||
|
||||
> 5 November 2019
|
||||
|
||||
- Feat: handle unsual exponent migrate to node-forge [`#16`](https://github.com/eCollect/node-ebics-client/pull/16)
|
||||
- Add order generation tests and fix linting [`#15`](https://github.com/eCollect/node-ebics-client/pull/15)
|
||||
- test script run mocha [`#14`](https://github.com/eCollect/node-ebics-client/pull/14)
|
||||
- Feat: handle unsual exponent migrate to node-forge [`#16`](https://github.com/node-ebics/node-ebics-client/pull/16)
|
||||
- Add order generation tests and fix linting [`#15`](https://github.com/node-ebics/node-ebics-client/pull/15)
|
||||
- test script run mocha [`#14`](https://github.com/node-ebics/node-ebics-client/pull/14)
|
||||
|
||||
- feat: prepare order generation tests [`e40f79c`](https://github.com/eCollect/node-ebics-client/commit/e40f79cee68a194272c93f07e763175b213a77a1)
|
||||
- chore: cleanup [`0c01420`](https://github.com/eCollect/node-ebics-client/commit/0c01420c1e14992a4169098ccd47cd196b899f06)
|
||||
- feat: prepare order generation tests [`e40f79c`](https://github.com/node-ebics/node-ebics-client/commit/e40f79cee68a194272c93f07e763175b213a77a1)
|
||||
- chore: cleanup [`0c01420`](https://github.com/node-ebics/node-ebics-client/commit/0c01420c1e14992a4169098ccd47cd196b899f06)
|
||||
|
||||
#### [v0.0.36](https://github.com/eCollect/node-ebics-client/compare/v0.0.35...v0.0.36)
|
||||
#### [v0.0.36](https://github.com/node-ebics/node-ebics-client/compare/v0.0.35...v0.0.36)
|
||||
|
||||
> 1 June 2018
|
||||
|
||||
- various modular fixes [`8492d94`](https://github.com/eCollect/node-ebics-client/commit/8492d940542f61b17aa3a2da7de23f6539ffaad5)
|
||||
- various modular fixes [`8492d94`](https://github.com/node-ebics/node-ebics-client/commit/8492d940542f61b17aa3a2da7de23f6539ffaad5)
|
||||
|
||||
#### [v0.0.35](https://github.com/eCollect/node-ebics-client/compare/v0.0.3...v0.0.35)
|
||||
#### [v0.0.35](https://github.com/node-ebics/node-ebics-client/compare/v0.0.3...v0.0.35)
|
||||
|
||||
> 31 May 2018
|
||||
|
||||
- update License to GPL v3 [`babcf76`](https://github.com/eCollect/node-ebics-client/commit/babcf76b61af6eb737ab291a301e71bb84621820)
|
||||
- Add MGF1.js file - mask generation utility class [`7e6e2ff`](https://github.com/eCollect/node-ebics-client/commit/7e6e2ff142688b0c453369fa7137b49e8b89cd81)
|
||||
- Add sign, _emsaPSS and _modPowe methods in Key.js file [`5ace213`](https://github.com/eCollect/node-ebics-client/commit/5ace2137231af9a3563ab31fa0f70fbdf4b148cb)
|
||||
- update License to GPL v3 [`babcf76`](https://github.com/node-ebics/node-ebics-client/commit/babcf76b61af6eb737ab291a301e71bb84621820)
|
||||
- Add MGF1.js file - mask generation utility class [`7e6e2ff`](https://github.com/node-ebics/node-ebics-client/commit/7e6e2ff142688b0c453369fa7137b49e8b89cd81)
|
||||
- Add sign, _emsaPSS and _modPowe methods in Key.js file [`5ace213`](https://github.com/node-ebics/node-ebics-client/commit/5ace2137231af9a3563ab31fa0f70fbdf4b148cb)
|
||||
|
||||
#### [v0.0.8](https://github.com/eCollect/node-ebics-client/compare/v0.0.7...v0.0.8)
|
||||
#### [v0.0.8](https://github.com/node-ebics/node-ebics-client/compare/v0.0.7...v0.0.8)
|
||||
|
||||
> 8 October 2019
|
||||
|
||||
- chore: readme maintenance [`#11`](https://github.com/eCollect/node-ebics-client/pull/11)
|
||||
- Provide examples [`#10`](https://github.com/eCollect/node-ebics-client/pull/10)
|
||||
- chore: readme maintenance [`#11`](https://github.com/node-ebics/node-ebics-client/pull/11)
|
||||
- Provide examples [`#10`](https://github.com/node-ebics/node-ebics-client/pull/10)
|
||||
|
||||
- initialize.js [`7dad7c8`](https://github.com/eCollect/node-ebics-client/commit/7dad7c878722be94e03808cef3af38d34019c623)
|
||||
- examples/bankLetter.js [`ce6e58b`](https://github.com/eCollect/node-ebics-client/commit/ce6e58b3f33017967e5b26fe15a2c435012b8af6)
|
||||
- examples/send-hbt-order.js [`166c61a`](https://github.com/eCollect/node-ebics-client/commit/166c61aec4a247d923de82278271ec02cbef815f)
|
||||
- initialize.js [`7dad7c8`](https://github.com/node-ebics/node-ebics-client/commit/7dad7c878722be94e03808cef3af38d34019c623)
|
||||
- examples/bankLetter.js [`ce6e58b`](https://github.com/node-ebics/node-ebics-client/commit/ce6e58b3f33017967e5b26fe15a2c435012b8af6)
|
||||
- examples/send-hbt-order.js [`166c61a`](https://github.com/node-ebics/node-ebics-client/commit/166c61aec4a247d923de82278271ec02cbef815f)
|
||||
|
||||
#### [v0.0.7](https://github.com/eCollect/node-ebics-client/compare/v0.0.6...v0.0.7)
|
||||
#### [v0.0.7](https://github.com/node-ebics/node-ebics-client/compare/v0.0.6...v0.0.7)
|
||||
|
||||
> 2 August 2019
|
||||
|
||||
- * Add Z53 order type [`#7`](https://github.com/eCollect/node-ebics-client/pull/7)
|
||||
- remove eCollect from constant and minor verbose error handeling [`#2`](https://github.com/eCollect/node-ebics-client/pull/2)
|
||||
- add iso pain format XCT order type [`#1`](https://github.com/eCollect/node-ebics-client/pull/1)
|
||||
- * Add Z53 order type [`#7`](https://github.com/node-ebics/node-ebics-client/pull/7)
|
||||
- remove eCollect from constant and minor verbose error handeling [`#2`](https://github.com/node-ebics/node-ebics-client/pull/2)
|
||||
- add iso pain format XCT order type [`#1`](https://github.com/node-ebics/node-ebics-client/pull/1)
|
||||
|
||||
- add new order type XZ53 and removed repeated dateRange to consts [`5ff3147`](https://github.com/eCollect/node-ebics-client/commit/5ff314712443c4c8465f46292b010cfedfed8c2e)
|
||||
- move dateRange from constants to utils [`aa761cf`](https://github.com/eCollect/node-ebics-client/commit/aa761cf7ad87a271d6e6d9eed40e04eb4376f6c5)
|
||||
- bump version [`79f17e1`](https://github.com/eCollect/node-ebics-client/commit/79f17e14045d121c9505eb3118967f5f88ae79e2)
|
||||
- add new order type XZ53 and removed repeated dateRange to consts [`5ff3147`](https://github.com/node-ebics/node-ebics-client/commit/5ff314712443c4c8465f46292b010cfedfed8c2e)
|
||||
- move dateRange from constants to utils [`aa761cf`](https://github.com/node-ebics/node-ebics-client/commit/aa761cf7ad87a271d6e6d9eed40e04eb4376f6c5)
|
||||
- bump version [`79f17e1`](https://github.com/node-ebics/node-ebics-client/commit/79f17e14045d121c9505eb3118967f5f88ae79e2)
|
||||
|
||||
#### [v0.0.6](https://github.com/eCollect/node-ebics-client/compare/v0.0.5...v0.0.6)
|
||||
#### [v0.0.6](https://github.com/node-ebics/node-ebics-client/compare/v0.0.5...v0.0.6)
|
||||
|
||||
> 24 July 2019
|
||||
|
||||
- remove eCollect from constant and minor verbose error handaling [`#4`](https://github.com/eCollect/node-ebics-client/pull/4)
|
||||
- add iso pain format XCT order type [`#5`](https://github.com/eCollect/node-ebics-client/pull/5)
|
||||
- remove eCollect from constant and minor verbose error handaling [`#4`](https://github.com/node-ebics/node-ebics-client/pull/4)
|
||||
- add iso pain format XCT order type [`#5`](https://github.com/node-ebics/node-ebics-client/pull/5)
|
||||
|
||||
- remove eCollect from constant and minor verbose error handeling [`cb2062a`](https://github.com/eCollect/node-ebics-client/commit/cb2062ae2fbd8e8881de26561efddad1f272e065)
|
||||
- bump [`c9f52d3`](https://github.com/eCollect/node-ebics-client/commit/c9f52d3bd99b9f8761652365b217d9580fa34632)
|
||||
- remove eCollect from constant and minor verbose error handeling [`cb2062a`](https://github.com/node-ebics/node-ebics-client/commit/cb2062ae2fbd8e8881de26561efddad1f272e065)
|
||||
- bump [`c9f52d3`](https://github.com/node-ebics/node-ebics-client/commit/c9f52d3bd99b9f8761652365b217d9580fa34632)
|
||||
|
||||
#### [v0.0.5](https://github.com/eCollect/node-ebics-client/compare/v0.0.4...v0.0.5)
|
||||
#### [v0.0.5](https://github.com/node-ebics/node-ebics-client/compare/v0.0.4...v0.0.5)
|
||||
|
||||
> 28 June 2019
|
||||
|
||||
- Fix parsing of the bank keys in the HPB response [`#3`](https://github.com/eCollect/node-ebics-client/pull/3)
|
||||
- Fix parsing of the bank keys in the HPB response [`#3`](https://github.com/node-ebics/node-ebics-client/pull/3)
|
||||
|
||||
- tc for bank keys parsing error [`c571ef1`](https://github.com/eCollect/node-ebics-client/commit/c571ef181bca2e0cbec70bc6df53c706acd6c829)
|
||||
- #2 corrected bank keys parsing [`5f0b6cd`](https://github.com/eCollect/node-ebics-client/commit/5f0b6cd3747c4613920d2f71f3c04ce13225d397)
|
||||
- tc for bank keys parsing error [`c571ef1`](https://github.com/node-ebics/node-ebics-client/commit/c571ef181bca2e0cbec70bc6df53c706acd6c829)
|
||||
- #2 corrected bank keys parsing [`5f0b6cd`](https://github.com/node-ebics/node-ebics-client/commit/5f0b6cd3747c4613920d2f71f3c04ce13225d397)
|
||||
|
||||
#### [v0.0.4](https://github.com/eCollect/node-ebics-client/compare/v0.0.36...v0.0.4)
|
||||
#### [v0.0.4](https://github.com/node-ebics/node-ebics-client/compare/v0.0.36...v0.0.4)
|
||||
|
||||
> 3 September 2018
|
||||
|
||||
- Major changes. Separating responsibilities. Orders builder, serializer. [`ff9a3a1`](https://github.com/eCollect/node-ebics-client/commit/ff9a3a16b47d0a25674134c875bfd651995837e4)
|
||||
- code optimization [`1876360`](https://github.com/eCollect/node-ebics-client/commit/187636019c290d757aca77d4c14fb4f2519acd38)
|
||||
- client and order optimization [`9454992`](https://github.com/eCollect/node-ebics-client/commit/945499290a8698aed504b573019de2c23148006a)
|
||||
- Major changes. Separating responsibilities. Orders builder, serializer. [`ff9a3a1`](https://github.com/node-ebics/node-ebics-client/commit/ff9a3a16b47d0a25674134c875bfd651995837e4)
|
||||
- code optimization [`1876360`](https://github.com/node-ebics/node-ebics-client/commit/187636019c290d757aca77d4c14fb4f2519acd38)
|
||||
- client and order optimization [`9454992`](https://github.com/node-ebics/node-ebics-client/commit/945499290a8698aed504b573019de2c23148006a)
|
||||
|
||||
#### v0.0.3
|
||||
|
||||
> 17 May 2018
|
||||
|
||||
- initial commit [`1f947ff`](https://github.com/eCollect/node-ebics-client/commit/1f947ff1480c522f89fa1f547581b55e2378d920)
|
||||
- Initial commit [`cd37de3`](https://github.com/eCollect/node-ebics-client/commit/cd37de3895e32a61798c79ce3a6447e2f269019d)
|
||||
- initial commit [`1f947ff`](https://github.com/node-ebics/node-ebics-client/commit/1f947ff1480c522f89fa1f547581b55e2378d920)
|
||||
- Initial commit [`cd37de3`](https://github.com/node-ebics/node-ebics-client/commit/cd37de3895e32a61798c79ce3a6447e2f269019d)
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<h1 align="center">node-ebics-client</h1>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/eCollect/node-ebics-client" title="Build Status"><img src="https://travis-ci.org/eCollect/node-ebics-client.svg?branch=master" alt="Build Status" /></a>
|
||||
<a href="https://travis-ci.org/node-ebics/node-ebics-client" title="Build Status"><img src="https://travis-ci.org/node-ebics/node-ebics-client.svg?branch=master" alt="Build Status" /></a>
|
||||
<a href="https://www.npmjs.com/package/ebics-client" title="Build Status">
|
||||
<img alt="ebics-client" src="https://img.shields.io/npm/v/ebics-client">
|
||||
</a>
|
||||
@@ -27,6 +27,9 @@ The client is currently tested and verified to work with the following banks:
|
||||
* [Zürcher Kantonalbank](https://www.zkb.ch/en/lg/ew.html)
|
||||
* [Raiffeisen Schweiz](https://www.raiffeisen.ch/rch/de.html)
|
||||
* [BW Bank](https://www.bw-bank.de/de/home.html)
|
||||
* [Bank GPB International S.A.](https://gazprombank.lu/e-banking)
|
||||
* [Bank GPB AO](https://gazprombank.ru/)
|
||||
* [J.P. Morgan](https://www.jpmorgan.com/)
|
||||
|
||||
|
||||
## Inspiration
|
||||
@@ -36,6 +39,6 @@ The basic concept of this library was inspired by the [EPICS](https://github.com
|
||||
|
||||
## Copyright
|
||||
|
||||
Copyright: eCollect AG, 2018-9.
|
||||
Copyright: Dimitar Nanov, 2019-2021.
|
||||
Licensed under the [GPLv3](LICENSE) license.
|
||||
|
||||
|
@@ -7,20 +7,13 @@ const path = require('path');
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
|
||||
const client = new ebics.Client({
|
||||
url: 'https://ebics.server',
|
||||
partnerId: '',
|
||||
userId: '',
|
||||
hostId: '',
|
||||
passphrase: 'test', // keys-test will be decrypted with this passphrase
|
||||
keyStorage: ebics.fsKeysStorage('./keys-test'),
|
||||
});
|
||||
const config = require('./loadConfig')();
|
||||
const client = require('./getClient')(config);
|
||||
const bankName = client.bankName;
|
||||
const template = fs.readFileSync("../templates/ini_"+client.languageCode+".hbs", { encoding: 'utf8'});
|
||||
const bankLetterFile = path.join("./", "bankLetter_"+client.bankShortName+"_"+client.languageCode+".html");
|
||||
|
||||
const bankName = 'Bank name'; // Change this to the bank name you're going to send the letter to.
|
||||
const languageCode = 'en'; // Currently 'de' and 'en' are valid values.
|
||||
const template = fs.readFileSync('../templates/ini_'+languageCode+'.hbs').toString();
|
||||
const letter = new ebics.BankLetter({ client, bankName, template });
|
||||
const bankLetterFile = path.join(os.homedir(), 'bankLetter_'+languageCode+'.html');
|
||||
|
||||
letter.serialize(bankLetterFile)
|
||||
.then(() => {
|
||||
|
12
examples/config/config.json
Normal file
12
examples/config/config.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"url": "https://ebics-test.server",
|
||||
"partnerId": "EBICS ParnerID Test",
|
||||
"userId": "MyUserIdTest",
|
||||
"hostId": "MyHostIdTest",
|
||||
"passphrase": "MyPasswordTest",
|
||||
"keyStoragePath": "./keys-test",
|
||||
"bankName":"Test Bank Full Name",
|
||||
"bankShortName":"TESTBANKSHORT",
|
||||
"languageCode":"en",
|
||||
"storageLocation":"\\\\myserver\\Share\\Folder\\BankName\\Test\\"
|
||||
}
|
12
examples/config/config.production.testbank.json
Normal file
12
examples/config/config.production.testbank.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"url": "https://ebics.server",
|
||||
"partnerId": "EBICS ParnerID Production",
|
||||
"userId": "MyUserIdProduction",
|
||||
"hostId": "MyHostIdProduction",
|
||||
"passphrase": "MyPasswordProduction",
|
||||
"keyStoragePath": "./keys-prod",
|
||||
"bankName":"Production Bank Full Name",
|
||||
"bankShortName":"PRODBANKSHORT",
|
||||
"languageCode":"en",
|
||||
"storageLocation":"\\\\myserver\\Share\\Folder\\BankName\\Production\\"
|
||||
}
|
12
examples/config/config.production.testbank.testentity.json
Normal file
12
examples/config/config.production.testbank.testentity.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"url": "https://ebics.server",
|
||||
"partnerId": "EBICS ParnerID Production",
|
||||
"userId": "MyUserIdProduction",
|
||||
"hostId": "MyHostIdProduction",
|
||||
"passphrase": "MyPasswordProduction",
|
||||
"keyStoragePath": "./keys-prod",
|
||||
"bankName":"Production Bank Full Name",
|
||||
"bankShortName":"PRODBANKSHORT",
|
||||
"languageCode":"en",
|
||||
"storageLocation":"\\\\myserver\\Share\\Folder\\BankName\\Production\\"
|
||||
}
|
21
examples/getClient.js
Normal file
21
examples/getClient.js
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
const { Client, fsKeysStorage } = require('../index');
|
||||
|
||||
const loadConfig = require('./loadConfig');
|
||||
|
||||
module.exports = ({
|
||||
url,
|
||||
partnerId,
|
||||
userId,
|
||||
hostId,
|
||||
passphrase,
|
||||
keyStoragePath,
|
||||
} = loadConfig()) => new Client({
|
||||
url,
|
||||
partnerId,
|
||||
userId,
|
||||
hostId,
|
||||
passphrase,
|
||||
keyStorage: fsKeysStorage(keyStoragePath),
|
||||
});
|
@@ -2,19 +2,14 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
const ebics = require('../index');
|
||||
|
||||
const client = new ebics.Client({
|
||||
url: 'https://ebics.server',
|
||||
partnerId: 'PARTNER',
|
||||
userId: 'USER',
|
||||
hostId: 'HOST',
|
||||
passphrase: 'test', // keys-test will be encrypted with this passphrase
|
||||
keyStorage: ebics.fsKeysStorage('./keys-test'),
|
||||
});
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// New keys will be generated and saved in ./keys-test
|
||||
client.send(ebics.Orders.INI)
|
||||
client.send(Orders.INI)
|
||||
.then((resp) => {
|
||||
console.log('Response for INI order %j', resp);
|
||||
return client.send(ebics.Orders.HIA);
|
||||
|
46
examples/loadConfig.js
Normal file
46
examples/loadConfig.js
Normal file
@@ -0,0 +1,46 @@
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const safeLoadJson = (file) => {
|
||||
if (!file)
|
||||
return {};
|
||||
|
||||
try {
|
||||
return JSON.parse(fs.readFileSync(file));
|
||||
} catch (e) {
|
||||
console.warn(`Couldn't load ${file} config file.`);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
const getDefaultEnv = () => {
|
||||
const [,,parArg] = process.argv;
|
||||
return parArg || process.env.NODE_ENV;
|
||||
}
|
||||
|
||||
const getBankIdentifier = () => {
|
||||
const [,,,parArg] = process.argv;
|
||||
return parArg || "testbank";
|
||||
}
|
||||
|
||||
const getEntityIdentifier = () => {
|
||||
const [,,,,parArg] = process.argv;
|
||||
return parArg || ""
|
||||
}
|
||||
|
||||
const loadConfig = (configDirectory = path.join(__dirname, './config'), env = getDefaultEnv(), bank = getBankIdentifier(), entity = getEntityIdentifier()) => {
|
||||
entity ? console.log(`Loading config from ${configDirectory} with env set to ${env}, bank set to ${bank} and entity set to ${entity}.`) : console.log(`Loading config from ${configDirectory} with env set to ${env} and bank set to ${bank}.`);
|
||||
|
||||
global.entity = entity;
|
||||
const baseConfigFile = path.join(configDirectory, 'config.json');
|
||||
const envConfigFile = env ? entity ? path.join(configDirectory, `config.${env}.${bank}.${entity}.json`) : path.join(configDirectory, `config.${env}.${bank}.json`) : null;
|
||||
|
||||
return {
|
||||
...safeLoadJson(baseConfigFile),
|
||||
...safeLoadJson(envConfigFile),
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = loadConfig;
|
@@ -2,20 +2,12 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const ebics = require('../index');
|
||||
|
||||
const client = new ebics.Client({
|
||||
url: 'https://ebics.server',
|
||||
partnerId: '',
|
||||
userId: '',
|
||||
hostId: '',
|
||||
passphrase: 'test', // keys-test will be decrypted with this passphrase
|
||||
keyStorage: ebics.fsKeysStorage('./keys-test'),
|
||||
});
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// Client keys must be already generated and send by letter.
|
||||
// The bank should have enabled the user
|
||||
client.send(ebics.Orders.HPB)
|
||||
client.send(Orders.HPB)
|
||||
.then((resp) => {
|
||||
console.log('Response for HPB order %j', resp);
|
||||
if (resp.technicalCode !== '000000')
|
||||
|
28
examples/send-c52-order-zipped.js
Normal file
28
examples/send-c52-order-zipped.js
Normal file
@@ -0,0 +1,28 @@
|
||||
#! /usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// The bank keys must have been already saved
|
||||
client.send(Orders.C52(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
.then((resp) => {
|
||||
console.log('Response for C52 order %j', resp);
|
||||
if (resp.technicalCode !== '000000')
|
||||
throw new Error('Something went wrong');
|
||||
|
||||
// Parsing and processing the CAMT052 file should happen somewhere here, ideally after saving it to disk
|
||||
const data = Buffer.from(resp.orderData);
|
||||
let distPath = "CAMT052.zip";
|
||||
const dstZip = fs.createWriteStream(distPath);
|
||||
dstZip.write(data);
|
||||
dstZip.end();
|
||||
})
|
||||
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
@@ -2,19 +2,11 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const ebics = require('../index');
|
||||
|
||||
const client = new ebics.Client({
|
||||
url: 'https://ebics.server',
|
||||
partnerId: '',
|
||||
userId: '',
|
||||
hostId: '',
|
||||
passphrase: 'test', // keys-test will be decrypted with this passphrase
|
||||
keyStorage: ebics.fsKeysStorage('./keys-test'),
|
||||
});
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// The bank keys must have been already saved
|
||||
client.send(ebics.Orders.C52(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
client.send(Orders.C52(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
.then((resp) => {
|
||||
console.log('Response for C52 order %j', resp);
|
||||
if (resp.technicalCode !== '000000')
|
||||
|
28
examples/send-c53-order-zipped.js
Normal file
28
examples/send-c53-order-zipped.js
Normal file
@@ -0,0 +1,28 @@
|
||||
#! /usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// The bank keys must have been already saved
|
||||
client.send(Orders.C53(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
.then((resp) => {
|
||||
console.log('Response for C53 order %j', resp);
|
||||
if (resp.technicalCode !== '000000')
|
||||
throw new Error('Something went wrong');
|
||||
|
||||
// Parsing and processing the CAMT053 file should happen somewhere here, ideally after saving it to disk
|
||||
const data = Buffer.from(resp.orderData);
|
||||
let distPath = "CAMT053.zip";
|
||||
const dstZip = fs.createWriteStream(distPath);
|
||||
dstZip.write(data);
|
||||
dstZip.end();
|
||||
})
|
||||
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
@@ -2,19 +2,11 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const ebics = require('../index');
|
||||
|
||||
const client = new ebics.Client({
|
||||
url: 'https://ebics.server',
|
||||
partnerId: '',
|
||||
userId: '',
|
||||
hostId: '',
|
||||
passphrase: 'test', // keys-test will be decrypted with this passphrase
|
||||
keyStorage: ebics.fsKeysStorage('./keys-test'),
|
||||
});
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// The bank keys must have been already saved
|
||||
client.send(ebics.Orders.C53(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
client.send(Orders.C53(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
.then((resp) => {
|
||||
console.log('Response for C53 order %j', resp);
|
||||
if (resp.technicalCode !== '000000')
|
||||
|
@@ -2,19 +2,11 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const ebics = require('../index');
|
||||
|
||||
const client = new ebics.Client({
|
||||
url: 'https://ebics.server',
|
||||
partnerId: '',
|
||||
userId: '',
|
||||
hostId: '',
|
||||
passphrase: 'test', // keys-test will be decrypted with this passphrase
|
||||
keyStorage: ebics.fsKeysStorage('./keys-test'),
|
||||
});
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// The bank keys must have been already saved
|
||||
client.send(ebics.Orders.DKI(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
client.send(Orders.DKI(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
.then((resp) => {
|
||||
console.log('Response for DKI order %j', resp);
|
||||
if (resp.technicalCode !== '000000')
|
||||
|
28
examples/send-g02-order-zipped.js
Normal file
28
examples/send-g02-order-zipped.js
Normal file
@@ -0,0 +1,28 @@
|
||||
#! /usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// The bank keys must have been already saved
|
||||
client.send(Orders.G02(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
.then((resp) => {
|
||||
console.log('Response for G02 order %j', resp);
|
||||
if (resp.technicalCode !== '000000')
|
||||
throw new Error('Something went wrong');
|
||||
|
||||
// Parsing and processing the G02 Pain.002.001.06 file should happen somewhere here, ideally after saving it to disk
|
||||
const data = Buffer.from(resp.orderData);
|
||||
let distPath = "G02.zip";
|
||||
const dstZip = fs.createWriteStream(distPath);
|
||||
dstZip.write(data);
|
||||
dstZip.end();
|
||||
})
|
||||
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
20
examples/send-g1r-order.js
Normal file
20
examples/send-g1r-order.js
Normal file
@@ -0,0 +1,20 @@
|
||||
#! /usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// The bank keys must have been already saved
|
||||
const paymentFile = fs.readFileSync('RUB_PAYMENT.xml').toString();
|
||||
|
||||
client.send(Orders.G1R(paymentFile))
|
||||
.then((resp) => {
|
||||
console.log('Response for G1R order %j', resp);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
20
examples/send-g1v-order.js
Normal file
20
examples/send-g1v-order.js
Normal file
@@ -0,0 +1,20 @@
|
||||
#! /usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// The bank keys must have been already saved
|
||||
const paymentFile = fs.readFileSync('FCY_PAYMENT.xml').toString();
|
||||
|
||||
client.send(Orders.G1V(paymentFile))
|
||||
.then((resp) => {
|
||||
console.log('Response for G1V order %j', resp);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
28
examples/send-g52-order-zipped.js
Normal file
28
examples/send-g52-order-zipped.js
Normal file
@@ -0,0 +1,28 @@
|
||||
#! /usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// The bank keys must have been already saved
|
||||
client.send(Orders.G52(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
.then((resp) => {
|
||||
console.log('Response for G52 order %j', resp);
|
||||
if (resp.technicalCode !== '000000')
|
||||
throw new Error('Something went wrong');
|
||||
|
||||
// Parsing and processing the CAMT052 file should happen somewhere here, ideally after saving it to disk
|
||||
const data = Buffer.from(resp.orderData);
|
||||
let distPath = "CAMT052-G52.zip";
|
||||
const dstZip = fs.createWriteStream(distPath);
|
||||
dstZip.write(data);
|
||||
dstZip.end();
|
||||
})
|
||||
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
28
examples/send-g53-order-zipped.js
Normal file
28
examples/send-g53-order-zipped.js
Normal file
@@ -0,0 +1,28 @@
|
||||
#! /usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// The bank keys must have been already saved
|
||||
client.send(Orders.G53(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
.then((resp) => {
|
||||
console.log('Response for G53 order %j', resp);
|
||||
if (resp.technicalCode !== '000000')
|
||||
throw new Error('Something went wrong');
|
||||
|
||||
// Parsing and processing the CAMT053 file should happen somewhere here, ideally after saving it to disk
|
||||
const data = Buffer.from(resp.orderData);
|
||||
let distPath = "CAMT053-G53.zip";
|
||||
const dstZip = fs.createWriteStream(distPath);
|
||||
dstZip.write(data);
|
||||
dstZip.end();
|
||||
})
|
||||
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
@@ -2,19 +2,11 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const ebics = require('../index');
|
||||
|
||||
const client = new ebics.Client({
|
||||
url: 'https://ebics.server',
|
||||
partnerId: '',
|
||||
userId: '',
|
||||
hostId: '',
|
||||
passphrase: 'test', // keys-test will be decrypted with this passphrase
|
||||
keyStorage: ebics.fsKeysStorage('./keys-test'),
|
||||
});
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// The bank keys must have been already saved
|
||||
client.send(ebics.Orders.HKD)
|
||||
client.send(Orders.HKD)
|
||||
.then((resp) => {
|
||||
console.log('Response for HKD order %j', resp);
|
||||
if (resp.technicalCode !== '000000')
|
||||
|
@@ -2,19 +2,11 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const ebics = require('../index');
|
||||
|
||||
const client = new ebics.Client({
|
||||
url: 'https://ebics.server',
|
||||
partnerId: '',
|
||||
userId: '',
|
||||
hostId: '',
|
||||
passphrase: 'test', // keys-test will be decrypted with this passphrase
|
||||
keyStorage: ebics.fsKeysStorage('./keys-test'),
|
||||
});
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// The bank keys must have been already saved
|
||||
client.send(ebics.Orders.HTD)
|
||||
client.send(Orders.HTD)
|
||||
.then((resp) => {
|
||||
console.log('Response for HTD order %j', resp);
|
||||
if (resp.technicalCode !== '000000')
|
||||
|
@@ -2,19 +2,11 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const ebics = require('../index');
|
||||
|
||||
const client = new ebics.Client({
|
||||
url: 'https://ebics.server',
|
||||
partnerId: '',
|
||||
userId: '',
|
||||
hostId: '',
|
||||
passphrase: 'test', // keys-test will be decrypted with this passphrase
|
||||
keyStorage: ebics.fsKeysStorage('./keys-test'),
|
||||
});
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// The bank keys must have been already saved
|
||||
client.send(ebics.Orders.STA(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
client.send(Orders.STA(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
.then((resp) => {
|
||||
console.log('Response for STA order %j', resp);
|
||||
if (resp.technicalCode !== '000000')
|
||||
|
@@ -2,19 +2,12 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const ebics = require('../index');
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
const client = new ebics.Client({
|
||||
url: 'https://ebics.server',
|
||||
partnerId: '',
|
||||
userId: '',
|
||||
hostId: '',
|
||||
passphrase: 'test', // keys-test will be decrypted with this passphrase
|
||||
keyStorage: ebics.fsKeysStorage('./keys-test'),
|
||||
});
|
||||
|
||||
// The bank keys must have been already saved
|
||||
client.send(ebics.Orders.VMK(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
client.send(Orders.VMK(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||
.then((resp) => {
|
||||
console.log('Response for VMK order %j', resp);
|
||||
if (resp.technicalCode !== '000000')
|
||||
|
21
examples/send-xg1-order.js
Normal file
21
examples/send-xg1-order.js
Normal file
@@ -0,0 +1,21 @@
|
||||
#! /usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
const ebics = require('../index');
|
||||
const fs = require('fs');
|
||||
|
||||
const client = require('./getClient')();
|
||||
const { Orders } = require('../index');
|
||||
|
||||
// The bank keys must have been already saved
|
||||
const paymentFile = fs.readFileSync('mytestfile.xml').toString();
|
||||
|
||||
client.send(Orders.XG1(paymentFile))
|
||||
.then((resp) => {
|
||||
console.log('Response for XG1 order %j', resp);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
@@ -46,6 +46,10 @@ const stringifyKeys = (keys) => {
|
||||
* @property {string} passphrase - passphrase for keys encryption
|
||||
* @property {KeyStorage} keyStorage - keyStorage implementation
|
||||
* @property {object} [tracesStorage] - traces (logs) storage implementation
|
||||
* @property {string} bankName - Full name of the bank to be used in the bank INI letters.
|
||||
* @property {string} bankShortName - Short name of the bank to be used in folders, filenames etc.
|
||||
* @property {string} languageCode - Language code to be used in the bank INI letters ("de", "en" and "fr" are currently supported).
|
||||
* @property {string} storageLocation - Location where to store the files that are downloaded. This can be a network share for example.
|
||||
*/
|
||||
|
||||
|
||||
@@ -62,6 +66,10 @@ module.exports = class Client {
|
||||
passphrase,
|
||||
keyStorage,
|
||||
tracesStorage,
|
||||
bankName,
|
||||
bankShortName,
|
||||
languageCode,
|
||||
storageLocation,
|
||||
}) {
|
||||
if (!url)
|
||||
throw new Error('EBICS URL is required');
|
||||
@@ -84,6 +92,10 @@ module.exports = class Client {
|
||||
this.keyStorage = keyStorage;
|
||||
this.keyEncryptor = defaultKeyEncryptor({ passphrase });
|
||||
this.tracesStorage = tracesStorage || null;
|
||||
this.bankName = bankName || 'Dummy Bank Full Name';
|
||||
this.bankShortName = bankShortName || 'BANKSHORTCODE';
|
||||
this.languageCode = languageCode || 'en';
|
||||
this.storageLocation = storageLocation || null;
|
||||
}
|
||||
|
||||
async send(order) {
|
||||
@@ -104,7 +116,7 @@ module.exports = class Client {
|
||||
|
||||
async initialization(order) {
|
||||
const keys = await this.keys();
|
||||
if (keys === null) this._generateKeys();
|
||||
if (keys === null) await this._generateKeys();
|
||||
|
||||
if (this.tracesStorage)
|
||||
this.tracesStorage.new().ofType('ORDER.INI');
|
||||
@@ -223,10 +235,10 @@ module.exports = class Client {
|
||||
}
|
||||
}
|
||||
|
||||
_generateKeys() {
|
||||
async _generateKeys() {
|
||||
const keysObject = Keys.generate();
|
||||
|
||||
this._writeKeys(keysObject);
|
||||
await this._writeKeys(keysObject);
|
||||
}
|
||||
|
||||
async setBankKeys(bankKeys) {
|
||||
|
@@ -67,12 +67,15 @@ module.exports = class Crypto {
|
||||
}
|
||||
|
||||
static sign(key, msg, salt = crypto.randomBytes(32)) {
|
||||
// console.log(key.d());
|
||||
const base = new BigNumber(emsaPSS(msg, salt));
|
||||
const power = new BigNumber(key.d());
|
||||
const mod = new BigNumber(key.n());
|
||||
const buffer = modPow(base, power, mod).toBEBuffer();
|
||||
|
||||
return (modPow(base, power, mod)).toBEBuffer().toString('base64');
|
||||
if (buffer.byteLength === 257 && buffer[0] === 0x00)
|
||||
return buffer.slice(1).toString('base64');
|
||||
|
||||
return buffer.toString('base64');
|
||||
}
|
||||
|
||||
static pad(d) {
|
||||
|
13
lib/predefinedOrders/G02.js
Normal file
13
lib/predefinedOrders/G02.js
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
const utils = require('../utils');
|
||||
|
||||
module.exports = (start = null, end = null) => ({
|
||||
version: 'h004',
|
||||
orderDetails: {
|
||||
OrderType: 'G02',
|
||||
OrderAttribute: 'DZHNN',
|
||||
StandardOrderParams: utils.dateRange(start, end),
|
||||
},
|
||||
operation: 'download',
|
||||
});
|
8
lib/predefinedOrders/G1R.js
Normal file
8
lib/predefinedOrders/G1R.js
Normal file
@@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = document => ({
|
||||
version: 'h004',
|
||||
orderDetails: { OrderType: 'G1R', OrderAttribute: 'DZHNN', StandardOrderParams: {} },
|
||||
operation: 'upload',
|
||||
document,
|
||||
});
|
8
lib/predefinedOrders/G1V.js
Normal file
8
lib/predefinedOrders/G1V.js
Normal file
@@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = document => ({
|
||||
version: 'h004',
|
||||
orderDetails: { OrderType: 'G1V', OrderAttribute: 'DZHNN', StandardOrderParams: {} },
|
||||
operation: 'upload',
|
||||
document,
|
||||
});
|
13
lib/predefinedOrders/G52.js
Normal file
13
lib/predefinedOrders/G52.js
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
const utils = require('../utils');
|
||||
|
||||
module.exports = (start = null, end = null) => ({
|
||||
version: 'h004',
|
||||
orderDetails: {
|
||||
OrderType: 'G52',
|
||||
OrderAttribute: 'DZHNN',
|
||||
StandardOrderParams: utils.dateRange(start, end),
|
||||
},
|
||||
operation: 'download',
|
||||
});
|
13
lib/predefinedOrders/G53.js
Normal file
13
lib/predefinedOrders/G53.js
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
const utils = require('../utils');
|
||||
|
||||
module.exports = (start = null, end = null) => ({
|
||||
version: 'h004',
|
||||
orderDetails: {
|
||||
OrderType: 'G53',
|
||||
OrderAttribute: 'DZHNN',
|
||||
StandardOrderParams: utils.dateRange(start, end),
|
||||
},
|
||||
operation: 'download',
|
||||
});
|
8
lib/predefinedOrders/XG1.js
Normal file
8
lib/predefinedOrders/XG1.js
Normal file
@@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = document => ({
|
||||
version: 'h004',
|
||||
orderDetails: { OrderType: 'XG1', OrderAttribute: 'OZHNN', StandardOrderParams: {} },
|
||||
operation: 'upload',
|
||||
document,
|
||||
});
|
@@ -13,6 +13,9 @@ const CCT = require('./CCT');
|
||||
const CCS = require('./CCS');
|
||||
const XE3 = require('./XE3');
|
||||
const XCT = require('./XCT');
|
||||
const XG1 = require('./XG1');
|
||||
const G1V = require('./G1V');
|
||||
const G1R = require('./G1R');
|
||||
|
||||
const STA = require('./STA');
|
||||
const VMK = require('./VMK');
|
||||
@@ -26,6 +29,9 @@ const Z53 = require('./Z53');
|
||||
const DKI = require('./DKI');
|
||||
const C52 = require('./C52');
|
||||
const C53 = require('./C53');
|
||||
const G52 = require('./G52');
|
||||
const G53 = require('./G53');
|
||||
const G02 = require('./G02');
|
||||
|
||||
module.exports = {
|
||||
INI,
|
||||
@@ -42,6 +48,9 @@ module.exports = {
|
||||
CCS,
|
||||
XE3,
|
||||
XCT,
|
||||
XG1,
|
||||
G1V,
|
||||
G1R,
|
||||
|
||||
STA,
|
||||
VMK,
|
||||
@@ -54,4 +63,7 @@ module.exports = {
|
||||
DKI,
|
||||
C52,
|
||||
C53,
|
||||
G52,
|
||||
G53,
|
||||
G02,
|
||||
};
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
const uuidv1 = require('uuid/v1');
|
||||
const { v1: uuidv1 } = require('uuid');
|
||||
|
||||
const traceName = (uuid, label, type, ext = 'xml') => `${uuid}_${label}_${type}.${ext}`;
|
||||
|
||||
|
2449
package-lock.json
generated
2449
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
40
package.json
40
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ebics-client",
|
||||
"version": "0.1.3",
|
||||
"version": "0.2.1",
|
||||
"description": "Node.js ISO 20022 Compliant EBICS Client",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
@@ -15,7 +15,7 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/eCollect/node-ebics-client"
|
||||
"url": "https://github.com/node-ebics/node-ebics-client"
|
||||
},
|
||||
"keywords": [
|
||||
"EBICS",
|
||||
@@ -47,28 +47,36 @@
|
||||
{
|
||||
"name": "Herman van Hazendonk",
|
||||
"email": "github.com@herrie.org"
|
||||
},
|
||||
{
|
||||
"name": "chrwoizi",
|
||||
"url": "https://github.com/chrwoizi"
|
||||
},
|
||||
{
|
||||
"name": "Herrie",
|
||||
"url": "https://github.com/Herrie82"
|
||||
}
|
||||
],
|
||||
"license": "GPL-3.0-only",
|
||||
"dependencies": {
|
||||
"auto-changelog": "^1.16.2",
|
||||
"handlebars": "^4.5.3",
|
||||
"js2xmlparser": "^4.0.0",
|
||||
"node-forge": "^0.9.1",
|
||||
"request": "^2.88.0",
|
||||
"uuid": "^3.3.3",
|
||||
"xml-crypto": "^1.4.0",
|
||||
"xmldom": "^0.1.27",
|
||||
"xpath": "0.0.27"
|
||||
"handlebars": "^4.7.7",
|
||||
"js2xmlparser": "^4.0.1",
|
||||
"node-forge": "^0.10.0",
|
||||
"request": "^2.88.2",
|
||||
"uuid": "^8.3.2",
|
||||
"xml-crypto": "^2.1.1",
|
||||
"xmldom": "^0.5.0",
|
||||
"xpath": "0.0.32"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "^4.2.0",
|
||||
"coveralls": "^3.0.7",
|
||||
"eslint": "^6.6.0",
|
||||
"auto-changelog": "^1.16.2",
|
||||
"chai": "^4.3.4",
|
||||
"coveralls": "^3.1.0",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-config-ecollect-base": "^0.1.2",
|
||||
"eslint-plugin-import": "^2.18.2",
|
||||
"libxmljs": "^0.19.7",
|
||||
"mocha": "^6.2.2",
|
||||
"nyc": "^14.1.1"
|
||||
"mocha": "^7.1.2",
|
||||
"nyc": "^15.1.0"
|
||||
}
|
||||
}
|
||||
|
164
templates/ini_fr.hbs
Normal file
164
templates/ini_fr.hbs
Normal file
@@ -0,0 +1,164 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta charset="UTF-8" />
|
||||
<title>EBICS ini</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
<h2>Lettre d'initialisation pour clés électroniques bancaires (INI)</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Date</td>
|
||||
<td>{{ today }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Heure</td>
|
||||
<td>{{ now }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Banque</td>
|
||||
<td>{{ bankName }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ID Utilisateur</td>
|
||||
<td>{{ userId }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ID Partenaire</td>
|
||||
<td>{{ partnerId }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>Clé publique (Public Key) pour la signature électronique (A006)</p>
|
||||
<p>Exposant ({{ keyExponentBits A006 }} Bit):</p>
|
||||
<p>
|
||||
<code>{{ keyExponent A006 }}</code>
|
||||
</p>
|
||||
<p>Modulo ({{ keyModulusBits A006 }} Bit):</p>
|
||||
<p>
|
||||
<code>{{ keyModulus A006 }}</code>
|
||||
</p>
|
||||
<p>Hash (SHA-256):</p>
|
||||
<p>
|
||||
<code>{{ sha256 A006 }}</code>
|
||||
</p>
|
||||
<p>Je confirme par la présente la clé publique ci-dessus pour ma signature électronique.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<table>
|
||||
<tr>
|
||||
<td>_________________________</td>
|
||||
<td>_________________________</td>
|
||||
<td>_________________________</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lieu/Date</td>
|
||||
<td>Nom/Entreprise</td>
|
||||
<td>Signature</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="page-break-after:always"></div>
|
||||
<h2>Lettre d'initialisation pour clés électroniques bancaires (HIA) - Page 1/2</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Date</td>
|
||||
<td>{{ today }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Heure</td>
|
||||
<td>{{ now }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Banque</td>
|
||||
<td>{{ bankName }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ID Utilisateur</td>
|
||||
<td>{{ userId }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ID Partenaire</td>
|
||||
<td>{{ partnerId }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>
|
||||
<p>Clé d'identification publique (X002)</p>
|
||||
<p>Exposant ({{ keyExponentBits X002 }} Bit):</p>
|
||||
<p>
|
||||
<code>{{ keyExponent X002 }}</code>
|
||||
</p>
|
||||
<p>Modulo ({{ keyModulusBits X002 }} Bit):</p>
|
||||
<p>
|
||||
<code>{{ keyModulus X002 }}</code>
|
||||
</p>
|
||||
<p>Hash (SHA-256):</p>
|
||||
<p>
|
||||
<code>{{ sha256 X002 }}</code>
|
||||
</p>
|
||||
<p>Suite à la page 2 ...</p>
|
||||
<div style="page-break-after:always"></div>
|
||||
<h2>Lettre d'initialisation pour clés électroniques bancaires (HIA) - Page 2/2</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Date</td>
|
||||
<td>{{ today }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Heure</td>
|
||||
<td>{{ now }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Banque</td>
|
||||
<td>{{ bankName }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ID Utilisateur</td>
|
||||
<td>{{ userId }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ID Partenaire</td>
|
||||
<td>{{ partnerId }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<p>Clé de chiffrement publique (E002)</p>
|
||||
<p>Exposant ({{ keyExponentBits E002 }} Bit):</p>
|
||||
<p>
|
||||
<code>{{ keyExponent E002 }}</code>
|
||||
</p>
|
||||
<p>Modulo ({{ keyModulusBits E002 }} Bit):</p>
|
||||
<p>
|
||||
<code>{{ keyModulus E002 }}</code>
|
||||
</p>
|
||||
<p>Hash (SHA-256):</p>
|
||||
<p>
|
||||
<code>{{ sha256 E002 }}</code>
|
||||
</p>
|
||||
<p>Je confirme par la présente les clés publiques ci-dessus.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<table>
|
||||
<tr>
|
||||
<td>_________________________</td>
|
||||
<td>_________________________</td>
|
||||
<td>_________________________</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lieu/Date</td>
|
||||
<td>Nom/Entreprise</td>
|
||||
<td>Signature</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user