@kushki/js 1.38.2-alpha-14078.1-chimborazo → 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 +2 -2
- package/lib/gateway/SiftScience.js +9 -0
- package/lib/infrastructure/EnvironmentEnum.d.ts +1 -1
- package/lib/infrastructure/EnvironmentEnum.js +1 -1
- package/lib/infrastructure/PlatformCodeEnum.d.ts +1 -6
- package/lib/infrastructure/PlatformCodeEnum.js +0 -5
- package/lib/service/AuthService.js +1 -1
- package/lib/service/CardService.js +4 -2
- package/lib/service/KushkiService.js +2 -3
- package/lib/types/kushki_info.d.ts +1 -3
- package/package.json +1 -1
- package/lib/environments/environment.d.ts +0 -5
- package/lib/environments/environment.js +0 -11
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.2-alpha
|
|
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;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Environment enum file
|
|
4
4
|
*/
|
|
5
5
|
export declare enum EnvironmentEnum {
|
|
6
|
-
uat = "https://api-
|
|
6
|
+
uat = "https://api-uat.kushkipagos.com/",
|
|
7
7
|
prod = "https://api.kushkipagos.com/",
|
|
8
8
|
regionalUat = "https://regional-uat.kushkipagos.com/",
|
|
9
9
|
regionalProd = "https://regional.kushkipagos.com/"
|
|
@@ -6,7 +6,7 @@ exports.EnvironmentEnum = void 0;
|
|
|
6
6
|
*/
|
|
7
7
|
var EnvironmentEnum;
|
|
8
8
|
(function (EnvironmentEnum) {
|
|
9
|
-
EnvironmentEnum["uat"] = "https://api-
|
|
9
|
+
EnvironmentEnum["uat"] = "https://api-uat.kushkipagos.com/";
|
|
10
10
|
EnvironmentEnum["prod"] = "https://api.kushkipagos.com/";
|
|
11
11
|
EnvironmentEnum["regionalUat"] = "https://regional-uat.kushkipagos.com/";
|
|
12
12
|
EnvironmentEnum["regionalProd"] = "https://regional.kushkipagos.com/";
|
|
@@ -12,8 +12,7 @@ export declare enum PlatformCodeEnum {
|
|
|
12
12
|
PRESTASHOP = "KP010",
|
|
13
13
|
WOOCOMERCE = "KP011",
|
|
14
14
|
SHOPIFY = "KP012",
|
|
15
|
-
WEBCHECKOUT = "KP013"
|
|
16
|
-
WEBCHECKOUT_EXPRESS = "KP014"
|
|
15
|
+
WEBCHECKOUT = "KP013"
|
|
17
16
|
}
|
|
18
17
|
export declare const PLATFORMS: {
|
|
19
18
|
KP001: {
|
|
@@ -68,8 +67,4 @@ export declare const PLATFORMS: {
|
|
|
68
67
|
platformId: string;
|
|
69
68
|
platformName: string;
|
|
70
69
|
};
|
|
71
|
-
KP014: {
|
|
72
|
-
platformId: string;
|
|
73
|
-
platformName: string;
|
|
74
|
-
};
|
|
75
70
|
};
|
|
@@ -16,7 +16,6 @@ var PlatformCodeEnum;
|
|
|
16
16
|
PlatformCodeEnum["WOOCOMERCE"] = "KP011";
|
|
17
17
|
PlatformCodeEnum["SHOPIFY"] = "KP012";
|
|
18
18
|
PlatformCodeEnum["WEBCHECKOUT"] = "KP013";
|
|
19
|
-
PlatformCodeEnum["WEBCHECKOUT_EXPRESS"] = "KP014";
|
|
20
19
|
})(PlatformCodeEnum = exports.PlatformCodeEnum || (exports.PlatformCodeEnum = {}));
|
|
21
20
|
exports.PLATFORMS = {
|
|
22
21
|
KP001: {
|
|
@@ -71,8 +70,4 @@ exports.PLATFORMS = {
|
|
|
71
70
|
platformId: "KP013",
|
|
72
71
|
platformName: "WEBCHECKOUT",
|
|
73
72
|
},
|
|
74
|
-
KP014: {
|
|
75
|
-
platformId: "KP014",
|
|
76
|
-
platformName: "WEBCHECKOUT_EXPRESS",
|
|
77
|
-
},
|
|
78
73
|
};
|
|
@@ -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;
|
|
@@ -16,7 +16,6 @@ export interface KushkiInfo {
|
|
|
16
16
|
* KP011=WOOCOMERCE
|
|
17
17
|
* KP012=SHOPIFY
|
|
18
18
|
* KP013=WEBCHECKOUT
|
|
19
|
-
* KP014=WEBCHECKOUT_EXPRESS
|
|
20
19
|
*
|
|
21
20
|
*/
|
|
22
21
|
platformId:
|
|
@@ -32,7 +31,6 @@ export interface KushkiInfo {
|
|
|
32
31
|
| "KP010"
|
|
33
32
|
| "KP011"
|
|
34
33
|
| "KP012"
|
|
35
|
-
| "KP013"
|
|
36
|
-
| "KP014";
|
|
34
|
+
| "KP013";
|
|
37
35
|
platformVersion?: string;
|
|
38
36
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.environment = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Environment file
|
|
6
|
-
*/
|
|
7
|
-
/* tslint:disable:all */
|
|
8
|
-
// The file contents for the current environment will overwrite these during build.
|
|
9
|
-
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
|
|
10
|
-
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
|
|
11
|
-
exports.environment = {};
|