Compare commits

...

598 Commits

Author SHA1 Message Date
Ricardo Ambrogi
ea1da161d0 Merge pull request #565 from Adyen/develop 2020-09-25 09:21:01 +02:00
Ricardo Ambrogi
2ebd05f593 Merge branch 'master' into develop 2020-09-25 09:20:21 +02:00
Ricardo Ambrogi
4128891d4e Update package.json 2020-09-25 09:19:31 +02:00
Ricardo Ambrogi
d8dbb2ebf0 Update .release-it.json 2020-09-25 09:14:34 +02:00
Ricardo Ambrogi
a72692a82e Update npmpublish.yml 2020-09-25 09:11:53 +02:00
Ricardo Ambrogi
6a9987d3e6 Merge pull request #561 from Adyen/develop 2020-09-25 08:58:57 +02:00
KadoBOT
53815b0c43 merge master 2020-09-25 08:49:36 +02:00
Ricardo Ambrogi
b20f579cf0 update API versions (#560) 2020-09-25 08:29:15 +02:00
dependabot[bot]
5f54866a26 Bump ts-loader from 8.0.3 to 8.0.4 (#559)
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 8.0.3 to 8.0.4.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v8.0.3...8.0.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-21 07:45:29 +02:00
dependabot[bot]
c3cc2d9773 Bump @types/jest from 26.0.13 to 26.0.14 (#558)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.13 to 26.0.14.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-17 06:51:01 +02:00
dependabot[bot]
7838bd06e5 Bump release-it from 14.0.2 to 14.0.3 (#557)
Bumps [release-it](https://github.com/release-it/release-it) from 14.0.2 to 14.0.3.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/14.0.2...14.0.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-15 07:39:52 +02:00
dependabot[bot]
df64578bd3 Bump acorn from 7.4.0 to 8.0.1 (#556)
Bumps [acorn](https://github.com/acornjs/acorn) from 7.4.0 to 8.0.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/7.4.0...8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-08 08:33:25 +02:00
dependabot[bot]
3d4de26368 Bump ttypescript from 1.5.11 to 1.5.12 (#555)
Bumps [ttypescript](https://github.com/cevek/ttypescript) from 1.5.11 to 1.5.12.
- [Release notes](https://github.com/cevek/ttypescript/releases)
- [Commits](https://github.com/cevek/ttypescript/compare/1.5.11...1.5.12)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-08 08:08:29 +02:00
dependabot[bot]
c873bd4e57 Bump release-it from 14.0.1 to 14.0.2 (#554)
Bumps [release-it](https://github.com/release-it/release-it) from 14.0.1 to 14.0.2.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/14.0.1...14.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-07 08:09:37 +02:00
dependabot[bot]
57b7b6caff Bump release-it from 13.7.0 to 14.0.1 (#553)
Bumps [release-it](https://github.com/release-it/release-it) from 13.7.0 to 14.0.1.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.7.0...14.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-04 07:31:48 +02:00
dependabot[bot]
fea4634fce Bump @types/jest from 26.0.12 to 26.0.13 (#550)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.12 to 26.0.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-03 07:17:15 +02:00
dependabot[bot]
98b1da396d Bump @types/jest from 26.0.10 to 26.0.12 (#548)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-01 08:53:49 +02:00
Ricardo Ambrogi
872f2302cd Revert "Bump @types/node from 14.0.9 to 14.6.1" (#549) 2020-09-01 07:18:06 +02:00
Ricardo Ambrogi
e9e75c379c Merge pull request #546 from Adyen/dependabot/npm_and_yarn/types/node-14.6.1
Bump @types/node from 14.0.9 to 14.6.1
2020-08-28 06:19:08 +02:00
dependabot[bot]
8b63c8fe21 Bump @types/node from 14.0.9 to 14.6.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.9 to 14.6.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-28 04:03:54 +00:00
dependabot[bot]
6f13cfcb50 Bump release-it from 13.6.9 to 13.7.0 (#544)
Bumps [release-it](https://github.com/release-it/release-it) from 13.6.9 to 13.7.0.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.6.9...13.7.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-26 08:41:43 +02:00
dependabot[bot]
d33b46c6a2 Bump ttypescript from 1.5.10 to 1.5.11 (#545)
Bumps [ttypescript](https://github.com/cevek/ttypescript) from 1.5.10 to 1.5.11.
- [Release notes](https://github.com/cevek/ttypescript/releases)
- [Commits](https://github.com/cevek/ttypescript/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-26 07:45:53 +02:00
dependabot[bot]
663a8cc6a6 Bump ts-loader from 8.0.2 to 8.0.3 (#543)
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 8.0.2 to 8.0.3.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v8.0.2...v8.0.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-25 12:35:53 +02:00
dependabot[bot]
009bc4db00 Bump release-it from 13.6.8 to 13.6.9 (#542)
Bumps [release-it](https://github.com/release-it/release-it) from 13.6.8 to 13.6.9.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.6.8...13.6.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-24 07:17:20 +02:00
dependabot[bot]
42a4958ae3 Bump release-it from 13.6.7 to 13.6.8 (#540)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-20 07:56:32 +02:00
dependabot[bot]
783df311ec Bump release-it from 13.6.6 to 13.6.7 (#538)
Bumps [release-it](https://github.com/release-it/release-it) from 13.6.6 to 13.6.7.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.6.6...13.6.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ricardo Ambrogi <ricardo.ambrogi@gmail.com>
2020-08-17 09:23:13 +02:00
dependabot[bot]
84d1932e97 Bump @types/jest from 26.0.9 to 26.0.10 (#537)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.9 to 26.0.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ricardo Ambrogi <ricardo.ambrogi@gmail.com>
2020-08-17 08:44:58 +02:00
KadoBOT
8c469e886d fix unit test 2020-08-17 08:08:49 +02:00
KadoBOT
c5dcad9271 fix unit test 2020-08-17 08:07:02 +02:00
Ricardo Ambrogi
368db4455f Update npmpublish.yml (#533) 2020-08-07 06:24:47 +02:00
dependabot[bot]
40b6cd5f1e Bump @types/jest from 26.0.8 to 26.0.9 (#532)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.8 to 26.0.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-06 06:37:25 +02:00
Ricardo Ambrogi
c60c4b7520 Release 5.0.2-beta.0 2020-08-05 14:32:45 +00:00
Ricardo Ambrogi
e391d8d995 Merge pull request #531 from Adyen/develop
Code cleanup
2020-08-05 16:04:31 +02:00
Ricardo Ambrogi
955aea532c Merge branch 'master' into develop 2020-08-05 13:16:00 +02:00
Ricardo Ambrogi
fb5128c636 Feat/impr release (#530) 2020-08-05 13:13:27 +02:00
dependabot[bot]
164f6ca2b3 Bump @types/jest from 26.0.7 to 26.0.8 (#529)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.7 to 26.0.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-04 07:44:10 +02:00
dependabot[bot]
1d7c8edefe Bump ts-loader from 8.0.1 to 8.0.2 (#528)
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 8.0.1 to 8.0.2.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v8.0.1...v8.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-03 07:50:47 +02:00
dependabot[bot]
64c2f008c7 Bump webpack from 4.44.0 to 4.44.1 (#527)
Bumps [webpack](https://github.com/webpack/webpack) from 4.44.0 to 4.44.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.44.0...v4.44.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-31 07:28:26 +02:00
dependabot[bot]
12223da1a3 Bump nock from 13.0.2 to 13.0.3 (#525)
Bumps [nock](https://github.com/nock/nock) from 13.0.2 to 13.0.3.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.0.2...v13.0.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-28 07:03:27 +02:00
dependabot[bot]
9faef744ed Bump release-it from 13.6.5 to 13.6.6 (#523)
Bumps [release-it](https://github.com/release-it/release-it) from 13.6.5 to 13.6.6.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.6.5...13.6.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-27 07:02:59 +02:00
dependabot[bot]
17a60f6c1f Bump webpack from 4.43.0 to 4.44.0 (#522)
Bumps [webpack](https://github.com/webpack/webpack) from 4.43.0 to 4.44.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.43.0...v4.44.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-27 06:15:04 +02:00
dependabot[bot]
db422acc71 Bump @types/jest from 26.0.5 to 26.0.7 (#521)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.5 to 26.0.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-24 08:01:16 +02:00
dependabot[bot]
e206679d45 Bump @types/jest from 26.0.4 to 26.0.5 (#518)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.4 to 26.0.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-20 07:24:02 +02:00
dependabot[bot]
fbe97cf919 Bump typescript from 3.9.6 to 3.9.7 (#516)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ricardo Ambrogi <ricardo.ambrogi@gmail.com>
2020-07-17 07:30:04 +02:00
dependabot[bot]
e276cb8e24 Bump ts-loader from 8.0.0 to 8.0.1 (#517)
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 07:19:35 +02:00
dependabot[bot]
b471905ac3 Bump release-it from 13.6.4 to 13.6.5 (#513)
Bumps [release-it](https://github.com/release-it/release-it) from 13.6.4 to 13.6.5.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.6.4...13.6.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-10 07:46:03 +02:00
dependabot[bot]
86b78c3f92 Bump ts-loader from 7.0.5 to 8.0.0 (#511)
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 7.0.5 to 8.0.0.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v7.0.5...v8.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-09 08:26:03 +02:00
dependabot[bot]
cfd92b904b Bump @types/jest from 26.0.3 to 26.0.4 (#509)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.3 to 26.0.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-07 06:54:59 +02:00
dependabot[bot]
e3cc8a6c00 Bump webpack-cli from 3.3.11 to 3.3.12 (#505)
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 3.3.11 to 3.3.12.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/v3.3.12/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/v3.3.11...v3.3.12)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-02 08:04:46 +02:00
dependabot[bot]
60704022a1 Bump nock from 13.0.1 to 13.0.2 (#506)
Bumps [nock](https://github.com/nock/nock) from 13.0.1 to 13.0.2.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.0.1...v13.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-02 06:56:56 +02:00
dependabot[bot]
a416d7b14a Bump typescript from 3.9.5 to 3.9.6 (#507)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.5 to 3.9.6.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-02 06:56:26 +02:00
dependabot-preview[bot]
77d1cc7751 Create Dependabot config file (#503)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-01 16:59:37 +02:00
dependabot-preview[bot]
d56423560f Bump nock from 13.0.0 to 13.0.1 (#502)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-01 08:30:28 +02:00
dependabot-preview[bot]
ae2031fc5d Bump nock from 12.0.3 to 13.0.0 (#501)
Bumps [nock](https://github.com/nock/nock) from 12.0.3 to 13.0.0.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v12.0.3...v13.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-29 08:43:40 +02:00
dependabot-preview[bot]
1499559123 Bump release-it from 13.6.3 to 13.6.4 (#500)
Bumps [release-it](https://github.com/release-it/release-it) from 13.6.3 to 13.6.4.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.6.3...13.6.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-29 08:09:31 +02:00
dependabot-preview[bot]
d003c45f85 Bump @types/jest from 26.0.1 to 26.0.3 (#498)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.1 to 26.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-26 08:30:17 +02:00
Rik ter Beek
eb13940cb5 Create codeql-analysis.yml 2020-06-26 08:03:15 +02:00
dependabot-preview[bot]
ce91c512ae Bump @types/jest from 26.0.0 to 26.0.1 (#496)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.0 to 26.0.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-25 06:19:13 +02:00
Ricardo Ambrogi
3a2b899136 Merge pull request #493 from Adyen/dependabot/npm_and_yarn/release-it-13.6.3
Bump release-it from 13.6.2 to 13.6.3
2020-06-15 09:20:28 +02:00
dependabot-preview[bot]
36eb1476ac Bump release-it from 13.6.2 to 13.6.3
Bumps [release-it](https://github.com/release-it/release-it) from 13.6.2 to 13.6.3.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.6.2...13.6.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-15 06:08:54 +00:00
Ricardo Ambrogi
6b2e2dfb48 Merge pull request #490 from Adyen/develop 2020-06-11 09:51:53 +02:00
Ricardo Ambrogi
d1bd508ea8 Update package.json 2020-06-11 09:51:10 +02:00
Ricardo Ambrogi
69fbcb1f8c Merge pull request #488 from Adyen/hotfix/terminal 2020-06-11 09:48:57 +02:00
Ricardo Ambrogi
7f171af2e1 Merge pull request #489 from Adyen/hotfix/terminal 2020-06-11 09:48:27 +02:00
Ricardo Ambrogi
71748ed815 Merge branch 'develop' into hotfix/terminal 2020-06-11 09:46:07 +02:00
Ricardo Ambrogi
f3cb4cc120 Merge branch 'master' into hotfix/terminal 2020-06-11 09:45:07 +02:00
Ricardo Ambrogi
2ce6878456 Update CODEOWNERS 2020-06-11 09:06:21 +02:00
Ricardo Ambrogi
8ba580b119 Update CODEOWNERS 2020-06-11 09:06:03 +02:00
Ricardo Ambrogi
ae45b10082 Distribution files 2020-06-11 08:49:34 +02:00
Ricardo Ambrogi
050763be7f Changes 2020-06-11 08:49:04 +02:00
Ricardo Ambrogi
eeaae2228a Merge pull request #483 from Adyen/dependabot/npm_and_yarn/types/jest-26.0.0
Bump @types/jest from 25.2.3 to 26.0.0
2020-06-10 08:24:25 +02:00
dependabot-preview[bot]
d0da1382f6 Bump @types/jest from 25.2.3 to 26.0.0
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.2.3 to 26.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-10 05:55:50 +00:00
Ricardo Ambrogi
74c6f119a5 Merge pull request #482 from Adyen/develop 2020-06-09 07:56:41 +02:00
Ricardo Ambrogi
65d81d21ff Merge branch 'master' into develop 2020-06-09 07:50:51 +02:00
KadoBOT
e789cfe47e update distribution folder 2020-06-09 07:42:18 +02:00
Ricardo Ambrogi
be6fc4dd3b Update package.json 2020-06-08 09:07:47 +02:00
Ricardo Ambrogi
0157efa658 Merge pull request #472 from Adyen/PW-2466/sale-to-acquirer-data 2020-06-08 09:06:33 +02:00
Ricardo Ambrogi
c13abc979c Merge branch 'develop' into PW-2466/sale-to-acquirer-data 2020-06-08 07:15:46 +02:00
Ricardo Ambrogi
293f7aab74 Merge pull request #478 from Adyen/v4.0.3 2020-06-05 15:29:13 +02:00
Ricardo Ambrogi
e8dc5a7030 Merge branch 'develop' into v4.0.3 2020-06-05 15:26:56 +02:00
Ricardo Ambrogi
09184486f5 Merge pull request #480 from Adyen/v4.0.3
distribution folder
2020-06-05 15:26:42 +02:00
Ricardo Ambrogi
4d34d3da6a distribution folder 2020-06-05 15:23:29 +02:00
Ricardo Ambrogi
51b998a933 Merge pull request #477 from Adyen/hotfix/res-body 2020-06-05 13:32:10 +02:00
Ricardo Ambrogi
b1bc56ebba Merge pull request #476 from Adyen/hotfix/res-body 2020-06-05 13:32:00 +02:00
Ricardo Ambrogi
b5b947af89 Merge branch 'master' into hotfix/res-body 2020-06-05 13:29:50 +02:00
Ricardo Ambrogi
93c5dcde70 Merge branch 'develop' into hotfix/res-body 2020-06-05 13:29:39 +02:00
Ricardo Ambrogi
a9aedd1f41 Change res.body to string 2020-06-05 13:25:34 +02:00
Ricardo Ambrogi
a6008cf52e Merge pull request #475 from Adyen/dependabot/npm_and_yarn/typescript-3.9.5
Bump typescript from 3.9.3 to 3.9.5
2020-06-05 07:50:53 +02:00
dependabot-preview[bot]
ba24d1b634 Bump typescript from 3.9.3 to 3.9.5
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.3 to 3.9.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.3...v3.9.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-05 05:48:35 +00:00
Ricardo Ambrogi
bca3432865 Terminal type definition files 2020-06-04 11:20:04 +02:00
Ricardo Ambrogi
f21d26680d Refactoring of terminal services to conform new types. 2020-06-04 11:18:39 +02:00
Ricardo Ambrogi
2bc18ccf0f Merge pull request #470 from Adyen/dependabot/npm_and_yarn/types/node-14.0.9
Bump @types/node from 14.0.6 to 14.0.9
2020-06-02 10:37:55 +02:00
dependabot-preview[bot]
1482aeecad Bump @types/node from 14.0.6 to 14.0.9
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.6 to 14.0.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-02 08:28:54 +00:00
Ricardo Ambrogi
6f562cfb32 Merge pull request #469 from Adyen/dependabot/npm_and_yarn/release-it-13.6.2
Bump release-it from 13.6.1 to 13.6.2
2020-06-02 10:26:52 +02:00
dependabot-preview[bot]
077822ea5c Bump release-it from 13.6.1 to 13.6.2
Bumps [release-it](https://github.com/release-it/release-it) from 13.6.1 to 13.6.2.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.6.1...13.6.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-02 08:24:04 +00:00
Ricardo Ambrogi
45e1d2d5ab Merge pull request #468 from Adyen/dependabot/npm_and_yarn/types/node-14.0.6
Bump @types/node from 14.0.5 to 14.0.6
2020-06-02 06:04:14 +02:00
dependabot-preview[bot]
9f6e891c57 Bump @types/node from 14.0.5 to 14.0.6
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.5 to 14.0.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 05:58:29 +00:00
Ricardo Ambrogi
b637febde5 Merge pull request #466 from Adyen/hotfix/hmac 2020-05-27 12:39:11 +02:00
Ricardo Ambrogi
7456025d40 Merge pull request #467 from Adyen/hotfix/hmac 2020-05-27 12:38:58 +02:00
Ricardo Ambrogi
c8d2882299 distribution files 2020-05-27 11:01:00 +02:00
Ricardo Ambrogi
ef490a5cdf Add HmacSignature to additionalData.ts and improve hmac validation tests 2020-05-27 10:58:31 +02:00
Ricardo Ambrogi
650e7dc0a5 Release v4.0.0 2020-05-26 06:37:03 +02:00
Ricardo Ambrogi
156d7fa8ea Merge branch 'develop' of https://github.com/Adyen/adyen-node-api-library into develop 2020-05-26 06:34:14 +02:00
Ricardo Ambrogi
ec16ee9f79 Merge branch 'develop' of https://github.com/Adyen/adyen-node-api-library into develop 2020-05-26 06:33:34 +02:00
Ricardo Ambrogi
74d6da71f8 Merge branch 'develop' of https://github.com/Adyen/adyen-node-api-library into develop 2020-05-26 06:22:02 +02:00
Ricardo Ambrogi
c16c6eb367 Release v4.0.0 2020-05-26 06:19:46 +02:00
Ricardo Ambrogi
ed2e6c62d9 Merge branch 'master' into develop 2020-05-26 06:09:22 +02:00
Ricardo Ambrogi
041587e1bb Release v4.0.0 2020-05-26 06:07:05 +02:00
Ricardo Ambrogi
02bab06c16 Merge pull request #460 from Adyen/PW-2436/Notification 2020-05-25 14:32:39 +02:00
Ricardo Ambrogi
ca7ba4e7de Merge branch 'develop' into PW-2436/Notification 2020-05-25 08:29:14 +02:00
Ricardo Ambrogi
30b0a52802 Merge pull request #463 from Adyen/dependabot/npm_and_yarn/ts-loader-7.0.5 2020-05-25 08:05:06 +02:00
dependabot-preview[bot]
2531290761 Bump ts-loader from 7.0.4 to 7.0.5
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 7.0.4 to 7.0.5.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v7.0.4...v7.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-25 05:58:09 +00:00
Ricardo Ambrogi
62e83058da Merge pull request #461 from Adyen/hotfix/copyright-header 2020-05-22 13:03:46 +02:00
Ricardo Ambrogi
9b6469a228 Merge branch 'PW-2436/Notification' into hotfix/copyright-header 2020-05-22 13:00:27 +02:00
Ricardo Ambrogi
b62e12da1c Merge pull request #462 from Adyen/hotfix/remove-bundle-comments 2020-05-22 12:59:40 +02:00
Ricardo Ambrogi
ddc9e58f72 Remove comments from bundle to reduce size 2020-05-22 12:56:56 +02:00
Ricardo Ambrogi
0ef9b49c5d Update LICENSE 2020-05-22 12:53:54 +02:00
Ricardo Ambrogi
1a96f42b4e Merge branch 'develop' into PW-2436/Notification 2020-05-22 12:44:25 +02:00
Ricardo Ambrogi
4f810936fe Update copyright header 2020-05-22 12:42:48 +02:00
Ricardo Ambrogi
364da4ffde Refactoring of Notification type definitions and Object.serializer 2020-05-22 12:22:04 +02:00
Ricardo Ambrogi
1f24e2a25b Merge pull request #459 from Adyen/dependabot/npm_and_yarn/types/node-14.0.5 2020-05-22 09:19:47 +02:00
dependabot-preview[bot]
725c6d1395 Bump @types/node from 14.0.4 to 14.0.5
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.4 to 14.0.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-22 05:40:21 +00:00
Ricardo Ambrogi
771037b40f Merge pull request #458 from Adyen/dependabot/npm_and_yarn/typescript-3.9.3 2020-05-20 08:44:42 +02:00
dependabot-preview[bot]
5e2094cac7 Bump typescript from 3.9.2 to 3.9.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.2 to 3.9.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.2...v3.9.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-20 06:40:59 +00:00
Ricardo Ambrogi
47515994ee Merge pull request #457 from Adyen/dependabot/npm_and_yarn/types/node-14.0.4 2020-05-20 08:39:07 +02:00
dependabot-preview[bot]
f6b065c02e Bump @types/node from 14.0.1 to 14.0.4
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.1 to 14.0.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-20 05:50:35 +00:00
Ricardo Ambrogi
2c6a23522e Create PULL_REQUEST_TEMPLATE.md 2020-05-19 08:58:16 +02:00
Ricardo Ambrogi
c5cbda16c0 Merge pull request #453 from Adyen/dependabot/npm_and_yarn/typescript-eslint/parser-2.34.0 2020-05-19 08:35:00 +02:00
dependabot-preview[bot]
2dccd236f0 Bump @typescript-eslint/parser from 2.33.0 to 2.34.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.33.0 to 2.34.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.34.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-19 06:31:30 +00:00
Ricardo Ambrogi
9a9168582f Merge pull request #454 from Adyen/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-2.34.0 2020-05-19 08:29:41 +02:00
dependabot-preview[bot]
c48a39edfb Bump @typescript-eslint/eslint-plugin from 2.33.0 to 2.34.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.33.0 to 2.34.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.34.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-19 06:19:25 +00:00
Ricardo Ambrogi
4275dd882b Merge pull request #455 from Adyen/dependabot/npm_and_yarn/types/jest-25.2.3 2020-05-19 08:17:34 +02:00
dependabot-preview[bot]
2a86b795a0 Bump @types/jest from 25.2.2 to 25.2.3
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.2.2 to 25.2.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-19 06:11:06 +00:00
Ricardo Ambrogi
c4c8a61db5 Merge pull request #452 from Adyen/dependabot/npm_and_yarn/release-it-13.6.1 2020-05-18 08:30:08 +02:00
dependabot-preview[bot]
c66137c2eb Bump release-it from 13.6.0 to 13.6.1
Bumps [release-it](https://github.com/release-it/release-it) from 13.6.0 to 13.6.1.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.6.0...13.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-18 05:46:27 +00:00
Ricardo Ambrogi
3b2d20b38d Merge pull request #448 from Adyen/dependabot/npm_and_yarn/release-it-13.6.0 2020-05-15 10:57:54 +02:00
dependabot-preview[bot]
657626a0d2 Bump release-it from 13.5.8 to 13.6.0
Bumps [release-it](https://github.com/release-it/release-it) from 13.5.8 to 13.6.0.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.5.8...13.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-15 05:33:00 +00:00
Ricardo Ambrogi
c0b8d3112b Merge pull request #447 from Adyen/dependabot/npm_and_yarn/types/jest-25.2.2 2020-05-14 08:07:28 +02:00
dependabot-preview[bot]
494f706b4c Bump @types/jest from 25.2.1 to 25.2.2
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.2.1 to 25.2.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-14 05:33:56 +00:00
Ricardo Ambrogi
d39753c4e0 Merge pull request #443 from Adyen/dependabot/npm_and_yarn/types/node-14.0.1 2020-05-13 08:12:18 +02:00
dependabot-preview[bot]
4b27e6a4ca Bump @types/node from 13.13.5 to 14.0.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.13.5 to 14.0.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-13 06:00:30 +00:00
Ricardo Ambrogi
2b98915e7f Merge pull request #445 from Adyen/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-2.33.0 2020-05-13 07:58:47 +02:00
dependabot-preview[bot]
4805613d6f Bump @typescript-eslint/eslint-plugin from 2.32.0 to 2.33.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.32.0 to 2.33.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.33.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-13 05:50:58 +00:00
Ricardo Ambrogi
4f7a05591f Merge pull request #444 from Adyen/dependabot/npm_and_yarn/typescript-3.9.2 2020-05-13 07:49:22 +02:00
dependabot-preview[bot]
c8b00bdce3 Bump typescript from 3.8.3 to 3.9.2
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.8.3 to 3.9.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.8.3...v3.9.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-13 05:47:34 +00:00
Ricardo Ambrogi
afdd88979a Merge pull request #446 from Adyen/dependabot/npm_and_yarn/typescript-eslint/parser-2.33.0 2020-05-13 07:46:00 +02:00
dependabot-preview[bot]
45f5622dcf Bump @typescript-eslint/parser from 2.32.0 to 2.33.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.32.0 to 2.33.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.33.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-13 05:34:03 +00:00
Rik ter Beek
1972bc281b update readme with a link to contact support 2020-05-13 07:20:37 +02:00
Ricardo Ambrogi
d7314fc765 Merge pull request #442 from Adyen/hotfix/flaky-tests 2020-05-12 15:00:24 +02:00
Ricardo Ambrogi
9a2ea8293c Merge branch 'develop' into hotfix/flaky-tests 2020-05-12 08:32:06 +02:00
Ricardo Ambrogi
ec9d41b047 disable flaky e2e tests 2020-05-12 08:31:16 +02:00
Ricardo Ambrogi
b48722a59f disable flaky e2e tests 2020-05-12 08:24:19 +02:00
Ricardo Ambrogi
f5e73fdff8 Merge pull request #441 from Adyen/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-2.32.0
Bump @typescript-eslint/eslint-plugin from 2.31.0 to 2.32.0
2020-05-12 07:55:40 +02:00
dependabot-preview[bot]
99ae41c77e Bump @typescript-eslint/eslint-plugin from 2.31.0 to 2.32.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.31.0 to 2.32.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.32.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-12 05:48:27 +00:00
Ricardo Ambrogi
2617e732d3 Merge pull request #440 from Adyen/dependabot/npm_and_yarn/ts-auto-mock-1.6.2
Bump ts-auto-mock from 1.6.0 to 1.6.2
2020-05-12 07:46:40 +02:00
dependabot-preview[bot]
6299ec0029 Bump ts-auto-mock from 1.6.0 to 1.6.2
Bumps [ts-auto-mock](https://github.com/Typescript-TDD/ts-auto-mock) from 1.6.0 to 1.6.2.
- [Release notes](https://github.com/Typescript-TDD/ts-auto-mock/releases)
- [Changelog](https://github.com/Typescript-TDD/ts-auto-mock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Typescript-TDD/ts-auto-mock/compare/1.6.0...1.6.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-12 05:44:00 +00:00
Ricardo Ambrogi
9cdb45ba14 Merge pull request #439 from Adyen/dependabot/npm_and_yarn/typescript-eslint/parser-2.32.0
Bump @typescript-eslint/parser from 2.31.0 to 2.32.0
2020-05-12 07:42:20 +02:00
dependabot-preview[bot]
098aaeba7d Bump @typescript-eslint/parser from 2.31.0 to 2.32.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.31.0 to 2.32.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.32.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-12 05:40:15 +00:00
Ricardo Ambrogi
3a174185b4 Merge pull request #438 from Adyen/dependabot/npm_and_yarn/ts-loader-7.0.4
Bump ts-loader from 7.0.3 to 7.0.4
2020-05-12 07:38:45 +02:00
dependabot-preview[bot]
989dc92583 Bump ts-loader from 7.0.3 to 7.0.4
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v7.0.3...v7.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-12 05:36:30 +00:00
Ricardo Ambrogi
2fe10e48f2 Merge pull request #436 from Adyen/dependabot/npm_and_yarn/ts-jest-25.5.1 2020-05-11 07:59:42 +02:00
dependabot-preview[bot]
f91f2b8833 Bump ts-jest from 25.5.0 to 25.5.1
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 25.5.0 to 25.5.1.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v25.5.0...v25.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-11 05:51:50 +00:00
Ricardo Ambrogi
aff77ebe50 Merge pull request #437 from Adyen/dependabot/npm_and_yarn/acorn-7.2.0 2020-05-11 07:49:54 +02:00
dependabot-preview[bot]
6079f82c2b Bump acorn from 7.1.1 to 7.2.0
Bumps [acorn](https://github.com/acornjs/acorn) from 7.1.1 to 7.2.0.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/7.1.1...7.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-11 05:40:23 +00:00
Ricardo Ambrogi
10b3d148cb Merge pull request #435 from Adyen/dependabot/npm_and_yarn/ts-loader-7.0.3 2020-05-08 09:18:30 +02:00
dependabot-preview[bot]
8cd4ffe093 Bump ts-loader from 7.0.2 to 7.0.3
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 7.0.2 to 7.0.3.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v7.0.2...v7.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-08 05:37:01 +00:00
Ricardo Ambrogi
f71b1004d2 Merge pull request #434 from Adyen/develop 2020-05-07 14:19:56 +02:00
Ricardo Ambrogi
1c961eac10 Merge branch 'master' into develop 2020-05-07 14:17:54 +02:00
Ricardo Ambrogi
4ebc4caa53 Release v3.3.0 2020-05-07 14:16:53 +02:00
Ricardo Ambrogi
8c6e961bc4 Merge pull request #433 from Adyen/develop 2020-05-07 14:01:12 +02:00
Ricardo Ambrogi
e00c43c4ae Release v3.2.3 2020-05-07 13:52:18 +02:00
Ricardo Ambrogi
dda64f60bd Merge branch 'develop' of https://github.com/Adyen/adyen-node-api-library into develop 2020-05-07 13:27:04 +02:00
KadoBOT
f0e93cfaa1 Release v3.2.3 2020-05-07 13:21:30 +02:00
KadoBOT
43898a2006 Release v3.2.3 2020-05-07 13:17:32 +02:00
Ricardo Ambrogi
26b8ace53f Merge pull request #419 from Adyen/PW2313/e2e-tests 2020-05-07 13:05:27 +02:00
Ricardo Ambrogi
6746ce7234 Merge branch 'develop' into PW2313/e2e-tests 2020-05-07 08:50:26 +02:00
Ricardo Ambrogi
da8bbd1e4a Merge pull request #432 from Adyen/dependabot/npm_and_yarn/ts-jest-25.5.0 2020-05-07 08:04:18 +02:00
dependabot-preview[bot]
fbab4a3976 Bump ts-jest from 25.4.0 to 25.5.0
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 25.4.0 to 25.5.0.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v25.4.0...v25.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-07 05:45:37 +00:00
Ricardo Ambrogi
fd76bdcbea clean platforms.ts 2020-05-06 13:45:01 +02:00
Ricardo Ambrogi
848a655210 Merge pull request #431 from Adyen/PW-2351 2020-05-06 13:29:04 +02:00
Zaid Dreakh
21295f907b merged PW-2313 e2e tests 2020-05-06 11:19:48 +00:00
Zaid Dreakh
fa3997e61a removed some logs & edited fund trasnfer test 2020-05-06 10:41:23 +00:00
Ricardo Ambrogi
5bc903a403 fix eslint warnings 2020-05-06 12:31:45 +02:00
Ricardo Ambrogi
b12e5138fd Merge remote-tracking branch 'origin/PW2313/e2e-tests' into PW2313/e2e-tests
# Conflicts:
#	.eslintrc.js
2020-05-06 12:25:32 +02:00
Ricardo Ambrogi
ca3dfb5c05 remove annoying rules 2020-05-06 12:24:31 +02:00
Ricardo Ambrogi
a466c11577 Merge branch 'develop' into PW2313/e2e-tests 2020-05-06 12:15:39 +02:00
Ricardo Ambrogi
d008b2c76b Merge pull request #424 from Adyen/PW2321/TerminalAPI-AppInfo 2020-05-06 12:15:04 +02:00
Ricardo Ambrogi
2b928554fe Merge pull request #427 from Adyen/PW-2351-Zaid 2020-05-06 12:03:55 +02:00
Ricardo Ambrogi
33738848f1 remove annoying rules 2020-05-06 11:57:41 +02:00
Zaid Dreakh
4006e2957b temp fix for notification configuration list 2020-05-06 09:36:15 +00:00
Zaid Dreakh
27092a0c47 resolved conflicts 2020-05-06 08:23:05 +00:00
Zaid Dreakh
1784fc7d2b removed 2nd timeout 2020-05-06 08:18:14 +00:00
Ricardo Ambrogi
b97d3965a3 Merge pull request #430 from Adyen/dependabot/npm_and_yarn/types/node-13.13.5 2020-05-06 08:46:01 +02:00
dependabot-preview[bot]
cb176ac7d9 Bump @types/node from 13.13.4 to 13.13.5
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.13.4 to 13.13.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-06 05:34:47 +00:00
Ricardo Ambrogi
2971260609 Merge pull request #428 from Adyen/dependabot/npm_and_yarn/typescript-eslint/parser-2.31.0 2020-05-06 06:47:04 +02:00
dependabot-preview[bot]
184fc29bd2 Bump @typescript-eslint/parser from 2.30.0 to 2.31.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.30.0 to 2.31.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.31.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-06 04:23:00 +00:00
Ricardo Ambrogi
2a9cc41463 Merge pull request #429 from Adyen/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-2.31.0 2020-05-06 06:21:22 +02:00
dependabot-preview[bot]
561c5e644e Bump @typescript-eslint/eslint-plugin from 2.30.0 to 2.31.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.30.0 to 2.31.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.31.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-05 05:36:25 +00:00
Zaid Dreakh
b04dc8f5e0 All tests passing w one timeout 2020-05-04 13:24:36 +00:00
Ricardo Ambrogi
f449ed060f add updateAccountHolderState 2020-05-04 14:23:07 +02:00
Ricardo Ambrogi
8d2a8ef685 add document content file 2020-05-04 12:41:51 +02:00
Ricardo Ambrogi
8b3cf9e818 pass if err is due account not found 2020-05-04 12:39:32 +02:00
Ricardo Ambrogi
c1cce25a93 Merge remote-tracking branch 'origin/develop' into PW-2351
# Conflicts:
#	src/httpClient/httpURLConnectionClient.ts
2020-05-04 12:34:41 +02:00
Ricardo Ambrogi
33a0b5f2ad remove keys from account api 2020-05-04 10:12:43 +02:00
Zaid Dreakh
91f5025fc7 Merge branch 'PW2313/e2e-tests' into PW-2351
merged PW2313/e2e-tests.
2020-05-04 07:49:35 +00:00
Zaid Dreakh
fbd496c6ae WIP 2020-05-04 07:47:26 +00:00
Ricardo Ambrogi
36cd082c70 Merge pull request #426 from Adyen/dependabot/npm_and_yarn/release-it-13.5.8 2020-05-04 09:25:11 +02:00
dependabot-preview[bot]
c22825b14b Bump release-it from 13.5.7 to 13.5.8
Bumps [release-it](https://github.com/release-it/release-it) from 13.5.7 to 13.5.8.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.5.7...13.5.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-04 07:23:49 +00:00
Ricardo Ambrogi
cc4ba61db4 Merge pull request #425 from Adyen/dependabot/npm_and_yarn/jest-25.5.4 2020-05-04 09:22:14 +02:00
dependabot-preview[bot]
961a6fe6ac Bump jest from 25.5.3 to 25.5.4
Bumps [jest](https://github.com/facebook/jest) from 25.5.3 to 25.5.4.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.5.3...v25.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-04 05:56:56 +00:00
Ricardo Ambrogi
24770e6496 Merge pull request #422 from Adyen/hotfix/http-exception 2020-05-01 14:19:38 +02:00
Ricardo Ambrogi
8ef214c04a Merge branch 'develop' into hotfix/http-exception 2020-05-01 14:17:20 +02:00
Ricardo Ambrogi
9c53e68f5d fix application info being added to non-payment terminal requests 2020-05-01 11:59:40 +02:00
Ricardo Ambrogi
509d9ff772 store payment method 2020-05-01 10:04:10 +02:00
Ricardo Ambrogi
36ac1105f2 Merge remote-tracking branch 'origin/PW2313/e2e-tests' into PW2313/e2e-tests 2020-05-01 09:59:02 +02:00
Ricardo Ambrogi
05a182e256 terminal e2e 2020-05-01 09:58:45 +02:00
Zaid Dreakh
dfff25f2ef WIP platforms e2e tests 2020-05-01 07:47:36 +00:00
Ricardo Ambrogi
2b4b9755ae Update npmpublish.yml 2020-05-01 09:16:38 +02:00
Ricardo Ambrogi
97de2e7a44 Update nodejs.yml 2020-05-01 09:15:55 +02:00
Ricardo Ambrogi
4a299cc2be Update coveralls.yml 2020-05-01 09:15:25 +02:00
Ricardo Ambrogi
03dfa166fd update recurring test 2020-05-01 09:10:17 +02:00
Ricardo Ambrogi
7c869292f2 change contract to recurring 2020-05-01 08:27:19 +02:00
Ricardo Ambrogi
91c0377764 Merge pull request #423 from Adyen/dependabot/npm_and_yarn/jest-25.5.3 2020-05-01 07:57:33 +02:00
dependabot-preview[bot]
3d7b1c1a5d Bump jest from 25.5.2 to 25.5.3
Bumps [jest](https://github.com/facebook/jest) from 25.5.2 to 25.5.3.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.5.2...v25.5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-01 05:54:52 +00:00
Ricardo Ambrogi
03810191ca HttpException Improvement 2020-04-30 08:13:13 +02:00
Ricardo Ambrogi
dfe9904318 Merge pull request #421 from Adyen/dependabot/npm_and_yarn/jest-25.5.2 2020-04-30 07:59:03 +02:00
Ricardo Ambrogi
3a5f877bb3 platforms.spec.ts 2020-04-30 07:55:03 +02:00
dependabot-preview[bot]
9ee89bf030 Bump jest from 25.5.0 to 25.5.2
Bumps [jest](https://github.com/facebook/jest) from 25.5.0 to 25.5.2.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.5.0...v25.5.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-30 05:54:58 +00:00
Ricardo Ambrogi
6c2e2eab8e Merge pull request #420 from Adyen/dependabot/npm_and_yarn/ts-loader-7.0.2 2020-04-30 07:53:14 +02:00
dependabot-preview[bot]
74434bc2cc Bump ts-loader from 7.0.1 to 7.0.2
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 7.0.1 to 7.0.2.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v7.0.1...v7.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-30 05:45:04 +00:00
Ricardo Ambrogi
df18e6a15b recurring.spec.ts test 2020-04-29 13:08:48 +02:00
Ricardo Ambrogi
0cd7e9b48a fix test.skip 2020-04-29 12:55:49 +02:00
Ricardo Ambrogi
2ad8791312 update coveralls.yml and npmpublish.yml 2020-04-29 12:47:48 +02:00
Ricardo Ambrogi
e72ffdbd9d update nodejs workflow 2020-04-29 12:41:19 +02:00
Ricardo Ambrogi
14bfc12d7b payout.spec.ts tests 2020-04-29 12:21:04 +02:00
Ricardo Ambrogi
e39e962d5f fix wrong declineThirdParty.ts endpoint 2020-04-29 12:20:36 +02:00
Ricardo Ambrogi
a9ecf92d3a add dotenv 2020-04-29 11:44:50 +02:00
Ricardo Ambrogi
08181f943f e2e tests 2020-04-29 11:38:08 +02:00
Ricardo Ambrogi
818f739637 Merge pull request #416 from Adyen/dependabot/npm_and_yarn/release-it-13.5.7 2020-04-29 07:43:29 +02:00
dependabot-preview[bot]
9bbf2d59ad Bump release-it from 13.5.6 to 13.5.7
Bumps [release-it](https://github.com/release-it/release-it) from 13.5.6 to 13.5.7.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.5.6...13.5.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-29 05:37:30 +00:00
Ricardo Ambrogi
d097d8192c Merge pull request #415 from Adyen/dependabot/npm_and_yarn/jest-25.5.0 2020-04-29 07:35:50 +02:00
dependabot-preview[bot]
ce60399f53 Bump jest from 25.4.0 to 25.5.0
Bumps [jest](https://github.com/facebook/jest) from 25.4.0 to 25.5.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.4.0...v25.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-29 05:24:44 +00:00
Ricardo Ambrogi
53aa0f2a67 Merge pull request #414 from Adyen/dependabot/npm_and_yarn/typescript-eslint/parser-2.30.0 2020-04-28 07:59:34 +02:00
dependabot-preview[bot]
4ce37d83cb Bump @typescript-eslint/parser from 2.29.0 to 2.30.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.29.0 to 2.30.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.30.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-28 05:55:53 +00:00
Ricardo Ambrogi
a9cbef429e Merge pull request #413 from Adyen/dependabot/npm_and_yarn/release-it-13.5.6 2020-04-28 07:54:05 +02:00
dependabot-preview[bot]
3334d4f361 Bump release-it from 13.5.5 to 13.5.6
Bumps [release-it](https://github.com/release-it/release-it) from 13.5.5 to 13.5.6.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.5.5...13.5.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-28 05:47:12 +00:00
Ricardo Ambrogi
bd87b04602 Merge pull request #412 from Adyen/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-2.30.0 2020-04-28 07:45:28 +02:00
dependabot-preview[bot]
0ed0de56a6 Bump @typescript-eslint/eslint-plugin from 2.29.0 to 2.30.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.29.0 to 2.30.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.30.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-28 05:43:29 +00:00
Ricardo Ambrogi
fa9ea5e1c0 Merge pull request #411 from Adyen/dependabot/npm_and_yarn/coveralls-3.1.0 2020-04-28 07:08:25 +02:00
dependabot-preview[bot]
e675f9e87e Bump coveralls from 3.0.14 to 3.1.0
Bumps [coveralls](https://github.com/nickmerwin/node-coveralls) from 3.0.14 to 3.1.0.
- [Release notes](https://github.com/nickmerwin/node-coveralls/releases)
- [Commits](https://github.com/nickmerwin/node-coveralls/compare/v3.0.14...v3.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-28 05:05:46 +00:00
Ricardo Ambrogi
30c80f34e9 Merge pull request #410 from Adyen/dependabot/npm_and_yarn/types/node-13.13.4 2020-04-28 07:04:00 +02:00
dependabot-preview[bot]
a06d96cb6b Bump @types/node from 13.13.2 to 13.13.4
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.13.2 to 13.13.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-28 05:01:35 +00:00
Ricardo Ambrogi
3efeb339a7 Merge pull request #403 from Adyen/feature/platforms 2020-04-28 06:59:55 +02:00
Ricardo Ambrogi
5560a93c62 Merge branch 'develop' into feature/platforms 2020-04-28 06:58:08 +02:00
Ricardo Ambrogi
c10993c7b1 Merge pull request #409 from Adyen/dependabot/npm_and_yarn/coveralls-3.0.14 2020-04-24 12:57:30 +02:00
dependabot-preview[bot]
4dbd59139d Bump coveralls from 3.0.13 to 3.0.14
Bumps [coveralls](https://github.com/nickmerwin/node-coveralls) from 3.0.13 to 3.0.14.
- [Release notes](https://github.com/nickmerwin/node-coveralls/releases)
- [Commits](https://github.com/nickmerwin/node-coveralls/compare/v3.0.13...v3.0.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-24 05:22:28 +00:00
Ricardo Ambrogi
2151034e49 Merge remote-tracking branch 'origin/develop' into feature/platforms
# Conflicts:
#	package.json
#	yarn.lock
2020-04-22 13:42:19 +02:00
Ricardo Ambrogi
bc4373545c Platforms tests 2020-04-22 13:30:44 +02:00
Ricardo Ambrogi
0f92235ac5 Auto mock based on Typescript interface 2020-04-22 13:30:12 +02:00
Ricardo Ambrogi
e063a04762 Merge pull request #404 from Adyen/dependabot/npm_and_yarn/types/node-13.13.2
Bump @types/node from 13.13.1 to 13.13.2
2020-04-22 09:01:51 +02:00
dependabot-preview[bot]
35cb449930 Bump @types/node from 13.13.1 to 13.13.2
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.13.1 to 13.13.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-22 06:03:56 +00:00
Ricardo Ambrogi
5b852a8399 Merge pull request #407 from Adyen/dependabot/npm_and_yarn/webpack-4.43.0
Bump webpack from 4.42.1 to 4.43.0
2020-04-22 08:01:53 +02:00
dependabot-preview[bot]
6a94c3309f Bump webpack from 4.42.1 to 4.43.0
Bumps [webpack](https://github.com/webpack/webpack) from 4.42.1 to 4.43.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.42.1...v4.43.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-22 05:55:49 +00:00
Ricardo Ambrogi
90ba60e13b Merge pull request #406 from Adyen/dependabot/npm_and_yarn/release-it-13.5.5
Bump release-it from 13.5.4 to 13.5.5
2020-04-22 07:54:22 +02:00
Ricardo Ambrogi
55f42bd089 Merge pull request #405 from Adyen/dependabot/npm_and_yarn/coveralls-3.0.13
Bump coveralls from 3.0.11 to 3.0.13
2020-04-22 07:53:57 +02:00
dependabot-preview[bot]
ee6b50f75d Bump release-it from 13.5.4 to 13.5.5
Bumps [release-it](https://github.com/release-it/release-it) from 13.5.4 to 13.5.5.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.5.4...13.5.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-22 05:47:41 +00:00
dependabot-preview[bot]
6228bc12ef Bump coveralls from 3.0.11 to 3.0.13
Bumps [coveralls](https://github.com/nickmerwin/node-coveralls) from 3.0.11 to 3.0.13.
- [Release notes](https://github.com/nickmerwin/node-coveralls/releases)
- [Commits](https://github.com/nickmerwin/node-coveralls/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-22 05:47:10 +00:00
Ricardo Ambrogi
e521c53f2c Merge branch 'develop' into feature/platforms
# Conflicts:
#	yarn.lock
2020-04-21 12:06:49 +02:00
Ricardo Ambrogi
90376b44d9 Merge branch 'develop' into feature/platforms
# Conflicts:
#	yarn.lock
2020-04-21 12:04:37 +02:00
Ricardo Ambrogi
18b79b664e generate build for other targets 2020-04-21 11:57:35 +02:00
Ricardo Ambrogi
ad33e0b6db change eslint rule 2020-04-21 11:53:19 +02:00
Ricardo Ambrogi
036fa9340b Generate dist folder 2020-04-21 11:53:06 +02:00
Ricardo Ambrogi
1e2b2c2498 Add Platforms service 2020-04-21 11:52:47 +02:00
Ricardo Ambrogi
bae5db690e Merge pull request #401 from Adyen/dependabot/npm_and_yarn/typescript-eslint/parser-2.29.0
Bump @typescript-eslint/parser from 2.28.0 to 2.29.0
2020-04-21 07:55:28 +02:00
dependabot-preview[bot]
bab5c24d4d Bump @typescript-eslint/parser from 2.28.0 to 2.29.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.28.0 to 2.29.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.29.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-21 05:49:19 +00:00
Ricardo Ambrogi
8efe9b4fe4 Merge pull request #400 from Adyen/dependabot/npm_and_yarn/types/node-13.13.1
Bump @types/node from 13.13.0 to 13.13.1
2020-04-21 07:47:33 +02:00
dependabot-preview[bot]
1bb3c1f4ca Bump @types/node from 13.13.0 to 13.13.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.13.0 to 13.13.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-21 05:37:46 +00:00
Ricardo Ambrogi
323579492f Merge pull request #402 from Adyen/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-2.29.0
Bump @typescript-eslint/eslint-plugin from 2.28.0 to 2.29.0
2020-04-21 07:35:52 +02:00
dependabot-preview[bot]
563ebf3ad6 Bump @typescript-eslint/eslint-plugin from 2.28.0 to 2.29.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.28.0 to 2.29.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.29.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-21 05:30:42 +00:00
Ricardo Ambrogi
f00272cffd Merge pull request #396 from Adyen/dependabot/npm_and_yarn/types/node-13.13.0
Bump @types/node from 13.11.0 to 13.13.0
2020-04-20 09:53:03 +02:00
Ricardo Ambrogi
e5beed4179 Merge branch 'develop' into dependabot/npm_and_yarn/types/node-13.13.0 2020-04-20 09:51:33 +02:00
Ricardo Ambrogi
6b15e36158 Merge pull request #397 from Adyen/dependabot/npm_and_yarn/ts-loader-7.0.1
Bump ts-loader from 7.0.0 to 7.0.1
2020-04-20 09:46:02 +02:00
Ricardo Ambrogi
a0b2de3b27 fixed checkServerIdentity.spec.ts 2020-04-20 09:45:21 +02:00
dependabot-preview[bot]
f5bc92069b Bump ts-loader from 7.0.0 to 7.0.1
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v7.0.0...v7.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-20 07:37:17 +00:00
dependabot-preview[bot]
0c5df902d3 Bump @types/node from 13.11.0 to 13.13.0
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.11.0 to 13.13.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-20 07:37:08 +00:00
Ricardo Ambrogi
54cb4438f0 Merge pull request #395 from Adyen/dependabot/npm_and_yarn/release-it-13.5.4
Bump release-it from 13.5.2 to 13.5.4
2020-04-20 09:35:30 +02:00
dependabot-preview[bot]
cbd0a60702 Bump release-it from 13.5.2 to 13.5.4
Bumps [release-it](https://github.com/release-it/release-it) from 13.5.2 to 13.5.4.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.5.2...13.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-20 07:32:54 +00:00
Ricardo Ambrogi
da8012ac17 Merge pull request #394 from Adyen/dependabot/npm_and_yarn/ts-jest-25.4.0
Bump ts-jest from 25.3.1 to 25.4.0
2020-04-20 09:31:09 +02:00
dependabot-preview[bot]
96f730e8ae Bump ts-jest from 25.3.1 to 25.4.0
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 25.3.1 to 25.4.0.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v25.3.1...v25.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-20 07:18:28 +00:00
Ricardo Ambrogi
ddfe8b339a Merge pull request #398 from Adyen/dependabot/npm_and_yarn/jest-25.4.0
Bump jest from 25.3.0 to 25.4.0
2020-04-20 09:16:46 +02:00
dependabot-preview[bot]
9442f9a097 Bump jest from 25.3.0 to 25.4.0
Bumps [jest](https://github.com/facebook/jest) from 25.3.0 to 25.4.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.3.0...v25.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-20 05:31:23 +00:00
Ricardo Ambrogi
b1593dacc8 Merge pull request #393 from Adyen/dependabot/npm_and_yarn/ts-loader-7.0.0
Bump ts-loader from 6.2.2 to 7.0.0
2020-04-15 07:54:03 +02:00
dependabot-preview[bot]
6c739d0216 Bump ts-loader from 6.2.2 to 7.0.0
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 6.2.2 to 7.0.0.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v6.2.2...v7.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-15 05:36:40 +00:00
Ricardo Ambrogi
c7a359b5f0 Merge pull request #392 from Adyen/dependabot/npm_and_yarn/typescript-eslint/parser-2.28.0
Bump @typescript-eslint/parser from 2.27.0 to 2.28.0
2020-04-14 08:04:12 +02:00
dependabot-preview[bot]
2f40363fee Bump @typescript-eslint/parser from 2.27.0 to 2.28.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.27.0 to 2.28.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.28.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-14 05:39:49 +00:00
Ricardo Ambrogi
2b4260fcd0 Merge pull request #391 from Adyen/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-2.28.0
Bump @typescript-eslint/eslint-plugin from 2.27.0 to 2.28.0
2020-04-14 07:38:11 +02:00
dependabot-preview[bot]
37edd9c412 Bump @typescript-eslint/eslint-plugin from 2.27.0 to 2.28.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.27.0 to 2.28.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.28.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-14 05:34:57 +00:00
Ricardo Ambrogi
f56e632d7f Merge pull request #389 from Adyen/develop
Release v3.1.3
2020-04-09 14:00:37 +02:00
Ricardo Ambrogi
e22c7fa53c Update package.json 2020-04-09 13:55:39 +02:00
Ricardo Ambrogi
96e610db7f update workflow 2020-04-09 13:50:56 +02:00
Ricardo Ambrogi
9d461481dc Update package.json 2020-04-09 13:31:40 +02:00
Ricardo Ambrogi
2cd3e93dfd Update package.json 2020-04-09 13:29:35 +02:00
Ricardo Ambrogi
43207db52b Update npmpublish.yml 2020-04-09 13:25:47 +02:00
Ricardo Ambrogi
ffe6af1d97 Merge remote-tracking branch 'origin/master' into develop 2020-04-09 13:21:44 +02:00
Ricardo Ambrogi
b2a15bfd23 Merge branch 'develop' of github.com:Adyen/adyen-node-api-library into develop 2020-04-09 13:20:33 +02:00
Ricardo Ambrogi
d8e31a3262 Merge remote-tracking branch 'origin/master' into develop 2020-04-09 13:20:13 +02:00
Ricardo Ambrogi
155a9b0a96 Merge pull request #387 from Adyen/dependabot/npm_and_yarn/jest-25.3.0
Bump jest from 25.2.7 to 25.3.0
2020-04-09 08:14:00 +02:00
dependabot-preview[bot]
9229311175 Bump jest from 25.2.7 to 25.3.0
Bumps [jest](https://github.com/facebook/jest) from 25.2.7 to 25.3.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.2.7...v25.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-09 05:40:12 +00:00
Ricardo Ambrogi
724b9c8130 Merge pull request #384 from Adyen/dependabot/npm_and_yarn/release-it-13.5.2
Bump release-it from 13.5.1 to 13.5.2
2020-04-08 08:39:37 +02:00
dependabot-preview[bot]
31ce0ac330 Bump release-it from 13.5.1 to 13.5.2
Bumps [release-it](https://github.com/release-it/release-it) from 13.5.1 to 13.5.2.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.5.1...13.5.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-08 05:48:18 +00:00
Ricardo Ambrogi
91f0252d33 Merge pull request #383 from Adyen/dependabot/npm_and_yarn/typescript-eslint/parser-2.27.0
Bump @typescript-eslint/parser from 2.26.0 to 2.27.0
2020-04-07 08:40:28 +02:00
dependabot-preview[bot]
968c60de65 Bump @typescript-eslint/parser from 2.26.0 to 2.27.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.26.0 to 2.27.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.27.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-07 05:40:39 +00:00
Ricardo Ambrogi
608f4d9c69 Merge pull request #382 from Adyen/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-2.27.0
Bump @typescript-eslint/eslint-plugin from 2.26.0 to 2.27.0
2020-04-07 07:38:59 +02:00
dependabot-preview[bot]
969ff9c431 Bump @typescript-eslint/eslint-plugin from 2.26.0 to 2.27.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.26.0 to 2.27.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.27.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-07 05:33:42 +00:00
Ricardo Ambrogi
4bf7494989 Update npmpublish.yml 2020-04-06 12:35:39 +02:00
Ricardo Ambrogi
7f8170575f Merge pull request #380 from Adyen/develop
Release v3.1.2
2020-04-06 10:06:44 +00:00
Ricardo Ambrogi
756a59e31a Merge branch 'master' into develop 2020-04-06 09:54:33 +00:00
Ricardo Ambrogi
4013f70205 kind-of package fix 2020-04-06 11:53:48 +02:00
Ricardo Ambrogi
6858c8a599 Update package.json 2020-04-06 11:52:05 +02:00
Ricardo Ambrogi
2854236720 Hotfix/minimist security (#379)
* fix vulnerability

* fix acorn
2020-04-06 11:51:35 +02:00
dependabot-preview[bot]
3b95f067aa Bump ts-jest from 25.3.0 to 25.3.1 (#376)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 25.3.0 to 25.3.1.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v25.3.0...v25.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-06 08:45:06 +02:00
dependabot-preview[bot]
a621245ced Bump jest from 25.2.6 to 25.2.7 (#378)
Bumps [jest](https://github.com/facebook/jest) from 25.2.6 to 25.2.7.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.2.6...v25.2.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-06 08:18:57 +02:00
dependabot-preview[bot]
1ce8877d87 Bump @types/jest from 25.1.5 to 25.2.1 (#377)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.1.5 to 25.2.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-06 08:09:05 +02:00
dependabot-preview[bot]
964be24ba7 Bump @types/node from 13.9.8 to 13.11.0 (#373)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.9.8 to 13.11.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-03 08:13:22 +02:00
dependabot-preview[bot]
4bcfb1810f Bump jest from 25.2.4 to 25.2.6 (#374)
Bumps [jest](https://github.com/facebook/jest) from 25.2.4 to 25.2.6.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.2.4...v25.2.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-03 07:51:57 +02:00
dependabot-preview[bot]
b781030260 Bump @types/jest from 25.1.4 to 25.1.5 (#372)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.1.4 to 25.1.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-03 07:47:42 +02:00
dependabot-preview[bot]
fa767eea8e Bump release-it from 13.5.0 to 13.5.1 (#371)
Bumps [release-it](https://github.com/release-it/release-it) from 13.5.0 to 13.5.1.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.5.0...13.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-31 13:56:11 +02:00
Ricardo Ambrogi
f40092f94f Create stale.yml 2020-03-31 13:25:59 +02:00
dependabot-preview[bot]
2401b27dd4 Bump @types/node from 13.9.5 to 13.9.8 (#370)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.9.5 to 13.9.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-31 05:50:08 +02:00
dependabot-preview[bot]
d03fd6502d Bump @typescript-eslint/eslint-plugin from 2.25.0 to 2.26.0 (#366)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.25.0 to 2.26.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.26.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-31 05:37:05 +02:00
dependabot-preview[bot]
ebc72005e6 Bump @typescript-eslint/parser from 2.25.0 to 2.26.0 (#365)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.25.0 to 2.26.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.26.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-31 05:30:24 +02:00
dependabot-preview[bot]
57f3135dee Bump ts-jest from 25.2.1 to 25.3.0 (#364)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 25.2.1 to 25.3.0.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/25.2.1...v25.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-30 13:53:10 +02:00
dependabot-preview[bot]
b4e9e2f480 Bump jest from 25.2.3 to 25.2.4 (#362)
Bumps [jest](https://github.com/facebook/jest) from 25.2.3 to 25.2.4.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.2.3...v25.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-30 08:20:10 +02:00
dependabot-preview[bot]
9c21109c83 Bump release-it from 13.3.2 to 13.5.0 (#361)
Bumps [release-it](https://github.com/release-it/release-it) from 13.3.2 to 13.5.0.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.3.2...13.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-30 08:14:48 +02:00
dependabot-preview[bot]
64c086a760 Bump @types/node from 13.9.4 to 13.9.5 (#360)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.9.4 to 13.9.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-30 06:48:26 +02:00
Sam Cottle
e8f82c4a82 Update link to docs (#358)
Under Documentation, we only link to the API-only integration. But the library can also be used to integrate with the Drop-in and Components integrations.
2020-03-27 13:38:58 +01:00
dependabot-preview[bot]
86a551c06e Bump release-it from 13.3.1 to 13.3.2 (#355)
Bumps [release-it](https://github.com/release-it/release-it) from 13.3.1 to 13.3.2.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.3.1...13.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-27 07:41:03 +01:00
dependabot-preview[bot]
9272fff378 Bump jest from 25.2.1 to 25.2.3 (#357)
Bumps [jest](https://github.com/facebook/jest) from 25.2.1 to 25.2.3.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.2.1...v25.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-27 05:50:13 +01:00
dependabot-preview[bot]
520e73b57f Bump jest from 25.2.0 to 25.2.1 (#354)
Bumps [jest](https://github.com/facebook/jest) from 25.2.0 to 25.2.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.2.0...v25.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-26 13:14:19 +01:00
dependabot-preview[bot]
2291cfad85 Bump release-it from 13.3.0 to 13.3.1 (#352)
Bumps [release-it](https://github.com/release-it/release-it) from 13.3.0 to 13.3.1.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.3.0...13.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-26 07:33:23 +01:00
dependabot-preview[bot]
f3f9976e68 Bump jest from 25.1.0 to 25.2.0 (#353)
Bumps [jest](https://github.com/facebook/jest) from 25.1.0 to 25.2.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.1.0...v25.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-26 07:23:27 +01:00
dependabot-preview[bot]
d50f84b230 Bump @types/node from 13.9.3 to 13.9.4 (#351)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.9.3 to 13.9.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-25 11:49:53 +01:00
dependabot-preview[bot]
ffb236e9f8 Bump webpack from 4.42.0 to 4.42.1 (#350)
Bumps [webpack](https://github.com/webpack/webpack) from 4.42.0 to 4.42.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.42.0...v4.42.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-24 13:44:16 +01:00
dependabot-preview[bot]
937ddc5623 Bump @typescript-eslint/parser from 2.24.0 to 2.25.0 (#348)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.24.0 to 2.25.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.25.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-24 07:09:24 +01:00
dependabot-preview[bot]
6c38e717d7 Bump @typescript-eslint/eslint-plugin from 2.24.0 to 2.25.0 (#349)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.24.0 to 2.25.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.25.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-24 07:04:21 +01:00
dependabot-preview[bot]
204e68aa1e Bump release-it from 13.1.2 to 13.3.0 (#347)
Bumps [release-it](https://github.com/release-it/release-it) from 13.1.2 to 13.3.0.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.1.2...13.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-24 07:00:36 +01:00
dependabot-preview[bot]
caa7e3a311 Bump release-it from 13.1.1 to 13.1.2 (#344)
Bumps [release-it](https://github.com/release-it/release-it) from 13.1.1 to 13.1.2.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.1.1...13.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-23 07:11:19 +01:00
dependabot-preview[bot]
2f70fa2caf Bump @types/node from 13.9.2 to 13.9.3 (#345)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.9.2 to 13.9.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-23 06:56:43 +01:00
dependabot-preview[bot]
a26c04d99d Bump ts-loader from 6.2.1 to 6.2.2 (#346)
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v6.2.1...v6.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-23 06:41:40 +01:00
dependabot-preview[bot]
9ea38e7da8 Bump coveralls from 3.0.9 to 3.0.11 (#342)
Bumps [coveralls](https://github.com/nickmerwin/node-coveralls) from 3.0.9 to 3.0.11.
- [Release notes](https://github.com/nickmerwin/node-coveralls/releases)
- [Commits](https://github.com/nickmerwin/node-coveralls/compare/3.0.9...3.0.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-20 06:41:42 +01:00
dependabot-preview[bot]
dddf016c6c Bump @types/node from 13.9.1 to 13.9.2 (#340)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.9.1 to 13.9.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-19 06:38:08 +01:00
Ricardo Ambrogi
9d87c490d9 Adds distribution folder
Remove dist from .gitignore
2020-03-18 12:13:44 +01:00
Ricardo Ambrogi
a2db9a4ba1 adds dist 2020-03-18 12:08:36 +01:00
Ricardo Ambrogi
66042b92e7 Merge branch 'master' into develop 2020-03-18 12:06:14 +01:00
Ricardo Ambrogi
026ed69203 adds dist folder 2020-03-18 12:01:56 +01:00
Ricardo Ambrogi
a5264a1b40 Update README.md 2020-03-18 11:47:47 +01:00
Ricardo Ambrogi
30f895b758 Merge pull request #338 from Adyen/dependabot/npm_and_yarn/nock-12.0.3
Bump nock from 12.0.2 to 12.0.3
2020-03-17 16:18:35 +01:00
dependabot-preview[bot]
56e1805701 Bump nock from 12.0.2 to 12.0.3
Bumps [nock](https://github.com/nock/nock) from 12.0.2 to 12.0.3.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v12.0.2...v12.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-17 12:50:57 +00:00
Ricardo Ambrogi
ea771b274f Merge pull request #337 from Adyen/develop
Release v3.1.0
2020-03-17 12:55:41 +01:00
Ricardo Ambrogi
a55e9a5cf1 Release/3.1.0 (#336)
* Bundle type definitions with package

* drop support from node lt 10

* run tests on future versions and not only stable

* remove babel deps

* fix major release breaking change

* update api version

* mend

* update lib to v52
2020-03-17 12:49:07 +01:00
dependabot-preview[bot]
4f640a05ea Bump @typescript-eslint/parser from 2.23.0 to 2.24.0 (#333)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.23.0 to 2.24.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.24.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-17 06:28:50 +01:00
dependabot-preview[bot]
acaa98d100 Bump @typescript-eslint/eslint-plugin from 2.23.0 to 2.24.0 (#334)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.23.0 to 2.24.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.24.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-17 06:24:57 +01:00
dependabot-preview[bot]
4956c01bea Bump release-it from 13.0.2 to 13.1.1 (#332)
Bumps [release-it](https://github.com/release-it/release-it) from 13.0.2 to 13.1.1.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.0.2...13.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-15 08:30:58 +01:00
dependabot-preview[bot]
559b7fc224 [Security] Bump acorn from 6.2.1 to 6.4.1 (#331)
Bumps [acorn](https://github.com/acornjs/acorn) from 6.2.1 to 6.4.1. **This update includes a security fix.**
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.2.1...6.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-15 08:27:25 +01:00
dependabot-preview[bot]
1842ea21f2 Bump @types/node from 13.9.0 to 13.9.1 (#329)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.9.0 to 13.9.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-13 06:20:38 +01:00
dependabot-preview[bot]
d2472dd1f2 Bump @typescript-eslint/parser from 2.22.0 to 2.23.0 (#327)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.22.0 to 2.23.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.23.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-10 10:43:45 +01:00
dependabot-preview[bot]
1d957df35d Bump @typescript-eslint/eslint-plugin from 2.22.0 to 2.23.0 (#328)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.22.0 to 2.23.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.23.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-10 10:35:59 +01:00
dependabot-preview[bot]
79a518d133 Bump release-it from 13.0.1 to 13.0.2 (#326)
Bumps [release-it](https://github.com/release-it/release-it) from 13.0.1 to 13.0.2.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.0.1...13.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-10 10:30:21 +01:00
dependabot-preview[bot]
0b76d344ff Bump release-it from 13.0.0 to 13.0.1 (#325)
Bumps [release-it](https://github.com/release-it/release-it) from 13.0.0 to 13.0.1.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.0.0...13.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-09 14:01:31 +01:00
dependabot-preview[bot]
38c12702c9 Bump @types/node from 13.7.7 to 13.9.0 (#322)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.7 to 13.9.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-09 08:27:06 +01:00
dependabot-preview[bot]
9884955c71 Bump @types/jest from 25.1.3 to 25.1.4 (#323)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.1.3 to 25.1.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-09 08:12:39 +01:00
dependabot-preview[bot]
663a0c0ec7 Bump release-it from 12.6.3 to 13.0.0 (#324)
Bumps [release-it](https://github.com/release-it/release-it) from 12.6.3 to 13.0.0.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/12.6.3...13.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-09 08:09:18 +01:00
dependabot-preview[bot]
db34fc68c3 Bump release-it from 12.6.2 to 12.6.3 (#320)
Bumps [release-it](https://github.com/release-it/release-it) from 12.6.2 to 12.6.3.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/12.6.2...12.6.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-04 11:13:12 +01:00
dependabot-preview[bot]
aff2527194 Bump @typescript-eslint/parser from 2.21.0 to 2.22.0 (#319)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.21.0 to 2.22.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.22.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-03 08:13:58 +01:00
dependabot-preview[bot]
cf07545dda Bump @typescript-eslint/eslint-plugin from 2.21.0 to 2.22.0 (#318)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.21.0 to 2.22.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.22.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-03 08:09:12 +01:00
dependabot-preview[bot]
9c4ab30240 Bump webpack from 4.41.6 to 4.42.0 (#316)
Bumps [webpack](https://github.com/webpack/webpack) from 4.41.6 to 4.42.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.41.6...v4.42.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 13:58:46 +01:00
Ricardo Ambrogi
147cea2d5b Delete renovate.json 2020-03-02 12:44:43 +01:00
dependabot-preview[bot]
cd6a07f7bd Bump typescript from 3.8.2 to 3.8.3 (#311)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.8.2 to 3.8.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.8.2...v3.8.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 08:19:00 +01:00
dependabot-preview[bot]
6798edad03 Bump @types/node from 13.7.6 to 13.7.7 (#309)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.6 to 13.7.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 08:15:48 +01:00
dependabot-preview[bot]
b2f1c8b28b Bump nock from 12.0.1 to 12.0.2 (#314)
Bumps [nock](https://github.com/nock/nock) from 12.0.1 to 12.0.2.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v12.0.1...v12.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 08:11:45 +01:00
Ricardo Ambrogi
c0a494a4bd Github Action: Publish to NPM (#308)
* Github Action: Publish to NPM

* Delete .travis.yml

* Update nodejs.yml
2020-02-28 13:21:25 +01:00
WhiteSource Renovate
fc1769c30c Update dependency release-it to v12.6.2 (#307) 2020-02-28 10:37:05 +01:00
Ricardo Ambrogi
a6a9961679 Update README.md 2020-02-28 10:11:01 +01:00
Ricardo Ambrogi
93e1dde831 Update nodejs.yml 2020-02-28 10:09:07 +01:00
Ricardo Ambrogi
6b45af1cdb Github Action: Coveralls (#298)
* Create coveralls.yml

* Update .travis.yml

* Update package.json

* Update coveralls.yml

* Update coveralls.yml

* Update coveralls.yml

* Update coveralls.yml
2020-02-26 08:02:42 +01:00
Ricardo Ambrogi
a87b109f63 Github Action: Run tests (#295)
* Create nodejs.yml

* Update .travis.yml

* Update httpClient.spec.ts
2020-02-26 08:00:29 +01:00
dependabot-preview[bot]
5d08dded6e Bump @types/node from 13.7.4 to 13.7.6 (#306)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.4 to 13.7.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-26 07:55:45 +01:00
dependabot-preview[bot]
7fd8e5dbb0 Bump @typescript-eslint/parser from 2.20.0 to 2.21.0 (#301)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.20.0 to 2.21.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.21.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-25 08:18:40 +01:00
dependabot-preview[bot]
bf0d3b8457 Bump @typescript-eslint/eslint-plugin from 2.20.0 to 2.21.0 (#302)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.20.0 to 2.21.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.21.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-25 08:07:14 +01:00
dependabot-preview[bot]
da87e71c9f Bump release-it from 12.6.0 to 12.6.1 (#300)
Bumps [release-it](https://github.com/release-it/release-it) from 12.6.0 to 12.6.1.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/12.6.0...12.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-24 06:19:45 +01:00
dependabot-preview[bot]
6797c684f9 Bump typescript from 3.7.5 to 3.8.2 (#297)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.7.5 to 3.8.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-21 06:22:26 +01:00
dependabot-preview[bot]
95260f0499 Bump release-it from 12.5.0 to 12.6.0 (#294)
Bumps [release-it](https://github.com/release-it/release-it) from 12.5.0 to 12.6.0.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/12.5.0...12.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-20 15:42:47 +01:00
dependabot-preview[bot]
9e35478973 Bump @types/jest from 25.1.2 to 25.1.3 (#291)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.1.2 to 25.1.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-20 08:57:16 +01:00
dependabot-preview[bot]
25aeee2076 Bump @types/node from 13.7.2 to 13.7.4 (#290)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.2 to 13.7.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-20 08:22:10 +01:00
dependabot-preview[bot]
5435669388 Bump nock from 12.0.0 to 12.0.1 (#287)
Bumps [nock](https://github.com/nock/nock) from 12.0.0 to 12.0.1.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v12.0.0...v12.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-20 08:12:58 +01:00
WhiteSource Renovate
eeb963d36f Update dependency ts-jest to v25.2.1 (#286) 2020-02-19 09:43:50 +01:00
dependabot-preview[bot]
f39932208d Bump @types/node from 13.7.1 to 13.7.2 (#285)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.1 to 13.7.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-19 05:30:08 +01:00
dependabot-preview[bot]
25ea679283 Bump release-it from 12.4.3 to 12.5.0 (#283)
Bumps [release-it](https://github.com/release-it/release-it) from 12.4.3 to 12.5.0.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/12.4.3...12.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-18 11:12:37 +01:00
dependabot-preview[bot]
07ca079203 Bump @typescript-eslint/parser from 2.19.2 to 2.20.0 (#278)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.19.2 to 2.20.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.20.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-18 05:37:08 +01:00
dependabot-preview[bot]
63f95a5002 Bump @typescript-eslint/eslint-plugin from 2.19.2 to 2.20.0 (#280)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.19.2 to 2.20.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.20.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-18 05:26:13 +01:00
dependabot-preview[bot]
3b5e3d121d Bump nock from 11.9.0 to 12.0.0 (#276)
Bumps [nock](https://github.com/nock/nock) from 11.9.0 to 12.0.0.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v11.9.0...v12.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-17 08:46:46 +01:00
dependabot-preview[bot]
ac601cff87 Bump nock from 11.8.2 to 11.9.0 (#272)
Bumps [nock](https://github.com/nock/nock) from 11.8.2 to 11.9.0.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v11.8.2...v11.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-14 08:08:16 +01:00
dependabot-preview[bot]
1c8f750ff1 Bump webpack-cli from 3.3.10 to 3.3.11 (#270)
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 3.3.10 to 3.3.11.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/next/CHANGELOG_v3.md)
- [Commits](https://github.com/webpack/webpack-cli/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-12 08:37:37 +01:00
dependabot-preview[bot]
35e870c150 Bump @types/node from 13.7.0 to 13.7.1 (#269)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.0 to 13.7.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-11 18:47:35 +01:00
dependabot-preview[bot]
ee902f97c1 Bump webpack from 4.41.5 to 4.41.6 (#267)
Bumps [webpack](https://github.com/webpack/webpack) from 4.41.5 to 4.41.6.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.41.5...v4.41.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-11 13:10:00 +01:00
dependabot-preview[bot]
3b328c54c8 Bump @typescript-eslint/eslint-plugin from 2.19.0 to 2.19.2 (#263)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.19.0 to 2.19.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.19.2/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-11 08:11:24 +01:00
dependabot-preview[bot]
14c6a71fe9 Bump @typescript-eslint/parser from 2.19.0 to 2.19.2 (#264)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.19.0 to 2.19.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.19.2/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-11 06:51:33 +01:00
Ricardo Ambrogi
e53550df2a Hotfix/https proxy agent (#259)
* fix https-proxy-agent major release breaking change
2020-02-10 11:01:30 +01:00
dependabot-preview[bot]
97db576e1f Bump nock from 11.7.2 to 11.8.2 (#258)
Bumps [nock](https://github.com/nock/nock) from 11.7.2 to 11.8.2.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v11.7.2...v11.8.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 07:33:55 +01:00
Ricardo Ambrogi
be0a10bd40 Update CODEOWNERS 2020-02-07 12:46:32 +01:00
dependabot-preview[bot]
7556858aee Bump @types/jest from 25.1.1 to 25.1.2 (#253)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.1.1 to 25.1.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-07 08:30:48 +01:00
dependabot-preview[bot]
3cb0f91ac1 Bump @typescript-eslint/parser from 2.18.0 to 2.19.0 (#249)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.18.0 to 2.19.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.19.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 09:58:04 +01:00
dependabot-preview[bot]
10e06c2edb Bump @types/nock from 10.0.3 to 11.1.0 (#251)
Bumps [@types/nock](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/nock) from 10.0.3 to 11.1.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/nock)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 09:11:48 +01:00
dependabot-preview[bot]
1f10c5e4bf Bump @typescript-eslint/eslint-plugin from 2.18.0 to 2.19.0 (#250)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.18.0 to 2.19.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.19.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 07:45:07 +01:00
dependabot-preview[bot]
fd437777e4 Bump jest from 24.9.0 to 25.1.0 (#248)
Bumps [jest](https://github.com/facebook/jest) from 24.9.0 to 25.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v24.9.0...v25.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 07:34:58 +01:00
WhiteSource Renovate
9ae07636c7 Update dependency ts-jest to v25.2.0 (#247) 2020-02-04 05:42:38 +01:00
WhiteSource Renovate
4f688db18e Update dependency @types/node to v13.7.0 (#244) 2020-02-03 08:35:07 +01:00
WhiteSource Renovate
816e10de41 Update dependency @types/node to v13.5.3 (#243) 2020-01-31 08:38:28 +01:00
WhiteSource Renovate
f7dd296d3b Update babel monorepo to v7.8.4 (#242) 2020-01-30 14:01:17 +01:00
WhiteSource Renovate
412cf2f739 Update dependency ts-jest to v25.1.0 (#241) 2020-01-30 10:04:28 +01:00
WhiteSource Renovate
c86597eee6 Update dependency @types/node to v13.5.2 (#240) 2020-01-30 08:03:49 +01:00
WhiteSource Renovate
b03ab5b822 Update dependency @types/jest to v25.1.1 (#239) 2020-01-30 07:50:35 +01:00
Ricardo Ambrogi
c18ed88e2e Remove babel dep (#235)
* remove babel deps
2020-01-30 07:34:21 +01:00
WhiteSource Renovate
b26fde99b5 Update dependency @types/jest to v25 (#237) 2020-01-29 14:25:44 +01:00
WhiteSource Renovate
7045ad97c2 Update typescript-eslint monorepo to v2.18.0 (#236)
Co-authored-by: Rik ter Beek <rikterbeek@users.noreply.github.com>
2020-01-29 11:41:36 +01:00
WhiteSource Renovate
18d1d362ee Update dependency @types/node to v13.5.1 (#238) 2020-01-29 08:33:26 +01:00
Ricardo Ambrogi
e20b5146d7 Hotfix/node v10 (#234)
* Bundle type definitions with package

* drop support from node lt 10

* run tests on future versions and not only stable
2020-01-27 14:07:59 +01:00
Felix Trepanier
9aa31b0278 Put @types/jest dependency in devDependencies (#233)
* Put @types/jest dependency in devDependencies

* Update package.json

Co-authored-by: Ricardo Ambrogi <ricardo.ambrogi@gmail.com>
2020-01-27 09:57:07 +01:00
WhiteSource Renovate
a86bc8b9a8 Update dependency @types/jest to v24.9.1 (#231) 2020-01-24 11:25:32 +01:00
WhiteSource Renovate
f2f3571928 Update dependency @types/node to v13.5.0 (#232) 2020-01-24 09:06:53 +01:00
WhiteSource Renovate
9615e66444 Update dependency ts-jest to v25 (#230) 2020-01-23 09:31:25 +01:00
Alexandru Aldulea
199c47568d added requestOptions to paymentDetails (#228)
Co-authored-by: Ricardo Ambrogi <ricardo.ambrogi@gmail.com>
2020-01-22 10:12:04 +01:00
WhiteSource Renovate
4bdc49e3b5 Update dependency @types/node to v13.1.8 (#226)
Co-authored-by: Ricardo Ambrogi <ricardo.ambrogi@gmail.com>
2020-01-21 15:08:43 +01:00
WhiteSource Renovate
880298d03e Update typescript-eslint monorepo to v2.17.0 (#227) 2020-01-21 10:02:07 +01:00
WhiteSource Renovate
1099081ea3 Update dependency typescript to v3.7.5 (#224) 2020-01-17 13:37:57 +01:00
Ricardo Ambrogi
bd8fa55cef Merge pull request #225 from Adyen/develop
Release v2.2.1
2020-01-17 13:33:11 +01:00
Ricardo Ambrogi
6d9b17609c Merge branch 'master' into develop 2020-01-17 11:06:00 +01:00
Ricardo Ambrogi
7f5f8cf2a2 fix ts imports (#223) 2020-01-17 11:04:07 +01:00
WhiteSource Renovate
6fbbff62fa Update dependency @types/jest to v24.9.0 (#222) 2020-01-15 11:39:29 +01:00
WhiteSource Renovate
2733ba9302 Update dependency @types/node to v13.1.7 (#221) 2020-01-15 09:54:33 +01:00
WhiteSource Renovate
2e9e50bcc0 Update babel monorepo to v7.8.3 (#220) 2020-01-14 10:12:05 +01:00
WhiteSource Renovate
e11bdc2f93 Update typescript-eslint monorepo to v2.16.0 (#218) 2020-01-14 09:42:46 +01:00
WhiteSource Renovate
05b06709f3 Update babel monorepo (#217) 2020-01-13 10:02:45 +01:00
Ricardo Ambrogi
043c166fa6 clean code (#216) 2020-01-10 11:26:23 +01:00
WhiteSource Renovate
edb56e3a2a Update dependency @types/node to v13.1.6 (#215) 2020-01-10 09:11:37 +01:00
Renovate Bot
d775655d86 Update dependency @types/node to v13.1.5 (#214) 2020-01-09 11:32:34 +01:00
Renovate Bot
5a8d3f0147 Update dependency nock to v11.7.2 (#213) 2020-01-09 09:47:21 +01:00
Ricardo Ambrogi
04747ce27f Release v2.2.0
- Update: API type definitions (#176)
- Feature: Adds paymentLinks service (#209)
2020-01-08 15:59:40 +01:00
Ricardo Ambrogi
ef269b7ab1 update endpoint version (#212) 2020-01-08 14:03:23 +01:00
Ricardo Ambrogi
4fbc665977 use grouped type definitions (#210) 2020-01-08 12:10:03 +01:00
Ricardo Ambrogi
99edca9ad8 Update package.json
Co-Authored-By: Alessio Zampatti <alessio.zampatti@adyen.com>
2020-01-08 10:27:41 +01:00
Ricardo Ambrogi
5e39f22b27 Merge remote-tracking branch 'origin/master' into develop 2020-01-07 15:22:11 +01:00
Ricardo Ambrogi
77d1175be1 Node API Library v2.2.0 2020-01-07 15:17:54 +01:00
Ricardo Ambrogi
395957d996 [PW-1980] Adds paymentLinks service (#209)
* Adds paymentLinks service

* Update typescript models
2020-01-07 10:28:40 +01:00
Renovate Bot
a9542bd568 Update typescript-eslint monorepo to v2.15.0 (#206) 2020-01-07 07:36:02 +01:00
Renovate Bot
bf4648af0f Update dependency ts-jest to v24.3.0 (#207) 2020-01-07 07:34:57 +01:00
Renovate Bot
6208bd4b72 Update dependency @types/node to v11.15.4 (#205) 2020-01-06 08:31:09 +01:00
Renovate Bot
68431357b8 Update dependency nock to v11.7.1 (#204) 2020-01-03 07:53:02 +01:00
Renovate Bot
14dc2285bc Update typescript-eslint monorepo to v2.14.0 (#203) 2019-12-31 08:36:33 +01:00
Renovate Bot
75d056c1b1 Update dependency webpack to v4.41.5 (#202) 2019-12-30 08:47:45 +01:00
dependabot[bot]
7ca2c61b1a Bump handlebars from 4.1.2 to 4.5.3 (#201)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.2 to 4.5.3.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.2...v4.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2019-12-27 12:22:14 +01:00
Renovate Bot
bb3874fc9c Update dependency @types/jest to v24.0.25 (#200) 2019-12-27 10:09:39 +01:00
Renovate Bot
6377fe9f4d Update typescript-eslint monorepo to v2.13.0 (#199) 2019-12-24 07:33:10 +01:00
Renovate Bot
d2581b491c Update dependency eslint to v6.8.0 (#197) 2019-12-22 17:36:50 +01:00
Renovate Bot
52ce784767 Update dependency typescript to v3.7.4 (#198) 2019-12-22 17:36:22 +01:00
Renovate Bot
e69d27fa30 Update dependency webpack to v4.41.4 (#196) 2019-12-19 10:05:51 +01:00
Renovate Bot
62497d123c Update babel monorepo to v7.7.7 (#195) 2019-12-19 07:34:54 +01:00
Renovate Bot
5135a538e0 Update dependency @types/jest to v24.0.24 (#194) 2019-12-18 20:36:58 +01:00
Ricardo Ambrogi
54e7b903bf add application info to sale to acquirer data (#192)
* add application info to sale to acquirer data

* set app info if it doesnt exist
2019-12-18 20:36:30 +01:00
Renovate Bot
6ad466654a Update typescript-eslint monorepo to v2.12.0 (#193) 2019-12-17 09:37:04 +01:00
Renovate Bot
d9457857cb Update dependency webpack to v4.41.3 (#191) 2019-12-16 10:44:29 +01:00
Ricardo Ambrogi
cbfccd9d05 Update README.md 2019-12-11 12:44:37 +01:00
Renovate Bot
2ca3321605 Update dependency https-proxy-agent to v4 (#190) 2019-12-11 08:37:02 +01:00
Renovate Bot
53546d639e Update typescript-eslint monorepo to v2.11.0 (#189) 2019-12-10 09:38:35 +01:00
Renovate Bot
732752ee61 Update babel monorepo (#188) 2019-12-09 07:35:04 +01:00
Renovate Bot
cb7dace017 Update dependency typescript to v3.7.3 (#187) 2019-12-04 09:59:38 +01:00
Renovate Bot
11b21d03c2 Update typescript-eslint monorepo to v2.10.0 (#186) 2019-12-03 07:33:39 +01:00
Renovate Bot
4294caac37 Update dependency eslint to v6.7.2 (#185) 2019-12-01 10:45:51 +01:00
Renovate Bot
7626667f99 Update dependency coveralls to v3.0.9 (#184) 2019-11-27 07:35:02 +01:00
Renovate Bot
554f8c8a01 Update dependency @types/node to v11.15.3 (#183) 2019-11-26 08:16:59 +01:00
Renovate Bot
4c528dbe71 Update typescript-eslint monorepo to v2.9.0 (#182) 2019-11-26 08:10:36 +01:00
Renovate Bot
0db48543f5 Update dependency ts-jest to v24.2.0 (#179) 2019-11-25 08:09:26 +01:00
Renovate Bot
02796824cc Update dependency eslint to v6.7.1 (#180) 2019-11-25 08:09:12 +01:00
Renovate Bot
a5259a443c Update babel monorepo to v7.7.4 (#181) 2019-11-25 08:08:58 +01:00
Renovate Bot
4fe9e4f6a0 Pin dependencies (#178) 2019-11-22 14:14:05 +01:00
Ricardo Ambrogi
9f7d71759d v2.1.8 (#177)
* Update dependency webpack-cli to v3.3.10 (#163)

* Update dependency @types/node to v11.15.2 (#162)

* Update dependency nock to v11.7.0 (#164)

* Update typescript-eslint monorepo to v2.6.1 (#165)

* Update babel monorepo to v7.7.0 (#166)

* Update babel monorepo to v7.7.1 (#167)

* Update dependency typescript to v3.7.2 (#168)

* Update dependency @types/jest to v24.0.22 (#169)

* Update babel monorepo to v7.7.2 (#170)

* Update typescript-eslint monorepo to v2.7.0 (#171)

* Update dependency @types/jest to v24.0.23 (#172)

* New contribution guidelines

Updated README.md and added CONTRIBUTING.md

* Update typescript-eslint monorepo to v2.8.0 (#174)

* Create nodejs.yml

* Delete nodejs.yml

* Update dependency coveralls to v3.0.8 (#175)

* Update API type definitions (#176)
2019-11-22 13:38:32 +01:00
Ricardo Ambrogi
9d98388b2a Merge branch 'master' into develop 2019-11-22 09:10:19 +01:00
Ricardo Ambrogi
5d31670290 Update API type definitions (#176) 2019-11-22 09:08:50 +01:00
Renovate Bot
bdc7336b2f Update dependency coveralls to v3.0.8 (#175) 2019-11-21 10:14:55 +01:00
Ricardo Ambrogi
99a9b58528 Delete nodejs.yml 2019-11-19 13:42:11 +01:00
Ricardo Ambrogi
0a2fcda73a Create nodejs.yml 2019-11-19 13:40:24 +01:00
Renovate Bot
fa19242b0c Update typescript-eslint monorepo to v2.8.0 (#174) 2019-11-19 07:41:42 +01:00
Grant
5f7ad68339 New contribution guidelines
Updated README.md and added CONTRIBUTING.md
2019-11-18 14:20:44 +01:00
Renovate Bot
439e95b2f3 Update dependency @types/jest to v24.0.23 (#172) 2019-11-13 10:36:41 +01:00
Renovate Bot
af9bbc5630 Update typescript-eslint monorepo to v2.7.0 (#171) 2019-11-12 08:40:55 +01:00
Renovate Bot
5f7a9b3611 Update babel monorepo to v7.7.2 (#170) 2019-11-07 07:37:51 +01:00
Renovate Bot
a2447c6a09 Update dependency @types/jest to v24.0.22 (#169) 2019-11-06 09:39:44 +01:00
Renovate Bot
0a4349b86d Update dependency typescript to v3.7.2 (#168) 2019-11-06 07:36:20 +01:00
Renovate Bot
43556da382 Update babel monorepo to v7.7.1 (#167) 2019-11-06 07:35:48 +01:00
Renovate Bot
b8062f7a94 Update babel monorepo to v7.7.0 (#166) 2019-11-05 12:16:08 +01:00
Renovate Bot
2990f71d11 Update typescript-eslint monorepo to v2.6.1 (#165) 2019-11-05 08:07:14 +01:00
Renovate Bot
fbe374e394 Update dependency nock to v11.7.0 (#164) 2019-11-01 10:34:35 +01:00
Renovate Bot
5b28d9d806 Update dependency @types/node to v11.15.2 (#162) 2019-10-31 08:30:27 +01:00
Renovate Bot
d4891fe97d Update dependency webpack-cli to v3.3.10 (#163) 2019-10-31 08:08:51 +01:00
Ricardo Ambrogi
5be7c38302 Release v2.1.7 2019-10-30 10:46:13 +01:00
Ricardo Ambrogi
fabd41584e Merge branch 'master' into develop 2019-10-30 08:21:38 +01:00
Ricardo Ambrogi
98a7741107 Update package.json 2019-10-30 08:20:58 +01:00
Renovate Bot
b06c2ccf1b Update dependency @types/jest to v24.0.21 (#160) 2019-10-30 08:15:45 +01:00
Ricardo Ambrogi
158843ec69 Hotfix/notification typing (#158)
* fix NotificationRequestItem casing
2019-10-29 08:08:27 +01:00
Renovate Bot
4b2f875c7a Update typescript-eslint monorepo to v2.6.0 (#159) 2019-10-29 08:08:05 +01:00
Ricardo Ambrogi
675377448a Update CODEOWNERS 2019-10-28 12:45:11 +01:00
Ricardo Ambrogi
3e1042b4ce Update CODEOWNERS 2019-10-28 12:37:25 +01:00
Renovate Bot
d9afdd2fe9 Update dependency eslint to v6.6.0 (#155) 2019-10-27 08:51:27 +01:00
Renovate Bot
cb2c7d9872 Update dependency @types/jest to v24.0.20 (#156) 2019-10-27 08:51:13 +01:00
Renovate Bot
30caa5a3c2 Update dependency @types/node to v11.15.0 (#154) 2019-10-25 09:00:55 +02:00
Renovate Bot
93f25fd687 Update dependency nock to v11.6.0 (#153) 2019-10-25 09:00:42 +02:00
Renovate Bot
5e09e336bc Update dependency https-proxy-agent to v3.0.1 (#151) 2019-10-24 08:10:28 +02:00
Renovate Bot
1dff362706 Update dependency @types/node to v11.13.23 (#152) 2019-10-24 08:10:05 +02:00
Renovate Bot
76e6904b89 Update dependency ts-loader to v6.2.1 (#150) 2019-10-23 08:33:16 +02:00
Renovate Bot
d2819aa9e2 Update dependency nock to v11.5.0 (#149) 2019-10-23 08:33:05 +02:00
Ricardo Ambrogi
409f1fd405 Release v2.1.6 2019-10-23 08:21:14 +02:00
Ricardo Ambrogi
b81e4a4e41 fix types with invalid syntax (#147) 2019-10-22 13:23:11 +02:00
Ricardo Ambrogi
5594ff573c Merge branch 'master' into develop 2019-10-22 13:17:21 +02:00
Ricardo Ambrogi
fff61d8eb7 fix types with invalid syntax (#147) 2019-10-22 13:16:37 +02:00
Ricardo Ambrogi
15eddcbac2 Merge pull request #146 from Adyen/develop
v2.1.6
2019-10-22 12:49:03 +02:00
Ricardo Ambrogi
0288acd7a3 Merge branch 'master' into develop 2019-10-22 12:42:45 +02:00
Renovate Bot
98b55e9438 Update typescript-eslint monorepo to v2.5.0 (#145) 2019-10-22 08:10:00 +02:00
Renovate Bot
fae77fc1ca Update dependency webpack to v4.41.2 (#144) 2019-10-15 15:18:03 +02:00
Ricardo Ambrogi
36f5d7e920 Create CODEOWNERS (#143)
* Create CODEOWNERS

* Update CODEOWNERS
2019-10-15 10:42:08 +02:00
Renovate Bot
ff993a2e8d Update dependency @types/jest to v24.0.19 (#142) 2019-10-15 08:10:12 +02:00
Renovate Bot
e5f60ecfed Update dependency webpack to v4.41.1 (#140) 2019-10-11 15:34:01 +02:00
Renovate Bot
0d95a73f41 Update dependency coveralls to v3.0.7 (#139) 2019-10-11 11:23:21 +02:00
Renovate Bot
5ebf1966f2 Update dependency @babel/core to v7.6.4 (#138) 2019-10-11 11:23:07 +02:00
Renovate Bot
63e6e1979c Update dependency typescript to v3.6.4 (#137) 2019-10-10 10:45:26 +02:00
Renovate Bot
7231957e37 Update babel monorepo to v7.6.3 (#136) 2019-10-09 08:07:44 +02:00
Renovate Bot
074a9d708d Update dependency release-it to v12.4.3 (#135) 2019-10-09 08:07:32 +02:00
Ricardo Ambrogi
c0d6257573 Update API types version (#134) 2019-10-09 08:07:20 +02:00
Renovate Bot
8e3cb93756 Update dependency https-proxy-agent to v3 (#133) 2019-10-08 11:42:51 +02:00
Renovate Bot
427427619d Update typescript-eslint monorepo to v2.3.3 (#132) 2019-10-08 11:42:20 +02:00
Renovate Bot
2463523aaf Update dependency nock to v11.4.0 (#131) 2019-10-08 11:42:10 +02:00
Renovate Bot
0128f5f89a Update dependency nock to v11.3.6 (#129) 2019-10-07 08:41:22 +02:00
Renovate Bot
3799f21851 Update dependency @types/node to v11.13.22 (#128) 2019-10-04 15:04:06 +02:00
Renovate Bot
1bd4829b7a Update dependency release-it to v12.4.2 (#127) 2019-10-02 09:28:45 +02:00
Renovate Bot
eb6577bb7c Update typescript-eslint monorepo to v2.3.2 (#125) 2019-10-01 14:25:30 +02:00
Renovate Bot
b7e14948ad Update dependency eslint to v6.5.1 (#126) 2019-10-01 14:25:20 +02:00
Ricardo Ambrogi
b70dc70070 Update README.md 2019-10-01 14:25:01 +02:00
Renovate Bot
97f9a5a3bc Update dependency eslint to v6.5.0 (#123) 2019-09-30 08:21:38 +02:00
Renovate Bot
68822e485a Update dependency ts-loader to v6.2.0 (#124) 2019-09-30 08:21:27 +02:00
Ricardo Ambrogi
1ff792277a Merge pull request #122 from Adyen/develop
Remove unused type
2019-09-27 09:17:58 +02:00
Ricardo Ambrogi
097a6c423b Remove unused type 2019-09-27 08:52:29 +02:00
Ricardo Ambrogi
842fe1a50b Merge pull request #118 from Adyen/develop
v2.1.5 release
2019-09-27 08:42:04 +02:00
Renovate Bot
11728b3db5 Update dependency @types/node to v11.13.21 (#120) 2019-09-25 08:31:47 +02:00
Renovate Bot
c171f7b674 Update dependency webpack to v4.41.0 (#119) 2019-09-25 08:31:39 +02:00
Renovate Bot
431297593f Update babel monorepo to v7.6.2 (#117) 2019-09-25 08:31:23 +02:00
Ricardo Ambrogi
0af9e8b589 Merge branch 'master' into develop 2019-09-24 15:15:23 +02:00
KadoBOT
71fd431c46 Release 2.1.5 2019-09-24 13:12:19 +00:00
KadoBOT
170685f6c4 change release-it run script 2019-09-24 13:10:13 +00:00
Renovate Bot
f6a1716714 Update typescript-eslint monorepo to v2.3.1 (#116) 2019-09-24 14:45:39 +02:00
Renovate Bot
b3dc185851 Pin dependency release-it to 12.4.1 (#115) 2019-09-24 14:45:26 +02:00
Ricardo Ambrogi
57e3dccb11 adds release-it (#114) 2019-09-23 16:02:03 +02:00
Renovate Bot
9a194e7752 Update dependency nock to v11.3.5 (#111) 2019-09-23 10:58:33 +02:00
Renovate Bot
7e76d1b4c8 Update dependency ts-loader to v6.1.2 (#112) 2019-09-23 08:24:14 +02:00
Hans Otto Wirtz
e5b8b70ecd Fix escaping in HMAC Validator (#113)
* Fix escaping in HMAC Validator

Previously, when using a DataToSign object with a `shipBeforeDate`, the date would be escaped incorrectly.
`2019-09-21T11:45:24.637Z` should become `2019-09-21T11\:45\:24.637Z`, but became `2019-09-21T11\:45:24.637Z` as only the first `:` would be escaped.

* Add test for hmac date string escaping
2019-09-23 08:24:00 +02:00
Renovate Bot
90f0e664b9 Update dependency ts-loader to v6.1.1 (#110) 2019-09-20 09:52:13 +02:00
Renovate Bot
f87c525cf8 Update dependency webpack-cli to v3.3.9 (#109) 2019-09-17 10:28:44 +02:00
Renovate Bot
61ef73c0d1 Update typescript-eslint monorepo to v2.3.0 (#108) 2019-09-17 10:27:17 +02:00
Renovate Bot
d89f0974a5 Update dependency eslint to v6.4.0 (#107) 2019-09-16 08:38:47 +02:00
Renovate Bot
282fc30e28 Update dependency webpack to v4.40.2 (#106) 2019-09-16 08:38:33 +02:00
Renovate Bot
8c635a7855 Update dependency webpack to v4.40.1 (#104) 2019-09-13 15:31:46 +02:00
Renovate Bot
edbdd6cc7d Update dependency nock to v11.3.4 (#105) 2019-09-13 15:31:31 +02:00
Renovate Bot
2f5408d436 Update dependency ts-loader to v6.1.0 (#103) 2019-09-12 09:50:22 +02:00
Renovate Bot
3ea6181d91 Update dependency typescript to v3.6.3 (#102) 2019-09-12 09:39:06 +02:00
Ricardo Ambrogi
5d02fc148b DRY (#101)
* DRY

* shortened logic
2019-09-11 08:26:16 +02:00
Ricardo Ambrogi
8acd312ab0 Update README.md 2019-09-10 15:24:16 +02:00
Renovate Bot
f1e3848439 Update typescript-eslint monorepo to v2.2.0 (#100) 2019-09-10 09:15:27 +02:00
Ricardo Ambrogi
dd56326255 remove unnecessary cast 2019-09-09 13:34:52 +02:00
Ricardo Ambrogi
0d6406694b Update .sonarcloud.properties 2019-09-09 13:29:42 +02:00
Ricardo Ambrogi
5742a463ae Create .sonarcloud.properties 2019-09-09 13:15:49 +02:00
Renovate Bot
7c49bc466b Update babel monorepo to v7.6.0 (#99) 2019-09-09 08:48:42 +02:00
Renovate Bot
ffa63e8204 Update dependency nock to v11.3.3 (#98) 2019-09-09 08:48:28 +02:00
Renovate Bot
91f38e0272 Update dependency webpack-cli to v3.3.8 (#97) 2019-09-09 08:48:06 +02:00
Ricardo Ambrogi
7cd93d6512 Pw 1662/payment methods v49 (#95)
* remove examples

* improve http client error handling

* add brand
2019-09-03 09:47:12 +02:00
Renovate Bot
0facfe2419 Update typescript-eslint monorepo to v2.1.0 (#96) 2019-09-03 08:39:22 +02:00
Renovate Bot
37f6085d24 Update dependency eslint to v6.3.0 (#94) 2019-09-02 10:00:05 +02:00
Renovate Bot
437c062788 Update dependency @types/node to v11.13.20 (#93) 2019-08-30 08:50:44 +02:00
Renovate Bot
780fb5bbf1 Update dependency typescript to v3.6.2 (#92) 2019-08-30 08:50:32 +02:00
Renovate Bot
db6716a85a Update dependency webpack to v4.39.3 (#91) 2019-08-28 15:44:23 +02:00
Marcos Garcia
9e6c216aae PW-1507: Add merchantName on ThreeDS2RequestData model (#90) 2019-08-26 15:36:45 +02:00
Renovate Bot
7d3b2731f6 Update dependency eslint to v6.2.2 (#89) 2019-08-26 08:45:21 +02:00
Renovate Bot
b1fd794054 Update dependency nock to v11.3.2 (#88) 2019-08-26 08:45:01 +02:00
Renovate Bot
af80b86594 Update dependency nock to v11.3.1 (#87) 2019-08-23 08:41:58 +02:00
Renovate Bot
fc5010078b Update dependency eslint to v6.2.1 (#86) 2019-08-22 10:56:20 +02:00
Ricardo Ambrogi
5385ca5bb6 Release v2.1.4 2019-08-20 11:58:25 +02:00
Renovate Bot
87f87d0181 Update dependency @types/jest to v24.0.18 (#82) 2019-08-20 11:53:08 +02:00
Renovate Bot
42b71d41a2 Update dependency nock to v11.3.0 (#83) 2019-08-20 11:52:53 +02:00
Ricardo Ambrogi
ec0e711fd8 Merge branch 'master' into develop 2019-08-20 11:52:04 +02:00
Ricardo Ambrogi
a61f51d43b Release v2.1.4 2019-08-20 11:51:16 +02:00
Ricardo Ambrogi
5b8c2b2ff8 fix exception handler in http client (#84) 2019-08-20 11:50:42 +02:00
515 changed files with 52461 additions and 17025 deletions

View File

@@ -1,22 +0,0 @@
{
"presets": [
"@babel/env",
[
"@babel/preset-typescript",
{
"targets": {
"node": "current"
}
}
]
],
"plugins": [
"@babel/proposal-class-properties",
"@babel/proposal-object-rest-spread"
],
"env": {
"test": {
"plugins": ["@babel/plugin-transform-runtime"]
}
}
}

View File

@@ -1,3 +1,22 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
const path = require('path');
module.exports = {
@@ -23,7 +42,8 @@ module.exports = {
],
rules: {
quotes: ["error", "double"],
semi: ["error", "always"]
semi: ["error", "always"],
"@typescript-eslint/no-non-null-assertion": 0
},
overrides: [
{

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* @KadoBOT @zaiddreakh @maassenbas @msilvagarcia @AlexandrosMor

7
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,7 @@
**Description**
<!-- Please provide a description of the changes proposed in the Pull Request -->
**Tested scenarios**
<!-- Description of tested scenarios -->
**Fixed issue**: <!-- #-prefixed issue number -->

10
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
reviewers:
- KadoBOT

11
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.

51
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: "Code scanning - action"
on:
push:
pull_request:
schedule:
- cron: '0 21 * * 4'
jobs:
CodeQL-Build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

50
.github/workflows/coveralls.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
on: ["push", "pull_request"]
name: Coveralls
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: npm install, npm test:coverage
run: |
npm install
npm run test:coverage
env:
CI: true
ADYEN_API_KEY: ${{ secrets.ADYEN_API_KEY }}
ADYEN_MERCHANT: ${{ secrets.ADYEN_MERCHANT }}
ADYEN_PASSWORD: ${{ secrets.ADYEN_PASSWORD }}
ADYEN_REVIEWPAYOUT_APIKEY: ${{ secrets.ADYEN_REVIEWPAYOUT_APIKEY }}
ADYEN_REVIEWPAYOUT_PASSWORD: ${{ secrets.ADYENREVIEWPAYOUT_PASSWORD }}
ADYEN_REVIEWPAYOUT_USER: ${{ secrets.ADYENREVIEWPAYOUT_USER }}
ADYEN_STOREPAYOUT_APIKEY: ${{ secrets.ADYEN_STOREPAYOUT_APIKEY }}
ADYEN_STOREPAYOUT_PASSWORD: ${{ secrets.ADYEN_STOREPAYOUT_PASSWORD }}
ADYEN_STOREPAYOUT_USER: ${{ secrets.ADYEN_STOREPAYOUT_USER }}
ADYEN_USER: ${{ secrets.ADYEN_USER }}
ADYEN_MARKETPLACE_USER: ${{ secrets.ADYEN_MARKETPLACE_USER }}
ADYEN_MARKETPLACE_PASSWORD: ${{ secrets.ADYEN_MARKETPLACE_PASSWORD }}
ADYEN_TERMINAL_APIKEY: ${{ secrets.ADYEN_TERMINAL_APIKEY }}
ADYEN_TERMINAL_POIID: ${{ secrets.ADYEN_TERMINAL_POIID }}
ADYEN_TERMINAL_MERCHANT: ${{ secrets.ADYEN_TERMINAL_MERCHANT }}
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage/lcov.info # optional (default value)
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

42
.github/workflows/nodejs.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Node.js CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 13.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, lint and test
run: |
npm install
npm run lint:fix
npm run lint
npm test
env:
CI: true
ADYEN_API_KEY: ${{ secrets.ADYEN_API_KEY }}
ADYEN_MERCHANT: ${{ secrets.ADYEN_MERCHANT }}
ADYEN_PASSWORD: ${{ secrets.ADYEN_PASSWORD }}
ADYEN_REVIEWPAYOUT_APIKEY: ${{ secrets.ADYEN_REVIEWPAYOUT_APIKEY }}
ADYEN_REVIEWPAYOUT_PASSWORD: ${{ secrets.ADYENREVIEWPAYOUT_PASSWORD }}
ADYEN_REVIEWPAYOUT_USER: ${{ secrets.ADYENREVIEWPAYOUT_USER }}
ADYEN_STOREPAYOUT_APIKEY: ${{ secrets.ADYEN_STOREPAYOUT_APIKEY }}
ADYEN_STOREPAYOUT_PASSWORD: ${{ secrets.ADYEN_STOREPAYOUT_PASSWORD }}
ADYEN_STOREPAYOUT_USER: ${{ secrets.ADYEN_STOREPAYOUT_USER }}
ADYEN_USER: ${{ secrets.ADYEN_USER }}
ADYEN_MARKETPLACE_USER: ${{ secrets.ADYEN_MARKETPLACE_USER }}
ADYEN_MARKETPLACE_PASSWORD: ${{ secrets.ADYEN_MARKETPLACE_PASSWORD }}
ADYEN_TERMINAL_APIKEY: ${{ secrets.ADYEN_TERMINAL_APIKEY }}
ADYEN_TERMINAL_POIID: ${{ secrets.ADYEN_TERMINAL_POIID }}
ADYEN_TERMINAL_MERCHANT: ${{ secrets.ADYEN_TERMINAL_MERCHANT }}

30
.github/workflows/npmpublish.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Node.js Package
on:
workflow_dispatch:
inputs:
releaseType:
description: "Release type (major/minor/patch)"
required: true
releaseArgs:
description: "Additional arguments to be appended to the `release-it` CLI command"
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: |
npm install
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
git config --global user.name 'GitHub'
git config --global user.email 'noreply@github.com'
npm run release -- ${{ github.event.inputs.releaseType }} --ci ${{ github.event.inputs.releaseArgs }}
env:
GITHUB_TOKEN: ${{ secrets.USER_GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
CI: false

3
.gitignore vendored
View File

@@ -11,4 +11,5 @@ node_modules
.ssh/
.viminfo
coverage/
dist/
.env
lib/

20
.release-it.json Normal file
View File

@@ -0,0 +1,20 @@
{
"git": {
"tagName": "v${version}",
"changelog": "npx auto-changelog --hide-credit --stdout --commit-limit false --unreleased-only -t keepachangelog",
"commitMessage": "Release ${version}",
"tag": true,
"requireCleanWorkingDir": false
},
"github": {
"release": true,
"releaseName": "Adyen Node API Library v${version}"
},
"hooks": {
"after:bump": [
"npm run build",
"npx auto-changelog -p"
],
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
}
}

19
.sonarcloud.properties Normal file
View File

@@ -0,0 +1,19 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the ODPi Egeria project.
# Path to sources
#sonar.sources=.
sonar.exclusions=src/__mocks__/*
sonar.exclusions=src/typings/*
#sonar.inclusions=
# Path to tests
#sonar.tests=
#sonar.test.exclusions=
#sonar.test.inclusions=
# Source encoding
#sonar.sourceEncoding=UTF-8
# Exclusions for copy-paste detection
#sonar.cpd.exclusions=

View File

@@ -1,25 +0,0 @@
language: node_js
node_js:
- "8"
- stable
cache: yarn
script:
- yarn run lint:fix
- yarn run lint
- yarn run test
jobs:
include:
- stage: npm release
if: tag IS present
node_js: stable
script: yarn run build
deploy:
provider: npm
email: "$NPM_EMAIL"
api_key: "$NPM_TOKEN"
skip_cleanup: true
on:
tags: true
- stage: Produce Coverage
node_js: stable
script: jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage

20
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,20 @@
# Contribution guidelines
## How to contribute step-by-step
1. Fork the `Adyen/adyen-node-api-library` repository.
2. Create a new branch from `develop` in your fork. This makes it easier for you to keep track of your changes.
3. Make the desired changes to the code.
* If you are adding new functionality or fixing a bug, we recommend you add unit tests that cover it.
4. Push the changes to your fork.
5. Create a pull request to the `Adyen/adyen-node-api-library` repository.
6. In your pull request, please describe in detail:
* What problem youre solving
* Your approach to fixing the problem
* Any tests you wrote
7. Check Allow edits from maintainers.
8. Create the pull request.
9. Ensure that all checks have passed.
After you create your pull request, one of the code owners will review your code.
We aim to review your request within 2-3 business days.

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2019 Adyen
Copyright (c) 2020 Adyen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,11 +1,14 @@
# Adyen Node.js API Library
[![Build Status](https://travis-ci.org/Adyen/adyen-node-api-library.svg?branch=master)](https://travis-ci.org/Adyen/adyen-node-api-library)
![Node.js CI](https://github.com/Adyen/adyen-node-api-library/workflows/Node.js%20CI/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/Adyen/adyen-node-api-library/badge.svg?branch=master)](https://coveralls.io/github/Adyen/adyen-node-api-library?branch=master)
[![Downloads](https://img.shields.io/npm/dm/@adyen/api-library.svg)](https://www.npmjs.com/package/@adyen/api-library)
![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@adyen/api-library.svg)
[![Version](https://img.shields.io/npm/v/@adyen/api-library.svg)](https://www.npmjs.com/package/@adyen/api-library)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Adyen_adyen-node-api-library&metric=alert_status)](https://sonarcloud.io/dashboard?id=Adyen_adyen-node-api-library)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/Adyen/adyen-node-api-library.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Adyen/adyen-node-api-library/alerts/)
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/Adyen/adyen-node-api-library.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Adyen/adyen-node-api-library/context:javascript)
The Adyen API Library for NodeJS enables you to work with Adyen APIs and Hosted Payment Pages.
The Adyen API Library for NodeJS enables you to work with Adyen APIs.
## Integration
The Library supports all APIs under the following services:
@@ -21,7 +24,7 @@ The Library supports all APIs under the following services:
## Requirements
* Node 8.1.1 or higher
* Node 10 or higher
## Installation
@@ -35,7 +38,7 @@ npm install --save @adyen/api-library
## Documentation
* https://docs.adyen.com/developers/development-resources/libraries
* https://docs.adyen.com/developers/checkout/api-integration
* https://docs.adyen.com/developers/checkout
## HTTP Client Configuration
@@ -86,13 +89,16 @@ client.httpClient = httpClient;
```
## Support
If you have a feature request, or spotted a bug or a technical problem, create a GitHub issue. For other questions, contact our [support team](https://support.adyen.com/hc/en-us/requests/new?ticket_form_id=360000705420).
If you have any problems, questions or suggestions, create an issue here or send your inquiry to support@adyen.com.
## Contributing
We strongly encourage you to join us in contributing to this repository so everyone can benefit from:
* New features and functionality
* Resolved bug fixes and issues
* Any general improvements
Read our [**contribution guidelines**](CONTRIBUTING.md) to find out how.
## Licence
MIT license. For more information, see the LICENSE file.
## Other
You can find examples inside the `examples` folder in this repo.

20
config.ts Normal file
View File

@@ -0,0 +1,20 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import "jest-ts-auto-mock"

View File

@@ -1,24 +0,0 @@
const TerminalAPI = require("./terminalApi");
const terminalAPI = new TerminalAPI();
const asyncPayment = async () => {
console.log("Starting transaction...");
const sentRequest = await terminalAPI.paymentRequestAsync();
console.log("Request sent. Waiting to retrieve status...");
setTimeout(async () => {
console.log("Retrieving status...");
const statusResponse = await terminalAPI.transactionStatusRequestSync(sentRequest);
const {TransactionStatusResponse} = statusResponse.SaleToPOIResponse;
if (TransactionStatusResponse && TransactionStatusResponse.Response.Result === 'Success') {
console.log("Response [result:%s data:%s]",
statusResponse.SaleToPOIResponse.TransactionStatusResponse.RepeatedMessageResponse.RepeatedResponseMessageBody.PaymentResponse.Response.Result,
statusResponse.SaleToPOIResponse.TransactionStatusResponse.RepeatedMessageResponse.RepeatedResponseMessageBody.PaymentResponse.Response.AdditionalResponse
);
} else {
console.log("Response [result:%s]", statusResponse.SaleToPOIResponse.TransactionStatusResponse.Response.Result)
}
}, 10000);
}

View File

@@ -1,12 +0,0 @@
const TerminalAPI = require("./terminalApi");
const terminalAPI = new TerminalAPI();
const localPayment = async () => {
const paymentsResponse = await terminalAPI.paymentRequestLocal();
console.log("Response [result:%s data:%s]",
paymentsResponse.SaleToPOIResponse.PaymentResponse.Response.Result,
paymentsResponse.SaleToPOIResponse.PaymentResponse.Response.AdditionalResponse
);
};

View File

@@ -1,13 +0,0 @@
const TerminalAPI = require("./terminalApi");
const terminalAPI = new TerminalAPI();
const syncPayment = async () => {
console.log("Starting transaction...");
const paymentsResponse = await terminalAPI.paymentRequestSync();
console.log("Response [result:%s data:%s]",
paymentsResponse.SaleToPOIResponse.PaymentResponse.Response.Result,
paymentsResponse.SaleToPOIResponse.PaymentResponse.Response.AdditionalResponse
);
};

View File

@@ -1,135 +0,0 @@
const {Client, Config, TerminalCloudAPI, TerminalLocalAPI} = require("../../src");
class TerminalApi {
terminalCloudAPI;
terminalLocalAPI;
constructor() {
const merchantAccount = "[MERCHANT ACCOUNT]";
const xApiKey = "[X_API_KEY]";
const config = new Config();
config.merchantAccount = merchantAccount;
config.apiKey = xApiKey; // alternatively you can authenticate with your username + password
// config.username = "[USERNAME]"
// config.password = "[PASSWORD]"
const client = new Client({config});
client.setEnvironment("[LIVE | TEST]");
this.terminalCloudAPI = new TerminalCloudAPI(client);
const localConfig = new Config();
localConfig.merchantAccount = merchantAccount;
localConfig.apiKey = xApiKey; // or username + password
localConfig.terminalApiLocalEndpoint = "[PROTOCOL]//[TERMINAL_IP]:[PORT]";
const localClient = new Client({config: localConfig});
this.terminalLocalAPI = new TerminalLocalAPI(localClient);
}
async paymentRequestLocal() {
const paymentsRequest = this.createPaymentRequest();
const securityKey = {
keyVersion: 1,
adyenCryptoVersion: 1,
keyIdentifier: "[CRYPTO_KEY_IDENTIFIER]",
passphrase: "[CRYPTO_KEY_PASSPHRASE]"
};
return this.terminalLocalAPI.request(paymentsRequest, securityKey);
}
paymentRequestSync() {
const paymentsRequest = this.createPaymentRequest();
console.log(`Payment [poiId:${paymentsRequest.SaleToPOIRequest.MessageHeader.POIID} serviceId:${paymentsRequest.SaleToPOIRequest.MessageHeader.ServiceID} saleId:${paymentsRequest.SaleToPOIRequest.MessageHeader.SaleID} amount:${paymentsRequest.SaleToPOIRequest.PaymentRequest.PaymentTransaction.AmountsReq.RequestedAmount} ${paymentsRequest.SaleToPOIRequest.PaymentRequest.PaymentTransaction.AmountsReq.Currency}]`)
return this.terminalCloudAPI.sync(paymentsRequest);
}
async paymentRequestAsync() {
const paymentsRequest = this.createPaymentRequest();
console.log(`Payment [poiId:${paymentsRequest.SaleToPOIRequest.MessageHeader.POIID} serviceId:${paymentsRequest.SaleToPOIRequest.MessageHeader.ServiceID} saleId:${paymentsRequest.SaleToPOIRequest.MessageHeader.SaleID} amount:${paymentsRequest.SaleToPOIRequest.PaymentRequest.PaymentTransaction.AmountsReq.RequestedAmount} ${paymentsRequest.SaleToPOIRequest.PaymentRequest.PaymentTransaction.AmountsReq.Currency}]`);
const response = await this.terminalCloudAPI.async(paymentsRequest);
return response === "ok" ? paymentsRequest : undefined;
}
createPaymentRequest() {
const saleToPOIRequest = {};
const messageHeader = this.createMessageHeader("Payment");
saleToPOIRequest.MessageHeader = messageHeader;
const paymentRequest = {};
const saleData = {};
const transactionIdentification = {};
transactionIdentification.TransactionID = "[TRANSACTION_ID]";
transactionIdentification.TimeStamp = new Date().toISOString();
saleData.SaleTransactionID = transactionIdentification;
const paymentTransation = {};
const amountsReq = {};
amountsReq.Currency = "EUR";
amountsReq.RequestedAmount = 1;
paymentTransation.AmountsReq = amountsReq;
paymentRequest.SaleData = saleData;
paymentRequest.PaymentTransaction = paymentTransation;
saleToPOIRequest.PaymentRequest = paymentRequest;
const terminalApiRequest = {};
terminalApiRequest.SaleToPOIRequest = saleToPOIRequest;
return terminalApiRequest;
}
createMessageHeader(messageCategoryType) {
const id = new Date().getTime() % 1000000000;
const messageHeader = {};
messageHeader.ProtocolVersion = "3.0";
messageHeader.MessageClass = "Service";
messageHeader.MessageCategory = messageCategoryType;
messageHeader.MessageType = "Request";
messageHeader.SaleID = id.toString();
messageHeader.ServiceID = id.toString();
messageHeader.POIID = "[POI_ID]";
return messageHeader;
}
createTransactionStatusRequest(paymentRequest) {
const saleToPOIRequest = {};
const messageHeader = this.createMessageHeader("TransactionStatus");
saleToPOIRequest.MessageHeader = messageHeader;
const transactionStatusRequest = {};
const messageReference = {};
messageReference.MessageCategory = "Payment";
messageReference.SaleID = paymentRequest.SaleToPOIRequest.MessageHeader.SaleID;
messageReference.ServiceID = paymentRequest.SaleToPOIRequest.MessageHeader.ServiceID;
transactionStatusRequest.MessageReference = messageReference;
saleToPOIRequest.TransactionStatusRequest = transactionStatusRequest;
const terminalAPIRequest = {};
terminalAPIRequest.SaleToPOIRequest = saleToPOIRequest;
return terminalAPIRequest;
}
transactionStatusRequestSync(terminalAPIRequest) {
const transactionStatusRequest = this.createTransactionStatusRequest(terminalAPIRequest);
return this.terminalCloudAPI.sync(transactionStatusRequest);
}
}
module.exports = TerminalApi;

View File

@@ -11,15 +11,14 @@
* ######
* #############
* ############
*
* Adyen Node API Library
*
* Copyright (c) 2019 Adyen B.V.
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
module.exports = {
preset: "ts-jest",
moduleFileExtensions: [
"ts",
"js"
@@ -27,10 +26,18 @@ module.exports = {
coveragePathIgnorePatterns: [
"<rootDir>/src/typings"
],
unmockedModulePathPatterns: [
"/dist"
],
setupFiles: ["<rootDir>config.ts", "dotenv/config"],
testMatch: [
"**/__tests__/*.ts"
]
"**/src/__tests__/**/*.spec.ts"
],
roots: ['<rootDir>/src'],
transform: {
".ts": "ts-jest"
},
globals: {
"ts-jest": {
compiler: "ttypescript",
transformIgnorePatterns: ['^.+\\\\.js$']
}
},
};

7561
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,11 @@
{
"name": "@adyen/api-library",
"version": "2.1.3",
"description": "The Adyen API Library for NodeJS enables you to work with Adyen APIs and Hosted Payment Pages.",
"main": "dist/lib/src/index.js",
"types": "dist/lib/src/index.d.ts",
"module": "dist/lib-esm/src/index.js",
"version": "6.0.0",
"description": "The Adyen API Library for NodeJS enables you to work with Adyen APIs.",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"engines": {
"node": ">=8.1.1"
"node": ">=10"
},
"repository": {
"type": "git",
@@ -25,41 +24,41 @@
},
"homepage": "https://github.com/Adyen/adyen-node-api-library#readme",
"scripts": {
"clean": "rm -rf ./dist",
"build": "npm run clean && tsc && tsc -m es6 --outDir dist/lib-esm && webpack",
"build": "tsc",
"lint": "eslint 'src/**/*.ts'",
"lint:fix": "eslint --fix 'src/**/*.ts'",
"test": "jest",
"preversion": "npm test",
"version": "npm run build && git add -A dist",
"postversion": "git push && git push --tags && rm -rf build/temp"
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"release": "release-it"
},
"author": "Ricardo Ambrogi",
"license": "MIT",
"devDependencies": {
"@babel/core": "7.5.5",
"@babel/plugin-proposal-class-properties": "7.5.5",
"@babel/plugin-proposal-object-rest-spread": "7.5.5",
"@babel/plugin-transform-runtime": "7.5.5",
"@babel/preset-env": "7.5.5",
"@babel/preset-typescript": "7.3.3",
"@babel/runtime": "7.5.5",
"@types/jest": "24.0.17",
"@types/nock": "10.0.3",
"@types/node": "11.13.18",
"@typescript-eslint/eslint-plugin": "2.0.0",
"@typescript-eslint/parser": "2.0.0",
"babel-loader": "8.0.6",
"coveralls": "3.0.6",
"eslint": "6.2.0",
"jest": "24.9.0",
"nock": "11.0.0",
"ts-loader": "6.0.4",
"typescript": "3.5.3",
"webpack": "4.39.2",
"webpack-cli": "3.3.7"
"@types/jest": "26.0.14",
"@types/nock": "11.1.0",
"@typescript-eslint/eslint-plugin": "2.34.0",
"@typescript-eslint/parser": "2.34.0",
"acorn": "^8.0.1",
"coveralls": "3.1.0",
"dotenv": "^8.2.0",
"eslint": "6.8.0",
"jest": "25.5.4",
"jest-ts-auto-mock": "^1.0.11",
"kind-of": "^6.0.3",
"minimist": ">=1.2.3",
"nock": "13.0.3",
"release-it": "14.0.3",
"ts-auto-mock": "^1.6.0",
"ts-jest": "25.5.1",
"ts-loader": "8.0.4",
"ttypescript": "^1.5.10",
"typescript": "3.9.7"
},
"dependencies": {
"https-proxy-agent": "2.2.2"
"https-proxy-agent": "5.0.0"
},
"optionalDependencies": {
"@types/node": "14.0.9"
}
}

View File

@@ -1,5 +0,0 @@
{
"extends": [
"config:base"
]
}

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
@@ -29,70 +27,104 @@ import {
MessageType,
PaymentRequest,
PaymentTransaction,
ReversalReasonType,
ReversalRequest,
SaleData,
SaleToPoiRequest,
SaleToPOIRequest,
TerminalApiRequest,
TransactionIdentification,
} from "../typings/terminal";
TransactionIdentification
} from "../typings/terminal/models";
export const createMockClientFromResponse = (): Client => {
export const createClient = (apiKey = process.env.ADYEN_API_KEY): Client => {
const config: Config = new Config();
config.terminalApiCloudEndpoint = Client.TERMINAL_API_ENDPOINT_TEST;
config.terminalApiLocalEndpoint = "https://mocked_local_endpoint.com";
config.hmacKey = "DFB1EB5485895CFA84146406857104ABB4CBCABDC8AAF103A624C8F6A3EAAB00";
config.endpoint = Client.ENDPOINT_TEST;
config.checkoutEndpoint = Client.CHECKOUT_ENDPOINT_TEST;
config.apiKey = "MOCKED_API_KEY";
config.marketPayEndpoint = Client.MARKETPAY_ENDPOINT_TEST;
config.apiKey = apiKey;
config.marketPayEndpoint = Client.MARKETPAY_ENDPOINT_TEST;
const client: Client = new Client({ config });
return client;
return new Client({ config });
};
export const createBasicAuthClient = (): Client => {
return new Client({
username: process.env.ADYEN_USER!,
password: process.env.ADYEN_PASSWORD!,
environment: "TEST",
applicationName: "adyen-node-api-library"
});
};
const id = Math.floor(Math.random() * Math.floor(10000000)).toString();
const getMessageHeader = ({ messageCategory = MessageCategoryType.Payment }: { messageCategory?: MessageCategoryType } = {}): MessageHeader => ({
messageCategory,
messageClass: MessageClassType.Service,
messageType: MessageType.Request,
pOIID: process.env.ADYEN_TERMINAL_POIID!,
protocolVersion: "3.0",
saleID: id,
serviceID: id,
});
const timestamp = (): string => new Date().toISOString();
const transactionIdentification: TransactionIdentification = {
timeStamp: timestamp(),
transactionID: id,
};
const saleData: SaleData = {
saleTransactionID: transactionIdentification,
saleToAcquirerData: {
applicationInfo: {
merchantApplication: {
version: "1",
name: "test"
}
}
}
};
const amountsReq: AmountsReq = {
currency: "EUR",
requestedAmount: 1,
};
const paymentTransaction: PaymentTransaction = {
amountsReq,
};
const paymentRequest: PaymentRequest = {
paymentTransaction,
saleData,
};
const getReversalRequest = (poiTransaction: TransactionIdentification): ReversalRequest => ({
originalPOITransaction: {
pOITransactionID: {
transactionID: poiTransaction.transactionID,
timeStamp: poiTransaction.timeStamp
},
},
reversalReason: ReversalReasonType.MerchantCancel
});
const getSaleToPOIRequest = (messageHeader: MessageHeader, request: Partial<SaleToPOIRequest>): SaleToPOIRequest => ({
messageHeader,
...request
});
export const createTerminalAPIPaymentRequest = (): TerminalApiRequest => {
const messageHeader: MessageHeader = {
messageCategory: MessageCategoryType.Payment,
messageClass: MessageClassType.Service,
messageType: MessageType.Request,
poiid: "P400Plus-123456789",
protocolVersion: "3.0",
saleId: "001",
serviceId: "001",
};
const timestamp = new Date().toISOString();
const transactionIdentification: TransactionIdentification = {
timeStamp: timestamp,
transactionId: "001",
};
const saleData: SaleData = {
saleTransactionId: transactionIdentification,
};
const amountsReq: AmountsReq = {
currency: "EUR",
requestedAmount: 1,
};
const paymentTransaction: PaymentTransaction = {
amountsReq: amountsReq,
};
const paymentRequest: PaymentRequest = {
paymentTransaction: paymentTransaction,
saleData: saleData,
};
const saleToPOIRequest: SaleToPoiRequest = {
messageHeader: messageHeader,
paymentRequest: paymentRequest,
};
const terminalApiRequest: TerminalApiRequest = {
saleToPoiRequest: saleToPOIRequest,
};
return terminalApiRequest;
const messageHeader = getMessageHeader();
const saleToPOIRequest = getSaleToPOIRequest(messageHeader, { paymentRequest });
return { saleToPOIRequest };
};
export const createTerminalAPIRefundRequest = (transactionIdentification: TransactionIdentification): TerminalApiRequest => {
const messageHeader = getMessageHeader({ messageCategory: MessageCategoryType.Reversal });
const saleToPOIRequest = getSaleToPOIRequest(messageHeader, { reversalRequest: getReversalRequest(transactionIdentification) });
return { saleToPOIRequest };
};

View File

@@ -0,0 +1,26 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
export const originKeysSuccess = JSON.stringify({
originKeys: {
"https://www.your-domain.com": "pub.v2.7814286629520534.aHR0cHM6Ly93d3cueW91ci1kb21haW4xLmNvbQ.UEwIBmW9-c_uXo5wSEr2w8Hz8hVIpujXPHjpcEse3xI",
"https://www.your-domain2.com": "pub.v2.7814286629520534.aHR0cHM6Ly93d3cueW91ci1kb21haW4yLmNvbQ.EP6eXBJKk0t7-QIUl6e_b1qMuMHGepxG_SlUqxAYrfY",
"https://www.your-domain3.com": "pub.v2.7814286629520534.aHR0cHM6Ly93d3cueW91ci1kb21haW4zLmNvbQ.fUvflu-YIdZSsLEH8Qqmr7ksE4ag_NYiiMXK0s6aq_4",
},
});

View File

@@ -1,3 +1,22 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
/* tslint:disable */
export const paymentMethodsSuccess = JSON.stringify({
paymentMethods: [

View File

@@ -1,3 +1,22 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
/* tslint:disable */
export const paymentSessionError = {
statusCode: 422,

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,22 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
export const paymentMethodsError = {
errorCode: "901",
errorType: "security",

View File

@@ -1,3 +1,22 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
/* tslint:disable */
export const paymentDetailsError = {
statusCode: 422,

View File

@@ -1,3 +1,22 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
/* tslint:disable */
export const paymentDetailsSuccess = JSON.stringify({
pspReference: "8515232733321252",

View File

@@ -1,3 +1,22 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
/* tslint:disable */
export const paymentsError = JSON.stringify({
statusCode: 422,

View File

@@ -1,3 +1,22 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
/* tslint:disable */
export const paymentsResultError = JSON.stringify({
statusCode: 422,

View File

@@ -1,3 +1,22 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
/* tslint:disable */
export const paymentsResultMultibancoSuccess = {
additionalData: {

View File

@@ -1,3 +1,22 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
/* tslint:disable */
export const paymentsResultSuccess = JSON.stringify({
pspReference: "8535253563623704",

View File

@@ -1,3 +1,22 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
/* tslint:disable */
export const paymentsSuccess = JSON.stringify({
additionalData: {
@@ -10,6 +29,7 @@ export const paymentsSuccess = JSON.stringify({
alias: "H167852639363479",
cardPaymentMethod: "visa",
cardIssuingCountry: "NL",
"recurring.recurringDetailReference": "8415883203388055",
},
fraudResult: {
accountScore: 0,

View File

@@ -1,7 +0,0 @@
export const originKeysSuccess = JSON.stringify({
originKeys: {
"https://www.your-domain1.com": "pub.v2.7814286629520534.aHR0cHM6Ly93d3cueW91ci1kb21haW4xLmNvbQ.UEwIBmW9-c_uXo5wSEr2w8Hz8hVIpujXPHjpcEse3xI",
"https://www.your-domain2.com": "pub.v2.7814286629520534.aHR0cHM6Ly93d3cueW91ci1kb21haW4yLmNvbQ.EP6eXBJKk0t7-QIUl6e_b1qMuMHGepxG_SlUqxAYrfY",
"https://www.your-domain3.com": "pub.v2.7814286629520534.aHR0cHM6Ly93d3cueW91ci1kb21haW4zLmNvbQ.fUvflu-YIdZSsLEH8Qqmr7ksE4ag_NYiiMXK0s6aq_4",
},
});

View File

@@ -22,4 +22,4 @@
}
}
]
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,22 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
export const disableSuccess = {
response: "[detail-successfully-disabled]",
};

View File

@@ -1,3 +1,22 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
export const listRecurringDetailsSuccess = {
creationDate: "2017-03-01T10:53:11.000",
details: [

View File

@@ -1 +1,20 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
export const asyncRes = "ok";

View File

@@ -1,4 +1,23 @@
export const localSecuredRes = JSON.stringify({
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
export const localSecuredRes = {
SaleToPOIResponse: {
MessageHeader: {
MessageCategory: "Payment",
@@ -9,326 +28,11 @@ export const localSecuredRes = JSON.stringify({
SaleID: "325488592",
ServiceID: "325488592"
},
paymentResponse: {
paymentReceipt: [
{
documentQualifier: "CashierReceipt",
outputContent: {
outputFormat: "Text",
outputText: [
{
characterStyle: "Bold",
endOfLineFlag: true,
text: "key=header1"
},
{
characterStyle: "Bold",
endOfLineFlag: true,
text: "key=header2"
},
{
characterStyle: "Bold",
endOfLineFlag: true,
text: "name=MERCHANT%20COPY&key=merchantTitle"
},
{
endOfLineFlag: true,
text: "key=filler"
},
{
endOfLineFlag: true,
text: "name=Date&value=08%2f05%2f19&key=txdate"
},
{
endOfLineFlag: true,
text: "name=Time&value=15%3a25%3a15&key=txtime"
},
{
endOfLineFlag: true,
text: "key=filler"
},
{
endOfLineFlag: true,
text: "name=Card&value=%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a0010&key=pan"
},
{
endOfLineFlag: true,
text: "name=PAN%20seq.&value=01&key=panSeq"
},
{
endOfLineFlag: true,
text: "name=Pref.%20name&value=PPC%20MCD%2001%20v2%202&key=preferredName"
},
{
endOfLineFlag: true,
text: "name=Card%20type&value=mc&key=cardType"
},
{
endOfLineFlag: true,
text: "name=Payment%20method&value=mc&key=paymentMethod"
},
{
endOfLineFlag: true,
text: "name=Payment%20variant&value=mc&key=paymentMethodVariant"
},
{
endOfLineFlag: true,
text: "name=Entry%20mode&value=Contactless%20chip&key=posEntryMode"
},
{
endOfLineFlag: true,
text: "key=filler"
},
{
endOfLineFlag: true,
text: "name=AID&value=A0000000041010&key=aid"
},
{
endOfLineFlag: true,
text: "name=MID&value=1000&key=mid"
},
{
endOfLineFlag: true,
text: "name=TID&value=P400Plus-275039202&key=tid"
},
{
endOfLineFlag: true,
text: "name=PTID&value=75039202&key=ptid"
},
{
endOfLineFlag: true,
text: "key=filler"
},
{
endOfLineFlag: true,
text: "name=Auth.%20code&value=123456&key=authCode"
},
{
endOfLineFlag: true,
text: "name=Tender&value=4r7i001557325515012&key=txRef"
},
{
endOfLineFlag: true,
text: "name=Reference&value=999&key=mref"
},
{
endOfLineFlag: true,
text: "key=filler"
},
{
endOfLineFlag: true,
text: "name=Type&value=GOODS_SERVICES&key=txtype"
},
{
characterStyle: "Bold",
endOfLineFlag: true,
text: "name=TOTAL&value=%e2%82%ac%c2%a01.00&key=totalAmount"
},
{
endOfLineFlag: true,
text: "key=filler"
},
{
characterStyle: "Bold",
endOfLineFlag: true,
text: "name=APPROVED&key=approved"
}
]
},
requiredSignatureFlag: false
},
{
documentQualifier: "CustomerReceipt",
outputContent: {
outputFormat: "Text",
outputText: [
{
characterStyle: "Bold",
endOfLineFlag: true,
text: "key=header1"
},
{
characterStyle: "Bold",
endOfLineFlag: true,
text: "key=header2"
},
{
characterStyle: "Bold",
endOfLineFlag: true,
text: "name=CARDHOLDER%20COPY&key=cardholderHeader"
},
{
endOfLineFlag: true,
text: "key=filler"
},
{
endOfLineFlag: true,
text: "name=Date&value=08%2f05%2f19&key=txdate"
},
{
endOfLineFlag: true,
text: "name=Time&value=15%3a25%3a15&key=txtime"
},
{
endOfLineFlag: true,
text: "key=filler"
},
{
endOfLineFlag: true,
text: "name=Card&value=%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a0010&key=pan"
},
{
endOfLineFlag: true,
text: "name=PAN%20seq.&value=01&key=panSeq"
},
{
endOfLineFlag: true,
text: "name=Pref.%20name&value=PPC%20MCD%2001%20v2%202&key=preferredName"
},
{
endOfLineFlag: true,
text: "name=Card%20type&value=mc&key=cardType"
},
{
endOfLineFlag: true,
text: "name=Payment%20method&value=mc&key=paymentMethod"
},
{
endOfLineFlag: true,
text: "name=Payment%20variant&value=mc&key=paymentMethodVariant"
},
{
endOfLineFlag: true,
text: "name=Entry%20mode&value=Contactless%20chip&key=posEntryMode"
},
{
endOfLineFlag: true,
text: "key=filler"
},
{
endOfLineFlag: true,
text: "name=AID&value=A0000000041010&key=aid"
},
{
endOfLineFlag: true,
text: "name=MID&value=1000&key=mid"
},
{
endOfLineFlag: true,
text: "name=TID&value=P400Plus-275039202&key=tid"
},
{
endOfLineFlag: true,
text: "name=PTID&value=75039202&key=ptid"
},
{
endOfLineFlag: true,
text: "key=filler"
},
{
endOfLineFlag: true,
text: "name=Auth.%20code&value=123456&key=authCode"
},
{
endOfLineFlag: true,
text: "name=Tender&value=4r7i001557325515012&key=txRef"
},
{
endOfLineFlag: true,
text: "name=Reference&value=999&key=mref"
},
{
endOfLineFlag: true,
text: "key=filler"
},
{
endOfLineFlag: true,
text: "name=Type&value=GOODS_SERVICES&key=txtype"
},
{
characterStyle: "Bold",
endOfLineFlag: true,
text: "name=TOTAL&value=%e2%82%ac%c2%a01.00&key=totalAmount"
},
{
endOfLineFlag: true,
text: "key=filler"
},
{
characterStyle: "Bold",
endOfLineFlag: true,
text: "name=APPROVED&key=approved"
},
{
endOfLineFlag: true,
text: "key=filler"
},
{
endOfLineFlag: true,
text: "name=Please%20retain%20for%20your%20records&key=retain"
},
{
endOfLineFlag: true,
text: "name=Thank%20you&key=thanks"
}
]
},
requiredSignatureFlag: false
}
],
paymentResult: {
amountsResp: {
authorizedAmount: 1,
currency: "EUR"
},
onlineFlag: true,
paymentAcquirerData: {
acquirerPoiid: "P400Plus-275039202",
acquirerTransactionId: {
timeStamp: "2019-05-08T14:25:15.000Z",
transactionId: "8815573255107661"
},
approvalCode: "123456",
merchantId: "TestMerchantRenatoTest"
},
paymentInstrumentData: {
cardData: {
cardCountryCode: "056",
entryMode: [
"Contactless"
],
maskedPan: "541333 **** 0010",
paymentBrand: "mc",
sensitiveCardData: {
cardSeqNumb: "01",
expiryDate: "1225"
}
},
paymentInstrumentType: "Card"
}
},
poiData: {
poiReconciliationId: "1000",
poiTransactionId: {
timeStamp: "2019-05-08T14:25:15.000Z",
transactionId: "4r7i001557325515012.8815573255107661"
}
},
response: {
additionalResponse: "tid=75039202&AID=A0000000041010&transactionType=GOODS_SERVICES&backendGiftcardIndicator=false&expiryYear=2025&acquirerAccountCode=TestPmmAcquirerAccount&alias=K182596230843790&posOriginalAmountCurrency=EUR&giftcardIndicator=false&authorisedAmountValue=100&pspReference=8815573255107661&paymentMethodVariant=mc&cardHolderName=N%2fA&refusalReasonRaw=APPROVED&authorisationMid=1000&expiryDate=12%2f2025&applicationPreferredName=PPC%20MCD%2001%20v2%202&isCardCommercial=unknown&acquirerCode=TestPmmAcquirer&txtime=15%3a25%3a15&iso8601TxDate=2019-05-08T14%3a25%3a15.0000000%2b0000&cardType=mc&posOriginalAmountValue=100&offline=false&aliasType=Default&txdate=08-05-2019&paymentMethod=mc&cvcResult=0%20Unknown&startYear=2030&tc=A767D7547D930504&avsResult=0%20Unknown&cardIssueNumber=1&mid=1000&merchantReference=999&transactionReferenceNumber=8815573255107661&expiryMonth=12&cardSummary=0010&posTotalAmountValue=100&posAuthAmountCurrency=EUR&cardHolderVerificationMethodResults=1F0302&authCode=123456&cardIssuerCountryId=056&shopperCountry=NL&posEntryMode=CLESS_CHIP&startMonth=34&fundingSource=CREDIT&cardScheme=mc&cardBin=541333&posAuthAmountValue=100",
result: "Success"
},
saleData: {
saleTransactionId: {
timeStamp: "2019-05-08T14:24:48.598Z",
transactionId: "999"
}
}
}
PaymentResponse: {}
}
});
};
export const localEncRes = JSON.stringify({
export const localEncRes = {
SaleToPOIResponse: {
MessageHeader: {
MessageCategory: "Payment",
@@ -434,9 +138,9 @@ export const localEncRes = JSON.stringify({
Nonce: "9iiJMpzKfYs3106ozIKNFQ==",
},
},
});
};
export const wrongEncRes = JSON.stringify({
export const wrongEncRes = {
SaleToPOIResponse: {
MessageHeader: {
MessageCategory: "Payment",
@@ -542,4 +246,4 @@ export const wrongEncRes = JSON.stringify({
Nonce: "9iiJMpzKfYs3106ozIKNFQ==",
},
},
});
};

View File

@@ -1,13 +1,32 @@
export const syncRes = JSON.stringify({
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
export const syncRes = {
SaleToPOIResponse: {
MessageHeader: {
MessageCategory: "Payment",
MessageClass: "Service",
MessageType: "Response",
POIID: "P400Plus-123456789",
POIID: process.env.ADYEN_TERMINAL_POIID,
ProtocolVersion: "3.0",
SaleID: "001",
ServiceID: "1234567890",
ServiceID: "001",
},
PaymentResponse: {
POIData: {
@@ -326,4 +345,23 @@ export const syncRes = JSON.stringify({
},
},
},
});
};
export const syncRefund = {
SaleToPOIResponse: {
MessageHeader: {
MessageCategory: "Payment",
MessageClass: "Service",
MessageType: "Response",
POIID: process.env.ADYEN_TERMINAL_POIID,
ProtocolVersion: "3.0",
SaleID: "001",
ServiceID: "001",
},
ReversalResponse: {
Response: {
Result: "Success"
}
}
}
};

View File

@@ -11,35 +11,24 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import nock from "nock";
import { createMockClientFromResponse } from "../__mocks__/base";
import { createClient } from "../__mocks__/base";
import BinLookup from "../services/binLookup";
import {CostEstimateRequest, ThreeDSAvailabilityRequest} from "../typings/binLookup";
import Client from "../client";
import HttpClientException from "../httpClient/httpClientException";
const threeDSAvailabilitySuccess = {
dsPublicKeys: [{
brand: "visa",
directoryServerId: "F013371337",
publicKey: "eyJrdHkiOiJSU0EiLCJlIjoiQVFBQiIsIm4iOiI4VFBxZkFOWk4xSUEzcHFuMkdhUVZjZ1g4LUpWZ1Y0M2diWURtYmdTY0N5SkVSN3lPWEJqQmQyaTBEcVFBQWpVUVBXVUxZU1FsRFRKYm91bVB1aXVoeVMxUHN2NTM4UHBRRnEySkNaSERkaV85WThVZG9hbmlrU095c2NHQWtBVmJJWHA5cnVOSm1wTTBwZ0s5VGxJSWVHYlE3ZEJaR01OQVJLQXRKeTY3dVlvbVpXV0ZBbWpwM2d4SDVzNzdCR2xkaE9RUVlQTFdybDdyS0pLQlUwNm1tZlktUDNpazk5MmtPUTNEak02bHR2WmNvLThET2RCR0RKYmdWRGFmb29LUnVNd2NUTXhDdTRWYWpyNmQyZkppVXlqNUYzcVBrYng4WDl6a1c3UmlxVno2SU1qdE54NzZicmg3aU9Vd2JiWmoxYWF6VG1GQ2xEb0dyY2JxOV80Nnc9PSJ9"
}],
binDetails: {
issuerCountry: "NL"
},
threeDS1Supported: true,
threeDS2CardRangeDetails: [{
brandCode: "visa",
endRange: "411111111111",
startRange: "411111111111",
threeDS2Version: "2.1.0",
threeDSMethodURL: "https://pal-test.adyen.com/threeds2simulator/acs/startMethod.shtml"
}],
threeDS2supported: true
threeDS2CardRangeDetails: [],
threeDS2supported: false
};
let client: Client;
@@ -47,15 +36,23 @@ let binLookup: BinLookup;
let scope: nock.Scope;
beforeEach((): void => {
client = createMockClientFromResponse();
if (!nock.isActive()) {
nock.activate();
}
client = createClient();
binLookup = new BinLookup(client);
scope = nock(`${client.config.endpoint}${Client.BIN_LOOKUP_PAL_SUFFIX}${Client.BIN_LOOKUP_API_VERSION}`);
});
afterEach((): void => {
nock.cleanAll();
});
describe("Bin Lookup", function (): void {
it("should succeed on get 3ds availability", async function (): Promise<void> {
const threeDSAvailabilityRequest: ThreeDSAvailabilityRequest = {
merchantAccount: "MOCK_MERCHANT_ACCOUNT",
test.each([false, true])("should succeed on get 3ds availability. isMock: %p", async function (isMock): Promise<void> {
!isMock && nock.restore();
const threeDSAvailabilityRequest: IBinLookup.ThreeDSAvailabilityRequest = {
merchantAccount: process.env.ADYEN_MERCHANT!,
brands: ["randomBrand"],
cardNumber: "4111111111111111"
};
@@ -65,10 +62,11 @@ describe("Bin Lookup", function (): void {
const response = await binLookup.get3dsAvailability(threeDSAvailabilityRequest);
expect(response).toEqual(threeDSAvailabilitySuccess);
expect(response).toEqual<IBinLookup.ThreeDSAvailabilityResponse>(threeDSAvailabilitySuccess);
});
it("should fail with invalid merchant", async function (): Promise<void> {
test.each([false, true])("should fail with invalid merchant. isMock: %p", async function (isMock): Promise<void> {
!isMock && nock.restore();
const threeDSAvailabilityRequest: { [key: string]: undefined|string|[] } = {
merchantAccount: undefined,
cardNumber: "4111111111111",
@@ -79,27 +77,31 @@ describe("Bin Lookup", function (): void {
.reply(403, JSON.stringify({status: 403, message: "fail", errorCode: "171"}));
try {
await binLookup.get3dsAvailability(threeDSAvailabilityRequest as unknown as ThreeDSAvailabilityRequest);
await binLookup.get3dsAvailability(threeDSAvailabilityRequest as unknown as IBinLookup.ThreeDSAvailabilityRequest);
fail("Expected request to fail");
} catch (e) {
expect(e instanceof HttpClientException).toBeTruthy();
}
});
it("should succeed on get cost estimate", async function (): Promise<void> {
const response = {
cardBin: {summary: "1111"},
test.each([false, true])("should succeed on get cost estimate. isMock: %p", async function (isMock): Promise<void> {
!isMock && nock.restore();
const expected = {
costEstimateAmount: {
currency: "EUR",
value: 10
},
resultCode: "Unsupported",
surchargeType: "ZERO"
};
const costEstimateRequest: CostEstimateRequest = {
const costEstimateRequest: IBinLookup.CostEstimateRequest = {
amount: { currency: "EUR", value: 1000 },
assumptions: {
assumeLevel3Data: true,
assume3DSecureAuthenticated: true
},
cardNumber: "411111111111",
merchantAccount: "MOCKED_MERCHANT_ACC",
merchantAccount: process.env.ADYEN_MERCHANT!,
merchantDetails: {
countryCode: "NL",
mcc: "7411",
@@ -109,9 +111,9 @@ describe("Bin Lookup", function (): void {
};
scope.post("/getCostEstimate")
.reply(200, response);
.reply(200, expected);
const expected = await binLookup.getCostEstimate(costEstimateRequest);
const response = await binLookup.getCostEstimate(costEstimateRequest);
expect(response).toEqual(expected);
});

View File

@@ -1,7 +1,26 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
/* eslint-disable @typescript-eslint/camelcase */
import checkServerIdentity from "../helpers/checkServerIdentity";
import {PeerCertificate} from "tls";
import { PeerCertificate } from "tls";
const createMockedCertificate = (CN: string): PeerCertificate => ({
subjectaltname: "Adyen B.V",
@@ -29,6 +48,7 @@ const createMockedCertificate = (CN: string): PeerCertificate => ({
valid_from: "Nov 19 15:03:32 2018 GMT",
valid_to: "Nov 11 15:03:32 2048 GMT",
fingerprint: "MOCKED_FINGERPRINT",
fingerprint256: "MOCKED_FINGERPRINT_256",
ext_key_usage: ["1.2.3.4.5.6.7.8"],
serialNumber: "1000",
raw: Buffer.from("test")

View File

@@ -11,43 +11,37 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import nock from "nock";
import { createMockClientFromResponse } from "../__mocks__/base";
import {paymentMethodsSuccess} from "../__mocks__/checkout/paymentMethodsSuccess";
import {paymentsSuccess} from "../__mocks__/checkout/paymentsSuccess";
import {paymentDetailsSuccess} from "../__mocks__/checkout/paymentsDetailsSuccess";
import {paymentSessionSuccess} from "../__mocks__/checkout/paymentSessionSucess";
import {paymentsResultMultibancoSuccess} from "../__mocks__/checkout/paymentsResultMultibancoSuccess";
import {paymentsResultSuccess} from "../__mocks__/checkout/paymentsResultSucess";
import { createClient } from "../__mocks__/base";
import { paymentMethodsSuccess } from "../__mocks__/checkout/paymentMethodsSuccess";
import { paymentsSuccess } from "../__mocks__/checkout/paymentsSuccess";
import { paymentDetailsSuccess } from "../__mocks__/checkout/paymentsDetailsSuccess";
import { paymentSessionSuccess } from "../__mocks__/checkout/paymentSessionSucess";
import { originKeysSuccess } from "../__mocks__/checkout/originkeysSuccess";
import { paymentsResultMultibancoSuccess } from "../__mocks__/checkout/paymentsResultMultibancoSuccess";
import { paymentsResultSuccess } from "../__mocks__/checkout/paymentsResultSucess";
import Client from "../client";
import { TYPE_SCHEME } from "../typings/constants/apiConstants";
import Checkout from "../services/checkout";
import {
Amount,
DetailsRequest,
PaymentMethodsRequest,
PaymentRequest,
PaymentResponse,
PaymentSetupRequest, PaymentVerificationRequest
} from "../typings/checkout";
import HttpClientException from "../httpClient/httpClientException";
function createAmountObject(currency: string, value: number): Amount {
const merchantAccount = process.env.ADYEN_MERCHANT!;
const reference = "Your order number";
const isCI = process.env.CI === "true" || (typeof process.env.CI === "boolean" && process.env.CI);
function createAmountObject(currency: string, value: number): ICheckout.Amount {
return {
currency,
value,
};
}
function createPaymentsDetailsRequest(): DetailsRequest {
function createPaymentsDetailsRequest(): ICheckout.DetailsRequest {
return {
details: {
MD: "mdValue",
@@ -57,32 +51,78 @@ function createPaymentsDetailsRequest(): DetailsRequest {
};
}
export function createPaymentsCheckoutRequest(): PaymentRequest {
export function createPaymentsCheckoutRequest(): ICheckout.PaymentRequest {
const paymentMethodDetails = {
cvc: "737",
expiryMonth: "10",
expiryYear: "2018",
expiryMonth: "03",
expiryYear: "2030",
holderName: "John Smith",
number: "4111111111111111",
type: TYPE_SCHEME,
type: "scheme",
};
return {
amount: createAmountObject("USD", 1000),
merchantAccount: "MagentoMerchantTest",
merchantAccount,
paymentMethod: paymentMethodDetails,
reference: "Your order number",
reference,
returnUrl: "https://your-company.com/...",
enableRecurring: true,
enableOneClick: true,
shopperReference: "shopperReference",
storePaymentMethod: true
};
}
function createPaymentSessionRequest(): PaymentSetupRequest {
function createPaymentSessionRequest(): ICheckout.PaymentSetupRequest {
return {
amount: createAmountObject("USD", 1000),
countryCode: "NL",
merchantAccount: "MagentoMerchantTest",
reference: "Your order number",
merchantAccount,
reference,
returnUrl: "https://your-company.com/...",
channel: "Web",
sdkVersion: "3.7.0"
};
}
function getPaymentLinkSuccess(expiresAt: string): ICheckout.PaymentLinkResource {
return {
amount: createAmountObject("USD", 1000),
expiresAt,
reference,
url: "paymentLinkResponse.url",
id: "mocked_id",
merchantAccount,
status: "active"
};
}
function createPaymentLinkRequest(): ICheckout.CreatePaymentLinkRequest {
return {
allowedPaymentMethods: ["scheme", "boletobancario"],
amount: createAmountObject("USD", 1000),
countryCode: "BR",
merchantAccount,
shopperReference: "shopperReference",
shopperEmail: "test@email.com",
shopperLocale: "pt_BR",
billingAddress: {
street: "Roque Petroni Jr",
postalCode: "59000060",
city: "São Paulo",
houseNumberOrName: "999",
country: "BR",
stateOrProvince: "SP"
},
deliveryAddress: {
street: "Roque Petroni Jr",
postalCode: "59000060",
city: "São Paulo",
houseNumberOrName: "999",
country: "BR",
stateOrProvince: "SP"
},
reference
};
}
@@ -91,49 +131,98 @@ let checkout: Checkout;
let scope: nock.Scope;
beforeEach((): void => {
client = createMockClientFromResponse();
if (!nock.isActive()) {
nock.activate();
}
client = createClient();
scope = nock(`${client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}`);
checkout = new Checkout(client);
});
afterEach(() => {
nock.cleanAll();
});
describe("Checkout", (): void => {
it("should make a payment", async (): Promise<void> => {
test.each([false, true])("should make a payment. isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
scope.post("/payments")
.reply(200, paymentsSuccess);
const paymentsRequest: PaymentRequest = createPaymentsCheckoutRequest();
const paymentsResponse: PaymentResponse = await checkout.payments(paymentsRequest);
expect(paymentsResponse.pspReference).toEqual("8535296650153317");
const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest();
const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments(paymentsRequest);
expect(paymentsResponse.pspReference).toBeTruthy();
});
it("should return correct Exception", async (): Promise<void> => {
test.each([false, true])("should return correct Exception, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
try {
scope.post("/payments")
.reply(401);
const paymentsRequest: PaymentRequest = createPaymentsCheckoutRequest();
const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest();
await checkout.payments(paymentsRequest);
} catch (e) {
expect(e instanceof HttpClientException).toBeTruthy();
}
});
it("should have valid payment methods", async (): Promise<void> => {
const paymentMethodsRequest: PaymentMethodsRequest = {merchantAccount: "MagentoMerchantTest"};
test.each([false, true])("should have valid payment methods, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
const paymentMethodsRequest: ICheckout.PaymentMethodsRequest = {merchantAccount: "MagentoMerchantTest"};
scope.post("/paymentMethods")
.reply(200, paymentMethodsSuccess);
const paymentMethodsResponse = await checkout.paymentMethods(paymentMethodsRequest);
if (paymentMethodsResponse && paymentMethodsResponse.paymentMethods) {
expect(paymentMethodsResponse.paymentMethods.length).toEqual(65);
expect(paymentMethodsResponse.paymentMethods[0].name).toEqual("AliPay");
expect(paymentMethodsResponse.paymentMethods.length).toBeGreaterThan(0);
} else {
fail();
}
});
it("should have payment details", async (): Promise<void> => {
test.each([false, true])("should have valid payment link, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
const expiresAt = "2019-12-17T10:05:29Z";
const paymentLinkSuccess: ICheckout.PaymentLinkResource = getPaymentLinkSuccess(expiresAt);
scope.post("/paymentLinks").reply(200, paymentLinkSuccess);
const paymentSuccessLinkResponse = await checkout.paymentLinks(createPaymentLinkRequest());
expect(paymentSuccessLinkResponse).toBeTruthy();
});
test.each([isCI, true])("should get payment link, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
const expiresAt = "2019-12-17T10:05:29Z";
const paymentLinkSuccess: ICheckout.PaymentLinkResource = getPaymentLinkSuccess(expiresAt);
scope.post("/paymentLinks").reply(200, paymentLinkSuccess);
const paymentSuccessLinkResponse = await checkout.paymentLinks(createPaymentLinkRequest());
scope.get(`/paymentLinks/${paymentSuccessLinkResponse.id}`).reply(200, paymentLinkSuccess);
const paymentLink = await checkout.getPaymentLinks(paymentSuccessLinkResponse.id);
expect(paymentLink).toBeTruthy();
});
test.each([isCI, true])("should patch payment link, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
const expiresAt = "2019-12-17T10:05:29Z";
const paymentLinkSuccess: ICheckout.PaymentLinkResource = getPaymentLinkSuccess(expiresAt);
scope.post("/paymentLinks").reply(200, paymentLinkSuccess);
const paymentSuccessLinkResponse = await checkout.paymentLinks(createPaymentLinkRequest());
scope.patch(`/paymentLinks/${paymentSuccessLinkResponse.id}`).reply(200, { ...paymentLinkSuccess, status: "expired" });
const paymentLink = await checkout.updatePaymentLinks(paymentSuccessLinkResponse.id, "expired");
expect(paymentLink.status).toEqual("expired");
});
test.each([isCI, true])("should have payment details, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
scope.post("/payments/details")
.reply(200, paymentDetailsSuccess);
@@ -141,51 +230,132 @@ describe("Checkout", (): void => {
expect(paymentsResponse.resultCode).toEqual("Authorised");
});
it("should have payment session success", async (): Promise<void> => {
const client: Client = createMockClientFromResponse();
test.each([false, true])("should have payment session success, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
scope.post("/paymentSession")
.reply(200, paymentSessionSuccess);
const checkout: Checkout = new Checkout(client);
const paymentSessionRequest: PaymentSetupRequest = createPaymentSessionRequest();
const paymentSessionRequest: ICheckout.PaymentSetupRequest = createPaymentSessionRequest();
const paymentSessionResponse = await checkout.paymentSession(paymentSessionRequest);
expect(paymentSessionResponse.paymentSession).not.toBeUndefined();
});
it("should have payments result", async (): Promise<void> => {
const client = createMockClientFromResponse();
test.each([isCI, true])("should have payments result, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
scope.post("/payments/result")
.reply(200, paymentsResultSuccess);
const checkout = new Checkout(client);
const paymentResultRequest: PaymentVerificationRequest = {
const paymentResultRequest: ICheckout.PaymentVerificationRequest = {
payload: "This is a test payload",
};
const paymentResultResponse = await checkout.paymentResult(paymentResultRequest);
expect(paymentResultResponse.resultCode).toEqual("Authorised");
});
it("should have missing identifier on live", async (): Promise<void> => {
const client = createMockClientFromResponse();
test.each([false, true])("should have missing identifier on live, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
client.setEnvironment("LIVE");
try {
new Checkout(client);
fail();
} catch (e) {
expect(e.message).toEqual("Please provide your unique live url prefix on the setEnvironment() call on the Client or provide checkoutEndpoint in your config object.");
}
});
it("should succeed on multibanco payment", async (): Promise<void> => {
const client: Client = createMockClientFromResponse();
test.each([false, true])("should succeed on multibanco payment, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
scope.post("/payments")
.reply(200, paymentsResultMultibancoSuccess);
const checkout: Checkout = new Checkout(client);
const paymentsRequest: PaymentRequest = createPaymentsCheckoutRequest();
const paymentsResponse: PaymentResponse = await checkout.payments(paymentsRequest);
expect(paymentsResponse.pspReference).toEqual("8111111111111111");
expect(paymentsResponse.additionalData["comprafacil.amount"]).toEqual("101.01");
expect(paymentsResponse.additionalData["comprafacil.deadline"]).toEqual("3");
expect(paymentsResponse.additionalData["comprafacil.entity"]).toEqual("12345");
const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest();
const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments(paymentsRequest);
expect(paymentsResponse.pspReference).toBeTruthy();
expect(paymentsResponse.additionalData).toBeTruthy();
});
test.each([false, true])("should get origin keys. isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
const checkoutUtility = new Checkout(client);
const originKeysRequest: ICheckout.CheckoutUtilityRequest = {
originDomains: ["https://www.your-domain.com"],
};
nock(`${client.config.checkoutEndpoint}`)
.post(`/${Client.CHECKOUT_API_VERSION}/originKeys`)
.reply(200, originKeysSuccess);
const originKeysResponse = await checkoutUtility.originKeys(originKeysRequest);
if (originKeysResponse.originKeys) {
return expect(originKeysResponse.originKeys["https://www.your-domain.com"].startsWith("pub.v2")).toBeTruthy();
}
fail("Error: originKeysResponse.originKeys is empty");
});
// TODO: add gift card to PaymentMethod and unmock test
test.each([true, true])("should get payment methods balance", async (isMock): Promise<void> => {
!isMock && nock.restore();
const paymentMethodsRequest: ICheckout.CheckoutBalanceCheckRequest = {
merchantAccount,
amount: createAmountObject("USD", 1000),
paymentMethod: { },
reference: "mocked_reference"
};
const paymentMethodsBalanceResponse: ICheckout.CheckoutBalanceCheckResponse = { balance: {currency: "USD", value: 1000}};
scope.post("/paymentMethods/balance")
.reply(200, paymentMethodsBalanceResponse);
const paymentsResponse: ICheckout.CheckoutBalanceCheckResponse = await checkout.paymentMethodsBalance(paymentMethodsRequest);
expect(paymentsResponse.balance.value).toEqual(1000);
});
test.each([false, true])("should create order", async (isMock): Promise<void> => {
!isMock && nock.restore();
const expiresAt = "2019-12-17T10:05:29Z";
const orderRequest: ICheckout.CheckoutCreateOrderRequest = {
amount: createAmountObject("USD", 1000),
merchantAccount,
reference
};
const orderResponse: ICheckout.CheckoutCreateOrderResponse = {expiresAt, orderData: "mocked_order_data", remainingAmount: {currency: "USD", value: 500} };
scope.post("/orders")
.reply(200, orderResponse);
const response: ICheckout.CheckoutCreateOrderResponse = await checkout.orders(orderRequest);
expect(response).toBeTruthy();
});
test.each([false, true])("should cancel order", async (isMock): Promise<void> => {
!isMock && nock.restore();
const expiresAt = "2019-12-17T10:05:29Z";
const orderRequest: ICheckout.CheckoutCreateOrderRequest = {
amount: createAmountObject("USD", 1000),
merchantAccount,
reference
};
const orderResponse: ICheckout.CheckoutCreateOrderResponse = {expiresAt, orderData: "mocked_order_data", remainingAmount: {currency: "USD", value: 500} };
scope.post("/orders")
.reply(200, orderResponse);
const createOrderResponse: ICheckout.CheckoutCreateOrderResponse = await checkout.orders(orderRequest);
const orderCancelResponse: ICheckout.CheckoutCancelOrderResponse = {
pspReference: "mocked_psp_ref",
resultCode: "CANCELLED"
};
scope.post("/orders/cancel")
.reply(200, orderCancelResponse);
const response: ICheckout.CheckoutCancelOrderResponse = await checkout.ordersCancel({
order: {
orderData: createOrderResponse.orderData,
pspReference: createOrderResponse.pspReference!
},
merchantAccount
});
expect(response).toBeTruthy();
});
});

View File

@@ -1,45 +0,0 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import nock from "nock";
import { createMockClientFromResponse } from "../__mocks__/base";
import {originKeysSuccess} from "../__mocks__/checkoutUtility/originkeysSuccess";
import CheckoutUtility from "../services/checkoutUtility";
import {CheckoutUtilityRequest} from "../typings/checkoutUtility";
import Client from "../client";
describe("Checkout Utility", (): void => {
it("should get origin keys", async (): Promise<void> => {
const client = createMockClientFromResponse();
const checkoutUtility = new CheckoutUtility(client);
const originKeysRequest: CheckoutUtilityRequest = {
originDomains: ["www.test.com", "https://www.your-domain2.com"],
};
nock(`${client.config.checkoutEndpoint}`)
.post(`/${Client.CHECKOUT_UTILITY_API_VERSION}/originKeys`)
.reply(200, originKeysSuccess);
const originKeysResponse = await checkoutUtility.originKeys(originKeysRequest);
expect(originKeysResponse.originKeys["https://www.your-domain1.com"])
.toEqual("pub.v2.7814286629520534.aHR0cHM6Ly93d3cueW91ci1kb21haW4xLmNvbQ.UEwIBmW9-c_uXo5wSEr2w8Hz8hVIpujXPHjpcEse3xI");
});
});

View File

@@ -1,61 +1,123 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import HmacValidator from "../utils/hmacValidator";
import {NotificationRequestItem} from "../typings/notification";
import {HMAC_SIGNATURE} from "../typings/constants/apiConstants";
import { AdditionalData, NotificationItem, NotificationRequestItem } from "../typings/notification/models";
import { ApiConstants } from "../constants/apiConstants";
import NotificationRequest from "../notification/notificationRequest";
const key = "DFB1EB5485895CFA84146406857104ABB4CBCABDC8AAF103A624C8F6A3EAAB00";
const expectedSign = "ipnxGCaUZ4l8TUW75a71/ghd2Fe5ffvX0pV4TLTntIc=";
const notificationRequestItem: NotificationRequestItem = {
pspReference: "pspReference",
originalReference: "originalReference",
merchantAccountCode: "merchantAccount",
merchantReference: "reference",
amount: {currency: "EUR", value: 1000},
eventCode: "EVENT",
eventDate: new Date("01-01-1970"),
paymentMethod: "VISA",
reason: "reason",
success: "true",
additionalData: { [HMAC_SIGNATURE]: expectedSign },
const expectedSign = "ZNBPtI+oDyyRrLyD1XirkKnQgIAlFc07Vj27TeHsDRE=";
const notificationRequestItem: { NotificationRequestItem: NotificationRequestItem } = {
NotificationRequestItem : {
pspReference: "pspReference",
originalReference: "originalReference",
merchantAccountCode: "merchantAccount",
merchantReference: "reference",
amount: {currency: "EUR", value: 1000},
eventCode: NotificationRequestItem.EventCodeEnum.REPORTAVAILABLE,
eventDate: "2019-09-21T11:45:24.637Z",
paymentMethod: "VISA",
reason: "reason",
success: NotificationRequestItem.SuccessEnum.True,
additionalData: { [ApiConstants.HMAC_SIGNATURE]: expectedSign },
}
};
const notification = new NotificationRequest({
live: "false",
notificationItems: [notificationRequestItem as unknown as NotificationItem]
});
describe("HMAC Validator", function (): void {
let hmacValidator: HmacValidator;
beforeEach(() => {
hmacValidator = new HmacValidator();
});
it("should get correct data", function (): void {
const hmacValidator = new HmacValidator();
const dataToSign = hmacValidator.getDataToSign({merchantAccount: "ACC", currencyCode: "EUR"});
expect(dataToSign).toEqual("currencyCode:merchantAccount:EUR:ACC");
});
it("should get correct data with escaped characters", function (): void {
const hmacValidator = new HmacValidator();
const dataToSign = hmacValidator.getDataToSign({currencyCode: "EUR", merchantAccount: "ACC:\\"});
expect(dataToSign).toEqual("currencyCode:merchantAccount:EUR:ACC\\:\\\\");
const dataToSign = hmacValidator.getDataToSign({currencyCode: "EUR", merchantAccount: "ACC:\\", sessionValidity: "2019-09-21T11:45:24.637Z"});
expect(dataToSign).toEqual("currencyCode:merchantAccount:sessionValidity:EUR:ACC\\:\\\\:2019-09-21T11\\:45\\:24.637Z");
});
it("should encrypt correctly", function (): void {
const data = "countryCode:currencyCode:merchantAccount:merchantReference:paymentAmount:sessionValidity:skinCode:NL:EUR:MagentoMerchantTest2:TEST-PAYMENT-2017-02-01-14\\:02\\:05:199:2017-02-02T14\\:02\\:05+01\\:00:PKz2KML1";
const encrypted = hmacValidator.calculateHmac(data, "DFB1EB5485895CFA84146406857104ABB4CBCABDC8AAF103A624C8F6A3EAAB00");
expect(encrypted).toEqual("34oR8T1whkQWTv9P+SzKyp8zhusf9n0dpqrm9nsqSJs=");
});
it("should get correct data to sign", function (): void {
const data = hmacValidator.getDataToSign(notification.notificationItems![0]);
expect(data).toEqual("pspReference:originalReference:merchantAccount:reference:1000:EUR:REPORT_AVAILABLE:true");
});
it("should have valid hmac", function (): void {
const encrypted = hmacValidator.calculateHmac(notification.notificationItems![0], key);
expect(expectedSign).toEqual(encrypted);
expect(hmacValidator.validateHMAC(notification.notificationItems![0], key)).toBeTruthy();
});
it("should have invalid hmac", function (): void {
const invalidNotification = {
...notification.notificationItems![0],
additionalData: { [ApiConstants.HMAC_SIGNATURE as keyof AdditionalData]: "notValidSign" }
};
const result = hmacValidator.validateHMAC(invalidNotification, key);
expect(result).toBeFalsy();
});
it("should test hmac", function () {
const data = "countryCode:currencyCode:merchantAccount:merchantReference:paymentAmount:sessionValidity:skinCode:NL:EUR:MagentoMerchantTest2:TEST-PAYMENT-2017-02-01-14\\:02\\:05:199:2017-02-02T14\\:02\\:05+01\\:00:PKz2KML1";
const key = "DFB1EB5485895CFA84146406857104ABB4CBCABDC8AAF103A624C8F6A3EAAB00";
const hmacValidator = new HmacValidator();
const encrypted = hmacValidator.calculateHmac(data, key);
expect(encrypted).toEqual("34oR8T1whkQWTv9P+SzKyp8zhusf9n0dpqrm9nsqSJs=");
});
it("should get correct data to sign", function (): void {
const hmacValidator = new HmacValidator();
const data = hmacValidator.getDataToSign(notificationRequestItem);
expect(data).toEqual("pspReference:originalReference:merchantAccount:reference:1000:EUR:EVENT:true");
it("should validate HMAC", function () {
expect(hmacValidator.validateHMAC(notification.notificationItems![0], key)).toBeTruthy();
});
it("should have valid hmac", function (): void {
const hmacValidator = new HmacValidator();
const encrypted = hmacValidator.calculateHmac(notificationRequestItem, key);
it("should have valid notification request item HMAC", function () {
const expectedSign = "ipnxGCaUZ4l8TUW75a71/ghd2Fe5ffvX0pV4TLTntIc=";
const notificationRequestItem = { NotificationRequestItem: {
pspReference: "pspReference",
originalReference: "originalReference",
merchantAccountCode: "merchantAccount",
merchantReference: "reference",
amount: { currency: "EUR", value: 1000 },
eventCode: "EVENT",
success: "true",
additionalData: { [ApiConstants.HMAC_SIGNATURE]: expectedSign }
}} as unknown as NotificationItem;
const notification = new NotificationRequest({
live: "false",
notificationItems: [notificationRequestItem]
});
const data = hmacValidator.getDataToSign(notification.notificationItems![0]);
expect("pspReference:originalReference:merchantAccount:reference:1000:EUR:EVENT:true").toEqual(data);
const encrypted = hmacValidator.calculateHmac(notification.notificationItems![0], key);
expect(expectedSign).toEqual(encrypted);
expect(hmacValidator.validateHMAC(notificationRequestItem, key)).toBeTruthy();
});
it("should have invalid hmac", function (): void {
const invalidNotification = {
...notificationRequestItem,
additionalData: { [HMAC_SIGNATURE]: "notValidSign" }
};
const hmacValidator = new HmacValidator();
const result = hmacValidator.validateHMAC(invalidNotification, key);
expect(result).toBeFalsy();
expect(hmacValidator.validateHMAC(notification.notificationItems![0], key)).toBeTruthy();
notification.notificationItems![0].additionalData![ApiConstants.HMAC_SIGNATURE] = "notValidSign";
expect(hmacValidator.validateHMAC(notification.notificationItems![0], key)).toBeFalsy();
});
});

View File

@@ -1,43 +1,69 @@
import nock from "nock";
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import nock, { Interceptor } from "nock";
import Client from "../client";
import Checkout from "../services/checkout";
import ApiException from "../services/exception/apiException";
import {createPaymentsCheckoutRequest} from "./checkout.spec";
import { createPaymentsCheckoutRequest } from "./checkout.spec";
import HttpClientException from "../httpClient/httpClientException";
beforeEach((): void => {
nock.cleanAll();
});
type errorType = "HttpClientException" | "ApiException";
type testOptions = { errorType: errorType; errorMessageContains?: string; errorMessageEquals?: string };
const getResponse = async ({apiKey , environment }: { apiKey: string; environment: Environment}, cb: (scope: Interceptor) => testOptions): Promise<void> => {
const client = new Client({ apiKey, environment });
const checkout = new Checkout(client);
const scope = nock(`${client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}`)
.post("/payments");
const { errorMessageContains, errorMessageEquals, errorType } = cb(scope);
const ErrorException = errorType === "ApiException" ? ApiException : HttpClientException;
try {
await checkout.payments(createPaymentsCheckoutRequest());
fail("request should fail");
} catch (e) {
expect(e instanceof ErrorException).toBeTruthy();
if (errorMessageEquals) expect(e.message).toEqual(errorMessageEquals);
if (errorMessageContains) expect(e.message.toLowerCase()).toContain(errorMessageContains);
}
};
describe("HTTP Client", function (): void {
it("should return ApiException when no API Key is provided", async (): Promise<void> => {
const client = new Client({apiKey: "", environment: "TEST"});
const checkout = new Checkout(client);
it.each`
apiKey | environment | withError | args | errorType | contains | equals
${""} | ${"TEST"} | ${true} | ${["mocked_error_response"]} | ${"ApiException"} | ${"x-api-key"} | ${""}
${"MOCKED_API_KEY"} | ${"TEST"} | ${true} | ${["some_error"]} | ${"ApiException"} | ${""} | ${"some_error"}
${"API_KEY"} | ${"TEST"} | ${false} | ${[401, { status: 401, message: "Invalid Request", errorCode: "171", errorType: "validationError"}]} | ${"HttpClientException"} | ${""} | ${"HTTP Exception: 401. null: Invalid Request"}
${"API_KEY"} | ${"TEST"} | ${false} | ${[401, {}]} | ${"HttpClientException"} | ${""} | ${"HTTP Exception: 401. null"}
${"API_KEY"} | ${"TEST"} | ${false} | ${[401, "fail"]} | ${"HttpClientException"} | ${""} | ${"HTTP Exception: 401. null"}
`("Should return $errorType, $contains, $equals", async ({ apiKey, environment, withError, args, errorType, contains, equals }) => {
await getResponse({ apiKey, environment }, (scope) => {
if (withError) scope.replyWithError(args[0]);
else scope.reply(args[0], args[1]);
nock(`${client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}`)
.post("/payments")
.replyWithError("error");
try {
await checkout.payments(createPaymentsCheckoutRequest());
} catch (e) {
expect(e instanceof ApiException);
expect(e.message).toContain("x-api-key");
}
return { errorType, errorMessageContains: contains, errorMessageEquals: equals };
});
});
it("should return ApiException on request error", async (): Promise<void> => {
const client = new Client({apiKey: "API_KEY", environment: "TEST"});
const checkout = new Checkout(client);
nock(`${client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}`)
.post("/payments")
.replyWithError({message: "error_message", statusCode: 500});
try {
await checkout.payments(createPaymentsCheckoutRequest());
} catch (e) {
expect(e instanceof ApiException);
expect(e.message).toEqual("error_message");
}
});
});
});

View File

@@ -1,65 +1,107 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import authorisationTrue from "../__mocks__/notification/authorisationTrue.json";
import captureTrue from "../__mocks__/notification/captureTrue.json";
import captureFalse from "../__mocks__/notification/captureFalse.json";
import refundTrue from "../__mocks__/notification/refundTrue.json";
import refundFalse from "../__mocks__/notification/refundFalse.json";
import NotificationRequest from "../notification/notificationRequest";
import {NotificationEnum, NotificationRequestItem} from "../typings/notification";
import { Notification, NotificationRequestItem } from "../typings/notification/models";
import NotificationEnum = NotificationRequestItem.EventCodeEnum;
import SuccessEnum = NotificationRequestItem.SuccessEnum;
describe("Notification Test", function (): void {
it("should return authorisation success", function (): void {
const notificationRequest = new NotificationRequest(authorisationTrue);
const notificationRequest = new NotificationRequest(authorisationTrue as unknown as Notification);
expect(notificationRequest.notificationItems).toHaveLength(1);
const notificationRequestItem: NotificationRequestItem = notificationRequest.notificationItems[0];
expect(NotificationEnum.EVENT_CODE_AUTHORISATION).toEqual(notificationRequestItem.eventCode);
expect(notificationRequestItem.success === "true").toBeTruthy();
expect(notificationRequestItem.pspReference).toEqual("123456789");
if (notificationRequest.notificationItems) {
const notificationRequestItem: NotificationRequestItem = notificationRequest.notificationItems[0];
expect(NotificationEnum.AUTHORISATION).toEqual(notificationRequestItem.eventCode);
expect(notificationRequestItem.success === SuccessEnum.True).toBeTruthy();
expect(notificationRequestItem.pspReference).toEqual("123456789");
} else {
fail();
}
});
it("should return capture success", function (): void {
const notificationRequest = new NotificationRequest(captureTrue);
const notificationRequest = new NotificationRequest(captureTrue as unknown as Notification);
expect(notificationRequest.notificationItems).toHaveLength(1);
const notificationRequestItem = notificationRequest.notificationItems[0];
expect(NotificationEnum.EVENT_CODE_CAPTURE).toEqual(notificationRequestItem.eventCode);
expect(notificationRequestItem.success === "true").toBeTruthy();
expect(notificationRequestItem.pspReference).toEqual("PSP_REFERENCE");
expect(notificationRequestItem.originalReference).toEqual("ORIGINAL_PSP");
if (notificationRequest.notificationItems) {
const notificationRequestItem = notificationRequest.notificationItems[0];
expect(NotificationEnum.CAPTURE).toEqual(notificationRequestItem.eventCode);
expect(notificationRequestItem.success === SuccessEnum.True).toBeTruthy();
expect(notificationRequestItem.pspReference).toEqual("PSP_REFERENCE");
expect(notificationRequestItem.originalReference).toEqual("ORIGINAL_PSP");
} else {
fail();
}
});
it("should return capture fail", function (): void {
const notificationRequest = new NotificationRequest(captureFalse);
const notificationRequest = new NotificationRequest(captureFalse as unknown as Notification);
expect(notificationRequest.notificationItems).toHaveLength(1);
const notificationRequestItem = notificationRequest.notificationItems[0];
expect(NotificationEnum.EVENT_CODE_CAPTURE).toEqual(notificationRequestItem.eventCode);
expect(notificationRequestItem.success === "true").toBeFalsy();
expect(notificationRequestItem.pspReference).toEqual("PSP_REFERENCE");
expect(notificationRequestItem.originalReference).toEqual("ORIGINAL_PSP");
if (notificationRequest.notificationItems) {
const notificationRequestItem = notificationRequest.notificationItems[0];
expect(NotificationEnum.CAPTURE).toEqual(notificationRequestItem.eventCode);
expect(notificationRequestItem.success === SuccessEnum.True).toBeFalsy();
expect(notificationRequestItem.pspReference).toEqual("PSP_REFERENCE");
expect(notificationRequestItem.originalReference).toEqual("ORIGINAL_PSP");
} else {
fail();
}
});
it("should return refund success", function (): void {
const notificationRequest = new NotificationRequest(refundTrue);
const notificationRequest = new NotificationRequest(refundTrue as unknown as Notification);
expect(notificationRequest.notificationItems).toHaveLength(1);
const notificationRequestItem = notificationRequest.notificationItems[0];
expect(NotificationEnum.EVENT_CODE_REFUND).toEqual(notificationRequestItem.eventCode);
expect(notificationRequestItem.success === "true").toBeTruthy();
expect(notificationRequestItem.pspReference).toEqual("PSP_REFERENCE");
expect(notificationRequestItem.originalReference).toEqual("ORIGINAL_PSP");
expect(notificationRequestItem.eventDate).toBeDefined();
if (notificationRequest.notificationItems) {
const notificationRequestItem = notificationRequest.notificationItems[0];
expect(NotificationEnum.REFUND).toEqual(notificationRequestItem.eventCode);
expect(notificationRequestItem.success === SuccessEnum.True).toBeTruthy();
expect(notificationRequestItem.pspReference).toEqual("PSP_REFERENCE");
expect(notificationRequestItem.originalReference).toEqual("ORIGINAL_PSP");
expect(notificationRequestItem.eventDate).toBeDefined();
} else {
fail();
}
});
it("should return refund fail", function (): void {
const notificationRequest = new NotificationRequest(refundFalse);
const notificationRequest = new NotificationRequest(refundFalse as unknown as Notification);
expect(notificationRequest.notificationItems).toHaveLength(1);
const notificationRequestItem = notificationRequest.notificationItems[0];
expect(NotificationEnum.EVENT_CODE_REFUND).toEqual(notificationRequestItem.eventCode);
expect(notificationRequestItem.success === "true").toBeFalsy();
expect(notificationRequestItem.pspReference).toEqual("PSP_REFERENCE");
expect(notificationRequestItem.originalReference).toEqual("ORIGINAL_PSP");
expect(notificationRequestItem.eventDate).toBeDefined();
if (notificationRequest.notificationItems) {
const notificationRequestItem = notificationRequest.notificationItems[0];
expect(NotificationEnum.REFUND).toEqual(notificationRequestItem.eventCode);
expect(notificationRequestItem.success === SuccessEnum.True).toBeFalsy();
expect(notificationRequestItem.pspReference).toEqual("PSP_REFERENCE");
expect(notificationRequestItem.originalReference).toEqual("ORIGINAL_PSP");
expect(notificationRequestItem.eventDate).toBeDefined();
} else {
fail();
}
});
});

View File

@@ -1,19 +1,34 @@
import nock from "nock";
import { createMockClientFromResponse } from "../__mocks__/base";
import Payout from "../services/payout";
import {
ModifyRequest,
StoreDetailAndSubmitRequest,
StoreDetailRequest, SubmitRequest, PayoutRequest
} from "../typings/payout";
import { FRAUD_MANUAL_REVIEW, FRAUD_RESULT_TYPE } from "../typings/constants/apiConstants";
import Client from "../client";
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import nock from "nock";
import { createClient } from "../__mocks__/base";
import Payout from "../services/payout";
import Client from "../client";
import StoreDetailRequest = IPayouts.StoreDetailRequest;
import { ApiConstants } from "../constants/apiConstants";
const isCI = process.env.CI === "true" || (typeof process.env.CI === "boolean" && process.env.CI);
const storeDetailAndSubmitThirdParty = JSON.stringify({
additionalData: {
fraudResultType: "GREEN",
fraudManualReview: "false",
},
pspReference: "8515131751004933",
resultCode: "[payout-submit-received]"
@@ -28,49 +43,56 @@ const storeDetail = JSON.stringify({
const amountAndReference = {
amount: {
value: 1000,
currency: "USD"
value: 100,
currency: "EUR"
},
reference: "randomReference",
};
const defaultData = {
dateOfBirth: new Date(),
dateOfBirth: (new Date()).toISOString(),
nationality: "NL",
shopperEmail: "johndoe@email.com",
shopperReference: "shopperReference",
};
const mockStoreDetailRequest = (merchantAccount: string): StoreDetailRequest => ({
const mockStoreDetailRequest = (merchantAccount: string = process.env.ADYEN_MERCHANT!): IPayouts.StoreDetailRequest => ({
...defaultData,
entityType: "NaturalPerson",
card: {
cvc: "737",
expiryMonth: "03",
expiryYear: "2020",
number: "4111111111111111",
holderName: "John Smith"
},
entityType: "Company",
recurring: {
contract: "ONECLICK"
contract: "PAYOUT"
},
merchantAccount,
});
const mockSubmitRequest = (merchantAccount: string): SubmitRequest => ({
const mockSubmitRequest = (merchantAccount: string = process.env.ADYEN_MERCHANT!): IPayouts.SubmitRequest => ({
selectedRecurringDetailReference: "LATEST",
recurring: {
contract: "ONECLICK"
contract: "PAYOUT"
},
...defaultData,
...amountAndReference,
merchantAccount,
});
const mockStoreDetailAndSubmitRequest = (merchantAccount: string): StoreDetailAndSubmitRequest => ({
const mockStoreDetailAndSubmitRequest = (merchantAccount?: string): IPayouts.StoreDetailAndSubmitRequest => ({
...amountAndReference,
...(mockStoreDetailRequest(merchantAccount)),
});
const mockPayoutRequest = (merchantAccount: string): PayoutRequest => ({
const mockPayoutRequest = (merchantAccount: string = process.env.ADYEN_MERCHANT!): IPayouts.PayoutRequest => ({
...amountAndReference,
...defaultData,
card: {
expiryMonth: "10",
expiryYear: "2020",
expiryMonth: "03",
expiryYear: "2030",
holderName: "John Smith",
number: "4111111111111111",
},
@@ -78,92 +100,125 @@ const mockPayoutRequest = (merchantAccount: string): PayoutRequest => ({
});
let client: Client;
let clientStore: Client;
let clientReview: Client;
let payout: Payout;
let scope: nock.Scope;
beforeEach((): void => {
client = createMockClientFromResponse();
if (!nock.isActive()) {
nock.activate();
}
client = createClient();
clientStore = createClient(process.env.ADYEN_STOREPAYOUT_APIKEY);
clientReview = createClient(process.env.ADYEN_REVIEWPAYOUT_APIKEY);
scope = nock(`${client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}`);
payout = new Payout(client);
});
describe("PayoutTest", function (): void {
it("should succeed on store detail and submit third party", async function (): Promise<void> {
const request: StoreDetailAndSubmitRequest = mockStoreDetailAndSubmitRequest(`${client.config.merchantAccount}`);
scope.post("/storeDetail").reply(200, storeDetailAndSubmitThirdParty);
afterEach((): void => {
nock.cleanAll();
});
const result = await payout.storeDetail(request);
describe("PayoutTest", function (): void {
test.each([isCI, true])("should succeed on store detail and submit third party, isMock: %p", async function (isMock): Promise<void> {
!isMock && nock.restore();
payout = new Payout(clientStore);
const request: IPayouts.StoreDetailAndSubmitRequest = mockStoreDetailAndSubmitRequest();
scope.post("/storeDetailAndSubmitThirdParty").reply(200, storeDetailAndSubmitThirdParty);
const result = await payout.storeDetailAndSubmitThirdParty(request);
expect(result.resultCode).toEqual("[payout-submit-received]");
expect(result.pspReference).toEqual("8515131751004933");
expect(result.additionalData[FRAUD_RESULT_TYPE]).toEqual("GREEN");
expect(result.additionalData[FRAUD_MANUAL_REVIEW]).toEqual("false");
expect(result.pspReference).toBeTruthy();
});
it("should succeed on store detail", async function (): Promise<void> {
test.each([false, true])("should succeed on store detail, isMock: %p", async function (isMock): Promise<void> {
!isMock && nock.restore();
payout = new Payout(clientStore);
scope.post("/storeDetail").reply(200, storeDetail);
const request: StoreDetailRequest = mockStoreDetailRequest("MOCKED_MERCHANT_ACC");
const request: StoreDetailRequest = mockStoreDetailRequest();
const result = await payout.storeDetail(request);
expect("Success").toEqual(result.resultCode);
expect("8515136787207087").toEqual(result.pspReference);
expect("8415088571022720").toEqual(result.recurringDetailReference);
expect(result.pspReference).toBeTruthy();
expect(result.recurringDetailReference).toBeTruthy();
});
it("should succeed on confirm third party", async function (): Promise<void> {
test.each([isCI, true])("should succeed on confirm third party, isMock: %p", async function (isMock): Promise<void> {
!isMock && nock.restore();
payout = new Payout(clientStore);
scope.post("/storeDetail").reply(200, storeDetail);
const storeRequest: StoreDetailRequest = mockStoreDetailRequest();
const storeResult = await payout.storeDetail(storeRequest);
payout = new Payout(clientReview);
scope.post("/confirmThirdParty")
.reply(200, {
pspReference: "8815131762537886",
response: "[payout-confirm-received]"
});
const request: ModifyRequest = {
merchantAccount: "MOCKED_MERCHANT_ACCOUNT",
originalReference: "reference"
const request: IPayouts.ModifyRequest = {
merchantAccount: process.env.ADYEN_MERCHANT!,
originalReference: storeResult.pspReference
};
const result = await payout.confirmThirdParty(request);
expect(result.response).toEqual("[payout-confirm-received]");
expect(result.pspReference).toEqual("8815131762537886");
expect(result.pspReference).toBeTruthy();
});
it("should succeed on submit third party", async function (): Promise<void> {
test.each([isCI, true])("should succeed on submit third party, isMock: %p", async function (isMock): Promise<void> {
!isMock && nock.restore();
payout = new Payout(clientStore);
scope.post("/submitThirdParty").reply(200, storeDetailAndSubmitThirdParty);
const request: SubmitRequest = mockSubmitRequest("MOCKED_MERCHANT_ACC");
const request: IPayouts.SubmitRequest = mockSubmitRequest();
const result = await payout.submitThirdparty(request);
expect(result.resultCode).toEqual("[payout-submit-received]");
expect(result.pspReference).toEqual("8515131751004933");
expect(result.additionalData[FRAUD_RESULT_TYPE]).toEqual("GREEN");
expect(result.additionalData[FRAUD_MANUAL_REVIEW]).toEqual("false");
expect(result.pspReference).toBeTruthy();
if (result.additionalData) {
expect(result.additionalData[ApiConstants.FRAUD_RESULT_TYPE]).toEqual("GREEN");
expect(result.additionalData[ApiConstants.FRAUD_MANUAL_REVIEW]).toEqual("false");
}
});
it("should succeed on decline third party", async function (): Promise<void> {
scope.post("/storeDetailAndSubmitThirdParty").reply(200, {
pspReference: "8815131762537886",
response: "[payout-confirm-received]"
});
test.each([false, true])("should succeed on decline third party, isMock: %p", async function (isMock): Promise<void> {
!isMock && nock.restore();
payout = new Payout(clientStore);
scope.post("/storeDetail").reply(200, storeDetail);
const storeRequest: StoreDetailRequest = mockStoreDetailRequest();
const storeResult = await payout.storeDetail(storeRequest);
const request: ModifyRequest = {
merchantAccount: "MOCKED_MERCHANT_ACC",
originalReference: "reference"
payout = new Payout(clientReview);
const request: IPayouts.ModifyRequest = {
merchantAccount: process.env.ADYEN_MERCHANT!,
originalReference: storeResult.pspReference
};
scope.post("/declineThirdParty")
.reply(200, {
pspReference: "8815131762537886",
response: "[payout-decline-received]"
});
const result = await payout.declineThirdParty(request);
expect(result.response).toEqual("[payout-confirm-received]");
expect(result.pspReference).toEqual("8815131762537886");
expect(result.response).toEqual("[payout-decline-received]");
expect(result.pspReference).toBeTruthy();
});
it("should succeed on payout", async function (): Promise<void> {
test.each([isCI, true])("should succeed on payout, isMock: %p", async function (isMock): Promise<void> {
!isMock && nock.restore();
scope.post("/payout").reply(200, {
pspReference: "8815131762537886",
resultCode: "Received",
});
const request = mockPayoutRequest("MOCKED_MERCHANT_ACC");
const request = mockPayoutRequest();
const result = await payout.payout(request);
expect(result.resultCode).toEqual("Received");
expect(result.pspReference).toEqual("8815131762537886");
expect(result.pspReference).toBeTruthy();
});
});

View File

@@ -0,0 +1,532 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import nock from "nock";
import { createMock } from "ts-auto-mock";
import { createBasicAuthClient } from "../__mocks__/base";
import { documentContent } from "../__mocks__/platforms/documentContent";
import { Client, Platforms } from "../index";
import A = IPlatformsAccount;
import F = IPlatformsFund;
import N = IPlatformsNotificationConfiguration;
import H = IPlatformsHostedOnboardingPage;
import AccountHolderDetails = A.AccountHolderDetails;
import NotificationConfigurationDetails = N.NotificationConfigurationDetails;
import HttpClientException from "../httpClient/httpClientException";
let client: Client;
let platforms: Platforms;
let scope: nock.Scope;
let accountHolder: A.CreateAccountHolderResponse;
let account: A.CreateAccountResponse;
let accountHolderToSuspend: A.CreateAccountHolderResponse;
let accountToClose: A.CreateAccountResponse;
let accountHolderToUnSuspend: A.CreateAccountHolderResponse;
let accountHolderToClose: A.CreateAccountHolderResponse;
let notificationConfigurationToRetrieve: N.GetNotificationConfigurationResponse;
const generateRandomCode = (): string => Math.floor(Math.random() * Date.now()).toString();
const accountHolderDetails: AccountHolderDetails = {
email: "random_email@example.com",
fullPhoneNumber: "312030291928",
webAddress: "http://example.com",
individualDetails: {
name: {
firstName: "John",
gender: "MALE",
lastName: "Smith"
}
},
address: {
country: "NL"
},
};
const notificationConfigurationDetails: NotificationConfigurationDetails = {
active: true,
notifyURL: "https://www.adyen.com/notification-handler",
eventConfigs: [
{
eventType: "ACCOUNT_HOLDER_VERIFICATION",
includeMode: "INCLUDE"
}
],
sslProtocol: "SSL"
};
const assertError = (e: HttpClientException): void => {
if (e.responseBody?.includes("Account code does not exist or invalid") || e.responseBody?.includes("Failed to retrieve account holder")) {
return;
}
fail(e);
};
beforeEach((): void => {
if (!nock.isActive()) {
nock.activate();
}
client = createBasicAuthClient();
client.config.password = process.env.ADYEN_MARKETPLACE_PASSWORD;
client.config.username = process.env.ADYEN_MARKETPLACE_USER;
scope = nock(client.config.marketPayEndpoint!);
platforms = new Platforms(client);
});
afterEach(() => {
nock.cleanAll();
});
describe("Platforms Test", function () {
describe("Account", function(): void {
describe("Accounts", function () {
const cases = [
["closeAccount", createMock<A.CloseAccountRequest>(), createMock<A.CloseAccountResponse>()],
["updateAccount", createMock<A.UpdateAccountRequest>(), createMock<A.UpdateAccountResponse>()],
["createAccount", createMock<A.CreateAccountRequest>(), createMock<A.CreateAccountResponse>()],
["uploadDocument", createMock<A.UploadDocumentRequest>(), createMock<A.GetUploadedDocumentsResponse>()],
["getUploadedDocuments", createMock<A.GetUploadedDocumentsRequest>(), createMock<A.GetUploadedDocumentsResponse>()],
["deleteBankAccounts", createMock<A.DeleteBankAccountRequest>(), createMock<A.GenericResponse>()],
["deletePayoutMethods", createMock<A.DeletePayoutMethodRequest>(), createMock<A.GenericResponse>()],
["deleteShareholders", createMock<A.DeleteShareholderRequest>(), createMock<A.GenericResponse>()],
["checkAccountHolder", createMock<A.PerformVerificationRequest>(), createMock<A.GenericResponse>()],
["createAccountHolder", createMock<A.CreateAccountRequest>(), createMock<A.CreateAccountHolderRequest>()],
["getAccountHolder", createMock<A.GetAccountHolderRequest>(), createMock<A.GetAccountHolderRequest>()],
["updateAccountHolder", createMock<A.UpdateAccountHolderRequest>(), createMock<A.UpdateAccountHolderResponse>()],
["updateAccountHolderState", createMock<A.UpdateAccountHolderStateRequest>(), createMock<A.GetAccountHolderStatusResponse>()],
["suspendAccountHolder", createMock<A.SuspendAccountHolderRequest>(), createMock<A.SuspendAccountHolderResponse>()],
["unSuspendAccountHolder", createMock<A.UnSuspendAccountHolderRequest>(), createMock<A.UnSuspendAccountHolderResponse>()],
["closeAccountHolder", createMock<A.CloseAccountHolderRequest>(), createMock<A.CloseAccountResponse>()],
];
test.each(cases)(
"should %p",
async (...args) => {
const service = platforms.Account;
scope.post(`/Account/${Client.MARKETPAY_ACCOUNT_API_VERSION}//${args[0]}`).reply(200, args[2]);
const result = await service[args[0] as string](args[1] as never);
expect(result).toMatchObject(args[2]);
}
);
});
});
describe("Fund", function () {
const cases = [
["accountHolderBalance", createMock<F.AccountHolderBalanceRequest>(), createMock<F.AccountHolderBalanceResponse>()],
["accountHolderTransactionList", createMock<F.AccountHolderTransactionListRequest>(), createMock<F.AccountHolderTransactionListResponse>()],
["payoutAccountHolder", createMock<F.PayoutAccountHolderRequest>(), createMock<F.PayoutAccountHolderResponse>()],
["transferFunds", createMock<F.TransferFundsRequest>(), createMock<F.TransferFundsResponse>()],
["refundFundsTransfer", createMock<F.RefundFundsTransferRequest>(), createMock<F.RefundFundsTransferResponse>()],
["setupBeneficiary", createMock<F.SetupBeneficiaryRequest>(), createMock<F.SetupBeneficiaryResponse>()],
["refundNotPaidOutTransfers", createMock<F.RefundNotPaidOutTransfersRequest>(), createMock<F.RefundNotPaidOutTransfersResponse>()],
];
test.each(cases)(
"should %p",
async (...args) => {
const fund = platforms.Fund;
scope.post(`/Fund/${Client.MARKETPAY_FUND_API_VERSION}//${args[0]}`).reply(200, args[2]);
const result = await fund[args[0] as string](args[1] as never);
expect(result).toMatchObject(args[2]);
}
);
});
describe("Notification Configuration", function() {
const cases = [
["createNotificationConfiguration", createMock<N.CreateNotificationConfigurationRequest>(), createMock<N.GetNotificationConfigurationResponse>()],
["getNotificationConfiguration", createMock<N.GetNotificationConfigurationRequest>(), createMock<N.GetNotificationConfigurationResponse>()],
["getNotificationConfigurationList", {}, createMock<N.GetNotificationConfigurationListResponse>()],
["testNotificationConfiguration", createMock<N.TestNotificationConfigurationRequest>(), createMock<N.TestNotificationConfigurationResponse>()],
["updateNotificationConfiguration", createMock<N.UpdateNotificationConfigurationRequest>(), createMock<N.GetNotificationConfigurationResponse>()],
["deleteNotificationConfigurations", createMock<N.DeleteNotificationConfigurationRequest>(), createMock<N.GenericResponse>()],
];
test.each(cases)(
"should %p",
async (...args) => {
const notificationConfiguration = platforms.NotificationConfiguration;
scope.post(`/Notification/${Client.MARKETPAY_NOTIFICATION_CONFIGURATION_API_VERSION}//${args[0]}`).reply(200, args[2]);
const result = await notificationConfiguration[args[0] as string](args[1] as never);
expect(result).toMatchObject(args[2]);
}
);
});
describe("Hop", function () {
const cases = [
["getOnboardingUrl", createMock<H.GetOnboardingUrlRequest>(), createMock<H.GetOnboardingUrlResponse>()]
];
test.each(cases)(
"should %p",
async (...args) => {
const hostedOnboardingPage = platforms.HostedOnboardingPage;
scope.post(`/Hop/${Client.MARKETPAY_HOP_API_VERSION}//${args[0]}`).reply(200, args[2]);
const result = await hostedOnboardingPage[args[0] as string](args[1] as never);
expect(result).toMatchObject(args[2]);
}
);
});
});
describe.skip("Platforms Test E2E", function(): void {
beforeAll(async (done) => {
accountHolder = await platforms.Account.createAccountHolder({
accountHolderCode: generateRandomCode(),
accountHolderDetails,
legalEntity: "Individual",
});
account = await platforms.Account.createAccount({
accountHolderCode: generateRandomCode(),
description: "This is a new account",
metadata: {meta: "data"},
payoutSchedule: "WEEKLY"
});
accountHolderToSuspend = await platforms.Account.createAccountHolder({
accountHolderCode: generateRandomCode(),
accountHolderDetails,
legalEntity: "Individual"
});
accountToClose = await platforms.Account.createAccount({
accountHolderCode: generateRandomCode(),
description: "This is a new account",
metadata: {meta: "data"},
payoutSchedule: "WEEKLY"
});
accountHolderToUnSuspend = await platforms.Account.createAccountHolder({
accountHolderCode: generateRandomCode(),
accountHolderDetails,
legalEntity: "Individual"
});
await platforms.Account.suspendAccountHolder({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode});
accountHolderToClose = await platforms.Account.createAccountHolder({
accountHolderCode: generateRandomCode(),
accountHolderDetails,
legalEntity: "Individual"
});
notificationConfigurationToRetrieve = await platforms.NotificationConfiguration.createNotificationConfiguration({
configurationDetails: {
...notificationConfigurationDetails,
description: `${generateRandomCode()}`
}
});
done();
});
describe("Account", function(): void {
describe("Accounts E2E", function () {
it("should create account holder", async function() {
nock.restore();
try {
expect(accountHolder.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should get account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.getAccountHolder({
accountHolderCode: accountHolder.accountHolderCode,
});
expect(result.accountHolderDetails.email).toEqual("random_email@example.com");
} catch (e) {
assertError(e);
}
});
it("should update account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.updateAccountHolder({
accountHolderCode: accountHolder.accountHolderCode,
accountHolderDetails: {
...accountHolderDetails,
address: {
country: "BE"
}
}
});
expect(result.accountHolderDetails!.address?.country).toEqual("BE");
} catch (e) {
assertError(e);
}
});
it("should check account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.checkAccountHolder({
accountHolderCode: accountHolder.accountHolderCode,
accountStateType: "Processing",
tier: 2
});
expect(result.resultCode).toEqual("Success");
} catch (e) {
assertError(e);
}
});
it("should create an account", async function() {
nock.restore();
try {
expect(account.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should upload verification document", async function() {
nock.restore();
try {
const result = await platforms.Account.uploadDocument({
documentContent,
documentDetail: {
accountHolderCode: account.accountHolderCode,
documentType: "ID_CARD_FRONT",
description: "test document 000",
filename: "IDCardFront.png"
}
});
expect(result.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should get uploaded verification documents", async function() {
nock.restore();
try {
await platforms.Account.uploadDocument({
documentContent,
documentDetail: {
accountHolderCode: account.accountHolderCode,
documentType: "ID_CARD_FRONT",
description: "test document 000",
filename: "IDCardFront.png"
}
});
const result = await platforms.Account.getUploadedDocuments({
accountHolderCode: account.accountHolderCode,
});
expect(result.documentDetails![0].filename).toEqual("IDCardFront.png");
} catch (e) {
assertError(e);
}
});
it("should close account", async function() {
nock.restore();
try {
const result = await platforms.Account.closeAccount({
accountCode: accountToClose.accountCode
});
expect(result.status).toEqual("Closed");
} catch (e) {
assertError(e);
}
});
it("should suspend account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.suspendAccountHolder({
accountHolderCode: accountHolderToSuspend.accountHolderCode,
});
expect(result.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should unsuspend account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.unSuspendAccountHolder({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode });
expect(result.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should update account holder state", async function() {
nock.restore();
try {
const result = await platforms.Account.updateAccountHolderState({
accountHolderCode: accountHolder.accountHolderCode,
disable: false,
stateType: "Payout"
});
expect(result.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should close account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.closeAccountHolder({
accountHolderCode: accountHolderToClose.accountHolderCode
});
expect(result.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
});
});
describe("Fund", function () {
it("should retrieve the balance of an account holder", async function() {
nock.restore();
try {
const result = await platforms.Fund.accountHolderBalance({
accountHolderCode: generateRandomCode()
});
expect(result.balancePerAccount![0].detailBalance).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should retrieve a list of transaction for an account holder's accounts", async function() {
nock.restore();
try {
const result = await platforms.Fund.accountHolderTransactionList({
accountHolderCode: generateRandomCode()
});
expect(result.accountTransactionLists![0].transactions).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should transfer funds between two accounts", async function() {
nock.restore();
try {
const result = await platforms.Fund.transferFunds({
sourceAccountCode: "8515883280985939",
destinationAccountCode: "8815883278206345",
amount: {
currency: "EUR",
value: 1
},
transferCode: "SUBSCRIPTION"
});
expect(result.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
});
describe("Notification Configuration", function () {
let configurationID: number;
it("should retrieve all Notification Configurations", async function() {
nock.restore();
try {
const result = await platforms.NotificationConfiguration.getNotificationConfigurationList({});
const resultStr = JSON.stringify(result);
expect(resultStr.includes("pspReference")).toBeTruthy();
} catch (e) {
assertError(e);
}
});
it("should create a Notification Configuration", async function() {
nock.restore();
try {
const result = await platforms.NotificationConfiguration.createNotificationConfiguration({
configurationDetails: {
...notificationConfigurationDetails,
description: `${generateRandomCode()}`
}
});
expect(result.configurationDetails.active).toBeTruthy();
} catch (e) {
assertError(e);
}
});
it("should retrieve a Notification Configuration", async function() {
nock.restore();
try {
configurationID = notificationConfigurationToRetrieve.configurationDetails.notificationId!;
const result = await platforms.NotificationConfiguration.getNotificationConfiguration({
notificationId: configurationID
});
expect(result.configurationDetails.notifyURL).toEqual("https://www.adyen.com/notification-handler");
} catch (e) {
assertError(e);
}
});
it("should update a Notification Configuration", async function() {
nock.restore();
try {
const result = await platforms.NotificationConfiguration.updateNotificationConfiguration({
configurationDetails: {
eventConfigs: [
{
eventType: "ACCOUNT_HOLDER_VERIFICATION",
includeMode: "EXCLUDE"
},
{
"eventType": "ACCOUNT_CREATED",
"includeMode": "INCLUDE"
}
],
notifyURL: "https://www.adyen.com/notification-handler",
notificationId: configurationID
}
});
const accountHolderVerification = result.configurationDetails.eventConfigs.filter(event => event.eventType === "ACCOUNT_HOLDER_VERIFICATION")[0];
expect(accountHolderVerification.includeMode).toEqual("EXCLUDE");
} catch (e) {
assertError(e);
}
});
it("should delete a Notification Configuration", async function() {
nock.restore();
const notificationIds = [];
notificationIds.push(configurationID);
try {
const result = await platforms.NotificationConfiguration.deleteNotificationConfigurations({notificationIds});
expect(result.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
});
});

View File

@@ -1,50 +1,128 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import nock from "nock";
import { createMockClientFromResponse } from "../__mocks__/base";
import { createClient } from "../__mocks__/base";
import { disableSuccess } from "../__mocks__/recurring/disableSuccess";
import { listRecurringDetailsSuccess } from "../__mocks__/recurring/listRecurringDetailsSuccess";
import Recurring from "../services/recurring";
import { DisableRequest, RecurringDetailsRequest } from "../typings/recurring";
import Client from "../client";
import { paymentsSuccess } from "../__mocks__/checkout/paymentsSuccess";
import { createPaymentsCheckoutRequest } from "./checkout.spec";
import Checkout from "../services/checkout";
const createRecurringDetailsRequest = (): RecurringDetailsRequest => {
const createRecurringDetailsRequest = (): IRecurring.RecurringDetailsRequest => {
return {
merchantAccount: "MerchantAccount",
recurring: {contract: "ONECLICK"},
shopperReference: "test-123",
merchantAccount: process.env.ADYEN_MERCHANT!,
recurring: { contract: "RECURRING" },
shopperReference: "shopperReference",
};
};
const isCI = process.env.CI === "true" || (typeof process.env.CI === "boolean" && process.env.CI);
let client: Client;
let recurring: Recurring;
let checkout: Checkout;
let scope: nock.Scope;
beforeEach((): void => {
client = createMockClientFromResponse();
if (!nock.isActive()) {
nock.activate();
}
client = createClient();
recurring = new Recurring(client);
checkout = new Checkout(client);
scope = nock(`${client.config.endpoint}/pal/servlet/Recurring/${Client.RECURRING_API_VERSION}`);
});
afterEach(() => {
nock.cleanAll();
});
describe("Recurring", (): void => {
it("should test have recurring details list", async (): Promise<void> => {
test.each([false, true])("should test have recurring details list, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
scope.post("/listRecurringDetails")
.reply(200, listRecurringDetailsSuccess);
const request = createRecurringDetailsRequest();
const result = await recurring.listRecurringDetails(request);
expect(result).toEqual(listRecurringDetailsSuccess);
try {
const result = await recurring.listRecurringDetails(request);
expect(result).toBeTruthy();
} catch (e) {
fail(e.message);
}
});
it("should disable", async (): Promise<void> => {
test.each([isCI, true])("should disable, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
scope.post("/payments")
.reply(200, paymentsSuccess);
const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest();
const res = await checkout.payments(paymentsRequest);
scope.post("/disable")
.reply(200, disableSuccess);
const request: DisableRequest = {
merchantAccount: "MerchantAccount",
recurringDetailReference: "reference",
shopperReference: "test-123",
const request: IRecurring.DisableRequest = {
merchantAccount: process.env.ADYEN_MERCHANT!,
shopperReference: "shopperReference",
recurringDetailReference: res.additionalData!["recurring.recurringDetailReference"]
};
const result = await recurring.disable(request);
expect(result).toEqual(disableSuccess);
try {
const result = await recurring.disable(request);
expect(result).toBeTruthy();
} catch (e) {
fail(e.message);
}
});
// TODO: register account for AccountUpdater and unmock test
test.each([true])("should schedule account updater, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
const scheduleAccountUpdaterSuccess: IRecurring.ScheduleAccountUpdaterResult = {
pspReference: "mocked_psp",
result: "SUCCESS"
};
scope.post("/scheduleAccountUpdater")
.reply(200, scheduleAccountUpdaterSuccess);
const request: IRecurring.ScheduleAccountUpdaterRequest = {
merchantAccount: process.env.ADYEN_MERCHANT!,
reference: "ref",
card: {
expiryMonth: "03",
expiryYear: "2030",
holderName: "John Smith",
number: "4111111111111111"
}
};
try {
const result = await recurring.scheduleAccountUpdater(request);
expect(result).toBeTruthy();
} catch (e) {
fail(e.message);
}
});
});

View File

@@ -1,40 +1,85 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import nock from "nock";
import {createMockClientFromResponse, createTerminalAPIPaymentRequest} from "../__mocks__/base";
import {asyncRes} from "../__mocks__/terminalApi/async";
import {syncRes} from "../__mocks__/terminalApi/sync";
import { createClient, createTerminalAPIPaymentRequest, createTerminalAPIRefundRequest } from "../__mocks__/base";
import { asyncRes } from "../__mocks__/terminalApi/async";
import { syncRefund, syncRes } from "../__mocks__/terminalApi/sync";
import Client from "../client";
import TerminalCloudAPI from "../services/terminalCloudAPI";
import {Convert, TerminalApiRequest, TerminalApiResponse} from "../typings/terminal";
import { TerminalApiResponse } from "../typings/terminal/models";
let client: Client;
let terminalCloudAPI: TerminalCloudAPI;
let scope: nock.Scope;
beforeEach((): void => {
client = createMockClientFromResponse();
if (!nock.isActive()) {
nock.activate();
}
client = createClient(process.env.ADYEN_TERMINAL_APIKEY);
client.config.merchantAccount = process.env.ADYEN_TERMINAL_MERCHANT;
terminalCloudAPI = new TerminalCloudAPI(client);
scope = nock(`${client.config.terminalApiCloudEndpoint}`);
});
afterEach((): void => {
nock.cleanAll();
});
const isCI = process.env.CI === "true" || (typeof process.env.CI === "boolean" && process.env.CI);
describe("Terminal Cloud API", (): void => {
it("should make an async payment request", async (): Promise<void> => {
test.each([isCI, true])("should make an async payment request, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
scope.post("/async").reply(200, asyncRes);
const terminalAPIPaymentRequest: TerminalApiRequest = createTerminalAPIPaymentRequest() as TerminalApiRequest;
const terminalAPIPaymentRequest = createTerminalAPIPaymentRequest();
const requestResponse: string = await terminalCloudAPI.async(terminalAPIPaymentRequest);
expect(requestResponse).toEqual("ok");
});
it("should make a sync payment request", async (): Promise<void> => {
const response = Convert.toTerminalApiResponse(syncRes);
scope.post("/sync").reply(200, response);
test.each([isCI, true])("should make a sync payment request, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
scope.post("/sync").reply(200, syncRes);
const terminalAPIPaymentRequest: TerminalApiRequest = createTerminalAPIPaymentRequest() as TerminalApiRequest;
const terminalAPIPaymentRequest = createTerminalAPIPaymentRequest();
const terminalAPIResponse: TerminalApiResponse = await terminalCloudAPI.sync(terminalAPIPaymentRequest);
expect(terminalAPIResponse).toEqual(response);
expect(terminalAPIResponse.saleToPOIResponse?.paymentResponse).toBeDefined();
expect(terminalAPIResponse.saleToPOIResponse?.messageHeader).toBeDefined();
});
test.each([isCI, true])("should make an async refund request, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
scope.post("/sync").reply(200, syncRes);
const terminalAPIPaymentRequest = createTerminalAPIPaymentRequest();
const terminalAPIResponse: TerminalApiResponse = await terminalCloudAPI.sync(terminalAPIPaymentRequest);
scope.post("/sync").reply(200, syncRefund);
const terminalAPIRefundRequest = createTerminalAPIRefundRequest(terminalAPIResponse.saleToPOIResponse?.paymentResponse?.pOIData.pOITransactionID!);
const terminalAPIRefundResponse = await terminalCloudAPI.sync(terminalAPIRefundRequest);
expect(terminalAPIRefundResponse.saleToPOIResponse?.reversalResponse).toBeDefined();
});
});

View File

@@ -1,9 +1,28 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import nock from "nock";
import {createMockClientFromResponse, createTerminalAPIPaymentRequest} from "../__mocks__/base";
import {localEncRes, localSecuredRes, wrongEncRes} from "../__mocks__/terminalApi/local";
import { createClient, createTerminalAPIPaymentRequest } from "../__mocks__/base";
import { localEncRes, wrongEncRes } from "../__mocks__/terminalApi/local";
import Client from "../client";
import TerminalLocalAPI from "../services/terminalLocalAPI";
import {Convert, SecurityKey, TerminalApiRequest, TerminalApiResponse} from "../typings/terminal";
import { SecurityKey, TerminalApiResponse } from "../typings/terminal/models";
import NexoCryptoException from "../services/exception/nexoCryptoException";
let client: Client;
@@ -11,42 +30,50 @@ let terminalLocalAPI: TerminalLocalAPI;
let scope: nock.Scope;
beforeEach((): void => {
client = createMockClientFromResponse();
if (!nock.isActive()) {
nock.activate();
}
client = createClient();
terminalLocalAPI = new TerminalLocalAPI(client);
scope = nock(client.config.terminalApiLocalEndpoint + ":8443/nexo");
});
describe("Terminal Local API", (): void => {
it("should make a local payment", async (): Promise<void> => {
const securedResponse = Convert.toTerminalApiSecuredResponse(localEncRes);
const response = Convert.toTerminalApiResponse(localSecuredRes);
afterEach((): void => {
nock.cleanAll();
});
scope.post("/").reply(200, securedResponse);
const terminalAPIPaymentRequest = createTerminalAPIPaymentRequest() as TerminalApiRequest;
const isCI = process.env.CI === "true" || (typeof process.env.CI === "boolean" && process.env.CI);
describe("Terminal Local API", (): void => {
test.each([isCI, true])("should make a local payment, isMock: %p", async (isMock): Promise<void> => {
!isMock && nock.restore();
scope.post("/").reply(200, localEncRes);
const terminalAPIPaymentRequest = createTerminalAPIPaymentRequest();
const securityKey: SecurityKey = {
adyenCryptoVersion: 1,
adyenCryptoVersion: 0,
keyIdentifier: "CryptoKeyIdentifier12345",
keyVersion: 1,
keyVersion: 0,
passphrase: "p@ssw0rd123456",
};
const terminalApiResponse: TerminalApiResponse =
await terminalLocalAPI.request(terminalAPIPaymentRequest, securityKey);
expect(response).toEqual(terminalApiResponse);
expect(terminalApiResponse.saleToPOIResponse?.paymentResponse).toBeDefined();
expect(terminalApiResponse.saleToPOIResponse?.messageHeader).toBeDefined();
});
it("should return NexoCryptoException", async (): Promise<void> => {
const securedResponse = Convert.toTerminalApiSecuredResponse(wrongEncRes);
scope.post("/").reply(200, securedResponse);
const terminalAPIPaymentRequest = createTerminalAPIPaymentRequest() as TerminalApiRequest;
test.each([isCI, true])("should return NexoCryptoException, isMock: %p", async (isMock: boolean): Promise<void> => {
!isMock && nock.restore();
scope.post("/").reply(200, wrongEncRes);
const terminalAPIPaymentRequest = createTerminalAPIPaymentRequest();
const securityKey: SecurityKey = {
adyenCryptoVersion: 1,
adyenCryptoVersion: 0,
keyIdentifier: "CryptoKeyIdentifier12345",
keyVersion: 1,
keyVersion: 0,
passphrase: "p@ssw0rd123456",
};

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/

View File

@@ -11,19 +11,16 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import Config from "./config";
import ClientInterface from "./typings/httpClient/clientInterface";
import HttpURLConnectionClient from "./httpClient/httpURLConnectionClient";
import { Environment } from "./typings/enums/environment";
import {version} from "../package.json";
import { version } from "../package.json";
import ClientInterface from "./httpClient/clientInterface";
type ClientParametersOverload =
| { config: Config }
@@ -55,19 +52,20 @@ class Client {
public static HPP_LIVE = "https://live.adyen.com/hpp";
public static MARKETPAY_ENDPOINT_TEST = "https://cal-test.adyen.com/cal/services";
public static MARKETPAY_ENDPOINT_LIVE = "https://cal-live.adyen.com/cal/services";
public static API_VERSION = "v49";
public static RECURRING_API_VERSION = "v30";
public static MARKETPAY_ACCOUNT_API_VERSION = "v4";
public static MARKETPAY_FUND_API_VERSION = "v3";
public static MARKETPAY_NOTIFICATION_API_VERSION = "v1";
public static API_VERSION = "v64";
public static RECURRING_API_VERSION = "v49";
public static MARKETPAY_ACCOUNT_API_VERSION = "v6";
public static MARKETPAY_FUND_API_VERSION = "v6";
public static MARKETPAY_HOP_API_VERSION = "v6";
public static MARKETPAY_NOTIFICATION_API_VERSION = "v5";
public static MARKETPAY_NOTIFICATION_CONFIGURATION_API_VERSION = "v6";
public static LIB_NAME = "adyen-node-api-library";
public static LIB_VERSION: string = version;
public static CHECKOUT_ENDPOINT_TEST = "https://checkout-test.adyen.com/checkout";
public static CHECKOUT_ENDPOINT_LIVE_SUFFIX = "-checkout-live.adyenpayments.com/checkout";
public static CHECKOUT_API_VERSION = "v49";
public static CHECKOUT_API_VERSION = "v64";
public static BIN_LOOKUP_PAL_SUFFIX = "/pal/servlet/BinLookup/";
public static BIN_LOOKUP_API_VERSION = "v40";
public static CHECKOUT_UTILITY_API_VERSION = "v1";
public static BIN_LOOKUP_API_VERSION = "v50";
public static TERMINAL_API_ENDPOINT_TEST = "https://terminal-api-test.adyen.com";
public static TERMINAL_API_ENDPOINT_LIVE = "https://terminal-api-live.adyen.com";
public static ENDPOINT_PROTOCOL = "https://";

View File

@@ -11,15 +11,11 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import { Environment } from "./typings/enums/environment";
interface ConfigConstructor {
username?: string;
password?: string;

View File

@@ -0,0 +1,83 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
export enum ApiConstants {
TRANSACTION_NOT_PERMITTED = "Transaction Not Permitted",
CVC_DECLINED = "CVC Declined",
RESTRICTED_CARD = "Restricted Card",
PAYMENT_DETAIL_NOT_FOUND = "803 PaymentDetail not found",
REFUSED = "Refused",
REFUSAL_REASON_RAW = "refusalReasonRaw",
PAYMENT_METHOD = "paymentMethod",
EXPIRY_DATE = "expiryDate",
CARD_BIN = "cardBin",
CARD_HOLDER_NAME = "cardHolderName",
CARD_SUMMARY = "cardSummary",
THREE_D_OFFERERED = "threeDOffered",
THREE_D_AUTHENTICATED = "threeDAuthenticated",
AVS_RESULT = "avsResult",
PAYMENT_TOKEN = "payment.token",
FRAUD_RESULT_TYPE = "fraudResultType",
FRAUD_MANUAL_REVIEW = "fraudManualReview",
AUTH_CODE = "authCode",
BOLETO_BARCODE_REFERENCE = "boletobancario.barCodeReference",
BOLETO_DATA = "boletobancario.data",
BOLETO_DUE_DATE = "boletobancario.dueDate",
BOLETO_URL = "boletobancario.url",
BOLETO_EXPIRATION_DATE = "boletobancario.expirationDate",
MULTIBANCO_ENTITY = "comprafacil.entity",
MULTIBANCO_AMOUNT = "comprafacil.amount",
MULTIBANCO_DEADLINE = "comprafacil.deadline",
MULTIBANCO_REFERENCE = "comprafacil.reference",
HMAC_SIGNATURE = "hmacSignature",
JSON = "card.encrypted.json",
BOLETO_SANTANDER = "boletobancario_santander",
NUMBER = "number",
EXPIRY_MONTH = "expiryMonth",
EXPIRY_YEAR = "expiryYear",
CVC = "cvc",
ENCRYPTED_CARD_NUMBER = "encryptedCardNumber",
ENCRYPTED_EXPIRY_MONTH = "encryptedExpiryMonth",
ENCRYPTED_EXPIRY_YEAR = "encryptedExpiryYear",
ENCRYPTED_SECURITY_CODE = "encryptedSecurityCode",
METHOD_TYPE = "type",
HOLDER_NAME = "holderName",
RECURRING_DETAIL_REFERENCE = "recurringDetailReference",
STORE_DETAILS = "storeDetails",
MD = "MD",
PAREQ = "PaReq",
TYPE_SCHEME = "scheme",
IDEMPOTENCY_KEY = "Idempotency-Key",
ACCEPT_CHARSET = "Accept-Charset",
USER_AGENT = "User-Agent",
METHOD_POST = "POST",
CONTENT_TYPE = "Content-Type",
API_KEY = "X-API-Key",
APPLICATION_JSON_TYPE = "application/json",
}

View File

@@ -11,14 +11,14 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
export const NEXO_HMAC_KEY_LENGTH = 32;
export const NEXO_CIPHER_KEY_LENGTH = 32;
export const NEXO_IV_LENGTH = 16;
export enum NexoEnum {
HMAC_KEY_LENGTH = 32,
CIPHER_KEY_LENGTH = 32,
IV_LENGTH = 16
}

View File

@@ -1,4 +1,23 @@
import {PeerCertificate} from "tls";
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import { PeerCertificate } from "tls";
export default function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined {
const { subject: { CN }} = cert;

View File

@@ -11,29 +11,29 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import Resource from "../services/resource";
import { RequestOptions } from "../typings/requestOptions";
import HttpClientException from "../httpClient/httpClientException";
import ApiException from "../services/exception/apiException";
import { IRequest } from "../typings/requestOptions";
async function getJsonResponse<T>(resource: Resource, jsonRequest: T | string, requestOptions?: RequestOptions): Promise<string>;
async function getJsonResponse<T, R>(resource: Resource, jsonRequest: T | string, requestOptions?: RequestOptions): Promise<R>;
async function getJsonResponse<T>(resource: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise<string>;
async function getJsonResponse<T, R>(resource: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise<R>;
async function getJsonResponse<T, R>(
resource: Resource,
jsonRequest: T | string,
requestOptions: RequestOptions = {},
): Promise<R | string> {
requestOptions: IRequest.Options = {},
): Promise<R | string | HttpClientException | ApiException> {
const request = typeof jsonRequest === "string" ? jsonRequest : JSON.stringify(jsonRequest);
const response = await resource.request(request, requestOptions);
try {
return JSON.parse(response);
return typeof response === "string" ? JSON.parse(response) : response;
} catch (e) {
return response;
}

View File

@@ -1,4 +1,23 @@
import {ApplicationInfo} from "../typings/applicationInfo";
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import { ApplicationInfo } from "../typings/applicationInfo";
interface AppInfo { applicationInfo?: ApplicationInfo }

View File

@@ -11,22 +11,22 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import Config from "../../config";
import { RequestOptions } from "../requestOptions";
import { AgentOptions } from "https";
import HttpClientException from "./httpClientException";
import ApiException from "../services/exception/apiException";
import { Config } from "../index";
import { IRequest } from "../typings/requestOptions";
interface ClientInterface {
request(
endpoint: string, json: string, config: Config, isApiKeyRequired: boolean, requestOptions?: RequestOptions,
): Promise<string>;
post(endpoint: string, postParameters: [string, string][], config: Config): Promise<string>;
endpoint: string, json: string, config: Config, isApiKeyRequired: boolean, requestOptions?: IRequest.Options,
): Promise<string | HttpClientException | ApiException>;
post(endpoint: string, postParameters: [string, string][], config: Config): Promise<HttpClientException | string>;
proxy?: AgentOptions;
}

View File

@@ -11,31 +11,37 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import {IncomingHttpHeaders, IncomingMessage} from "http";
import { IncomingHttpHeaders } from "http";
interface ExceptionInterface {
message: string;
statusCode?: number;
errorCode?: string;
responseHeaders?: IncomingHttpHeaders;
responseBody?: string;
}
class HttpClientException implements Error {
public statusCode = 500;
public errorCode: string | undefined;
public responseHeaders: IncomingHttpHeaders | undefined;
public errorCode?: string;
public responseHeaders?: IncomingHttpHeaders;
public readonly message: string;
public readonly name: string;
public responseBody: IncomingMessage | undefined;
public responseBody?: string;
public constructor(message: string, statusCode?: number, errorCode?: string, responseHeaders?: IncomingHttpHeaders, responseBody?: IncomingMessage) {
public constructor(props: ExceptionInterface) {
this.name = "HttpClientException";
this.message = message;
if(errorCode) this.errorCode = errorCode;
if(statusCode) this.statusCode = statusCode;
if(responseHeaders) this.responseHeaders = responseHeaders;
if(responseBody) this.responseBody = responseBody;
this.message = props.message;
if (props.responseHeaders) this.responseHeaders = props.responseHeaders;
if (props.responseBody) this.responseBody = props.responseBody;
if (props.errorCode) this.errorCode = props.errorCode;
if (props.statusCode) this.statusCode = props.statusCode;
}
}

View File

@@ -11,36 +11,27 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import {ClientRequest, IncomingMessage} from "http";
import {Agent, AgentOptions, request as httpsRequest} from "https";
import HttpsProxyAgent from "https-proxy-agent";
import { ClientRequest, IncomingHttpHeaders, IncomingMessage } from "http";
import { Agent, AgentOptions, request as httpsRequest } from "https";
import { HttpsProxyAgent } from "https-proxy-agent";
import * as fs from "fs";
import {URL} from "url";
import { URL } from "url";
import Client from "../client";
import Config from "../config";
import {
ACCEPT_CHARSET,
API_KEY,
APPLICATION_JSON_TYPE,
CONTENT_TYPE,
IDEMPOTENCY_KEY,
METHOD_POST,
USER_AGENT,
} from "../typings/constants/apiConstants";
import { RequestOptions } from "../typings/requestOptions";
import ClientInterface from "../typings/httpClient/clientInterface";
import HttpClientException from "./httpClientException";
import checkServerIdentity from "../helpers/checkServerIdentity";
import {ApiError} from "../typings/apiError";
import { ApiError } from "../typings/apiError";
import ApiException from "../services/exception/apiException";
import ClientInterface from "./clientInterface";
import { ApiConstants } from "../constants/apiConstants";
import { IRequest } from "../typings/requestOptions";
class HttpURLConnectionClient implements ClientInterface {
private static CHARSET = "utf-8";
@@ -49,8 +40,8 @@ class HttpURLConnectionClient implements ClientInterface {
public request(
endpoint: string, json: string, config: Config, isApiRequired: boolean,
requestOptions: RequestOptions,
): Promise<string> {
requestOptions: IRequest.Options,
): Promise<string | HttpClientException | ApiException> {
requestOptions.headers = {};
requestOptions.timeout = config.connectionTimeoutMillis;
@@ -60,28 +51,32 @@ class HttpURLConnectionClient implements ClientInterface {
const apiKey = config.apiKey;
if (isApiRequired || apiKey) {
requestOptions.headers[API_KEY] = apiKey;
if (isApiRequired && !apiKey) {
return Promise.reject(new ApiException("Invalid X-API-Key was used", 401));
}
if (apiKey) {
requestOptions.headers[ApiConstants.API_KEY] = apiKey;
} else {
const authString = `${config.username}:${config.password}`;
const authStringEnc = new Buffer(authString).toString("base64");
const authStringEnc = Buffer.from(authString, "utf8").toString("base64");
requestOptions.headers.Authorization = `Basic ${authStringEnc}`;
}
requestOptions.headers[CONTENT_TYPE] = APPLICATION_JSON_TYPE;
requestOptions.headers[ApiConstants.CONTENT_TYPE] = ApiConstants.APPLICATION_JSON_TYPE;
const httpConnection: ClientRequest = this.createRequest(endpoint, requestOptions, config.applicationName);
return this.doPostRequest(httpConnection, json);
}
public post(endpoint: string, postParameters: [string, string][], config: Config): Promise<string> {
public post(endpoint: string, postParameters: [string, string][], config: Config): Promise<HttpClientException | string> {
const postQuery: string = this.getQuery(postParameters);
const connectionRequest: ClientRequest = this.createRequest(endpoint, {}, config.applicationName);
return this.doPostRequest(connectionRequest, postQuery);
}
private createRequest(endpoint: string, requestOptions: RequestOptions, applicationName?: string): ClientRequest {
private createRequest(endpoint: string, requestOptions: IRequest.Options, applicationName?: string): ClientRequest {
if (!requestOptions.headers) {
requestOptions.headers = {};
}
@@ -93,22 +88,25 @@ class HttpURLConnectionClient implements ClientInterface {
requestOptions.path = url.pathname;
if (requestOptions && requestOptions.idempotencyKey) {
requestOptions.headers[IDEMPOTENCY_KEY] = requestOptions.idempotencyKey;
requestOptions.headers[ApiConstants.IDEMPOTENCY_KEY] = requestOptions.idempotencyKey;
delete requestOptions.idempotencyKey;
}
if (this.proxy && this.proxy.host) {
const { host, port, ...options } = this.proxy;
const agent = new HttpsProxyAgent({ host, port: port || 443, ...options });
requestOptions.agent = agent;
requestOptions.agent = new HttpsProxyAgent({ host, port: port || 443, ...options });
} else {
requestOptions.agent = new Agent(this.agentOptions);
}
requestOptions.headers["Cache-Control"] = "no-cache";
requestOptions.method = METHOD_POST;
requestOptions.headers[ACCEPT_CHARSET] = HttpURLConnectionClient.CHARSET;
requestOptions.headers[USER_AGENT] = `${applicationName} ${Client.LIB_NAME}/${Client.LIB_VERSION}`;
if (!requestOptions.method) {
requestOptions.method = ApiConstants.METHOD_POST;
}
requestOptions.headers[ApiConstants.ACCEPT_CHARSET] = HttpURLConnectionClient.CHARSET;
requestOptions.headers[ApiConstants.USER_AGENT] = `${applicationName} ${Client.LIB_NAME}/${Client.LIB_VERSION}`;
return httpsRequest(requestOptions);
}
@@ -117,33 +115,63 @@ class HttpURLConnectionClient implements ClientInterface {
return params.map(([key, value]): string => `${key}=${value}`).join("&");
}
private doPostRequest(connectionRequest: ClientRequest, json: string): Promise<string> {
private doPostRequest(connectionRequest: ClientRequest, json: string): Promise<HttpClientException | string> {
return new Promise((resolve, reject): void => {
connectionRequest.flushHeaders();
connectionRequest.on("response", (res: IncomingMessage): void => {
let resData = "";
res.on("data", (data): void => {
if (res.statusCode && res.statusCode !== 200) {
const formattedData: ApiError = JSON.parse(data.toString());
const exception = new HttpClientException(
`HTTP Exception: ${formattedData.status}. ${res.statusMessage}: ${formattedData.message}`,
formattedData.status,
formattedData.errorCode,
res.headers,
res,
);
return reject(exception);
}
const response: { headers: IncomingHttpHeaders; body: string; statusCode: number | undefined } = {
statusCode: res.statusCode,
headers: res.headers,
body: ""
};
resData += data;
const getException = (responseBody: string): HttpClientException => new HttpClientException({
message: `HTTP Exception: ${response.statusCode}. ${res.statusMessage}`,
statusCode: response.statusCode,
errorCode: undefined,
responseHeaders: response.headers,
responseBody,
});
let exception: HttpClientException | Error = getException(response.body.toString());
res.on("data", (chunk: string): void => {
response.body += chunk;
});
res.on("end", (): void => {
if (!res.complete) {
reject(new Error("The connection was terminated while the message was still being sent"));
}
resolve(resData);
if (res.statusCode && (res.statusCode < 200 || res.statusCode >= 300)) {
try {
const formattedData: ApiError | {[key: string]: never} = JSON.parse(response.body);
const isApiError = "status" in formattedData;
const isRequestError = "errors" in formattedData;
if (isApiError) {
exception = new HttpClientException({
message: `HTTP Exception: ${formattedData.status}. ${res.statusMessage}: ${formattedData.message}`,
statusCode: formattedData.status,
errorCode: formattedData.errorCode,
responseHeaders: res.headers,
responseBody: response.body,
});
} else if (isRequestError) {
exception = new Error(response.body);
} else {
exception = getException(response.body);
}
} catch (e) {
reject(exception);
} finally {
reject(exception);
}
}
resolve(response.body as string);
});
res.on("error", reject);
@@ -152,13 +180,13 @@ class HttpURLConnectionClient implements ClientInterface {
connectionRequest.on("timeout", (): void => {
connectionRequest.abort();
});
connectionRequest.on("error", reject);
connectionRequest.on("error", (e) => reject(new ApiException(e.message)));
connectionRequest.write(Buffer.from(json));
connectionRequest.end();
});
}
private installCertificateVerifier(terminalCertificatePath: string): void {
private installCertificateVerifier(terminalCertificatePath: string): void | Promise<HttpClientException> {
try {
const certificateInput = fs.readFileSync(terminalCertificatePath);
@@ -168,7 +196,7 @@ class HttpURLConnectionClient implements ClientInterface {
};
} catch (e) {
throw new HttpClientException(`Error loading certificate from path: ${e.message}`);
return Promise.reject(new HttpClientException({ message: `Error loading certificate from path: ${e.message}` }));
}
}

View File

@@ -11,14 +11,14 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import "./typings";
export { default as Client } from "./client";
export { default as Config } from "./config";
export * from "./services/";

View File

@@ -11,18 +11,21 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import {Convert, Notification, NotificationItem, NotificationRequestItem} from "../typings/notification";
import {
Notification,
NotificationItem,
NotificationRequestItem,
ObjectSerializer
} from "../typings/notification/models";
class NotificationRequest {
public constructor(json: Notification) {
const notification = Convert.toNotification(JSON.stringify(json));
const notification: Notification = ObjectSerializer.deserialize(json, "Notification");
this.notificationItemContainers = notification.notificationItems;
this.live = notification.live;
}

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/

View File

@@ -11,26 +11,24 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import {Cipher, createCipheriv, createDecipheriv, createHmac, randomBytes} from "crypto";
import { Cipher, createCipheriv, createDecipheriv, createHmac, randomBytes } from "crypto";
import NexoCryptoException from "../services/exception/nexoCryptoException";
import {NEXO_IV_LENGTH} from "../typings/constants/nexoConstants";
import {
MessageHeader,
NexoDerivedKey,
SaleToPoiSecuredMessage,
SaleToPOISecuredMessage,
SecurityKey,
SecurityTrailer,
} from "../typings/terminal";
} from "../typings/terminal/models";
import InvalidSecurityKeyException from "./exception/invalidSecurityKeyException";
import NexoDerivedKeyGenerator from "./nexoDerivedKeyGenerator";
import { NexoEnum } from "../constants/nexoConstants";
enum Modes {
ENCRYPT,
@@ -42,7 +40,7 @@ class NexoCrypto {
messageHeader: MessageHeader,
saleToPoiMessageJson: string,
securityKey: SecurityKey,
): SaleToPoiSecuredMessage {
): SaleToPOISecuredMessage {
const derivedKey: NexoDerivedKey = NexoDerivedKeyGenerator.deriveKeyMaterial(securityKey.passphrase);
const saleToPoiMessageByteArray = Buffer.from(saleToPoiMessageJson, "ascii");
const ivNonce = NexoCrypto.generateRandomIvNonce();
@@ -60,11 +58,11 @@ class NexoCrypto {
return {
messageHeader,
nexoBlob: encryptedSaleToPoiMessage.toString("base64"),
securityTrailer: securityTrailer,
securityTrailer,
};
}
public decrypt(saleToPoiSecureMessage: SaleToPoiSecuredMessage, securityKey: SecurityKey): string {
public decrypt(saleToPoiSecureMessage: SaleToPOISecuredMessage, securityKey: SecurityKey): string {
NexoCrypto.validateSecurityKey(securityKey);
const encryptedSaleToPoiMessageByteArray = Buffer.from(saleToPoiSecureMessage.nexoBlob, "base64");
@@ -83,16 +81,16 @@ class NexoCrypto {
const isValid = securityKey
&& securityKey.passphrase
&& securityKey.keyIdentifier
&& securityKey.keyVersion
&& securityKey.adyenCryptoVersion;
&& !isNaN(securityKey.keyVersion)
&& !isNaN(securityKey.adyenCryptoVersion);
if (!isValid) {
throw new InvalidSecurityKeyException("Invalid Security Key");
}
}
private static crypt(bytes: Buffer, dk: NexoDerivedKey, ivNonce: Buffer, mode: Modes): Buffer {
const actualIV = Buffer.alloc(NEXO_IV_LENGTH);
for (let i = 0; i < NEXO_IV_LENGTH; i++) {
const actualIV = Buffer.alloc(NexoEnum.IV_LENGTH);
for (let i = 0; i < NexoEnum.IV_LENGTH; i++) {
actualIV[i] = dk.iv[i] ^ ivNonce[i];
}
@@ -111,7 +109,7 @@ class NexoCrypto {
}
private static generateRandomIvNonce(): Buffer {
return randomBytes(NEXO_IV_LENGTH);
return randomBytes(NexoEnum.IV_LENGTH);
}
private validateHmac(receivedHmac: Buffer, decryptedMessage: Buffer, derivedKey: NexoDerivedKey): void {

View File

@@ -11,35 +11,33 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import {pbkdf2Sync} from "crypto";
import {NEXO_CIPHER_KEY_LENGTH, NEXO_HMAC_KEY_LENGTH, NEXO_IV_LENGTH} from "../typings/constants/nexoConstants";
import { NexoDerivedKey } from "../typings/terminal";
import { pbkdf2Sync } from "crypto";
import { NexoDerivedKey } from "../typings/terminal/models";
import { NexoEnum } from "../constants/nexoConstants";
class NexoDerivedKeyGenerator {
public static deriveKeyMaterial(passphrase: string): NexoDerivedKey {
const pass = Buffer.from(passphrase, "binary");
const salt = Buffer.from("AdyenNexoV1Salt", "binary");
const iterations = 4000;
const keylen = NEXO_CIPHER_KEY_LENGTH + NEXO_HMAC_KEY_LENGTH + NEXO_IV_LENGTH;
const keylen = NexoEnum.CIPHER_KEY_LENGTH + NexoEnum.HMAC_KEY_LENGTH + NexoEnum.IV_LENGTH;
const key = pbkdf2Sync(pass, salt, iterations, keylen * 8, "sha1");
return NexoDerivedKeyGenerator.readKeyData(key);
}
private static readKeyData(key: Buffer): NexoDerivedKey {
return {
cipherKey: key.slice(NEXO_HMAC_KEY_LENGTH, NEXO_HMAC_KEY_LENGTH + NEXO_CIPHER_KEY_LENGTH),
hmacKey: key.slice(0, NEXO_HMAC_KEY_LENGTH),
cipherKey: key.slice(NexoEnum.HMAC_KEY_LENGTH, NexoEnum.HMAC_KEY_LENGTH + NexoEnum.CIPHER_KEY_LENGTH),
hmacKey: key.slice(0, NexoEnum.HMAC_KEY_LENGTH),
iv: key.slice(
NEXO_HMAC_KEY_LENGTH + NEXO_CIPHER_KEY_LENGTH,
NEXO_CIPHER_KEY_LENGTH + NEXO_HMAC_KEY_LENGTH + NEXO_IV_LENGTH,
NexoEnum.HMAC_KEY_LENGTH + NexoEnum.CIPHER_KEY_LENGTH,
NexoEnum.CIPHER_KEY_LENGTH + NexoEnum.HMAC_KEY_LENGTH + NexoEnum.IV_LENGTH,
),
};
}

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
@@ -22,12 +20,6 @@ import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService";
import Client from "../client";
import GetCostEstimate from "./resource/binLookup/getCostEstimate";
import Get3dsAvailability from "./resource/binLookup/get3dsAvailability";
import {
CostEstimateRequest,
CostEstimateResponse,
ThreeDSAvailabilityRequest,
ThreeDSAvailabilityResponse
} from "../typings/binLookup";
import getJsonResponse from "../helpers/getJsonResponse";
class BinLookup extends ApiKeyAuthenticatedService {
@@ -40,15 +32,15 @@ class BinLookup extends ApiKeyAuthenticatedService {
this._getCostEstimate = new GetCostEstimate(this);
}
public get3dsAvailability(request: ThreeDSAvailabilityRequest): Promise<ThreeDSAvailabilityResponse> {
return getJsonResponse<ThreeDSAvailabilityRequest, ThreeDSAvailabilityResponse>(
public get3dsAvailability(request: IBinLookup.ThreeDSAvailabilityRequest): Promise<IBinLookup.ThreeDSAvailabilityResponse> {
return getJsonResponse<IBinLookup.ThreeDSAvailabilityRequest, IBinLookup.ThreeDSAvailabilityResponse>(
this._get3dsAvailability,
request
);
}
public getCostEstimate(request: CostEstimateRequest): Promise<CostEstimateResponse> {
return getJsonResponse<CostEstimateRequest, CostEstimateResponse>(
public getCostEstimate(request: IBinLookup.CostEstimateRequest): Promise<IBinLookup.CostEstimateResponse> {
return getJsonResponse<IBinLookup.CostEstimateRequest, IBinLookup.CostEstimateResponse>(
this._getCostEstimate,
request
);

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
@@ -22,17 +20,19 @@
import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService";
import Client from "../client";
import getJsonResponse from "../helpers/getJsonResponse";
import {
DetailsRequest, PaymentMethodsRequest, PaymentMethodsResponse, PaymentRequest, PaymentResponse, PaymentSetupRequest,
PaymentSetupResponse, PaymentVerificationRequest, PaymentVerificationResponse,
} from "../typings/checkout";
import { RequestOptions } from "../typings/requestOptions";
import PaymentMethods from "./resource/checkout/paymentMethods";
import Payments from "./resource/checkout/payments";
import PaymentsDetails from "./resource/checkout/paymentsDetails";
import PaymentSession from "./resource/checkout/paymentSession";
import PaymentsResult from "./resource/checkout/paymentsResult";
import PaymentLinks from "./resource/checkout/paymentLinks";
import OriginKeys from "./resource/checkout/originKeys";
import setApplicationInfo from "../helpers/setApplicationInfo";
import { IRequest } from "../typings/requestOptions";
import PaymentLinksId from "./resource/checkout/paymentLinksId";
import PaymentMethodsBalance from "./resource/checkout/paymentMethodsBalance";
import Orders from "./resource/checkout/orders";
import OrdersCancel from "./resource/checkout/ordersCancel";
class Checkout extends ApiKeyAuthenticatedService {
private readonly _payments: Payments;
@@ -40,6 +40,12 @@ class Checkout extends ApiKeyAuthenticatedService {
private readonly _paymentsDetails: PaymentsDetails;
private readonly _paymentSession: PaymentSession;
private readonly _paymentsResult: PaymentsResult;
private readonly _paymentLinks: PaymentLinks;
private readonly _paymentLinksId: PaymentLinksId;
private readonly _originKeys: OriginKeys;
private readonly _paymentMethodsBalance: PaymentMethodsBalance;
private readonly _orders: Orders;
private readonly _ordersCancel: OrdersCancel;
public constructor(client: Client) {
super(client);
@@ -48,47 +54,107 @@ class Checkout extends ApiKeyAuthenticatedService {
this._paymentsDetails = new PaymentsDetails(this);
this._paymentSession = new PaymentSession(this);
this._paymentsResult = new PaymentsResult(this);
this._paymentLinks = new PaymentLinks(this);
this._paymentLinksId = new PaymentLinksId(this);
this._originKeys = new OriginKeys(this);
this._paymentMethodsBalance = new PaymentMethodsBalance(this);
this._orders = new Orders(this);
this._ordersCancel = new OrdersCancel(this);
}
public payments(paymentsRequest: PaymentRequest, requestOptions?: RequestOptions): Promise<PaymentResponse> {
return getJsonResponse<PaymentRequest, PaymentResponse>(
public payments(paymentsRequest: ICheckout.PaymentRequest, requestOptions?: IRequest.Options): Promise<ICheckout.PaymentResponse> {
return getJsonResponse<ICheckout.PaymentRequest, ICheckout.PaymentResponse>(
this._payments,
setApplicationInfo(paymentsRequest),
requestOptions,
);
}
public paymentMethods(paymentMethodsRequest: PaymentMethodsRequest): Promise<PaymentMethodsResponse> {
return getJsonResponse<PaymentMethodsRequest, PaymentMethodsResponse>(
public paymentMethods(paymentMethodsRequest: ICheckout.PaymentMethodsRequest): Promise<ICheckout.PaymentMethodsResponse> {
return getJsonResponse<ICheckout.PaymentMethodsRequest, ICheckout.PaymentMethodsResponse>(
this._paymentMethods,
paymentMethodsRequest,
);
}
public paymentsDetails(paymentsDetailsRequest: DetailsRequest): Promise<PaymentResponse> {
return getJsonResponse<DetailsRequest, PaymentResponse>(
public paymentLinks(paymentLinkRequest: ICheckout.CreatePaymentLinkRequest): Promise<ICheckout.PaymentLinkResource> {
return getJsonResponse<ICheckout.CreatePaymentLinkRequest, ICheckout.PaymentLinkResource>(
this._paymentLinks,
paymentLinkRequest
);
}
public getPaymentLinks(linkId: string): Promise<ICheckout.PaymentLinkResource> {
this._paymentLinksId.id = linkId;
return getJsonResponse<{}, ICheckout.PaymentLinkResource>(
this._paymentLinksId,
{},
{ method: "GET" }
);
}
public updatePaymentLinks(linkId: string, status: "expired"): Promise<ICheckout.PaymentLinkResource> {
this._paymentLinksId.id = linkId;
return getJsonResponse<{}, ICheckout.PaymentLinkResource>(
this._paymentLinksId,
{ status },
{ method: "PATCH" }
);
}
public paymentsDetails(paymentsDetailsRequest: ICheckout.DetailsRequest, requestOptions?: IRequest.Options): Promise<ICheckout.PaymentResponse> {
return getJsonResponse<ICheckout.DetailsRequest, ICheckout.PaymentResponse>(
this._paymentsDetails,
paymentsDetailsRequest,
requestOptions
);
}
public paymentSession(
paymentSessionRequest: PaymentSetupRequest,
requestOptions?: RequestOptions,
): Promise<PaymentSetupResponse> {
return getJsonResponse<PaymentSetupRequest, PaymentSetupResponse>(
paymentSessionRequest: ICheckout.PaymentSetupRequest,
requestOptions?: IRequest.Options,
): Promise<ICheckout.PaymentSetupResponse> {
return getJsonResponse<ICheckout.PaymentSetupRequest, ICheckout.PaymentSetupResponse>(
this._paymentSession,
paymentSessionRequest,
requestOptions,
);
}
public paymentResult(paymentResultRequest: PaymentVerificationRequest): Promise<PaymentVerificationResponse> {
return getJsonResponse<PaymentVerificationRequest, PaymentVerificationResponse>(
public paymentResult(paymentResultRequest: ICheckout.PaymentVerificationRequest): Promise<ICheckout.PaymentVerificationResponse> {
return getJsonResponse<ICheckout.PaymentVerificationRequest, ICheckout.PaymentVerificationResponse>(
this._paymentsResult,
paymentResultRequest,
);
}
public originKeys(originKeysRequest: ICheckout.CheckoutUtilityRequest): Promise<ICheckout.CheckoutUtilityResponse> {
return getJsonResponse<ICheckout.CheckoutUtilityRequest, ICheckout.CheckoutUtilityResponse>(
this._originKeys,
originKeysRequest,
);
}
public paymentMethodsBalance(paymentMethodsBalanceRequest: ICheckout.CheckoutBalanceCheckRequest): Promise<ICheckout.CheckoutBalanceCheckResponse> {
return getJsonResponse<ICheckout.CheckoutBalanceCheckRequest, ICheckout.CheckoutBalanceCheckResponse>(
this._paymentMethodsBalance,
paymentMethodsBalanceRequest,
);
}
public orders(ordersRequest: ICheckout.CheckoutCreateOrderRequest): Promise<ICheckout.CheckoutCreateOrderResponse> {
return getJsonResponse<ICheckout.CheckoutCreateOrderRequest, ICheckout.CheckoutCreateOrderResponse>(
this._orders,
ordersRequest,
);
}
public ordersCancel(ordersCancelRequest: ICheckout.CheckoutCancelOrderRequest): Promise<ICheckout.CheckoutCancelOrderResponse> {
return getJsonResponse<ICheckout.CheckoutCancelOrderRequest, ICheckout.CheckoutCancelOrderResponse>(
this._ordersCancel,
ordersCancelRequest,
);
}
}
export default Checkout;

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
@@ -27,7 +25,7 @@ class ApiException implements Error {
public readonly message: string;
public readonly name: string;
public constructor(message: string, statusCode: number) {
public constructor(message: string, statusCode = 500) {
this.name = "ApiException";
this.message = message;
this.statusCode = statusCode;

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
@@ -22,8 +20,8 @@
export { default as TerminalLocalAPI } from "./terminalLocalAPI";
export { default as TerminalCloudAPI } from "./terminalCloudAPI";
export { default as CheckoutAPI } from "./checkout";
export { default as CheckoutUtility } from "./checkoutUtility";
export { default as Recurring } from "./recurring";
export { default as Modification } from "./modification";
export { default as BinLookup } from "./binLookup";
export { default as Payout } from "./payout";
export { default as Platforms } from "./platforms";

View File

@@ -11,18 +11,14 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import Client from "../client";
import getJsonResponse from "../helpers/getJsonResponse";
import Service from "../service";
import { ModificationRequest, ModificationResult } from "../typings/payments";
import { RequestOptions } from "../typings/requestOptions";
import AdjustAuthorisation from "./resource/modification/adjustAuthorisation";
import Cancel from "./resource/modification/cancel";
import CancelOrRefund from "./resource/modification/cancelOrRefund";
@@ -30,6 +26,11 @@ import Capture from "./resource/modification/capture";
import Refund from "./resource/modification/refund";
import TechnicalCancel from "./resource/modification/technicalCancel";
import setApplicationInfo from "../helpers/setApplicationInfo";
import { ApplicationInfo } from "../typings/applicationInfo";
import { IRequest } from "../typings/requestOptions";
interface AppInfo { applicationInfo?: ApplicationInfo }
type GenericRequest<T> = T & AppInfo;
class Modification extends Service {
private readonly _cancelOrRefund: CancelOrRefund;
@@ -50,10 +51,10 @@ class Modification extends Service {
}
public capture(
captureRequest: ModificationRequest,
requestOptions?: RequestOptions,
): Promise<ModificationResult> {
return getJsonResponse<ModificationRequest, ModificationResult>(
captureRequest: GenericRequest<IPayments.ModificationRequest>,
requestOptions?: IRequest.Options,
): Promise<IPayments.ModificationResult> {
return getJsonResponse<IPayments.ModificationRequest, IPayments.ModificationResult>(
this._capture,
setApplicationInfo(captureRequest),
requestOptions,
@@ -61,10 +62,10 @@ class Modification extends Service {
}
public cancelOrRefund(
cancelOrRefundRequest: ModificationRequest,
requestOptions?: RequestOptions,
): Promise<ModificationResult> {
return getJsonResponse<ModificationRequest, ModificationResult>(
cancelOrRefundRequest: GenericRequest<IPayments.ModificationRequest>,
requestOptions?: IRequest.Options,
): Promise<IPayments.ModificationResult> {
return getJsonResponse<IPayments.ModificationRequest, IPayments.ModificationResult>(
this._cancelOrRefund,
setApplicationInfo(cancelOrRefundRequest),
requestOptions,
@@ -72,10 +73,10 @@ class Modification extends Service {
}
public refund(
refundRequest: ModificationRequest,
requestOptions?: RequestOptions,
): Promise<ModificationResult> {
return getJsonResponse<ModificationRequest, ModificationResult>(
refundRequest: GenericRequest<IPayments.ModificationRequest>,
requestOptions?: IRequest.Options,
): Promise<IPayments.ModificationResult> {
return getJsonResponse<IPayments.ModificationRequest, IPayments.ModificationResult>(
this._refund,
setApplicationInfo(refundRequest),
requestOptions,
@@ -83,10 +84,10 @@ class Modification extends Service {
}
public cancel(
cancelRequest: ModificationRequest,
requestOptions?: RequestOptions,
): Promise<ModificationResult> {
return getJsonResponse<ModificationRequest, ModificationResult>(
cancelRequest: GenericRequest<IPayments.ModificationRequest>,
requestOptions?: IRequest.Options,
): Promise<IPayments.ModificationResult> {
return getJsonResponse<IPayments.ModificationRequest, IPayments.ModificationResult>(
this._cancel,
setApplicationInfo(cancelRequest),
requestOptions,
@@ -94,10 +95,10 @@ class Modification extends Service {
}
public technicalCancel(
technicalCancelRequest: ModificationRequest,
requestOptions?: RequestOptions,
): Promise<ModificationResult> {
return getJsonResponse<ModificationRequest, ModificationResult>(
technicalCancelRequest: GenericRequest<IPayments.ModificationRequest>,
requestOptions?: IRequest.Options,
): Promise<IPayments.ModificationResult> {
return getJsonResponse<IPayments.ModificationRequest, IPayments.ModificationResult>(
this._technicalCancel,
setApplicationInfo(technicalCancelRequest),
requestOptions,
@@ -105,10 +106,10 @@ class Modification extends Service {
}
public adjustAuthorisation(
adjustAuthorisationRequest: ModificationRequest,
requestOptions?: RequestOptions,
): Promise<ModificationResult> {
return getJsonResponse<ModificationRequest, ModificationResult>(
adjustAuthorisationRequest: GenericRequest<IPayments.ModificationRequest>,
requestOptions?: IRequest.Options,
): Promise<IPayments.ModificationResult> {
return getJsonResponse<IPayments.ModificationRequest, IPayments.ModificationResult>(
this._adjustAuthorisation,
setApplicationInfo(adjustAuthorisationRequest),
requestOptions,

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
@@ -26,12 +24,6 @@ import SubmitThirdParty from "./resource/payout/submitThirdParty";
import ConfirmThirdParty from "./resource/payout/confirmThirdParty";
import PayoutResource from "./resource/payout/payout";
import StoreDetailAndSubmitThirdParty from "./resource/payout/storeDetailAndSubmitThirdParty";
import {
ModifyRequest,
ModifyResponse,
StoreDetailAndSubmitRequest,
StoreDetailAndSubmitResponse, StoreDetailRequest, StoreDetailResponse, SubmitRequest, SubmitResponse, PayoutRequest, PayoutResponse
} from "../typings/payout";
import getJsonResponse from "../helpers/getJsonResponse";
class Payout extends Service {
@@ -53,43 +45,43 @@ class Payout extends Service {
this._payout = new PayoutResource(this);
}
public storeDetailAndSubmitThirdParty(request: StoreDetailAndSubmitRequest): Promise<StoreDetailAndSubmitResponse> {
return getJsonResponse<StoreDetailAndSubmitRequest, StoreDetailAndSubmitResponse>(
public storeDetailAndSubmitThirdParty(request: IPayouts.StoreDetailAndSubmitRequest): Promise<IPayouts.StoreDetailAndSubmitResponse> {
return getJsonResponse<IPayouts.StoreDetailAndSubmitRequest, IPayouts.StoreDetailAndSubmitResponse>(
this._storeDetailAndSubmitThirdParty,
request
);
}
public confirmThirdParty(request: ModifyRequest): Promise<ModifyResponse> {
return getJsonResponse<ModifyRequest, ModifyResponse>(
public confirmThirdParty(request: IPayouts.ModifyRequest): Promise<IPayouts.ModifyResponse> {
return getJsonResponse<IPayouts.ModifyRequest, IPayouts.ModifyResponse>(
this._confirmThirdParty,
request
);
}
public declineThirdParty(request: ModifyRequest): Promise<ModifyResponse> {
return getJsonResponse<ModifyRequest, ModifyResponse>(
public declineThirdParty(request: IPayouts.ModifyRequest): Promise<IPayouts.ModifyResponse> {
return getJsonResponse<IPayouts.ModifyRequest, IPayouts.ModifyResponse>(
this._declineThirdParty,
request
);
}
public storeDetail(request: StoreDetailRequest): Promise<StoreDetailResponse> {
return getJsonResponse<StoreDetailRequest, StoreDetailResponse>(
public storeDetail(request: IPayouts.StoreDetailRequest): Promise<IPayouts.StoreDetailResponse> {
return getJsonResponse<IPayouts.StoreDetailRequest, IPayouts.StoreDetailResponse>(
this._storeDetail,
request
);
}
public submitThirdparty(request: SubmitRequest): Promise<SubmitResponse> {
return getJsonResponse<SubmitRequest, SubmitResponse>(
public submitThirdparty(request: IPayouts.SubmitRequest): Promise<IPayouts.SubmitResponse> {
return getJsonResponse<IPayouts.SubmitRequest, IPayouts.SubmitResponse>(
this._submitThirdParty,
request
);
}
public payout(request: PayoutRequest): Promise<PayoutResponse> {
return getJsonResponse<PayoutRequest, PayoutResponse>(
public payout(request: IPayouts.PayoutRequest): Promise<IPayouts.PayoutResponse> {
return getJsonResponse<IPayouts.PayoutRequest, IPayouts.PayoutResponse>(
this._payout,
request
);

217
src/services/platforms.ts Normal file
View File

@@ -0,0 +1,217 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import Service from "../service";
import Client from "../client";
import PlatformsAccount, { AccountTypesEnum } from "./resource/platforms/account";
import getJsonResponse from "./../helpers/getJsonResponse";
import PlatformsFund from "./resource/platforms/fund";
import PlatformsHostedOnboardingPage from "./resource/platforms/hop";
import PlatformsNotificationConfiguration from "./resource/platforms/notificationConfiguration";
type AccountType = AccountTypesEnum.Accounts;
type VerificationType = AccountTypesEnum.Verification;
type AccountHoldersType = AccountTypesEnum.AccountHolders;
type AccountsAccount = PlatformsAccount<AccountType>;
type AccountsVerification = PlatformsAccount<VerificationType>;
type AccountsAccountHolders = PlatformsAccount<AccountHoldersType>;
type PlatformsTypes = AccountsAccount | AccountsVerification | AccountsAccountHolders | PlatformsFund | PlatformsHostedOnboardingPage;
class Platforms extends Service {
/* PlatformsAccount */
// Accounts
private readonly _closeAccount: PlatformsAccount<AccountType>;
private readonly _updateAccount: PlatformsAccount<AccountType>;
private readonly _createAccount: PlatformsAccount<AccountType>;
// Verification
private readonly _uploadDocument: PlatformsAccount<VerificationType>;
private readonly _getUploadedDocuments: PlatformsAccount<VerificationType>;
private readonly _deleteBankAccounts: PlatformsAccount<VerificationType>;
private readonly _deletePayoutMethods: PlatformsAccount<VerificationType>;
private readonly _deleteShareholders: PlatformsAccount<VerificationType>;
private readonly _checkAccountHolder: PlatformsAccount<VerificationType>;
// Account Holders
private readonly _createAccountHolder: PlatformsAccount<AccountHoldersType>;
private readonly _getAccountHolder: PlatformsAccount<AccountHoldersType>;
private readonly _updateAccountHolder: PlatformsAccount<AccountHoldersType>;
private readonly _updateAccountHolderState: PlatformsAccount<AccountHoldersType>;
private readonly _suspendAccountHolder: PlatformsAccount<AccountHoldersType>;
private readonly _unSuspendAccountHolder: PlatformsAccount<AccountHoldersType>;
private readonly _closeAccountHolder: PlatformsAccount<AccountHoldersType>;
/* PlatformsFund */
private readonly _accountHolderBalance: PlatformsFund;
private readonly _accountHolderTransactionList: PlatformsFund;
private readonly _payoutAccountHolder: PlatformsFund;
private readonly _transferFunds: PlatformsFund;
private readonly _refundFundsTransfer: PlatformsFund;
private readonly _setupBeneficiary: PlatformsFund;
private readonly _refundNotPaidOutTransfers: PlatformsFund;
/* HOP */
private readonly _getOnboardingUrl: PlatformsHostedOnboardingPage;
/* Notification Configuration */
private readonly _createNotificationConfiguration: PlatformsNotificationConfiguration;
private readonly _getNotificationConfiguration: PlatformsNotificationConfiguration;
private readonly _getNotificationConfigurationList: PlatformsNotificationConfiguration;
private readonly _testNotificationConfiguration: PlatformsNotificationConfiguration;
private readonly _updateNotificationConfiguration: PlatformsNotificationConfiguration;
private readonly _deleteNotificationConfiguration: PlatformsNotificationConfiguration;
public constructor(client: Client) {
super(client);
// Account
this._closeAccount = new PlatformsAccount<AccountType>(this, "/closeAccount");
this._updateAccount = new PlatformsAccount<AccountType>(this, "/updateAccount");
this._createAccount = new PlatformsAccount<AccountType>(this, "/createAccount");
this._uploadDocument = new PlatformsAccount<VerificationType>(this, "/uploadDocument");
this._getUploadedDocuments = new PlatformsAccount<VerificationType>(this, "/getUploadedDocuments");
this._deleteBankAccounts = new PlatformsAccount<VerificationType>(this, "/deleteBankAccounts");
this._deletePayoutMethods = new PlatformsAccount<VerificationType>(this, "/deletePayoutMethods");
this._deleteShareholders = new PlatformsAccount<VerificationType>(this, "/deleteShareholders");
this._checkAccountHolder = new PlatformsAccount<VerificationType>(this, "/checkAccountHolder");
this._createAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/createAccountHolder");
this._getAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/getAccountHolder");
this._updateAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/updateAccountHolder");
this._updateAccountHolderState = new PlatformsAccount<AccountHoldersType>(this, "/updateAccountHolderState");
this._suspendAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/suspendAccountHolder");
this._unSuspendAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/unSuspendAccountHolder");
this._closeAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/closeAccountHolder");
// Fund
this._accountHolderBalance = new PlatformsFund(this, "/accountHolderBalance");
this._accountHolderTransactionList = new PlatformsFund(this, "/accountHolderTransactionList");
this._payoutAccountHolder = new PlatformsFund(this, "/payoutAccountHolder");
this._transferFunds = new PlatformsFund(this, "/transferFunds");
this._refundFundsTransfer = new PlatformsFund(this, "/refundFundsTransfer");
this._setupBeneficiary = new PlatformsFund(this, "/setupBeneficiary");
this._refundNotPaidOutTransfers = new PlatformsFund(this, "/refundNotPaidOutTransfers");
// HOP
this._getOnboardingUrl = new PlatformsHostedOnboardingPage(this, "/getOnboardingUrl");
// Notification Configuration
this._createNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/createNotificationConfiguration");
this._getNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/getNotificationConfiguration");
this._getNotificationConfigurationList = new PlatformsNotificationConfiguration(this, "/getNotificationConfigurationList");
this._testNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/testNotificationConfiguration");
this._updateNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/updateNotificationConfiguration");
this._deleteNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/deleteNotificationConfigurations");
}
createRequest = <T extends PlatformsTypes, U, V>(service: T) => {
return (request: U): Promise<V> => getJsonResponse<U, V>(service, request);
}
public get Account(): {
getAccountHolder: (request: IPlatformsAccount.GetAccountHolderRequest) => Promise<IPlatformsAccount.GetAccountHolderResponse>;
getUploadedDocuments: (request: IPlatformsAccount.GetUploadedDocumentsRequest) => Promise<IPlatformsAccount.GetUploadedDocumentsResponse>;
createAccountHolder: (request: IPlatformsAccount.CreateAccountHolderRequest) => Promise<IPlatformsAccount.CreateAccountHolderResponse>;
closeAccountHolder: (request: IPlatformsAccount.CloseAccountHolderRequest) => Promise<IPlatformsAccount.CloseAccountHolderResponse>;
createAccount: (request: IPlatformsAccount.CreateAccountRequest) => Promise<IPlatformsAccount.CreateAccountResponse>;
deleteBankAccounts: (request: IPlatformsAccount.DeleteBankAccountRequest) => Promise<IPlatformsAccount.GenericResponse>;
deletePayoutMethods: (request: IPlatformsAccount.DeletePayoutMethodRequest) => Promise<IPlatformsAccount.GenericResponse>;
updateAccount: (request: IPlatformsAccount.UpdateAccountRequest) => Promise<IPlatformsAccount.UpdateAccountResponse>;
uploadDocument: (request: IPlatformsAccount.UploadDocumentRequest) => Promise<IPlatformsAccount.GetUploadedDocumentsResponse>;
unSuspendAccountHolder: (request: IPlatformsAccount.UnSuspendAccountHolderRequest) => Promise<IPlatformsAccount.UnSuspendAccountHolderResponse>;
closeAccount: (request: IPlatformsAccount.CloseAccountRequest) => Promise<IPlatformsAccount.CloseAccountResponse>;
suspendAccountHolder: (request: IPlatformsAccount.SuspendAccountHolderRequest) => Promise<IPlatformsAccount.SuspendAccountHolderResponse>;
updateAccountHolder: (request: IPlatformsAccount.UpdateAccountHolderRequest) => Promise<IPlatformsAccount.UpdateAccountHolderResponse>;
deleteShareholders: (request: IPlatformsAccount.DeleteShareholderRequest) => Promise<IPlatformsAccount.GenericResponse>;
checkAccountHolder: (request: IPlatformsAccount.PerformVerificationRequest) => Promise<IPlatformsAccount.GenericResponse>;
updateAccountHolderState: (request: IPlatformsAccount.UpdateAccountHolderStateRequest) => Promise<IPlatformsAccount.GetAccountHolderStatusResponse>;
} {
const closeAccount = this.createRequest<AccountsAccount, IPlatformsAccount.CloseAccountRequest, IPlatformsAccount.CloseAccountResponse>(this._closeAccount);
const updateAccount = this.createRequest<AccountsAccount, IPlatformsAccount.UpdateAccountRequest, IPlatformsAccount.UpdateAccountResponse>(this._updateAccount);
const createAccount = this.createRequest<AccountsAccount, IPlatformsAccount.CreateAccountRequest, IPlatformsAccount.CreateAccountResponse>(this._createAccount);
const uploadDocument = this.createRequest<AccountsVerification, IPlatformsAccount.UploadDocumentRequest, IPlatformsAccount.GetUploadedDocumentsResponse>(this._uploadDocument);
const getUploadedDocuments = this.createRequest<AccountsVerification, IPlatformsAccount.GetUploadedDocumentsRequest, IPlatformsAccount.GetUploadedDocumentsResponse>(this._getUploadedDocuments);
const deleteBankAccounts = this.createRequest<AccountsVerification, IPlatformsAccount.DeleteBankAccountRequest, IPlatformsAccount.GenericResponse>(this._deleteBankAccounts);
const deletePayoutMethods = this.createRequest<AccountsVerification, IPlatformsAccount.DeletePayoutMethodRequest, IPlatformsAccount.GenericResponse>(this._deletePayoutMethods);
const deleteShareholders = this.createRequest<AccountsVerification, IPlatformsAccount.DeleteShareholderRequest, IPlatformsAccount.GenericResponse>(this._deleteShareholders);
const createAccountHolder = this.createRequest<AccountsAccountHolders, IPlatformsAccount.CreateAccountHolderRequest, IPlatformsAccount.CreateAccountHolderResponse>(this._createAccountHolder);
const getAccountHolder = this.createRequest<AccountsAccountHolders, IPlatformsAccount.GetAccountHolderRequest, IPlatformsAccount.GetAccountHolderResponse>(this._getAccountHolder);
const updateAccountHolder = this.createRequest<AccountsAccountHolders, IPlatformsAccount.UpdateAccountHolderRequest, IPlatformsAccount.UpdateAccountHolderResponse>(this._updateAccountHolder);
const updateAccountHolderState = this.createRequest<AccountsAccountHolders, IPlatformsAccount.UpdateAccountHolderStateRequest, IPlatformsAccount.GetAccountHolderStatusResponse>(this._updateAccountHolderState);
const suspendAccountHolder = this.createRequest<AccountsAccountHolders, IPlatformsAccount.SuspendAccountHolderRequest, IPlatformsAccount.SuspendAccountHolderResponse>(this._suspendAccountHolder);
const unSuspendAccountHolder = this.createRequest<AccountsAccountHolders, IPlatformsAccount.UnSuspendAccountHolderRequest, IPlatformsAccount.UnSuspendAccountHolderResponse>(this._unSuspendAccountHolder);
const closeAccountHolder = this.createRequest<AccountsAccountHolders, IPlatformsAccount.CloseAccountHolderRequest, IPlatformsAccount.CloseAccountHolderResponse>(this._closeAccountHolder);
const checkAccountHolder = this.createRequest<AccountsVerification, IPlatformsAccount.PerformVerificationRequest, IPlatformsAccount.GenericResponse>(this._checkAccountHolder);
const accounts = { closeAccount, updateAccount, createAccount };
const verification = { uploadDocument, getUploadedDocuments, deleteBankAccounts, deletePayoutMethods, deleteShareholders, checkAccountHolder };
const accountHolders = { createAccountHolder, getAccountHolder, updateAccountHolder, updateAccountHolderState, suspendAccountHolder, unSuspendAccountHolder, closeAccountHolder};
return {...accounts, ...verification, ...accountHolders };
}
public get Fund(): {
refundNotPaidOutTransfers: (request: IPlatformsFund.RefundNotPaidOutTransfersRequest) => Promise<IPlatformsFund.RefundNotPaidOutTransfersResponse>;
accountHolderTransactionList: (request: IPlatformsFund.AccountHolderTransactionListRequest) => Promise<IPlatformsFund.AccountHolderTransactionListResponse>;
setupBeneficiary: (request: IPlatformsFund.SetupBeneficiaryRequest) => Promise<IPlatformsFund.SetupBeneficiaryResponse>;
transferFunds: (request: IPlatformsFund.TransferFundsRequest) => Promise<IPlatformsFund.TransferFundsResponse>;
refundFundsTransfer: (request: IPlatformsFund.RefundFundsTransferRequest) => Promise<IPlatformsFund.RefundFundsTransferResponse>;
payoutAccountHolder: (request: IPlatformsFund.PayoutAccountHolderRequest) => Promise<IPlatformsFund.PayoutAccountHolderResponse>;
accountHolderBalance: (request: IPlatformsFund.AccountHolderBalanceRequest) => Promise<IPlatformsFund.AccountHolderBalanceResponse>;
} {
const accountHolderBalance = this.createRequest<PlatformsFund, IPlatformsFund.AccountHolderBalanceRequest, IPlatformsFund.AccountHolderBalanceResponse>(this._accountHolderBalance);
const accountHolderTransactionList = this.createRequest<PlatformsFund, IPlatformsFund.AccountHolderTransactionListRequest, IPlatformsFund.AccountHolderTransactionListResponse>(this._accountHolderTransactionList);
const payoutAccountHolder = this.createRequest<PlatformsFund, IPlatformsFund.PayoutAccountHolderRequest, IPlatformsFund.PayoutAccountHolderResponse>(this._payoutAccountHolder);
const transferFunds = this.createRequest<PlatformsFund, IPlatformsFund.TransferFundsRequest, IPlatformsFund.TransferFundsResponse>(this._transferFunds);
const refundFundsTransfer = this.createRequest<PlatformsFund, IPlatformsFund.RefundFundsTransferRequest, IPlatformsFund.RefundFundsTransferResponse>(this._refundFundsTransfer);
const setupBeneficiary = this.createRequest<PlatformsFund, IPlatformsFund.SetupBeneficiaryRequest, IPlatformsFund.SetupBeneficiaryResponse>(this._setupBeneficiary);
const refundNotPaidOutTransfers = this.createRequest<PlatformsFund, IPlatformsFund.RefundNotPaidOutTransfersRequest, IPlatformsFund.RefundNotPaidOutTransfersResponse>(this._refundNotPaidOutTransfers);
return { accountHolderBalance, accountHolderTransactionList, payoutAccountHolder, refundFundsTransfer, transferFunds, setupBeneficiary, refundNotPaidOutTransfers };
}
public get HostedOnboardingPage(): { getOnboardingUrl: (request: IPlatformsHostedOnboardingPage.GetOnboardingUrlRequest) => Promise<IPlatformsHostedOnboardingPage.GetOnboardingUrlResponse> } {
const getOnboardingUrl = this.createRequest<PlatformsHostedOnboardingPage, IPlatformsHostedOnboardingPage.GetOnboardingUrlRequest, IPlatformsHostedOnboardingPage.GetOnboardingUrlResponse>(this._getOnboardingUrl);
return { getOnboardingUrl };
}
public get NotificationConfiguration(): {
createNotificationConfiguration: (request: IPlatformsNotificationConfiguration.CreateNotificationConfigurationRequest) => Promise<IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>;
updateNotificationConfiguration: (request: IPlatformsNotificationConfiguration.UpdateNotificationConfigurationRequest) => Promise<IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>;
getNotificationConfiguration: (request: IPlatformsNotificationConfiguration.GetNotificationConfigurationRequest) => Promise<IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>;
testNotificationConfiguration: (request: IPlatformsNotificationConfiguration.TestNotificationConfigurationRequest) => Promise<IPlatformsNotificationConfiguration.TestNotificationConfigurationResponse>;
getNotificationConfigurationList: (request: {}) => Promise<IPlatformsNotificationConfiguration.GetNotificationConfigurationListResponse>;
deleteNotificationConfigurations: (request: IPlatformsNotificationConfiguration.DeleteNotificationConfigurationRequest) => Promise<IPlatformsNotificationConfiguration.GenericResponse>;
} {
const createNotificationConfiguration = this.createRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.CreateNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>(this._createNotificationConfiguration);
const getNotificationConfiguration = this.createRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.GetNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>(this._getNotificationConfiguration);
const getNotificationConfigurationList = this.createRequest<PlatformsHostedOnboardingPage, {}, IPlatformsNotificationConfiguration.GetNotificationConfigurationListResponse>(this._getNotificationConfigurationList);
const testNotificationConfiguration = this.createRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.TestNotificationConfigurationRequest, IPlatformsNotificationConfiguration.TestNotificationConfigurationResponse>(this._testNotificationConfiguration);
const updateNotificationConfiguration = this.createRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.UpdateNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>(this._updateNotificationConfiguration);
const deleteNotificationConfigurations = this.createRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.DeleteNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GenericResponse>(this._deleteNotificationConfiguration);
return { createNotificationConfiguration, getNotificationConfiguration, getNotificationConfigurationList, testNotificationConfiguration, updateNotificationConfiguration, deleteNotificationConfigurations };
}
}
export default Platforms;

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
@@ -22,33 +20,42 @@
import Client from "../client";
import getJsonResponse from "../helpers/getJsonResponse";
import Service from "../service";
import { DisableRequest, DisableResult, RecurringDetailsRequest, RecurringDetailsResult } from "../typings/recurring";
import Disable from "./resource/recurring/disable";
import ListRecurringDetails from "./resource/recurring/listRecurringDetails";
import ScheduleAccountUpdater from "./resource/recurring/scheduleAccountUpdater";
class Recurring extends Service {
private readonly _listRecurringDetails: ListRecurringDetails;
private readonly _disable: Disable;
private readonly _scheduleAccountUpdater: ScheduleAccountUpdater;
public constructor(client: Client) {
super(client);
this._listRecurringDetails = new ListRecurringDetails(this);
this._disable = new Disable(this);
this._scheduleAccountUpdater = new ScheduleAccountUpdater(this);
}
public listRecurringDetails(request: RecurringDetailsRequest): Promise<RecurringDetailsResult> {
return getJsonResponse<RecurringDetailsRequest, RecurringDetailsResult>(
public listRecurringDetails(request: IRecurring.RecurringDetailsRequest): Promise<IRecurring.RecurringDetailsResult> {
return getJsonResponse<IRecurring.RecurringDetailsRequest, IRecurring.RecurringDetailsResult>(
this._listRecurringDetails,
request,
);
}
public disable(request: DisableRequest): Promise<DisableResult> {
return getJsonResponse<DisableRequest, DisableResult>(
public disable(request: IRecurring.DisableRequest): Promise<IRecurring.DisableResult> {
return getJsonResponse<IRecurring.DisableRequest, IRecurring.DisableResult>(
this._disable,
request,
);
}
public scheduleAccountUpdater(request: IRecurring.ScheduleAccountUpdaterRequest): Promise<IRecurring.ScheduleAccountUpdaterResult> {
return getJsonResponse<IRecurring.ScheduleAccountUpdaterRequest, IRecurring.ScheduleAccountUpdaterResult>(
this._scheduleAccountUpdater,
request,
);
}
}
export default Recurring;

View File

@@ -11,19 +11,18 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import Config from "../config";
import ClientInterface from "../typings/httpClient/clientInterface";
import Service from "../service";
import { RequestOptions } from "../typings/requestOptions";
import HttpClientException from "../httpClient/httpClientException";
import ApiException from "./exception/apiException";
import ClientInterface from "../httpClient/clientInterface";
import { IRequest } from "../typings/requestOptions";
abstract class Resource {
protected endpoint: string;
@@ -34,28 +33,16 @@ abstract class Resource {
this.endpoint = endpoint;
}
public request(json: string, requestOptions?: RequestOptions): Promise<string> {
public request(json: string, requestOptions?: IRequest.Options): Promise<string | HttpClientException | ApiException> {
const clientInterface: ClientInterface = this.service.client.httpClient;
const config: Config = this.service.client.config;
try {
return clientInterface.request(
this.endpoint,
json, config,
this.service.apiKeyRequired,
requestOptions,
);
} catch (e) {
const apiException: ApiException = new ApiException(e.message, e.statusCode);
try {
apiException.error = e.responseBody;
} catch (err) {
throw new ApiException("Invalid response or an invalid X-API-Key key was used", err.statusCode);
}
throw apiException;
}
return clientInterface.request(
this.endpoint,
json, config,
this.service.apiKeyRequired,
requestOptions,
);
}
}

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/

View File

@@ -0,0 +1,33 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import Client from "../../../client";
import Service from "../../../service";
import Resource from "../../resource";
class Orders extends Resource {
public constructor(service: Service) {
super(
service,
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/orders`,
);
}
}
export default Orders;

View File

@@ -0,0 +1,33 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import Client from "../../../client";
import Service from "../../../service";
import Resource from "../../resource";
class OrdersCancel extends Resource {
public constructor(service: Service) {
super(
service,
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/orders/cancel`,
);
}
}
export default OrdersCancel;

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
@@ -27,7 +25,7 @@ class OriginKeys extends Resource {
public constructor(service: Service) {
super(
service,
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_UTILITY_API_VERSION}/originKeys`,
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/originKeys`,
);
}
}

View File

@@ -0,0 +1,33 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import Client from "../../../client";
import Service from "../../../service";
import Resource from "../../resource";
class PaymentLinks extends Resource {
public constructor(service: Service) {
super(
service,
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentLinks`,
);
}
}
export default PaymentLinks;

View File

@@ -0,0 +1,40 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import Client from "../../../client";
import Service from "../../../service";
import Resource from "../../resource";
class PaymentLinksId extends Resource {
static _id: string;
public constructor(service: Service) {
super(
service,
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentLinks`,
);
}
public set id(id: string) {
PaymentLinksId._id = id;
this.endpoint = `${this.endpoint}/${PaymentLinksId._id}`;
}
}
export default PaymentLinksId;

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/

View File

@@ -0,0 +1,33 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
import Client from "../../../client";
import Service from "../../../service";
import Resource from "../../resource";
class PaymentMethodsBalance extends Resource {
public constructor(service: Service) {
super(
service,
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentMethods/balance`,
);
}
}
export default PaymentMethodsBalance;

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/

View File

@@ -11,10 +11,8 @@
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Copyright (c) 2019 Adyen B.V.
* Copyright (c) 2020 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/

Some files were not shown because too many files have changed in this diff Show More