@payfurl/client 4.9.10 → 4.11.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/CHANGELOG.md +163 -0
- package/README.md +237 -42
- package/dist/sdk/{CloseIcon-DhsqodgI.js → CloseIcon-Ejad61tT.js} +377 -363
- package/dist/sdk/{DefaultThreeDsProvider-qhlEMnGb.js → DefaultThreeDsProvider-bLoDSnkd.js} +24 -24
- package/dist/sdk/{MetricsGlobalThreeDsProvider-BOEA6G5r.js → MetricsGlobalThreeDsProvider-C93ttqbB.js} +17 -17
- package/dist/sdk/{PayWayAppleButton-ziK0EEr8.js → PayWayAppleButton-BzAwlGS-.js} +1 -1
- package/dist/sdk/{alerts-2ShoA1hc.js → alerts-1YSRy5iI.js} +9 -9
- package/dist/sdk/{cxpay-B2_DeDZt.js → cxpay-DblHb5vN.js} +1 -1
- package/dist/sdk/{default-2G4dbyeg.js → default-C7f86Fx-.js} +1 -1
- package/dist/sdk/{ecentric-kLMDhKl_.js → ecentric-B3UohyO_.js} +18 -17
- package/dist/sdk/{epna-p_tBGPK3.js → epna-DwUg2IlB.js} +1 -1
- package/dist/sdk/{flashbanc-ChTsnYMc.js → flashbanc-LXs8bahL.js} +1 -1
- package/dist/sdk/forter-CLFaJUYa.js +30 -0
- package/dist/sdk/{gpayments-Sa7Ek9FT.js → gpayments-DoZug3PV.js} +16 -16
- package/dist/sdk/{metrics_global-CxURr43F.js → metrics_global-BM-ooge-.js} +1 -1
- package/dist/sdk/{nmi-Bq5IGnP2.js → nmi-BA3ZTdQa.js} +1 -1
- package/dist/sdk/{nuvei-BDdU_s1G.js → nuvei-DIWsLlLz.js} +30 -30
- package/dist/sdk/{payabli-4-XnuYBw.js → payabli-DgrTI1Et.js} +1 -1
- package/dist/sdk/payfurl.d.ts +456 -0
- package/dist/sdk/payfurl.es.js +1885 -1601
- package/dist/sdk/payfurl.umd.js +8 -8
- package/dist/sdk/{payglocal-9n0hrZAf.js → payglocal-ezp0MsaZ.js} +36 -35
- package/dist/sdk/{payway_rest-vCmhadiN.js → payway_rest-D8-T-ULx.js} +1 -1
- package/dist/sdk/redact-Bn_hfytX.js +46 -0
- package/dist/sdk/{skybank-BIJrZVJd.js → skybank-BgDLlFXX.js} +1 -1
- package/dist/sdk/{strings-ahZ6LOKg.js → strings-Dp6oE-U1.js} +18 -14
- package/dist/sdk/style.css +1 -1
- package/dist/sdk/whenRendered-jR4Jls4M.js +12 -0
- package/package.json +9 -2
- package/dist/sdk/forter-BKH-4F0d.js +0 -26
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as e, Bt as t, Mt as n, Ot as r, St as i, Tt as a, Vt as o, ft as s, h as c, ht as l, j as u, k as d, kt as f, n as p, t as m, tt as h, xt as g } from "./CloseIcon-Ejad61tT.js";
|
|
2
2
|
// src/sdk/3ds/ThreeDsChallenge.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = ["action"], x = ["value"], S = /*#__PURE__*/
|
|
3
|
+
var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = ["action"], x = ["value"], S = /*#__PURE__*/ h(/* @__PURE__ */ f({
|
|
4
4
|
__name: "ThreeDsChallenge",
|
|
5
5
|
props: {
|
|
6
6
|
threeDSServerTransID: {},
|
|
@@ -8,32 +8,32 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
|
|
|
8
8
|
formAction: {}
|
|
9
9
|
},
|
|
10
10
|
emits: ["close", "submit"],
|
|
11
|
-
setup(
|
|
12
|
-
let
|
|
13
|
-
threeDSServerTransID:
|
|
14
|
-
acsTransID:
|
|
11
|
+
setup(c, { emit: l }) {
|
|
12
|
+
let u = c, d = l, f = g(() => s(u.formAction) ? u.formAction : ""), p = t(null), h = JSON.stringify({
|
|
13
|
+
threeDSServerTransID: u.threeDSServerTransID,
|
|
14
|
+
acsTransID: u.acsTransID,
|
|
15
15
|
messageVersion: "2.2.0",
|
|
16
16
|
messageType: "CReq",
|
|
17
17
|
challengeWindowSize: "01"
|
|
18
|
-
}), S = encodeURI(window.btoa(
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
}), (e, t) => (
|
|
22
|
-
|
|
23
|
-
onClick: t[0] ||= (e) =>
|
|
18
|
+
}), S = encodeURI(window.btoa(h).replace(/=*$/, ""));
|
|
19
|
+
return e(() => {
|
|
20
|
+
f.value && p.value?.submit();
|
|
21
|
+
}), (e, t) => (n(), a("div", _, [i("div", v, [i("div", y, [
|
|
22
|
+
r(m, {
|
|
23
|
+
onClick: t[0] ||= (e) => d("close"),
|
|
24
24
|
id: "3ds-challenge-close"
|
|
25
25
|
}),
|
|
26
|
-
t[1] ||=
|
|
27
|
-
|
|
28
|
-
action:
|
|
26
|
+
t[1] ||= i("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1),
|
|
27
|
+
i("form", {
|
|
28
|
+
action: f.value,
|
|
29
29
|
target: "ThreeDsChallengeIFrame",
|
|
30
30
|
method: "post",
|
|
31
31
|
ref_key: "form",
|
|
32
|
-
ref:
|
|
33
|
-
}, [
|
|
32
|
+
ref: p
|
|
33
|
+
}, [i("input", {
|
|
34
34
|
type: "hidden",
|
|
35
35
|
name: "creq",
|
|
36
|
-
value:
|
|
36
|
+
value: o(S)
|
|
37
37
|
}, null, 8, x)], 8, b)
|
|
38
38
|
])])]));
|
|
39
39
|
}
|
|
@@ -55,7 +55,7 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
|
|
|
55
55
|
}
|
|
56
56
|
a.submit();
|
|
57
57
|
}
|
|
58
|
-
}, { hideSpinner: w, showSpinner: T } =
|
|
58
|
+
}, { hideSpinner: w, showSpinner: T } = p(), E = "3ds_method_invocation_complete", D = "3ds_challenge_complete", O = class {
|
|
59
59
|
log;
|
|
60
60
|
container;
|
|
61
61
|
options;
|
|
@@ -107,12 +107,12 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
|
|
|
107
107
|
"R"
|
|
108
108
|
].includes(t.transStatus) && (this.log(`[${this.getType()}]: Failed 3DS Challenge`, e.data), this.onError(400, "Failed 3DS Challenge"));
|
|
109
109
|
}
|
|
110
|
-
setChallengeFrameVisible(
|
|
111
|
-
window.self !== window.top && window.parent.postMessage({ status:
|
|
110
|
+
setChallengeFrameVisible(e) {
|
|
111
|
+
e && this.threeDsProcessor?.challengeShown(), window.self !== window.top && window.parent.postMessage({ status: e ? u : d }, "*");
|
|
112
112
|
}
|
|
113
113
|
doChallenge(e, t, n) {
|
|
114
114
|
this.log(`[${this.getType()}][doChallenge]`), w(), this.setChallengeFrameVisible(!0);
|
|
115
|
-
let { destroy: r } =
|
|
115
|
+
let { destroy: r } = l({
|
|
116
116
|
el: document.body,
|
|
117
117
|
component: S,
|
|
118
118
|
props: {
|
|
@@ -132,14 +132,14 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
|
|
|
132
132
|
}
|
|
133
133
|
onError = (e, t) => {
|
|
134
134
|
this.closeChallenge(), w(), e === 404 ? this.threeDsProcessor?.onError({ error: "This feature is only supported by ActiveServer v1.1.2+" }) : this.threeDsProcessor?.onError({
|
|
135
|
-
error:
|
|
135
|
+
error: c,
|
|
136
136
|
body: t
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
139
|
onSuccess = (e, t) => {
|
|
140
140
|
this.closeChallenge(), w();
|
|
141
141
|
let n = JSON.parse(t);
|
|
142
|
-
["Y", "A"].includes(n.transStatus) ? this.threeDsProcessor?.onSuccess(n) : (this.log(`[${this.getType()}]: ${
|
|
142
|
+
["Y", "A"].includes(n.transStatus) ? this.threeDsProcessor?.onSuccess(n) : (this.log(`[${this.getType()}]: ${c}`, n), this.threeDsProcessor?.onError({ error: c }));
|
|
143
143
|
};
|
|
144
144
|
threeDsMethodInvoke(e, t) {
|
|
145
145
|
this.log(`[${this.getType()}][threeDsMethodInvoke]`, {
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as m } from "./
|
|
3
|
-
import { t as h } from "./alerts-
|
|
4
|
-
import { t as g } from "./
|
|
1
|
+
import { t as e } from "./DefaultThreeDsProvider-bLoDSnkd.js";
|
|
2
|
+
import { At as t, Bt as n, Mt as r, Ot as i, St as a, Tt as o, ht as s, jt as c, kt as l, n as u, t as d, tt as f, vt as p, zt as m } from "./CloseIcon-Ejad61tT.js";
|
|
3
|
+
import { t as h } from "./alerts-1YSRy5iI.js";
|
|
4
|
+
import { t as g } from "./screen-aNRlfrZR.js";
|
|
5
5
|
// src/sdk/3ds/MetricsGlobalThreeDsChallenge.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = /*#__PURE__*/
|
|
6
|
+
var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = /*#__PURE__*/ f(/* @__PURE__ */ l({
|
|
7
7
|
__name: "MetricsGlobalThreeDsChallenge",
|
|
8
8
|
emits: ["close", "submit"],
|
|
9
|
-
setup(
|
|
10
|
-
let
|
|
11
|
-
function
|
|
12
|
-
["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes(e.data?.message) && (
|
|
9
|
+
setup(e, { emit: s }) {
|
|
10
|
+
let l = s, u = n(!1);
|
|
11
|
+
function f(e) {
|
|
12
|
+
["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes(e.data?.message) && (u.value = e.data.message === "3DS_CHALLENGE_SHOW");
|
|
13
13
|
}
|
|
14
14
|
return t(() => {
|
|
15
|
-
window.addEventListener("message",
|
|
16
|
-
}),
|
|
17
|
-
window.removeEventListener("message",
|
|
18
|
-
}), (e, t) =>
|
|
19
|
-
onClick: t[0] ||= (e) =>
|
|
15
|
+
window.addEventListener("message", f);
|
|
16
|
+
}), c(() => {
|
|
17
|
+
window.removeEventListener("message", f);
|
|
18
|
+
}), (e, t) => m((r(), o("div", _, [a("div", v, [a("div", y, [i(d, {
|
|
19
|
+
onClick: t[0] ||= (e) => l("close"),
|
|
20
20
|
id: "3ds-challenge-close"
|
|
21
|
-
}), t[1] ||=
|
|
21
|
+
}), t[1] ||= a("div", { id: "ThreeDsChallengeIFrame" }, null, -1)])])], 512)), [[p, u.value]]);
|
|
22
22
|
}
|
|
23
|
-
}), [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: x, showSpinner: S } =
|
|
23
|
+
}), [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: x, showSpinner: S } = u(), C = 5, w = class extends e {
|
|
24
24
|
gateway;
|
|
25
25
|
threeDS;
|
|
26
26
|
numAttempts = 0;
|
|
@@ -75,7 +75,7 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
|
|
|
75
75
|
browserJavascriptEnabled: !0,
|
|
76
76
|
browserJavaEnabled: !1,
|
|
77
77
|
browserLanguage: window.navigator.language,
|
|
78
|
-
browserColorDepth: String(
|
|
78
|
+
browserColorDepth: String(g()),
|
|
79
79
|
browserScreenHeight: String(screen.height),
|
|
80
80
|
browserScreenWidth: String(screen.width),
|
|
81
81
|
browserTimeZone: String(Math.round((/* @__PURE__ */ new Date()).getTimezoneOffset() / 60)),
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Bt as e,
|
|
1
|
+
import { Bt as e, Mt as t, St as n, Tt as r, Wt as i, bt as a, ht as o, kt as s, tt as c, wt as l } from "./CloseIcon-Ejad61tT.js";
|
|
2
2
|
// src/sdk/components/Error.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var u = { class: "message" }, d = /*#__PURE__*/
|
|
3
|
+
var u = { class: "message" }, d = /*#__PURE__*/ c(/* @__PURE__ */ s({
|
|
4
4
|
__name: "Error",
|
|
5
5
|
props: { error: {} },
|
|
6
|
-
setup(
|
|
7
|
-
let
|
|
8
|
-
return (
|
|
6
|
+
setup(n) {
|
|
7
|
+
let a = e(n.error);
|
|
8
|
+
return (e, n) => (t(), r("div", u, i(a.value), 1));
|
|
9
9
|
}
|
|
10
|
-
}), [["__scopeId", "data-v-ae4be0f9"]]), f = { class: "message" }, p = { key: 0 }, m = /*#__PURE__*/
|
|
10
|
+
}), [["__scopeId", "data-v-ae4be0f9"]]), f = { class: "message" }, p = { key: 0 }, m = /*#__PURE__*/ c(/* @__PURE__ */ s({
|
|
11
11
|
__name: "Success",
|
|
12
12
|
props: {
|
|
13
13
|
message: {},
|
|
14
14
|
token: {}
|
|
15
15
|
},
|
|
16
16
|
emits: ["close"],
|
|
17
|
-
setup(
|
|
18
|
-
let
|
|
19
|
-
return (
|
|
17
|
+
setup(e, { emit: o }) {
|
|
18
|
+
let s = e;
|
|
19
|
+
return (e, o) => (t(), r(a, null, [n("div", f, i(s.message), 1), s.token ? (t(), r("div", p, "TokenId = " + i(s.token), 1)) : l("", !0)], 64));
|
|
20
20
|
}
|
|
21
21
|
}), [["__scopeId", "data-v-6a4e1608"]]);
|
|
22
22
|
// src/sdk/utils/alerts.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as p } from "./
|
|
1
|
+
import { t as e } from "./DefaultThreeDsProvider-bLoDSnkd.js";
|
|
2
|
+
import { At as t, Bt as n, Mt as r, Ot as i, St as a, Tt as o, Vt as s, ft as c, ht as l, kt as u, t as d, tt as f, xt as p } from "./CloseIcon-Ejad61tT.js";
|
|
3
3
|
// src/sdk/3ds/ecentric.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" }, _ = ["action"], v = ["value"], y = /*#__PURE__*/
|
|
4
|
+
var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" }, _ = ["action"], v = ["value"], y = /*#__PURE__*/ f(/* @__PURE__ */ u({
|
|
5
5
|
__name: "ecentric",
|
|
6
6
|
props: {
|
|
7
7
|
threeDSServerTransID: {},
|
|
@@ -9,27 +9,28 @@ var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" },
|
|
|
9
9
|
formAction: {},
|
|
10
10
|
authenticationValue: {}
|
|
11
11
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
t[
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
emits: ["close", "submit"],
|
|
13
|
+
setup(e, { emit: l }) {
|
|
14
|
+
let u = e, f = l, y = p(() => c(u.formAction) ? u.formAction : ""), b = n(null), x = u.authenticationValue;
|
|
15
|
+
return t(() => {
|
|
16
|
+
y.value && b.value?.submit();
|
|
17
|
+
}), (e, t) => (r(), o("div", m, [a("div", h, [a("div", g, [
|
|
18
|
+
i(d, { onClick: t[0] ||= (e) => f("close") }),
|
|
19
|
+
t[1] ||= a("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1),
|
|
20
|
+
a("form", {
|
|
21
|
+
action: y.value,
|
|
21
22
|
target: "ThreeDsChallengeIFrame",
|
|
22
23
|
method: "post",
|
|
23
24
|
ref_key: "form",
|
|
24
|
-
ref:
|
|
25
|
-
}, [
|
|
25
|
+
ref: b
|
|
26
|
+
}, [a("input", {
|
|
26
27
|
type: "hidden",
|
|
27
28
|
name: "PaReq",
|
|
28
|
-
value:
|
|
29
|
+
value: s(x)
|
|
29
30
|
}, null, 8, v)], 8, _)
|
|
30
31
|
])])]));
|
|
31
32
|
}
|
|
32
|
-
}), [["__scopeId", "data-v-
|
|
33
|
+
}), [["__scopeId", "data-v-bdfafa40"]]), b = class extends e {
|
|
33
34
|
paResPayload = "";
|
|
34
35
|
getType() {
|
|
35
36
|
return "Ecentric";
|
|
@@ -45,7 +46,7 @@ var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" },
|
|
|
45
46
|
}
|
|
46
47
|
doChallenge(e, t, n) {
|
|
47
48
|
this.log(`[${this.getType()}][doChallenge]`), this.setChallengeFrameVisible(!0);
|
|
48
|
-
let { destroy: r } =
|
|
49
|
+
let { destroy: r } = l({
|
|
49
50
|
el: document.body,
|
|
50
51
|
component: y,
|
|
51
52
|
props: {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { t as e } from "./DefaultThreeDsProvider-bLoDSnkd.js";
|
|
2
|
+
import { n as t, r as n, t as r } from "./managedOrders-ojoMZ0Ab.js";
|
|
3
|
+
import { n as i } from "./CloseIcon-Ejad61tT.js";
|
|
4
|
+
import { t as a } from "./whenRendered-jR4Jls4M.js";
|
|
5
|
+
// src/sdk/3ds/ForterThreeDsProvider.ts
|
|
6
|
+
var { hideSpinner: o } = i(), s = class extends e {
|
|
7
|
+
getType() {
|
|
8
|
+
return "Forter";
|
|
9
|
+
}
|
|
10
|
+
onDoAuthSuccess = (e, i) => {
|
|
11
|
+
let s = JSON.parse(i);
|
|
12
|
+
this.log(`[${this.getType()}][onDoAuthSuccess]`, s);
|
|
13
|
+
let c = this.options.clientParameters?.SiteId || "", l = s.managedOrderToken;
|
|
14
|
+
!l || !r.test(c) ? this.onError(e, "3DS could not be started") : t(c).then(() => {
|
|
15
|
+
let e = !1, t = a(this.container, () => {
|
|
16
|
+
e = !0, this.setChallengeFrameVisible(!0), o();
|
|
17
|
+
});
|
|
18
|
+
n(l, this.container, (n) => {
|
|
19
|
+
t(), e && this.setChallengeFrameVisible(!1), n ? (this.log(`[${this.getType()}]: manageOrder failed`, n), this.onError(400, "3DS failed")) : this.onPostAuth();
|
|
20
|
+
});
|
|
21
|
+
}, (e) => {
|
|
22
|
+
this.log(`[${this.getType()}]: managedOrders.js failed to load`, e), this.onError(400, "3DS could not be started");
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
// src/sdk/3ds/forter.ts
|
|
27
|
+
function c(e, t, n) {
|
|
28
|
+
return new s(e, t, n);
|
|
29
|
+
}
|
|
30
|
+
export { c as default };
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as u } from "./
|
|
1
|
+
import { t as e } from "./DefaultThreeDsProvider-bLoDSnkd.js";
|
|
2
|
+
import { Mt as t, St as n, Tt as r, Ut as i, ft as a, ht as o, kt as s, n as c, tt as l, xt as u } from "./CloseIcon-Ejad61tT.js";
|
|
3
3
|
// src/sdk/3ds/GPayments.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var d = { class: "mask" }, f = { class: "wrapper" }, p = ["src"], m = /*#__PURE__*/
|
|
4
|
+
var d = { class: "mask" }, f = { class: "wrapper" }, p = ["src"], m = /*#__PURE__*/ l(/* @__PURE__ */ s({
|
|
5
5
|
__name: "GPayments",
|
|
6
6
|
props: {
|
|
7
7
|
url: {},
|
|
8
8
|
width: {},
|
|
9
9
|
height: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
let
|
|
13
|
-
function
|
|
11
|
+
setup(e) {
|
|
12
|
+
let o = e, s = u(() => a(o.url) ? o.url : "");
|
|
13
|
+
function c() {
|
|
14
14
|
return {
|
|
15
|
-
width: `${
|
|
16
|
-
height: `${
|
|
15
|
+
width: `${o.width || 650}px`,
|
|
16
|
+
height: `${o.height || 400}px`
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
return (
|
|
19
|
+
return (e, a) => (t(), r("div", d, [n("div", f, [n("div", {
|
|
20
20
|
class: "container",
|
|
21
|
-
style:
|
|
21
|
+
style: i([c(), {
|
|
22
22
|
padding: "0",
|
|
23
23
|
margin: "0"
|
|
24
24
|
}])
|
|
25
|
-
}, [
|
|
26
|
-
src:
|
|
27
|
-
style:
|
|
25
|
+
}, [n("iframe", {
|
|
26
|
+
src: s.value,
|
|
27
|
+
style: i(c())
|
|
28
28
|
}, null, 12, p)], 4)])]));
|
|
29
29
|
}
|
|
30
|
-
}), [["__scopeId", "data-v-cf5aa816"]]), { hideSpinner: h } =
|
|
30
|
+
}), [["__scopeId", "data-v-cf5aa816"]]), { hideSpinner: h } = c(), g = class extends e {
|
|
31
31
|
getType() {
|
|
32
32
|
return "GPayments";
|
|
33
33
|
}
|
|
34
34
|
doChallenge(e) {
|
|
35
35
|
this.log(`[${this.getType()}][doChallenge]`), h(), this.setChallengeFrameVisible(!0);
|
|
36
|
-
let { destroy: t } =
|
|
36
|
+
let { destroy: t } = o({
|
|
37
37
|
el: document.body,
|
|
38
38
|
component: m,
|
|
39
39
|
props: {
|
|
@@ -69,7 +69,7 @@ var d = { class: "mask" }, f = { class: "wrapper" }, p = ["src"], m = /*#__PURE_
|
|
|
69
69
|
this.log(`[${this.getType()}][onInitAuthSuccess]`, n), n.threeDSAuthURL ? (this.threeDSRequestorTransID = n.threeDSRequestorTransID, this.threeDSServerTransID = n.threeDSServerTransID, this.threeDSMonitorURL = n.threeDSMonitorURL, this.threeDSAuthURL = n.threeDSAuthURL, n.threeDsServerCallbackUrl ? this.initFrame(n.threeDsServerCallbackUrl) : this.onAuth(!1, "")) : this.onError(e, "No AuthUrl specified");
|
|
70
70
|
};
|
|
71
71
|
initFrame(e) {
|
|
72
|
-
if (this.log(`[${this.getType()}][init3DSFrame]`, e), !
|
|
72
|
+
if (this.log(`[${this.getType()}][init3DSFrame]`, e), !a(e)) return;
|
|
73
73
|
let t = document.createElement("iframe");
|
|
74
74
|
t.src = e, t.style.width = "1px", t.style.height = "1px", t.style.border = "0", document.body.appendChild(t);
|
|
75
75
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as l } from "./DefaultThreeDsProvider-
|
|
1
|
+
import { At as e, Mt as t, St as n, Tt as r, h as i, ht as a, kt as o, n as s, tt as c } from "./CloseIcon-Ejad61tT.js";
|
|
2
|
+
import { t as l } from "./DefaultThreeDsProvider-bLoDSnkd.js";
|
|
3
3
|
// src/sdk/3ds/nuvei.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var u = { class: "mask" }, d = /*#__PURE__*/
|
|
4
|
+
var u = { class: "mask" }, d = /*#__PURE__*/ c(/* @__PURE__ */ o({
|
|
5
5
|
__name: "nuvei",
|
|
6
6
|
props: {
|
|
7
7
|
threeDSServerTransID: {},
|
|
@@ -21,47 +21,47 @@ var u = { class: "mask" }, d = /*#__PURE__*/ r(/* @__PURE__ */ n({
|
|
|
21
21
|
email: {},
|
|
22
22
|
country: {}
|
|
23
23
|
},
|
|
24
|
-
setup(
|
|
25
|
-
let { hideSpinner:
|
|
24
|
+
setup(i) {
|
|
25
|
+
let { hideSpinner: a, showSpinner: o } = s(), c = i;
|
|
26
26
|
e(() => {
|
|
27
|
-
|
|
27
|
+
o();
|
|
28
28
|
let e = document.createElement("script");
|
|
29
29
|
e.type = "text/javascript", e.src = "https://cdn.safecharge.com/safecharge_resources/v1/websdk/safecharge.js", e.onload = () => {
|
|
30
30
|
let e = new MutationObserver(function() {
|
|
31
|
-
document.getElementsByClassName("sfcModal-dialog")[0] && (
|
|
31
|
+
document.getElementsByClassName("sfcModal-dialog")[0] && (a(), e.disconnect());
|
|
32
32
|
}), t = { childList: !0 }, n = document.querySelector("body");
|
|
33
33
|
e.observe(n, t), l();
|
|
34
34
|
}, document.head.appendChild(e);
|
|
35
35
|
});
|
|
36
36
|
function l() {
|
|
37
|
-
|
|
38
|
-
env:
|
|
39
|
-
merchantId:
|
|
40
|
-
merchantSiteId:
|
|
37
|
+
let e = window.SafeCharge({
|
|
38
|
+
env: c.env,
|
|
39
|
+
merchantId: c.merchantId,
|
|
40
|
+
merchantSiteId: c.merchantSiteId
|
|
41
41
|
});
|
|
42
42
|
e.fields({
|
|
43
43
|
fonts: [{ cssUrl: "https://fonts.googleapis.com/css?family=Source+Code+Pro" }],
|
|
44
44
|
locale: "en"
|
|
45
45
|
});
|
|
46
|
-
let t =
|
|
47
|
-
userPaymentOptionId:
|
|
48
|
-
...
|
|
46
|
+
let t = c.userPaymentOptionId ? {
|
|
47
|
+
userPaymentOptionId: c.userPaymentOptionId,
|
|
48
|
+
...c.CVV ? { card: { CVV: c.CVV } } : {}
|
|
49
49
|
} : { card: {
|
|
50
|
-
cardNumber:
|
|
51
|
-
cardHolderName:
|
|
52
|
-
expirationMonth:
|
|
53
|
-
expirationYear:
|
|
54
|
-
CVV:
|
|
50
|
+
cardNumber: c.cardNumber,
|
|
51
|
+
cardHolderName: c.cardHolderName,
|
|
52
|
+
expirationMonth: c.expirationMonth,
|
|
53
|
+
expirationYear: c.expirationYear,
|
|
54
|
+
CVV: c.CVV
|
|
55
55
|
} };
|
|
56
56
|
e.authenticate3d({
|
|
57
|
-
sessionToken:
|
|
58
|
-
...
|
|
57
|
+
sessionToken: c.sessionToken,
|
|
58
|
+
...c.userTokenId ? { userTokenId: c.userTokenId } : {},
|
|
59
59
|
paymentOption: t,
|
|
60
60
|
billingAddress: {
|
|
61
|
-
firstName:
|
|
62
|
-
lastName:
|
|
63
|
-
email:
|
|
64
|
-
country:
|
|
61
|
+
firstName: c.firstName,
|
|
62
|
+
lastName: c.lastName,
|
|
63
|
+
email: c.email,
|
|
64
|
+
country: c.country
|
|
65
65
|
}
|
|
66
66
|
}, function(e) {
|
|
67
67
|
window.postMessage({
|
|
@@ -70,9 +70,9 @@ var u = { class: "mask" }, d = /*#__PURE__*/ r(/* @__PURE__ */ n({
|
|
|
70
70
|
}, "*");
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
return (e,
|
|
73
|
+
return (e, i) => (t(), r("div", u, [...i[0] ||= [n("div", { class: "wrapper" }, [n("div", { class: "container" })], -1)]]));
|
|
74
74
|
}
|
|
75
|
-
}), [["__scopeId", "data-v-
|
|
75
|
+
}), [["__scopeId", "data-v-299db412"]]), { hideSpinner: f } = s(), p = class extends l {
|
|
76
76
|
_paResPayload = null;
|
|
77
77
|
getType() {
|
|
78
78
|
return "Nuvei";
|
|
@@ -90,7 +90,7 @@ var u = { class: "mask" }, d = /*#__PURE__*/ r(/* @__PURE__ */ n({
|
|
|
90
90
|
doNuveiChallenge(e, t, n) {
|
|
91
91
|
let r = JSON.parse(e);
|
|
92
92
|
if (r === null || !r.merchantId || !r.merchantSiteId) {
|
|
93
|
-
this.threeDsProcessor?.onError({ error:
|
|
93
|
+
this.threeDsProcessor?.onError({ error: i });
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
if (this.threeDsProcessor?.getTokenId() && !r?.userPaymentOptionId) {
|
|
@@ -98,7 +98,7 @@ var u = { class: "mask" }, d = /*#__PURE__*/ r(/* @__PURE__ */ n({
|
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
100
|
t && (r.firstName = t.firstName, r.lastName = t.lastName, r.email = t.email, r.country = t.country), n && (r.cardNumber = n.cardNumber, r.cardHolderName = n.cardholder || "", r.expirationMonth = n.expiryDate.substring(2, 4), r.expirationYear = n.expiryDate.substring(0, 2), r.CVV = n.ccv), this.setChallengeFrameVisible(!0);
|
|
101
|
-
let { destroy: o } =
|
|
101
|
+
let { destroy: o } = a({
|
|
102
102
|
el: document.body,
|
|
103
103
|
component: d,
|
|
104
104
|
props: r,
|
|
@@ -111,7 +111,7 @@ var u = { class: "mask" }, d = /*#__PURE__*/ r(/* @__PURE__ */ n({
|
|
|
111
111
|
onSuccess = (e, t) => {
|
|
112
112
|
this.closeChallenge(), f();
|
|
113
113
|
let n = JSON.parse(t);
|
|
114
|
-
n.authenticationValue ? this.threeDsProcessor?.onSuccess(n) : (this.log(`[${this.getType()}][_onSuccess] ${
|
|
114
|
+
n.authenticationValue ? this.threeDsProcessor?.onSuccess(n) : (this.log(`[${this.getType()}][_onSuccess] ${i}`, n), this.threeDsProcessor?.onError({ error: i }));
|
|
115
115
|
};
|
|
116
116
|
onDoAuthSuccess = (e, t) => {
|
|
117
117
|
let n = JSON.parse(t);
|