redsys-easy 4.0.3 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/assets/card-brands.d.ts +28 -28
- package/lib/assets/countries.d.ts +31 -31
- package/lib/assets/currencies.d.ts +36 -36
- package/lib/assets/error-codes.d.ts +17 -17
- package/lib/assets/lang-codes.d.ts +31 -31
- package/lib/assets/response-codes.d.ts +2 -2
- package/lib/assets/transaction-types.d.ts +56 -56
- package/lib/client.d.ts +85 -50
- package/lib/crypto.d.ts +25 -25
- package/lib/errors.d.ts +75 -75
- package/lib/formatter-utils.d.ts +24 -24
- package/lib/formatters/input-params.d.ts +21 -21
- package/lib/formatters/output-params.d.ts +29 -29
- package/lib/formatters/types.d.ts +316 -316
- package/lib/index.d.ts +30 -30
- package/lib/index.esm.js +3363 -1985
- package/lib/index.js +3363 -1996
- package/lib/rest/3ds.d.ts +31 -31
- package/lib/rest/json-serialization.d.ts +2 -2
- package/lib/rest/json-sha256-signature.d.ts +3 -3
- package/lib/rest/json.d.ts +3 -3
- package/lib/rest/requests.d.ts +8 -2
- package/lib/soap/notification-serialization.d.ts +3 -3
- package/lib/soap/notification-signature.d.ts +3 -3
- package/lib/soap/notification.d.ts +4 -4
- package/lib/soap/utils.d.ts +43 -43
- package/lib/types/3ds-params.d.ts +345 -345
- package/lib/types/api.d.ts +80 -80
- package/lib/types/input-params.d.ts +176 -176
- package/lib/types/output-params.d.ts +158 -158
- package/lib/utils/codes.d.ts +13 -13
- package/lib/utils/misc.d.ts +30 -24
- package/package.json +40 -41
|
@@ -1,345 +1,345 @@
|
|
|
1
|
-
export interface ThreeDSPhone {
|
|
2
|
-
/** Country prefix number */
|
|
3
|
-
cc: string;
|
|
4
|
-
/** Phone number */
|
|
5
|
-
subscriber: string;
|
|
6
|
-
}
|
|
7
|
-
export interface ThreeDSRequestorAuthenticationInfo {
|
|
8
|
-
/** Authentication Data */
|
|
9
|
-
threeDSReqAuthData: string;
|
|
10
|
-
/** Authentication method code */
|
|
11
|
-
threeDSReqAuthMethod: string;
|
|
12
|
-
/** Authentication timestamp, yyyymmddHHMM */
|
|
13
|
-
threeDSReqAuthTimestamp: string;
|
|
14
|
-
}
|
|
15
|
-
export interface ThreeDSRequestorPriorAuthenticationInfo {
|
|
16
|
-
/** Reference */
|
|
17
|
-
threeDSReqPriorRef?: string;
|
|
18
|
-
/** Authentication method code */
|
|
19
|
-
threeDSReqPriorAuthMethod?: string;
|
|
20
|
-
/** Authentication timestamp, yyyymmddHHMM */
|
|
21
|
-
threeDSReqPriorAuthTimestamp?: string;
|
|
22
|
-
}
|
|
23
|
-
export interface BaseThreeDSAuthenticationDataParams {
|
|
24
|
-
/** 3DSecure protocol version */
|
|
25
|
-
protocolVersion: '1.0.2' | '2.1.0' | '2.2.0';
|
|
26
|
-
/** 3DSecure information type */
|
|
27
|
-
threeDSInfo: 'AuthenticationData';
|
|
28
|
-
/** Challenge notification URL */
|
|
29
|
-
notificationURL: string;
|
|
30
|
-
/** 3DSecure Method result indicator */
|
|
31
|
-
threeDSCompInd: 'Y' | 'N' | 'U';
|
|
32
|
-
/** 3DSecure transaction identifier */
|
|
33
|
-
threeDSServerTransID: string;
|
|
34
|
-
/**
|
|
35
|
-
* Browser Screen Color Depth
|
|
36
|
-
*
|
|
37
|
-
* @remarks
|
|
38
|
-
* `screen.colorDepth.toString()` or `'1'` if javascript is disabled
|
|
39
|
-
*/
|
|
40
|
-
browserColorDepth: string;
|
|
41
|
-
/**
|
|
42
|
-
* Browser Java Enabled
|
|
43
|
-
*
|
|
44
|
-
* @remarks
|
|
45
|
-
* `navigator.javaEnabled()` or `false` if javascript is disabled
|
|
46
|
-
*/
|
|
47
|
-
browserJavaEnabled: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Browser Language
|
|
50
|
-
*
|
|
51
|
-
* @remarks
|
|
52
|
-
* `navigator.language`
|
|
53
|
-
*/
|
|
54
|
-
browserLanguage: string;
|
|
55
|
-
/**
|
|
56
|
-
* Browser Screen Height
|
|
57
|
-
*
|
|
58
|
-
* @remarks
|
|
59
|
-
* `screen.height.toString()` or `'0'` if javascript is disabled
|
|
60
|
-
*/
|
|
61
|
-
browserScreenHeight: string;
|
|
62
|
-
/**
|
|
63
|
-
* Browser Screen Width
|
|
64
|
-
*
|
|
65
|
-
* @remarks
|
|
66
|
-
* `screen.width.toString()` or `'0'` if javascript is disabled
|
|
67
|
-
*/
|
|
68
|
-
browserScreenWidth: string;
|
|
69
|
-
/**
|
|
70
|
-
* Browser Time Zone
|
|
71
|
-
*
|
|
72
|
-
* @remarks
|
|
73
|
-
* `(new Date()).getTimezoneOffset().toString()` or `'0'` if javascript is disabled
|
|
74
|
-
*/
|
|
75
|
-
browserTZ: string;
|
|
76
|
-
/** Browser JavaScript Enabled */
|
|
77
|
-
browserJavascriptEnabled: boolean;
|
|
78
|
-
/** Browser User-Agent */
|
|
79
|
-
browserUserAgent: string;
|
|
80
|
-
/** Browser Accept Header */
|
|
81
|
-
browserAcceptHeader: string;
|
|
82
|
-
/** Browser IP Address, ipv4 or ipv6 */
|
|
83
|
-
browserIP?: string;
|
|
84
|
-
/** Additional account information, max 64 characters */
|
|
85
|
-
acctID?: string;
|
|
86
|
-
/** Account information, json */
|
|
87
|
-
acctInfo?: {
|
|
88
|
-
/** Account creation ellapsed time code */
|
|
89
|
-
chAccAgeInd?: '01' | '02' | '03' | '04' | '05';
|
|
90
|
-
/** Account modification date, yyyymmdd */
|
|
91
|
-
chAccChange?: string;
|
|
92
|
-
/** Account modification ellapsed time code */
|
|
93
|
-
chAccChangeInd?: '01' | '02' | '03' | '04';
|
|
94
|
-
/** Account creation date, yyyymmdd */
|
|
95
|
-
chAccDate?: string;
|
|
96
|
-
/** Last password change date, yyyymmdd */
|
|
97
|
-
chAccPwChange?: string;
|
|
98
|
-
/** Password change ellapsed time code */
|
|
99
|
-
chAccPwChangeInd?: '01' | '02' | '03' | '04' | '05';
|
|
100
|
-
/** Number of purchases during the last 6 months */
|
|
101
|
-
nbPurchaseAccount?: string;
|
|
102
|
-
/** Attemps to add a card during the last 24 hours */
|
|
103
|
-
provisionAttemptsDay?: string;
|
|
104
|
-
/** Number of transactions attempted during the last 24 hours */
|
|
105
|
-
txnActivityDay?: string;
|
|
106
|
-
/** Number of transactions attempted last year */
|
|
107
|
-
txnActivityYear?: string;
|
|
108
|
-
/** Card registration date, yyyymmdd */
|
|
109
|
-
paymentAccAge?: string;
|
|
110
|
-
/** Card registration ellapsed time code */
|
|
111
|
-
paymentAccInd?: '01' | '02' | '03' | '04' | '05';
|
|
112
|
-
/** First usage of shipping address date, yyyymmdd */
|
|
113
|
-
shipAddressUsage?: string;
|
|
114
|
-
/** First usage of shipping address ellapsed time code */
|
|
115
|
-
shipAddressUsageInd?: '01' | '02' | '03' | '04' | '05';
|
|
116
|
-
/** Cardholder shipping name indicator code */
|
|
117
|
-
shipNameIndicator?: '01' | '02';
|
|
118
|
-
/** Suspicious activity code */
|
|
119
|
-
suspiciousAccActivity?: '01' | '02';
|
|
120
|
-
};
|
|
121
|
-
/** Matching shipping and billing addresses indicator */
|
|
122
|
-
addrMatch?: 'Y' | 'N';
|
|
123
|
-
/** Billing address city */
|
|
124
|
-
billAddrCity?: string;
|
|
125
|
-
/** Billing address line 1 */
|
|
126
|
-
billAddrLine1?: string;
|
|
127
|
-
/** Billing address line 2 */
|
|
128
|
-
billAddrLine2?: string;
|
|
129
|
-
/** Billing address line 3 */
|
|
130
|
-
billAddrLine3?: string;
|
|
131
|
-
/** Billing address postal code */
|
|
132
|
-
billAddrPostCode?: string;
|
|
133
|
-
/** Billing address state code, ISO 3166-2 */
|
|
134
|
-
billAddrState?: string;
|
|
135
|
-
/** Billing address country code, ISO 3166-1 */
|
|
136
|
-
billAddrCountry?: string;
|
|
137
|
-
/** Cardholder name */
|
|
138
|
-
cardholderName?: string;
|
|
139
|
-
/** Challenge window size */
|
|
140
|
-
challengeWindowSize?: string;
|
|
141
|
-
/** Account email address */
|
|
142
|
-
email?: string;
|
|
143
|
-
/** Account landline phone number */
|
|
144
|
-
homePhone?: ThreeDSPhone;
|
|
145
|
-
/** Account mobile phone number */
|
|
146
|
-
mobilePhone?: ThreeDSPhone;
|
|
147
|
-
/** Account work phone number */
|
|
148
|
-
workPhone?: ThreeDSPhone;
|
|
149
|
-
/** Merchant risk indicator, json */
|
|
150
|
-
merchantRiskIndicator?: {
|
|
151
|
-
/** Delivery email address */
|
|
152
|
-
deliveryEmailAddress?: string;
|
|
153
|
-
/** Delivery time code */
|
|
154
|
-
deliveryTimeframe?: '01' | '02' | '03' | '04';
|
|
155
|
-
/** Gift card amount */
|
|
156
|
-
giftCardAmount?: string;
|
|
157
|
-
/** Count of gift cards used */
|
|
158
|
-
giftCardCount?: string;
|
|
159
|
-
/** Gift card currency number, ISO-4217 */
|
|
160
|
-
giftCardCurr?: string;
|
|
161
|
-
/** Preorder availability date, yyyymmdd */
|
|
162
|
-
preOrderDate?: string;
|
|
163
|
-
/** Preorder availability indicator code */
|
|
164
|
-
preOrderPurchaseInd?: '01' | '02';
|
|
165
|
-
/** Reorder indicator code */
|
|
166
|
-
reorderItemsInd?: '01' | '02';
|
|
167
|
-
/** Shipping indicator code */
|
|
168
|
-
shipIndicator?: '01' | '02' | '03' | '04' | '05' | '06' | '07';
|
|
169
|
-
};
|
|
170
|
-
/** Number of purchase installments */
|
|
171
|
-
purchaseInstalData?: string;
|
|
172
|
-
/** Recurring payments expiration date, yyyymmdd */
|
|
173
|
-
recurringExpiry?: string;
|
|
174
|
-
/** Minimum number of days between recurring payments */
|
|
175
|
-
recurringFrequency?: string;
|
|
176
|
-
/** Shipping address city */
|
|
177
|
-
shipAddrCity?: string;
|
|
178
|
-
/** Shipping address line 1 */
|
|
179
|
-
shipAddrLine1?: string;
|
|
180
|
-
/** Shipping address line 2 */
|
|
181
|
-
shipAddrLine2?: string;
|
|
182
|
-
/** Shipping address line 3 */
|
|
183
|
-
shipAddrLine3?: string;
|
|
184
|
-
/** Shipping address postal code */
|
|
185
|
-
shipAddrPostCode?: string;
|
|
186
|
-
/** Shipping address state code, ISO 3166-2 */
|
|
187
|
-
shipAddrState?: string;
|
|
188
|
-
/** Shipping address country code, ISO 3166-1 */
|
|
189
|
-
shipAddrCountry?: string;
|
|
190
|
-
/** Authentication information, json */
|
|
191
|
-
threeDSRequestorAuthenticationInfo?: ThreeDSRequestorAuthenticationInfo;
|
|
192
|
-
/** Previous authentication information, json */
|
|
193
|
-
threeDSRequestorPriorAuthenticationInfo?: ThreeDSRequestorPriorAuthenticationInfo;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Browser information required by 3DS
|
|
197
|
-
*
|
|
198
|
-
* @remarks
|
|
199
|
-
* The information must be obtained in the browser, for example, wusing the following function.
|
|
200
|
-
*
|
|
201
|
-
* @example
|
|
202
|
-
* ```
|
|
203
|
-
* const obtain3DSBrowserInfo = (): ThreeDSBrowserClientInfo => {
|
|
204
|
-
* return {
|
|
205
|
-
* browserLanguage: navigator.language,
|
|
206
|
-
* browserColorDepth: screen.colorDepth.toString(),
|
|
207
|
-
* browserScreenHeight: screen.height.toString(),
|
|
208
|
-
* browserScreenWidth: screen.width.toString(),
|
|
209
|
-
* browserTZ: (new Date()).getTimezoneOffset().toString(),
|
|
210
|
-
* browserJavaEnabled: navigator.javaEnabled()
|
|
211
|
-
* };
|
|
212
|
-
* };
|
|
213
|
-
* ```
|
|
214
|
-
*
|
|
215
|
-
* @public
|
|
216
|
-
*/
|
|
217
|
-
export
|
|
218
|
-
export interface ThreeDSPreAuthInputParams {
|
|
219
|
-
threeDSInfo: 'CardData';
|
|
220
|
-
}
|
|
221
|
-
export interface ThreeDSv1AuthDataInputParams extends Pick<BaseThreeDSAuthenticationDataParams, 'protocolVersion' | 'threeDSInfo' | 'browserAcceptHeader' | 'browserUserAgent'> {
|
|
222
|
-
protocolVersion: '1.0.2';
|
|
223
|
-
threeDSInfo: 'AuthenticationData';
|
|
224
|
-
}
|
|
225
|
-
export interface ThreeDSv2AuthDataInputParams extends BaseThreeDSAuthenticationDataParams {
|
|
226
|
-
protocolVersion: '2.1.0' | '2.2.0';
|
|
227
|
-
threeDSInfo: 'AuthenticationData';
|
|
228
|
-
}
|
|
229
|
-
export interface ThreeDSv1ChallengeResponseInputParams {
|
|
230
|
-
protocolVersion: '1.0.2';
|
|
231
|
-
threeDSInfo: 'ChallengeResponse';
|
|
232
|
-
PARes: string;
|
|
233
|
-
MD: string;
|
|
234
|
-
}
|
|
235
|
-
export interface ThreeDSv2ChallengeResponseInputParams {
|
|
236
|
-
protocolVersion: '2.1.0' | '2.2.0';
|
|
237
|
-
threeDSInfo: 'ChallengeResponse';
|
|
238
|
-
cres: string;
|
|
239
|
-
}
|
|
240
|
-
/** 3D Secure input parameters */
|
|
241
|
-
export
|
|
242
|
-
export
|
|
243
|
-
export interface ThreeDSv1PreAuthOutputParams {
|
|
244
|
-
protocolVersion: 'NO_3DS_v2';
|
|
245
|
-
threeDSInfo: 'CardConfiguration';
|
|
246
|
-
}
|
|
247
|
-
export interface ThreeDSv2PreAuthWithoutMethodOutputParams {
|
|
248
|
-
protocolVersion: '2.1.0' | '2.2.0';
|
|
249
|
-
threeDSInfo: 'CardConfiguration';
|
|
250
|
-
threeDSServerTransID: string;
|
|
251
|
-
}
|
|
252
|
-
export interface ThreeDSv2PreAuthWithMethodOutputParams extends ThreeDSv2PreAuthWithoutMethodOutputParams {
|
|
253
|
-
threeDSMethodURL: string;
|
|
254
|
-
}
|
|
255
|
-
export
|
|
256
|
-
export interface ThreeDSv1ChallengeOutputParams {
|
|
257
|
-
protocolVersion: '1.0.2';
|
|
258
|
-
threeDSInfo: 'ChallengeRequest';
|
|
259
|
-
acsURL: string;
|
|
260
|
-
MD: string;
|
|
261
|
-
PAReq: string;
|
|
262
|
-
}
|
|
263
|
-
export interface ThreeDSv2ChallengeOutputParams {
|
|
264
|
-
protocolVersion: '2.1.0' | '2.2.0';
|
|
265
|
-
threeDSInfo: 'ChallengeRequest';
|
|
266
|
-
acsURL: string;
|
|
267
|
-
creq: string;
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* 3D Secure output parameters
|
|
271
|
-
*/
|
|
272
|
-
export
|
|
273
|
-
/**
|
|
274
|
-
* 3D Secure v2 challenge solution parameters
|
|
275
|
-
*/
|
|
276
|
-
export interface ThreeDSv2ChallengeSolutionNotificationOutputParams {
|
|
277
|
-
cres: string;
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* 3D Secure v1 challenge solution parameters
|
|
281
|
-
*/
|
|
282
|
-
export interface ThreeDSv1ChallengeSolutionNotificationOutputParams {
|
|
283
|
-
MD: string;
|
|
284
|
-
PaRes: string;
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* 3DS v2 method data
|
|
288
|
-
*
|
|
289
|
-
* @public
|
|
290
|
-
*/
|
|
291
|
-
export interface ThreeDSMethodData {
|
|
292
|
-
threeDSServerTransID: string;
|
|
293
|
-
threeDSMethodNotificationURL: string;
|
|
294
|
-
}
|
|
295
|
-
/**
|
|
296
|
-
* 3DS v2 method form
|
|
297
|
-
*
|
|
298
|
-
* @public
|
|
299
|
-
*/
|
|
300
|
-
export interface ThreeDSMethodForm {
|
|
301
|
-
url: string;
|
|
302
|
-
body: {
|
|
303
|
-
threeDSMethodData: string;
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* 3DS v1 challenge form
|
|
308
|
-
*
|
|
309
|
-
* @public
|
|
310
|
-
*/
|
|
311
|
-
export interface ThreeDSv1ChallengeForm {
|
|
312
|
-
url: string;
|
|
313
|
-
body: {
|
|
314
|
-
/** Payment authentication Request, XML that is gzip compressed and base64 encoded */
|
|
315
|
-
PaReq: string;
|
|
316
|
-
/** Merchant data, random generated identifier hex encoded? */
|
|
317
|
-
MD: string;
|
|
318
|
-
/** Post challenge redirect URL */
|
|
319
|
-
TermUrl: string;
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
/**
|
|
323
|
-
* 3DS v2 challenge form
|
|
324
|
-
*
|
|
325
|
-
* @public
|
|
326
|
-
*/
|
|
327
|
-
export interface ThreeDSv2ChallengeForm {
|
|
328
|
-
url: string;
|
|
329
|
-
body: {
|
|
330
|
-
/** Challenge request, JSON that is base64 encoded */
|
|
331
|
-
creq: string;
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Contents of the `cres` field of a 3DS v2 challenge
|
|
336
|
-
*
|
|
337
|
-
* @public
|
|
338
|
-
*/
|
|
339
|
-
export interface ThreeDSCres {
|
|
340
|
-
messageVersion: '2.1.0' | '2.2.0';
|
|
341
|
-
threeDSServerTransID: string;
|
|
342
|
-
acsTransID: string;
|
|
343
|
-
messageType: 'CRes';
|
|
344
|
-
transStatus: 'Y' | 'N';
|
|
345
|
-
}
|
|
1
|
+
export interface ThreeDSPhone {
|
|
2
|
+
/** Country prefix number */
|
|
3
|
+
cc: string;
|
|
4
|
+
/** Phone number */
|
|
5
|
+
subscriber: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ThreeDSRequestorAuthenticationInfo {
|
|
8
|
+
/** Authentication Data */
|
|
9
|
+
threeDSReqAuthData: string;
|
|
10
|
+
/** Authentication method code */
|
|
11
|
+
threeDSReqAuthMethod: string;
|
|
12
|
+
/** Authentication timestamp, yyyymmddHHMM */
|
|
13
|
+
threeDSReqAuthTimestamp: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ThreeDSRequestorPriorAuthenticationInfo {
|
|
16
|
+
/** Reference */
|
|
17
|
+
threeDSReqPriorRef?: string;
|
|
18
|
+
/** Authentication method code */
|
|
19
|
+
threeDSReqPriorAuthMethod?: string;
|
|
20
|
+
/** Authentication timestamp, yyyymmddHHMM */
|
|
21
|
+
threeDSReqPriorAuthTimestamp?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface BaseThreeDSAuthenticationDataParams {
|
|
24
|
+
/** 3DSecure protocol version */
|
|
25
|
+
protocolVersion: '1.0.2' | '2.1.0' | '2.2.0';
|
|
26
|
+
/** 3DSecure information type */
|
|
27
|
+
threeDSInfo: 'AuthenticationData';
|
|
28
|
+
/** Challenge notification URL */
|
|
29
|
+
notificationURL: string;
|
|
30
|
+
/** 3DSecure Method result indicator */
|
|
31
|
+
threeDSCompInd: 'Y' | 'N' | 'U';
|
|
32
|
+
/** 3DSecure transaction identifier */
|
|
33
|
+
threeDSServerTransID: string;
|
|
34
|
+
/**
|
|
35
|
+
* Browser Screen Color Depth
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* `screen.colorDepth.toString()` or `'1'` if javascript is disabled
|
|
39
|
+
*/
|
|
40
|
+
browserColorDepth: string;
|
|
41
|
+
/**
|
|
42
|
+
* Browser Java Enabled
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* `navigator.javaEnabled()` or `false` if javascript is disabled
|
|
46
|
+
*/
|
|
47
|
+
browserJavaEnabled: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Browser Language
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* `navigator.language`
|
|
53
|
+
*/
|
|
54
|
+
browserLanguage: string;
|
|
55
|
+
/**
|
|
56
|
+
* Browser Screen Height
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* `screen.height.toString()` or `'0'` if javascript is disabled
|
|
60
|
+
*/
|
|
61
|
+
browserScreenHeight: string;
|
|
62
|
+
/**
|
|
63
|
+
* Browser Screen Width
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* `screen.width.toString()` or `'0'` if javascript is disabled
|
|
67
|
+
*/
|
|
68
|
+
browserScreenWidth: string;
|
|
69
|
+
/**
|
|
70
|
+
* Browser Time Zone
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* `(new Date()).getTimezoneOffset().toString()` or `'0'` if javascript is disabled
|
|
74
|
+
*/
|
|
75
|
+
browserTZ: string;
|
|
76
|
+
/** Browser JavaScript Enabled */
|
|
77
|
+
browserJavascriptEnabled: boolean;
|
|
78
|
+
/** Browser User-Agent */
|
|
79
|
+
browserUserAgent: string;
|
|
80
|
+
/** Browser Accept Header */
|
|
81
|
+
browserAcceptHeader: string;
|
|
82
|
+
/** Browser IP Address, ipv4 or ipv6 */
|
|
83
|
+
browserIP?: string;
|
|
84
|
+
/** Additional account information, max 64 characters */
|
|
85
|
+
acctID?: string;
|
|
86
|
+
/** Account information, json */
|
|
87
|
+
acctInfo?: {
|
|
88
|
+
/** Account creation ellapsed time code */
|
|
89
|
+
chAccAgeInd?: '01' | '02' | '03' | '04' | '05';
|
|
90
|
+
/** Account modification date, yyyymmdd */
|
|
91
|
+
chAccChange?: string;
|
|
92
|
+
/** Account modification ellapsed time code */
|
|
93
|
+
chAccChangeInd?: '01' | '02' | '03' | '04';
|
|
94
|
+
/** Account creation date, yyyymmdd */
|
|
95
|
+
chAccDate?: string;
|
|
96
|
+
/** Last password change date, yyyymmdd */
|
|
97
|
+
chAccPwChange?: string;
|
|
98
|
+
/** Password change ellapsed time code */
|
|
99
|
+
chAccPwChangeInd?: '01' | '02' | '03' | '04' | '05';
|
|
100
|
+
/** Number of purchases during the last 6 months */
|
|
101
|
+
nbPurchaseAccount?: string;
|
|
102
|
+
/** Attemps to add a card during the last 24 hours */
|
|
103
|
+
provisionAttemptsDay?: string;
|
|
104
|
+
/** Number of transactions attempted during the last 24 hours */
|
|
105
|
+
txnActivityDay?: string;
|
|
106
|
+
/** Number of transactions attempted last year */
|
|
107
|
+
txnActivityYear?: string;
|
|
108
|
+
/** Card registration date, yyyymmdd */
|
|
109
|
+
paymentAccAge?: string;
|
|
110
|
+
/** Card registration ellapsed time code */
|
|
111
|
+
paymentAccInd?: '01' | '02' | '03' | '04' | '05';
|
|
112
|
+
/** First usage of shipping address date, yyyymmdd */
|
|
113
|
+
shipAddressUsage?: string;
|
|
114
|
+
/** First usage of shipping address ellapsed time code */
|
|
115
|
+
shipAddressUsageInd?: '01' | '02' | '03' | '04' | '05';
|
|
116
|
+
/** Cardholder shipping name indicator code */
|
|
117
|
+
shipNameIndicator?: '01' | '02';
|
|
118
|
+
/** Suspicious activity code */
|
|
119
|
+
suspiciousAccActivity?: '01' | '02';
|
|
120
|
+
};
|
|
121
|
+
/** Matching shipping and billing addresses indicator */
|
|
122
|
+
addrMatch?: 'Y' | 'N';
|
|
123
|
+
/** Billing address city */
|
|
124
|
+
billAddrCity?: string;
|
|
125
|
+
/** Billing address line 1 */
|
|
126
|
+
billAddrLine1?: string;
|
|
127
|
+
/** Billing address line 2 */
|
|
128
|
+
billAddrLine2?: string;
|
|
129
|
+
/** Billing address line 3 */
|
|
130
|
+
billAddrLine3?: string;
|
|
131
|
+
/** Billing address postal code */
|
|
132
|
+
billAddrPostCode?: string;
|
|
133
|
+
/** Billing address state code, ISO 3166-2 */
|
|
134
|
+
billAddrState?: string;
|
|
135
|
+
/** Billing address country code, ISO 3166-1 */
|
|
136
|
+
billAddrCountry?: string;
|
|
137
|
+
/** Cardholder name */
|
|
138
|
+
cardholderName?: string;
|
|
139
|
+
/** Challenge window size */
|
|
140
|
+
challengeWindowSize?: string;
|
|
141
|
+
/** Account email address */
|
|
142
|
+
email?: string;
|
|
143
|
+
/** Account landline phone number */
|
|
144
|
+
homePhone?: ThreeDSPhone;
|
|
145
|
+
/** Account mobile phone number */
|
|
146
|
+
mobilePhone?: ThreeDSPhone;
|
|
147
|
+
/** Account work phone number */
|
|
148
|
+
workPhone?: ThreeDSPhone;
|
|
149
|
+
/** Merchant risk indicator, json */
|
|
150
|
+
merchantRiskIndicator?: {
|
|
151
|
+
/** Delivery email address */
|
|
152
|
+
deliveryEmailAddress?: string;
|
|
153
|
+
/** Delivery time code */
|
|
154
|
+
deliveryTimeframe?: '01' | '02' | '03' | '04';
|
|
155
|
+
/** Gift card amount */
|
|
156
|
+
giftCardAmount?: string;
|
|
157
|
+
/** Count of gift cards used */
|
|
158
|
+
giftCardCount?: string;
|
|
159
|
+
/** Gift card currency number, ISO-4217 */
|
|
160
|
+
giftCardCurr?: string;
|
|
161
|
+
/** Preorder availability date, yyyymmdd */
|
|
162
|
+
preOrderDate?: string;
|
|
163
|
+
/** Preorder availability indicator code */
|
|
164
|
+
preOrderPurchaseInd?: '01' | '02';
|
|
165
|
+
/** Reorder indicator code */
|
|
166
|
+
reorderItemsInd?: '01' | '02';
|
|
167
|
+
/** Shipping indicator code */
|
|
168
|
+
shipIndicator?: '01' | '02' | '03' | '04' | '05' | '06' | '07';
|
|
169
|
+
};
|
|
170
|
+
/** Number of purchase installments */
|
|
171
|
+
purchaseInstalData?: string;
|
|
172
|
+
/** Recurring payments expiration date, yyyymmdd */
|
|
173
|
+
recurringExpiry?: string;
|
|
174
|
+
/** Minimum number of days between recurring payments */
|
|
175
|
+
recurringFrequency?: string;
|
|
176
|
+
/** Shipping address city */
|
|
177
|
+
shipAddrCity?: string;
|
|
178
|
+
/** Shipping address line 1 */
|
|
179
|
+
shipAddrLine1?: string;
|
|
180
|
+
/** Shipping address line 2 */
|
|
181
|
+
shipAddrLine2?: string;
|
|
182
|
+
/** Shipping address line 3 */
|
|
183
|
+
shipAddrLine3?: string;
|
|
184
|
+
/** Shipping address postal code */
|
|
185
|
+
shipAddrPostCode?: string;
|
|
186
|
+
/** Shipping address state code, ISO 3166-2 */
|
|
187
|
+
shipAddrState?: string;
|
|
188
|
+
/** Shipping address country code, ISO 3166-1 */
|
|
189
|
+
shipAddrCountry?: string;
|
|
190
|
+
/** Authentication information, json */
|
|
191
|
+
threeDSRequestorAuthenticationInfo?: ThreeDSRequestorAuthenticationInfo;
|
|
192
|
+
/** Previous authentication information, json */
|
|
193
|
+
threeDSRequestorPriorAuthenticationInfo?: ThreeDSRequestorPriorAuthenticationInfo;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Browser information required by 3DS
|
|
197
|
+
*
|
|
198
|
+
* @remarks
|
|
199
|
+
* The information must be obtained in the browser, for example, wusing the following function.
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```
|
|
203
|
+
* const obtain3DSBrowserInfo = (): ThreeDSBrowserClientInfo => {
|
|
204
|
+
* return {
|
|
205
|
+
* browserLanguage: navigator.language,
|
|
206
|
+
* browserColorDepth: screen.colorDepth.toString(),
|
|
207
|
+
* browserScreenHeight: screen.height.toString(),
|
|
208
|
+
* browserScreenWidth: screen.width.toString(),
|
|
209
|
+
* browserTZ: (new Date()).getTimezoneOffset().toString(),
|
|
210
|
+
* browserJavaEnabled: navigator.javaEnabled()
|
|
211
|
+
* };
|
|
212
|
+
* };
|
|
213
|
+
* ```
|
|
214
|
+
*
|
|
215
|
+
* @public
|
|
216
|
+
*/
|
|
217
|
+
export type ThreeDSBrowserClientInfo = Pick<BaseThreeDSAuthenticationDataParams, 'browserLanguage' | 'browserColorDepth' | 'browserScreenHeight' | 'browserScreenWidth' | 'browserTZ' | 'browserJavaEnabled'>;
|
|
218
|
+
export interface ThreeDSPreAuthInputParams {
|
|
219
|
+
threeDSInfo: 'CardData';
|
|
220
|
+
}
|
|
221
|
+
export interface ThreeDSv1AuthDataInputParams extends Pick<BaseThreeDSAuthenticationDataParams, 'protocolVersion' | 'threeDSInfo' | 'browserAcceptHeader' | 'browserUserAgent'> {
|
|
222
|
+
protocolVersion: '1.0.2';
|
|
223
|
+
threeDSInfo: 'AuthenticationData';
|
|
224
|
+
}
|
|
225
|
+
export interface ThreeDSv2AuthDataInputParams extends BaseThreeDSAuthenticationDataParams {
|
|
226
|
+
protocolVersion: '2.1.0' | '2.2.0';
|
|
227
|
+
threeDSInfo: 'AuthenticationData';
|
|
228
|
+
}
|
|
229
|
+
export interface ThreeDSv1ChallengeResponseInputParams {
|
|
230
|
+
protocolVersion: '1.0.2';
|
|
231
|
+
threeDSInfo: 'ChallengeResponse';
|
|
232
|
+
PARes: string;
|
|
233
|
+
MD: string;
|
|
234
|
+
}
|
|
235
|
+
export interface ThreeDSv2ChallengeResponseInputParams {
|
|
236
|
+
protocolVersion: '2.1.0' | '2.2.0';
|
|
237
|
+
threeDSInfo: 'ChallengeResponse';
|
|
238
|
+
cres: string;
|
|
239
|
+
}
|
|
240
|
+
/** 3D Secure input parameters */
|
|
241
|
+
export type ThreeDSInputParams = ThreeDSPreAuthInputParams | ThreeDSv1AuthDataInputParams | ThreeDSv2AuthDataInputParams | ThreeDSv1ChallengeResponseInputParams | ThreeDSv2ChallengeResponseInputParams;
|
|
242
|
+
export type ThreeDSRedirectInputParams = Omit<BaseThreeDSAuthenticationDataParams, 'protocolVersion' | 'threeDSInfo' | 'notificationURL' | 'threeDSCompInd' | 'threeDSServerTransID' | 'browserColorDepth' | 'browserJavaEnabled' | 'browserLanguage' | 'browserScreenHeight' | 'browserScreenWidth' | 'browserTZ' | 'browserJavascriptEnabled' | 'browserUserAgent' | 'browserAcceptHeader' | 'browserIP'>;
|
|
243
|
+
export interface ThreeDSv1PreAuthOutputParams {
|
|
244
|
+
protocolVersion: 'NO_3DS_v2';
|
|
245
|
+
threeDSInfo: 'CardConfiguration';
|
|
246
|
+
}
|
|
247
|
+
export interface ThreeDSv2PreAuthWithoutMethodOutputParams {
|
|
248
|
+
protocolVersion: '2.1.0' | '2.2.0';
|
|
249
|
+
threeDSInfo: 'CardConfiguration';
|
|
250
|
+
threeDSServerTransID: string;
|
|
251
|
+
}
|
|
252
|
+
export interface ThreeDSv2PreAuthWithMethodOutputParams extends ThreeDSv2PreAuthWithoutMethodOutputParams {
|
|
253
|
+
threeDSMethodURL: string;
|
|
254
|
+
}
|
|
255
|
+
export type ThreeDSv2PreAuthOutputParams = ThreeDSv2PreAuthWithoutMethodOutputParams | ThreeDSv2PreAuthWithMethodOutputParams;
|
|
256
|
+
export interface ThreeDSv1ChallengeOutputParams {
|
|
257
|
+
protocolVersion: '1.0.2';
|
|
258
|
+
threeDSInfo: 'ChallengeRequest';
|
|
259
|
+
acsURL: string;
|
|
260
|
+
MD: string;
|
|
261
|
+
PAReq: string;
|
|
262
|
+
}
|
|
263
|
+
export interface ThreeDSv2ChallengeOutputParams {
|
|
264
|
+
protocolVersion: '2.1.0' | '2.2.0';
|
|
265
|
+
threeDSInfo: 'ChallengeRequest';
|
|
266
|
+
acsURL: string;
|
|
267
|
+
creq: string;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* 3D Secure output parameters
|
|
271
|
+
*/
|
|
272
|
+
export type ThreeDSOutputParams = ThreeDSv1PreAuthOutputParams | ThreeDSv2PreAuthOutputParams | ThreeDSv1ChallengeOutputParams | ThreeDSv2ChallengeOutputParams;
|
|
273
|
+
/**
|
|
274
|
+
* 3D Secure v2 challenge solution parameters
|
|
275
|
+
*/
|
|
276
|
+
export interface ThreeDSv2ChallengeSolutionNotificationOutputParams {
|
|
277
|
+
cres: string;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* 3D Secure v1 challenge solution parameters
|
|
281
|
+
*/
|
|
282
|
+
export interface ThreeDSv1ChallengeSolutionNotificationOutputParams {
|
|
283
|
+
MD: string;
|
|
284
|
+
PaRes: string;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* 3DS v2 method data
|
|
288
|
+
*
|
|
289
|
+
* @public
|
|
290
|
+
*/
|
|
291
|
+
export interface ThreeDSMethodData {
|
|
292
|
+
threeDSServerTransID: string;
|
|
293
|
+
threeDSMethodNotificationURL: string;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* 3DS v2 method form
|
|
297
|
+
*
|
|
298
|
+
* @public
|
|
299
|
+
*/
|
|
300
|
+
export interface ThreeDSMethodForm {
|
|
301
|
+
url: string;
|
|
302
|
+
body: {
|
|
303
|
+
threeDSMethodData: string;
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* 3DS v1 challenge form
|
|
308
|
+
*
|
|
309
|
+
* @public
|
|
310
|
+
*/
|
|
311
|
+
export interface ThreeDSv1ChallengeForm {
|
|
312
|
+
url: string;
|
|
313
|
+
body: {
|
|
314
|
+
/** Payment authentication Request, XML that is gzip compressed and base64 encoded */
|
|
315
|
+
PaReq: string;
|
|
316
|
+
/** Merchant data, random generated identifier hex encoded? */
|
|
317
|
+
MD: string;
|
|
318
|
+
/** Post challenge redirect URL */
|
|
319
|
+
TermUrl: string;
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* 3DS v2 challenge form
|
|
324
|
+
*
|
|
325
|
+
* @public
|
|
326
|
+
*/
|
|
327
|
+
export interface ThreeDSv2ChallengeForm {
|
|
328
|
+
url: string;
|
|
329
|
+
body: {
|
|
330
|
+
/** Challenge request, JSON that is base64 encoded */
|
|
331
|
+
creq: string;
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Contents of the `cres` field of a 3DS v2 challenge
|
|
336
|
+
*
|
|
337
|
+
* @public
|
|
338
|
+
*/
|
|
339
|
+
export interface ThreeDSCres {
|
|
340
|
+
messageVersion: '2.1.0' | '2.2.0';
|
|
341
|
+
threeDSServerTransID: string;
|
|
342
|
+
acsTransID: string;
|
|
343
|
+
messageType: 'CRes';
|
|
344
|
+
transStatus: 'Y' | 'N';
|
|
345
|
+
}
|