@payfurl/react-plugin 1.0.9 → 1.0.10
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-DfJyYDV8-BtwTH6Vv.js} +1 -1
- package/dist/{DefaultThreeDsProvider-DSJFbhYb-BR2-2Tpy.js → DefaultThreeDsProvider-DvV6zVzO-DDYac6nh.js} +29 -29
- package/dist/{EcentricThreeDsProvider-M7JlFNrQ-CfLmEg8r.js → EcentricThreeDsProvider-DC4tQCJ4-43cDaJIh.js} +4 -4
- package/dist/{EpnaThreeDsProvider-BFvrkGJv-CmgaZQ8W.js → EpnaThreeDsProvider-D9tTUWnr-EX6HQmg0.js} +1 -1
- package/dist/{FlashBancThreeDsProvider-CqjYV8SM-D932Lamr.js → FlashBancThreeDsProvider-Dc_WgWyQ-D2rZd6ti.js} +1 -1
- package/dist/{GPaymentsThreeDsProvider-BMCOtJAd-CNu_pC6q.js → GPaymentsThreeDsProvider-BAJmTSdj-BmLQFvQr.js} +4 -4
- package/dist/{MetricsGlobalThreeDsProvider-B9rzZcOb-BDahPAuh.js → MetricsGlobalThreeDsProvider-DiPpCK4e-CRZ470ug.js} +9 -9
- package/dist/{NmiThreeDsProvider-C8Gf2tSm-CvbL47jU.js → NmiThreeDsProvider-X5Wb78Qq-D6zRtIK-.js} +1 -1
- package/dist/{NuveiThreeDsProvider-CjtjRIqU-Oq-yTie5.js → NuveiThreeDsProvider-C7kP4S9V-CKRUbO6O.js} +41 -41
- package/dist/{PayGLocalThreeDsProvider-CkBdY3-6-DFZF8Idj.js → PayGLocalThreeDsProvider-pa38V_3c-BYX0XJ0I.js} +6 -6
- package/dist/{PayWayAppleButton-3Jcspw8r-D7c2ELHJ.js → PayWayAppleButton-DGBgHxM1--mVa2z-I.js} +1 -1
- package/dist/{PayabliThreeDsProvider-BYNvOB9r-0YMR6lF6.js → PayabliThreeDsProvider-CMCehiRL-Dsv7XOl0.js} +1 -1
- package/dist/{SkyBankThreeDsProvider-D1loCi58-Dt14b0MK.js → SkyBankThreeDsProvider-BJXZbNSS-DjLydBX-.js} +1 -1
- package/dist/{cxpay-tBsH5Qq9-CuzlflKr.js → cxpay-CmCXB_3H-CFTLoWfG.js} +1 -1
- package/dist/{default-CU0qSz8c-G_XP7PEy.js → default-DwmL369u-CFn9gU9h.js} +1 -1
- package/dist/{ecentric-BoreYd7u-DGX96uHH.js → ecentric-CkX8jlMS-CIF3TL3n.js} +1 -1
- package/dist/{epna-S8i7BPJA-DEbaBDO8.js → epna-CQuWi-kj-Bp3oLoVZ.js} +1 -1
- package/dist/{flashbanc-BoYu0io2-DGjygXQV.js → flashbanc-ROJhNrEr-CkfPZX3E.js} +1 -1
- package/dist/{gpayments-BSnudVfM-D02tSdF6.js → gpayments-CMf-VGx8-woOHZ2Uf.js} +1 -1
- package/dist/{index-0E3VS5Zq.js → index-DjmLClKy.js} +2367 -2356
- package/dist/{metrics_global-C-3-Z-LB-BqUmy4TP.js → metrics_global-DCnzJ8W3-owheVXbs.js} +1 -1
- package/dist/nmi-BAQHxhKe-DtWC05bC.js +7 -0
- package/dist/{nuvei-rKAQzNmO-BInMw2Rr.js → nuvei-DY1eIaaI-CH37Pkov.js} +1 -1
- package/dist/{payabli-uJdaROjR-C5Q_HZA9.js → payabli-DD1ZuFv1-GPn71phq.js} +1 -1
- package/dist/payfurl-react.es.js +1 -1
- package/dist/payfurl-react.umd.js +22 -22
- package/dist/{payglocal-BtWr5bKE-CqLMZV2a.js → payglocal-CC7Mmvkg-B93wBeJX.js} +1 -1
- package/dist/{payway_rest-YdocXQB2-BzVB60Gl.js → payway_rest-C2bgT2mt-DZYerbzI.js} +1 -1
- package/dist/{skybank-B_BtMhk2-ZE-AEwAY.js → skybank-DLUEQlDI-CALhFzpW.js} +1 -1
- package/package.json +1 -1
- package/dist/nmi-CP4vI9mH-BehvSvaB.js +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
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,
|
|
1
|
+
import { d, f as S, P as g, Y as p, U as m, n as T, J as v, X as f, M as u, $ as I, c as y, O as A, a as C } from "./index-DjmLClKy.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
3
|
const P = { class: "mask" }, U = { class: "wrapper" }, b = { class: "container" }, $ = ["action"], M = ["value"], L = /* @__PURE__ */ m({
|
|
4
4
|
__name: "ThreeDsChallenge",
|
|
5
5
|
props: {
|
|
@@ -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)),
|
|
@@ -44,50 +44,50 @@ const P = { class: "mask" }, U = { class: "wrapper" }, b = { class: "container"
|
|
|
44
44
|
])
|
|
45
45
|
]));
|
|
46
46
|
}
|
|
47
|
-
}),
|
|
48
|
-
class
|
|
47
|
+
}), _ = /* @__PURE__ */ p(L, [["__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,6 +1,6 @@
|
|
|
1
|
-
import { DefaultThreeDsProvider as l } from "./DefaultThreeDsProvider-
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
1
|
+
import { DefaultThreeDsProvider as l } from "./DefaultThreeDsProvider-DvV6zVzO-DDYac6nh.js";
|
|
2
|
+
import { P as i, Y as h, U as c, n as u, J as D, X as d, a as p, M as n, $ as m, c as g, O as v } from "./index-DjmLClKy.js";
|
|
3
|
+
var S = Object.defineProperty, T = (r, e, t) => e in r ? S(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, y = (r, e, t) => T(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",
|
|
6
6
|
props: {
|
|
@@ -41,7 +41,7 @@ const P = { class: "mask" }, f = { class: "wrapper" }, I = { class: "container"
|
|
|
41
41
|
}), V = /* @__PURE__ */ h($, [["__scopeId", "data-v-8d26953f"]]);
|
|
42
42
|
class R extends l {
|
|
43
43
|
constructor() {
|
|
44
|
-
super(...arguments),
|
|
44
|
+
super(...arguments), y(this, "paResPayload", "");
|
|
45
45
|
}
|
|
46
46
|
getType() {
|
|
47
47
|
return "Ecentric";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DefaultThreeDsProvider as n } from "./DefaultThreeDsProvider-
|
|
2
|
-
import {
|
|
1
|
+
import { DefaultThreeDsProvider as n } from "./DefaultThreeDsProvider-DvV6zVzO-DDYac6nh.js";
|
|
2
|
+
import { P as o, Y as l, U as u, J as c, a as p, M as h, E as i } from "./index-DjmLClKy.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",
|
|
@@ -31,7 +31,7 @@ const S = { class: "mask" }, D = { class: "wrapper" }, m = ["src"], y = /* @__PU
|
|
|
31
31
|
]));
|
|
32
32
|
}
|
|
33
33
|
}), f = /* @__PURE__ */ l(y, [["__scopeId", "data-v-9b0ef3a8"]]);
|
|
34
|
-
class
|
|
34
|
+
class U extends n {
|
|
35
35
|
constructor() {
|
|
36
36
|
super(...arguments), a(this, "onDoAuthSuccess", (e, t) => {
|
|
37
37
|
const s = JSON.parse(t);
|
|
@@ -96,5 +96,5 @@ class T extends n {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
export {
|
|
99
|
-
|
|
99
|
+
U as GPaymentsThreeDsProvider
|
|
100
100
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DefaultThreeDsProvider as
|
|
2
|
-
import {
|
|
1
|
+
import { DefaultThreeDsProvider as P } from "./DefaultThreeDsProvider-DvV6zVzO-DDYac6nh.js";
|
|
2
|
+
import { d as C, b as d, P as S, Y as w, U as E, n as A, S as b, X as f, l as T, e as L, a as _, J as x, M as g, $ as G, c as N } from "./index-DjmLClKy.js";
|
|
3
3
|
var $ = Object.defineProperty, I = (l, e, t) => e in l ? $(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t, m = (l, e, t) => I(l, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
const M = { class: "mask" }, H = { class: "wrapper" }, O = { class: "container" }, j = /* @__PURE__ */
|
|
4
|
+
const M = { class: "mask" }, H = { class: "wrapper" }, O = { class: "container" }, j = /* @__PURE__ */ E({
|
|
5
5
|
__name: "MetricsGlobalThreeDsChallenge",
|
|
6
6
|
emits: ["close", "submit"],
|
|
7
7
|
setup(l, { emit: e }) {
|
|
8
|
-
const t = e, a =
|
|
8
|
+
const t = e, a = A(!1);
|
|
9
9
|
function o(h) {
|
|
10
10
|
var r;
|
|
11
11
|
["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes((r = h.data) == null ? void 0 : r.message) && (a.value = h.data.message === "3DS_CHALLENGE_SHOW");
|
|
@@ -28,8 +28,8 @@ const M = { class: "mask" }, H = { class: "wrapper" }, O = { class: "container"
|
|
|
28
28
|
[L, a.value]
|
|
29
29
|
]);
|
|
30
30
|
}
|
|
31
|
-
}), k = /* @__PURE__ */ w(j, [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: u, showSpinner: F } =
|
|
32
|
-
class W extends
|
|
31
|
+
}), k = /* @__PURE__ */ w(j, [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: u, showSpinner: F } = C(), p = 5;
|
|
32
|
+
class W extends P {
|
|
33
33
|
constructor(e, t, a) {
|
|
34
34
|
var o;
|
|
35
35
|
super(e, t, a), m(this, "gateway"), m(this, "threeDS"), m(this, "numAttempts", 0), this.initScript(((o = a.clientParameters) == null ? void 0 : o.PublicKey) || "");
|
|
@@ -70,10 +70,10 @@ class W extends C {
|
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
72
|
F();
|
|
73
|
-
const s = (t = this.threeDsProcessor) == null ? void 0 : t.getAddressInfo(), D = r.expiryDate.length === 4 ? r.expiryDate[2] + r.expiryDate[3] : "",
|
|
73
|
+
const s = (t = this.threeDsProcessor) == null ? void 0 : t.getAddressInfo(), D = r.expiryDate.length === 4 ? r.expiryDate[2] + r.expiryDate[3] : "", v = r.expiryDate.length === 4 ? r.expiryDate[0] + r.expiryDate[1] : "", y = {
|
|
74
74
|
cardNumber: r.cardNumber,
|
|
75
75
|
cardExpMonth: D,
|
|
76
|
-
cardExpYear: parseInt(
|
|
76
|
+
cardExpYear: parseInt(v) + 2e3,
|
|
77
77
|
currency: (a = this.threeDsProcessor) == null ? void 0 : a.getCurrency(),
|
|
78
78
|
amount: (o = this.threeDsProcessor) == null ? void 0 : o.getAmount(),
|
|
79
79
|
email: (h = this.threeDsProcessor) == null ? void 0 : h.getEmail(),
|
|
@@ -85,7 +85,7 @@ class W extends C {
|
|
|
85
85
|
firstName: s == null ? void 0 : s.firstName,
|
|
86
86
|
lastName: s == null ? void 0 : s.lastName,
|
|
87
87
|
postalCode: s == null ? void 0 : s.postalCode
|
|
88
|
-
}, c = this.threeDS.createUI(
|
|
88
|
+
}, c = this.threeDS.createUI(y);
|
|
89
89
|
c.start("#ThreeDsChallengeIFrame"), c.on("challenge", (i) => {
|
|
90
90
|
this.log(`[${this.getType()}][onChallenge]`, i), u(), this.showChallenge();
|
|
91
91
|
}), c.on("complete", (i) => {
|
package/dist/{NuveiThreeDsProvider-CjtjRIqU-Oq-yTie5.js → NuveiThreeDsProvider-C7kP4S9V-CKRUbO6O.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as d,
|
|
2
|
-
import { DefaultThreeDsProvider as
|
|
3
|
-
var f = Object.defineProperty, I = (n, e,
|
|
1
|
+
import { b as d, P as p, Y as m, U as g, d as h, X as D, J as S, a as v, M as l } from "./index-DjmLClKy.js";
|
|
2
|
+
import { DefaultThreeDsProvider as y, THREE_DS_METHOD_INVOCATION_COMPLETE as P, THREE_DS_CHALLENGE_COMPLETE as T } from "./DefaultThreeDsProvider-DvV6zVzO-DDYac6nh.js";
|
|
3
|
+
var f = Object.defineProperty, I = (n, e, r) => e in n ? f(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r, c = (n, e, r) => I(n, typeof e != "symbol" ? e + "" : e, r);
|
|
4
4
|
const N = { class: "mask" }, C = /* @__PURE__ */ g({
|
|
5
5
|
__name: "nuvei",
|
|
6
6
|
props: {
|
|
@@ -20,15 +20,15 @@ const N = { class: "mask" }, C = /* @__PURE__ */ g({
|
|
|
20
20
|
country: {}
|
|
21
21
|
},
|
|
22
22
|
setup(n) {
|
|
23
|
-
const { hideSpinner: e, showSpinner:
|
|
23
|
+
const { hideSpinner: e, showSpinner: r } = h(), s = n;
|
|
24
24
|
D(() => {
|
|
25
|
-
|
|
25
|
+
r();
|
|
26
26
|
const t = document.createElement("script");
|
|
27
27
|
t.type = "text/javascript", t.src = "https://cdn.safecharge.com/safecharge_resources/v1/websdk/safecharge.js", t.onload = () => {
|
|
28
|
-
const
|
|
29
|
-
document.getElementsByClassName("sfcModal-dialog")[0] && (e(),
|
|
28
|
+
const a = new MutationObserver(function() {
|
|
29
|
+
document.getElementsByClassName("sfcModal-dialog")[0] && (e(), a.disconnect());
|
|
30
30
|
}), i = { childList: !0 }, u = document.querySelector("body");
|
|
31
|
-
|
|
31
|
+
a.observe(u, i), o();
|
|
32
32
|
}, document.head.appendChild(t);
|
|
33
33
|
});
|
|
34
34
|
function o() {
|
|
@@ -67,53 +67,53 @@ const N = { class: "mask" }, C = /* @__PURE__ */ g({
|
|
|
67
67
|
email: s.email,
|
|
68
68
|
country: s.country
|
|
69
69
|
}
|
|
70
|
-
}, function(
|
|
71
|
-
window.postMessage({ status: "3ds_challenge_complete", cres:
|
|
70
|
+
}, function(a) {
|
|
71
|
+
window.postMessage({ status: "3ds_challenge_complete", cres: a }, "*");
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
return (t,
|
|
74
|
+
return (t, a) => (v(), S("div", N, a[0] || (a[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
|
-
class A extends
|
|
81
|
+
class A extends y {
|
|
82
82
|
constructor() {
|
|
83
|
-
super(...arguments), c(this, "_paResPayload", null), c(this, "onSuccess", (e,
|
|
83
|
+
super(...arguments), c(this, "_paResPayload", null), c(this, "onSuccess", (e, r) => {
|
|
84
84
|
var s, o;
|
|
85
85
|
this.closeChallenge(), b();
|
|
86
|
-
const t = JSON.parse(
|
|
86
|
+
const t = JSON.parse(r);
|
|
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
|
-
}), c(this, "onDoAuthSuccess", (e,
|
|
88
|
+
}), c(this, "onDoAuthSuccess", (e, r) => {
|
|
89
89
|
var s, o, t;
|
|
90
|
-
const
|
|
91
|
-
if (this.log(`[${this.getType()}][onDoAuthSuccess]`,
|
|
90
|
+
const a = JSON.parse(r);
|
|
91
|
+
if (this.log(`[${this.getType()}][onDoAuthSuccess]`, a), !a.transStatus || !a.authenticationValue) {
|
|
92
92
|
this.onError(e, "No transStatus specified");
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
-
switch (
|
|
95
|
+
switch (a.transStatus) {
|
|
96
96
|
case "C":
|
|
97
|
-
this.doNuveiChallenge(
|
|
97
|
+
this.doNuveiChallenge(a.authenticationValue, (s = this.threeDsProcessor) == null ? void 0 : s.getAddressInfo(), (o = this.threeDsProcessor) == null ? void 0 : o.getPaymentInfo());
|
|
98
98
|
break;
|
|
99
99
|
default:
|
|
100
|
-
this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ` +
|
|
101
|
-
threeDSServerTransID:
|
|
100
|
+
this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ` + a.transStatus), (t = this.threeDsProcessor) == null || t.onSuccess({
|
|
101
|
+
threeDSServerTransID: a.threeDSServerTransID,
|
|
102
102
|
threeDSRequestorTransID: "",
|
|
103
|
-
acsRenderingType:
|
|
104
|
-
acsTransID:
|
|
105
|
-
authenticationType:
|
|
106
|
-
authenticationValue:
|
|
103
|
+
acsRenderingType: a.acsRenderingType,
|
|
104
|
+
acsTransID: a.acsTransID,
|
|
105
|
+
authenticationType: a.authenticationType,
|
|
106
|
+
authenticationValue: a.authenticationValue,
|
|
107
107
|
challengeCancel: "",
|
|
108
|
-
dsTransID:
|
|
109
|
-
eci:
|
|
108
|
+
dsTransID: a.dsTransID,
|
|
109
|
+
eci: a.eci,
|
|
110
110
|
interactionCounter: "",
|
|
111
111
|
messageCategory: "",
|
|
112
|
-
messageExtension:
|
|
113
|
-
messageType:
|
|
114
|
-
messageVersion:
|
|
115
|
-
transStatus:
|
|
116
|
-
transStatusReason:
|
|
112
|
+
messageExtension: a.messageExtension,
|
|
113
|
+
messageType: a.messageType,
|
|
114
|
+
messageVersion: a.messageVersion,
|
|
115
|
+
transStatus: a.transStatus,
|
|
116
|
+
transStatusReason: a.transStatusReason
|
|
117
117
|
});
|
|
118
118
|
break;
|
|
119
119
|
}
|
|
@@ -123,8 +123,8 @@ class A extends v {
|
|
|
123
123
|
return "Nuvei";
|
|
124
124
|
}
|
|
125
125
|
onPreAuth() {
|
|
126
|
-
var e,
|
|
127
|
-
this.log(`[${this.getType()}]: onPreAuth`), (e = this.threeDsProcessor) != null && e.getTokenId() ? (
|
|
126
|
+
var e, r;
|
|
127
|
+
this.log(`[${this.getType()}]: onPreAuth`), (e = this.threeDsProcessor) != null && e.getTokenId() ? (r = this.threeDsProcessor) == null || r.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (s) => {
|
|
128
128
|
var o;
|
|
129
129
|
(o = this.threeDsProcessor) == null || o.setPaymentInfo(s), super.onPreAuth();
|
|
130
130
|
}, () => {
|
|
@@ -142,27 +142,27 @@ class A extends v {
|
|
|
142
142
|
xid: this._paResPayload.xid
|
|
143
143
|
}, this.onSuccess, this.onError);
|
|
144
144
|
}
|
|
145
|
-
doNuveiChallenge(e,
|
|
145
|
+
doNuveiChallenge(e, r, s) {
|
|
146
146
|
var o;
|
|
147
147
|
const t = JSON.parse(e);
|
|
148
|
-
(t === null || !t.merchantId || !t.merchantSiteId) && ((o = this.threeDsProcessor) == null || o.onError({ error: "3D Secure failed" })),
|
|
149
|
-
const { destroy:
|
|
148
|
+
(t === null || !t.merchantId || !t.merchantSiteId) && ((o = this.threeDsProcessor) == null || o.onError({ error: "3D Secure failed" })), r && (t.firstName = r.firstName, t.lastName = r.lastName, t.email = r.email, t.country = r.country), s && (t.cardNumber = s.cardNumber, t.cardHolderName = s.cardholder || "", t.expirationMonth = s.expiryDate.substring(2, 4), t.expirationYear = s.expiryDate.substring(0, 2), t.CVV = s.ccv);
|
|
149
|
+
const { destroy: a } = p({
|
|
150
150
|
el: document.body,
|
|
151
151
|
component: _,
|
|
152
152
|
props: t,
|
|
153
153
|
on: {
|
|
154
154
|
close: () => {
|
|
155
155
|
var i;
|
|
156
|
-
|
|
156
|
+
a(), this.threeDSDestroy = () => {
|
|
157
157
|
}, (i = this.threeDsProcessor) == null || i.onError({ error: "Challenge cancelled" });
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
});
|
|
161
|
-
this.threeDSDestroy =
|
|
161
|
+
this.threeDSDestroy = a;
|
|
162
162
|
}
|
|
163
163
|
messageHandler(e) {
|
|
164
|
-
var
|
|
165
|
-
if ((
|
|
164
|
+
var r, s, o;
|
|
165
|
+
if ((r = e == null ? void 0 : e.data) != null && r.status) {
|
|
166
166
|
if (e.data.status === P) {
|
|
167
167
|
this.log(`[${this.getType()}][messageHandler] 3Ds Method invocation complete`), e.stopPropagation(), this.onAuth(!0, "");
|
|
168
168
|
return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DefaultThreeDsProvider as
|
|
2
|
-
import { b as c,
|
|
1
|
+
import { DefaultThreeDsProvider as f } from "./DefaultThreeDsProvider-DvV6zVzO-DDYac6nh.js";
|
|
2
|
+
import { b as c, P as y, Y as C, n as h, U as w, o as E, X as m, l as p, J as I, a as L, M as g, h as S } from "./index-DjmLClKy.js";
|
|
3
3
|
const u = h(!1);
|
|
4
4
|
function k(r, ...e) {
|
|
5
5
|
u.value && console.log(r, e);
|
|
@@ -38,8 +38,8 @@ 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
44
|
return (l, i) => (L(), I("div", b, [
|
|
45
45
|
g("div", U, [
|
|
@@ -51,7 +51,7 @@ const b = { class: "modal-mask" }, U = { class: "modal-wrapper" }, A = ["src"],
|
|
|
51
51
|
]));
|
|
52
52
|
}
|
|
53
53
|
}), $ = /* @__PURE__ */ C(M, [["__scopeId", "data-v-6f042298"]]);
|
|
54
|
-
class G extends
|
|
54
|
+
class G extends f {
|
|
55
55
|
getType() {
|
|
56
56
|
return "PayGLocal";
|
|
57
57
|
}
|
|
@@ -81,7 +81,7 @@ class G extends P {
|
|
|
81
81
|
c(this.container, "3D Secure URL is missing");
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
|
-
const { destroy: t } =
|
|
84
|
+
const { destroy: t } = y({
|
|
85
85
|
el: document.body,
|
|
86
86
|
component: $,
|
|
87
87
|
props: {
|
package/dist/{PayWayAppleButton-3Jcspw8r-D7c2ELHJ.js → PayWayAppleButton-DGBgHxM1--mVa2z-I.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { x as b, F as v, k as g } from "./index-DjmLClKy.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",
|