Compare commits

...

151 Commits

Author SHA1 Message Date
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
193 changed files with 26857 additions and 7163 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"]
}
}
}

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* @KadoBOT @msilvagarcia @cyattilakiss @rkewlani @Aleffio @rikterbeek

12
.release-it.json Normal file
View File

@@ -0,0 +1,12 @@
{
"git": {
"tagName": "v${version}",
"changelog": "npx auto-changelog --stdout --commit-limit false -u"
},
"github": {
"release": true
},
"hooks": {
"after:bump": "npx auto-changelog -p"
}
}

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=

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

@@ -4,8 +4,9 @@
[![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)
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:
@@ -89,10 +90,14 @@ client.httpClient = httpClient;
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.

25
babel.config.js Executable file
View File

@@ -0,0 +1,25 @@
module.exports = {
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",
"@babel/plugin-transform-typescript"
]
}
}
}

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

@@ -20,6 +20,7 @@
*/
module.exports = {
preset: "ts-jest",
moduleFileExtensions: [
"ts",
"js"
@@ -32,5 +33,9 @@ module.exports = {
],
testMatch: [
"**/__tests__/*.ts"
],
testPathIgnorePatterns : [
"/node_modules",
"/dist"
]
};

11086
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"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.",
"version": "2.2.0",
"description": "The Adyen API Library for NodeJS enables you to work with Adyen APIs.",
"main": "dist/lib/src/index.js",
"types": "dist/lib/src/index.d.ts",
"module": "dist/lib-esm/src/index.js",
@@ -32,34 +32,38 @@
"test": "jest",
"preversion": "npm test",
"version": "npm run build && git add -A dist",
"postversion": "git push && git push --tags && rm -rf build/temp"
"postversion": "git push && git push --tags && rm -rf build/temp",
"release": "release-it --no-npm.publish"
},
"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",
"@babel/core": "7.7.7",
"@babel/plugin-proposal-class-properties": "7.7.4",
"@babel/plugin-proposal-object-rest-spread": "7.7.7",
"@babel/plugin-transform-runtime": "7.7.6",
"@babel/plugin-transform-typescript": "7.7.4",
"@babel/preset-env": "7.7.7",
"@babel/preset-typescript": "7.7.7",
"@babel/runtime": "7.7.7",
"@types/jest": "24.0.25",
"@types/nock": "10.0.3",
"@types/node": "11.13.18",
"@typescript-eslint/eslint-plugin": "2.0.0",
"@typescript-eslint/parser": "2.0.0",
"@types/node": "13.1.4",
"@typescript-eslint/eslint-plugin": "2.15.0",
"@typescript-eslint/parser": "2.15.0",
"babel-loader": "8.0.6",
"coveralls": "3.0.6",
"eslint": "6.2.0",
"coveralls": "3.0.9",
"eslint": "6.8.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"
"nock": "11.7.1",
"release-it": "12.4.3",
"ts-jest": "24.3.0",
"ts-loader": "6.2.1",
"typescript": "3.7.4",
"webpack": "4.41.5",
"webpack-cli": "3.3.10"
},
"dependencies": {
"https-proxy-agent": "2.2.2"
"https-proxy-agent": "4.0.0"
}
}

View File

