@payfurl/client 4.1.2 → 4.2.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/sdk/ThreeDsInitResponse.type-06482849.mjs +15 -0
- package/dist/sdk/ThreeDsPostAuthResponse.type-3091950f.mjs +26 -0
- package/dist/sdk/default-f76b9795.mjs +179 -0
- package/dist/sdk/ecentric-eb09b5e1.mjs +170 -0
- package/dist/sdk/forter-8a12fcbe.mjs +45 -0
- package/dist/sdk/fraudProvider.type-c77ee71c.mjs +7 -0
- package/dist/sdk/gpayments-10ce59bc.mjs +141 -0
- package/dist/sdk/main-5bf95a96.mjs +7352 -0
- package/dist/sdk/payfurl.es.js +2 -6994
- package/dist/sdk/payfurl.umd.js +15 -7
- package/dist/sdk/style.css +1 -1
- package/dist/sdk/visa.svg +87 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
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" })), o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6
|
+
__proto__: null
|
|
7
|
+
}, Symbol.toStringTag, { value: "Module" })), r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8
|
+
__proto__: null
|
|
9
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
10
|
+
export {
|
|
11
|
+
o as T,
|
|
12
|
+
t as a,
|
|
13
|
+
r as b,
|
|
14
|
+
e as f
|
|
15
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
function e() {
|
|
2
|
+
return {
|
|
3
|
+
acsRenderingType: {
|
|
4
|
+
acsInterface: "",
|
|
5
|
+
acsUiTemplate: ""
|
|
6
|
+
},
|
|
7
|
+
acsTransID: "",
|
|
8
|
+
authenticationType: "",
|
|
9
|
+
authenticationValue: "",
|
|
10
|
+
challengeCancel: "",
|
|
11
|
+
dsTransID: "",
|
|
12
|
+
eci: "",
|
|
13
|
+
interactionCounter: "",
|
|
14
|
+
messageCategory: "",
|
|
15
|
+
messageExtension: [],
|
|
16
|
+
messageType: "",
|
|
17
|
+
messageVersion: "",
|
|
18
|
+
threeDSRequestorTransID: "",
|
|
19
|
+
threeDSServerTransID: "",
|
|
20
|
+
transStatus: "Y",
|
|
21
|
+
transStatusReason: ""
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
e as getEmptySuccessThreeDsPostAuthResponse
|
|
26
|
+
};
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { d as v, r as A, o as C, a as y, c as R, b as c, e as b, C as U, u as w, p as k, f as N, _ as E, F as L, g as V } from "./main-5bf95a96.mjs";
|
|
2
|
+
const M = (t) => (k("data-v-fa2e3c62"), t = t(), N(), t), q = { class: "mask" }, x = { class: "wrapper" }, O = { class: "container" }, F = /* @__PURE__ */ M(() => /* @__PURE__ */ c("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)), J = ["action"], B = ["value"], $ = /* @__PURE__ */ v({
|
|
3
|
+
__name: "ThreeDsChallenge",
|
|
4
|
+
props: {
|
|
5
|
+
threeDSServerTransID: null,
|
|
6
|
+
acsTransID: null,
|
|
7
|
+
formAction: null
|
|
8
|
+
},
|
|
9
|
+
emits: ["close", "submit"],
|
|
10
|
+
setup(t, { emit: n }) {
|
|
11
|
+
const e = t, o = A(null), u = JSON.stringify({
|
|
12
|
+
threeDSServerTransID: e.threeDSServerTransID,
|
|
13
|
+
acsTransID: e.acsTransID,
|
|
14
|
+
messageVersion: "2.1.0",
|
|
15
|
+
messageType: "CReq",
|
|
16
|
+
challengeWindowSize: "01"
|
|
17
|
+
}), T = encodeURI(window.btoa(u).replace(/=*$/, ""));
|
|
18
|
+
return C(() => {
|
|
19
|
+
var d;
|
|
20
|
+
(d = o.value) == null || d.submit();
|
|
21
|
+
}), (d, p) => (y(), R("div", q, [
|
|
22
|
+
c("div", x, [
|
|
23
|
+
c("div", O, [
|
|
24
|
+
b(U, {
|
|
25
|
+
onClick: p[0] || (p[0] = (Z) => n("close")),
|
|
26
|
+
id: "3ds-challenge-close"
|
|
27
|
+
}),
|
|
28
|
+
F,
|
|
29
|
+
c("form", {
|
|
30
|
+
action: e.formAction,
|
|
31
|
+
target: "ThreeDsChallengeIFrame",
|
|
32
|
+
method: "post",
|
|
33
|
+
ref_key: "form",
|
|
34
|
+
ref: o
|
|
35
|
+
}, [
|
|
36
|
+
c("input", {
|
|
37
|
+
type: "hidden",
|
|
38
|
+
name: "creq",
|
|
39
|
+
value: w(T)
|
|
40
|
+
}, null, 8, B)
|
|
41
|
+
], 8, J)
|
|
42
|
+
])
|
|
43
|
+
])
|
|
44
|
+
]));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
const j = /* @__PURE__ */ E($, [["__scopeId", "data-v-fa2e3c62"]]);
|
|
48
|
+
let h = null, D, Y = null, a = null, m = "", i = "", g = "", z, l = null;
|
|
49
|
+
function s(t, ...n) {
|
|
50
|
+
h && h(t, n);
|
|
51
|
+
}
|
|
52
|
+
function H() {
|
|
53
|
+
s("init authentication"), a == null || a.onPreAuth(K, r), window.addEventListener("message", I);
|
|
54
|
+
}
|
|
55
|
+
function S(t) {
|
|
56
|
+
s("Do Authentication for transId", i, t), a == null || a.onAuth(g, m, i, t, Q, r);
|
|
57
|
+
}
|
|
58
|
+
function _() {
|
|
59
|
+
s("Do Post Authentication for transId", i), a == null || a.onPostAuth({ threeDSServerTransID: i }, G, r);
|
|
60
|
+
}
|
|
61
|
+
function W(t, n) {
|
|
62
|
+
const { destroy: e } = V({
|
|
63
|
+
el: document.body,
|
|
64
|
+
component: j,
|
|
65
|
+
props: {
|
|
66
|
+
threeDSServerTransID: i,
|
|
67
|
+
acsTransID: n,
|
|
68
|
+
formAction: t
|
|
69
|
+
},
|
|
70
|
+
on: {
|
|
71
|
+
close: () => {
|
|
72
|
+
e(), l = null, a == null || a.onError({ error: "Challenge cancelled" });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
l = e;
|
|
77
|
+
}
|
|
78
|
+
function f() {
|
|
79
|
+
l == null || l(), window.removeEventListener("message", I);
|
|
80
|
+
}
|
|
81
|
+
const r = (t, n) => {
|
|
82
|
+
if (f(), t === 404) {
|
|
83
|
+
a == null || a.onError({ error: "This feature is only supported by ActiveServer v1.1.2+" });
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
a == null || a.onError({ error: "3D Secure failed", body: n });
|
|
87
|
+
}, G = (t, n) => {
|
|
88
|
+
f();
|
|
89
|
+
const e = JSON.parse(n);
|
|
90
|
+
["Y", "A"].includes(e.transStatus) ? a == null || a.onSuccess(e) : (s("3D Secure failed", e), a == null || a.onError({ error: "3D Secure failed" }));
|
|
91
|
+
}, K = (t, n) => {
|
|
92
|
+
const e = JSON.parse(n);
|
|
93
|
+
if (s("[onInitAuthSuccess]", e), m = e.threeDSRequestorTransID, i = e.threeDSServerTransID, e.threeDSMonitorURL, g = e.threeDSAuthURL, e.threeDSMethodURL) {
|
|
94
|
+
X(e.threeDSServerTransID, e.threeDSMethodURL);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
S(!1);
|
|
98
|
+
}, Q = (t, n) => {
|
|
99
|
+
const e = JSON.parse(n);
|
|
100
|
+
if (s("[onDoAuthSuccess]", e), !e.transStatus) {
|
|
101
|
+
r(t, "No transStatus specified");
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
switch (e.transStatus) {
|
|
105
|
+
case "C":
|
|
106
|
+
if (!e.acsURL) {
|
|
107
|
+
r(t, "Invalid Challenge Url");
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
W(e.acsURL, e.acsTransID);
|
|
111
|
+
break;
|
|
112
|
+
case "N":
|
|
113
|
+
s("[threeDsAuth], 3DS Verification failed, transaction denied"), r(400, "3DS Verification failed, transaction denied");
|
|
114
|
+
break;
|
|
115
|
+
case "U":
|
|
116
|
+
s("[threeDsAuth], Unable to perform 3DS verification"), r(400, "Unable to perform 3DS verification");
|
|
117
|
+
break;
|
|
118
|
+
case "R":
|
|
119
|
+
s("[threeDsAuth], Unable to perform 3DS verification, rejected at issuer"), r(400, "Unable to perform 3DS verification, rejected at issuer");
|
|
120
|
+
break;
|
|
121
|
+
default:
|
|
122
|
+
s("[threeDsAuth], 3DS challenge not required, tranStatus: " + e.transStatus), a == null || a.onSuccess({
|
|
123
|
+
threeDSServerTransID: e.threeDSServerTransID,
|
|
124
|
+
threeDSRequestorTransID: "",
|
|
125
|
+
acsRenderingType: e.acsRenderingType,
|
|
126
|
+
acsTransID: e.acsTransID,
|
|
127
|
+
authenticationType: e.authenticationType,
|
|
128
|
+
authenticationValue: e.authenticationValue,
|
|
129
|
+
challengeCancel: "",
|
|
130
|
+
dsTransID: e.dsTransID,
|
|
131
|
+
eci: e.eci,
|
|
132
|
+
interactionCounter: "",
|
|
133
|
+
messageCategory: "",
|
|
134
|
+
messageExtension: e.messageExtension,
|
|
135
|
+
messageType: e.messageType,
|
|
136
|
+
messageVersion: e.messageVersion,
|
|
137
|
+
transStatus: e.transStatus,
|
|
138
|
+
transStatusReason: e.transStatusReason
|
|
139
|
+
});
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
function X(t, n) {
|
|
144
|
+
s("[threeDsMethodInvoke]", { threeDSServerTransID: t, threeDSMethodURL: n });
|
|
145
|
+
const e = {
|
|
146
|
+
threeDSServerTransID: t,
|
|
147
|
+
threeDSMethodNotificationURL: D + "/3ds/method_invocation"
|
|
148
|
+
}, o = encodeURI(window.btoa(JSON.stringify(e)).replace(/=*$/, ""));
|
|
149
|
+
new L().invoke(n, "POST", {
|
|
150
|
+
threeDSMethodData: o
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
function I(t) {
|
|
154
|
+
var n, e;
|
|
155
|
+
if (!(!((n = t == null ? void 0 : t.data) != null && n.status) || ((e = t == null ? void 0 : t.data) == null ? void 0 : e.status) === "failure")) {
|
|
156
|
+
if (t.data.status === "3ds_method_invocation_complete") {
|
|
157
|
+
s("3Ds Method invocation complete"), t.stopPropagation(), S(!0);
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
if (t.data.status === "3ds_challenge_complete") {
|
|
161
|
+
s("3Ds Challenge complete", t.data), t.stopPropagation(), f();
|
|
162
|
+
const o = JSON.parse(window.atob(t.data.cres));
|
|
163
|
+
s("cresData", o), ["Y", "A"].includes(o.transStatus) ? _() : ["N", "U", "R"].includes(o.transStatus) && (s("Failed 3DS Challenge", t.data), r(400, "Failed 3DS Challenge"));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function ee(t, n, e, o) {
|
|
168
|
+
return h = t, Y = n, z = e || document.body, D = o, {
|
|
169
|
+
onPreAuth: H,
|
|
170
|
+
onAuth: S,
|
|
171
|
+
onPostAuth: _,
|
|
172
|
+
setThreeDsProcessor: (u) => {
|
|
173
|
+
a = u;
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
export {
|
|
178
|
+
ee as default
|
|
179
|
+
};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { d as A, r as v, o as C, a as R, c as y, b as c, e as U, C as b, u as k, p as V, f as w, _ as N, F as E, g as L } from "./main-5bf95a96.mjs";
|
|
2
|
+
const M = (t) => (V("data-v-a55c9c23"), t = t(), w(), t), x = { class: "mask" }, F = { class: "wrapper" }, O = { class: "container" }, q = /* @__PURE__ */ M(() => /* @__PURE__ */ c("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)), J = ["action"], B = ["value"], j = /* @__PURE__ */ A({
|
|
3
|
+
__name: "ecentric",
|
|
4
|
+
props: {
|
|
5
|
+
threeDSServerTransID: null,
|
|
6
|
+
acsTransID: null,
|
|
7
|
+
formAction: null,
|
|
8
|
+
authenticationValue: null
|
|
9
|
+
},
|
|
10
|
+
emits: ["close", "submit"],
|
|
11
|
+
setup(t, { emit: n }) {
|
|
12
|
+
const e = t, s = v(null), l = e.authenticationValue;
|
|
13
|
+
return C(() => {
|
|
14
|
+
var d;
|
|
15
|
+
(d = s.value) == null || d.submit();
|
|
16
|
+
}), (d, m) => (R(), y("div", x, [
|
|
17
|
+
c("div", F, [
|
|
18
|
+
c("div", O, [
|
|
19
|
+
U(b, {
|
|
20
|
+
onClick: m[0] || (m[0] = (Z) => n("close"))
|
|
21
|
+
}),
|
|
22
|
+
q,
|
|
23
|
+
c("form", {
|
|
24
|
+
action: e.formAction,
|
|
25
|
+
target: "ThreeDsChallengeIFrame",
|
|
26
|
+
method: "post",
|
|
27
|
+
ref_key: "form",
|
|
28
|
+
ref: s
|
|
29
|
+
}, [
|
|
30
|
+
c("input", {
|
|
31
|
+
type: "hidden",
|
|
32
|
+
name: "PaReq",
|
|
33
|
+
value: k(l)
|
|
34
|
+
}, null, 8, B)
|
|
35
|
+
], 8, J)
|
|
36
|
+
])
|
|
37
|
+
])
|
|
38
|
+
]));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const $ = /* @__PURE__ */ N(j, [["__scopeId", "data-v-a55c9c23"]]);
|
|
42
|
+
let h = null, D, H = null, a = null, _ = "", i = "", g = "", Y, u = null, S = "";
|
|
43
|
+
function o(t, ...n) {
|
|
44
|
+
h && h(t, n);
|
|
45
|
+
}
|
|
46
|
+
function z() {
|
|
47
|
+
o("init authentication"), a == null || a.onPreAuth(Q, r), window.addEventListener("message", T);
|
|
48
|
+
}
|
|
49
|
+
function f(t) {
|
|
50
|
+
o("Do Authentication for transId", i, t), a == null || a.onAuth(g, _, i, t, W, r);
|
|
51
|
+
}
|
|
52
|
+
function I() {
|
|
53
|
+
o("Do Post Authentication for transId", i, S), a == null || a.onPostAuth({ threeDSServerTransID: i, authenticationValue: S }, K, r);
|
|
54
|
+
}
|
|
55
|
+
function G(t, n, e) {
|
|
56
|
+
const { destroy: s } = L({
|
|
57
|
+
el: document.body,
|
|
58
|
+
component: $,
|
|
59
|
+
props: {
|
|
60
|
+
threeDSServerTransID: i,
|
|
61
|
+
acsTransID: n,
|
|
62
|
+
formAction: t,
|
|
63
|
+
authenticationValue: e
|
|
64
|
+
},
|
|
65
|
+
on: {
|
|
66
|
+
close: () => {
|
|
67
|
+
s(), u = null, a == null || a.onError({ error: "Challenge cancelled" });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
u = s;
|
|
72
|
+
}
|
|
73
|
+
function p() {
|
|
74
|
+
u == null || u(), window.removeEventListener("message", T);
|
|
75
|
+
}
|
|
76
|
+
const r = (t, n) => {
|
|
77
|
+
p(), a == null || a.onError({ error: "3D Secure failed", body: n });
|
|
78
|
+
}, K = (t, n) => {
|
|
79
|
+
p();
|
|
80
|
+
const e = JSON.parse(n);
|
|
81
|
+
["Y", "A"].includes(e.transStatus) ? a == null || a.onSuccess(e) : (o("3D Secure failed", e), a == null || a.onError({ error: "3D Secure failed" }));
|
|
82
|
+
}, Q = (t, n) => {
|
|
83
|
+
const e = JSON.parse(n);
|
|
84
|
+
if (o("[onInitAuthSuccess]", e), _ = e.threeDSRequestorTransID, i = e.threeDSServerTransID, e.threeDSMonitorURL, g = e.threeDSAuthURL, e.threeDSMethodURL) {
|
|
85
|
+
X(e.threeDSServerTransID, e.threeDSMethodURL);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
f(!1);
|
|
89
|
+
}, W = (t, n) => {
|
|
90
|
+
const e = JSON.parse(n);
|
|
91
|
+
if (o("[onDoAuthSuccess]", e), !e.transStatus) {
|
|
92
|
+
r(t, "No transStatus specified");
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
switch (e.transStatus) {
|
|
96
|
+
case "C":
|
|
97
|
+
if (!e.acsURL) {
|
|
98
|
+
r(t, "Invalid Challenge Url");
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
G(e.acsURL, e.acsTransID, e.authenticationValue);
|
|
102
|
+
break;
|
|
103
|
+
case "N":
|
|
104
|
+
o("[threeDsAuth], 3DS Verification failed, transaction denied"), r(400, "3DS Verification failed, transaction denied");
|
|
105
|
+
break;
|
|
106
|
+
case "U":
|
|
107
|
+
o("[threeDsAuth], Unable to perform 3DS verification"), r(400, "Unable to perform 3DS verification");
|
|
108
|
+
break;
|
|
109
|
+
case "R":
|
|
110
|
+
o("[threeDsAuth], Unable to perform 3DS verification, rejected at issuer"), r(400, "Unable to perform 3DS verification, rejected at issuer");
|
|
111
|
+
break;
|
|
112
|
+
default:
|
|
113
|
+
o("[threeDsAuth], 3DS challenge not required, tranStatus: " + e.transStatus), a == null || a.onSuccess({
|
|
114
|
+
threeDSServerTransID: e.threeDSServerTransID,
|
|
115
|
+
threeDSRequestorTransID: "",
|
|
116
|
+
acsRenderingType: e.acsRenderingType,
|
|
117
|
+
acsTransID: e.acsTransID,
|
|
118
|
+
authenticationType: e.authenticationType,
|
|
119
|
+
authenticationValue: e.authenticationValue,
|
|
120
|
+
challengeCancel: "",
|
|
121
|
+
dsTransID: e.dsTransID,
|
|
122
|
+
eci: e.eci,
|
|
123
|
+
interactionCounter: "",
|
|
124
|
+
messageCategory: "",
|
|
125
|
+
messageExtension: e.messageExtension,
|
|
126
|
+
messageType: e.messageType,
|
|
127
|
+
messageVersion: e.messageVersion,
|
|
128
|
+
transStatus: e.transStatus,
|
|
129
|
+
transStatusReason: e.transStatusReason
|
|
130
|
+
});
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
function X(t, n) {
|
|
135
|
+
o("[threeDsMethodInvoke]", { threeDSServerTransID: t, threeDSMethodURL: n });
|
|
136
|
+
const e = {
|
|
137
|
+
threeDSServerTransID: t,
|
|
138
|
+
threeDSMethodNotificationURL: D + "/3ds/method_invocation"
|
|
139
|
+
}, s = encodeURI(window.btoa(JSON.stringify(e)).replace(/=*$/, ""));
|
|
140
|
+
new E().invoke(n, "POST", {
|
|
141
|
+
threeDSMethodData: s
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function T(t) {
|
|
145
|
+
var n, e;
|
|
146
|
+
if (!(!((n = t == null ? void 0 : t.data) != null && n.status) || ((e = t == null ? void 0 : t.data) == null ? void 0 : e.status) === "failure")) {
|
|
147
|
+
if (t.data.status === "3ds_method_invocation_complete") {
|
|
148
|
+
o("3Ds Method invocation complete"), t.stopPropagation(), f(!0);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (t.data.status === "3ds_challenge_complete") {
|
|
152
|
+
o("3Ds Challenge complete", t.data), t.stopPropagation(), p();
|
|
153
|
+
const s = JSON.parse(window.atob(t.data.cres));
|
|
154
|
+
o("cresData", s), s.termUrl ? (S = s.termUrl, I()) : (o("Failed 3DS Challenge", t.data), r(400, "Failed 3DS Challenge"));
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function ee(t, n, e, s) {
|
|
159
|
+
return h = t, H = n, Y = e || document.body, D = s, {
|
|
160
|
+
onPreAuth: z,
|
|
161
|
+
onAuth: f,
|
|
162
|
+
onPostAuth: I,
|
|
163
|
+
setThreeDsProcessor: (l) => {
|
|
164
|
+
a = l;
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
export {
|
|
169
|
+
ee as default
|
|
170
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
let b = "";
|
|
2
|
+
const u = (d, m, I, W, l, Z, c, K) => JSON.stringify({
|
|
3
|
+
siteId: K.SiteId,
|
|
4
|
+
providerId: d,
|
|
5
|
+
amount: m,
|
|
6
|
+
currency: I,
|
|
7
|
+
paymentInformation: W,
|
|
8
|
+
customerInfo: {
|
|
9
|
+
firstName: l.firstName,
|
|
10
|
+
lastName: l.lastName,
|
|
11
|
+
email: l.email,
|
|
12
|
+
phone: l.phoneNumber
|
|
13
|
+
},
|
|
14
|
+
address: {
|
|
15
|
+
line1: Z.streetAddress,
|
|
16
|
+
line2: Z.streetAddress2,
|
|
17
|
+
city: Z.city,
|
|
18
|
+
country: Z.country,
|
|
19
|
+
postalCode: Z.postalCode,
|
|
20
|
+
state: Z.state
|
|
21
|
+
},
|
|
22
|
+
order: {
|
|
23
|
+
items: c.orderItems.map((i) => ({
|
|
24
|
+
productCode: i.sku,
|
|
25
|
+
quantity: i.quantity,
|
|
26
|
+
amount: i.totalAmount
|
|
27
|
+
}))
|
|
28
|
+
},
|
|
29
|
+
connectionInformation: {
|
|
30
|
+
userAgent: navigator.userAgent,
|
|
31
|
+
cookie: b
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
function X() {
|
|
35
|
+
document.addEventListener("ftr:tokenReady", function(m) {
|
|
36
|
+
b = m.detail;
|
|
37
|
+
});
|
|
38
|
+
const d = document.createElement("script");
|
|
39
|
+
return d.type = "text/javascript", d.id = "2e6515aa0b8e", d.innerHTML = window.atob("ICAgIChmdW5jdGlvbiAoKSB7CiAgICAgICAgdmFyIG1lcmNoYW50Q29uZmlnID0gewogICAgICAgICAgICBjc3A6IGZhbHNlCiAgICAgICAgfTsKICAgICAgICAKICAgICAgICB2YXIgc2l0ZUlkID0gIjJlNjUxNWFhMGI4ZSI7CmZ1bmN0aW9uIHQodCxuKXtmb3IodmFyIGU9dC5zcGxpdCgiIikscj0wO3I8ZS5sZW5ndGg7KytyKWVbcl09U3RyaW5nLmZyb21DaGFyQ29kZShlW3JdLmNoYXJDb2RlQXQoMCkrbik7cmV0dXJuIGUuam9pbigiIil9ZnVuY3Rpb24gbihuKXtyZXR1cm4gdChuLC1TKS5yZXBsYWNlKC8lU04lL2csc2l0ZUlkKX1mdW5jdGlvbiBlKCl7dmFyIHQ9Im5vIisib3AiKyJmbiIsbj0iZyIrImEiLGU9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kZXIoQSksYz10KGF0b2IoaSksLVMtMSk7aWYoYyl7dmFyIGE9Yy5zcGxpdCgiOiIpO2lmKGEmJjI9PT1hLmxlbmd0aCl7Zm9yKHZhciB1PWFbMF0sZD1hWzFdLGY9IiIscz0wLHY9MDtzPDIwOysrcylmKz1zJTM+MCYmdjwxMj9zaXRlSWQuY2hhckF0KHYrKyk6Qi5pZC5jaGFyQXQocyk7dmFyIGg9ZC5zcGxpdCgiLCIpO2lmKGgubGVuZ3RoPjEpe3ZhciB3PWhbMF0sbD1oWzFdO1U9dSsiLyIrdysiLiIrZisiLiIrbH19fW4oKX1jYXRjaCh0KXt9fSxmdW5jdGlvbih0LG4pe2UmJmUodCxuKX0scil9fSxRKFIudURGKSxzZXRUaW1lb3V0KHMsRSxSLnVERil9Y2F0Y2godCl7aShSLm1MZCl9fWNhdGNoKHQpe319KSgpOwo="), document.getElementsByTagName("body")[0].appendChild(d), {
|
|
40
|
+
getFraudCheckData: u
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
X as default
|
|
45
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { d as v, a as I, c as R, b as f, _ as g, g as y, H as D } from "./main-5bf95a96.mjs";
|
|
2
|
+
import { getEmptySuccessThreeDsPostAuthResponse as U } from "./ThreeDsPostAuthResponse.type-3091950f.mjs";
|
|
3
|
+
const T = { class: "mask" }, k = { class: "wrapper" }, L = { class: "container" }, N = ["src"], b = /* @__PURE__ */ v({
|
|
4
|
+
__name: "GPayments",
|
|
5
|
+
props: {
|
|
6
|
+
url: null
|
|
7
|
+
},
|
|
8
|
+
setup(e) {
|
|
9
|
+
const a = e;
|
|
10
|
+
return (t, u) => (I(), R("div", T, [
|
|
11
|
+
f("div", k, [
|
|
12
|
+
f("div", L, [
|
|
13
|
+
f("iframe", {
|
|
14
|
+
src: a.url
|
|
15
|
+
}, null, 8, N)
|
|
16
|
+
])
|
|
17
|
+
])
|
|
18
|
+
]));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const E = /* @__PURE__ */ g(b, [["__scopeId", "data-v-7e1050e4"]]);
|
|
22
|
+
let p = null, C, w = null, n = null, S = "", c = "", _ = "", x, i = null;
|
|
23
|
+
function r(e, ...a) {
|
|
24
|
+
p && p(e, a);
|
|
25
|
+
}
|
|
26
|
+
function M() {
|
|
27
|
+
r("init authentication"), n == null || n.onPreAuth(H, o);
|
|
28
|
+
}
|
|
29
|
+
function m() {
|
|
30
|
+
r("Do Authentication for transId", c), n == null || n.onAuth(_, S, c, !0, J, o);
|
|
31
|
+
}
|
|
32
|
+
function d() {
|
|
33
|
+
r("Do Post Authentication for transId", c), n == null || n.onPostAuth({ threeDSServerTransID: c }, G, o);
|
|
34
|
+
}
|
|
35
|
+
function O(e) {
|
|
36
|
+
const { destroy: a } = y({
|
|
37
|
+
el: document.body,
|
|
38
|
+
component: E,
|
|
39
|
+
props: {
|
|
40
|
+
url: e
|
|
41
|
+
},
|
|
42
|
+
on: {
|
|
43
|
+
close: () => {
|
|
44
|
+
a(), i = null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
i = a, window.addEventListener("message", A);
|
|
49
|
+
}
|
|
50
|
+
function h() {
|
|
51
|
+
i == null || i(), window.removeEventListener("message", A);
|
|
52
|
+
}
|
|
53
|
+
const o = (e, a) => {
|
|
54
|
+
if (h(), e === 404) {
|
|
55
|
+
n == null || n.onError({ error: "This feature is only supported by ActiveServer v1.1.2+" });
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
n == null || n.onError({ error: "3D Secure failed", body: a });
|
|
59
|
+
}, G = (e, a) => {
|
|
60
|
+
h();
|
|
61
|
+
const t = JSON.parse(a);
|
|
62
|
+
["Y", "A"].includes(t.transStatus) ? n == null || n.onSuccess(t) : (r("3D Secure failed", t), n == null || n.onError({ error: "3D Secure failed" }));
|
|
63
|
+
}, H = (e, a) => {
|
|
64
|
+
const t = JSON.parse(a);
|
|
65
|
+
if (r("[onInitAuthSuccess]", t), !t.threeDSMethodAvailable) {
|
|
66
|
+
r("3DS Check is NOT available"), n == null || n.onSuccess(U());
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (!t.threeDSAuthURL) {
|
|
70
|
+
o(e, "No AuthUrl specified");
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
S = t.threeDSRequestorTransID, c = t.threeDSServerTransID, t.threeDSMonitorURL, _ = t.threeDSAuthURL, m();
|
|
74
|
+
}, J = (e, a) => {
|
|
75
|
+
const t = JSON.parse(a);
|
|
76
|
+
if (r("[onDoAuthSuccess]", t), !t.transStatus) {
|
|
77
|
+
o(e, "No transStatus specified");
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
switch (t.transStatus) {
|
|
81
|
+
case "C":
|
|
82
|
+
if (!t.acsURL) {
|
|
83
|
+
o(e, "Invalid Challenge Url");
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
O(t.acsURL);
|
|
87
|
+
break;
|
|
88
|
+
case "D":
|
|
89
|
+
if (!t.threeDSMonitorURL) {
|
|
90
|
+
o(e, "Invalid Result Mon Url");
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
B(t.threeDSMonitorURL);
|
|
94
|
+
break;
|
|
95
|
+
default:
|
|
96
|
+
d();
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
let l = null;
|
|
101
|
+
function B(e) {
|
|
102
|
+
if (l)
|
|
103
|
+
return;
|
|
104
|
+
const a = new D("", "", null);
|
|
105
|
+
l = setInterval(() => {
|
|
106
|
+
a.invoke(e, "GET", {}, (t, u) => {
|
|
107
|
+
const s = JSON.parse(u);
|
|
108
|
+
if (!s.event) {
|
|
109
|
+
r("Invalid mon url result", u);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (s.event === "AuthResultNotReady") {
|
|
113
|
+
r("AuthResultNotReady, retry in 2 seconds");
|
|
114
|
+
return;
|
|
115
|
+
} else
|
|
116
|
+
s.event === "AuthResultReady" ? (r("AuthResultReady", s), d()) : r("Invalid mon url result", s);
|
|
117
|
+
}, (t, u) => {
|
|
118
|
+
l && (clearInterval(l), l = null), o(t, "Invalid mon url result");
|
|
119
|
+
});
|
|
120
|
+
}, 2e3);
|
|
121
|
+
}
|
|
122
|
+
function A(e) {
|
|
123
|
+
var a, t;
|
|
124
|
+
if (!(!((a = e == null ? void 0 : e.data) != null && a.status) || ((t = e == null ? void 0 : e.data) == null ? void 0 : t.status) === "failure") && e.data.status === "3ds_challenge_complete") {
|
|
125
|
+
e.stopPropagation(), h(), r("3Ds Challenge complete", e.data), d();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function Y(e, a, t, u) {
|
|
130
|
+
return p = e, w = a, x = t || document.body, C = u, {
|
|
131
|
+
onPreAuth: M,
|
|
132
|
+
onAuth: m,
|
|
133
|
+
onPostAuth: d,
|
|
134
|
+
setThreeDsProcessor: (s) => {
|
|
135
|
+
n = s;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export {
|
|
140
|
+
Y as default
|
|
141
|
+
};
|