@kushki/js 1.38.1 → 1.38.2-alpha
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/KushkiInfo.js
CHANGED
|
@@ -11,7 +11,7 @@ const UtilsService_1 = require("./../lib/service/UtilsService");
|
|
|
11
11
|
*/
|
|
12
12
|
class KInfo {
|
|
13
13
|
static buildKushkiInfo(kushkiInfo) {
|
|
14
|
-
const kushki_js_version = "1.38.
|
|
14
|
+
const kushki_js_version = "1.38.2-alpha";
|
|
15
15
|
if (kushkiInfo) {
|
|
16
16
|
if (UtilsService_1.UtilsService.sIsEmpty(kushkiInfo.platformVersion))
|
|
17
17
|
kushkiInfo.platformVersion = kushki_js_version;
|
|
@@ -23,7 +23,7 @@ class KInfo {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
static _encodeKushkiInfo(kushkiInfo) {
|
|
26
|
-
return
|
|
26
|
+
return Buffer.from(JSON.stringify(kushkiInfo)).toString("base64");
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
exports.KInfo = KInfo;
|
|
@@ -33,6 +33,11 @@ let SiftScience = class SiftScience {
|
|
|
33
33
|
}
|
|
34
34
|
createSiftScienceSession(processor, clientIdentification, mid, isTest, merchantSettingsResponse, userId) {
|
|
35
35
|
return rxjs_1.of(merchantSettingsResponse).pipe(operators_1.map((merchantSettings) => {
|
|
36
|
+
if (UtilsService_1.UtilsService.sIsEmpty(window))
|
|
37
|
+
return {
|
|
38
|
+
sessionId: null,
|
|
39
|
+
userId: null,
|
|
40
|
+
};
|
|
36
41
|
const sift_environment = isTest
|
|
37
42
|
? SiftScienceEnum_1.SiftScienceEnum.siftScienceTest
|
|
38
43
|
: SiftScienceEnum_1.SiftScienceEnum.siftScienceProd;
|
|
@@ -52,6 +57,10 @@ let SiftScience = class SiftScience {
|
|
|
52
57
|
}
|
|
53
58
|
createSiftScienceAntiFraudSession(userId, mid, isTest, merchantSettingsResponse) {
|
|
54
59
|
return rxjs_1.of(merchantSettingsResponse).pipe(operators_1.map((merchantSettings) => {
|
|
60
|
+
if (UtilsService_1.UtilsService.sIsEmpty(window))
|
|
61
|
+
return {
|
|
62
|
+
sessionId: null,
|
|
63
|
+
};
|
|
55
64
|
const sift_environment = isTest
|
|
56
65
|
? SiftScienceEnum_1.SiftScienceEnum.siftScienceTest
|
|
57
66
|
: SiftScienceEnum_1.SiftScienceEnum.siftScienceProd;
|
|
@@ -133,7 +133,7 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
133
133
|
Auth: {
|
|
134
134
|
mandatorySignId: true,
|
|
135
135
|
region: auth.cognito.REGION,
|
|
136
|
-
storage: window.sessionStorage,
|
|
136
|
+
storage: UtilsService_1.UtilsService.sIsEmpty(window) ? "" : window.sessionStorage,
|
|
137
137
|
userPoolId: auth.cognito.USER_POOL_ID,
|
|
138
138
|
userPoolWebClientId: auth.cognito.APP_CLIENT_ID,
|
|
139
139
|
},
|
|
@@ -305,7 +305,8 @@ let CardService = CardService_1 = class CardService {
|
|
|
305
305
|
_getCybersourceJwt(merchantSettings, mid, isTest, regional, cardNumber) {
|
|
306
306
|
return rxjs_1.of(1).pipe(operators_1.switchMap(() => {
|
|
307
307
|
if (this._is3DSSecureEnabled(merchantSettings) &&
|
|
308
|
-
cardNumber !== undefined
|
|
308
|
+
cardNumber !== undefined &&
|
|
309
|
+
!UtilsService_1.UtilsService.sIsEmpty(window))
|
|
309
310
|
return rxjs_1.iif(() => this._isSandboxEnabled(merchantSettings), this._initCybersourceSandbox(mid, isTest, regional), this._initCybersource(cardNumber, mid, isTest, regional));
|
|
310
311
|
return rxjs_1.of(undefined);
|
|
311
312
|
}));
|
|
@@ -315,7 +316,8 @@ let CardService = CardService_1 = class CardService {
|
|
|
315
316
|
}
|
|
316
317
|
_getCybersourceJwtSubscription(merchantSettings, mid, isTest, regional, subscriptionId) {
|
|
317
318
|
return rxjs_1.of(1).pipe(operators_1.switchMap(() => {
|
|
318
|
-
if (this._is3DSSecureEnabled(merchantSettings)
|
|
319
|
+
if (this._is3DSSecureEnabled(merchantSettings) &&
|
|
320
|
+
!UtilsService_1.UtilsService.sIsEmpty(window))
|
|
319
321
|
return rxjs_1.iif(() => this._isSandboxEnabled(merchantSettings), this._initCybersourceSandbox(mid, isTest, regional), this._initCybersourceSubscription(subscriptionId, mid, isTest, regional));
|
|
320
322
|
return rxjs_1.of(undefined);
|
|
321
323
|
}));
|
|
@@ -21,7 +21,6 @@ const KushkiError_1 = require("./../../lib/generic/KushkiError");
|
|
|
21
21
|
const ErrorEnum_1 = require("./../../lib/infrastructure/ErrorEnum");
|
|
22
22
|
const VisaBrandingResourceUrlEnum_1 = require("./../../lib/infrastructure/VisaBrandingResourceUrlEnum");
|
|
23
23
|
const inversify_1 = require("inversify");
|
|
24
|
-
const mastercard_sensory_branding_1 = require("./../../lib/libs/MCSensoryBranding/mastercard-sensory-branding");
|
|
25
24
|
require("reflect-metadata");
|
|
26
25
|
const Kushki_1 = require("./../../lib/Kushki");
|
|
27
26
|
/**
|
|
@@ -54,8 +53,8 @@ let KushkiService = class KushkiService {
|
|
|
54
53
|
.catch(() => Kushki_1.Kushki.callbackError(new KushkiError_1.KushkiError(ErrorEnum_1.ERRORS.E016), callback));
|
|
55
54
|
}
|
|
56
55
|
initMasterCardBrandingAnimation(callback, body) {
|
|
57
|
-
Promise.resolve().then(() => require("./../../lib/libs/MCSensoryBranding/mastercard-sensory-branding")).then(() => {
|
|
58
|
-
const mc_component = new
|
|
56
|
+
Promise.resolve().then(() => require("./../../lib/libs/MCSensoryBranding/mastercard-sensory-branding")).then(({ MCSonic: mc_sonic }) => {
|
|
57
|
+
const mc_component = new mc_sonic();
|
|
59
58
|
const container = document.getElementById("mc-container");
|
|
60
59
|
if (body.clearBackground)
|
|
61
60
|
mc_component.clearBackground = body.clearBackground;
|