@payfurl/react-plugin 1.0.9 → 1.0.11
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-C3SVxMVV-CIcyQRzl.js → CxPayThreeDsProvider-DHyY0SJN-mkHWDkHg.js} +1 -1
- package/dist/{DefaultThreeDsProvider-DSJFbhYb-BR2-2Tpy.js → DefaultThreeDsProvider-BbyoW5gI-Bm2Tl1xC.js} +32 -32
- package/dist/{EcentricThreeDsProvider-M7JlFNrQ-CfLmEg8r.js → EcentricThreeDsProvider-CJkAKhCm-4a0z3e8l.js} +11 -11
- package/dist/{EpnaThreeDsProvider-BFvrkGJv-CmgaZQ8W.js → EpnaThreeDsProvider-CbuCAz8E-8AT3NiUZ.js} +1 -1
- package/dist/{FlashBancThreeDsProvider-CqjYV8SM-D932Lamr.js → FlashBancThreeDsProvider-yEpICp2s-B-fAmFIe.js} +1 -1
- package/dist/{GPaymentsThreeDsProvider-BMCOtJAd-CNu_pC6q.js → GPaymentsThreeDsProvider-ZzFlXQYx-DxEfT4MU.js} +2 -2
- package/dist/MetricsGlobalThreeDsProvider-COVvDD_A-BpwZGUJd.js +146 -0
- package/dist/{NmiThreeDsProvider-C8Gf2tSm-CvbL47jU.js → NmiThreeDsProvider-CyQ9ToCv-C5qjGxEE.js} +1 -1
- package/dist/{NuveiThreeDsProvider-CjtjRIqU-Oq-yTie5.js → NuveiThreeDsProvider-wpWbdDVQ-Df-izyuz.js} +4 -4
- package/dist/{PayGLocalThreeDsProvider-CkBdY3-6-DFZF8Idj.js → PayGLocalThreeDsProvider-piT2VTln-BSZsat2V.js} +10 -10
- package/dist/{PayWayAppleButton-3Jcspw8r-D7c2ELHJ.js → PayWayAppleButton-lOpUyVhK-C3sG34i0.js} +1 -1
- package/dist/{PayabliThreeDsProvider-BYNvOB9r-0YMR6lF6.js → PayabliThreeDsProvider-chEmLOO6-DsAXAJs1.js} +1 -1
- package/dist/{SkyBankThreeDsProvider-D1loCi58-Dt14b0MK.js → SkyBankThreeDsProvider-B1KB-MBu-BvB-_qyj.js} +1 -1
- package/dist/{cxpay-tBsH5Qq9-CuzlflKr.js → cxpay-CkpinAwr-ChgTpH3-.js} +1 -1
- package/dist/{default-CU0qSz8c-G_XP7PEy.js → default-CCjRF2gJ-CD4CwffS.js} +1 -1
- package/dist/{ecentric-BoreYd7u-DGX96uHH.js → ecentric-C7aOx_5y-CEzn5wge.js} +1 -1
- package/dist/{epna-S8i7BPJA-DEbaBDO8.js → epna-C3FB2xZQ-DH6OQlXc.js} +1 -1
- package/dist/{flashbanc-BoYu0io2-DGjygXQV.js → flashbanc-tBq9tJrU-YpLBHiBR.js} +1 -1
- package/dist/{gpayments-BSnudVfM-D02tSdF6.js → gpayments-utHsl2Sf-CVGRwoei.js} +1 -1
- package/dist/{index-0E3VS5Zq.js → index-BK7gCCkz.js} +4909 -4836
- package/dist/{metrics_global-C-3-Z-LB-BqUmy4TP.js → metrics_global-CP2_hsNY-PAbKkq2a.js} +1 -1
- package/dist/nmi-Crex5ZZF-Cq6YYDcI.js +7 -0
- package/dist/{nuvei-rKAQzNmO-BInMw2Rr.js → nuvei-DFcv1FC6-Do0hVbvU.js} +1 -1
- package/dist/{payabli-uJdaROjR-C5Q_HZA9.js → payabli-C_GFUDE_-B3AKtHbR.js} +1 -1
- package/dist/payfurl-react.es.js +1 -1
- package/dist/payfurl-react.umd.js +24 -24
- package/dist/{payglocal-BtWr5bKE-CqLMZV2a.js → payglocal-CfnXIS4O-DFlDGlnE.js} +1 -1
- package/dist/{payway_rest-YdocXQB2-BzVB60Gl.js → payway_rest-Bl-RqdsM-DtXvxCWL.js} +1 -1
- package/dist/{skybank-B_BtMhk2-ZE-AEwAY.js → skybank-ChiLuKWf-CtXaMyvJ.js} +1 -1
- package/package.json +1 -1
- package/dist/MetricsGlobalThreeDsProvider-B9rzZcOb-BDahPAuh.js +0 -146
- package/dist/nmi-CP4vI9mH-BehvSvaB.js +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var R = Object.defineProperty, E = (l, e, s) => e in l ? R(l, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : l[e] = s,
|
|
3
|
-
const P = { class: "mask" }, U = { class: "wrapper" }, b = { class: "container" },
|
|
1
|
+
import { c as d, f as S, y as g, z as p, a as m, i as T, J as v, X as f, L as u, $ as I, m as y, O as A, Y as C } from "./index-BK7gCCkz.js";
|
|
2
|
+
var R = Object.defineProperty, E = (l, e, s) => e in l ? R(l, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : l[e] = s, a = (l, e, s) => E(l, typeof e != "symbol" ? e + "" : e, s);
|
|
3
|
+
const P = { class: "mask" }, U = { class: "wrapper" }, b = { class: "container" }, L = ["action"], $ = ["value"], M = /* @__PURE__ */ m({
|
|
4
4
|
__name: "ThreeDsChallenge",
|
|
5
5
|
props: {
|
|
6
6
|
threeDSServerTransID: {},
|
|
@@ -9,21 +9,21 @@ 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,
|
|
12
|
+
const s = l, n = e, o = T(null), i = 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
18
|
}), r = encodeURI(window.btoa(i).replace(/=*$/, ""));
|
|
19
|
-
return
|
|
19
|
+
return f(() => {
|
|
20
20
|
var t;
|
|
21
21
|
(t = o.value) == null || t.submit();
|
|
22
22
|
}), (t, h) => (C(), v("div", P, [
|
|
23
23
|
u("div", U, [
|
|
24
24
|
u("div", b, [
|
|
25
|
-
|
|
26
|
-
onClick: h[0] || (h[0] = (c) =>
|
|
25
|
+
I(y, {
|
|
26
|
+
onClick: h[0] || (h[0] = (c) => n("close")),
|
|
27
27
|
id: "3ds-challenge-close"
|
|
28
28
|
}),
|
|
29
29
|
h[1] || (h[1] = u("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
|
|
@@ -38,56 +38,56 @@ const P = { class: "mask" }, U = { class: "wrapper" }, b = { class: "container"
|
|
|
38
38
|
type: "hidden",
|
|
39
39
|
name: "creq",
|
|
40
40
|
value: A(r)
|
|
41
|
-
}, null, 8,
|
|
42
|
-
], 8,
|
|
41
|
+
}, null, 8, $)
|
|
42
|
+
], 8, L)
|
|
43
43
|
])
|
|
44
44
|
])
|
|
45
45
|
]));
|
|
46
46
|
}
|
|
47
|
-
}),
|
|
48
|
-
class
|
|
47
|
+
}), _ = /* @__PURE__ */ p(M, [["__scopeId", "data-v-ac351494"]]);
|
|
48
|
+
class w {
|
|
49
49
|
constructor() {
|
|
50
|
-
|
|
50
|
+
a(this, "iframeId", "threeDsIframeMethod"), a(this, "containerId", "payfurlContainerFormInvoker"), a(this, "iframe", null), a(this, "container", null);
|
|
51
51
|
}
|
|
52
52
|
createIFrame() {
|
|
53
53
|
this.iframe || (this.container = document.createElement("div"), this.container.id = this.containerId, document.body.appendChild(this.container), this.iframe = document.createElement("iframe"), this.iframe.name = this.iframeId, this.iframe.style.display = "none", this.container.appendChild(this.iframe));
|
|
54
54
|
}
|
|
55
|
-
invoke(e, s,
|
|
55
|
+
invoke(e, s, n, o, i) {
|
|
56
56
|
var r;
|
|
57
57
|
this.createIFrame();
|
|
58
58
|
const t = document.createElement("form");
|
|
59
59
|
t.action = e, t.target = this.iframeId, t.method = "post", (r = this.container) == null || r.appendChild(t);
|
|
60
|
-
for (let h in
|
|
60
|
+
for (let h in n) {
|
|
61
61
|
const c = document.createElement("input");
|
|
62
|
-
c.type = "hidden", c.name = h, c.value =
|
|
62
|
+
c.type = "hidden", c.name = h, c.value = n[h], t.appendChild(c);
|
|
63
63
|
}
|
|
64
64
|
t.submit();
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
const { hideSpinner: D, showSpinner: O } = d(), k = "3ds_method_invocation_complete", N = "3ds_challenge_complete";
|
|
68
68
|
class q {
|
|
69
|
-
constructor(e, s,
|
|
70
|
-
|
|
71
|
-
}),
|
|
69
|
+
constructor(e, s, n) {
|
|
70
|
+
a(this, "log"), a(this, "container"), a(this, "options"), a(this, "threeDsProcessor", null), a(this, "threeDSDestroy", () => {
|
|
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) => {
|
|
72
72
|
var r, t;
|
|
73
73
|
if (this.closeChallenge(), D(), o === 404) {
|
|
74
74
|
(r = this.threeDsProcessor) == null || r.onError({ error: "This feature is only supported by ActiveServer v1.1.2+" });
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
(t = this.threeDsProcessor) == null || t.onError({ error: "3D Secure failed", body: i });
|
|
78
|
-
}),
|
|
78
|
+
}), a(this, "onSuccess", (o, i) => {
|
|
79
79
|
var r, t;
|
|
80
80
|
this.closeChallenge(), D();
|
|
81
81
|
const h = JSON.parse(i);
|
|
82
82
|
["Y", "A"].includes(h.transStatus) ? (r = this.threeDsProcessor) == null || r.onSuccess(h) : (this.log(`[${this.getType()}]: 3D Secure failed`, h), (t = this.threeDsProcessor) == null || t.onError({ error: "3D Secure failed" }));
|
|
83
|
-
}),
|
|
83
|
+
}), a(this, "onInitAuthSuccess", (o, i) => {
|
|
84
84
|
const r = JSON.parse(i);
|
|
85
85
|
if (this.log(`[${this.getType()}][onInitAuthSuccess]`, r), this.threeDSRequestorTransID = r.threeDSRequestorTransID, this.threeDSServerTransID = r.threeDSServerTransID, this.threeDSMonitorURL = r.threeDSMonitorURL, this.threeDSAuthURL = r.threeDSAuthURL, r.threeDSMethodURL) {
|
|
86
86
|
this.threeDsMethodInvoke(r.threeDSServerTransID, r.threeDSMethodURL);
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
this.onAuth(!1, "");
|
|
90
|
-
}),
|
|
90
|
+
}), a(this, "onDoAuthSuccess", (o, i) => {
|
|
91
91
|
var r;
|
|
92
92
|
const t = JSON.parse(i);
|
|
93
93
|
if (this.log(`[${this.getType()}][onDoAuthSuccess]`, t), !t.transStatus) {
|
|
@@ -132,7 +132,7 @@ class q {
|
|
|
132
132
|
});
|
|
133
133
|
break;
|
|
134
134
|
}
|
|
135
|
-
}), this.log = e, this.container = s, this.options =
|
|
135
|
+
}), this.log = e, this.container = s, this.options = n;
|
|
136
136
|
}
|
|
137
137
|
getType() {
|
|
138
138
|
return "Default";
|
|
@@ -144,13 +144,13 @@ class q {
|
|
|
144
144
|
this.log(`[${this.getType()}][onPreAuth]`), this.threeDsProcessor && (O(), this.threeDsProcessor.onPreAuth(this.onInitAuthSuccess, this.onError), window.addEventListener("message", this.internalMessageHandler));
|
|
145
145
|
}
|
|
146
146
|
onAuth(e, s) {
|
|
147
|
-
var
|
|
147
|
+
var n;
|
|
148
148
|
this.log(`[${this.getType()}][onAuth]`, {
|
|
149
149
|
threeDSAuthURL: this.threeDSAuthURL,
|
|
150
150
|
threeDSRequestorTransID: this.threeDSRequestorTransID,
|
|
151
151
|
threeDSServerTransID: this.threeDSServerTransID,
|
|
152
152
|
isMethodPerformed: e
|
|
153
|
-
}), (
|
|
153
|
+
}), (n = this.threeDsProcessor) == null || n.onAuth(this.threeDSAuthURL, this.threeDSRequestorTransID, this.threeDSServerTransID, e, s, this.onDoAuthSuccess, this.onError);
|
|
154
154
|
}
|
|
155
155
|
onPostAuth() {
|
|
156
156
|
var e;
|
|
@@ -164,8 +164,8 @@ class q {
|
|
|
164
164
|
this.log(`[${this.getType()}][setThreeDsProcessor]`), this.threeDsProcessor = e;
|
|
165
165
|
}
|
|
166
166
|
messageHandler(e) {
|
|
167
|
-
var s,
|
|
168
|
-
if (!(!((s = e == null ? void 0 : e.data) != null && s.status) || ((
|
|
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) === S)) {
|
|
169
169
|
if (e.data.status === k) {
|
|
170
170
|
e.stopPropagation(), this.invocationComplete(e);
|
|
171
171
|
return;
|
|
@@ -181,16 +181,16 @@ class q {
|
|
|
181
181
|
const s = JSON.parse(window.atob(e.data.cres));
|
|
182
182
|
this.log(`[${this.getType()}]: cresData`, s), ["Y", "A"].includes(s.transStatus) ? this.onPostAuth() : ["N", "U", "R"].includes(s.transStatus) && (this.log(`[${this.getType()}]: Failed 3DS Challenge`, e.data), this.onError(400, "Failed 3DS Challenge"));
|
|
183
183
|
}
|
|
184
|
-
doChallenge(e, s,
|
|
184
|
+
doChallenge(e, s, n) {
|
|
185
185
|
this.log(`[${this.getType()}][doChallenge]`), D();
|
|
186
186
|
const { destroy: o } = g({
|
|
187
187
|
el: document.body,
|
|
188
|
-
component:
|
|
188
|
+
component: _,
|
|
189
189
|
props: {
|
|
190
190
|
threeDSServerTransID: this.threeDSServerTransID,
|
|
191
191
|
acsTransID: s,
|
|
192
192
|
formAction: e,
|
|
193
|
-
authenticationValue:
|
|
193
|
+
authenticationValue: n
|
|
194
194
|
},
|
|
195
195
|
on: {
|
|
196
196
|
close: () => {
|
|
@@ -208,11 +208,11 @@ class q {
|
|
|
208
208
|
}
|
|
209
209
|
threeDsMethodInvoke(e, s) {
|
|
210
210
|
this.log(`[${this.getType()}][threeDsMethodInvoke]`, { threeDSServerTransID: e, threeDSMethodURL: s });
|
|
211
|
-
const
|
|
211
|
+
const n = {
|
|
212
212
|
threeDSServerTransID: e,
|
|
213
213
|
threeDSMethodNotificationURL: this.options.apiUrl + "/3ds/method_invocation"
|
|
214
|
-
}, o = encodeURI(window.btoa(JSON.stringify(
|
|
215
|
-
new
|
|
214
|
+
}, o = encodeURI(window.btoa(JSON.stringify(n)).replace(/=*$/, ""));
|
|
215
|
+
new w().invoke(s, "POST", {
|
|
216
216
|
threeDSMethodData: o
|
|
217
217
|
});
|
|
218
218
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DefaultThreeDsProvider as l } from "./DefaultThreeDsProvider-
|
|
2
|
-
import { y as i,
|
|
1
|
+
import { DefaultThreeDsProvider as l } from "./DefaultThreeDsProvider-BbyoW5gI-Bm2Tl1xC.js";
|
|
2
|
+
import { y as i, z as h, a as c, i as u, J as D, X as d, Y as p, L as o, $ as m, m as g, O as v } from "./index-BK7gCCkz.js";
|
|
3
3
|
var y = Object.defineProperty, S = (r, e, t) => e in r ? y(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, T = (r, e, t) => S(r, e + "", t);
|
|
4
4
|
const P = { class: "mask" }, f = { class: "wrapper" }, I = { class: "container" }, C = ["action"], A = ["value"], $ = /* @__PURE__ */ c({
|
|
5
5
|
__name: "ecentric",
|
|
@@ -10,28 +10,28 @@ const P = { class: "mask" }, f = { class: "wrapper" }, I = { class: "container"
|
|
|
10
10
|
authenticationValue: {}
|
|
11
11
|
},
|
|
12
12
|
setup(r) {
|
|
13
|
-
const e = r, t = u(null),
|
|
13
|
+
const e = r, t = u(null), n = e.authenticationValue;
|
|
14
14
|
return d(() => {
|
|
15
15
|
var a;
|
|
16
16
|
(a = t.value) == null || a.submit();
|
|
17
17
|
}), (a, s) => (p(), D("div", P, [
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
o("div", f, [
|
|
19
|
+
o("div", I, [
|
|
20
20
|
m(g, {
|
|
21
21
|
onClick: s[0] || (s[0] = (b) => a.emit("close"))
|
|
22
22
|
}),
|
|
23
|
-
s[1] || (s[1] =
|
|
24
|
-
|
|
23
|
+
s[1] || (s[1] = o("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
|
|
24
|
+
o("form", {
|
|
25
25
|
action: e.formAction,
|
|
26
26
|
target: "ThreeDsChallengeIFrame",
|
|
27
27
|
method: "post",
|
|
28
28
|
ref_key: "form",
|
|
29
29
|
ref: t
|
|
30
30
|
}, [
|
|
31
|
-
|
|
31
|
+
o("input", {
|
|
32
32
|
type: "hidden",
|
|
33
33
|
name: "PaReq",
|
|
34
|
-
value: v(
|
|
34
|
+
value: v(n)
|
|
35
35
|
}, null, 8, A)
|
|
36
36
|
], 8, C)
|
|
37
37
|
])
|
|
@@ -56,7 +56,7 @@ 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, n) {
|
|
60
60
|
this.log(`[${this.getType()}][doChallenge]`);
|
|
61
61
|
const { destroy: a } = i({
|
|
62
62
|
el: document.body,
|
|
@@ -65,7 +65,7 @@ class R extends l {
|
|
|
65
65
|
threeDSServerTransID: this.threeDSServerTransID,
|
|
66
66
|
acsTransID: t,
|
|
67
67
|
formAction: e,
|
|
68
|
-
authenticationValue:
|
|
68
|
+
authenticationValue: n
|
|
69
69
|
},
|
|
70
70
|
on: {
|
|
71
71
|
close: () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DefaultThreeDsProvider as n } from "./DefaultThreeDsProvider-
|
|
2
|
-
import { y as o,
|
|
1
|
+
import { DefaultThreeDsProvider as n } from "./DefaultThreeDsProvider-BbyoW5gI-Bm2Tl1xC.js";
|
|
2
|
+
import { y as o, z as l, a as u, J as c, Y as p, L as h, C as i } from "./index-BK7gCCkz.js";
|
|
3
3
|
var d = Object.defineProperty, g = (r, e, t) => e in r ? d(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, a = (r, e, t) => g(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
const S = { class: "mask" }, D = { class: "wrapper" }, m = ["src"], y = /* @__PURE__ */ u({
|
|
5
5
|
__name: "GPayments",
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { DefaultThreeDsProvider as w } from "./DefaultThreeDsProvider-BbyoW5gI-Bm2Tl1xC.js";
|
|
2
|
+
import { c as A, b as g, y as E, z as b, a as f, i as T, A as L, X as _, e as x, l as G, Y as N, J as I, L as m, $, m as H } from "./index-BK7gCCkz.js";
|
|
3
|
+
var O = Object.defineProperty, M = (h, e, t) => e in h ? O(h, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[e] = t, p = (h, e, t) => M(h, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
const U = { class: "mask" }, j = { class: "wrapper" }, F = { class: "container" }, k = /* @__PURE__ */ f({
|
|
5
|
+
__name: "MetricsGlobalThreeDsChallenge",
|
|
6
|
+
emits: ["close", "submit"],
|
|
7
|
+
setup(h, { emit: e }) {
|
|
8
|
+
const t = e, r = T(!1);
|
|
9
|
+
function a(c) {
|
|
10
|
+
var o;
|
|
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
|
+
}
|
|
13
|
+
return _(() => {
|
|
14
|
+
window.addEventListener("message", a);
|
|
15
|
+
}), x(() => {
|
|
16
|
+
window.removeEventListener("message", a);
|
|
17
|
+
}), (c, o) => L((N(), I("div", U, [
|
|
18
|
+
m("div", j, [
|
|
19
|
+
m("div", F, [
|
|
20
|
+
$(H, {
|
|
21
|
+
onClick: o[0] || (o[0] = (i) => t("close")),
|
|
22
|
+
id: "3ds-challenge-close"
|
|
23
|
+
}),
|
|
24
|
+
o[1] || (o[1] = m("div", { id: "ThreeDsChallengeIFrame" }, null, -1))
|
|
25
|
+
])
|
|
26
|
+
])
|
|
27
|
+
], 512)), [
|
|
28
|
+
[G, r.value]
|
|
29
|
+
]);
|
|
30
|
+
}
|
|
31
|
+
}), W = /* @__PURE__ */ b(k, [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: d, showSpinner: R } = A(), D = 5;
|
|
32
|
+
class Y extends w {
|
|
33
|
+
constructor(e, t, r) {
|
|
34
|
+
var a;
|
|
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) || "");
|
|
36
|
+
}
|
|
37
|
+
getType() {
|
|
38
|
+
return "MetricsGlobal";
|
|
39
|
+
}
|
|
40
|
+
getDomain() {
|
|
41
|
+
return "secure.metricsglobalgateway.com";
|
|
42
|
+
}
|
|
43
|
+
onPreAuth() {
|
|
44
|
+
var e, t;
|
|
45
|
+
if (this.log(`[${this.getType()}]: onPreAuth`), !this.threeDS && this.numAttempts >= D) {
|
|
46
|
+
d(), g(this.container, "Error loading 3D Secure");
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (!this.threeDS && this.numAttempts < D) {
|
|
50
|
+
this.numAttempts++, this.log(`[${this.getType()}]: 3DS not ready, retrying in 1s`), setTimeout(() => this.onPreAuth(), 1e3);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
(e = this.threeDsProcessor) != null && e.getTokenId() ? (t = this.threeDsProcessor) == null || t.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (r) => {
|
|
54
|
+
var a;
|
|
55
|
+
(a = this.threeDsProcessor) == null || a.setPaymentInfo(r), this.startAuth();
|
|
56
|
+
}, () => {
|
|
57
|
+
g(this.container, "Unable to get card information");
|
|
58
|
+
}) : this.startAuth();
|
|
59
|
+
}
|
|
60
|
+
onAuth(e, t) {
|
|
61
|
+
}
|
|
62
|
+
onPostAuth() {
|
|
63
|
+
}
|
|
64
|
+
startAuth() {
|
|
65
|
+
var e, t, r, a, c, o;
|
|
66
|
+
this.log(`[${this.getType()}]: startAuth`);
|
|
67
|
+
const i = (e = this.threeDsProcessor) == null ? void 0 : e.getPaymentInfo();
|
|
68
|
+
if (!i) {
|
|
69
|
+
d(), g(this.container, "Payment information is missing");
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
R();
|
|
73
|
+
const s = (t = this.threeDsProcessor) == null ? void 0 : t.getAddressInfo(), y = i.expiryDate.length === 4 ? i.expiryDate[2] + i.expiryDate[3] : "", v = i.expiryDate.length === 4 ? i.expiryDate[0] + i.expiryDate[1] : "", [C = "", P = ""] = ((r = i.cardholder) == null ? void 0 : r.split(/\s+/)) || [], S = {
|
|
74
|
+
cardNumber: i.cardNumber,
|
|
75
|
+
cardExpMonth: y,
|
|
76
|
+
cardExpYear: parseInt(v) + 2e3,
|
|
77
|
+
currency: (a = this.threeDsProcessor) == null ? void 0 : a.getCurrency(),
|
|
78
|
+
amount: (c = this.threeDsProcessor) == null ? void 0 : c.getAmount(),
|
|
79
|
+
email: (o = this.threeDsProcessor) == null ? void 0 : o.getEmail(),
|
|
80
|
+
phone: s == null ? void 0 : s.phoneNumber,
|
|
81
|
+
city: s == null ? void 0 : s.city,
|
|
82
|
+
state: s == null ? void 0 : s.state,
|
|
83
|
+
address1: s == null ? void 0 : s.streetAddress,
|
|
84
|
+
country: s == null ? void 0 : s.country,
|
|
85
|
+
firstName: (s == null ? void 0 : s.firstName) || C || "payFURL",
|
|
86
|
+
lastName: (s == null ? void 0 : s.lastName) || P || "payFURL",
|
|
87
|
+
postalCode: s == null ? void 0 : s.postalCode
|
|
88
|
+
}, u = this.threeDS.createUI(S);
|
|
89
|
+
u.start("#ThreeDsChallengeIFrame"), u.on("challenge", (l) => {
|
|
90
|
+
this.log(`[${this.getType()}][onChallenge]`, l), d(), this.showChallenge();
|
|
91
|
+
}), u.on("complete", (l) => {
|
|
92
|
+
var n;
|
|
93
|
+
this.log(`[${this.getType()}][onComplete]`, l), this.removeChallenge(), (n = this.threeDsProcessor) == null || n.onSuccess({
|
|
94
|
+
externalThreeDsData: l
|
|
95
|
+
});
|
|
96
|
+
}), u.on("failure", (l) => {
|
|
97
|
+
var n;
|
|
98
|
+
this.log(`[${this.getType()}][onFailure]`, l), d(), this.closeChallenge(), (n = this.threeDsProcessor) == null || n.onError({ error: l.message });
|
|
99
|
+
}), u.on("error", (l) => {
|
|
100
|
+
var n;
|
|
101
|
+
this.log(`[${this.getType()}][error]`, l), d(), this.closeChallenge(), (n = this.threeDsProcessor) == null || n.onError({ error: l.message });
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
initScript(e) {
|
|
105
|
+
const t = document.createElement("script");
|
|
106
|
+
t.type = "text/javascript", t.src = `https://${this.getDomain()}/js/v1/Gateway.js`, t.onload = () => {
|
|
107
|
+
this.initGateway(e), this.initChallenge();
|
|
108
|
+
}, document.head.appendChild(t);
|
|
109
|
+
}
|
|
110
|
+
initGateway(e) {
|
|
111
|
+
this.gateway = window.Gateway.create(e), this.threeDS = this.gateway.get3DSecure(), this.gateway.on("error", (t) => {
|
|
112
|
+
var r;
|
|
113
|
+
this.log(`[${this.getType()}]: gateway error`, t), (r = this.threeDsProcessor) == null || r.onError({ error: t.message }), this.threeDS = null, this.numAttempts = D;
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
initChallenge() {
|
|
117
|
+
const { destroy: e } = E({
|
|
118
|
+
el: document.body,
|
|
119
|
+
component: W,
|
|
120
|
+
on: {
|
|
121
|
+
close: () => {
|
|
122
|
+
var t;
|
|
123
|
+
this.closeChallenge(), (t = this.threeDsProcessor) == null || t.onError({ error: "Challenge cancelled" });
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
this.threeDSDestroy = e;
|
|
128
|
+
}
|
|
129
|
+
showChallenge() {
|
|
130
|
+
window.postMessage({
|
|
131
|
+
message: "3DS_CHALLENGE_SHOW"
|
|
132
|
+
}, "*");
|
|
133
|
+
}
|
|
134
|
+
closeChallenge() {
|
|
135
|
+
window.postMessage({
|
|
136
|
+
message: "3DS_CHALLENGE_CLOSE"
|
|
137
|
+
}, "*");
|
|
138
|
+
}
|
|
139
|
+
removeChallenge() {
|
|
140
|
+
var e;
|
|
141
|
+
(e = this.threeDSDestroy) == null || e.call(this);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
export {
|
|
145
|
+
Y as MetricsGlobalThreeDsProvider
|
|
146
|
+
};
|
package/dist/{NuveiThreeDsProvider-CjtjRIqU-Oq-yTie5.js → NuveiThreeDsProvider-wpWbdDVQ-Df-izyuz.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as d, y as p,
|
|
2
|
-
import { DefaultThreeDsProvider as v, THREE_DS_METHOD_INVOCATION_COMPLETE as P, THREE_DS_CHALLENGE_COMPLETE as T } from "./DefaultThreeDsProvider-
|
|
1
|
+
import { b as d, y as p, z as m, a as g, c as h, X as D, J as S, Y as y, L as l } from "./index-BK7gCCkz.js";
|
|
2
|
+
import { DefaultThreeDsProvider as v, THREE_DS_METHOD_INVOCATION_COMPLETE as P, THREE_DS_CHALLENGE_COMPLETE as T } from "./DefaultThreeDsProvider-BbyoW5gI-Bm2Tl1xC.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,11 +71,11 @@ 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) => (y(), S("div", N, r[0] || (r[0] = [
|
|
74
|
+
return (t, r) => (y(), S("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
80
|
}), _ = /* @__PURE__ */ m(C, [["__scopeId", "data-v-6293d147"]]), { hideSpinner: b } = h();
|
|
81
81
|
class A extends v {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DefaultThreeDsProvider as
|
|
2
|
-
import { b as c, y as f,
|
|
1
|
+
import { DefaultThreeDsProvider as y } from "./DefaultThreeDsProvider-BbyoW5gI-Bm2Tl1xC.js";
|
|
2
|
+
import { b as c, y as f, z as C, i as h, a as w, d as L, X as m, e as p, J as E, Y as I, L as g, P as S } from "./index-BK7gCCkz.js";
|
|
3
3
|
const u = h(!1);
|
|
4
4
|
function k(r, ...e) {
|
|
5
5
|
u.value && console.log(r, e);
|
|
@@ -18,7 +18,7 @@ function R() {
|
|
|
18
18
|
logMessage: k
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
const b = { class: "modal-mask" }, U = { class: "modal-wrapper" }, A = ["src"],
|
|
21
|
+
const b = { class: "modal-mask" }, U = { class: "modal-wrapper" }, A = ["src"], x = /* @__PURE__ */ w({
|
|
22
22
|
__name: "PayGLocalThreeDsChallenge",
|
|
23
23
|
props: {
|
|
24
24
|
url: {}
|
|
@@ -26,7 +26,7 @@ const b = { class: "modal-mask" }, U = { class: "modal-wrapper" }, A = ["src"],
|
|
|
26
26
|
emits: ["close"],
|
|
27
27
|
setup(r, { emit: e }) {
|
|
28
28
|
const { logMessage: t } = R(), a = r, s = e, o = h(a.url);
|
|
29
|
-
h(null),
|
|
29
|
+
h(null), L(() => a.url, (l) => {
|
|
30
30
|
o.value = l;
|
|
31
31
|
}), m(() => {
|
|
32
32
|
window.addEventListener("message", n);
|
|
@@ -38,10 +38,10 @@ const b = { class: "modal-mask" }, U = { class: "modal-wrapper" }, A = ["src"],
|
|
|
38
38
|
if (t("PayGLocalThreeDsChallenge: Message received", l.data), !((i = l == null ? void 0 : l.data) != null && i["payglocal-token"])) return;
|
|
39
39
|
const d = l.data["payglocal-token"];
|
|
40
40
|
t("Token received", d);
|
|
41
|
-
const v = d.split(".")[1],
|
|
42
|
-
s("close",
|
|
41
|
+
const v = d.split(".")[1], P = window.atob(v), T = JSON.parse(P);
|
|
42
|
+
s("close", T);
|
|
43
43
|
}
|
|
44
|
-
return (l, i) => (
|
|
44
|
+
return (l, i) => (I(), E("div", b, [
|
|
45
45
|
g("div", U, [
|
|
46
46
|
g("iframe", {
|
|
47
47
|
src: o.value,
|
|
@@ -50,8 +50,8 @@ const b = { class: "modal-mask" }, U = { class: "modal-wrapper" }, A = ["src"],
|
|
|
50
50
|
])
|
|
51
51
|
]));
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
54
|
-
class G extends
|
|
53
|
+
}), M = /* @__PURE__ */ C(x, [["__scopeId", "data-v-6f042298"]]);
|
|
54
|
+
class G extends y {
|
|
55
55
|
getType() {
|
|
56
56
|
return "PayGLocal";
|
|
57
57
|
}
|
|
@@ -83,7 +83,7 @@ class G extends P {
|
|
|
83
83
|
}
|
|
84
84
|
const { destroy: t } = f({
|
|
85
85
|
el: document.body,
|
|
86
|
-
component:
|
|
86
|
+
component: M,
|
|
87
87
|
props: {
|
|
88
88
|
url: e
|
|
89
89
|
},
|
package/dist/{PayWayAppleButton-3Jcspw8r-D7c2ELHJ.js → PayWayAppleButton-lOpUyVhK-C3sG34i0.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { U as b, R as v, _ as g } from "./index-BK7gCCkz.js";
|
|
2
2
|
var A = Object.defineProperty, C = (n, t, e) => t in n ? A(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, i = (n, t, e) => C(n, typeof t != "symbol" ? t + "" : t, e);
|
|
3
3
|
const h = {
|
|
4
4
|
CHECKOUT: "CHECKOUT",
|