@@ -19,9 +19,8 @@
* See the LICENSE file for more info.
*/
import nock from "nock";
import { createMockClientFromResponse } from "../__mocks__/base";
import {createMockClientFromResponse} from "../__mocks__/base";
import BinLookup from "../services/binLookup";
import {CostEstimateRequest, ThreeDSAvailabilityRequest} from "../typings/binLookup";
import Client from "../client";
import HttpClientException from "../httpClient/httpClientException";
@@ -54,7 +53,7 @@ beforeEach((): void => {
describe("Bin Lookup", function (): void {
it("should succeed on get 3ds availability", async function (): Promise<void> {
const threeDSAvailabilityRequest: ThreeDSAvailabilityRequest = {
const threeDSAvailabilityRequest: IBinLookup.ThreeDSAvailabilityRequest = {
merchantAccount: "MOCK_MERCHANT_ACCOUNT",
brands: ["randomBrand"],
cardNumber: "4111111111111111"
@@ -79,7 +78,7 @@ 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();
@@ -92,7 +91,7 @@ describe("Bin Lookup", function (): void {
resultCode: "Unsupported",
surchargeType: "ZERO"
};
const costEstimateRequest: CostEstimateRequest = {
const costEstimateRequest: IBinLookup.CostEstimateRequest = {
amount: { currency: "EUR", value: 1000 },
assumptions: {
assumeLevel3Data: true,

View File

@@ -28,26 +28,20 @@ import {paymentSessionSuccess} from "../__mocks__/checkout/paymentSessionSucess"
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 = "MagentoMerchantTest";
const reference = "Your order number";
function createAmountObject(currency: string, value: number): ICheckout.Amount {
return {
currency,
value,
};
}
function createPaymentsDetailsRequest(): DetailsRequest {
function createPaymentsDetailsRequest(): ICheckout.DetailsRequest {
return {
details: {
MD: "mdValue",
@@ -57,31 +51,31 @@ function createPaymentsDetailsRequest(): DetailsRequest {
};
}
export function createPaymentsCheckoutRequest(): PaymentRequest {
export function createPaymentsCheckoutRequest(): ICheckout.PaymentRequest {
const paymentMethodDetails = {
cvc: "737",
expiryMonth: "10",
expiryYear: "2018",
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/...",
};
}
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/...",
};
}
@@ -101,8 +95,8 @@ describe("Checkout", (): void => {
scope.post("/payments")
.reply(200, paymentsSuccess);
const paymentsRequest: PaymentRequest = createPaymentsCheckoutRequest();
const paymentsResponse: PaymentResponse = await checkout.payments(paymentsRequest);
const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest();
const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments(paymentsRequest);
expect(paymentsResponse.pspReference).toEqual("8535296650153317");
});
@@ -111,7 +105,7 @@ describe("Checkout", (): void => {
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();
@@ -119,7 +113,7 @@ describe("Checkout", (): void => {
});
it("should have valid payment methods", async (): Promise<void> => {
const paymentMethodsRequest: PaymentMethodsRequest = {merchantAccount: "MagentoMerchantTest"};
const paymentMethodsRequest: ICheckout.PaymentMethodsRequest = {merchantAccount: "MagentoMerchantTest"};
scope.post("/paymentMethods")
.reply(200, paymentMethodsSuccess);
@@ -133,6 +127,50 @@ describe("Checkout", (): void => {
}
});
it("should have valid payment link", async (): Promise<void> => {
const amount = createAmountObject("BRL", 1000);
const expiresAt = "2019-12-17T10:05:29Z";
const paymentLinkRequest: ICheckout.CreatePaymentLinkRequest = {
allowedPaymentMethods: ["scheme", "boletobancario"],
amount,
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"
},
expiresAt,
reference
};
const paymentLinkSuccess: ICheckout.CreatePaymentLinkResponse = {
amount,
expiresAt,
reference,
url: "paymentLinkResponse.url"
};
scope.post("/paymentLinks").reply(200, paymentLinkSuccess);
const paymentSuccessLinkResponse = await checkout.paymentLinks(paymentLinkRequest);
expect(paymentLinkSuccess).toEqual(paymentSuccessLinkResponse);
});
it("should have payment details", async (): Promise<void> => {
scope.post("/payments/details")
.reply(200, paymentDetailsSuccess);
@@ -146,7 +184,7 @@ describe("Checkout", (): void => {
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();
});
@@ -156,7 +194,7 @@ describe("Checkout", (): void => {
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);
@@ -180,12 +218,15 @@ describe("Checkout", (): void => {
.reply(200, paymentsResultMultibancoSuccess);
const checkout: Checkout = new Checkout(client);
const paymentsRequest: PaymentRequest = createPaymentsCheckoutRequest();
const paymentsResponse: PaymentResponse = await checkout.payments(paymentsRequest);
const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest();
const paymentsResponse: ICheckout.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");
if (paymentsResponse.additionalData) {
expect(paymentsResponse.additionalData["comprafacil.amount"]).toEqual("101.01");
expect(paymentsResponse.additionalData["comprafacil.deadline"]).toEqual("3");
expect(paymentsResponse.additionalData["comprafacil.entity"]).toEqual("12345");
}
});
});

View File

@@ -23,14 +23,13 @@ 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 = {
const originKeysRequest: ICheckoutUtility.CheckoutUtilityRequest = {
originDomains: ["www.test.com", "https://www.your-domain2.com"],
};
@@ -39,7 +38,10 @@ describe("Checkout Utility", (): void => {
.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");
if (originKeysResponse.originKeys) {
return expect(originKeysResponse.originKeys["https://www.your-domain1.com"])
.toEqual("pub.v2.7814286629520534.aHR0cHM6Ly93d3cueW91ci1kb21haW4xLmNvbQ.UEwIBmW9-c_uXo5wSEr2w8Hz8hVIpujXPHjpcEse3xI");
}
fail("Error: originKeysResponse.originKeys is empty");
});
});

View File

@@ -1,6 +1,6 @@
import HmacValidator from "../utils/hmacValidator";
import {NotificationRequestItem} from "../typings/notification";
import {HMAC_SIGNATURE} from "../typings/constants/apiConstants";
import {ApiConstants} from "../constants/apiConstants";
const key = "DFB1EB5485895CFA84146406857104ABB4CBCABDC8AAF103A624C8F6A3EAAB00";
const expectedSign = "ipnxGCaUZ4l8TUW75a71/ghd2Fe5ffvX0pV4TLTntIc=";
@@ -15,7 +15,7 @@ const notificationRequestItem: NotificationRequestItem = {
paymentMethod: "VISA",
reason: "reason",
success: "true",
additionalData: { [HMAC_SIGNATURE]: expectedSign },
additionalData: { [ApiConstants.HMAC_SIGNATURE]: expectedSign },
};
describe("HMAC Validator", function (): void {
@@ -26,8 +26,8 @@ describe("HMAC Validator", function (): void {
});
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";
@@ -52,7 +52,7 @@ describe("HMAC Validator", function (): void {
it("should have invalid hmac", function (): void {
const invalidNotification = {
...notificationRequestItem,
additionalData: { [HMAC_SIGNATURE]: "notValidSign" }
additionalData: { [ApiConstants.HMAC_SIGNATURE]: "notValidSign" }
};
const hmacValidator = new HmacValidator();
const result = hmacValidator.validateHMAC(invalidNotification, key);

View File

@@ -1,43 +1,50 @@
import nock from "nock";
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 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) => {
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");
}
});
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");
}
return { errorType, errorMessageContains: contains, errorMessageEquals: equals };
});
});
});

View File

@@ -4,62 +4,82 @@ 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, NotificationEnum, NotificationRequestItem} from "../typings/notification";
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.EVENT_CODE_AUTHORISATION).toEqual(notificationRequestItem.eventCode);
expect(notificationRequestItem.success === "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.EVENT_CODE_CAPTURE).toEqual(notificationRequestItem.eventCode);
expect(notificationRequestItem.success === "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.EVENT_CODE_CAPTURE).toEqual(notificationRequestItem.eventCode);
expect(notificationRequestItem.success === "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.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();
} 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.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();
} else {
fail();
}
});
});

View File

@@ -1,13 +1,9 @@
import nock from "nock";
import { createMockClientFromResponse } from "../__mocks__/base";
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";
import StoreDetailRequest = IPayouts.StoreDetailRequest;
import {ApiConstants} from "../constants/apiConstants";
const storeDetailAndSubmitThirdParty = JSON.stringify({
additionalData: {
@@ -35,13 +31,13 @@ const amountAndReference = {
};
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): IPayouts.StoreDetailRequest => ({
...defaultData,
entityType: "NaturalPerson",
recurring: {
@@ -50,7 +46,7 @@ const mockStoreDetailRequest = (merchantAccount: string): StoreDetailRequest =>
merchantAccount,
});
const mockSubmitRequest = (merchantAccount: string): SubmitRequest => ({
const mockSubmitRequest = (merchantAccount: string): IPayouts.SubmitRequest => ({
selectedRecurringDetailReference: "LATEST",
recurring: {
contract: "ONECLICK"
@@ -60,12 +56,12 @@ const mockSubmitRequest = (merchantAccount: string): SubmitRequest => ({
merchantAccount,
});
const mockStoreDetailAndSubmitRequest = (merchantAccount: string): StoreDetailAndSubmitRequest => ({
const mockStoreDetailAndSubmitRequest = (merchantAccount: string): IPayouts.StoreDetailAndSubmitRequest => ({
...amountAndReference,
...(mockStoreDetailRequest(merchantAccount)),
});
const mockPayoutRequest = (merchantAccount: string): PayoutRequest => ({
const mockPayoutRequest = (merchantAccount: string): IPayouts.PayoutRequest => ({
...amountAndReference,
...defaultData,
card: {
@@ -89,14 +85,17 @@ beforeEach((): void => {
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}`);
const request: IPayouts.StoreDetailAndSubmitRequest = mockStoreDetailAndSubmitRequest(`${client.config.merchantAccount}`);
scope.post("/storeDetail").reply(200, storeDetailAndSubmitThirdParty);
const result = await payout.storeDetail(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");
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 store detail", async function (): Promise<void> {
@@ -116,7 +115,7 @@ describe("PayoutTest", function (): void {
response: "[payout-confirm-received]"
});
const request: ModifyRequest = {
const request: IPayouts.ModifyRequest = {
merchantAccount: "MOCKED_MERCHANT_ACCOUNT",
originalReference: "reference"
};
@@ -129,13 +128,16 @@ describe("PayoutTest", function (): void {
it("should succeed on submit third party", async function (): Promise<void> {
scope.post("/submitThirdParty").reply(200, storeDetailAndSubmitThirdParty);
const request: SubmitRequest = mockSubmitRequest("MOCKED_MERCHANT_ACC");
const request: IPayouts.SubmitRequest = mockSubmitRequest("MOCKED_MERCHANT_ACC");
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");
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> {
@@ -144,7 +146,7 @@ describe("PayoutTest", function (): void {
response: "[payout-confirm-received]"
});
const request: ModifyRequest = {
const request: IPayouts.ModifyRequest = {
merchantAccount: "MOCKED_MERCHANT_ACC",
originalReference: "reference"
};

View File

@@ -1,15 +1,14 @@
import nock from "nock";
import { createMockClientFromResponse } from "../__mocks__/base";
import { disableSuccess } from "../__mocks__/recurring/disableSuccess";
import { listRecurringDetailsSuccess } from "../__mocks__/recurring/listRecurringDetailsSuccess";
import {createMockClientFromResponse} 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";
const createRecurringDetailsRequest = (): RecurringDetailsRequest => {
const createRecurringDetailsRequest = (): IRecurring.RecurringDetailsRequest => {
return {
merchantAccount: "MerchantAccount",
recurring: {contract: "ONECLICK"},
recurring: { contract: "ONECLICK" },
shopperReference: "test-123",
};
};
@@ -38,7 +37,7 @@ describe("Recurring", (): void => {
scope.post("/disable")
.reply(200, disableSuccess);
const request: DisableRequest = {
const request: IRecurring.DisableRequest = {
merchantAccount: "MerchantAccount",
recurringDetailReference: "reference",
shopperReference: "test-123",

View File

@@ -4,7 +4,7 @@ import {asyncRes} from "../__mocks__/terminalApi/async";
import {syncRes} from "../__mocks__/terminalApi/sync";
import Client from "../client";
import TerminalCloudAPI from "../services/terminalCloudAPI";
import {Convert, TerminalApiRequest, TerminalApiResponse} from "../typings/terminal";
import {Convert, TerminalApiResponse} from "../typings/terminal";
let client: Client;
@@ -21,7 +21,7 @@ describe("Terminal Cloud API", (): void => {
it("should make an async payment request", async (): Promise<void> => {
scope.post("/async").reply(200, asyncRes);
const terminalAPIPaymentRequest: TerminalApiRequest = createTerminalAPIPaymentRequest() as TerminalApiRequest;
const terminalAPIPaymentRequest = createTerminalAPIPaymentRequest();
const requestResponse: string = await terminalCloudAPI.async(terminalAPIPaymentRequest);
@@ -32,7 +32,7 @@ describe("Terminal Cloud API", (): void => {
const response = Convert.toTerminalApiResponse(syncRes);
scope.post("/sync").reply(200, response);
const terminalAPIPaymentRequest: TerminalApiRequest = createTerminalAPIPaymentRequest() as TerminalApiRequest;
const terminalAPIPaymentRequest = createTerminalAPIPaymentRequest();
const terminalAPIResponse: TerminalApiResponse = await terminalCloudAPI.sync(terminalAPIPaymentRequest);
expect(terminalAPIResponse).toEqual(response);

View File

@@ -3,7 +3,7 @@ import {createMockClientFromResponse, createTerminalAPIPaymentRequest} from "../
import {localEncRes, localSecuredRes, wrongEncRes} from "../__mocks__/terminalApi/local";
import Client from "../client";
import TerminalLocalAPI from "../services/terminalLocalAPI";
import {Convert, SecurityKey, TerminalApiRequest, TerminalApiResponse} from "../typings/terminal";
import {Convert, SecurityKey, TerminalApiResponse} from "../typings/terminal";
import NexoCryptoException from "../services/exception/nexoCryptoException";
let client: Client;
@@ -22,7 +22,7 @@ describe("Terminal Local API", (): void => {
const response = Convert.toTerminalApiResponse(localSecuredRes);
scope.post("/").reply(200, securedResponse);
const terminalAPIPaymentRequest = createTerminalAPIPaymentRequest() as TerminalApiRequest;
const terminalAPIPaymentRequest = createTerminalAPIPaymentRequest();
const securityKey: SecurityKey = {
adyenCryptoVersion: 1,
@@ -41,7 +41,7 @@ describe("Terminal Local API", (): void => {
const securedResponse = Convert.toTerminalApiSecuredResponse(wrongEncRes);
scope.post("/").reply(200, securedResponse);
const terminalAPIPaymentRequest = createTerminalAPIPaymentRequest() as TerminalApiRequest;
const terminalAPIPaymentRequest = createTerminalAPIPaymentRequest();
const securityKey: SecurityKey = {
adyenCryptoVersion: 1,

View File

@@ -20,10 +20,9 @@
*/
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 ClientInterface from "./httpClient/clientInterface";
type ClientParametersOverload =
| { config: Config }
@@ -55,18 +54,18 @@ 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 = "v51";
public static RECURRING_API_VERSION = "v49";
public static MARKETPAY_ACCOUNT_API_VERSION = "v5";
public static MARKETPAY_FUND_API_VERSION = "v5";
public static MARKETPAY_NOTIFICATION_API_VERSION = "v5";
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 = "v51";
public static BIN_LOOKUP_PAL_SUFFIX = "/pal/servlet/BinLookup/";
public static BIN_LOOKUP_API_VERSION = "v40";
public static BIN_LOOKUP_API_VERSION = "v50";
public static CHECKOUT_UTILITY_API_VERSION = "v1";
public static TERMINAL_API_ENDPOINT_TEST = "https://terminal-api-test.adyen.com";
public static TERMINAL_API_ENDPOINT_LIVE = "https://terminal-api-live.adyen.com";

View File

@@ -18,8 +18,6 @@
* 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,85 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* 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.
*/
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

@@ -19,6 +19,8 @@
* 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

@@ -20,20 +20,21 @@
*/
import Resource from "../services/resource";
import { RequestOptions } from "../typings/requestOptions";
import HttpClientException from "../httpClient/httpClientException";
import ApiException from "../services/exception/apiException";
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

@@ -18,15 +18,16 @@
* 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";
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

@@ -27,20 +27,12 @@ import * as fs from "fs";
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 ApiException from "../services/exception/apiException";
import ClientInterface from "./clientInterface";
import {ApiConstants} from "../constants/apiConstants";
class HttpURLConnectionClient implements ClientInterface {
private static CHARSET = "utf-8";
@@ -49,8 +41,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,8 +52,12 @@ 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");
@@ -69,19 +65,19 @@ class HttpURLConnectionClient implements ClientInterface {
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 +89,21 @@ 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}`;
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,23 +112,44 @@ 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 = "";
const getException = (): HttpClientException => new HttpClientException(
`HTTP Exception: ${res.statusCode}. ${res.statusMessage}`,
res.statusCode,
undefined,
res.headers,
res,
);
let exception: HttpClientException | Error = getException();
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);
try {
const formattedData: ApiError = JSON.parse(data.toString() as string);
const isApiError = "status" in formattedData;
const isRequestError = "errors" in formattedData;
if (isApiError) {
exception = new HttpClientException(
`HTTP Exception: ${formattedData.status}. ${res.statusMessage}: ${formattedData.message}`,
formattedData.status,
formattedData.errorCode,
res.headers,
res,
);
} else if (isRequestError) {
exception = new Error(data);
}
} catch (e) {
reject(exception);
} finally {
reject(exception);
}
}
resData += data;
@@ -152,13 +168,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 +184,7 @@ class HttpURLConnectionClient implements ClientInterface {
};
} catch (e) {
throw new HttpClientException(`Error loading certificate from path: ${e.message}`);
return Promise.reject(new HttpClientException(`Error loading certificate from path: ${e.message}`));
}
}

View File

@@ -32,7 +32,7 @@ class NotificationRequest {
return undefined;
}
return this.notificationItemContainers.map((container): NotificationRequestItem => container.notificationRequestItem);
return this.notificationItemContainers.map((container): NotificationRequestItem => container.NotificationRequestItem);
}
public live: string;

View File

@@ -21,7 +21,6 @@
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,
@@ -31,6 +30,7 @@ import {
} from "../typings/terminal";
import InvalidSecurityKeyException from "./exception/invalidSecurityKeyException";
import NexoDerivedKeyGenerator from "./nexoDerivedKeyGenerator";
import {NexoEnum} from "../constants/nexoConstants";
enum Modes {
ENCRYPT,
@@ -91,8 +91,8 @@ class NexoCrypto {
}
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 +111,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

@@ -20,26 +20,26 @@
*/
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 {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

@@ -22,12 +22,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 +34,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

@@ -22,16 +22,12 @@
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 setApplicationInfo from "../helpers/setApplicationInfo";
class Checkout extends ApiKeyAuthenticatedService {
@@ -40,6 +36,7 @@ class Checkout extends ApiKeyAuthenticatedService {
private readonly _paymentsDetails: PaymentsDetails;
private readonly _paymentSession: PaymentSession;
private readonly _paymentsResult: PaymentsResult;
private readonly _paymentLinks: PaymentLinks;
public constructor(client: Client) {
super(client);
@@ -48,43 +45,51 @@ class Checkout extends ApiKeyAuthenticatedService {
this._paymentsDetails = new PaymentsDetails(this);
this._paymentSession = new PaymentSession(this);
this._paymentsResult = new PaymentsResult(this);
this._paymentLinks = new PaymentLinks(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.CreatePaymentLinkResponse> {
return getJsonResponse<ICheckout.CreatePaymentLinkRequest, ICheckout.CreatePaymentLinkResponse>(
this._paymentLinks,
paymentLinkRequest
);
}
public paymentsDetails(paymentsDetailsRequest: ICheckout.DetailsRequest): Promise<ICheckout.PaymentResponse> {
return getJsonResponse<ICheckout.DetailsRequest, ICheckout.PaymentResponse>(
this._paymentsDetails,
paymentsDetailsRequest,
);
}
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,
);

View File

@@ -22,7 +22,6 @@
import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService";
import Client from "../client";
import getJsonResponse from "../helpers/getJsonResponse";
import { CheckoutUtilityRequest, CheckoutUtilityResponse } from "../typings/checkoutUtility";
import OriginKeys from "./resource/checkoutUtility/originKeys";
class CheckoutUtility extends ApiKeyAuthenticatedService {
@@ -33,8 +32,8 @@ class CheckoutUtility extends ApiKeyAuthenticatedService {
this._originKeys = new OriginKeys(this);
}
public originKeys(originKeysRequest: CheckoutUtilityRequest): Promise<CheckoutUtilityResponse> {
return getJsonResponse<CheckoutUtilityRequest, CheckoutUtilityResponse>(
public originKeys(originKeysRequest: ICheckoutUtility.CheckoutUtilityRequest): Promise<ICheckoutUtility.CheckoutUtilityResponse> {
return getJsonResponse<ICheckoutUtility.CheckoutUtilityRequest, ICheckoutUtility.CheckoutUtilityResponse>(
this._originKeys,
originKeysRequest,
);

View File

@@ -27,7 +27,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

@@ -21,8 +21,6 @@
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 +28,10 @@ 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";
interface AppInfo { applicationInfo?: ApplicationInfo }
type GenericRequest<T> = T & AppInfo;
class Modification extends Service {
private readonly _cancelOrRefund: CancelOrRefund;
@@ -50,10 +52,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 +63,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 +74,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 +85,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 +96,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 +107,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

@@ -26,12 +26,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 +47,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
);

View File

@@ -22,7 +22,6 @@
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";
@@ -36,15 +35,15 @@ class Recurring extends Service {
this._disable = new Disable(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,
);

View File

@@ -20,10 +20,10 @@
*/
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";
abstract class Resource {
protected endpoint: string;
@@ -34,28 +34,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

@@ -0,0 +1,35 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* 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 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

@@ -25,6 +25,8 @@ import getJsonResponse from "../helpers/getJsonResponse";
import {Convert, TerminalApiRequest, TerminalApiResponse} from "../typings/terminal";
import Async from "./resource/terminal/cloud/async";
import Sync from "./resource/terminal/cloud/sync";
import mergeDeep from "../utils/mergeDeep";
import {ApplicationInfo} from "../typings/applicationInfo";
class TerminalCloudAPI extends ApiKeyAuthenticatedService {
private readonly terminalApiAsync: Async;
@@ -36,17 +38,28 @@ class TerminalCloudAPI extends ApiKeyAuthenticatedService {
this.terminalApiSync = new Sync(this);
}
private static setApplicationInfo(request: TerminalApiRequest): TerminalApiRequest {
const applicationInfo = new ApplicationInfo();
const saleToAcquirerData = {applicationInfo};
const saleData = {saleToAcquirerData};
const paymentRequest = {saleData};
const saleToPoiRequest = {paymentRequest};
const newRequest = {saleToPoiRequest};
return mergeDeep(request, newRequest);
}
public async(terminalApiRequest: TerminalApiRequest): Promise<string> {
return getJsonResponse<TerminalApiRequest>(
this.terminalApiAsync,
Convert.terminalApiRequestToJson(terminalApiRequest),
);
const request = TerminalCloudAPI.setApplicationInfo(terminalApiRequest);
return getJsonResponse<TerminalApiRequest>(this.terminalApiAsync, Convert.terminalApiRequestToJson(request));
}
public async sync(terminalApiRequest: TerminalApiRequest): Promise<TerminalApiResponse> {
const request = TerminalCloudAPI.setApplicationInfo(terminalApiRequest);
const response = await getJsonResponse<TerminalApiRequest, TerminalApiResponse>(
this.terminalApiSync,
Convert.terminalApiRequestToJson(terminalApiRequest),
Convert.terminalApiRequestToJson(request),
);
return Convert.toTerminalApiResponse(JSON.stringify(response));

View File

@@ -1,3 +1,25 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* 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.
*/
export interface Amount {
currency: string;
value: number;

View File

@@ -1,3 +1,24 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* 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.
*/
// Generated using typescript-generator version 2.14.505 on 2019-06-04 08:51:10.
export interface ApiError {

View File

@@ -1,3 +1,24 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* 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.
*/
// Generated using typescript-generator version 2.14.505 on 2019-06-11 10:28:22.
import Client from "../client";
@@ -38,4 +59,4 @@ export interface ShopperInteractionDevice {
os?: string;
osVersion?: string;
locale?: string;
}
}

341
src/typings/binLookup.ts Normal file
View File

@@ -0,0 +1,341 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen NodeJS API Library
*
* Version of BinLookup: v50
*
* Copyright (c) 2019 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
declare namespace IBinLookup {
export interface Amount {
/**
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
*/
currency: string;
/**
* The payable amount that can be charged for the transaction.
*
* The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes).
*/
value: number; // int64
}
export interface BinDetail {
/**
* The country where the card was issued.
*/
issuerCountry?: string;
}
export interface CardBin {
/**
* The first 6 digit of the card number. Enable this field via merchant account settings.
*/
bin?: string;
/**
* If true, it indicates a commercial card. Enable this field via merchant account settings.
*/
commercial?: boolean;
/**
* The card funding source. Valid values are:
* * CHARGE
* * CREDIT
* * DEBIT
* * DEFERRED_DEBIT
* * PREPAID
* * PREPAID_RELOADABLE
* * PREPAID_NONRELOADABLE
* > Enable this field via merchant account settings.
*/
fundingSource?: string;
/**
* Indicates availability of funds.
*
* Visa:
* * "I" (fast funds are supported)
* * "N" (otherwise)
*
* Mastercard:
* * "I" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list)
* * "N" (otherwise)
* > Returned when you verify a card BIN or estimate costs, and only if `payoutEligible` is different from "N" or "U".
*/
fundsAvailability?: string;
/**
* The issuing bank of the card.
*/
issuingBank?: string;
/**
* The country where the card was issued from.
*/
issuingCountry?: string;
/**
* The currency of the card.
*/
issuingCurrency?: string;
/**
* The payment method associated with the card (e.g. visa, mc, or amex).
*/
paymentMethod?: string;
/**
* Indicates whether a payout is eligible or not for this card.
*
* Visa:
* * "Y"
* * "N"
*
* Mastercard:
* * "Y" (domestic and cross-border)
* * "D" (only domestic)
* * "N" (no MoneySend)
* * "U" (unknown)
* > Returned when you verify a card BIN or estimate costs, and only if `payoutEligible` is different from "N" or "U".
*/
payoutEligible?: string;
/**
* The last four digits of the card number.
*/
summary?: string;
}
export interface CostEstimateAssumptions {
/**
* If true, the cardholder is expected to successfully authorise via 3D Secure.
*/
assume3DSecureAuthenticated?: boolean;
/**
* If true, the transaction is expected to have valid Level 3 data.
*/
assumeLevel3Data?: boolean;
/**
* If not zero, the number of installments.
*/
installments?: number; // int32
}
export interface CostEstimateRequest {
/**
* The transaction amount used as a base for the cost estimation.
*/
amount: IBinLookup.Amount;
/**
* Assumptions made for the expected characteristics of the transaction, for which the charges are being estimated.
*/
assumptions?: IBinLookup.CostEstimateAssumptions;
/**
* The card number (4-19 characters) for PCI compliant use cases. Do not use any separators.
*
* > Either the `cardNumber` or `encryptedCard` field must be provided in a payment request.
*/
cardNumber?: string;
/**
* Encrypted data that stores card information for non PCI-compliant use cases. The encrypted data must be created with the Checkout Card Component or Secured Fields Component, and must contain the `encryptedCardNumber` field.
*
* > Either the `cardNumber` or `encryptedCard` field must be provided in a payment request.
*/
encryptedCard?: string;
/**
* The merchant account identifier you want to process the (transaction) request with.
*/
merchantAccount: string;
/**
* Additional data for merchants who don't use Adyen as the payment authorisation gateway.
*/
merchantDetails?: IBinLookup.MerchantDetails;
/**
* The recurring settings for the payment. Use this property when you want to enable [recurring payments](https://docs.adyen.com/checkout/tokenization).
*/
recurring?: IBinLookup.Recurring;
/**
* The `recurringDetailReference` you want to use for this cost estimate. The value `LATEST` can be used to select the most recently stored recurring detail.
*/
selectedRecurringDetailReference?: string;
/**
* Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer.
* For the web service API, Adyen assumes Ecommerce shopper interaction by default.
*
* This field has the following possible values:
* * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request.
* * `ContAuth` - Card on file and/or subscription transactions, where the card holder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment).
* * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone.
* * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.
*/
shopperInteraction?: "Ecommerce" | "ContAuth" | "Moto" | "POS";
/**
* The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID).
* > This field is required for recurring payments.
*/
shopperReference?: string;
}
export interface CostEstimateResponse {
/**
* Card BIN details.
*/
cardBin?: IBinLookup.CardBin;
/**
* The estimated cost (scheme fee + interchange) in the settlement currency. If the settlement currency cannot be determined, the fee in EUR is returned.
*/
costEstimateAmount?: IBinLookup.Amount;
/**
* The result of the cost estimation.
*/
resultCode?: string;
/**
* Indicates the way the charges can be passed on to the cardholder. The following values are possible:
* * `ZERO` - the charges are not allowed to pass on
* * `PASSTHROUGH` - the charges can be passed on
* * `UNLIMITED` - there is no limit on how much surcharge is passed on
*/
surchargeType?: string;
}
export interface DSPublicKeyDetail {
/**
* Card brand.
*/
brand?: string;
/**
* Directory Server (DS) identifier.
*/
directoryServerId?: string;
/**
* Public key. The 3D Secure 2 SDK encrypts the device information by using the DS public key.
*/
publicKey?: string; // byte
}
export interface MerchantDetails {
/**
* 2-letter ISO 3166 country code of the card acceptor location.
* > This parameter is required for the merchants who don't use Adyen as the payment authorisation gateway.
*/
countryCode?: string;
/**
* If true, indicates that the merchant is enrolled in 3D Secure for the card network.
*/
enrolledIn3DSecure?: boolean;
/**
* The merchant category code (MCC) is a four-digit number which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.
*
* The list of MCCs can be found [here](https://en.wikipedia.org/wiki/Merchant_category_code).
*/
mcc?: string;
}
namespace Post {
export type RequestBody = IBinLookup.CostEstimateRequest;
namespace Responses {
export type $200 = IBinLookup.CostEstimateResponse;
}
}
export interface Recurring {
/**
* The type of recurring contract to be used.
* Possible values:
* * `ONECLICK` Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid).
* * `RECURRING` Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp).
* * `ONECLICK,RECURRING` Payment details can be used regardless of whether the shopper is on your site or not.
* * `PAYOUT` Payment details can be used to [make a payout](https://docs.adyen.com/checkout/online-payouts).
*/
contract?: "ONECLICK" | "RECURRING" | "PAYOUT";
/**
* A descriptive name for this detail.
*/
recurringDetailName?: string;
/**
* Date after which no further authorisations shall be performed. Only for 3D Secure 2.
*/
recurringExpiry?: string; // date-time
/**
* Minimum number of days between authorisations. Only for 3D Secure 2.
*/
recurringFrequency?: string;
/**
* The name of the token service.
*/
tokenService?: "VISATOKENSERVICE" | "MCTOKENSERVICE";
}
export interface ThreeDS2CardRangeDetail {
/**
* Card brand.
*/
brandCode?: string;
/**
* BIN end range.
*/
endRange?: string;
/**
* BIN start range.
*/
startRange?: string;
/**
* 3D Secure protocol version.
*/
threeDS2Version?: string;
/**
* In a 3D Secure 2 browser-based flow, this is the URL where you should send the device fingerprint to.
*/
threeDSMethodURL?: string;
}
export interface ThreeDSAvailabilityRequest {
/**
* This field contains additional data, which may be required for a particular request.
*
* The `additionalData` object consists of entries, each of which includes the key and value. For more information on possible key-value pairs, refer to the [additionalData section](https://docs.adyen.com/api-reference/payments-api/paymentrequest/paymentrequest-additionaldata).
*/
additionalData?: {
};
/**
* List of brands.
*/
brands: string[];
/**
* Card number or BIN.
*/
cardNumber?: string;
/**
* The merchant account identifier.
*/
merchantAccount: string;
/**
* A recurring detail reference corresponding to a card.
*/
recurringDetailReference?: string;
/**
* The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID).
*/
shopperReference?: string;
}
export interface ThreeDSAvailabilityResponse {
/**
* Bin Group Details
*/
binDetails?: IBinLookup.BinDetail;
/**
* List of Directory Server (DS) public keys.
*/
dsPublicKeys?: IBinLookup.DSPublicKeyDetail[];
/**
* Indicator if 3D Secure 1 is supported.
*/
threeDS1Supported?: boolean;
/**
* List of brand and card range pairs.
*/
threeDS2CardRangeDetails?: IBinLookup.ThreeDS2CardRangeDetail[];
/**
* Indicator if 3D Secure 2 is supported.
*/
threeDS2supported?: boolean;
}
}

View File

@@ -1,22 +0,0 @@
/**
* Adyen BinLookup Service
* The BIN Lookup API provides endpoints for retrieving information, such as [cost estimates](https://docs.adyen.com/features/cost-estimation), and 3D Secure supported version based on a given [BIN](https://docs.adyen.com/payments-basics/payment-glossary#bankidentificationnumberbin).
*
* OpenAPI spec version: 40
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface Amount {
/**
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
*/
currency: string;
/**
* The payable amount that can be charged for the transaction. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes).
*/
value: number;
}

View File

@@ -1,54 +0,0 @@
/**
* Adyen BinLookup Service
* The BIN Lookup API provides endpoints for retrieving information, such as [cost estimates](https://docs.adyen.com/features/cost-estimation), and 3D Secure supported version based on a given [BIN](https://docs.adyen.com/payments-basics/payment-glossary#bankidentificationnumberbin).
*
* OpenAPI spec version: 40
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface CardBin {
/**
* The first 6 digit of the card number. Enable this field via merchant account settings.
*/
bin?: string;
/**
* If true, it indicates a commercial card. Enable this field via merchant account settings.
*/
commercial?: boolean;
/**
* The card funding source. Valid values are: * CREDIT * DEBIT * PREPAID * PREPAID_RELOADABLE * DEFERRED_DEBIT * CHARGED > Enable this field via merchant account settings.
*/
fundingSource?: string;
/**
* Indicates availability of funds. Visa: * \"I\" (fast funds are supported) * \"N\" (otherwise) Mastercard: * \"I\" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) * \"N\" (otherwise) > Returned when you verify a card BIN or estimate costs, and only if `payoutEligible` is different from \"N\" or \"U\".
*/
fundsAvailability?: string;
/**
* The issuing bank of the card.
*/
issuingBank?: string;
/**
* The country where the card was issued from.
*/
issuingCountry?: string;
/**
* The currency of the card.
*/
issuingCurrency?: string;
/**
* The payment method associated with the card (e.g. visa, mc, or amex).
*/
paymentMethod?: string;
/**
* Indicates whether a payout is eligible or not for this card. Visa: * \"Y\" * \"N\" Mastercard: * \"Y\" (domestic and cross-border) * \"D\" (only domestic) * \"N\" (no MoneySend) * \"U\" (unknown) > Returned when you verify a card BIN or estimate costs, and only if `payoutEligible` is different from \"N\" or \"U\".
*/
payoutEligible?: string;
/**
* The last four digits of the card number.
*/
summary?: string;
}

View File

@@ -1,26 +0,0 @@
/**
* Adyen BinLookup Service
* The BIN Lookup API provides endpoints for retrieving information, such as [cost estimates](https://docs.adyen.com/features/cost-estimation), and 3D Secure supported version based on a given [BIN](https://docs.adyen.com/payments-basics/payment-glossary#bankidentificationnumberbin).
*
* OpenAPI spec version: 40
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface CostEstimateAssumptions {
/**
* If true, the cardholder is expected to successfully authorise via 3D Secure.
*/
assume3DSecureAuthenticated?: boolean;
/**
* If true, the transaction is expected to have valid Level 3 data.
*/
assumeLevel3Data?: boolean;
/**
* If not zero, the number of installments.
*/
installments?: number;
}

View File

@@ -1,55 +0,0 @@
/**
* Adyen BinLookup Service
* The BIN Lookup API provides endpoints for retrieving information, such as [cost estimates](https://docs.adyen.com/features/cost-estimation), and 3D Secure supported version based on a given [BIN](https://docs.adyen.com/payments-basics/payment-glossary#bankidentificationnumberbin).
*
* OpenAPI spec version: 40
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { Amount } from './amount';
import { CostEstimateAssumptions } from './costEstimateAssumptions';
import { MerchantDetails } from './merchantDetails';
import { Recurring } from './recurring';
export interface CostEstimateRequest {
amount: Amount;
assumptions?: CostEstimateAssumptions;
/**
* The card number (4-19 characters) for PCI compliant use cases. Do not use any separators. > Either the `cardNumber` or `encryptedCard` field must be provided in a payment request.
*/
cardNumber?: string;
/**
* Encrypted data that stores card information for non PCI-compliant use cases. The encrypted data must be created with the Client-Side Encryption library and must contain at least the `number` and `generationtime` fields. > Either the `cardNumber` or `encryptedCard` field must be provided in a payment request.
*/
encryptedCard?: string;
/**
* The merchant account identifier you want to process the (transaction) request with.
*/
merchantAccount: string;
merchantDetails?: MerchantDetails;
recurring?: Recurring;
/**
* The `recurringDetailReference` you want to use for this cost estimate. The value `LATEST` can be used to select the most recently stored recurring detail.
*/
selectedRecurringDetailReference?: string;
/**
* Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the card holder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.
*/
shopperInteraction?: CostEstimateRequest.ShopperInteractionEnum;
/**
* The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID). > This field is required for recurring payments.
*/
shopperReference?: string;
}
export namespace CostEstimateRequest {
export type ShopperInteractionEnum = 'Ecommerce' | 'ContAuth' | 'Moto' | 'POS';
export const ShopperInteractionEnum = {
Ecommerce: 'Ecommerce' as ShopperInteractionEnum,
ContAuth: 'ContAuth' as ShopperInteractionEnum,
Moto: 'Moto' as ShopperInteractionEnum,
POS: 'POS' as ShopperInteractionEnum
};
}

View File

@@ -1,26 +0,0 @@
/**
* Adyen BinLookup Service
* The BIN Lookup API provides endpoints for retrieving information, such as [cost estimates](https://docs.adyen.com/features/cost-estimation), and 3D Secure supported version based on a given [BIN](https://docs.adyen.com/payments-basics/payment-glossary#bankidentificationnumberbin).
*
* OpenAPI spec version: 40
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { Amount } from './amount';
import { CardBin } from './cardBin';
export interface CostEstimateResponse {
cardBin?: CardBin;
costEstimateAmount?: Amount;
/**
* The result of the cost estimation.
*/
resultCode?: string;
/**
* Indicates the way the charges can be passed on to the cardholder. The following values are possible: * `ZERO` - the charges are not allowed to pass on * `PASSTHROUGH` - the charges can be passed on * `UNLIMITED` - there is no limit on how much surcharge is passed on
*/
surchargeType?: string;
}

View File

@@ -1,26 +0,0 @@
/**
* Adyen BinLookup Service
* The BIN Lookup API provides endpoints for retrieving information, such as [cost estimates](https://docs.adyen.com/features/cost-estimation), and 3D Secure supported version based on a given [BIN](https://docs.adyen.com/payments-basics/payment-glossary#bankidentificationnumberbin).
*
* OpenAPI spec version: 40
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface DSPublicKeyDetail {
/**
* Card brand.
*/
brand?: string;
/**
* Directory Server (DS) identifier.
*/
directoryServerId?: string;
/**
* Public key. The 3D Secure 2 SDK encrypts the device information by using the DS public key.
*/
publicKey?: string;
}

View File

@@ -1,11 +0,0 @@
export * from './amount';
export * from './cardBin';
export * from './costEstimateAssumptions';
export * from './costEstimateRequest';
export * from './costEstimateResponse';
export * from './dSPublicKeyDetail';
export * from './merchantDetails';
export * from './recurring';
export * from './threeDS2CardRangeDetail';
export * from './threeDSAvailabilityRequest';
export * from './threeDSAvailabilityResponse';

View File

@@ -1,26 +0,0 @@
/**
* Adyen BinLookup Service
* The BIN Lookup API provides endpoints for retrieving information, such as [cost estimates](https://docs.adyen.com/features/cost-estimation), and 3D Secure supported version based on a given [BIN](https://docs.adyen.com/payments-basics/payment-glossary#bankidentificationnumberbin).
*
* OpenAPI spec version: 40
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface MerchantDetails {
/**
* 2-letter ISO 3166 country code of the card acceptor location. > This parameter is required for the merchants who don't use Adyen as the payment authorisation gateway.
*/
countryCode?: string;
/**
* If true, indicates that the merchant is enrolled in 3D Secure for the card network.
*/
enrolledIn3DSecure?: boolean;
/**
* The merchant category code (MCC) is a four-digit number which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. The list of MCCs can be found [here](https://en.wikipedia.org/wiki/Merchant_category_code).
*/
mcc?: string;
}

View File

@@ -1,47 +0,0 @@
/**
* Adyen BinLookup Service
* The BIN Lookup API provides endpoints for retrieving information, such as [cost estimates](https://docs.adyen.com/features/cost-estimation), and 3D Secure supported version based on a given [BIN](https://docs.adyen.com/payments-basics/payment-glossary#bankidentificationnumberbin).
*
* OpenAPI spec version: 40
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface Recurring {
/**
* The type of recurring contract to be used. Possible values: * `ONECLICK` Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payment-glossary#cardsecuritycodecvccvvcid). * `RECURRING` Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payment-glossary#cardnotpresentcnp). * `ONECLICK,RECURRING` Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` Payment details can be used to [make a payout](https://docs.adyen.com/features/third-party-payouts).
*/
contract?: Recurring.ContractEnum;
/**
* A descriptive name for this detail.
*/
recurringDetailName?: string;
/**
* Date after which no further authorisations shall be performed. Only for 3D Secure 2.
*/
recurringExpiry?: Date;
/**
* Minimum number of days between authorisations. Only for 3D Secure 2.
*/
recurringFrequency?: string;
/**
* The name of the token service.
*/
tokenService?: Recurring.TokenServiceEnum;
}
export namespace Recurring {
export type ContractEnum = 'ONECLICK' | 'RECURRING' | 'PAYOUT';
export const ContractEnum = {
ONECLICK: 'ONECLICK' as ContractEnum,
RECURRING: 'RECURRING' as ContractEnum,
PAYOUT: 'PAYOUT' as ContractEnum
};
export type TokenServiceEnum = 'VISATOKENSERVICE' | 'MCTOKENSERVICE';
export const TokenServiceEnum = {
VISATOKENSERVICE: 'VISATOKENSERVICE' as TokenServiceEnum,
MCTOKENSERVICE: 'MCTOKENSERVICE' as TokenServiceEnum
};
}

View File

@@ -1,34 +0,0 @@
/**
* Adyen BinLookup Service
* The BIN Lookup API provides endpoints for retrieving information, such as [cost estimates](https://docs.adyen.com/features/cost-estimation), and 3D Secure supported version based on a given [BIN](https://docs.adyen.com/payments-basics/payment-glossary#bankidentificationnumberbin).
*
* OpenAPI spec version: 40
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ThreeDS2CardRangeDetail {
/**
* Card brand.
*/
brandCode?: string;
/**
* BIN end range.
*/
endRange?: string;
/**
* BIN start range.
*/
startRange?: string;
/**
* 3D Secure protocol version.
*/
threeDS2Version?: string;
/**
* In a 3D Secure 2 browser-based flow, this is the URL where you should send the device fingerprint to.
*/
threeDSMethodURL?: string;
}

View File

@@ -1,38 +0,0 @@
/**
* Adyen BinLookup Service
* The BIN Lookup API provides endpoints for retrieving information, such as [cost estimates](https://docs.adyen.com/features/cost-estimation), and 3D Secure supported version based on a given [BIN](https://docs.adyen.com/payments-basics/payment-glossary#bankidentificationnumberbin).
*
* OpenAPI spec version: 40
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ThreeDSAvailabilityRequest {
/**
* This field contains additional data, which may be required for a particular request. The `additionalData` object consists of entries, each of which includes the key and value. For more information on possible key-value pairs, refer to the [additionalData section](https://docs.adyen.com/api-reference/payments-api#paymentrequestadditionaldata).
*/
additionalData?: any;
/**
* List of brands.
*/
brands: Array<string>;
/**
* Card number or BIN.
*/
cardNumber?: string;
/**
* The merchant account identifier.
*/
merchantAccount: string;
/**
* A recurring detail reference corresponding to a card.
*/
recurringDetailReference?: string;
/**
* The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID).
*/
shopperReference?: string;
}

View File

@@ -1,32 +0,0 @@
/**
* Adyen BinLookup Service
* The BIN Lookup API provides endpoints for retrieving information, such as [cost estimates](https://docs.adyen.com/features/cost-estimation), and 3D Secure supported version based on a given [BIN](https://docs.adyen.com/payments-basics/payment-glossary#bankidentificationnumberbin).
*
* OpenAPI spec version: 40
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { DSPublicKeyDetail } from './dSPublicKeyDetail';
import { ThreeDS2CardRangeDetail } from './threeDS2CardRangeDetail';
export interface ThreeDSAvailabilityResponse {
/**
* List of Directory Server (DS) public keys.
*/
dsPublicKeys?: Array<DSPublicKeyDetail>;
/**
* Indicator if 3D Secure 1 is supported.
*/
threeDS1Supported?: boolean;
/**
* List of brand and card range pairs.
*/
threeDS2CardRangeDetails?: Array<ThreeDS2CardRangeDetail>;
/**
* Indicator if 3D Secure 2 is supported.
*/
threeDS2supported?: boolean;
}

3528
src/typings/checkout.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,126 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface AccountInfo {
/**
* Indicator for the length of time since this shopper account was created in the merchant's environment. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days
*/
accountAgeIndicator?: AccountInfo.AccountAgeIndicatorEnum;
/**
* Date when the shopper's account was last changed.
*/
accountChangeDate?: Date;
/**
* Indicator for the length of time since the shopper's account was last updated. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days
*/
accountChangeIndicator?: AccountInfo.AccountChangeIndicatorEnum;
/**
* Date when the shopper's account was created.
*/
accountCreationDate?: Date;
/**
* Number of attempts the shopper tried to add a card to their account in the last day.
*/
addCardAttemptsDay?: number;
/**
* Date the selected delivery address was last used.
*/
deliveryAddressUsageDate?: Date;
/**
* Indicator for the length of time since this delivery address was last used. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days
*/
deliveryAddressUsageIndicator?: AccountInfo.DeliveryAddressUsageIndicatorEnum;
/**
* Shopper's home phone number (including the country code).
*/
homePhone?: string;
/**
* Shopper's mobile phone number (including the country code).
*/
mobilePhone?: string;
/**
* Date when the shopper last changed their password.
*/
passwordChangeDate?: Date;
/**
* Indicator when the shopper has changed their password. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days
*/
passwordChangeIndicator?: AccountInfo.PasswordChangeIndicatorEnum;
/**
* Number of all transactions (successful and abandoned) from this shopper in the past 24 hours.
*/
pastTransactionsDay?: number;
/**
* Number of all transactions (successful and abandoned) from this shopper in the past year.
*/
pastTransactionsYear?: number;
/**
* Date this payment method was added to the shopper's account.
*/
paymentAccountAge?: Date;
/**
* Indicator for the length of time since this payment method was added to this shopper's account. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days
*/
paymentAccountIndicator?: AccountInfo.PaymentAccountIndicatorEnum;
/**
* Number of successful purchases in the last six months.
*/
purchasesLast6Months?: number;
/**
* Whether suspicious activity was recorded on this account.
*/
suspiciousActivity?: boolean;
/**
* Shopper's work phone number (including the country code).
*/
workPhone?: string;
}
export namespace AccountInfo {
export type AccountAgeIndicatorEnum = 'notApplicable' | 'thisTransaction' | 'lessThan30Days' | 'from30To60Days' | 'moreThan60Days';
export const AccountAgeIndicatorEnum = {
NotApplicable: 'notApplicable' as AccountAgeIndicatorEnum,
ThisTransaction: 'thisTransaction' as AccountAgeIndicatorEnum,
LessThan30Days: 'lessThan30Days' as AccountAgeIndicatorEnum,
From30To60Days: 'from30To60Days' as AccountAgeIndicatorEnum,
MoreThan60Days: 'moreThan60Days' as AccountAgeIndicatorEnum
};
export type AccountChangeIndicatorEnum = 'thisTransaction' | 'lessThan30Days' | 'from30To60Days' | 'moreThan60Days';
export const AccountChangeIndicatorEnum = {
ThisTransaction: 'thisTransaction' as AccountChangeIndicatorEnum,
LessThan30Days: 'lessThan30Days' as AccountChangeIndicatorEnum,
From30To60Days: 'from30To60Days' as AccountChangeIndicatorEnum,
MoreThan60Days: 'moreThan60Days' as AccountChangeIndicatorEnum
};
export type DeliveryAddressUsageIndicatorEnum = 'thisTransaction' | 'lessThan30Days' | 'from30To60Days' | 'moreThan60Days';
export const DeliveryAddressUsageIndicatorEnum = {
ThisTransaction: 'thisTransaction' as DeliveryAddressUsageIndicatorEnum,
LessThan30Days: 'lessThan30Days' as DeliveryAddressUsageIndicatorEnum,
From30To60Days: 'from30To60Days' as DeliveryAddressUsageIndicatorEnum,
MoreThan60Days: 'moreThan60Days' as DeliveryAddressUsageIndicatorEnum
};
export type PasswordChangeIndicatorEnum = 'notApplicable' | 'thisTransaction' | 'lessThan30Days' | 'from30To60Days' | 'moreThan60Days';
export const PasswordChangeIndicatorEnum = {
NotApplicable: 'notApplicable' as PasswordChangeIndicatorEnum,
ThisTransaction: 'thisTransaction' as PasswordChangeIndicatorEnum,
LessThan30Days: 'lessThan30Days' as PasswordChangeIndicatorEnum,
From30To60Days: 'from30To60Days' as PasswordChangeIndicatorEnum,
MoreThan60Days: 'moreThan60Days' as PasswordChangeIndicatorEnum
};
export type PaymentAccountIndicatorEnum = 'notApplicable' | 'thisTransaction' | 'lessThan30Days' | 'from30To60Days' | 'moreThan60Days';
export const PaymentAccountIndicatorEnum = {
NotApplicable: 'notApplicable' as PaymentAccountIndicatorEnum,
ThisTransaction: 'thisTransaction' as PaymentAccountIndicatorEnum,
LessThan30Days: 'lessThan30Days' as PaymentAccountIndicatorEnum,
From30To60Days: 'from30To60Days' as PaymentAccountIndicatorEnum,
MoreThan60Days: 'moreThan60Days' as PaymentAccountIndicatorEnum
};
}

View File

@@ -1,38 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface Address {
/**
* The name of the city. >Required if either houseNumberOrName, street, postalCode, or stateOrProvince are provided.
*/
city?: string;
/**
* The two-character country code of the address >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL').
*/
country: string;
/**
* The number or name of the house.
*/
houseNumberOrName?: string;
/**
* The postal code. >A maximum of five (5) digits for an address in the USA, or a maximum of ten (10) characters for an address in all other countries.
*/
postalCode?: string;
/**
* The abbreviation of the state or province. >Two (2) characters for an address in the USA or Canada, or a maximum of three (3) characters for an address in all other countries. >Required for an address in the USA or Canada if either houseNumberOrName, street, city, or postalCode are provided.
*/
stateOrProvince?: string;
/**
* The name of the street. >The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. >Required if either houseNumberOrName, city, postalCode, or stateOrProvince are provided.
*/
street?: string;
}

View File

@@ -1,22 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface Amount {
/**
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
*/
currency: string;
/**
* The payable amount that can be charged for the transaction. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes).
*/
value: number;
}

View File

@@ -1,30 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface Avs {
/**
* Indicates whether the shopper is allowed to modify the billing address for the current payment request.
*/
addressEditable?: boolean;
/**
* Specifies whether the shopper should enter their billing address during checkout. Allowed values: * yes — Perform AVS checks for every card payment. * automatic — Perform AVS checks only when required to optimize the conversion rate. * no — Do not perform AVS checks.
*/
enabled?: Avs.EnabledEnum;
}
export namespace Avs {
export type EnabledEnum = 'yes' | 'no' | 'automatic';
export const EnabledEnum = {
Yes: 'yes' as EnabledEnum,
No: 'no' as EnabledEnum,
Automatic: 'automatic' as EnabledEnum
};
}

View File

@@ -1,50 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface BankAccount {
/**
* The bank account number (without separators).
*/
bankAccountNumber?: string;
/**
* The bank city.
*/
bankCity?: string;
/**
* The location id of the bank. The field value is `nil` in most cases.
*/
bankLocationId?: string;
/**
* The name of the bank.
*/
bankName?: string;
/**
* The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.
*/
bic?: string;
/**
* Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL').
*/
countryCode?: string;
/**
* The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).
*/
iban?: string;
/**
* The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.
*/
ownerName?: string;
/**
* The bank account holder's tax ID.
*/
taxId?: string;
}

View File

@@ -1,50 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface BrowserInfo {
/**
* The accept header value of the shopper's browser.
*/
acceptHeader: string;
/**
* The color depth of the shopper's browser in bits per pixel. This should be obtained by using the browser's `screen.colorDepth` property. Accepted values: 1, 4, 8, 15, 16, 24, 32 or 48 bit color depth.
*/
colorDepth: number;
/**
* Boolean value indicating if the shopper's browser is able to execute Java.
*/
javaEnabled: boolean;
/**
* Boolean value indicating if the shopper's browser is able to execute JavaScript. A default 'true' value is assumed if the field is not present.
*/
javaScriptEnabled?: boolean;
/**
* The `navigator.language` value of the shopper's browser (as defined in IETF BCP 47).
*/
language: string;
/**
* The total height of the shopper's device screen in pixels.
*/
screenHeight: number;
/**
* The total width of the shopper's device screen in pixels.
*/
screenWidth: number;
/**
* Time difference between UTC time and the shopper's browser local time, in minutes.
*/
timeZoneOffset: number;
/**
* The user agent value of the shopper's browser.
*/
userAgent: string;
}

View File

@@ -1,46 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface Card {
/**
* The [card verification code](https://docs.adyen.com/payments-essentials/payment-glossary#card_security_code_cvc_cvv_cid_) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 length: 3 digits * CID length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored.
*/
cvc?: string;
/**
* The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November
*/
expiryMonth: string;
/**
* The card expiry year. Format: 4 digits. For example: 2020
*/
expiryYear: string;
/**
* The name of the cardholder, as printed on the card.
*/
holderName: string;
/**
* The issue number of the card (for some UK debit cards only).
*/
issueNumber?: string;
/**
* The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned.
*/
number: string;
/**
* The month component of the start date (for some UK debit cards only).
*/
startMonth?: string;
/**
* The year component of the start date (for some UK debit cards only).
*/
startYear?: string;
}

View File

@@ -1,38 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface Company {
/**
* The company website's home page.
*/
homepage?: string;
/**
* The company name.
*/
name?: string;
/**
* Registration number of the company.
*/
registrationNumber?: string;
/**
* Registry location of the company.
*/
registryLocation?: string;
/**
* Tax ID of the company.
*/
taxId?: string;
/**
* The company type.
*/
type?: string;
}

View File

@@ -1,32 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { Avs } from './avs';
import { Installments } from './installments';
import { ShopperInput } from './shopperInput';
export interface Configuration {
avs?: Avs;
/**
* Determines whether the cardholder name should be provided or not. Permitted values: * NONE * OPTIONAL * REQUIRED
*/
cardHolderName?: Configuration.CardHolderNameEnum;
installments?: Installments;
shopperInput?: ShopperInput;
}
export namespace Configuration {
export type CardHolderNameEnum = 'NONE' | 'OPTIONAL' | 'REQUIRED';
export const CardHolderNameEnum = {
NONE: 'NONE' as CardHolderNameEnum,
OPTIONAL: 'OPTIONAL' as CardHolderNameEnum,
REQUIRED: 'REQUIRED' as CardHolderNameEnum
};
}

View File

@@ -1,26 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface DetailsRequest {
/**
* Use this collection to submit the details that were returned as a result of the `/payments` call.
*/
details: any;
/**
* The `paymentData` value that you received in the response to the `/payments` call.
*/
paymentData?: string;
/**
* Change the `authenticationOnly` indicator originally set in the `/payments` request. Only needs to be set if you want to modify the value set previously.
*/
threeDSAuthenticationOnly?: boolean;
}

View File

@@ -1,40 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface DeviceRenderOptions {
/**
* Supported SDK interface types. Allowed values: * Native * Html * both
*/
sdkInterface?: DeviceRenderOptions.SdkInterfaceEnum;
/**
* UI types supported for displaying specific challenges. Allowed values: * text * singleSelect * outOfBand * otherHtml * multiSelect
*/
sdkUiType?: Array<DeviceRenderOptions.SdkUiTypeEnum>;
}
export namespace DeviceRenderOptions {
export type SdkInterfaceEnum = 'Html' | 'Native' | 'both';
export const SdkInterfaceEnum = {
Html: 'Html' as SdkInterfaceEnum,
Native: 'Native' as SdkInterfaceEnum,
Both: 'both' as SdkInterfaceEnum
};
export type SdkUiTypeEnum = 'multiSelect' | 'otherHtml' | 'outOfBand' | 'singleSelect' | 'text';
export const SdkUiTypeEnum = {
MultiSelect: 'multiSelect' as SdkUiTypeEnum,
OtherHtml: 'otherHtml' as SdkUiTypeEnum,
OutOfBand: 'outOfBand' as SdkUiTypeEnum,
SingleSelect: 'singleSelect' as SdkUiTypeEnum,
Text: 'text' as SdkUiTypeEnum
};
}

View File

@@ -1,53 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { Amount } from './amount';
export interface ForexQuote {
/**
* The account name.
*/
account?: string;
/**
* The account type.
*/
accountType?: string;
baseAmount?: Amount;
/**
* The base points.
*/
basePoints: number;
buy?: Amount;
interbank?: Amount;
/**
* The reference assigned to the forex quote request.
*/
reference?: string;
sell?: Amount;
/**
* The signature to validate the integrity.
*/
signature?: string;
/**
* The source of the forex quote.
*/
source?: string;
/**
* The type of forex.
*/
type?: string;
/**
* The date until which the forex quote is valid.
*/
validTill: Date;
}

View File

@@ -1,28 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface FraudCheckResult {
/**
* The fraud score generated by the risk check.
*/
accountScore: number;
/**
* The ID of the risk check.
*/
checkId: number;
/**
* The name of the risk check.
*/
name: string;
}

View File

@@ -1,25 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { FraudCheckResult } from './fraudCheckResult';
export interface FraudResult {
/**
* The total fraud score generated by the risk checks.
*/
accountScore: number;
/**
* The result of the individual risk checks.
*/
results?: Array<FraudCheckResult>;
}

View File

@@ -1,45 +0,0 @@
export * from './accountInfo';
export * from './address';
export * from './amount';
export * from './avs';
export * from './bankAccount';
export * from './browserInfo';
export * from './card';
export * from './company';
export * from './configuration';
export * from './detailsRequest';
export * from './deviceRenderOptions';
export * from './forexQuote';
export * from './fraudCheckResult';
export * from './fraudResult';
export * from './inputDetail';
export * from './installments';
export * from './item';
export * from './lineItem';
export * from './merchantRiskIndicator';
export * from './name';
export * from './paymentMethod';
export * from './paymentMethodGroup';
export * from './paymentMethodsGroup';
export * from './paymentMethodsRequest';
export * from './paymentMethodsResponse';
export * from './paymentRequest';
export * from './paymentResponse';
export * from './paymentSetupRequest';
export * from './paymentSetupResponse';
export * from './paymentVerificationRequest';
export * from './paymentVerificationResponse';
export * from './recurring';
export * from './recurringDetail';
export * from './redirect';
export * from './sDKEphemPubKey';
export * from './serviceError';
export * from './shopperInput';
export * from './split';
export * from './splitAmount';
export * from './storedDetails';
export * from './subInputDetail';
export * from './threeDS2RequestData';
export * from './threeDSecureData';

View File

@@ -1,50 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { Item } from './item';
import { SubInputDetail } from './subInputDetail';
export interface InputDetail {
/**
* Configuration parameters for the required input.
*/
configuration?: any;
/**
* Input details can also be provided recursively.
*/
details?: Array<SubInputDetail>;
/**
* In case of a select, the URL from which to query the items.
*/
itemSearchUrl?: string;
/**
* In case of a select, the items to choose from.
*/
items?: Array<Item>;
/**
* The value to provide in the result.
*/
key?: string;
/**
* True if this input value is optional.
*/
optional?: boolean;
/**
* The type of the required input.
*/
type?: string;
/**
* The value can be pre-filled, if available.
*/
value?: string;
}

View File

@@ -1,20 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface Installments {
/**
* Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary.
*/
value: number;
}

View File

@@ -1,24 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface Item {
/**
* The value to provide in the result.
*/
id?: string;
/**
* The display name.
*/
name?: string;
}

View File

@@ -1,57 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface LineItem {
/**
* Item amount excluding the tax, in minor units.
*/
amountExcludingTax?: number;
/**
* Item amount including the tax, in minor units.
*/
amountIncludingTax?: number;
/**
* Description of the line item.
*/
description?: string;
/**
* ID of the line item.
*/
id?: string;
/**
* Number of items.
*/
quantity?: number;
/**
* Tax amount, in minor units.
*/
taxAmount?: number;
/**
* Tax category: High, Low, None, Zero
*/
taxCategory?: LineItem.TaxCategoryEnum;
/**
* Tax percentage, in minor units.
*/
taxPercentage?: number;
}
export namespace LineItem {
export type TaxCategoryEnum = 'High' | 'Low' | 'None' | 'Zero';
export const TaxCategoryEnum = {
High: 'High' as TaxCategoryEnum,
Low: 'Low' as TaxCategoryEnum,
None: 'None' as TaxCategoryEnum,
Zero: 'Zero' as TaxCategoryEnum
};
}

View File

@@ -1,69 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { Amount } from './amount';
export interface MerchantRiskIndicator {
/**
* Whether the chosen delivery address is identical to the billing address.
*/
addressMatch?: boolean;
/**
* Indicator regarding the delivery address. Allowed values: * `shipToBillingAddress` * `shipToVerifiedAddress` * `shipToNewAddress` * `shipToStore` * `digitalGoods` * `goodsNotShipped` * `other`
*/
deliveryAddressIndicator?: MerchantRiskIndicator.DeliveryAddressIndicatorEnum;
/**
* The delivery email address (for digital goods).
*/
deliveryEmail?: string;
/**
* The estimated delivery time for the shopper to receive the goods. Allowed values: * `electronicDelivery` * `sameDayShipping` * `overnightShipping` * `twoOrMoreDaysShipping`
*/
deliveryTimeframe?: MerchantRiskIndicator.DeliveryTimeframeEnum;
giftCardAmount?: Amount;
/**
* Number of individual prepaid or gift cards used for this purchase.
*/
giftCardCount?: number;
/**
* For pre-order purchases, the expected date this product will be available to the shopper.
*/
preOrderDate?: Date;
/**
* Indicator for whether this transaction is for pre-ordering a product.
*/
preOrderPurchase?: boolean;
/**
* Indicator for whether the shopper has already purchased the same items in the past.
*/
reorderItems?: boolean;
}
export namespace MerchantRiskIndicator {
export type DeliveryAddressIndicatorEnum = 'shipToBillingAddress' | 'shipToVerifiedAddress' | 'shipToNewAddress' | 'shipToStore' | 'digitalGoods' | 'goodsNotShipped' | 'other';
export const DeliveryAddressIndicatorEnum = {
ShipToBillingAddress: 'shipToBillingAddress' as DeliveryAddressIndicatorEnum,
ShipToVerifiedAddress: 'shipToVerifiedAddress' as DeliveryAddressIndicatorEnum,
ShipToNewAddress: 'shipToNewAddress' as DeliveryAddressIndicatorEnum,
ShipToStore: 'shipToStore' as DeliveryAddressIndicatorEnum,
DigitalGoods: 'digitalGoods' as DeliveryAddressIndicatorEnum,
GoodsNotShipped: 'goodsNotShipped' as DeliveryAddressIndicatorEnum,
Other: 'other' as DeliveryAddressIndicatorEnum
};
export type DeliveryTimeframeEnum = 'electronicDelivery' | 'sameDayShipping' | 'overnightShipping' | 'twoOrMoreDaysShipping';
export const DeliveryTimeframeEnum = {
ElectronicDelivery: 'electronicDelivery' as DeliveryTimeframeEnum,
SameDayShipping: 'sameDayShipping' as DeliveryTimeframeEnum,
OvernightShipping: 'overnightShipping' as DeliveryTimeframeEnum,
TwoOrMoreDaysShipping: 'twoOrMoreDaysShipping' as DeliveryTimeframeEnum
};
}

View File

@@ -1,40 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface Name {
/**
* The first name.
*/
firstName: string;
/**
* The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`.
*/
gender: Name.GenderEnum;
/**
* The name's infix, if applicable. >A maximum length of twenty (20) characters is imposed.
*/
infix?: string;
/**
* The last name.
*/
lastName: string;
}
export namespace Name {
export type GenderEnum = 'MALE' | 'FEMALE' | 'UNKNOWN';
export const GenderEnum = {
MALE: 'MALE' as GenderEnum,
FEMALE: 'FEMALE' as GenderEnum,
UNKNOWN: 'UNKNOWN' as GenderEnum
};
}

View File

@@ -1,43 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { InputDetail } from './inputDetail';
import { PaymentMethodGroup } from './paymentMethodGroup';
export interface PaymentMethod {
/**
* The configuration of the payment method.
*/
configuration?: any;
/**
* All input details to be provided to complete the payment with this payment method.
*/
details?: Array<InputDetail>;
group?: PaymentMethodGroup;
/**
* The displayable name of this payment method.
*/
name?: string;
/**
* Echo data required to send in next calls.
*/
paymentMethodData?: string;
/**
* Indicates whether this payment method supports tokenization or not.
*/
supportsRecurring?: boolean;
/**
* The unique payment method code.
*/
type?: string;
}

View File

@@ -1,28 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface PaymentMethodGroup {
/**
* The name of the group.
*/
name?: string;
/**
* Echo data to be used if the payment method is displayed as part of this group.
*/
paymentMethodData?: string;
/**
* The unique code of the group.
*/
type?: string;
}

View File

@@ -1,28 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface PaymentMethodsGroup {
/**
* The type to submit for any payment method in this group.
*/
groupType?: string;
/**
* The human-readable name of this group.
*/
name?: string;
/**
* The types of payment methods that belong in this group.
*/
types?: Array<string>;
}

View File

@@ -1,58 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { Amount } from './amount';
export interface PaymentMethodsRequest {
/**
* This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. For more information on possible key-value pairs, refer to the [additionalData section](https://docs.adyen.com/api-reference/payments-api#paymentrequestadditionaldata).
*/
additionalData?: any;
/**
* List of payments methods to be presented to the shopper. To refer to payment methods, use their `brandCode` from [Payment methods overview](https://docs.adyen.com/payment-methods/payment-methods-overview).
*/
allowedPaymentMethods?: Array<string>;
amount?: Amount;
/**
* List of payments methods to be hidden from the shopper. To refer to payment methods, use their `brandCode` from [Payment methods overview](https://docs.adyen.com/payment-methods/payment-methods-overview).
*/
blockedPaymentMethods?: Array<string>;
/**
* The platform where a payment transaction takes place. This field can be used for filtering out payment methods that are only available on specific platforms. Possible values: * iOS * Android * Web
*/
channel?: PaymentMethodsRequest.ChannelEnum;
/**
* The shopper's country code.
*/
countryCode?: string;
/**
* The merchant account identifier, with which you want to process the transaction.
*/
merchantAccount: string;
/**
* The combination of a language code and a country code to specify the language to be used in the payment.
*/
shopperLocale?: string;
/**
* The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID). > This field is required for recurring payments.
*/
shopperReference?: string;
}
export namespace PaymentMethodsRequest {
export type ChannelEnum = 'iOS' | 'Android' | 'Web';
export const ChannelEnum = {
IOS: 'iOS' as ChannelEnum,
Android: 'Android' as ChannelEnum,
Web: 'Web' as ChannelEnum
};
}

View File

@@ -1,31 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { PaymentMethod } from './paymentMethod';
import { PaymentMethodsGroup } from './paymentMethodsGroup';
import { RecurringDetail } from './recurringDetail';
export interface PaymentMethodsResponse {
/**
* Groups of payment methods.
*/
groups?: Array<PaymentMethodsGroup>;
/**
* Detailed list of one-click payment methods.
*/
oneClickPaymentMethods?: Array<RecurringDetail>;
/**
* Detailed list of payment methods required to generate payment forms.
*/
paymentMethods?: Array<PaymentMethod>;
}

View File

@@ -1,214 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { AccountInfo } from './accountInfo';
import { Address } from './address';
import { Amount } from './amount';
import { BrowserInfo } from './browserInfo';
import { Company } from './company';
import { ForexQuote } from './forexQuote';
import { Installments } from './installments';
import { LineItem } from './lineItem';
import { MerchantRiskIndicator } from './merchantRiskIndicator';
import { Name } from './name';
import { Split } from './split';
import { ThreeDS2RequestData } from './threeDS2RequestData';
import { ThreeDSecureData } from './threeDSecureData';
import { ApplicationInfo } from "../applicationInfo";
export interface PaymentRequest {
applicationInfo?: ApplicationInfo;
accountInfo?: AccountInfo;
/**
* This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. For more information on possible key-value pairs, refer to the [additionalData section](https://docs.adyen.com/api-reference/payments-api#paymentrequestadditionaldata).
*/
additionalData?: any;
amount: Amount;
billingAddress?: Address;
browserInfo?: BrowserInfo;
/**
* The delay between the authorisation and scheduled auto-capture, specified in hours.
*/
captureDelayHours?: number;
/**
* The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web
*/
channel?: PaymentRequest.ChannelEnum;
company?: Company;
/**
* The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE
*/
countryCode?: string;
/**
* The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD
*/
dateOfBirth?: Date;
dccQuote?: ForexQuote;
deliveryAddress?: Address;
/**
* The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00
*/
deliveryDate?: Date;
/**
* A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting).
*/
deviceFingerprint?: string;
/**
* When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments.
*/
enableOneClick?: boolean;
/**
* When true and `shopperReference` is provided, the payment details will be tokenized for payouts.
*/
enablePayOut?: boolean;
/**
* When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments.
*/
enableRecurring?: boolean;
/**
* The type of the entity the payment is processed for.
*/
entityType?: PaymentRequest.EntityTypeEnum;
/**
* An integer value that is added to the normal fraud score. The value can be either positive or negative.
*/
fraudOffset?: number;
installments?: Installments;
/**
* Line items regarding the payment.
*/
lineItems?: Array<LineItem>;
/**
* The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.
*/
mcc?: string;
/**
* The merchant account identifier, with which you want to process the transaction.
*/
merchantAccount: string;
/**
* This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`.
*/
merchantOrderReference?: string;
merchantRiskIndicator?: MerchantRiskIndicator;
/**
* Metadata consists of entries, each of which includes a key and a value. Limitations: Error \"177\", \"Metadata size exceeds limit\"
*/
metadata?: any;
mpiData?: ThreeDSecureData;
/**
* When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead.
*/
orderReference?: string;
/**
* Required for the 3D Secure 2 `channel` **Web** integration. Set this parameter to the origin URL of the page that you are loading the 3D Secure Component from.
*/
origin?: string;
/**
* The collection that contains the type of the payment method and its specific information (e.g. `idealIssuer`).
*/
paymentMethod: any;
/**
* Defines a recurring payment type. Allowed values: * `Subscription` A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` Card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` A transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount.
*/
recurringProcessingModel?: PaymentRequest.RecurringProcessingModelEnum;
/**
* Specifies the redirect method (GET or POST) when redirecting back from the issuer.
*/
redirectFromIssuerMethod?: string;
/**
* Specifies the redirect method (GET or POST) when redirecting to the issuer.
*/
redirectToIssuerMethod?: string;
/**
* The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters.
*/
reference: string;
/**
* The URL to return to.
*/
returnUrl: string;
/**
* The maximum validity of the session.
*/
sessionValidity?: string;
/**
* The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require the `shopperEmail` for both `deviceChannel` **browser** and **app**.
*/
shopperEmail?: string;
/**
* The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > This field is mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new).
*/
shopperIP?: string;
/**
* Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.
*/
shopperInteraction?: PaymentRequest.ShopperInteractionEnum;
/**
* The combination of a language code and a country code to specify the language to be used in the payment.
*/
shopperLocale?: string;
shopperName?: Name;
/**
* The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID). > This field is required for recurring payments.
*/
shopperReference?: string;
/**
* The text to appear on the shopper's bank statement.
*/
shopperStatement?: string;
/**
* The shopper's social security number.
*/
socialSecurityNumber?: string;
/**
* The details of how the payment should be split when distributing a payment to a MarketPay Marketplace and its Accounts.
*/
splits?: Array<Split>;
/**
* The shopper's telephone number.
*/
telephoneNumber?: string;
threeDS2RequestData?: ThreeDS2RequestData;
/**
* Set to true if the payment should be routed to a trusted MID.
*/
trustedShopper?: boolean;
}
export namespace PaymentRequest {
export type ChannelEnum = 'iOS' | 'Android' | 'Web';
export const ChannelEnum = {
IOS: 'iOS' as ChannelEnum,
Android: 'Android' as ChannelEnum,
Web: 'Web' as ChannelEnum
};
export type EntityTypeEnum = 'NaturalPerson' | 'CompanyName';
export const EntityTypeEnum = {
NaturalPerson: 'NaturalPerson' as EntityTypeEnum,
CompanyName: 'CompanyName' as EntityTypeEnum
};
export type RecurringProcessingModelEnum = 'CardOnFile' | 'Subscription' | 'UnscheduledCardOnFile';
export const RecurringProcessingModelEnum = {
CardOnFile: 'CardOnFile' as RecurringProcessingModelEnum,
Subscription: 'Subscription' as RecurringProcessingModelEnum,
UnscheduledCardOnFile: 'UnscheduledCardOnFile' as RecurringProcessingModelEnum
};
export type ShopperInteractionEnum = 'Ecommerce' | 'ContAuth' | 'Moto' | 'POS';
export const ShopperInteractionEnum = {
Ecommerce: 'Ecommerce' as ShopperInteractionEnum,
ContAuth: 'ContAuth' as ShopperInteractionEnum,
Moto: 'Moto' as ShopperInteractionEnum,
POS: 'POS' as ShopperInteractionEnum
};
}

View File

@@ -1,68 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { FraudResult } from './fraudResult';
import { InputDetail } from './inputDetail';
import { Redirect } from './redirect';
export interface PaymentResponse {
/**
* This field contains additional data, which may be required to return in a particular payment response. To choose data fields to be returned, go to **Customer Area** > **Account** > **API URLs**.
*/
additionalData?: any;
/**
* When non-empty, contains all the fields that you must submit to the `/payments/details` endpoint.
*/
details?: Array<InputDetail>;
fraudResult?: FraudResult;
/**
* Contains the details that will be presented to the shopper.
*/
outputDetails?: any;
/**
* When non-empty, contains a value that you must submit to the `/payments/details` endpoint.
*/
paymentData?: string;
/**
* Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. > `pspReference` is returned only for non-redirect payment methods.
*/
pspReference?: string;
redirect?: Redirect;
/**
* If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values.
*/
refusalReason?: string;
/**
* Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).
*/
refusalReasonCode?: string;
/**
* The result of the payment. Possible values: * **AuthenticationFinished** The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **Authorised** The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Refused** Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. * **Pending** Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. For more information on handling a pending payment, refer to [Payments with pending status](https://docs.adyen.com/development-resources/payments-with-pending-status). * **Received** Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** Indicates the shopper should be redirected to an external web page or app to complete the authorisation.
*/
resultCode?: PaymentResponse.ResultCodeEnum;
}
export namespace PaymentResponse {
export type ResultCodeEnum = 'AuthenticationFinished' | 'Authorised' | 'Cancelled' | 'ChallengeShopper' | 'Error' | 'IdentifyShopper' | 'Pending' | 'Received' | 'RedirectShopper' | 'Refused';
export const ResultCodeEnum = {
AuthenticationFinished: 'AuthenticationFinished' as ResultCodeEnum,
Authorised: 'Authorised' as ResultCodeEnum,
Cancelled: 'Cancelled' as ResultCodeEnum,
ChallengeShopper: 'ChallengeShopper' as ResultCodeEnum,
Error: 'Error' as ResultCodeEnum,
IdentifyShopper: 'IdentifyShopper' as ResultCodeEnum,
Pending: 'Pending' as ResultCodeEnum,
Received: 'Received' as ResultCodeEnum,
RedirectShopper: 'RedirectShopper' as ResultCodeEnum,
Refused: 'Refused' as ResultCodeEnum
};
}

View File

@@ -1,193 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { Address } from './address';
import { Amount } from './amount';
import { Company } from './company';
import { Configuration } from './configuration';
import { ForexQuote } from './forexQuote';
import { Installments } from './installments';
import { LineItem } from './lineItem';
import { Name } from './name';
import { Split } from './split';
export interface PaymentSetupRequest {
/**
* This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. For more information on possible key-value pairs, refer to the [additionalData section](https://docs.adyen.com/api-reference/payments-api#paymentrequestadditionaldata).
*/
additionalData?: any;
/**
* List of payments methods to be presented to the shopper. To refer to payment methods, use their `brandCode` from [Payment methods overview](https://docs.adyen.com/payment-methods/payment-methods-overview).
*/
allowedPaymentMethods?: Array<string>;
amount: Amount;
billingAddress?: Address;
/**
* List of payments methods to be hidden from the shopper. To refer to payment methods, use their `brandCode` from [Payment methods overview](https://docs.adyen.com/payment-methods/payment-methods-overview).
*/
blockedPaymentMethods?: Array<string>;
/**
* The delay between the authorisation and scheduled auto-capture, specified in hours.
*/
captureDelayHours?: number;
/**
* The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web
*/
channel?: PaymentSetupRequest.ChannelEnum;
company?: Company;
configuration?: Configuration;
/**
* The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE
*/
countryCode: string;
/**
* The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD
*/
dateOfBirth?: Date;
dccQuote?: ForexQuote;
deliveryAddress?: Address;
/**
* The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00
*/
deliveryDate?: Date;
/**
* When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments.
*/
enableOneClick?: boolean;
/**
* When true and `shopperReference` is provided, the payment details will be tokenized for payouts.
*/
enablePayOut?: boolean;
/**
* When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments.
*/
enableRecurring?: boolean;
/**
* The type of the entity the payment is processed for.
*/
entityType?: PaymentSetupRequest.EntityTypeEnum;
/**
* An integer value that is added to the normal fraud score. The value can be either positive or negative.
*/
fraudOffset?: number;
installments?: Installments;
/**
* Line items regarding the payment.
*/
lineItems?: Array<LineItem>;
/**
* The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.
*/
mcc?: string;
/**
* The merchant account identifier, with which you want to process the transaction.
*/
merchantAccount: string;
/**
* This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`.
*/
merchantOrderReference?: string;
/**
* Metadata consists of entries, each of which includes a key and a value. Limitations: Error \"177\", \"Metadata size exceeds limit\"
*/
metadata?: any;
/**
* When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead.
*/
orderReference?: string;
/**
* Required for the Web integration. Set this parameter to the origin URL of the page that you are loading the SDK from.
*/
origin?: string;
/**
* The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters.
*/
reference: string;
/**
* The URL to return to.
*/
returnUrl: string;
/**
* The version of the SDK you are using (for Web SDK integrations only).
*/
sdkVersion?: string;
/**
* The maximum validity of the session.
*/
sessionValidity?: string;
/**
* The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require the `shopperEmail` for both `deviceChannel` **browser** and **app**.
*/
shopperEmail?: string;
/**
* The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > This field is mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new).
*/
shopperIP?: string;
/**
* Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.
*/
shopperInteraction?: PaymentSetupRequest.ShopperInteractionEnum;
/**
* The combination of a language code and a country code to specify the language to be used in the payment.
*/
shopperLocale?: string;
shopperName?: Name;
/**
* The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID). > This field is required for recurring payments.
*/
shopperReference?: string;
/**
* The text to appear on the shopper's bank statement.
*/
shopperStatement?: string;
/**
* The shopper's social security number.
*/
socialSecurityNumber?: string;
/**
* The details of how the payment should be split when distributing a payment to a MarketPay Marketplace and its Accounts.
*/
splits?: Array<Split>;
/**
* The shopper's telephone number.
*/
telephoneNumber?: string;
/**
* The token obtained when initializing the SDK. > This parameter is required for iOS and Android; not required for Web.
*/
token?: string;
/**
* Set to true if the payment should be routed to a trusted MID.
*/
trustedShopper?: boolean;
}
export namespace PaymentSetupRequest {
export type ChannelEnum = 'iOS' | 'Android' | 'Web';
export const ChannelEnum = {
IOS: 'iOS' as ChannelEnum,
Android: 'Android' as ChannelEnum,
Web: 'Web' as ChannelEnum
};
export type EntityTypeEnum = 'NaturalPerson' | 'CompanyName';
export const EntityTypeEnum = {
NaturalPerson: 'NaturalPerson' as EntityTypeEnum,
CompanyName: 'CompanyName' as EntityTypeEnum
};
export type ShopperInteractionEnum = 'Ecommerce' | 'ContAuth' | 'Moto' | 'POS';
export const ShopperInteractionEnum = {
Ecommerce: 'Ecommerce' as ShopperInteractionEnum,
ContAuth: 'ContAuth' as ShopperInteractionEnum,
Moto: 'Moto' as ShopperInteractionEnum,
POS: 'POS' as ShopperInteractionEnum
};
}

View File

@@ -1,20 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface PaymentSetupResponse {
/**
* The encoded payment session that you need to pass to the SDK.
*/
paymentSession?: string;
}

View File

@@ -1,20 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface PaymentVerificationRequest {
/**
* Encrypted and signed payment result data. You should receive this value from the Checkout SDK after the shopper completes the payment.
*/
payload: string;
}

View File

@@ -1,67 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { FraudResult } from './fraudResult';
import { ServiceError } from './serviceError';
export interface PaymentVerificationResponse {
/**
* This field contains additional data, which may be required to return in a particular payment response. To choose data fields to be returned, go to **Customer Area** > **Account** > **API URLs**.
*/
additionalData?: any;
fraudResult?: FraudResult;
/**
* A unique value that you provided in the initial `/paymentSession` request as a `reference` field.
*/
merchantReference: string;
/**
* The payment method used in the transaction.
*/
paymentMethod: string;
/**
* Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. > `pspReference` is returned only for non-redirect payment methods.
*/
pspReference?: string;
/**
* If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values.
*/
refusalReason?: string;
/**
* Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).
*/
refusalReasonCode?: string;
/**
* The result of the payment. Possible values: * **AuthenticationFinished** The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **Authorised** The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Refused** Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. * **Pending** Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. For more information on handling a pending payment, refer to [Payments with pending status](https://docs.adyen.com/development-resources/payments-with-pending-status). * **Received** Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** Indicates the shopper should be redirected to an external web page or app to complete the authorisation.
*/
resultCode?: PaymentVerificationResponse.ResultCodeEnum;
serviceError?: ServiceError;
/**
* The shopperLocale value provided in the payment request.
*/
shopperLocale: string;
}
export namespace PaymentVerificationResponse {
export type ResultCodeEnum = 'AuthenticationFinished' | 'Authorised' | 'Cancelled' | 'ChallengeShopper' | 'Error' | 'IdentifyShopper' | 'Pending' | 'Received' | 'RedirectShopper' | 'Refused';
export const ResultCodeEnum = {
AuthenticationFinished: 'AuthenticationFinished' as ResultCodeEnum,
Authorised: 'Authorised' as ResultCodeEnum,
Cancelled: 'Cancelled' as ResultCodeEnum,
ChallengeShopper: 'ChallengeShopper' as ResultCodeEnum,
Error: 'Error' as ResultCodeEnum,
IdentifyShopper: 'IdentifyShopper' as ResultCodeEnum,
Pending: 'Pending' as ResultCodeEnum,
Received: 'Received' as ResultCodeEnum,
RedirectShopper: 'RedirectShopper' as ResultCodeEnum,
Refused: 'Refused' as ResultCodeEnum
};
}

View File

@@ -1,49 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface Recurring {
/**
* The type of recurring contract to be used. Possible values: * `ONECLICK` Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-essentials/payment-glossary#card_security_code_cvc_cvv_cid_). * `RECURRING` Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payment-glossary#cardnotpresentcnp). * `ONECLICK,RECURRING` Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` Payment details can be used to [make a payout](https://docs.adyen.com/features/third-party-payouts).
*/
contract?: Recurring.ContractEnum;
/**
* A descriptive name for this detail.
*/
recurringDetailName?: string;
/**
* Date after which no further authorisations shall be performed. Only for 3D Secure 2.
*/
recurringExpiry?: Date;
/**
* Minimum number of days between authorisations. Only for 3D Secure 2.
*/
recurringFrequency?: string;
/**
* The name of the token service.
*/
tokenService?: Recurring.TokenServiceEnum;
}
export namespace Recurring {
export type ContractEnum = 'ONECLICK' | 'RECURRING' | 'PAYOUT';
export const ContractEnum = {
ONECLICK: 'ONECLICK' as ContractEnum,
RECURRING: 'RECURRING' as ContractEnum,
PAYOUT: 'PAYOUT' as ContractEnum
};
export type TokenServiceEnum = 'VISATOKENSERVICE' | 'MCTOKENSERVICE';
export const TokenServiceEnum = {
VISATOKENSERVICE: 'VISATOKENSERVICE' as TokenServiceEnum,
MCTOKENSERVICE: 'MCTOKENSERVICE' as TokenServiceEnum
};
}

View File

@@ -1,49 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { InputDetail } from './inputDetail';
import { PaymentMethodGroup } from './paymentMethodGroup';
import { StoredDetails } from './storedDetails';
export interface RecurringDetail {
/**
* The configuration of the payment method.
*/
configuration?: any;
/**
* All input details to be provided to complete the payment with this payment method.
*/
details?: Array<InputDetail>;
group?: PaymentMethodGroup;
/**
* The displayable name of this payment method.
*/
name?: string;
/**
* Echo data required to send in next calls.
*/
paymentMethodData?: string;
/**
* The reference that uniquely identifies the recurring detail.
*/
recurringDetailReference?: string;
storedDetails?: StoredDetails;
/**
* Indicates whether this payment method supports tokenization or not.
*/
supportsRecurring?: boolean;
/**
* The unique payment method code.
*/
type?: string;
}

View File

@@ -1,35 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface Redirect {
/**
* When the redirect URL must be accessed via POST, use this data to post to the redirect URL.
*/
data?: any;
/**
* The web method that you must use to access the redirect URL. Possible values: GET, POST.
*/
method?: Redirect.MethodEnum;
/**
* The URL, to which you must redirect a shopper to complete a payment.
*/
url?: string;
}
export namespace Redirect {
export type MethodEnum = 'GET' | 'POST';
export const MethodEnum = {
GET: 'GET' as MethodEnum,
POST: 'POST' as MethodEnum
};
}

View File

@@ -1,32 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface SDKEphemPubKey {
/**
* The `crv` value as received from the 3D Secure 2 SDK.
*/
crv?: string;
/**
* The `kty` value as received from the 3D Secure 2 SDK.
*/
kty?: string;
/**
* The `x` value as received from the 3D Secure 2 SDK.
*/
x?: string;
/**
* The `y` value as received from the 3D Secure 2 SDK.
*/
y?: string;
}

View File

@@ -1,19 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ServiceError {
errorCode?: string;
errorType?: string;
message?: string;
}

View File

@@ -1,48 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ShopperInput {
/**
* Specifies visibility of billing address fields. Permitted values: * editable * hidden * readOnly
*/
billingAddress?: ShopperInput.BillingAddressEnum;
/**
* Specifies visibility of delivery address fields. Permitted values: * editable * hidden * readOnly
*/
deliveryAddress?: ShopperInput.DeliveryAddressEnum;
/**
* Specifies visibility of personal details. Permitted values: * editable * hidden * readOnly
*/
personalDetails?: ShopperInput.PersonalDetailsEnum;
}
export namespace ShopperInput {
export type BillingAddressEnum = 'editable' | 'hidden' | 'readOnly';
export const BillingAddressEnum = {
Editable: 'editable' as BillingAddressEnum,
Hidden: 'hidden' as BillingAddressEnum,
ReadOnly: 'readOnly' as BillingAddressEnum
};
export type DeliveryAddressEnum = 'editable' | 'hidden' | 'readOnly';
export const DeliveryAddressEnum = {
Editable: 'editable' as DeliveryAddressEnum,
Hidden: 'hidden' as DeliveryAddressEnum,
ReadOnly: 'readOnly' as DeliveryAddressEnum
};
export type PersonalDetailsEnum = 'editable' | 'hidden' | 'readOnly';
export const PersonalDetailsEnum = {
Editable: 'editable' as PersonalDetailsEnum,
Hidden: 'hidden' as PersonalDetailsEnum,
ReadOnly: 'readOnly' as PersonalDetailsEnum
};
}

View File

@@ -1,45 +0,0 @@
/**
* Adyen Checkout Service
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile wallets, and local payment methods (e.g. iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/checkout). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/user-management/how-to-get-the-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v46/payments ```
*
* OpenAPI spec version: 46
* Contact: support@adyen.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/import { SplitAmount } from './splitAmount';
export interface Split {
/**
* The account to which this split applies. >Required if the type is `MarketPlace`.
*/
account?: string;
amount: SplitAmount;
/**
* A description of this split.
*/
description?: string;
/**
* The reference of this split. Used to link other operations (e.g. captures and refunds) to this split. >Required if the type is `MarketPlace`.
*/
reference?: string;
/**
* The type of this split. >Permitted values: `Default`, `PaymentFee`, `VAT`, `Commission`, `MarketPlace`, `Verification`.
*/
type: Split.TypeEnum;
}
export namespace Split {
export type TypeEnum = 'Commission' | 'Default' | 'MarketPlace' | 'PaymentFee' | 'VAT' | 'Verification';
export const TypeEnum = {
Commission: 'Commission' as TypeEnum,
Default: 'Default' as TypeEnum,
MarketPlace: 'MarketPlace' as TypeEnum,
PaymentFee: 'PaymentFee' as TypeEnum,
VAT: 'VAT' as TypeEnum,
Verification: 'Verification' as TypeEnum
};
}

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