@payfurl/react-plugin 1.0.10 → 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-DfJyYDV8-BtwTH6Vv.js → CxPayThreeDsProvider-DHyY0SJN-mkHWDkHg.js} +1 -1
- package/dist/{DefaultThreeDsProvider-DvV6zVzO-DDYac6nh.js → DefaultThreeDsProvider-BbyoW5gI-Bm2Tl1xC.js} +5 -5
- package/dist/{EcentricThreeDsProvider-DC4tQCJ4-43cDaJIh.js → EcentricThreeDsProvider-CJkAKhCm-4a0z3e8l.js} +13 -13
- package/dist/{EpnaThreeDsProvider-D9tTUWnr-EX6HQmg0.js → EpnaThreeDsProvider-CbuCAz8E-8AT3NiUZ.js} +1 -1
- package/dist/{FlashBancThreeDsProvider-Dc_WgWyQ-D2rZd6ti.js → FlashBancThreeDsProvider-yEpICp2s-B-fAmFIe.js} +1 -1
- package/dist/{GPaymentsThreeDsProvider-BAJmTSdj-BmLQFvQr.js → GPaymentsThreeDsProvider-ZzFlXQYx-DxEfT4MU.js} +4 -4
- package/dist/MetricsGlobalThreeDsProvider-COVvDD_A-BpwZGUJd.js +146 -0
- package/dist/{NmiThreeDsProvider-X5Wb78Qq-D6zRtIK-.js → NmiThreeDsProvider-CyQ9ToCv-C5qjGxEE.js} +1 -1
- package/dist/{NuveiThreeDsProvider-C7kP4S9V-CKRUbO6O.js → NuveiThreeDsProvider-wpWbdDVQ-Df-izyuz.js} +42 -42
- package/dist/{PayGLocalThreeDsProvider-pa38V_3c-BYX0XJ0I.js → PayGLocalThreeDsProvider-piT2VTln-BSZsat2V.js} +9 -9
- package/dist/{PayWayAppleButton-DGBgHxM1--mVa2z-I.js → PayWayAppleButton-lOpUyVhK-C3sG34i0.js} +1 -1
- package/dist/{PayabliThreeDsProvider-CMCehiRL-Dsv7XOl0.js → PayabliThreeDsProvider-chEmLOO6-DsAXAJs1.js} +1 -1
- package/dist/{SkyBankThreeDsProvider-BJXZbNSS-DjLydBX-.js → SkyBankThreeDsProvider-B1KB-MBu-BvB-_qyj.js} +1 -1
- package/dist/{cxpay-CmCXB_3H-CFTLoWfG.js → cxpay-CkpinAwr-ChgTpH3-.js} +1 -1
- package/dist/{default-DwmL369u-CFn9gU9h.js → default-CCjRF2gJ-CD4CwffS.js} +1 -1
- package/dist/{ecentric-CkX8jlMS-CIF3TL3n.js → ecentric-C7aOx_5y-CEzn5wge.js} +1 -1
- package/dist/{epna-CQuWi-kj-Bp3oLoVZ.js → epna-C3FB2xZQ-DH6OQlXc.js} +1 -1
- package/dist/{flashbanc-ROJhNrEr-CkfPZX3E.js → flashbanc-tBq9tJrU-YpLBHiBR.js} +1 -1
- package/dist/{gpayments-CMf-VGx8-woOHZ2Uf.js → gpayments-utHsl2Sf-CVGRwoei.js} +1 -1
- package/dist/{index-DjmLClKy.js → index-BK7gCCkz.js} +4914 -4852
- package/dist/{metrics_global-DCnzJ8W3-owheVXbs.js → metrics_global-CP2_hsNY-PAbKkq2a.js} +1 -1
- package/dist/nmi-Crex5ZZF-Cq6YYDcI.js +7 -0
- package/dist/{nuvei-DY1eIaaI-CH37Pkov.js → nuvei-DFcv1FC6-Do0hVbvU.js} +1 -1
- package/dist/{payabli-DD1ZuFv1-GPn71phq.js → payabli-C_GFUDE_-B3AKtHbR.js} +1 -1
- package/dist/payfurl-react.es.js +1 -1
- package/dist/payfurl-react.umd.js +25 -25
- package/dist/{payglocal-CC7Mmvkg-B93wBeJX.js → payglocal-CfnXIS4O-DFlDGlnE.js} +1 -1
- package/dist/{payway_rest-C2bgT2mt-DZYerbzI.js → payway_rest-Bl-RqdsM-DtXvxCWL.js} +1 -1
- package/dist/{skybank-DLUEQlDI-CALhFzpW.js → skybank-ChiLuKWf-CtXaMyvJ.js} +1 -1
- package/package.json +1 -1
- package/dist/MetricsGlobalThreeDsProvider-DiPpCK4e-CRZ470ug.js +0 -146
- package/dist/nmi-BAQHxhKe-DtWC05bC.js +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d, f as S,
|
|
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
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" },
|
|
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: {},
|
|
@@ -38,13 +38,13 @@ 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
|
-
}), _ = /* @__PURE__ */ p(
|
|
47
|
+
}), _ = /* @__PURE__ */ p(M, [["__scopeId", "data-v-ac351494"]]);
|
|
48
48
|
class w {
|
|
49
49
|
constructor() {
|
|
50
50
|
a(this, "iframeId", "threeDsIframeMethod"), a(this, "containerId", "payfurlContainerFormInvoker"), a(this, "iframe", null), a(this, "container", null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DefaultThreeDsProvider as l } from "./DefaultThreeDsProvider-
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
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
|
+
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",
|
|
6
6
|
props: {
|
|
@@ -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
|
])
|
|
@@ -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), T(this, "paResPayload", "");
|
|
45
45
|
}
|
|
46
46
|
getType() {
|
|
47
47
|
return "Ecentric";
|
|
@@ -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 {
|
|
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",
|
|
@@ -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 T 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 U extends n {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
export {
|
|
99
|
-
|
|
99
|
+
T as GPaymentsThreeDsProvider
|
|
100
100
|
};
|
|
@@ -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-C7kP4S9V-CKRUbO6O.js → NuveiThreeDsProvider-wpWbdDVQ-Df-izyuz.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, 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
|
+
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",
|
|
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: a } = h(), s = n;
|
|
24
24
|
D(() => {
|
|
25
|
-
|
|
25
|
+
a();
|
|
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 r = new MutationObserver(function() {
|
|
29
|
+
document.getElementsByClassName("sfcModal-dialog")[0] && (e(), r.disconnect());
|
|
30
30
|
}), i = { childList: !0 }, u = document.querySelector("body");
|
|
31
|
-
|
|
31
|
+
r.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(r) {
|
|
71
|
+
window.postMessage({ status: "3ds_challenge_complete", cres: r }, "*");
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
return (t,
|
|
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
|
-
class A extends
|
|
81
|
+
class A extends v {
|
|
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, a) => {
|
|
84
84
|
var s, o;
|
|
85
85
|
this.closeChallenge(), b();
|
|
86
|
-
const t = JSON.parse(
|
|
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
|
-
}), c(this, "onDoAuthSuccess", (e,
|
|
88
|
+
}), c(this, "onDoAuthSuccess", (e, a) => {
|
|
89
89
|
var s, o, t;
|
|
90
|
-
const
|
|
91
|
-
if (this.log(`[${this.getType()}][onDoAuthSuccess]`,
|
|
90
|
+
const r = JSON.parse(a);
|
|
91
|
+
if (this.log(`[${this.getType()}][onDoAuthSuccess]`, r), !r.transStatus || !r.authenticationValue) {
|
|
92
92
|
this.onError(e, "No transStatus specified");
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
-
switch (
|
|
95
|
+
switch (r.transStatus) {
|
|
96
96
|
case "C":
|
|
97
|
-
this.doNuveiChallenge(
|
|
97
|
+
this.doNuveiChallenge(r.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: ` + r.transStatus), (t = this.threeDsProcessor) == null || t.onSuccess({
|
|
101
|
+
threeDSServerTransID: r.threeDSServerTransID,
|
|
102
102
|
threeDSRequestorTransID: "",
|
|
103
|
-
acsRenderingType:
|
|
104
|
-
acsTransID:
|
|
105
|
-
authenticationType:
|
|
106
|
-
authenticationValue:
|
|
103
|
+
acsRenderingType: r.acsRenderingType,
|
|
104
|
+
acsTransID: r.acsTransID,
|
|
105
|
+
authenticationType: r.authenticationType,
|
|
106
|
+
authenticationValue: r.authenticationValue,
|
|
107
107
|
challengeCancel: "",
|
|
108
|
-
dsTransID:
|
|
109
|
-
eci:
|
|
108
|
+
dsTransID: r.dsTransID,
|
|
109
|
+
eci: r.eci,
|
|
110
110
|
interactionCounter: "",
|
|
111
111
|
messageCategory: "",
|
|
112
|
-
messageExtension:
|
|
113
|
-
messageType:
|
|
114
|
-
messageVersion:
|
|
115
|
-
transStatus:
|
|
116
|
-
transStatusReason:
|
|
112
|
+
messageExtension: r.messageExtension,
|
|
113
|
+
messageType: r.messageType,
|
|
114
|
+
messageVersion: r.messageVersion,
|
|
115
|
+
transStatus: r.transStatus,
|
|
116
|
+
transStatusReason: r.transStatusReason
|
|
117
117
|
});
|
|
118
118
|
break;
|
|
119
119
|
}
|
|
@@ -123,8 +123,8 @@ class A extends y {
|
|
|
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, a;
|
|
127
|
+
this.log(`[${this.getType()}]: onPreAuth`), (e = this.threeDsProcessor) != null && e.getTokenId() ? (a = this.threeDsProcessor) == null || a.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 y {
|
|
|
142
142
|
xid: this._paResPayload.xid
|
|
143
143
|
}, this.onSuccess, this.onError);
|
|
144
144
|
}
|
|
145
|
-
doNuveiChallenge(e,
|
|
145
|
+
doNuveiChallenge(e, a, 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" })), a && (t.firstName = a.firstName, t.lastName = a.lastName, t.email = a.email, t.country = a.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: r } = 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
|
+
r(), 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 = r;
|
|
162
162
|
}
|
|
163
163
|
messageHandler(e) {
|
|
164
|
-
var
|
|
165
|
-
if ((
|
|
164
|
+
var a, s, o;
|
|
165
|
+
if ((a = e == null ? void 0 : e.data) != null && a.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 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);
|
|
@@ -41,7 +41,7 @@ const b = { class: "modal-mask" }, U = { class: "modal-wrapper" }, A = ["src"],
|
|
|
41
41
|
const v = d.split(".")[1], P = window.atob(v), T = JSON.parse(P);
|
|
42
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
|
}
|
|
@@ -81,9 +81,9 @@ class G extends f {
|
|
|
81
81
|
c(this.container, "3D Secure URL is missing");
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
|
-
const { destroy: t } =
|
|
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-DGBgHxM1--mVa2z-I.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",
|