@payfurl/react-plugin 1.2.5 → 1.2.7
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-DAAmw4ya-CDOUGiWG.js +12 -0
- package/dist/DefaultThreeDsProvider-JPe2W_JG-bH2sJs83.js +241 -0
- package/dist/EcentricThreeDsProvider-Ddy0Fn5h-BDuqXhye.js +78 -0
- package/dist/{EpnaThreeDsProvider-KyUTPiU6-Dup0wSLA.js → EpnaThreeDsProvider-Ng4Pmq0D-CwV4TNgl.js} +3 -3
- package/dist/FlashBancThreeDsProvider-DFZG4u44-6TmQipNC.js +12 -0
- package/dist/{GPaymentsThreeDsProvider-Bq63V0gC-JMmzXEZE.js → GPaymentsThreeDsProvider-BIku3bZP-DBcRTyGA.js} +34 -37
- package/dist/MetricsGlobalThreeDsProvider-BMeP5IWW-DAZlcVCc.js +135 -0
- package/dist/NmiThreeDsProvider-CzRH7vrp-O5u5frkm.js +12 -0
- package/dist/NuveiThreeDsProvider-DMO_bgOI-DV1Uqhrk.js +165 -0
- package/dist/PayGLocalThreeDsProvider-DDqJz4iC-DBo2F6p3.js +116 -0
- package/dist/PayWayAppleButton-DVoTz5Nn-1KU6o3AT.js +173 -0
- package/dist/{PayabliThreeDsProvider-DEvztVTU-D0Tu2kWm.js → PayabliThreeDsProvider-BWStZH6E-uKWOTuW-.js} +3 -3
- package/dist/SkyBankThreeDsProvider-U6pzbMJY-B9F5E7be.js +12 -0
- package/dist/cxpay-BnpH4Q1F-CqZusCD1.js +7 -0
- package/dist/default-B8ZcE4ja-Df8foed4.js +7 -0
- package/dist/ecentric-DwR-gEaW-D7EJixv8.js +7 -0
- package/dist/epna-BtQr8Mlq-CdoA1Foj.js +7 -0
- package/dist/{flashbanc-orqI9uWg-CGe2YAfS.js → flashbanc-BNEJGUff-DX-o_bsN.js} +1 -1
- package/dist/{forter-CfW26Mkn-CmVDxLR0.js → forter-D0-GGAlC-B2I1zsvz.js} +18 -23
- package/dist/fraudProvider.type-Bzd9orn2-D-DU7Fmr.js +7 -0
- package/dist/fraudStatus.type-BvRk9kiK-zQpibcxa.js +24 -0
- package/dist/gpayments-QZCq0_0y-CChyao60.js +7 -0
- package/dist/index-BIgCRujv.js +11642 -0
- package/dist/metrics_global--mOHedmQ-BSlYrRxx.js +7 -0
- package/dist/nmi-BtKpUtad-RbToUxAS.js +7 -0
- package/dist/{nuvei-C3bePsCN-DpiXoEhL.js → nuvei-BOfZN_Em-qgP8-fGC.js} +1 -1
- package/dist/{payabli-DP-dvidH-sE0vnJA8.js → payabli-BfZ7IhDq-DQWCjgwk.js} +1 -1
- package/dist/payfurl-react.es.js +1 -1
- package/dist/payfurl-react.umd.js +26 -38
- package/dist/payglocal-CpEbJSpn-mfs00hdI.js +7 -0
- package/dist/payway_rest-CIjvQwcK-BcZGibTP.js +7 -0
- package/dist/plugins/payfurl/react/src/components/PayfurlDropin.d.ts +1 -1
- package/dist/skybank-DWPrfoAb-nBPi7AXK.js +7 -0
- package/dist/src/sdk/types/DropInOptions.type.d.ts +2 -0
- package/dist/src/sdk/types/GooglePayButtonOptions.type.d.ts +10 -0
- package/package.json +2 -2
- package/dist/CxPayThreeDsProvider-BljTEbxB-BcFsrr6m.js +0 -12
- package/dist/DefaultThreeDsProvider-DbKbN6Le-D6biiNjg.js +0 -224
- package/dist/EcentricThreeDsProvider-DjBTwEnR-DfIzyswQ.js +0 -86
- package/dist/FlashBancThreeDsProvider-DLWmBAJq-BUtBKD3J.js +0 -12
- package/dist/MetricsGlobalThreeDsProvider-Ctsa_ZKe-RCNzcDjE.js +0 -146
- package/dist/NmiThreeDsProvider-Cc9uoPqm-FlIzSZZh.js +0 -12
- package/dist/NuveiThreeDsProvider-BdJW8InS-5pNw0ile.js +0 -176
- package/dist/PayGLocalThreeDsProvider-CiKRmfOe-0iKaaG67.js +0 -127
- package/dist/PayWayAppleButton-D6R2TDKl-BPn6O17s.js +0 -157
- package/dist/SkyBankThreeDsProvider-R4NN8r-j-CVC2P28l.js +0 -12
- package/dist/cxpay-C-GgzidJ-mt2MEXxQ.js +0 -7
- package/dist/default-BoeX8PJ8-BnVkuBg7.js +0 -7
- package/dist/ecentric-CyZDsJgo-CJbgSWcp.js +0 -7
- package/dist/epna-D57kaC8G-DJM_fO0J.js +0 -7
- package/dist/fraudProvider.type-ewIWghbD-ewIWghbD.js +0 -7
- package/dist/gpayments-ZSCifuNl-BexvVC9s.js +0 -7
- package/dist/index-C2RtVqup.js +0 -14175
- package/dist/metrics_global-CQH6PsUd-CZryqcGD.js +0 -7
- package/dist/nmi-BZF7ZLQM-DXxpTgks.js +0 -7
- package/dist/payglocal-3JSRI28a-CvSL6XZn.js +0 -7
- package/dist/payway_rest-rG6pY8D4-C_7f5Bac.js +0 -7
- package/dist/skybank-xXIyqCCk-dauOla0r.js +0 -7
- /package/dist/{ThreeDsPostAuthResponse.type-CaV_50Qh-CaV_50Qh.js → ThreeDsPostAuthResponse.type-BFN9wqum-CaV_50Qh.js} +0 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var S = (t, r, e) => r in t ? d(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
|
|
3
|
+
var s = (t, r, e) => S(t, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { s as g, N as p, q as m, X as T, U as I, i as f, R as v, a as y, b as l, Z as A, e as C, f as R, D as E, Y as P, J as U } from "./index-BIgCRujv.js";
|
|
5
|
+
var _ = { class: "mask" }, b = { class: "wrapper" }, L = { class: "container" }, M = ["action"], $ = ["value"], w = /* @__PURE__ */ T(/* @__PURE__ */ I({
|
|
6
|
+
__name: "ThreeDsChallenge",
|
|
7
|
+
props: {
|
|
8
|
+
threeDSServerTransID: {},
|
|
9
|
+
acsTransID: {},
|
|
10
|
+
formAction: {}
|
|
11
|
+
},
|
|
12
|
+
emits: ["close", "submit"],
|
|
13
|
+
setup(t, { emit: r }) {
|
|
14
|
+
let e = t, a = r, o = E(() => P(e.formAction) ? e.formAction : ""), n = U(null), c = JSON.stringify({
|
|
15
|
+
threeDSServerTransID: e.threeDSServerTransID,
|
|
16
|
+
acsTransID: e.acsTransID,
|
|
17
|
+
messageVersion: "2.2.0",
|
|
18
|
+
messageType: "CReq",
|
|
19
|
+
challengeWindowSize: "01"
|
|
20
|
+
}), D = encodeURI(window.btoa(c).replace(/=*$/, ""));
|
|
21
|
+
return f(() => {
|
|
22
|
+
var i;
|
|
23
|
+
o.value && ((i = n.value) == null || i.submit());
|
|
24
|
+
}), (i, h) => (v(), y("div", _, [l("div", b, [l("div", L, [
|
|
25
|
+
A(C, {
|
|
26
|
+
onClick: h[0] || (h[0] = (H) => a("close")),
|
|
27
|
+
id: "3ds-challenge-close"
|
|
28
|
+
}),
|
|
29
|
+
h[1] || (h[1] = l("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
|
|
30
|
+
l("form", {
|
|
31
|
+
action: o.value,
|
|
32
|
+
target: "ThreeDsChallengeIFrame",
|
|
33
|
+
method: "post",
|
|
34
|
+
ref_key: "form",
|
|
35
|
+
ref: n
|
|
36
|
+
}, [l("input", {
|
|
37
|
+
type: "hidden",
|
|
38
|
+
name: "creq",
|
|
39
|
+
value: R(D)
|
|
40
|
+
}, null, 8, $)], 8, M)
|
|
41
|
+
])])]));
|
|
42
|
+
}
|
|
43
|
+
}), [["__scopeId", "data-v-07081e85"]]), k = class {
|
|
44
|
+
constructor() {
|
|
45
|
+
s(this, "iframeId", "threeDsIframeMethod");
|
|
46
|
+
s(this, "containerId", "payfurlContainerFormInvoker");
|
|
47
|
+
s(this, "iframe", null);
|
|
48
|
+
s(this, "container", null);
|
|
49
|
+
}
|
|
50
|
+
createIFrame() {
|
|
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
|
+
}
|
|
53
|
+
invoke(t, r, e, a, o) {
|
|
54
|
+
var c;
|
|
55
|
+
this.createIFrame();
|
|
56
|
+
let n = document.createElement("form");
|
|
57
|
+
n.action = t, n.target = this.iframeId, n.method = "post", (c = this.container) == null || c.appendChild(n);
|
|
58
|
+
for (let D in e) {
|
|
59
|
+
let i = document.createElement("input");
|
|
60
|
+
i.type = "hidden", i.name = D, i.value = e[D], n.appendChild(i);
|
|
61
|
+
}
|
|
62
|
+
n.submit();
|
|
63
|
+
}
|
|
64
|
+
}, x = /* @__PURE__ */ g({
|
|
65
|
+
DefaultThreeDsProvider: () => V,
|
|
66
|
+
THREE_DS_CHALLENGE_COMPLETE: () => O,
|
|
67
|
+
THREE_DS_METHOD_INVOCATION_COMPLETE: () => q
|
|
68
|
+
}), { hideSpinner: u, showSpinner: N } = m(), q = "3ds_method_invocation_complete", O = "3ds_challenge_complete", V = class {
|
|
69
|
+
constructor(t, r, e) {
|
|
70
|
+
s(this, "log");
|
|
71
|
+
s(this, "container");
|
|
72
|
+
s(this, "options");
|
|
73
|
+
s(this, "threeDsProcessor", null);
|
|
74
|
+
s(this, "threeDSDestroy", () => {
|
|
75
|
+
});
|
|
76
|
+
s(this, "threeDSServerTransID", "");
|
|
77
|
+
s(this, "threeDSAuthURL", "");
|
|
78
|
+
s(this, "threeDSRequestorTransID", "");
|
|
79
|
+
s(this, "threeDSMonitorURL", "");
|
|
80
|
+
s(this, "internalMessageHandler", this.messageHandler.bind(this));
|
|
81
|
+
s(this, "onError", (t, r) => {
|
|
82
|
+
var e, a;
|
|
83
|
+
if (this.closeChallenge(), u(), t === 404) {
|
|
84
|
+
(e = this.threeDsProcessor) == null || e.onError({ error: "This feature is only supported by ActiveServer v1.1.2+" });
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
(a = this.threeDsProcessor) == null || a.onError({
|
|
88
|
+
error: "3D Secure failed",
|
|
89
|
+
body: r
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
s(this, "onSuccess", (t, r) => {
|
|
93
|
+
var a, o;
|
|
94
|
+
this.closeChallenge(), u();
|
|
95
|
+
let e = JSON.parse(r);
|
|
96
|
+
["Y", "A"].includes(e.transStatus) ? (a = this.threeDsProcessor) == null || a.onSuccess(e) : (this.log(`[${this.getType()}]: 3D Secure failed`, e), (o = this.threeDsProcessor) == null || o.onError({ error: "3D Secure failed" }));
|
|
97
|
+
});
|
|
98
|
+
s(this, "onInitAuthSuccess", (t, r) => {
|
|
99
|
+
let e = JSON.parse(r);
|
|
100
|
+
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
|
+
this.threeDsMethodInvoke(e.threeDSServerTransID, e.threeDSMethodURL);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
this.onAuth(!1, "");
|
|
105
|
+
});
|
|
106
|
+
s(this, "onDoAuthSuccess", (t, r) => {
|
|
107
|
+
var a;
|
|
108
|
+
let e = JSON.parse(r);
|
|
109
|
+
if (this.log(`[${this.getType()}][onDoAuthSuccess]`, e), !e.transStatus) {
|
|
110
|
+
this.onError(t, "No transStatus specified");
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
switch (e.transStatus) {
|
|
114
|
+
case "C":
|
|
115
|
+
if (!e.acsURL) {
|
|
116
|
+
this.onError(t, "Invalid Challenge Url");
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
this.doChallenge(e.acsURL, e.acsTransID, e.authenticationValue);
|
|
120
|
+
break;
|
|
121
|
+
case "N":
|
|
122
|
+
this.log(`[${this.getType()}][threeDsAuth], 3DS Verification failed, transaction denied`), this.onError(400, "3DS Verification failed, transaction denied");
|
|
123
|
+
break;
|
|
124
|
+
case "U":
|
|
125
|
+
this.log(`[${this.getType()}][threeDsAuth], Unable to perform 3DS verification`), this.onError(400, "Unable to perform 3DS verification");
|
|
126
|
+
break;
|
|
127
|
+
case "R":
|
|
128
|
+
this.log(`[${this.getType()}][threeDsAuth], Unable to perform 3DS verification, rejected at issuer`), this.onError(400, "Unable to perform 3DS verification, rejected at issuer");
|
|
129
|
+
break;
|
|
130
|
+
default:
|
|
131
|
+
this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ${e.transStatus}`), (a = this.threeDsProcessor) == null || a.onSuccess({
|
|
132
|
+
threeDSServerTransID: e.threeDSServerTransID,
|
|
133
|
+
threeDSRequestorTransID: "",
|
|
134
|
+
acsRenderingType: e.acsRenderingType,
|
|
135
|
+
acsTransID: e.acsTransID,
|
|
136
|
+
authenticationType: e.authenticationType,
|
|
137
|
+
authenticationValue: e.authenticationValue,
|
|
138
|
+
challengeCancel: "",
|
|
139
|
+
dsTransID: e.dsTransID,
|
|
140
|
+
eci: e.eci,
|
|
141
|
+
interactionCounter: "",
|
|
142
|
+
messageCategory: "",
|
|
143
|
+
messageExtension: e.messageExtension,
|
|
144
|
+
messageType: e.messageType,
|
|
145
|
+
messageVersion: e.messageVersion,
|
|
146
|
+
transStatus: e.transStatus,
|
|
147
|
+
transStatusReason: e.transStatusReason
|
|
148
|
+
});
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
this.log = t, this.container = r, this.options = e;
|
|
153
|
+
}
|
|
154
|
+
getType() {
|
|
155
|
+
return "Default";
|
|
156
|
+
}
|
|
157
|
+
getDomain() {
|
|
158
|
+
return "";
|
|
159
|
+
}
|
|
160
|
+
onPreAuth() {
|
|
161
|
+
this.log(`[${this.getType()}][onPreAuth]`), this.threeDsProcessor && (N(), this.threeDsProcessor.onPreAuth(this.onInitAuthSuccess, this.onError), window.addEventListener("message", this.internalMessageHandler));
|
|
162
|
+
}
|
|
163
|
+
onAuth(t, r) {
|
|
164
|
+
var e;
|
|
165
|
+
this.log(`[${this.getType()}][onAuth]`, {
|
|
166
|
+
threeDSAuthURL: this.threeDSAuthURL,
|
|
167
|
+
threeDSRequestorTransID: this.threeDSRequestorTransID,
|
|
168
|
+
threeDSServerTransID: this.threeDSServerTransID,
|
|
169
|
+
isMethodPerformed: t
|
|
170
|
+
}), (e = this.threeDsProcessor) == null || e.onAuth(this.threeDSAuthURL, this.threeDSRequestorTransID, this.threeDSServerTransID, t, r, this.onDoAuthSuccess, this.onError);
|
|
171
|
+
}
|
|
172
|
+
onPostAuth() {
|
|
173
|
+
var t;
|
|
174
|
+
this.log(`[${this.getType()}][onPostAuth]`, { threeDSServerTransID: this.threeDSServerTransID }), (t = this.threeDsProcessor) == null || t.onPostAuth({ threeDSServerTransID: this.threeDSServerTransID }, this.onSuccess, this.onError);
|
|
175
|
+
}
|
|
176
|
+
setThreeDsProcessor(t) {
|
|
177
|
+
this.log(`[${this.getType()}][setThreeDsProcessor]`), this.threeDsProcessor = t;
|
|
178
|
+
}
|
|
179
|
+
messageHandler(t) {
|
|
180
|
+
var r, e;
|
|
181
|
+
if (!(!((r = t == null ? void 0 : t.data) != null && r.status) || ((e = t == null ? void 0 : t.data) == null ? void 0 : e.status) === "tokenise-card-failure")) {
|
|
182
|
+
if (t.data.status === "3ds_method_invocation_complete") {
|
|
183
|
+
t.stopPropagation(), this.invocationComplete(t);
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
t.data.status === "3ds_challenge_complete" && (t.stopPropagation(), this.challengeComplete(t));
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
invocationComplete(t) {
|
|
190
|
+
this.log(`[${this.getType()}]: 3Ds Method invocation complete`), this.onAuth(!0, "");
|
|
191
|
+
}
|
|
192
|
+
challengeComplete(t) {
|
|
193
|
+
this.log(`[${this.getType()}]: 3Ds Challenge complete`, t.data), this.closeChallenge();
|
|
194
|
+
let r = JSON.parse(window.atob(t.data.cres));
|
|
195
|
+
this.log(`[${this.getType()}]: cresData`, r), ["Y", "A"].includes(r.transStatus) ? this.onPostAuth() : [
|
|
196
|
+
"N",
|
|
197
|
+
"U",
|
|
198
|
+
"R"
|
|
199
|
+
].includes(r.transStatus) && (this.log(`[${this.getType()}]: Failed 3DS Challenge`, t.data), this.onError(400, "Failed 3DS Challenge"));
|
|
200
|
+
}
|
|
201
|
+
doChallenge(t, r, e) {
|
|
202
|
+
this.log(`[${this.getType()}][doChallenge]`), u();
|
|
203
|
+
let { destroy: a } = p({
|
|
204
|
+
el: document.body,
|
|
205
|
+
component: w,
|
|
206
|
+
props: {
|
|
207
|
+
threeDSServerTransID: this.threeDSServerTransID,
|
|
208
|
+
acsTransID: r,
|
|
209
|
+
formAction: t,
|
|
210
|
+
authenticationValue: e
|
|
211
|
+
},
|
|
212
|
+
on: { close: () => {
|
|
213
|
+
var o;
|
|
214
|
+
a(), this.threeDSDestroy = () => {
|
|
215
|
+
}, (o = this.threeDsProcessor) == null || o.onError({ error: "Challenge cancelled" });
|
|
216
|
+
} }
|
|
217
|
+
});
|
|
218
|
+
this.threeDSDestroy = a;
|
|
219
|
+
}
|
|
220
|
+
closeChallenge() {
|
|
221
|
+
var t;
|
|
222
|
+
(t = this.threeDSDestroy) == null || t.call(this), window.removeEventListener("message", this.internalMessageHandler);
|
|
223
|
+
}
|
|
224
|
+
threeDsMethodInvoke(t, r) {
|
|
225
|
+
this.log(`[${this.getType()}][threeDsMethodInvoke]`, {
|
|
226
|
+
threeDSServerTransID: t,
|
|
227
|
+
threeDSMethodURL: r
|
|
228
|
+
});
|
|
229
|
+
let e = {
|
|
230
|
+
threeDSServerTransID: t,
|
|
231
|
+
threeDSMethodNotificationURL: this.options.apiUrl + "/3ds/method_invocation"
|
|
232
|
+
}, a = encodeURI(window.btoa(JSON.stringify(e)).replace(/=*$/, ""));
|
|
233
|
+
new k().invoke(r, "POST", { threeDSMethodData: a });
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
export {
|
|
237
|
+
q as i,
|
|
238
|
+
x as n,
|
|
239
|
+
O as r,
|
|
240
|
+
V as t
|
|
241
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
var n = Object.defineProperty;
|
|
2
|
+
var c = (a, e, t) => e in a ? n(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
3
|
+
var h = (a, e, t) => c(a, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { N as D, X as d, U as u, i as p, R as m, a as g, b as o, Z as v, e as S, f as y, D as T, Y as f, J as I } from "./index-BIgCRujv.js";
|
|
5
|
+
import { t as P } from "./DefaultThreeDsProvider-JPe2W_JG-bH2sJs83.js";
|
|
6
|
+
var C = { class: "mask" }, A = { class: "wrapper" }, R = { class: "container" }, _ = ["action"], b = ["value"], E = /* @__PURE__ */ d(/* @__PURE__ */ u({
|
|
7
|
+
__name: "ecentric",
|
|
8
|
+
props: {
|
|
9
|
+
threeDSServerTransID: {},
|
|
10
|
+
acsTransID: {},
|
|
11
|
+
formAction: {},
|
|
12
|
+
authenticationValue: {}
|
|
13
|
+
},
|
|
14
|
+
setup(a) {
|
|
15
|
+
let e = a, t = T(() => f(e.formAction) ? e.formAction : ""), i = I(null), l = e.authenticationValue;
|
|
16
|
+
return p(() => {
|
|
17
|
+
var s;
|
|
18
|
+
t.value && ((s = i.value) == null || s.submit());
|
|
19
|
+
}), (s, r) => (m(), g("div", C, [o("div", A, [o("div", R, [
|
|
20
|
+
v(S, { onClick: r[0] || (r[0] = (V) => s.emit("close")) }),
|
|
21
|
+
r[1] || (r[1] = o("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
|
|
22
|
+
o("form", {
|
|
23
|
+
action: t.value,
|
|
24
|
+
target: "ThreeDsChallengeIFrame",
|
|
25
|
+
method: "post",
|
|
26
|
+
ref_key: "form",
|
|
27
|
+
ref: i
|
|
28
|
+
}, [o("input", {
|
|
29
|
+
type: "hidden",
|
|
30
|
+
name: "PaReq",
|
|
31
|
+
value: y(l)
|
|
32
|
+
}, null, 8, b)], 8, _)
|
|
33
|
+
])])]));
|
|
34
|
+
}
|
|
35
|
+
}), [["__scopeId", "data-v-8ededb9d"]]), U = class extends P {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(...arguments);
|
|
38
|
+
h(this, "paResPayload", "");
|
|
39
|
+
}
|
|
40
|
+
getType() {
|
|
41
|
+
return "Ecentric";
|
|
42
|
+
}
|
|
43
|
+
onPostAuth() {
|
|
44
|
+
var e;
|
|
45
|
+
this.log(`[${this.getType()}][onPostAuth]`, {
|
|
46
|
+
threeDSServerTransID: this.threeDSServerTransID,
|
|
47
|
+
authenticationValue: this.paResPayload
|
|
48
|
+
}), (e = this.threeDsProcessor) == null || e.onPostAuth({
|
|
49
|
+
threeDSServerTransID: this.threeDSServerTransID,
|
|
50
|
+
authenticationValue: this.paResPayload
|
|
51
|
+
}, this.onSuccess, this.onError);
|
|
52
|
+
}
|
|
53
|
+
doChallenge(e, t, i) {
|
|
54
|
+
this.log(`[${this.getType()}][doChallenge]`);
|
|
55
|
+
let { destroy: l } = D({
|
|
56
|
+
el: document.body,
|
|
57
|
+
component: E,
|
|
58
|
+
props: {
|
|
59
|
+
threeDSServerTransID: this.threeDSServerTransID,
|
|
60
|
+
acsTransID: t,
|
|
61
|
+
formAction: e,
|
|
62
|
+
authenticationValue: i
|
|
63
|
+
},
|
|
64
|
+
on: { close: () => {
|
|
65
|
+
var s;
|
|
66
|
+
l(), this.threeDSDestroy = () => {
|
|
67
|
+
}, (s = this.threeDsProcessor) == null || s.onError({ error: "Challenge cancelled" });
|
|
68
|
+
} }
|
|
69
|
+
});
|
|
70
|
+
this.threeDSDestroy = l;
|
|
71
|
+
}
|
|
72
|
+
challengeComplete(e) {
|
|
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
|
+
}
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
U as EcentricThreeDsProvider
|
|
78
|
+
};
|
package/dist/{EpnaThreeDsProvider-KyUTPiU6-Dup0wSLA.js → EpnaThreeDsProvider-Ng4Pmq0D-CwV4TNgl.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { t as e } from "./MetricsGlobalThreeDsProvider-BMeP5IWW-DAZlcVCc.js";
|
|
2
|
+
var t = class extends e {
|
|
3
3
|
getType() {
|
|
4
4
|
return "EPNA";
|
|
5
5
|
}
|
|
6
6
|
getDomain() {
|
|
7
7
|
return "epna.transactiongateway.com";
|
|
8
8
|
}
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
export {
|
|
11
11
|
t as EpnaThreeDsProvider
|
|
12
12
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { t as a } from "./MetricsGlobalThreeDsProvider-BMeP5IWW-DAZlcVCc.js";
|
|
2
|
+
var r = class extends a {
|
|
3
|
+
getType() {
|
|
4
|
+
return "FlashBanc";
|
|
5
|
+
}
|
|
6
|
+
getDomain() {
|
|
7
|
+
return "flashbanc.transactiongateway.com";
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
r as FlashBancThreeDsProvider
|
|
12
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
1
|
+
var o = Object.defineProperty;
|
|
2
|
+
var l = (r, e, t) => e in r ? o(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var h = (r, e, t) => l(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { N as u, Y as n, X as c, U as d, R as p, a as g, b as a, g as i, D } from "./index-BIgCRujv.js";
|
|
5
|
+
import { t as S } from "./DefaultThreeDsProvider-JPe2W_JG-bH2sJs83.js";
|
|
6
|
+
var m = { class: "mask" }, y = { class: "wrapper" }, f = ["src"], U = /* @__PURE__ */ c(/* @__PURE__ */ d({
|
|
5
7
|
__name: "GPayments",
|
|
6
8
|
props: {
|
|
7
9
|
url: {},
|
|
@@ -9,32 +11,29 @@ const m = { class: "mask" }, y = { class: "wrapper" }, f = ["src"], v = /* @__PU
|
|
|
9
11
|
height: {}
|
|
10
12
|
},
|
|
11
13
|
setup(r) {
|
|
12
|
-
|
|
14
|
+
let e = r, t = D(() => n(e.url) ? e.url : "");
|
|
13
15
|
function s() {
|
|
14
16
|
return {
|
|
15
17
|
width: `${e.width || 650}px`,
|
|
16
18
|
height: `${e.height || 400}px`
|
|
17
19
|
};
|
|
18
20
|
}
|
|
19
|
-
return (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
], 4)
|
|
30
|
-
])
|
|
31
|
-
]));
|
|
21
|
+
return (v, A) => (p(), g("div", m, [a("div", y, [a("div", {
|
|
22
|
+
class: "container",
|
|
23
|
+
style: i([s(), {
|
|
24
|
+
padding: "0",
|
|
25
|
+
margin: "0"
|
|
26
|
+
}])
|
|
27
|
+
}, [a("iframe", {
|
|
28
|
+
src: t.value,
|
|
29
|
+
style: i(s())
|
|
30
|
+
}, null, 12, f)], 4)])]));
|
|
32
31
|
}
|
|
33
|
-
}),
|
|
34
|
-
class R extends o {
|
|
32
|
+
}), [["__scopeId", "data-v-cf5aa816"]]), $ = class extends S {
|
|
35
33
|
constructor() {
|
|
36
|
-
super(...arguments)
|
|
37
|
-
|
|
34
|
+
super(...arguments);
|
|
35
|
+
h(this, "onDoAuthSuccess", (e, t) => {
|
|
36
|
+
let s = JSON.parse(t);
|
|
38
37
|
if (this.log(`[${this.getType()}][onDoAuthSuccess]`, s), !s.transStatus) {
|
|
39
38
|
this.onError(e, "No transStatus specified");
|
|
40
39
|
return;
|
|
@@ -51,8 +50,9 @@ class R extends o {
|
|
|
51
50
|
this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ${s.transStatus}`), this.onPostAuth();
|
|
52
51
|
break;
|
|
53
52
|
}
|
|
54
|
-
})
|
|
55
|
-
|
|
53
|
+
});
|
|
54
|
+
h(this, "onInitAuthSuccess", (e, t) => {
|
|
55
|
+
let s = JSON.parse(t);
|
|
56
56
|
if (this.log(`[${this.getType()}][onInitAuthSuccess]`, s), !s.threeDSAuthURL) {
|
|
57
57
|
this.onError(e, "No AuthUrl specified");
|
|
58
58
|
return;
|
|
@@ -69,20 +69,18 @@ class R extends o {
|
|
|
69
69
|
}
|
|
70
70
|
doChallenge(e) {
|
|
71
71
|
this.log(`[${this.getType()}][doChallenge]`);
|
|
72
|
-
|
|
72
|
+
let { destroy: t } = u({
|
|
73
73
|
el: document.body,
|
|
74
|
-
component:
|
|
74
|
+
component: U,
|
|
75
75
|
props: {
|
|
76
76
|
url: e,
|
|
77
77
|
width: 390,
|
|
78
78
|
height: 400
|
|
79
79
|
},
|
|
80
|
-
on: {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
}
|
|
80
|
+
on: { close: () => {
|
|
81
|
+
t(), this.threeDSDestroy = () => {
|
|
82
|
+
};
|
|
83
|
+
} }
|
|
86
84
|
});
|
|
87
85
|
this.threeDSDestroy = t;
|
|
88
86
|
}
|
|
@@ -90,12 +88,11 @@ class R extends o {
|
|
|
90
88
|
this.log(`[${this.getType()}]: 3Ds Challenge complete`, e.data), this.closeChallenge(), this.onPostAuth();
|
|
91
89
|
}
|
|
92
90
|
initFrame(e) {
|
|
93
|
-
if (this.log(`[${this.getType()}][init3DSFrame]`, e), !n(e))
|
|
94
|
-
|
|
95
|
-
const t = document.createElement("iframe");
|
|
91
|
+
if (this.log(`[${this.getType()}][init3DSFrame]`, e), !n(e)) return;
|
|
92
|
+
let t = document.createElement("iframe");
|
|
96
93
|
t.src = e, t.style.width = "1px", t.style.height = "1px", t.style.border = "0", document.body.appendChild(t);
|
|
97
94
|
}
|
|
98
|
-
}
|
|
95
|
+
};
|
|
99
96
|
export {
|
|
100
|
-
|
|
97
|
+
$ as GPaymentsThreeDsProvider
|
|
101
98
|
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
var E = Object.defineProperty;
|
|
2
|
+
var A = (n, t, e) => t in n ? E(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var g = (n, t, e) => A(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { s as v, h as m, N as T, q as L, X as b, U as f, i as _, j as N, k as x, V as G, R as I, a as $, b as d, Z as H, e as U, J as k } from "./index-BIgCRujv.js";
|
|
5
|
+
import { t as M } from "./DefaultThreeDsProvider-JPe2W_JG-bH2sJs83.js";
|
|
6
|
+
var F = { class: "mask" }, O = { class: "wrapper" }, j = { class: "container" }, R = /* @__PURE__ */ b(/* @__PURE__ */ f({
|
|
7
|
+
__name: "MetricsGlobalThreeDsChallenge",
|
|
8
|
+
emits: ["close", "submit"],
|
|
9
|
+
setup(n, { emit: t }) {
|
|
10
|
+
let e = t, s = k(!1);
|
|
11
|
+
function a(h) {
|
|
12
|
+
var r;
|
|
13
|
+
["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes((r = h.data) == null ? void 0 : r.message) && (s.value = h.data.message === "3DS_CHALLENGE_SHOW");
|
|
14
|
+
}
|
|
15
|
+
return _(() => {
|
|
16
|
+
window.addEventListener("message", a);
|
|
17
|
+
}), N(() => {
|
|
18
|
+
window.removeEventListener("message", a);
|
|
19
|
+
}), (h, r) => x((I(), $("div", F, [d("div", O, [d("div", j, [H(U, {
|
|
20
|
+
onClick: r[0] || (r[0] = (u) => e("close")),
|
|
21
|
+
id: "3ds-challenge-close"
|
|
22
|
+
}), r[1] || (r[1] = d("div", { id: "ThreeDsChallengeIFrame" }, null, -1))])])], 512)), [[G, s.value]]);
|
|
23
|
+
}
|
|
24
|
+
}), [["__scopeId", "data-v-8a0b6dcb"]]), Z = /* @__PURE__ */ v({ MetricsGlobalThreeDsProvider: () => X }), { hideSpinner: c, showSpinner: W } = L(), p = 5, X = class extends M {
|
|
25
|
+
constructor(t, e, s) {
|
|
26
|
+
var a;
|
|
27
|
+
super(t, e, s);
|
|
28
|
+
g(this, "gateway");
|
|
29
|
+
g(this, "threeDS");
|
|
30
|
+
g(this, "numAttempts", 0);
|
|
31
|
+
this.initScript(((a = s.clientParameters) == null ? void 0 : a.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 >= p) {
|
|
42
|
+
c(), m(this.container, "Error loading 3D Secure");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (!this.threeDS && this.numAttempts < p) {
|
|
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 a;
|
|
51
|
+
(a = this.threeDsProcessor) == null || a.setPaymentInfo(s), this.startAuth();
|
|
52
|
+
}, () => {
|
|
53
|
+
m(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, C, S, P, w;
|
|
62
|
+
this.log(`[${this.getType()}]: startAuth`);
|
|
63
|
+
let t = (D = this.threeDsProcessor) == null ? void 0 : D.getPaymentInfo();
|
|
64
|
+
if (!t) {
|
|
65
|
+
c(), m(this.container, "Payment information is missing");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
W();
|
|
69
|
+
let e = (y = this.threeDsProcessor) == null ? void 0 : y.getAddressInfo(), s = t.expiryDate.length === 4 ? t.expiryDate[2] + t.expiryDate[3] : "", a = t.expiryDate.length === 4 ? t.expiryDate[0] + t.expiryDate[1] : "", [h = "", r = ""] = ((C = t.cardholder) == null ? void 0 : C.split(/\s+/)) || [], u = {
|
|
70
|
+
cardNumber: t.cardNumber,
|
|
71
|
+
cardExpMonth: s,
|
|
72
|
+
cardExpYear: parseInt(a) + 2e3,
|
|
73
|
+
currency: (S = this.threeDsProcessor) == null ? void 0 : S.getCurrency(),
|
|
74
|
+
amount: (P = this.threeDsProcessor) == null ? void 0 : P.getAmount(),
|
|
75
|
+
email: (w = this.threeDsProcessor) == null ? void 0 : w.getEmail(),
|
|
76
|
+
phone: e == null ? void 0 : e.phoneNumber,
|
|
77
|
+
city: e == null ? void 0 : e.city,
|
|
78
|
+
state: e == null ? void 0 : e.state,
|
|
79
|
+
address1: e == null ? void 0 : e.streetAddress,
|
|
80
|
+
country: e == null ? void 0 : e.country,
|
|
81
|
+
firstName: (e == null ? void 0 : e.firstName) || h || "payFURL",
|
|
82
|
+
lastName: (e == null ? void 0 : e.lastName) || r || "payFURL",
|
|
83
|
+
postalCode: e == null ? void 0 : e.postalCode
|
|
84
|
+
}, l = this.threeDS.createUI(u);
|
|
85
|
+
l.start("#ThreeDsChallengeIFrame"), l.on("challenge", (o) => {
|
|
86
|
+
this.log(`[${this.getType()}][onChallenge]`, o), c(), this.showChallenge();
|
|
87
|
+
}), l.on("complete", (o) => {
|
|
88
|
+
var i;
|
|
89
|
+
this.log(`[${this.getType()}][onComplete]`, o), this.removeChallenge(), (i = this.threeDsProcessor) == null || i.onSuccess({ externalThreeDsData: o });
|
|
90
|
+
}), l.on("failure", (o) => {
|
|
91
|
+
var i;
|
|
92
|
+
this.log(`[${this.getType()}][onFailure]`, o), c(), this.closeChallenge(), (i = this.threeDsProcessor) == null || i.onError({ error: o.message });
|
|
93
|
+
}), l.on("error", (o) => {
|
|
94
|
+
var i;
|
|
95
|
+
this.log(`[${this.getType()}][error]`, o), c(), this.closeChallenge(), (i = this.threeDsProcessor) == null || i.onError({ error: o.message });
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
initScript(t) {
|
|
99
|
+
let e = document.createElement("script");
|
|
100
|
+
e.type = "text/javascript", e.src = `https://${this.getDomain()}/js/v1/Gateway.js`, e.onload = () => {
|
|
101
|
+
this.initGateway(t), this.initChallenge();
|
|
102
|
+
}, document.head.appendChild(e);
|
|
103
|
+
}
|
|
104
|
+
initGateway(t) {
|
|
105
|
+
this.gateway = window.Gateway.create(t), this.threeDS = this.gateway.get3DSecure(), this.gateway.on("error", (e) => {
|
|
106
|
+
var s;
|
|
107
|
+
this.log(`[${this.getType()}]: gateway error`, e), (s = this.threeDsProcessor) == null || s.onError({ error: e.message }), this.threeDS = null, this.numAttempts = p;
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
initChallenge() {
|
|
111
|
+
let { destroy: t } = T({
|
|
112
|
+
el: document.body,
|
|
113
|
+
component: R,
|
|
114
|
+
on: { close: () => {
|
|
115
|
+
var e;
|
|
116
|
+
this.closeChallenge(), (e = this.threeDsProcessor) == null || e.onError({ error: "Challenge cancelled" });
|
|
117
|
+
} }
|
|
118
|
+
});
|
|
119
|
+
this.threeDSDestroy = t;
|
|
120
|
+
}
|
|
121
|
+
showChallenge() {
|
|
122
|
+
window.postMessage({ message: "3DS_CHALLENGE_SHOW" }, "*");
|
|
123
|
+
}
|
|
124
|
+
closeChallenge() {
|
|
125
|
+
window.postMessage({ message: "3DS_CHALLENGE_CLOSE" }, "*");
|
|
126
|
+
}
|
|
127
|
+
removeChallenge() {
|
|
128
|
+
var t;
|
|
129
|
+
(t = this.threeDSDestroy) == null || t.call(this);
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
export {
|
|
133
|
+
Z as n,
|
|
134
|
+
X as t
|
|
135
|
+
};
|