@payfurl/react-plugin 1.0.11 → 1.2.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/dist/{CxPayThreeDsProvider-DHyY0SJN-mkHWDkHg.js → CxPayThreeDsProvider-BLfTGjPF-kfggfjdU.js} +1 -1
- package/dist/{DefaultThreeDsProvider-BbyoW5gI-Bm2Tl1xC.js → DefaultThreeDsProvider-ByqIuIMb-DCABeZFY.js} +33 -33
- package/dist/{EcentricThreeDsProvider-CJkAKhCm-4a0z3e8l.js → EcentricThreeDsProvider-C0fijqNm-J1HqpcUG.js} +32 -32
- package/dist/{EpnaThreeDsProvider-CbuCAz8E-8AT3NiUZ.js → EpnaThreeDsProvider-BKcMV0Ni-C8jATWyJ.js} +1 -1
- package/dist/{FlashBancThreeDsProvider-yEpICp2s-B-fAmFIe.js → FlashBancThreeDsProvider-BL79DnxY-CKAnpF83.js} +1 -1
- package/dist/{GPaymentsThreeDsProvider-ZzFlXQYx-DxEfT4MU.js → GPaymentsThreeDsProvider-DK7o9MEd-CotMfLS4.js} +23 -22
- package/dist/{MetricsGlobalThreeDsProvider-COVvDD_A-BpwZGUJd.js → MetricsGlobalThreeDsProvider-DCFNNBAG-DWwOWfRj.js} +33 -33
- package/dist/{NmiThreeDsProvider-CyQ9ToCv-C5qjGxEE.js → NmiThreeDsProvider-CjG8JCAW-SClrMiRm.js} +1 -1
- package/dist/{NuveiThreeDsProvider-wpWbdDVQ-Df-izyuz.js → NuveiThreeDsProvider-C511D4Vv-CI0PLP-t.js} +6 -6
- package/dist/{PayGLocalThreeDsProvider-piT2VTln-BSZsat2V.js → PayGLocalThreeDsProvider-Isk8RrpT-Du6bWeJa.js} +31 -31
- package/dist/{PayWayAppleButton-lOpUyVhK-C3sG34i0.js → PayWayAppleButton-CP2C2UFi-CE7cLGod.js} +1 -1
- package/dist/{PayabliThreeDsProvider-chEmLOO6-DsAXAJs1.js → PayabliThreeDsProvider-D04tIaoI-C9P-h4fx.js} +1 -1
- package/dist/{SkyBankThreeDsProvider-B1KB-MBu-BvB-_qyj.js → SkyBankThreeDsProvider-CI5tCFi6-Bc7KqUKb.js} +1 -1
- package/dist/{cxpay-CkpinAwr-ChgTpH3-.js → cxpay-CXd-gWgJ-o6fIVfHa.js} +1 -1
- package/dist/{default-CCjRF2gJ-CD4CwffS.js → default-Bn_jZqbH-Bl2uje9s.js} +1 -1
- package/dist/{ecentric-C7aOx_5y-CEzn5wge.js → ecentric-BUuKlIAj-DtLsDgEq.js} +1 -1
- package/dist/{epna-C3FB2xZQ-DH6OQlXc.js → epna-DquO2ajM-D6mOIN8h.js} +1 -1
- package/dist/{flashbanc-tBq9tJrU-YpLBHiBR.js → flashbanc-C4qF4wum-YDAB9IfO.js} +1 -1
- package/dist/{gpayments-utHsl2Sf-CVGRwoei.js → gpayments-B99Rhx-h-CQnyzSas.js} +1 -1
- package/dist/{index-BK7gCCkz.js → index-BmYcZJxX.js} +6257 -5865
- package/dist/{metrics_global-CP2_hsNY-PAbKkq2a.js → metrics_global-BhM_CqUq-uWSbroEt.js} +1 -1
- package/dist/nmi-B31Ng1Zj-CtTrEAj2.js +7 -0
- package/dist/{nuvei-DFcv1FC6-Do0hVbvU.js → nuvei-C_wJxvcg-9I4of95a.js} +1 -1
- package/dist/{payabli-C_GFUDE_-B3AKtHbR.js → payabli-DEjkMyU_-CjTbSafb.js} +1 -1
- package/dist/payfurl-react.es.js +1 -1
- package/dist/payfurl-react.umd.js +29 -29
- package/dist/{payglocal-CfnXIS4O-DFlDGlnE.js → payglocal-DrWsvnYA-WB4rb0ul.js} +1 -1
- package/dist/{payway_rest-Bl-RqdsM-DtXvxCWL.js → payway_rest-gds3Rn3R-B9t3rfRC.js} +1 -1
- package/dist/{skybank-ChiLuKWf-CtXaMyvJ.js → skybank-Cr24BYBd-BmDAIEtF.js} +1 -1
- package/package.json +2 -2
- package/dist/nmi-Crex5ZZF-Cq6YYDcI.js +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var
|
|
3
|
-
const
|
|
1
|
+
import { K as d, P as S, u as g, J as p, F as m, O as T, e as v, a as I, b as u, c as f, D as y, I as A, i as C, j as R, Y as E } from "./index-BmYcZJxX.js";
|
|
2
|
+
var P = Object.defineProperty, b = (l, e, s) => e in l ? P(l, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : l[e] = s, a = (l, e, s) => b(l, typeof e != "symbol" ? e + "" : e, s);
|
|
3
|
+
const U = { class: "mask" }, L = { class: "wrapper" }, M = { class: "container" }, $ = ["action"], _ = ["value"], w = /* @__PURE__ */ m({
|
|
4
4
|
__name: "ThreeDsChallenge",
|
|
5
5
|
props: {
|
|
6
6
|
threeDSServerTransID: {},
|
|
@@ -9,43 +9,43 @@ const P = { class: "mask" }, U = { class: "wrapper" }, b = { class: "container"
|
|
|
9
9
|
},
|
|
10
10
|
emits: ["close", "submit"],
|
|
11
11
|
setup(l, { emit: e }) {
|
|
12
|
-
const s = l, n = e, o = T(
|
|
12
|
+
const s = l, n = e, o = T(() => R(s.formAction) ? s.formAction : ""), i = C(null), r = JSON.stringify({
|
|
13
13
|
threeDSServerTransID: s.threeDSServerTransID,
|
|
14
14
|
acsTransID: s.acsTransID,
|
|
15
15
|
messageVersion: "2.2.0",
|
|
16
16
|
messageType: "CReq",
|
|
17
17
|
challengeWindowSize: "01"
|
|
18
|
-
}),
|
|
19
|
-
return
|
|
20
|
-
var
|
|
21
|
-
(
|
|
22
|
-
}), (
|
|
23
|
-
u("div",
|
|
24
|
-
u("div",
|
|
25
|
-
|
|
26
|
-
onClick:
|
|
18
|
+
}), t = encodeURI(window.btoa(r).replace(/=*$/, ""));
|
|
19
|
+
return v(() => {
|
|
20
|
+
var h;
|
|
21
|
+
o.value && ((h = i.value) == null || h.submit());
|
|
22
|
+
}), (h, c) => (E(), I("div", U, [
|
|
23
|
+
u("div", L, [
|
|
24
|
+
u("div", M, [
|
|
25
|
+
f(y, {
|
|
26
|
+
onClick: c[0] || (c[0] = (F) => n("close")),
|
|
27
27
|
id: "3ds-challenge-close"
|
|
28
28
|
}),
|
|
29
|
-
|
|
29
|
+
c[1] || (c[1] = u("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
|
|
30
30
|
u("form", {
|
|
31
|
-
action:
|
|
31
|
+
action: o.value,
|
|
32
32
|
target: "ThreeDsChallengeIFrame",
|
|
33
33
|
method: "post",
|
|
34
34
|
ref_key: "form",
|
|
35
|
-
ref:
|
|
35
|
+
ref: i
|
|
36
36
|
}, [
|
|
37
37
|
u("input", {
|
|
38
38
|
type: "hidden",
|
|
39
39
|
name: "creq",
|
|
40
|
-
value: A(
|
|
41
|
-
}, null, 8,
|
|
42
|
-
], 8,
|
|
40
|
+
value: A(t)
|
|
41
|
+
}, null, 8, _)
|
|
42
|
+
], 8, $)
|
|
43
43
|
])
|
|
44
44
|
])
|
|
45
45
|
]));
|
|
46
46
|
}
|
|
47
|
-
}),
|
|
48
|
-
class
|
|
47
|
+
}), O = /* @__PURE__ */ p(w, [["__scopeId", "data-v-07081e85"]]);
|
|
48
|
+
class k {
|
|
49
49
|
constructor() {
|
|
50
50
|
a(this, "iframeId", "threeDsIframeMethod"), a(this, "containerId", "payfurlContainerFormInvoker"), a(this, "iframe", null), a(this, "container", null);
|
|
51
51
|
}
|
|
@@ -64,8 +64,8 @@ class w {
|
|
|
64
64
|
t.submit();
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
const { hideSpinner: D, showSpinner:
|
|
68
|
-
class
|
|
67
|
+
const { hideSpinner: D, showSpinner: N } = g(), q = "3ds_method_invocation_complete", V = "3ds_challenge_complete";
|
|
68
|
+
class J {
|
|
69
69
|
constructor(e, s, n) {
|
|
70
70
|
a(this, "log"), a(this, "container"), a(this, "options"), a(this, "threeDsProcessor", null), a(this, "threeDSDestroy", () => {
|
|
71
71
|
}), a(this, "threeDSServerTransID", ""), a(this, "threeDSAuthURL", ""), a(this, "threeDSRequestorTransID", ""), a(this, "threeDSMonitorURL", ""), a(this, "internalMessageHandler", this.messageHandler.bind(this)), a(this, "onError", (o, i) => {
|
|
@@ -141,7 +141,7 @@ class q {
|
|
|
141
141
|
return "";
|
|
142
142
|
}
|
|
143
143
|
onPreAuth() {
|
|
144
|
-
this.log(`[${this.getType()}][onPreAuth]`), this.threeDsProcessor && (
|
|
144
|
+
this.log(`[${this.getType()}][onPreAuth]`), this.threeDsProcessor && (N(), this.threeDsProcessor.onPreAuth(this.onInitAuthSuccess, this.onError), window.addEventListener("message", this.internalMessageHandler));
|
|
145
145
|
}
|
|
146
146
|
onAuth(e, s) {
|
|
147
147
|
var n;
|
|
@@ -165,12 +165,12 @@ class q {
|
|
|
165
165
|
}
|
|
166
166
|
messageHandler(e) {
|
|
167
167
|
var s, n;
|
|
168
|
-
if (!(!((s = e == null ? void 0 : e.data) != null && s.status) || ((n = e == null ? void 0 : e.data) == null ? void 0 : n.status) ===
|
|
169
|
-
if (e.data.status ===
|
|
168
|
+
if (!(!((s = e == null ? void 0 : e.data) != null && s.status) || ((n = e == null ? void 0 : e.data) == null ? void 0 : n.status) === d)) {
|
|
169
|
+
if (e.data.status === q) {
|
|
170
170
|
e.stopPropagation(), this.invocationComplete(e);
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
|
-
e.data.status ===
|
|
173
|
+
e.data.status === V && (e.stopPropagation(), this.challengeComplete(e));
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
invocationComplete(e) {
|
|
@@ -183,9 +183,9 @@ class q {
|
|
|
183
183
|
}
|
|
184
184
|
doChallenge(e, s, n) {
|
|
185
185
|
this.log(`[${this.getType()}][doChallenge]`), D();
|
|
186
|
-
const { destroy: o } =
|
|
186
|
+
const { destroy: o } = S({
|
|
187
187
|
el: document.body,
|
|
188
|
-
component:
|
|
188
|
+
component: O,
|
|
189
189
|
props: {
|
|
190
190
|
threeDSServerTransID: this.threeDSServerTransID,
|
|
191
191
|
acsTransID: s,
|
|
@@ -212,13 +212,13 @@ class q {
|
|
|
212
212
|
threeDSServerTransID: e,
|
|
213
213
|
threeDSMethodNotificationURL: this.options.apiUrl + "/3ds/method_invocation"
|
|
214
214
|
}, o = encodeURI(window.btoa(JSON.stringify(n)).replace(/=*$/, ""));
|
|
215
|
-
new
|
|
215
|
+
new k().invoke(s, "POST", {
|
|
216
216
|
threeDSMethodData: o
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
export {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
J as DefaultThreeDsProvider,
|
|
222
|
+
V as THREE_DS_CHALLENGE_COMPLETE,
|
|
223
|
+
q as THREE_DS_METHOD_INVOCATION_COMPLETE
|
|
224
224
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DefaultThreeDsProvider as
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
4
|
-
const
|
|
1
|
+
import { DefaultThreeDsProvider as i } from "./DefaultThreeDsProvider-ByqIuIMb-DCABeZFY.js";
|
|
2
|
+
import { P as h, J as c, F as u, O as D, e as d, Y as p, a as m, b as s, c as v, D as g, I as S, i as T, j as y } from "./index-BmYcZJxX.js";
|
|
3
|
+
var P = Object.defineProperty, f = (a, e, t) => e in a ? P(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, I = (a, e, t) => f(a, e + "", t);
|
|
4
|
+
const C = { class: "mask" }, A = { class: "wrapper" }, F = { class: "container" }, b = ["action"], E = ["value"], R = /* @__PURE__ */ u({
|
|
5
5
|
__name: "ecentric",
|
|
6
6
|
props: {
|
|
7
7
|
threeDSServerTransID: {},
|
|
@@ -9,39 +9,39 @@ const P = { class: "mask" }, f = { class: "wrapper" }, I = { class: "container"
|
|
|
9
9
|
formAction: {},
|
|
10
10
|
authenticationValue: {}
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const e =
|
|
12
|
+
setup(a) {
|
|
13
|
+
const e = a, t = D(() => y(e.formAction) ? e.formAction : ""), o = T(null), n = e.authenticationValue;
|
|
14
14
|
return d(() => {
|
|
15
|
-
var
|
|
16
|
-
(
|
|
17
|
-
}), (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
onClick:
|
|
15
|
+
var r;
|
|
16
|
+
t.value && ((r = o.value) == null || r.submit());
|
|
17
|
+
}), (r, l) => (p(), m("div", C, [
|
|
18
|
+
s("div", A, [
|
|
19
|
+
s("div", F, [
|
|
20
|
+
v(g, {
|
|
21
|
+
onClick: l[0] || (l[0] = ($) => r.emit("close"))
|
|
22
22
|
}),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
action:
|
|
23
|
+
l[1] || (l[1] = s("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
|
|
24
|
+
s("form", {
|
|
25
|
+
action: t.value,
|
|
26
26
|
target: "ThreeDsChallengeIFrame",
|
|
27
27
|
method: "post",
|
|
28
28
|
ref_key: "form",
|
|
29
|
-
ref:
|
|
29
|
+
ref: o
|
|
30
30
|
}, [
|
|
31
|
-
|
|
31
|
+
s("input", {
|
|
32
32
|
type: "hidden",
|
|
33
33
|
name: "PaReq",
|
|
34
|
-
value:
|
|
35
|
-
}, null, 8,
|
|
36
|
-
], 8,
|
|
34
|
+
value: S(n)
|
|
35
|
+
}, null, 8, E)
|
|
36
|
+
], 8, b)
|
|
37
37
|
])
|
|
38
38
|
])
|
|
39
39
|
]));
|
|
40
40
|
}
|
|
41
|
-
}), V = /* @__PURE__ */
|
|
42
|
-
class
|
|
41
|
+
}), V = /* @__PURE__ */ c(R, [["__scopeId", "data-v-d0f7984c"]]);
|
|
42
|
+
class j extends i {
|
|
43
43
|
constructor() {
|
|
44
|
-
super(...arguments),
|
|
44
|
+
super(...arguments), I(this, "paResPayload", "");
|
|
45
45
|
}
|
|
46
46
|
getType() {
|
|
47
47
|
return "Ecentric";
|
|
@@ -56,31 +56,31 @@ class R extends l {
|
|
|
56
56
|
authenticationValue: this.paResPayload
|
|
57
57
|
}, this.onSuccess, this.onError);
|
|
58
58
|
}
|
|
59
|
-
doChallenge(e, t,
|
|
59
|
+
doChallenge(e, t, o) {
|
|
60
60
|
this.log(`[${this.getType()}][doChallenge]`);
|
|
61
|
-
const { destroy:
|
|
61
|
+
const { destroy: n } = h({
|
|
62
62
|
el: document.body,
|
|
63
63
|
component: V,
|
|
64
64
|
props: {
|
|
65
65
|
threeDSServerTransID: this.threeDSServerTransID,
|
|
66
66
|
acsTransID: t,
|
|
67
67
|
formAction: e,
|
|
68
|
-
authenticationValue:
|
|
68
|
+
authenticationValue: o
|
|
69
69
|
},
|
|
70
70
|
on: {
|
|
71
71
|
close: () => {
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
}, (
|
|
72
|
+
var r;
|
|
73
|
+
n(), this.threeDSDestroy = () => {
|
|
74
|
+
}, (r = this.threeDsProcessor) == null || r.onError({ error: "Challenge cancelled" });
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
-
this.threeDSDestroy =
|
|
78
|
+
this.threeDSDestroy = n;
|
|
79
79
|
}
|
|
80
80
|
challengeComplete(e) {
|
|
81
81
|
this.log(`[${this.getType()}]: 3Ds Challenge complete`, e.data), this.closeChallenge(), this.log(`[${this.getType()}]: cresData`, e.data.cres), e.data.cres ? (this.paResPayload = e.data.cres, this.onPostAuth()) : (this.log(`[${this.getType()}]: Failed 3DS Challenge`, e.data), this.onError(400, "Failed 3DS Challenge"));
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
export {
|
|
85
|
-
|
|
85
|
+
j as EcentricThreeDsProvider
|
|
86
86
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DefaultThreeDsProvider as
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
4
|
-
const
|
|
1
|
+
import { DefaultThreeDsProvider as o } from "./DefaultThreeDsProvider-ByqIuIMb-DCABeZFY.js";
|
|
2
|
+
import { P as l, j as n, J as u, F as c, O as p, Y as d, a as g, b as a, C as h } from "./index-BmYcZJxX.js";
|
|
3
|
+
var D = Object.defineProperty, S = (r, e, t) => e in r ? D(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, i = (r, e, t) => S(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
const m = { class: "mask" }, y = { class: "wrapper" }, f = ["src"], v = /* @__PURE__ */ c({
|
|
5
5
|
__name: "GPayments",
|
|
6
6
|
props: {
|
|
7
7
|
url: {},
|
|
@@ -9,31 +9,31 @@ const S = { class: "mask" }, D = { class: "wrapper" }, m = ["src"], y = /* @__PU
|
|
|
9
9
|
height: {}
|
|
10
10
|
},
|
|
11
11
|
setup(r) {
|
|
12
|
-
const e = r;
|
|
13
|
-
function
|
|
12
|
+
const e = r, t = p(() => n(e.url) ? e.url : "");
|
|
13
|
+
function s() {
|
|
14
14
|
return {
|
|
15
15
|
width: `${e.width || 650}px`,
|
|
16
16
|
height: `${e.height || 400}px`
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
return (
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
return (T, b) => (d(), g("div", m, [
|
|
20
|
+
a("div", y, [
|
|
21
|
+
a("div", {
|
|
22
22
|
class: "container",
|
|
23
|
-
style:
|
|
23
|
+
style: h([s(), { padding: "0", margin: "0" }])
|
|
24
24
|
}, [
|
|
25
|
-
|
|
26
|
-
src:
|
|
27
|
-
style:
|
|
28
|
-
}, null, 12,
|
|
25
|
+
a("iframe", {
|
|
26
|
+
src: t.value,
|
|
27
|
+
style: h(s())
|
|
28
|
+
}, null, 12, f)
|
|
29
29
|
], 4)
|
|
30
30
|
])
|
|
31
31
|
]));
|
|
32
32
|
}
|
|
33
|
-
}),
|
|
34
|
-
class
|
|
33
|
+
}), C = /* @__PURE__ */ u(v, [["__scopeId", "data-v-cf5aa816"]]);
|
|
34
|
+
class P extends o {
|
|
35
35
|
constructor() {
|
|
36
|
-
super(...arguments),
|
|
36
|
+
super(...arguments), i(this, "onDoAuthSuccess", (e, t) => {
|
|
37
37
|
const s = JSON.parse(t);
|
|
38
38
|
if (this.log(`[${this.getType()}][onDoAuthSuccess]`, s), !s.transStatus) {
|
|
39
39
|
this.onError(e, "No transStatus specified");
|
|
@@ -51,7 +51,7 @@ class T extends n {
|
|
|
51
51
|
this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ${s.transStatus}`), this.onPostAuth();
|
|
52
52
|
break;
|
|
53
53
|
}
|
|
54
|
-
}),
|
|
54
|
+
}), i(this, "onInitAuthSuccess", (e, t) => {
|
|
55
55
|
const s = JSON.parse(t);
|
|
56
56
|
if (this.log(`[${this.getType()}][onInitAuthSuccess]`, s), !s.threeDSAuthURL) {
|
|
57
57
|
this.onError(e, "No AuthUrl specified");
|
|
@@ -69,9 +69,9 @@ class T extends n {
|
|
|
69
69
|
}
|
|
70
70
|
doChallenge(e) {
|
|
71
71
|
this.log(`[${this.getType()}][doChallenge]`);
|
|
72
|
-
const { destroy: t } =
|
|
72
|
+
const { destroy: t } = l({
|
|
73
73
|
el: document.body,
|
|
74
|
-
component:
|
|
74
|
+
component: C,
|
|
75
75
|
props: {
|
|
76
76
|
url: e,
|
|
77
77
|
width: 390,
|
|
@@ -90,11 +90,12 @@ class T extends n {
|
|
|
90
90
|
this.log(`[${this.getType()}]: 3Ds Challenge complete`, e.data), this.closeChallenge(), this.onPostAuth();
|
|
91
91
|
}
|
|
92
92
|
initFrame(e) {
|
|
93
|
-
this.log(`[${this.getType()}][init3DSFrame]`, e)
|
|
93
|
+
if (this.log(`[${this.getType()}][init3DSFrame]`, e), !n(e))
|
|
94
|
+
return;
|
|
94
95
|
const t = document.createElement("iframe");
|
|
95
96
|
t.src = e, t.style.width = "1px", t.style.height = "1px", t.style.border = "0", document.body.appendChild(t);
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
export {
|
|
99
|
-
|
|
100
|
+
P as GPaymentsThreeDsProvider
|
|
100
101
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { DefaultThreeDsProvider as w } from "./DefaultThreeDsProvider-
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
4
|
-
const
|
|
1
|
+
import { DefaultThreeDsProvider as w } from "./DefaultThreeDsProvider-ByqIuIMb-DCABeZFY.js";
|
|
2
|
+
import { v as g, P as E, u as A, J as f, F as b, e as T, h as L, S as _, g as x, Y as G, a as N, b as m, c as I, D as $, i as F } from "./index-BmYcZJxX.js";
|
|
3
|
+
var H = Object.defineProperty, O = (h, e, t) => e in h ? H(h, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[e] = t, p = (h, e, t) => O(h, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
const M = { class: "mask" }, j = { class: "wrapper" }, U = { class: "container" }, k = /* @__PURE__ */ b({
|
|
5
5
|
__name: "MetricsGlobalThreeDsChallenge",
|
|
6
6
|
emits: ["close", "submit"],
|
|
7
7
|
setup(h, { emit: e }) {
|
|
8
|
-
const t = e, r =
|
|
8
|
+
const t = e, r = F(!1);
|
|
9
9
|
function a(c) {
|
|
10
10
|
var o;
|
|
11
11
|
["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes((o = c.data) == null ? void 0 : o.message) && (r.value = c.data.message === "3DS_CHALLENGE_SHOW");
|
|
12
12
|
}
|
|
13
|
-
return
|
|
13
|
+
return T(() => {
|
|
14
14
|
window.addEventListener("message", a);
|
|
15
|
-
}),
|
|
15
|
+
}), L(() => {
|
|
16
16
|
window.removeEventListener("message", a);
|
|
17
|
-
}), (c, o) =>
|
|
17
|
+
}), (c, o) => _((G(), N("div", M, [
|
|
18
18
|
m("div", j, [
|
|
19
|
-
m("div",
|
|
20
|
-
|
|
19
|
+
m("div", U, [
|
|
20
|
+
I($, {
|
|
21
21
|
onClick: o[0] || (o[0] = (i) => t("close")),
|
|
22
22
|
id: "3ds-challenge-close"
|
|
23
23
|
}),
|
|
@@ -25,11 +25,11 @@ const U = { class: "mask" }, j = { class: "wrapper" }, F = { class: "container"
|
|
|
25
25
|
])
|
|
26
26
|
])
|
|
27
27
|
], 512)), [
|
|
28
|
-
[
|
|
28
|
+
[x, r.value]
|
|
29
29
|
]);
|
|
30
30
|
}
|
|
31
|
-
}),
|
|
32
|
-
class
|
|
31
|
+
}), R = /* @__PURE__ */ f(k, [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: d, showSpinner: W } = A(), D = 5;
|
|
32
|
+
class q extends w {
|
|
33
33
|
constructor(e, t, r) {
|
|
34
34
|
var a;
|
|
35
35
|
super(e, t, r), p(this, "gateway"), p(this, "threeDS"), p(this, "numAttempts", 0), this.initScript(((a = r.clientParameters) == null ? void 0 : a.PublicKey) || "");
|
|
@@ -69,11 +69,11 @@ class Y extends w {
|
|
|
69
69
|
d(), g(this.container, "Payment information is missing");
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
const s = (t = this.threeDsProcessor) == null ? void 0 : t.getAddressInfo(),
|
|
72
|
+
W();
|
|
73
|
+
const s = (t = this.threeDsProcessor) == null ? void 0 : t.getAddressInfo(), v = i.expiryDate.length === 4 ? i.expiryDate[2] + i.expiryDate[3] : "", y = i.expiryDate.length === 4 ? i.expiryDate[0] + i.expiryDate[1] : "", [P = "", C = ""] = ((r = i.cardholder) == null ? void 0 : r.split(/\s+/)) || [], S = {
|
|
74
74
|
cardNumber: i.cardNumber,
|
|
75
|
-
cardExpMonth:
|
|
76
|
-
cardExpYear: parseInt(
|
|
75
|
+
cardExpMonth: v,
|
|
76
|
+
cardExpYear: parseInt(y) + 2e3,
|
|
77
77
|
currency: (a = this.threeDsProcessor) == null ? void 0 : a.getCurrency(),
|
|
78
78
|
amount: (c = this.threeDsProcessor) == null ? void 0 : c.getAmount(),
|
|
79
79
|
email: (o = this.threeDsProcessor) == null ? void 0 : o.getEmail(),
|
|
@@ -82,23 +82,23 @@ class Y extends w {
|
|
|
82
82
|
state: s == null ? void 0 : s.state,
|
|
83
83
|
address1: s == null ? void 0 : s.streetAddress,
|
|
84
84
|
country: s == null ? void 0 : s.country,
|
|
85
|
-
firstName: (s == null ? void 0 : s.firstName) ||
|
|
86
|
-
lastName: (s == null ? void 0 : s.lastName) ||
|
|
85
|
+
firstName: (s == null ? void 0 : s.firstName) || P || "payFURL",
|
|
86
|
+
lastName: (s == null ? void 0 : s.lastName) || C || "payFURL",
|
|
87
87
|
postalCode: s == null ? void 0 : s.postalCode
|
|
88
88
|
}, u = this.threeDS.createUI(S);
|
|
89
|
-
u.start("#ThreeDsChallengeIFrame"), u.on("challenge", (
|
|
90
|
-
this.log(`[${this.getType()}][onChallenge]`,
|
|
91
|
-
}), u.on("complete", (
|
|
92
|
-
var
|
|
93
|
-
this.log(`[${this.getType()}][onComplete]`,
|
|
94
|
-
externalThreeDsData:
|
|
89
|
+
u.start("#ThreeDsChallengeIFrame"), u.on("challenge", (n) => {
|
|
90
|
+
this.log(`[${this.getType()}][onChallenge]`, n), d(), this.showChallenge();
|
|
91
|
+
}), u.on("complete", (n) => {
|
|
92
|
+
var l;
|
|
93
|
+
this.log(`[${this.getType()}][onComplete]`, n), this.removeChallenge(), (l = this.threeDsProcessor) == null || l.onSuccess({
|
|
94
|
+
externalThreeDsData: n
|
|
95
95
|
});
|
|
96
|
-
}), u.on("failure", (
|
|
97
|
-
var
|
|
98
|
-
this.log(`[${this.getType()}][onFailure]`,
|
|
99
|
-
}), u.on("error", (
|
|
100
|
-
var
|
|
101
|
-
this.log(`[${this.getType()}][error]`,
|
|
96
|
+
}), u.on("failure", (n) => {
|
|
97
|
+
var l;
|
|
98
|
+
this.log(`[${this.getType()}][onFailure]`, n), d(), this.closeChallenge(), (l = this.threeDsProcessor) == null || l.onError({ error: n.message });
|
|
99
|
+
}), u.on("error", (n) => {
|
|
100
|
+
var l;
|
|
101
|
+
this.log(`[${this.getType()}][error]`, n), d(), this.closeChallenge(), (l = this.threeDsProcessor) == null || l.onError({ error: n.message });
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
initScript(e) {
|
|
@@ -116,7 +116,7 @@ class Y extends w {
|
|
|
116
116
|
initChallenge() {
|
|
117
117
|
const { destroy: e } = E({
|
|
118
118
|
el: document.body,
|
|
119
|
-
component:
|
|
119
|
+
component: R,
|
|
120
120
|
on: {
|
|
121
121
|
close: () => {
|
|
122
122
|
var t;
|
|
@@ -142,5 +142,5 @@ class Y extends w {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
export {
|
|
145
|
-
|
|
145
|
+
q as MetricsGlobalThreeDsProvider
|
|
146
146
|
};
|
package/dist/{NuveiThreeDsProvider-wpWbdDVQ-Df-izyuz.js → NuveiThreeDsProvider-C511D4Vv-CI0PLP-t.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DefaultThreeDsProvider as
|
|
1
|
+
import { v as d, P as p, J as m, u as h, F as g, e as D, Y as S, a as v, b as l } from "./index-BmYcZJxX.js";
|
|
2
|
+
import { DefaultThreeDsProvider as y, THREE_DS_METHOD_INVOCATION_COMPLETE as P, THREE_DS_CHALLENGE_COMPLETE as T } from "./DefaultThreeDsProvider-ByqIuIMb-DCABeZFY.js";
|
|
3
3
|
var f = Object.defineProperty, I = (n, e, a) => e in n ? f(n, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[e] = a, c = (n, e, a) => I(n, typeof e != "symbol" ? e + "" : e, a);
|
|
4
4
|
const N = { class: "mask" }, C = /* @__PURE__ */ g({
|
|
5
5
|
__name: "nuvei",
|
|
@@ -71,18 +71,18 @@ const N = { class: "mask" }, C = /* @__PURE__ */ g({
|
|
|
71
71
|
window.postMessage({ status: "3ds_challenge_complete", cres: r }, "*");
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
return (t, r) => (
|
|
74
|
+
return (t, r) => (S(), v("div", N, [...r[0] || (r[0] = [
|
|
75
75
|
l("div", { class: "wrapper" }, [
|
|
76
76
|
l("div", { class: "container" })
|
|
77
77
|
], -1)
|
|
78
78
|
])]));
|
|
79
79
|
}
|
|
80
|
-
}), _ = /* @__PURE__ */ m(C, [["__scopeId", "data-v-6293d147"]]), { hideSpinner:
|
|
81
|
-
class A extends
|
|
80
|
+
}), _ = /* @__PURE__ */ m(C, [["__scopeId", "data-v-6293d147"]]), { hideSpinner: E } = h();
|
|
81
|
+
class A extends y {
|
|
82
82
|
constructor() {
|
|
83
83
|
super(...arguments), c(this, "_paResPayload", null), c(this, "onSuccess", (e, a) => {
|
|
84
84
|
var s, o;
|
|
85
|
-
this.closeChallenge(),
|
|
85
|
+
this.closeChallenge(), E();
|
|
86
86
|
const t = JSON.parse(a);
|
|
87
87
|
t.authenticationValue ? (s = this.threeDsProcessor) == null || s.onSuccess(t) : (this.log(`[${this.getType()}][_onSuccess] 3D Secure failed`, t), (o = this.threeDsProcessor) == null || o.onError({ error: "3D Secure failed" }));
|
|
88
88
|
}), c(this, "onDoAuthSuccess", (e, a) => {
|