@payfurl/react-plugin 1.2.7 → 1.3.2
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/ApplePayButtonOptions.type-BvRk9kiK-BzeTPT7u.js +9 -0
- package/dist/{DefaultThreeDsProvider-JPe2W_JG-bH2sJs83.js → DefaultThreeDsProvider-ChnRLzKI-DO_0wVUN.js} +76 -81
- package/dist/MetricsGlobalThreeDsProvider-DW-gsG6q-BYJaEFfc.js +148 -0
- package/dist/{PayWayAppleButton-DVoTz5Nn-1KU6o3AT.js → PayWayAppleButton-7Gi89Gij-aVF9l1aY.js} +2 -2
- package/dist/cxpay-CGIndAf1-BblBk3-x.js +15 -0
- package/dist/default-CgpOZU3K-CKDCWPRX.js +7 -0
- package/dist/{EcentricThreeDsProvider-Ddy0Fn5h-BDuqXhye.js → ecentric-F3nn_MwX-B9dBXDe_.js} +27 -24
- package/dist/epna-uXpYJKOA-B_n5GhIL.js +15 -0
- package/dist/flashbanc-9XKA8Wrl-CbS2P90X.js +15 -0
- package/dist/forter-Bm2GJ2Hs-BABaUju5.js +60 -0
- package/dist/{GPaymentsThreeDsProvider-BIku3bZP-DBcRTyGA.js → gpayments-DsXj9xbu-BOBji_fr.js} +15 -13
- package/dist/{index-BIgCRujv.js → index-CACzT3Rb.js} +3332 -3191
- package/dist/metrics_global-L-Rm7bcl-DYSYHN2y.js +7 -0
- package/dist/nmi-BzHX8wqW-Bq6oBsVL.js +15 -0
- package/dist/{NuveiThreeDsProvider-DMO_bgOI-DV1Uqhrk.js → nuvei-CS-nW8SB-v_HhomTx.js} +25 -23
- package/dist/payabli-C4YuB7Sr-BzB8PV73.js +15 -0
- package/dist/payfurl-react.es.js +1 -1
- package/dist/payfurl-react.umd.js +18 -17
- package/dist/payglocal-Cy6Qd8ve-NfcHP9iv.js +120 -0
- package/dist/{payway_rest-CIjvQwcK-BcZGibTP.js → payway_rest-ZMjPv2si-Dd1VuLdw.js} +1 -1
- package/dist/skybank-C6ZmVyX6-DWxUPtI7.js +15 -0
- package/dist/src/sdk/types/DropInOptions.type.d.ts +11 -3
- package/package.json +2 -2
- package/dist/CxPayThreeDsProvider-DAAmw4ya-CDOUGiWG.js +0 -12
- package/dist/EpnaThreeDsProvider-Ng4Pmq0D-CwV4TNgl.js +0 -12
- package/dist/FlashBancThreeDsProvider-DFZG4u44-6TmQipNC.js +0 -12
- package/dist/MetricsGlobalThreeDsProvider-BMeP5IWW-DAZlcVCc.js +0 -135
- package/dist/NmiThreeDsProvider-CzRH7vrp-O5u5frkm.js +0 -12
- package/dist/PayGLocalThreeDsProvider-DDqJz4iC-DBo2F6p3.js +0 -116
- package/dist/PayabliThreeDsProvider-BWStZH6E-uKWOTuW-.js +0 -12
- package/dist/SkyBankThreeDsProvider-U6pzbMJY-B9F5E7be.js +0 -12
- package/dist/ThreeDsPostAuthResponse.type-BFN9wqum-CaV_50Qh.js +0 -26
- package/dist/cxpay-BnpH4Q1F-CqZusCD1.js +0 -7
- package/dist/default-B8ZcE4ja-Df8foed4.js +0 -7
- package/dist/ecentric-DwR-gEaW-D7EJixv8.js +0 -7
- package/dist/epna-BtQr8Mlq-CdoA1Foj.js +0 -7
- package/dist/flashbanc-BNEJGUff-DX-o_bsN.js +0 -7
- package/dist/forter-D0-GGAlC-B2I1zsvz.js +0 -41
- package/dist/fraudProvider.type-Bzd9orn2-D-DU7Fmr.js +0 -7
- package/dist/fraudStatus.type-BvRk9kiK-zQpibcxa.js +0 -24
- package/dist/gpayments-QZCq0_0y-CChyao60.js +0 -7
- package/dist/metrics_global--mOHedmQ-BSlYrRxx.js +0 -7
- package/dist/nmi-BtKpUtad-RbToUxAS.js +0 -7
- package/dist/nuvei-BOfZN_Em-qgP8-fGC.js +0 -7
- package/dist/payabli-BfZ7IhDq-DQWCjgwk.js +0 -7
- package/dist/payglocal-CpEbJSpn-mfs00hdI.js +0 -7
- package/dist/skybank-DWPrfoAb-nBPi7AXK.js +0 -7
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2
|
+
__proto__: null
|
|
3
|
+
}, Symbol.toStringTag, { value: "Module" })), t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4
|
+
__proto__: null
|
|
5
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
6
|
+
export {
|
|
7
|
+
e as A,
|
|
8
|
+
t as a
|
|
9
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
var
|
|
1
|
+
var S = Object.defineProperty;
|
|
2
|
+
var g = (t, s, e) => s in t ? S(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
|
|
3
|
+
var r = (t, s, e) => g(t, typeof s != "symbol" ? s + "" : s, e);
|
|
4
|
+
import { y as p, k as m, F as T, J as u, $ as I, Q as f, K as v, s as y, V as A, a as C, Y as l, X as R, r as b, b as P, D as U, Z as $, e as w } from "./index-CACzT3Rb.js";
|
|
5
|
+
var E = { class: "mask" }, M = { class: "wrapper" }, L = { class: "container" }, k = ["action"], V = ["value"], F = /* @__PURE__ */ f(/* @__PURE__ */ v({
|
|
6
6
|
__name: "ThreeDsChallenge",
|
|
7
7
|
props: {
|
|
8
8
|
threeDSServerTransID: {},
|
|
@@ -10,102 +10,98 @@ var _ = { class: "mask" }, b = { class: "wrapper" }, L = { class: "container" },
|
|
|
10
10
|
formAction: {}
|
|
11
11
|
},
|
|
12
12
|
emits: ["close", "submit"],
|
|
13
|
-
setup(t, { emit:
|
|
14
|
-
let e = t, a =
|
|
13
|
+
setup(t, { emit: s }) {
|
|
14
|
+
let e = t, a = s, n = U(() => $(e.formAction) ? e.formAction : ""), o = w(null), c = JSON.stringify({
|
|
15
15
|
threeDSServerTransID: e.threeDSServerTransID,
|
|
16
16
|
acsTransID: e.acsTransID,
|
|
17
17
|
messageVersion: "2.2.0",
|
|
18
18
|
messageType: "CReq",
|
|
19
19
|
challengeWindowSize: "01"
|
|
20
20
|
}), D = encodeURI(window.btoa(c).replace(/=*$/, ""));
|
|
21
|
-
return
|
|
21
|
+
return y(() => {
|
|
22
22
|
var i;
|
|
23
|
-
|
|
24
|
-
}), (i, h) => (
|
|
25
|
-
|
|
26
|
-
onClick: h[0] || (h[0] = (
|
|
23
|
+
n.value && ((i = o.value) == null || i.submit());
|
|
24
|
+
}), (i, h) => (A(), C("div", E, [l("div", M, [l("div", L, [
|
|
25
|
+
R(b, {
|
|
26
|
+
onClick: h[0] || (h[0] = (N) => a("close")),
|
|
27
27
|
id: "3ds-challenge-close"
|
|
28
28
|
}),
|
|
29
29
|
h[1] || (h[1] = l("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
|
|
30
30
|
l("form", {
|
|
31
|
-
action:
|
|
31
|
+
action: n.value,
|
|
32
32
|
target: "ThreeDsChallengeIFrame",
|
|
33
33
|
method: "post",
|
|
34
34
|
ref_key: "form",
|
|
35
|
-
ref:
|
|
35
|
+
ref: o
|
|
36
36
|
}, [l("input", {
|
|
37
37
|
type: "hidden",
|
|
38
38
|
name: "creq",
|
|
39
|
-
value:
|
|
40
|
-
}, null, 8,
|
|
39
|
+
value: P(D)
|
|
40
|
+
}, null, 8, V)], 8, k)
|
|
41
41
|
])])]));
|
|
42
42
|
}
|
|
43
|
-
}), [["__scopeId", "data-v-07081e85"]]),
|
|
43
|
+
}), [["__scopeId", "data-v-07081e85"]]), _ = class {
|
|
44
44
|
constructor() {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
r(this, "iframeId", "threeDsIframeMethod");
|
|
46
|
+
r(this, "containerId", "payfurlContainerFormInvoker");
|
|
47
|
+
r(this, "iframe", null);
|
|
48
|
+
r(this, "container", null);
|
|
49
49
|
}
|
|
50
50
|
createIFrame() {
|
|
51
51
|
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));
|
|
52
52
|
}
|
|
53
|
-
invoke(t,
|
|
53
|
+
invoke(t, s, e, a, n) {
|
|
54
54
|
var c;
|
|
55
55
|
this.createIFrame();
|
|
56
|
-
let
|
|
57
|
-
|
|
56
|
+
let o = document.createElement("form");
|
|
57
|
+
o.action = t, o.target = this.iframeId, o.method = "post", (c = this.container) == null || c.appendChild(o);
|
|
58
58
|
for (let D in e) {
|
|
59
59
|
let i = document.createElement("input");
|
|
60
|
-
i.type = "hidden", i.name = D, i.value = e[D],
|
|
60
|
+
i.type = "hidden", i.name = D, i.value = e[D], o.appendChild(i);
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
s(this, "container");
|
|
72
|
-
s(this, "options");
|
|
73
|
-
s(this, "threeDsProcessor", null);
|
|
74
|
-
s(this, "threeDSDestroy", () => {
|
|
62
|
+
o.submit();
|
|
63
|
+
}
|
|
64
|
+
}, { hideSpinner: d, showSpinner: q } = I(), H = class {
|
|
65
|
+
constructor(t, s, e) {
|
|
66
|
+
r(this, "log");
|
|
67
|
+
r(this, "container");
|
|
68
|
+
r(this, "options");
|
|
69
|
+
r(this, "threeDsProcessor", null);
|
|
70
|
+
r(this, "threeDSDestroy", () => {
|
|
75
71
|
});
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
72
|
+
r(this, "threeDSServerTransID", "");
|
|
73
|
+
r(this, "threeDSAuthURL", "");
|
|
74
|
+
r(this, "threeDSRequestorTransID", "");
|
|
75
|
+
r(this, "threeDSMonitorURL", "");
|
|
76
|
+
r(this, "internalMessageHandler", this.messageHandler.bind(this));
|
|
77
|
+
r(this, "onError", (t, s) => {
|
|
82
78
|
var e, a;
|
|
83
|
-
if (this.closeChallenge(),
|
|
79
|
+
if (this.closeChallenge(), d(), t === 404) {
|
|
84
80
|
(e = this.threeDsProcessor) == null || e.onError({ error: "This feature is only supported by ActiveServer v1.1.2+" });
|
|
85
81
|
return;
|
|
86
82
|
}
|
|
87
83
|
(a = this.threeDsProcessor) == null || a.onError({
|
|
88
|
-
error:
|
|
89
|
-
body:
|
|
84
|
+
error: u,
|
|
85
|
+
body: s
|
|
90
86
|
});
|
|
91
87
|
});
|
|
92
|
-
|
|
93
|
-
var a,
|
|
94
|
-
this.closeChallenge(),
|
|
95
|
-
let e = JSON.parse(
|
|
96
|
-
["Y", "A"].includes(e.transStatus) ? (a = this.threeDsProcessor) == null || a.onSuccess(e) : (this.log(`[${this.getType()}]:
|
|
88
|
+
r(this, "onSuccess", (t, s) => {
|
|
89
|
+
var a, n;
|
|
90
|
+
this.closeChallenge(), d();
|
|
91
|
+
let e = JSON.parse(s);
|
|
92
|
+
["Y", "A"].includes(e.transStatus) ? (a = this.threeDsProcessor) == null || a.onSuccess(e) : (this.log(`[${this.getType()}]: ${u}`, e), (n = this.threeDsProcessor) == null || n.onError({ error: u }));
|
|
97
93
|
});
|
|
98
|
-
|
|
99
|
-
let e = JSON.parse(
|
|
94
|
+
r(this, "onInitAuthSuccess", (t, s) => {
|
|
95
|
+
let e = JSON.parse(s);
|
|
100
96
|
if (this.log(`[${this.getType()}][onInitAuthSuccess]`, e), this.threeDSRequestorTransID = e.threeDSRequestorTransID, this.threeDSServerTransID = e.threeDSServerTransID, this.threeDSMonitorURL = e.threeDSMonitorURL, this.threeDSAuthURL = e.threeDSAuthURL, e.threeDSMethodURL) {
|
|
101
97
|
this.threeDsMethodInvoke(e.threeDSServerTransID, e.threeDSMethodURL);
|
|
102
98
|
return;
|
|
103
99
|
}
|
|
104
100
|
this.onAuth(!1, "");
|
|
105
101
|
});
|
|
106
|
-
|
|
102
|
+
r(this, "onDoAuthSuccess", (t, s) => {
|
|
107
103
|
var a;
|
|
108
|
-
let e = JSON.parse(
|
|
104
|
+
let e = JSON.parse(s);
|
|
109
105
|
if (this.log(`[${this.getType()}][onDoAuthSuccess]`, e), !e.transStatus) {
|
|
110
106
|
this.onError(t, "No transStatus specified");
|
|
111
107
|
return;
|
|
@@ -146,10 +142,9 @@ var _ = { class: "mask" }, b = { class: "wrapper" }, L = { class: "container" },
|
|
|
146
142
|
transStatus: e.transStatus,
|
|
147
143
|
transStatusReason: e.transStatusReason
|
|
148
144
|
});
|
|
149
|
-
break;
|
|
150
145
|
}
|
|
151
146
|
});
|
|
152
|
-
this.log = t, this.container =
|
|
147
|
+
this.log = t, this.container = s, this.options = e;
|
|
153
148
|
}
|
|
154
149
|
getType() {
|
|
155
150
|
return "Default";
|
|
@@ -158,16 +153,16 @@ var _ = { class: "mask" }, b = { class: "wrapper" }, L = { class: "container" },
|
|
|
158
153
|
return "";
|
|
159
154
|
}
|
|
160
155
|
onPreAuth() {
|
|
161
|
-
this.log(`[${this.getType()}][onPreAuth]`), this.threeDsProcessor && (
|
|
156
|
+
this.log(`[${this.getType()}][onPreAuth]`), this.threeDsProcessor && (q(), this.threeDsProcessor.onPreAuth(this.onInitAuthSuccess, this.onError), window.addEventListener("message", this.internalMessageHandler));
|
|
162
157
|
}
|
|
163
|
-
onAuth(t,
|
|
158
|
+
onAuth(t, s) {
|
|
164
159
|
var e;
|
|
165
160
|
this.log(`[${this.getType()}][onAuth]`, {
|
|
166
161
|
threeDSAuthURL: this.threeDSAuthURL,
|
|
167
162
|
threeDSRequestorTransID: this.threeDSRequestorTransID,
|
|
168
163
|
threeDSServerTransID: this.threeDSServerTransID,
|
|
169
164
|
isMethodPerformed: t
|
|
170
|
-
}), (e = this.threeDsProcessor) == null || e.onAuth(this.threeDSAuthURL, this.threeDSRequestorTransID, this.threeDSServerTransID, t,
|
|
165
|
+
}), (e = this.threeDsProcessor) == null || e.onAuth(this.threeDSAuthURL, this.threeDSRequestorTransID, this.threeDSServerTransID, t, s, this.onDoAuthSuccess, this.onError);
|
|
171
166
|
}
|
|
172
167
|
onPostAuth() {
|
|
173
168
|
var t;
|
|
@@ -177,8 +172,8 @@ var _ = { class: "mask" }, b = { class: "wrapper" }, L = { class: "container" },
|
|
|
177
172
|
this.log(`[${this.getType()}][setThreeDsProcessor]`), this.threeDsProcessor = t;
|
|
178
173
|
}
|
|
179
174
|
messageHandler(t) {
|
|
180
|
-
var
|
|
181
|
-
if (
|
|
175
|
+
var s, e;
|
|
176
|
+
if ((s = t == null ? void 0 : t.data) != null && s.status && ((e = t == null ? void 0 : t.data) == null ? void 0 : e.status) !== "tokenise-card-failure") {
|
|
182
177
|
if (t.data.status === "3ds_method_invocation_complete") {
|
|
183
178
|
t.stopPropagation(), this.invocationComplete(t);
|
|
184
179
|
return;
|
|
@@ -191,51 +186,51 @@ var _ = { class: "mask" }, b = { class: "wrapper" }, L = { class: "container" },
|
|
|
191
186
|
}
|
|
192
187
|
challengeComplete(t) {
|
|
193
188
|
this.log(`[${this.getType()}]: 3Ds Challenge complete`, t.data), this.closeChallenge();
|
|
194
|
-
let
|
|
195
|
-
this.log(`[${this.getType()}]: cresData`,
|
|
189
|
+
let s = JSON.parse(window.atob(t.data.cres));
|
|
190
|
+
this.log(`[${this.getType()}]: cresData`, s), ["Y", "A"].includes(s.transStatus) ? this.onPostAuth() : [
|
|
196
191
|
"N",
|
|
197
192
|
"U",
|
|
198
193
|
"R"
|
|
199
|
-
].includes(
|
|
194
|
+
].includes(s.transStatus) && (this.log(`[${this.getType()}]: Failed 3DS Challenge`, t.data), this.onError(400, "Failed 3DS Challenge"));
|
|
195
|
+
}
|
|
196
|
+
setChallengeFrameVisible(t) {
|
|
197
|
+
window.self !== window.top && window.parent.postMessage({ status: t ? p : m }, "*");
|
|
200
198
|
}
|
|
201
|
-
doChallenge(t,
|
|
202
|
-
this.log(`[${this.getType()}][doChallenge]`),
|
|
203
|
-
let { destroy: a } =
|
|
199
|
+
doChallenge(t, s, e) {
|
|
200
|
+
this.log(`[${this.getType()}][doChallenge]`), d(), this.setChallengeFrameVisible(!0);
|
|
201
|
+
let { destroy: a } = T({
|
|
204
202
|
el: document.body,
|
|
205
|
-
component:
|
|
203
|
+
component: F,
|
|
206
204
|
props: {
|
|
207
205
|
threeDSServerTransID: this.threeDSServerTransID,
|
|
208
|
-
acsTransID:
|
|
206
|
+
acsTransID: s,
|
|
209
207
|
formAction: t,
|
|
210
208
|
authenticationValue: e
|
|
211
209
|
},
|
|
212
210
|
on: { close: () => {
|
|
213
|
-
var
|
|
211
|
+
var n;
|
|
214
212
|
a(), this.threeDSDestroy = () => {
|
|
215
|
-
}, (
|
|
213
|
+
}, (n = this.threeDsProcessor) == null || n.onError({ error: "Challenge cancelled" });
|
|
216
214
|
} }
|
|
217
215
|
});
|
|
218
216
|
this.threeDSDestroy = a;
|
|
219
217
|
}
|
|
220
218
|
closeChallenge() {
|
|
221
219
|
var t;
|
|
222
|
-
(t = this.threeDSDestroy) == null || t.call(this), window.removeEventListener("message", this.internalMessageHandler);
|
|
220
|
+
(t = this.threeDSDestroy) == null || t.call(this), this.setChallengeFrameVisible(!1), window.removeEventListener("message", this.internalMessageHandler);
|
|
223
221
|
}
|
|
224
|
-
threeDsMethodInvoke(t,
|
|
222
|
+
threeDsMethodInvoke(t, s) {
|
|
225
223
|
this.log(`[${this.getType()}][threeDsMethodInvoke]`, {
|
|
226
224
|
threeDSServerTransID: t,
|
|
227
|
-
threeDSMethodURL:
|
|
225
|
+
threeDSMethodURL: s
|
|
228
226
|
});
|
|
229
227
|
let e = {
|
|
230
228
|
threeDSServerTransID: t,
|
|
231
229
|
threeDSMethodNotificationURL: this.options.apiUrl + "/3ds/method_invocation"
|
|
232
230
|
}, a = encodeURI(window.btoa(JSON.stringify(e)).replace(/=*$/, ""));
|
|
233
|
-
new
|
|
231
|
+
new _().invoke(s, "POST", { threeDSMethodData: a });
|
|
234
232
|
}
|
|
235
233
|
};
|
|
236
234
|
export {
|
|
237
|
-
|
|
238
|
-
x as n,
|
|
239
|
-
O as r,
|
|
240
|
-
V as t
|
|
235
|
+
H as O
|
|
241
236
|
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
var v = Object.defineProperty;
|
|
2
|
+
var f = (n, t, e) => t in n ? v(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var g = (n, t, e) => f(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { h as d, i as T, F as L, $ as _, Q as x, K as N, s as $, f as G, A as I, j as F, V as H, a as O, Y as m, X as M, r as V, e as j } from "./index-CACzT3Rb.js";
|
|
5
|
+
import { O as k } from "./DefaultThreeDsProvider-ChnRLzKI-DO_0wVUN.js";
|
|
6
|
+
var K = { class: "mask" }, U = { class: "wrapper" }, W = { class: "container" }, Y = /* @__PURE__ */ x(/* @__PURE__ */ N({
|
|
7
|
+
__name: "MetricsGlobalThreeDsChallenge",
|
|
8
|
+
emits: ["close", "submit"],
|
|
9
|
+
setup(n, { emit: t }) {
|
|
10
|
+
let e = t, s = j(!1);
|
|
11
|
+
function r(l) {
|
|
12
|
+
var a;
|
|
13
|
+
["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes((a = l.data) == null ? void 0 : a.message) && (s.value = l.data.message === "3DS_CHALLENGE_SHOW");
|
|
14
|
+
}
|
|
15
|
+
return $(() => {
|
|
16
|
+
window.addEventListener("message", r);
|
|
17
|
+
}), G(() => {
|
|
18
|
+
window.removeEventListener("message", r);
|
|
19
|
+
}), (l, a) => I((H(), O("div", K, [m("div", U, [m("div", W, [M(V, {
|
|
20
|
+
onClick: a[0] || (a[0] = (p) => e("close")),
|
|
21
|
+
id: "3ds-challenge-close"
|
|
22
|
+
}), a[1] || (a[1] = m("div", { id: "ThreeDsChallengeIFrame" }, null, -1))])])], 512)), [[F, s.value]]);
|
|
23
|
+
}
|
|
24
|
+
}), [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: h, showSpinner: J } = _(), u = 5, X = class extends k {
|
|
25
|
+
constructor(t, e, s) {
|
|
26
|
+
var r;
|
|
27
|
+
super(t, e, s);
|
|
28
|
+
g(this, "gateway");
|
|
29
|
+
g(this, "threeDS");
|
|
30
|
+
g(this, "numAttempts", 0);
|
|
31
|
+
this.initScript(((r = s.clientParameters) == null ? void 0 : r.PublicKey) || "");
|
|
32
|
+
}
|
|
33
|
+
getType() {
|
|
34
|
+
return "MetricsGlobal";
|
|
35
|
+
}
|
|
36
|
+
getDomain() {
|
|
37
|
+
return "secure.metricsglobalgateway.com";
|
|
38
|
+
}
|
|
39
|
+
onPreAuth() {
|
|
40
|
+
var t, e;
|
|
41
|
+
if (this.log(`[${this.getType()}]: onPreAuth`), !this.threeDS && this.numAttempts >= u) {
|
|
42
|
+
h(), d(this.container, "Error loading 3D Secure");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (!this.threeDS && this.numAttempts < u) {
|
|
46
|
+
this.numAttempts++, this.log(`[${this.getType()}]: 3DS not ready, retrying in 1s`), setTimeout(() => this.onPreAuth(), 1e3);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
(t = this.threeDsProcessor) != null && t.getTokenId() ? (e = this.threeDsProcessor) == null || e.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (s) => {
|
|
50
|
+
var r;
|
|
51
|
+
(r = this.threeDsProcessor) == null || r.setPaymentInfo(s), this.startAuth();
|
|
52
|
+
}, () => {
|
|
53
|
+
d(this.container, "Unable to get card information");
|
|
54
|
+
}) : this.startAuth();
|
|
55
|
+
}
|
|
56
|
+
onAuth(t, e) {
|
|
57
|
+
}
|
|
58
|
+
onPostAuth() {
|
|
59
|
+
}
|
|
60
|
+
startAuth() {
|
|
61
|
+
var D, y, w, C, S, A, E;
|
|
62
|
+
this.log(`[${this.getType()}]: startAuth`);
|
|
63
|
+
let t = (D = this.threeDsProcessor) == null ? void 0 : D.getPaymentInfo();
|
|
64
|
+
if (!t) {
|
|
65
|
+
h(), d(this.container, "Payment information is missing");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
J();
|
|
69
|
+
let e = (y = this.threeDsProcessor) == null ? void 0 : y.getAddressInfo(), s = t.expiryDate.length === 4 ? t.expiryDate.slice(2, 4) : "", r = t.expiryDate.length === 4 ? t.expiryDate.slice(0, 2) : "", [l = "", a = ""] = ((w = t.cardholder) == null ? void 0 : w.split(/\s+/)) || [], p = ((C = this.threeDsProcessor) == null ? void 0 : C.getCurrency()) || "", P = ((S = this.threeDsProcessor) == null ? void 0 : S.getAmount()) || 0;
|
|
70
|
+
if (!s || !r) {
|
|
71
|
+
h(), d(this.container, "Card expiry date is invalid"), (A = this.threeDsProcessor) == null || A.onError({ error: "Card expiry date is invalid" });
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
let b = {
|
|
75
|
+
cardNumber: t.cardNumber,
|
|
76
|
+
cardExpMonth: s,
|
|
77
|
+
cardExpYear: String(parseInt(r, 10) + 2e3),
|
|
78
|
+
currency: p,
|
|
79
|
+
amount: P.toFixed(2),
|
|
80
|
+
email: (E = this.threeDsProcessor) == null ? void 0 : E.getEmail(),
|
|
81
|
+
phone: e == null ? void 0 : e.phoneNumber,
|
|
82
|
+
city: e == null ? void 0 : e.city,
|
|
83
|
+
state: e == null ? void 0 : e.state,
|
|
84
|
+
address1: e == null ? void 0 : e.streetAddress,
|
|
85
|
+
country: e == null ? void 0 : e.country,
|
|
86
|
+
firstName: (e == null ? void 0 : e.firstName) || l || "payFURL",
|
|
87
|
+
lastName: (e == null ? void 0 : e.lastName) || a || "payFURL",
|
|
88
|
+
postalCode: e == null ? void 0 : e.postalCode,
|
|
89
|
+
deviceChannel: "02",
|
|
90
|
+
browserJavascriptEnabled: !0,
|
|
91
|
+
browserJavaEnabled: !1,
|
|
92
|
+
browserLanguage: window.navigator.language,
|
|
93
|
+
browserColorDepth: String(T()),
|
|
94
|
+
browserScreenHeight: String(screen.height),
|
|
95
|
+
browserScreenWidth: String(screen.width),
|
|
96
|
+
browserTimeZone: String(Math.round((/* @__PURE__ */ new Date()).getTimezoneOffset() / 60)),
|
|
97
|
+
userAgent: navigator.userAgent
|
|
98
|
+
}, c = this.threeDS.createUI(b);
|
|
99
|
+
c.start("#ThreeDsChallengeIFrame"), c.on("challenge", (i) => {
|
|
100
|
+
this.log(`[${this.getType()}][onChallenge]`, i), h(), this.showChallenge();
|
|
101
|
+
}), c.on("complete", (i) => {
|
|
102
|
+
var o;
|
|
103
|
+
this.log(`[${this.getType()}][onComplete]`, i), this.removeChallenge(), (o = this.threeDsProcessor) == null || o.onSuccess({ externalThreeDsData: i });
|
|
104
|
+
}), c.on("failure", (i) => {
|
|
105
|
+
var o;
|
|
106
|
+
this.log(`[${this.getType()}][onFailure]`, i), h(), this.closeChallenge(), (o = this.threeDsProcessor) == null || o.onError({ error: i.message });
|
|
107
|
+
}), c.on("error", (i) => {
|
|
108
|
+
var o;
|
|
109
|
+
this.log(`[${this.getType()}][error]`, i), h(), this.closeChallenge(), (o = this.threeDsProcessor) == null || o.onError({ error: i.message });
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
initScript(t) {
|
|
113
|
+
let e = document.createElement("script");
|
|
114
|
+
e.type = "text/javascript", e.src = `https://${this.getDomain()}/js/v1/Gateway.js`, e.onload = () => {
|
|
115
|
+
this.initGateway(t), this.initChallenge();
|
|
116
|
+
}, document.head.appendChild(e);
|
|
117
|
+
}
|
|
118
|
+
initGateway(t) {
|
|
119
|
+
this.gateway = window.Gateway.create(t), this.threeDS = this.gateway.get3DSecure(), this.gateway.on("error", (e) => {
|
|
120
|
+
var s;
|
|
121
|
+
this.log(`[${this.getType()}]: gateway error`, e), (s = this.threeDsProcessor) == null || s.onError({ error: e.message }), this.threeDS = null, this.numAttempts = u;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
initChallenge() {
|
|
125
|
+
let { destroy: t } = L({
|
|
126
|
+
el: document.body,
|
|
127
|
+
component: Y,
|
|
128
|
+
on: { close: () => {
|
|
129
|
+
var e;
|
|
130
|
+
this.closeChallenge(), (e = this.threeDsProcessor) == null || e.onError({ error: "Challenge cancelled" });
|
|
131
|
+
} }
|
|
132
|
+
});
|
|
133
|
+
this.threeDSDestroy = t;
|
|
134
|
+
}
|
|
135
|
+
showChallenge() {
|
|
136
|
+
this.setChallengeFrameVisible(!0), window.postMessage({ message: "3DS_CHALLENGE_SHOW" }, "*");
|
|
137
|
+
}
|
|
138
|
+
closeChallenge() {
|
|
139
|
+
this.setChallengeFrameVisible(!1), window.postMessage({ message: "3DS_CHALLENGE_CLOSE" }, "*");
|
|
140
|
+
}
|
|
141
|
+
removeChallenge() {
|
|
142
|
+
var t;
|
|
143
|
+
(t = this.threeDSDestroy) == null || t.call(this);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
export {
|
|
147
|
+
X as w
|
|
148
|
+
};
|
package/dist/{PayWayAppleButton-DVoTz5Nn-1KU6o3AT.js → PayWayAppleButton-7Gi89Gij-aVF9l1aY.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var m = Object.defineProperty;
|
|
2
2
|
var g = (t, e, r) => e in t ? m(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
3
|
var i = (t, e, r) => g(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
-
import { d as b, p as A, c as v } from "./index-
|
|
4
|
+
import { d as b, p as A, c as v } from "./index-CACzT3Rb.js";
|
|
5
5
|
var l = {
|
|
6
6
|
CHECKOUT: "CHECKOUT",
|
|
7
7
|
CHARGE: "CHARGE"
|
|
@@ -46,7 +46,7 @@ var l = {
|
|
|
46
46
|
this.validator.style.display = "block";
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
|
-
this.validator.style.display = "none", this.validationError.style.display = "none";
|
|
49
|
+
this.validator.style.display = "none", this.validationError && (this.validationError.style.display = "none");
|
|
50
50
|
}
|
|
51
51
|
}, 1e3);
|
|
52
52
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { w as n } from "./MetricsGlobalThreeDsProvider-DW-gsG6q-BYJaEFfc.js";
|
|
2
|
+
var r = class extends n {
|
|
3
|
+
getType() {
|
|
4
|
+
return "CxPay";
|
|
5
|
+
}
|
|
6
|
+
getDomain() {
|
|
7
|
+
return "cxpay.transactiongateway.com";
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
function c(t, e, a) {
|
|
11
|
+
return new r(t, e, a);
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
c as default
|
|
15
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var c = (
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
var
|
|
1
|
+
var h = Object.defineProperty;
|
|
2
|
+
var c = (t, e, a) => e in t ? h(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
|
|
3
|
+
var i = (t, e, a) => c(t, typeof e != "symbol" ? e + "" : e, a);
|
|
4
|
+
import { F as u, Q as d, K as D, s as p, V as m, a as g, Y as o, X as S, r as v, b as y, D as T, Z as f, e as C } from "./index-CACzT3Rb.js";
|
|
5
|
+
import { O as I } from "./DefaultThreeDsProvider-ChnRLzKI-DO_0wVUN.js";
|
|
6
|
+
var P = { class: "mask" }, V = { class: "wrapper" }, A = { class: "container" }, F = ["action"], b = ["value"], _ = /* @__PURE__ */ d(/* @__PURE__ */ D({
|
|
7
7
|
__name: "ecentric",
|
|
8
8
|
props: {
|
|
9
9
|
threeDSServerTransID: {},
|
|
@@ -11,31 +11,31 @@ var C = { class: "mask" }, A = { class: "wrapper" }, R = { class: "container" },
|
|
|
11
11
|
formAction: {},
|
|
12
12
|
authenticationValue: {}
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
let e =
|
|
14
|
+
setup(t) {
|
|
15
|
+
let e = t, a = T(() => f(e.formAction) ? e.formAction : ""), n = C(null), l = e.authenticationValue;
|
|
16
16
|
return p(() => {
|
|
17
17
|
var s;
|
|
18
|
-
|
|
19
|
-
}), (s, r) => (m(), g("div",
|
|
20
|
-
v
|
|
18
|
+
a.value && ((s = n.value) == null || s.submit());
|
|
19
|
+
}), (s, r) => (m(), g("div", P, [o("div", V, [o("div", A, [
|
|
20
|
+
S(v, { onClick: r[0] || (r[0] = ($) => s.emit("close")) }),
|
|
21
21
|
r[1] || (r[1] = o("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
|
|
22
22
|
o("form", {
|
|
23
|
-
action:
|
|
23
|
+
action: a.value,
|
|
24
24
|
target: "ThreeDsChallengeIFrame",
|
|
25
25
|
method: "post",
|
|
26
26
|
ref_key: "form",
|
|
27
|
-
ref:
|
|
27
|
+
ref: n
|
|
28
28
|
}, [o("input", {
|
|
29
29
|
type: "hidden",
|
|
30
30
|
name: "PaReq",
|
|
31
31
|
value: y(l)
|
|
32
|
-
}, null, 8, b)], 8,
|
|
32
|
+
}, null, 8, b)], 8, F)
|
|
33
33
|
])])]));
|
|
34
34
|
}
|
|
35
|
-
}), [["__scopeId", "data-v-8ededb9d"]]),
|
|
35
|
+
}), [["__scopeId", "data-v-8ededb9d"]]), R = class extends I {
|
|
36
36
|
constructor() {
|
|
37
37
|
super(...arguments);
|
|
38
|
-
|
|
38
|
+
i(this, "paResPayload", "");
|
|
39
39
|
}
|
|
40
40
|
getType() {
|
|
41
41
|
return "Ecentric";
|
|
@@ -50,20 +50,20 @@ var C = { class: "mask" }, A = { class: "wrapper" }, R = { class: "container" },
|
|
|
50
50
|
authenticationValue: this.paResPayload
|
|
51
51
|
}, this.onSuccess, this.onError);
|
|
52
52
|
}
|
|
53
|
-
doChallenge(e,
|
|
54
|
-
this.log(`[${this.getType()}][doChallenge]`);
|
|
55
|
-
let { destroy: l } =
|
|
53
|
+
doChallenge(e, a, n) {
|
|
54
|
+
this.log(`[${this.getType()}][doChallenge]`), this.setChallengeFrameVisible(!0);
|
|
55
|
+
let { destroy: l } = u({
|
|
56
56
|
el: document.body,
|
|
57
|
-
component:
|
|
57
|
+
component: _,
|
|
58
58
|
props: {
|
|
59
59
|
threeDSServerTransID: this.threeDSServerTransID,
|
|
60
|
-
acsTransID:
|
|
60
|
+
acsTransID: a,
|
|
61
61
|
formAction: e,
|
|
62
|
-
authenticationValue:
|
|
62
|
+
authenticationValue: n
|
|
63
63
|
},
|
|
64
64
|
on: { close: () => {
|
|
65
65
|
var s;
|
|
66
|
-
l(), this.threeDSDestroy = () => {
|
|
66
|
+
l(), this.setChallengeFrameVisible(!1), this.threeDSDestroy = () => {
|
|
67
67
|
}, (s = this.threeDsProcessor) == null || s.onError({ error: "Challenge cancelled" });
|
|
68
68
|
} }
|
|
69
69
|
});
|
|
@@ -73,6 +73,9 @@ var C = { class: "mask" }, A = { class: "wrapper" }, R = { class: "container" },
|
|
|
73
73
|
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"));
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
+
function K(t, e, a) {
|
|
77
|
+
return new R(t, e, a);
|
|
78
|
+
}
|
|
76
79
|
export {
|
|
77
|
-
|
|
80
|
+
K as default
|
|
78
81
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { w as r } from "./MetricsGlobalThreeDsProvider-DW-gsG6q-BYJaEFfc.js";
|
|
2
|
+
var a = class extends r {
|
|
3
|
+
getType() {
|
|
4
|
+
return "EPNA";
|
|
5
|
+
}
|
|
6
|
+
getDomain() {
|
|
7
|
+
return "epna.transactiongateway.com";
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
function s(t, e, n) {
|
|
11
|
+
return new a(t, e, n);
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
s as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { w as e } from "./MetricsGlobalThreeDsProvider-DW-gsG6q-BYJaEFfc.js";
|
|
2
|
+
var r = class extends e {
|
|
3
|
+
getType() {
|
|
4
|
+
return "FlashBanc";
|
|
5
|
+
}
|
|
6
|
+
getDomain() {
|
|
7
|
+
return "flashbanc.transactiongateway.com";
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
function s(t, a, n) {
|
|
11
|
+
return new r(t, a, n);
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
s as default
|
|
15
|
+
};
|