@soltech/fluid-common 1.9.1-beta.0 → 1.9.2-sc23265.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/index.d.ts +8 -1
- package/lib/index.js +7 -0
- package/package.json +1 -1
- package/src/index.ts +16 -1
package/lib/index.d.ts
CHANGED
|
@@ -158,10 +158,15 @@ export interface EncryptionSettings {
|
|
|
158
158
|
encryptionType: EncryptionType;
|
|
159
159
|
expiryDateEncryptionMode: ExpiryDateEncryptionMode;
|
|
160
160
|
encryptCardholderName: boolean;
|
|
161
|
-
encryptFullYear: boolean;
|
|
162
161
|
}
|
|
163
162
|
export interface HostedFieldsSettings {
|
|
164
163
|
url: string;
|
|
164
|
+
protocol?: HostedFieldsProtocol;
|
|
165
|
+
params?: Record<string, string>;
|
|
166
|
+
}
|
|
167
|
+
export declare enum HostedFieldsProtocol {
|
|
168
|
+
ENCRYPTED_FIELDS = "EncryptedFields",
|
|
169
|
+
CARD_TOKEN = "CardToken"
|
|
165
170
|
}
|
|
166
171
|
export declare enum EncryptionType {
|
|
167
172
|
NO_ENCRYPTION = "NO_ENCRYPTION",
|
|
@@ -232,6 +237,8 @@ export interface CreditcardTransactionParams extends TransactionParams {
|
|
|
232
237
|
expiryMonth?: string;
|
|
233
238
|
expiryYear?: string;
|
|
234
239
|
expiryDate?: string;
|
|
240
|
+
cardToken?: string;
|
|
241
|
+
forterToken?: string;
|
|
235
242
|
}
|
|
236
243
|
/**
|
|
237
244
|
* Transaction params for any payment method whose payload is keyed dynamically:
|
package/lib/index.js
CHANGED
|
@@ -32,6 +32,13 @@ export var WindowRedirectType;
|
|
|
32
32
|
WindowRedirectType["BROWSER_TAB"] = "browserTab";
|
|
33
33
|
WindowRedirectType["NONE"] = "none";
|
|
34
34
|
})(WindowRedirectType || (WindowRedirectType = {}));
|
|
35
|
+
// Which message contract the client must speak to the hosted fields, not which gateway
|
|
36
|
+
// is behind them — the gateway's identity stays server-side.
|
|
37
|
+
export var HostedFieldsProtocol;
|
|
38
|
+
(function (HostedFieldsProtocol) {
|
|
39
|
+
HostedFieldsProtocol["ENCRYPTED_FIELDS"] = "EncryptedFields";
|
|
40
|
+
HostedFieldsProtocol["CARD_TOKEN"] = "CardToken";
|
|
41
|
+
})(HostedFieldsProtocol || (HostedFieldsProtocol = {}));
|
|
35
42
|
export var EncryptionType;
|
|
36
43
|
(function (EncryptionType) {
|
|
37
44
|
EncryptionType["NO_ENCRYPTION"] = "NO_ENCRYPTION";
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -177,11 +177,22 @@ export interface EncryptionSettings {
|
|
|
177
177
|
encryptionType: EncryptionType;
|
|
178
178
|
expiryDateEncryptionMode: ExpiryDateEncryptionMode;
|
|
179
179
|
encryptCardholderName: boolean;
|
|
180
|
-
encryptFullYear: boolean;
|
|
181
180
|
}
|
|
182
181
|
|
|
183
182
|
export interface HostedFieldsSettings {
|
|
184
183
|
url: string;
|
|
184
|
+
// Absent means EncryptedFields, so responses composed before this field existed keep working.
|
|
185
|
+
protocol?: HostedFieldsProtocol;
|
|
186
|
+
// Gateway-shaped values the client hands straight to the gateway's own component
|
|
187
|
+
// without interpreting them. CardToken carries merchantId and env.
|
|
188
|
+
params?: Record<string, string>;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Which message contract the client must speak to the hosted fields, not which gateway
|
|
192
|
+
// is behind them — the gateway's identity stays server-side.
|
|
193
|
+
export enum HostedFieldsProtocol {
|
|
194
|
+
ENCRYPTED_FIELDS = 'EncryptedFields',
|
|
195
|
+
CARD_TOKEN = 'CardToken'
|
|
185
196
|
}
|
|
186
197
|
|
|
187
198
|
export enum EncryptionType {
|
|
@@ -262,6 +273,10 @@ export interface CreditcardTransactionParams extends TransactionParams {
|
|
|
262
273
|
expiryMonth?: string;
|
|
263
274
|
expiryYear?: string;
|
|
264
275
|
expiryDate?: string;
|
|
276
|
+
// Set instead of cardNumber when the gateway tokenised the card in the browser.
|
|
277
|
+
cardToken?: string;
|
|
278
|
+
// Device signal the gateway's form returns with the token, forwarded on the charge.
|
|
279
|
+
forterToken?: string;
|
|
265
280
|
}
|
|
266
281
|
|
|
267
282
|
/**
|