redsys-easy 4.0.2 → 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 +43 -44
package/lib/types/api.d.ts
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import type { BaseInputParams } from './input-params';
|
|
2
|
-
import type { BaseOutputParams, SoapNotificationOutputParams } from './output-params';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export interface ParsedSoapNotifiation {
|
|
6
|
-
Message: {
|
|
7
|
-
Signature: string;
|
|
8
|
-
Request: SoapNotificationOutputParams;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Body of a 3DS v1 challenge completion notification
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
export interface ThreeDSv1ChallengeNotificationBody {
|
|
17
|
-
/** Payment authentication Request, XML that is gzip compressed and base64 encoded */
|
|
18
|
-
PaRes: string;
|
|
19
|
-
/** Merchant data, random generated identifier hex encoded? */
|
|
20
|
-
MD: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Body of a 3DS v2 method completion notification
|
|
24
|
-
*
|
|
25
|
-
* @public
|
|
26
|
-
*/
|
|
27
|
-
export interface ThreeDSv2MethodNotificationBody {
|
|
28
|
-
threeDSMethodData: string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Body of a 3DS v2 challenge completion notification
|
|
32
|
-
*
|
|
33
|
-
* @public
|
|
34
|
-
*/
|
|
35
|
-
export interface ThreeDSv2ChallengeNotificationBody {
|
|
36
|
-
/** Challenge response, JSON that is base64 encoded */
|
|
37
|
-
cres: string;
|
|
38
|
-
threeDSSessionData: string;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Body of a successful redsys JSON HTTP response or notification
|
|
42
|
-
*
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
45
|
-
export interface ResponseJSONSuccess {
|
|
46
|
-
Ds_SignatureVersion: string;
|
|
47
|
-
Ds_Signature: string;
|
|
48
|
-
Ds_MerchantParameters: string;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Body of a failed redsys JSON HTTP response
|
|
52
|
-
*/
|
|
53
|
-
export interface ResponseJSONError {
|
|
54
|
-
errorCode: string;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Body of a redsys JSON HTTP response
|
|
58
|
-
*/
|
|
59
|
-
export
|
|
60
|
-
/**
|
|
61
|
-
* SHA256 signed JSON request parameters
|
|
62
|
-
*/
|
|
63
|
-
export interface SHA256SignedJSONParameters {
|
|
64
|
-
Ds_SignatureVersion: 'HMAC_SHA256_V1';
|
|
65
|
-
Ds_MerchantParameters: string;
|
|
66
|
-
Ds_Signature: string;
|
|
67
|
-
}
|
|
68
|
-
export interface SoapNotificationResponse {
|
|
69
|
-
order: string;
|
|
70
|
-
allow: boolean;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Redirect form
|
|
74
|
-
*
|
|
75
|
-
* @public
|
|
76
|
-
*/
|
|
77
|
-
export interface RedirectForm {
|
|
78
|
-
url: string;
|
|
79
|
-
body: SHA256SignedJSONParameters;
|
|
80
|
-
}
|
|
1
|
+
import type { BaseInputParams } from './input-params';
|
|
2
|
+
import type { BaseOutputParams, SoapNotificationOutputParams } from './output-params';
|
|
3
|
+
export type CommonRawResponseParams = Pick<BaseOutputParams, 'Ds_Order'>;
|
|
4
|
+
export type CommonRawRequestParams = Pick<BaseInputParams, 'DS_MERCHANT_ORDER'>;
|
|
5
|
+
export interface ParsedSoapNotifiation {
|
|
6
|
+
Message: {
|
|
7
|
+
Signature: string;
|
|
8
|
+
Request: SoapNotificationOutputParams;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Body of a 3DS v1 challenge completion notification
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export interface ThreeDSv1ChallengeNotificationBody {
|
|
17
|
+
/** Payment authentication Request, XML that is gzip compressed and base64 encoded */
|
|
18
|
+
PaRes: string;
|
|
19
|
+
/** Merchant data, random generated identifier hex encoded? */
|
|
20
|
+
MD: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Body of a 3DS v2 method completion notification
|
|
24
|
+
*
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export interface ThreeDSv2MethodNotificationBody {
|
|
28
|
+
threeDSMethodData: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Body of a 3DS v2 challenge completion notification
|
|
32
|
+
*
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export interface ThreeDSv2ChallengeNotificationBody {
|
|
36
|
+
/** Challenge response, JSON that is base64 encoded */
|
|
37
|
+
cres: string;
|
|
38
|
+
threeDSSessionData: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Body of a successful redsys JSON HTTP response or notification
|
|
42
|
+
*
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export interface ResponseJSONSuccess {
|
|
46
|
+
Ds_SignatureVersion: string;
|
|
47
|
+
Ds_Signature: string;
|
|
48
|
+
Ds_MerchantParameters: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Body of a failed redsys JSON HTTP response
|
|
52
|
+
*/
|
|
53
|
+
export interface ResponseJSONError {
|
|
54
|
+
errorCode: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Body of a redsys JSON HTTP response
|
|
58
|
+
*/
|
|
59
|
+
export type ResponseJSON = ResponseJSONSuccess | ResponseJSONError;
|
|
60
|
+
/**
|
|
61
|
+
* SHA256 signed JSON request parameters
|
|
62
|
+
*/
|
|
63
|
+
export interface SHA256SignedJSONParameters {
|
|
64
|
+
Ds_SignatureVersion: 'HMAC_SHA256_V1';
|
|
65
|
+
Ds_MerchantParameters: string;
|
|
66
|
+
Ds_Signature: string;
|
|
67
|
+
}
|
|
68
|
+
export interface SoapNotificationResponse {
|
|
69
|
+
order: string;
|
|
70
|
+
allow: boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Redirect form
|
|
74
|
+
*
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
export interface RedirectForm {
|
|
78
|
+
url: string;
|
|
79
|
+
body: SHA256SignedJSONParameters;
|
|
80
|
+
}
|
|
@@ -1,176 +1,176 @@
|
|
|
1
|
-
import type { TransactionType } from '../assets/transaction-types';
|
|
2
|
-
import type { CurrencyNum } from '../assets/currencies';
|
|
3
|
-
import type { LanguageNum } from '../assets/lang-codes';
|
|
4
|
-
import type { ThreeDSPreAuthInputParams, ThreeDSv1AuthDataInputParams, ThreeDSv2AuthDataInputParams, ThreeDSv1ChallengeResponseInputParams, ThreeDSv2ChallengeResponseInputParams, ThreeDSRedirectInputParams } from './3ds-params';
|
|
5
|
-
/**
|
|
6
|
-
* Common input parameters
|
|
7
|
-
*/
|
|
8
|
-
export interface BaseInputParams {
|
|
9
|
-
/** Transaction type */
|
|
10
|
-
DS_MERCHANT_TRANSACTIONTYPE: TransactionType;
|
|
11
|
-
/** Merchant code number */
|
|
12
|
-
DS_MERCHANT_MERCHANTCODE: string;
|
|
13
|
-
/** Order identifier */
|
|
14
|
-
DS_MERCHANT_ORDER: string;
|
|
15
|
-
/** Terminal number */
|
|
16
|
-
DS_MERCHANT_TERMINAL: string;
|
|
17
|
-
/** Stored payment method reference number */
|
|
18
|
-
DS_MERCHANT_IDENTIFIER?: string;
|
|
19
|
-
/** Merchant group number */
|
|
20
|
-
DS_MERCHANT_GROUP?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Amount designated as an integer in the smallest currency division
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* `'199'` (1.99 EUR)
|
|
26
|
-
*/
|
|
27
|
-
DS_MERCHANT_AMOUNT?: string;
|
|
28
|
-
/** Currency number, ISO-4217 */
|
|
29
|
-
DS_MERCHANT_CURRENCY?: CurrencyNum;
|
|
30
|
-
/** Card PAN, number */
|
|
31
|
-
DS_MERCHANT_PAN?: string;
|
|
32
|
-
/** Card expiry date, YYMM */
|
|
33
|
-
DS_MERCHANT_EXPIRYDATE?: string;
|
|
34
|
-
/** Card CVV2 code */
|
|
35
|
-
DS_MERCHANT_CVV2?: string;
|
|
36
|
-
/** PDS2 exemptions */
|
|
37
|
-
DS_MERCHANT_EXCEP_SCA?: string;
|
|
38
|
-
/** Merchant data */
|
|
39
|
-
DS_MERCHANT_MERCHANTDATA?: string;
|
|
40
|
-
/** Merchant name */
|
|
41
|
-
DS_MERCHANT_MERCHANTNAME?: string;
|
|
42
|
-
/** Product description */
|
|
43
|
-
DS_MERCHANT_PRODUCTDESCRIPTION?: string;
|
|
44
|
-
/** Cardholder name and surname */
|
|
45
|
-
DS_MERCHANT_TITULAR?: string;
|
|
46
|
-
/** Authorization transaction code, refunds */
|
|
47
|
-
DS_MERCHANT_AUTHORISATIONCODE?: string;
|
|
48
|
-
/** Transaction date, YYYY-MM-DD */
|
|
49
|
-
DS_MERCHANT_TRANSACTIONDATE?: string;
|
|
50
|
-
/** Direct payment */
|
|
51
|
-
DS_MERCHANT_DIRECTPAYMENT?: 'true' | 'moto';
|
|
52
|
-
/** INSITE operation identifier */
|
|
53
|
-
DS_MERCHANT_IDOPER?: string;
|
|
54
|
-
/** Tax code number */
|
|
55
|
-
DS_MERCHANT_TAX_REFERENCE?: string;
|
|
56
|
-
/** Online Travel Agency indicator */
|
|
57
|
-
DS_MERCHANT_OTA?: 'S';
|
|
58
|
-
/** Initial Credential On File transaction indicator */
|
|
59
|
-
DS_MERCHANT_COF_INI?: 'S' | 'N';
|
|
60
|
-
/** Credential On File transaction identifier */
|
|
61
|
-
DS_MERCHANT_COF_TXNID?: string;
|
|
62
|
-
/** Credential On File transaction type */
|
|
63
|
-
DS_MERCHANT_COF_TYPE?: 'I' | 'R' | 'H' | 'E' | 'D' | 'M' | 'N' | 'C';
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Input parameters for a redsys redirect request
|
|
67
|
-
*
|
|
68
|
-
* @public
|
|
69
|
-
*/
|
|
70
|
-
export interface RedirectInputParams extends BaseInputParams {
|
|
71
|
-
/** EMV3DS data in json format */
|
|
72
|
-
DS_MERCHANT_EMV3DS?: ThreeDSRedirectInputParams;
|
|
73
|
-
/** Notification url */
|
|
74
|
-
DS_MERCHANT_MERCHANTURL?: string;
|
|
75
|
-
/** Success redirection url */
|
|
76
|
-
DS_MERCHANT_URLOK?: string;
|
|
77
|
-
/** Failure redirection url */
|
|
78
|
-
DS_MERCHANT_URLKO?: string;
|
|
79
|
-
/** Language */
|
|
80
|
-
DS_MERCHANT_CONSUMERLANGUAGE?: LanguageNum;
|
|
81
|
-
/** Payment methods */
|
|
82
|
-
DS_MERCHANT_PAYMETHODS?: string;
|
|
83
|
-
/** Customization code number */
|
|
84
|
-
DS_MERCHANT_PERSOCODE?: string;
|
|
85
|
-
/** Obtain paypal address */
|
|
86
|
-
DS_MERCHANT_SHIPPINGADDRESSPYP?: 'S' | 'N';
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Common input parameters for redsys request
|
|
90
|
-
*
|
|
91
|
-
* @public
|
|
92
|
-
*/
|
|
93
|
-
export interface RequestInputParams extends BaseInputParams {
|
|
94
|
-
/** xPay data, hex */
|
|
95
|
-
DS_XPAYDATA?: string;
|
|
96
|
-
/** xPay origin */
|
|
97
|
-
DS_XPAYORIGEN?: 'Google' | 'Apple';
|
|
98
|
-
/** xPay type */
|
|
99
|
-
DS_XPAYTYPE?: 'WEB' | 'InApp';
|
|
100
|
-
/** PUC identifier, number */
|
|
101
|
-
DS_ACQUIRER_IDENTIFIER?: string;
|
|
102
|
-
/** Matching data */
|
|
103
|
-
DS_MERCHANT_MATCHINGDATA?: string;
|
|
104
|
-
/** Customer phone, paygold */
|
|
105
|
-
DS_MERCHANT_CUSTOMER_MOBILE?: string;
|
|
106
|
-
/** Customer email address, paygold */
|
|
107
|
-
DS_MERCHANT_CUSTOMER_MAIL?: string;
|
|
108
|
-
/** Expiration date for paygold links, YYYY-MM-DD-hh:mm:ss.sss or number of minutes */
|
|
109
|
-
DS_MERCHANT_P2F_EXPIRYDATE?: string;
|
|
110
|
-
/**
|
|
111
|
-
* SMS text content, paygold
|
|
112
|
-
*
|
|
113
|
-
* Parameters: @URL@, @COMERCIO@, @IMPORTE@ and @MONEDA@
|
|
114
|
-
*/
|
|
115
|
-
DS_MERCHANT_CUSTOMER_SMS_TEXT?: string;
|
|
116
|
-
/**
|
|
117
|
-
* Email text content, paygold
|
|
118
|
-
*
|
|
119
|
-
* Parameters: nombreComprador, direccionComprador and textoLibre1.
|
|
120
|
-
*/
|
|
121
|
-
DS_MERCHANT_P2F_XMLDATA?: string;
|
|
122
|
-
}
|
|
123
|
-
export interface CommonRestInputParams extends RequestInputParams {
|
|
124
|
-
/** MPI External parameters, json */
|
|
125
|
-
DS_MERCHANT_MPIEXTERNAL?: {
|
|
126
|
-
/** Authenticator identifier, base64 */
|
|
127
|
-
TXID: string;
|
|
128
|
-
/** CAVV, base64 */
|
|
129
|
-
CAVV: string;
|
|
130
|
-
/** ECI, number */
|
|
131
|
-
ECI: '5' | '6' | '7';
|
|
132
|
-
/** Eci, number */
|
|
133
|
-
Eci: string;
|
|
134
|
-
/** 3DSecure transaction identifier */
|
|
135
|
-
threeDSServerTransID: string;
|
|
136
|
-
/** DS identifier */
|
|
137
|
-
dsTransID: string;
|
|
138
|
-
/** CAVV, base64 */
|
|
139
|
-
authenticationValue: string;
|
|
140
|
-
/** 3DSecure version */
|
|
141
|
-
ProtocolVersion: '2.1.0';
|
|
142
|
-
/** Authentication Method */
|
|
143
|
-
authenticationMethod: string;
|
|
144
|
-
/** Authentication type */
|
|
145
|
-
authenticationType: string;
|
|
146
|
-
/** Authentication flow */
|
|
147
|
-
authenticationFlow: 'F' | 'C';
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Input parameters for a IniciaPeticion HTTP request
|
|
152
|
-
*
|
|
153
|
-
* @public
|
|
154
|
-
*/
|
|
155
|
-
export interface RestIniciaPeticionInputParams extends CommonRestInputParams {
|
|
156
|
-
/** EMV3DS data in json format */
|
|
157
|
-
DS_MERCHANT_EMV3DS?: ThreeDSPreAuthInputParams;
|
|
158
|
-
/** Dynamic Currency Conversion data, json */
|
|
159
|
-
DS_MERCHANT_DCC?: 'Y' | 'N';
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Input parameters for a TrataPeticion Peticion HTTP request
|
|
163
|
-
*
|
|
164
|
-
* @public
|
|
165
|
-
*/
|
|
166
|
-
export interface RestTrataPeticionInputParams extends CommonRestInputParams {
|
|
167
|
-
/** EMV3DS data in json format */
|
|
168
|
-
DS_MERCHANT_EMV3DS?: ThreeDSv1AuthDataInputParams | ThreeDSv2AuthDataInputParams | ThreeDSv1ChallengeResponseInputParams | ThreeDSv2ChallengeResponseInputParams;
|
|
169
|
-
/** Dynamic Currency Conversion data, json */
|
|
170
|
-
DS_MERCHANT_DCC?: {
|
|
171
|
-
/** Card currency number, ISO-4217 */
|
|
172
|
-
monedaDCC: string;
|
|
173
|
-
/** Amount in card currency, decimal number */
|
|
174
|
-
importeDCC: string;
|
|
175
|
-
};
|
|
176
|
-
}
|
|
1
|
+
import type { TransactionType } from '../assets/transaction-types';
|
|
2
|
+
import type { CurrencyNum } from '../assets/currencies';
|
|
3
|
+
import type { LanguageNum } from '../assets/lang-codes';
|
|
4
|
+
import type { ThreeDSPreAuthInputParams, ThreeDSv1AuthDataInputParams, ThreeDSv2AuthDataInputParams, ThreeDSv1ChallengeResponseInputParams, ThreeDSv2ChallengeResponseInputParams, ThreeDSRedirectInputParams } from './3ds-params';
|
|
5
|
+
/**
|
|
6
|
+
* Common input parameters
|
|
7
|
+
*/
|
|
8
|
+
export interface BaseInputParams {
|
|
9
|
+
/** Transaction type */
|
|
10
|
+
DS_MERCHANT_TRANSACTIONTYPE: TransactionType;
|
|
11
|
+
/** Merchant code number */
|
|
12
|
+
DS_MERCHANT_MERCHANTCODE: string;
|
|
13
|
+
/** Order identifier */
|
|
14
|
+
DS_MERCHANT_ORDER: string;
|
|
15
|
+
/** Terminal number */
|
|
16
|
+
DS_MERCHANT_TERMINAL: string;
|
|
17
|
+
/** Stored payment method reference number */
|
|
18
|
+
DS_MERCHANT_IDENTIFIER?: string;
|
|
19
|
+
/** Merchant group number */
|
|
20
|
+
DS_MERCHANT_GROUP?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Amount designated as an integer in the smallest currency division
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* `'199'` (1.99 EUR)
|
|
26
|
+
*/
|
|
27
|
+
DS_MERCHANT_AMOUNT?: string;
|
|
28
|
+
/** Currency number, ISO-4217 */
|
|
29
|
+
DS_MERCHANT_CURRENCY?: CurrencyNum;
|
|
30
|
+
/** Card PAN, number */
|
|
31
|
+
DS_MERCHANT_PAN?: string;
|
|
32
|
+
/** Card expiry date, YYMM */
|
|
33
|
+
DS_MERCHANT_EXPIRYDATE?: string;
|
|
34
|
+
/** Card CVV2 code */
|
|
35
|
+
DS_MERCHANT_CVV2?: string;
|
|
36
|
+
/** PDS2 exemptions */
|
|
37
|
+
DS_MERCHANT_EXCEP_SCA?: string;
|
|
38
|
+
/** Merchant data */
|
|
39
|
+
DS_MERCHANT_MERCHANTDATA?: string;
|
|
40
|
+
/** Merchant name */
|
|
41
|
+
DS_MERCHANT_MERCHANTNAME?: string;
|
|
42
|
+
/** Product description */
|
|
43
|
+
DS_MERCHANT_PRODUCTDESCRIPTION?: string;
|
|
44
|
+
/** Cardholder name and surname */
|
|
45
|
+
DS_MERCHANT_TITULAR?: string;
|
|
46
|
+
/** Authorization transaction code, refunds */
|
|
47
|
+
DS_MERCHANT_AUTHORISATIONCODE?: string;
|
|
48
|
+
/** Transaction date, YYYY-MM-DD */
|
|
49
|
+
DS_MERCHANT_TRANSACTIONDATE?: string;
|
|
50
|
+
/** Direct payment */
|
|
51
|
+
DS_MERCHANT_DIRECTPAYMENT?: 'true' | 'moto';
|
|
52
|
+
/** INSITE operation identifier */
|
|
53
|
+
DS_MERCHANT_IDOPER?: string;
|
|
54
|
+
/** Tax code number */
|
|
55
|
+
DS_MERCHANT_TAX_REFERENCE?: string;
|
|
56
|
+
/** Online Travel Agency indicator */
|
|
57
|
+
DS_MERCHANT_OTA?: 'S';
|
|
58
|
+
/** Initial Credential On File transaction indicator */
|
|
59
|
+
DS_MERCHANT_COF_INI?: 'S' | 'N';
|
|
60
|
+
/** Credential On File transaction identifier */
|
|
61
|
+
DS_MERCHANT_COF_TXNID?: string;
|
|
62
|
+
/** Credential On File transaction type */
|
|
63
|
+
DS_MERCHANT_COF_TYPE?: 'I' | 'R' | 'H' | 'E' | 'D' | 'M' | 'N' | 'C';
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Input parameters for a redsys redirect request
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
export interface RedirectInputParams extends BaseInputParams {
|
|
71
|
+
/** EMV3DS data in json format */
|
|
72
|
+
DS_MERCHANT_EMV3DS?: ThreeDSRedirectInputParams;
|
|
73
|
+
/** Notification url */
|
|
74
|
+
DS_MERCHANT_MERCHANTURL?: string;
|
|
75
|
+
/** Success redirection url */
|
|
76
|
+
DS_MERCHANT_URLOK?: string;
|
|
77
|
+
/** Failure redirection url */
|
|
78
|
+
DS_MERCHANT_URLKO?: string;
|
|
79
|
+
/** Language */
|
|
80
|
+
DS_MERCHANT_CONSUMERLANGUAGE?: LanguageNum;
|
|
81
|
+
/** Payment methods */
|
|
82
|
+
DS_MERCHANT_PAYMETHODS?: string;
|
|
83
|
+
/** Customization code number */
|
|
84
|
+
DS_MERCHANT_PERSOCODE?: string;
|
|
85
|
+
/** Obtain paypal address */
|
|
86
|
+
DS_MERCHANT_SHIPPINGADDRESSPYP?: 'S' | 'N';
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Common input parameters for redsys request
|
|
90
|
+
*
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
export interface RequestInputParams extends BaseInputParams {
|
|
94
|
+
/** xPay data, hex */
|
|
95
|
+
DS_XPAYDATA?: string;
|
|
96
|
+
/** xPay origin */
|
|
97
|
+
DS_XPAYORIGEN?: 'Google' | 'Apple';
|
|
98
|
+
/** xPay type */
|
|
99
|
+
DS_XPAYTYPE?: 'WEB' | 'InApp';
|
|
100
|
+
/** PUC identifier, number */
|
|
101
|
+
DS_ACQUIRER_IDENTIFIER?: string;
|
|
102
|
+
/** Matching data */
|
|
103
|
+
DS_MERCHANT_MATCHINGDATA?: string;
|
|
104
|
+
/** Customer phone, paygold */
|
|
105
|
+
DS_MERCHANT_CUSTOMER_MOBILE?: string;
|
|
106
|
+
/** Customer email address, paygold */
|
|
107
|
+
DS_MERCHANT_CUSTOMER_MAIL?: string;
|
|
108
|
+
/** Expiration date for paygold links, YYYY-MM-DD-hh:mm:ss.sss or number of minutes */
|
|
109
|
+
DS_MERCHANT_P2F_EXPIRYDATE?: string;
|
|
110
|
+
/**
|
|
111
|
+
* SMS text content, paygold
|
|
112
|
+
*
|
|
113
|
+
* Parameters: @URL@, @COMERCIO@, @IMPORTE@ and @MONEDA@
|
|
114
|
+
*/
|
|
115
|
+
DS_MERCHANT_CUSTOMER_SMS_TEXT?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Email text content, paygold
|
|
118
|
+
*
|
|
119
|
+
* Parameters: nombreComprador, direccionComprador and textoLibre1.
|
|
120
|
+
*/
|
|
121
|
+
DS_MERCHANT_P2F_XMLDATA?: string;
|
|
122
|
+
}
|
|
123
|
+
export interface CommonRestInputParams extends RequestInputParams {
|
|
124
|
+
/** MPI External parameters, json */
|
|
125
|
+
DS_MERCHANT_MPIEXTERNAL?: {
|
|
126
|
+
/** Authenticator identifier, base64 */
|
|
127
|
+
TXID: string;
|
|
128
|
+
/** CAVV, base64 */
|
|
129
|
+
CAVV: string;
|
|
130
|
+
/** ECI, number */
|
|
131
|
+
ECI: '5' | '6' | '7';
|
|
132
|
+
/** Eci, number */
|
|
133
|
+
Eci: string;
|
|
134
|
+
/** 3DSecure transaction identifier */
|
|
135
|
+
threeDSServerTransID: string;
|
|
136
|
+
/** DS identifier */
|
|
137
|
+
dsTransID: string;
|
|
138
|
+
/** CAVV, base64 */
|
|
139
|
+
authenticationValue: string;
|
|
140
|
+
/** 3DSecure version */
|
|
141
|
+
ProtocolVersion: '2.1.0';
|
|
142
|
+
/** Authentication Method */
|
|
143
|
+
authenticationMethod: string;
|
|
144
|
+
/** Authentication type */
|
|
145
|
+
authenticationType: string;
|
|
146
|
+
/** Authentication flow */
|
|
147
|
+
authenticationFlow: 'F' | 'C';
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Input parameters for a IniciaPeticion HTTP request
|
|
152
|
+
*
|
|
153
|
+
* @public
|
|
154
|
+
*/
|
|
155
|
+
export interface RestIniciaPeticionInputParams extends CommonRestInputParams {
|
|
156
|
+
/** EMV3DS data in json format */
|
|
157
|
+
DS_MERCHANT_EMV3DS?: ThreeDSPreAuthInputParams;
|
|
158
|
+
/** Dynamic Currency Conversion data, json */
|
|
159
|
+
DS_MERCHANT_DCC?: 'Y' | 'N';
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Input parameters for a TrataPeticion Peticion HTTP request
|
|
163
|
+
*
|
|
164
|
+
* @public
|
|
165
|
+
*/
|
|
166
|
+
export interface RestTrataPeticionInputParams extends CommonRestInputParams {
|
|
167
|
+
/** EMV3DS data in json format */
|
|
168
|
+
DS_MERCHANT_EMV3DS?: ThreeDSv1AuthDataInputParams | ThreeDSv2AuthDataInputParams | ThreeDSv1ChallengeResponseInputParams | ThreeDSv2ChallengeResponseInputParams;
|
|
169
|
+
/** Dynamic Currency Conversion data, json */
|
|
170
|
+
DS_MERCHANT_DCC?: {
|
|
171
|
+
/** Card currency number, ISO-4217 */
|
|
172
|
+
monedaDCC: string;
|
|
173
|
+
/** Amount in card currency, decimal number */
|
|
174
|
+
importeDCC: string;
|
|
175
|
+
};
|
|
176
|
+
}
|