@payfurl/client 4.9.7 → 4.9.9
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/{CloseIcon-BwxBac9r.js → CloseIcon-DhsqodgI.js} +20 -27
- package/dist/sdk/{DefaultThreeDsProvider-V6kOxHoH.js → DefaultThreeDsProvider-qhlEMnGb.js} +2 -3
- package/dist/sdk/{MetricsGlobalThreeDsProvider-CgDVIbXk.js → MetricsGlobalThreeDsProvider-BOEA6G5r.js} +5 -6
- package/dist/sdk/{PayWayAppleButton-BNWiTzAe.js → PayWayAppleButton-DlJiWKWp.js} +2 -3
- package/dist/sdk/{alerts-DE81O3wN.js → alerts-2ShoA1hc.js} +3 -5
- package/dist/sdk/{cxpay-BEMrWL1q.js → cxpay-B2_DeDZt.js} +3 -5
- package/dist/sdk/default-2G4dbyeg.js +6 -0
- package/dist/sdk/{ecentric-C5_oNEas.js → ecentric-kLMDhKl_.js} +4 -6
- package/dist/sdk/{epna-DX-S7yA6.js → epna-p_tBGPK3.js} +3 -5
- package/dist/sdk/{flashbanc-xqp3XO6M.js → flashbanc-ChTsnYMc.js} +3 -5
- package/dist/sdk/{forter-CoC4qMrz.js → forter-BKH-4F0d.js} +5 -7
- package/dist/sdk/{forter-BWK-CuXv.js → forter-a0WNgzHg.js} +5 -4
- package/dist/sdk/{gpayments-DOv0-hRx.js → gpayments-Sa7Ek9FT.js} +4 -6
- package/dist/sdk/{managedOrders-DDtw7eWn.js → managedOrders-ojoMZ0Ab.js} +1 -2
- package/dist/sdk/metrics_global-CxURr43F.js +6 -0
- package/dist/sdk/{nmi-Y-RgOB0Y.js → nmi-Bq5IGnP2.js} +3 -5
- package/dist/sdk/{nuvei-BOMMfI_5.js → nuvei-BDdU_s1G.js} +4 -6
- package/dist/sdk/{payabli-OU7W7cbE.js → payabli-4-XnuYBw.js} +3 -5
- package/dist/sdk/payfurl.es.js +1102 -966
- package/dist/sdk/payfurl.umd.js +8 -8
- package/dist/sdk/{payglocal-BxWTWcIu.js → payglocal-9n0hrZAf.js} +6 -9
- package/dist/sdk/payway_rest-C6IL8JDO.js +6 -0
- package/dist/sdk/{screen-D7xBu0cj.js → screen-aNRlfrZR.js} +1 -2
- package/dist/sdk/{skybank-BxtSlq18.js → skybank-BIJrZVJd.js} +3 -5
- package/dist/sdk/{strings-BCjbFg4d.js → strings-CVWE1U9L.js} +16 -19
- package/package.json +1 -1
- package/dist/sdk/default-BQDjOwfs.js +0 -7
- package/dist/sdk/metrics_global-C--PnyF9.js +0 -7
- package/dist/sdk/payway_rest-CMCBLbc7.js +0 -7
package/dist/sdk/payfurl.es.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { $ as e, A as t, At as n, B as r, Bt as i, C as a, Ct as o, Dt as s, Et as c, F as l, Ft as u, H as d, I as f, It as p, K as m, L as h, Lt as g, M as _, Mt as v, Nt as y, Ot as b, P as x, Pt as S, Q as ee, R as te, Rt as ne, S as re, St as ie, Tt as C, U as ae, W as oe, X as se, Y as ce, Z as w, _t as le, a as ue, at as de, b as fe, bt as T, c as pe, ct as me, d as he, dt as
|
|
2
|
-
import { a as
|
|
3
|
-
import { t as
|
|
4
|
-
import { n as
|
|
5
|
-
|
|
6
|
-
function
|
|
1
|
+
import { $ as e, A as t, At as n, B as r, Bt as i, C as a, Ct as o, Dt as s, Et as c, F as l, Ft as u, H as d, I as f, It as p, K as m, L as h, Lt as g, M as _, Mt as v, Nt as y, Ot as b, P as x, Pt as S, Q as ee, R as te, Rt as ne, S as re, St as ie, Tt as C, U as ae, W as oe, X as se, Y as ce, Z as w, _t as le, a as ue, at as de, b as fe, bt as T, c as pe, ct as me, d as he, dt as E, et as ge, f as _e, ft as ve, gt as D, ht as ye, it as be, j as xe, jt as Se, kt as Ce, lt as we, m as Te, mt as Ee, n as De, nt as Oe, o as ke, ot as Ae, pt as je, r as Me, rt as O, st as Ne, t as Pe, tt as Fe, ut as k, v as Ie, vt as A, wt as Le, x as Re, xt as j, y as ze, yt as Be, z as Ve, zt as He } from "./CloseIcon-DhsqodgI.js";
|
|
2
|
+
import { a as Ue, c as We, d as M, i as Ge, l as Ke, n as qe, o as N, r as P, s as F, t as Je, u as Ye } from "./strings-CVWE1U9L.js";
|
|
3
|
+
import { t as Xe } from "./screen-aNRlfrZR.js";
|
|
4
|
+
import { n as Ze, t as I } from "./alerts-2ShoA1hc.js";
|
|
5
|
+
// node_modules/tslib/tslib.es6.mjs
|
|
6
|
+
function L(e, t, n, r) {
|
|
7
7
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
8
8
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
9
9
|
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
10
10
|
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var $e = class e {
|
|
12
|
+
// src/utils/ErrorHandler.ts
|
|
13
|
+
var Qe = class e {
|
|
15
14
|
static instance;
|
|
16
15
|
static environment;
|
|
17
16
|
static publicKey;
|
|
@@ -19,14 +18,14 @@ var $e = class e {
|
|
|
19
18
|
httpInvoker = null;
|
|
20
19
|
constructor() {
|
|
21
20
|
if (e.instance) return e.instance;
|
|
22
|
-
this.httpInvoker = new
|
|
21
|
+
this.httpInvoker = new F(), e.instance = this;
|
|
23
22
|
}
|
|
24
23
|
static init(t, n, r) {
|
|
25
24
|
return e.environment = t, e.publicKey = n, e.version = r, new e();
|
|
26
25
|
}
|
|
27
26
|
sendError(t, n, r) {
|
|
28
27
|
try {
|
|
29
|
-
let i =
|
|
28
|
+
let i = Ye(e.environment), a = /* @__PURE__ */ new Date();
|
|
30
29
|
this.httpInvoker?.invoke(i, "POST", JSON.stringify({
|
|
31
30
|
method: t,
|
|
32
31
|
message: n,
|
|
@@ -37,7 +36,7 @@ var $e = class e {
|
|
|
37
36
|
browser: {
|
|
38
37
|
userAgent: navigator.userAgent,
|
|
39
38
|
language: window.navigator.language,
|
|
40
|
-
colorDepth: String(
|
|
39
|
+
colorDepth: String(Xe()),
|
|
41
40
|
screenHeight: screen.height + "",
|
|
42
41
|
screenWidth: screen.width + "",
|
|
43
42
|
timezone: Math.round(a.getTimezoneOffset() / 60) + "",
|
|
@@ -51,15 +50,14 @@ var $e = class e {
|
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
52
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
function L(e, t, n) {
|
|
53
|
+
// src/utils/ErrorHandled.ts
|
|
54
|
+
function R(e, t, n) {
|
|
57
55
|
let r = n.value;
|
|
58
56
|
n.value = function() {
|
|
59
57
|
try {
|
|
60
58
|
return r.apply(this, arguments);
|
|
61
59
|
} catch (n) {
|
|
62
|
-
throw new
|
|
60
|
+
throw new Qe().sendError(t, n.message, et(Array.from(arguments))), console.warn("[ErrorHandled], exception", {
|
|
63
61
|
error: n,
|
|
64
62
|
target: e,
|
|
65
63
|
propertyKey: t,
|
|
@@ -68,12 +66,12 @@ function L(e, t, n) {
|
|
|
68
66
|
}
|
|
69
67
|
};
|
|
70
68
|
}
|
|
71
|
-
function
|
|
69
|
+
function z(e, t, n) {
|
|
72
70
|
return function(...r) {
|
|
73
71
|
try {
|
|
74
72
|
return n.apply(e, r);
|
|
75
73
|
} catch (e) {
|
|
76
|
-
throw new
|
|
74
|
+
throw new Qe().sendError(t, e.message, et(r)), console.warn("[ErrorHandledFunction], exception", {
|
|
77
75
|
error: e,
|
|
78
76
|
funcName: t,
|
|
79
77
|
args: r
|
|
@@ -81,22 +79,21 @@ function R(e, t, n) {
|
|
|
81
79
|
}
|
|
82
80
|
};
|
|
83
81
|
}
|
|
84
|
-
function
|
|
85
|
-
new
|
|
82
|
+
function $e(e, t, n) {
|
|
83
|
+
new Qe().sendError(e, t, et(n));
|
|
86
84
|
}
|
|
87
|
-
function
|
|
88
|
-
return e.map((e) =>
|
|
85
|
+
function et(e) {
|
|
86
|
+
return e.map((e) => tt(e));
|
|
89
87
|
}
|
|
90
|
-
function
|
|
88
|
+
function tt(e) {
|
|
91
89
|
if (typeof e != "object" || !e) return typeof e == "string" && e.replace(/\s/g, "").search(/^[0-9]{8,19}$/) !== -1 ? "**** **** **** " + e.replace(/\s/g, "").slice(-4) : typeof e == "string" && e.replace(/\s/g, "").search(/^[0-9]{3,4}$/) !== -1 ? "***" : e;
|
|
92
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
90
|
+
if (Array.isArray(e)) return e.map((e) => tt(e));
|
|
93
91
|
let t = {};
|
|
94
|
-
for (let n in e) e.hasOwnProperty && e.hasOwnProperty(n) && typeof e[n] != "function" && !(e[n] instanceof Node) && (e.constructor === Object || e.name === "click2PayError") && (t[n] =
|
|
92
|
+
for (let n in e) e.hasOwnProperty && e.hasOwnProperty(n) && typeof e[n] != "function" && !(e[n] instanceof Node) && (e.constructor === Object || e.name === "click2PayError") && (t[n] = tt(e[n]), n === "cardNumber" && t[n] ? t[n] = "**** **** **** " + t[n].replace(" ", "").slice(-4) : n === "ccv" && (t[n] = "***"));
|
|
95
93
|
return t;
|
|
96
94
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
var rt = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
95
|
+
// src/components/PaypalIcon.vue
|
|
96
|
+
var nt = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
100
97
|
__name: "PaypalIcon",
|
|
101
98
|
props: {
|
|
102
99
|
size: {},
|
|
@@ -104,31 +101,31 @@ var rt = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
|
104
101
|
},
|
|
105
102
|
setup(e) {
|
|
106
103
|
let t = e, n = t.grayscale ? "#2A2A2B" : "#253b80", r = t.grayscale ? "#555557" : "#179bd7", i = t.grayscale ? "#000000" : "#222d65", a = `--size: ${t.size}px`;
|
|
107
|
-
return (e, t) => (b(),
|
|
104
|
+
return (e, t) => (b(), j("svg", {
|
|
108
105
|
id: "paypal",
|
|
109
106
|
style: a,
|
|
110
107
|
xmlns: "http://www.w3.org/2000/svg",
|
|
111
108
|
viewBox: "0 0 25.576353 30.177"
|
|
112
109
|
}, [
|
|
113
|
-
|
|
110
|
+
A("path", {
|
|
114
111
|
d: "m 7.2659888,29.154 0.523,-3.322 -1.165,-0.027 -5.563,0 3.866,-24.513 c 0.012,-0.074 0.051,-0.143 0.108,-0.192 0.057,-0.049 0.13,-0.076 0.206,-0.076 l 9.3800002,0 c 3.114,0 5.263,0.648 6.385,1.927 0.526,0.6 0.861,1.227 1.023,1.917 0.17,0.724 0.173,1.589 0.007,2.644 l -0.012,0.077 0,0.676 0.526,0.298 c 0.443,0.235 0.795,0.504 1.065,0.812 0.45,0.513 0.741,1.165 0.864,1.938 0.127,0.795 0.085,1.741 -0.123,2.812 -0.24,1.232 -0.628,2.305 -1.152,3.183 -0.482,0.809 -1.096,1.48 -1.825,2 -0.696,0.494 -1.523,0.869 -2.458,1.109 -0.906,0.236 -1.939,0.355 -3.072,0.355 l -0.73,0 c -0.522,0 -1.029,0.188 -1.427,0.525 -0.399,0.344 -0.663,0.814 -0.744,1.328 l -0.055,0.299 -0.924,5.855 -0.042,0.215 c -0.011,0.068 -0.03,0.102 -0.058,0.125 -0.025,0.021 -0.061,0.035 -0.096,0.035 l -4.5070002,0 z",
|
|
115
|
-
style:
|
|
112
|
+
style: He(`fill: ${g(n)}`)
|
|
116
113
|
}, null, 4),
|
|
117
|
-
|
|
114
|
+
A("path", {
|
|
118
115
|
d: "m 23.047989,7.667 0,0 0,0 c -0.028,0.179 -0.06,0.362 -0.096,0.55 -1.237,6.351 -5.469,8.545 -10.874,8.545 l -2.7520002,0 c -0.661,0 -1.218,0.48 -1.321,1.132 l 0,0 0,0 -1.409,8.936 -0.399,2.533 c -0.067,0.428 0.263,0.814 0.695,0.814 l 4.8810002,0 c 0.578,0 1.069,-0.42 1.16,-0.99 l 0.048,-0.248 0.919,-5.832 0.059,-0.32 c 0.09,-0.572 0.582,-0.992 1.16,-0.992 l 0.73,0 c 4.729,0 8.431,-1.92 9.513,-7.476 0.452,-2.321 0.218,-4.259 -0.978,-5.622 -0.362,-0.411 -0.811,-0.752 -1.336,-1.03 z",
|
|
119
|
-
style:
|
|
116
|
+
style: He(`fill: ${g(r)}`)
|
|
120
117
|
}, null, 4),
|
|
121
|
-
|
|
118
|
+
A("path", {
|
|
122
119
|
d: "m 21.753989,7.151 c -0.189,-0.055 -0.384,-0.105 -0.584,-0.15 -0.201,-0.044 -0.407,-0.083 -0.619,-0.117 -0.742,-0.12 -1.555,-0.177 -2.426,-0.177 l -7.352,0 c -0.181,0 -0.353,0.041 -0.507,0.115 C 9.9269888,6.985 9.6749888,7.306 9.6139888,7.699 l -1.564,9.906 -0.045,0.289 c 0.103,-0.652 0.66,-1.132 1.321,-1.132 l 2.7520002,0 c 5.405,0 9.637,-2.195 10.874,-8.545 0.037,-0.188 0.068,-0.371 0.096,-0.55 -0.313,-0.166 -0.652,-0.308 -1.017,-0.429 -0.09,-0.03 -0.183,-0.059 -0.277,-0.087 z",
|
|
123
|
-
style:
|
|
120
|
+
style: He(`fill: ${g(i)}`)
|
|
124
121
|
}, null, 4),
|
|
125
|
-
|
|
122
|
+
A("path", {
|
|
126
123
|
d: "m 9.6139888,7.699 c 0.061,-0.393 0.313,-0.714 0.6520002,-0.876 0.155,-0.074 0.326,-0.115 0.507,-0.115 l 7.352,0 c 0.871,0 1.684,0.057 2.426,0.177 0.212,0.034 0.418,0.073 0.619,0.117 0.2,0.045 0.395,0.095 0.584,0.15 0.094,0.028 0.187,0.057 0.278,0.086 0.365,0.121 0.704,0.264 1.017,0.429 0.368,-2.347 -0.003,-3.945 -1.272,-5.392 C 20.377989,0.682 17.852989,0 14.621989,0 L 5.2419888,0 c -0.66,0 -1.223,0.48 -1.325,1.133 L 0.00998882,25.898 c -0.077,0.49 0.301,0.932 0.795,0.932 l 5.79099998,0 1.454,-9.225 1.564,-9.906 z",
|
|
127
|
-
style:
|
|
124
|
+
style: He(`fill: ${g(n)}`)
|
|
128
125
|
}, null, 4)
|
|
129
126
|
]));
|
|
130
127
|
}
|
|
131
|
-
}), [["__scopeId", "data-v-2b840669"]]),
|
|
128
|
+
}), [["__scopeId", "data-v-2b840669"]]), rt = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
132
129
|
__name: "CreditCardIcon",
|
|
133
130
|
props: {
|
|
134
131
|
size: {},
|
|
@@ -141,18 +138,18 @@ var rt = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
|
141
138
|
n.value = e;
|
|
142
139
|
});
|
|
143
140
|
let r = le(() => `--size: ${t.size}px;fill:${n.value}`);
|
|
144
|
-
return (e, t) => (b(),
|
|
141
|
+
return (e, t) => (b(), j("svg", {
|
|
145
142
|
xmlns: "http://www.w3.org/2000/svg",
|
|
146
|
-
style:
|
|
143
|
+
style: He([{
|
|
147
144
|
width: "1.2587890625em",
|
|
148
145
|
height: "1em",
|
|
149
146
|
"vertical-align": "middle",
|
|
150
147
|
overflow: "hidden"
|
|
151
148
|
}, r.value]),
|
|
152
149
|
viewBox: "0 0 1289 1024"
|
|
153
|
-
}, [...t[0] ||= [
|
|
150
|
+
}, [...t[0] ||= [A("path", { d: "M1188.420307 68.911452c16.92562 0 32.642267 14.507674 32.642267 32.642267v822.101535c0 16.92562-14.507674 32.642267-32.642267 32.642267h-1088.075561c-16.92562 0-32.642267-14.507674-32.642267-32.642267v-822.101535c0-16.92562 14.507674-32.642267 32.642267-32.642267h1088.075561m0-68.911452h-1088.075561C44.731995 0 0 45.940968 0 100.344746v822.101535c0 55.612751 44.731995 100.344746 100.344746 100.344746h1088.075561c55.612751 0 100.344746-44.731995 100.344746-100.344746v-822.101535c1.208973-54.403778-44.731995-100.344746-100.344746-100.344746z" }, null, -1), A("path", { d: "M41.105077 252.675325h1221.062574v258.720189H41.105077zM177.719008 778.578512h174.09209v71.329398H177.719008zM432.812279 778.578512h259.929161v71.329398H432.812279z" }, null, -1)]], 4));
|
|
154
151
|
}
|
|
155
|
-
}), [["__scopeId", "data-v-6a1e8b23"]]),
|
|
152
|
+
}), [["__scopeId", "data-v-6a1e8b23"]]), it = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
156
153
|
__name: "GooglePayIcon",
|
|
157
154
|
props: {
|
|
158
155
|
size: {},
|
|
@@ -160,14 +157,14 @@ var rt = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
|
160
157
|
},
|
|
161
158
|
setup(e) {
|
|
162
159
|
let t = `--size: ${Number(e.size || 30) + 10}px`;
|
|
163
|
-
return (e, n) => (b(),
|
|
160
|
+
return (e, n) => (b(), j("svg", {
|
|
164
161
|
xmlns: "http://www.w3.org/2000/svg",
|
|
165
162
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
166
163
|
style: t,
|
|
167
164
|
viewBox: "170.7 170 752 400"
|
|
168
165
|
}, [...n[0] ||= [ie("<path id=\"Base_1_\" fill=\"#FFFFFF\" d=\"M722.7,170h-352c-110,0-200,90-200,200l0,0c0,110,90,200,200,200h352c110,0,200-90,200-200l0,0 C922.7,260,832.7,170,722.7,170z\" data-v-f87e02ce></path><path id=\"Outline\" fill=\"#3C4043\" d=\"M722.7,186.2c24.7,0,48.7,4.9,71.3,14.5c21.9,9.3,41.5,22.6,58.5,39.5 c16.9,16.9,30.2,36.6,39.5,58.5c9.6,22.6,14.5,46.6,14.5,71.3s-4.9,48.7-14.5,71.3c-9.3,21.9-22.6,41.5-39.5,58.5 c-16.9,16.9-36.6,30.2-58.5,39.5c-22.6,9.6-46.6,14.5-71.3,14.5h-352c-24.7,0-48.7-4.9-71.3-14.5c-21.9-9.3-41.5-22.6-58.5-39.5 c-16.9-16.9-30.2-36.6-39.5-58.5c-9.6-22.6-14.5-46.6-14.5-71.3s4.9-48.7,14.5-71.3c9.3-21.9,22.6-41.5,39.5-58.5 c16.9-16.9,36.6-30.2,58.5-39.5c22.6-9.6,46.6-14.5,71.3-14.5L722.7,186.2 M722.7,170h-352c-110,0-200,90-200,200l0,0 c0,110,90,200,200,200h352c110,0,200-90,200-200l0,0C922.7,260,832.7,170,722.7,170L722.7,170z\" data-v-f87e02ce></path><g id=\"Google_Pay_Lockup_1_\" data-v-f87e02ce><g id=\"Pay_Typeface_3_\" data-v-f87e02ce><path id=\"Letter_p_3_\" fill=\"#3C4043\" d=\"M529.3,384.2v60.5h-19.2V295.3H561c12.9,0,23.9,4.3,32.9,12.9 c9.2,8.6,13.8,19.1,13.8,31.5c0,12.7-4.6,23.2-13.8,31.7c-8.9,8.5-19.9,12.7-32.9,12.7h-31.7V384.2z M529.3,313.7v52.1h32.1 c7.6,0,14-2.6,19-7.7c5.1-5.1,7.7-11.3,7.7-18.3c0-6.9-2.6-13-7.7-18.1c-5-5.3-11.3-7.9-19-7.9h-32.1V313.7z\" data-v-f87e02ce></path><path id=\"Letter_a_3_\" fill=\"#3C4043\" d=\"M657.9,339.1c14.2,0,25.4,3.8,33.6,11.4c8.2,7.6,12.3,18,12.3,31.2v63h-18.3v-14.2h-0.8 c-7.9,11.7-18.5,17.5-31.7,17.5c-11.3,0-20.7-3.3-28.3-10s-11.4-15-11.4-25c0-10.6,4-19,12-25.2c8-6.3,18.7-9.4,32-9.4 c11.4,0,20.8,2.1,28.1,6.3v-4.4c0-6.7-2.6-12.3-7.9-17c-5.3-4.7-11.5-7-18.6-7c-10.7,0-19.2,4.5-25.4,13.6l-16.9-10.6 C625.9,345.8,639.7,339.1,657.9,339.1z M633.1,413.3c0,5,2.1,9.2,6.4,12.5c4.2,3.3,9.2,5,14.9,5c8.1,0,15.3-3,21.6-9 s9.5-13,9.5-21.1c-6-4.7-14.3-7.1-25-7.1c-7.8,0-14.3,1.9-19.5,5.6C635.7,403.1,633.1,407.8,633.1,413.3z\" data-v-f87e02ce></path><path id=\"Letter_y_3_\" fill=\"#3C4043\" d=\"M808.2,342.4l-64,147.2h-19.8l23.8-51.5L706,342.4h20.9l30.4,73.4h0.4l29.6-73.4H808.2z\" data-v-f87e02ce></path></g><g id=\"Google_Mark_1_\" data-v-f87e02ce><path id=\"Blue_500\" fill=\"#4285F4\" d=\"M452.93,372c0-6.26-0.56-12.25-1.6-18.01h-80.48v33L417.2,387 c-1.88,10.98-7.93,20.34-17.2,26.58v21.41h27.59C443.7,420.08,452.93,398.04,452.93,372z\" data-v-f87e02ce></path><path id=\"Green_500_1_\" fill=\"#34A853\" d=\"M400.01,413.58c-7.68,5.18-17.57,8.21-29.14,8.21c-22.35,0-41.31-15.06-48.1-35.36 h-28.46v22.08c14.1,27.98,43.08,47.18,76.56,47.18c23.14,0,42.58-7.61,56.73-20.71L400.01,413.58z\" data-v-f87e02ce></path><path id=\"Yellow_500_1_\" fill=\"#FABB05\" d=\"M320.09,370.05c0-5.7,0.95-11.21,2.68-16.39v-22.08h-28.46 c-5.83,11.57-9.11,24.63-9.11,38.47s3.29,26.9,9.11,38.47l28.46-22.08C321.04,381.26,320.09,375.75,320.09,370.05z\" data-v-f87e02ce></path><path id=\"Red_500\" fill=\"#E94235\" d=\"M370.87,318.3c12.63,0,23.94,4.35,32.87,12.85l24.45-24.43 c-14.85-13.83-34.21-22.32-57.32-22.32c-33.47,0-62.46,19.2-76.56,47.18l28.46,22.08C329.56,333.36,348.52,318.3,370.87,318.3z\" data-v-f87e02ce></path></g></g>", 3)]]));
|
|
169
166
|
}
|
|
170
|
-
}), [["__scopeId", "data-v-f87e02ce"]]),
|
|
167
|
+
}), [["__scopeId", "data-v-f87e02ce"]]), at = ["fill"], ot = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
171
168
|
__name: "PayToIcon",
|
|
172
169
|
props: {
|
|
173
170
|
size: {},
|
|
@@ -177,28 +174,27 @@ var rt = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
|
177
174
|
let t = e;
|
|
178
175
|
t.grayscale;
|
|
179
176
|
let n = `--size: ${t.size}px`;
|
|
180
|
-
return (e, t) => (b(),
|
|
177
|
+
return (e, t) => (b(), j("svg", {
|
|
181
178
|
id: "payto-icon",
|
|
182
179
|
viewBox: "0 0 120 57",
|
|
183
180
|
xmlns: "http://www.w3.org/2000/svg",
|
|
184
181
|
style: n
|
|
185
|
-
}, [
|
|
182
|
+
}, [A("path", {
|
|
186
183
|
d: "m8.285 27.63c.8 0 1.562-.06 2.285-.176a6.262 6.262 0 0 0 1.937-.624 3.529 3.529 0 0 0 1.354-1.227c.335-.52.502-1.194.502-2.025s-.169-1.463-.502-1.97a3.492 3.492 0 0 0 -1.337-1.187c-.555-.287-1.186-.473-1.897-.565a17.32 17.32 0 0 0 -2.188-.136h-3.56v7.91zm-8.285-12.04h8.945c1.573 0 2.994.144 4.258.429 1.265.288 2.349.754 3.254 1.404.902.648 1.599 1.479 2.092 2.493.488 1.012.736 2.235.736 3.663 0 1.533-.283 2.818-.853 3.858a6.956 6.956 0 0 1 -2.303 2.512c-.968.637-2.098 1.097-3.388 1.383-1.29.285-2.66.43-4.103.43h-3.76v11.415h-4.878zm32.679 19.054h-1.043c-.751 0-1.538.034-2.364.098s-1.588.207-2.283.427c-.697.223-1.279.534-1.742.937-.464.403-.696.954-.696 1.655 0 .442.095.812.29 1.11.195.3.446.54.755.721.31.183.659.311 1.045.39a5.94 5.94 0 0 0 1.161.117c1.6 0 2.813-.427 3.639-1.287.826-.857 1.238-2.026 1.238-3.505zm.078 6.156h-.116c-.466.832-1.213 1.516-2.247 2.047-1.034.532-2.206.8-3.523.8-.749 0-1.53-.099-2.343-.293a6.902 6.902 0 0 1 -2.245-.972 5.624 5.624 0 0 1 -1.705-1.793c-.45-.74-.676-1.656-.676-2.745 0-1.404.394-2.52 1.18-3.351.787-.831 1.8-1.468 3.04-1.91 1.24-.44 2.614-.732 4.124-.875a47.58 47.58 0 0 1 4.433-.215v-.47c0-1.168-.42-2.031-1.259-2.589s-1.839-.839-3-.839c-.981 0-1.923.21-2.826.624-.903.417-1.652.924-2.246 1.521l-2.4-2.844a10.478 10.478 0 0 1 3.659-2.222 12.448 12.448 0 0 1 4.203-.74c1.651 0 3.013.233 4.084.7 1.072.468 1.916 1.079 2.536 1.83a6.571 6.571 0 0 1 1.298 2.534c.245.936.369 1.869.369 2.806v11.376h-4.338v-2.377l-.002-.004zm5.719-16.325h5.15l5.189 13.599h.078l4.607-13.6h4.84l-8.791 22.717a16.433 16.433 0 0 1 -1.083 2.278 6.33 6.33 0 0 1 -1.395 1.676 5.56 5.56 0 0 1 -1.916 1.032c-.736.234-1.62.351-2.654.351-.386 0-.78-.019-1.182-.058a8.113 8.113 0 0 1 -1.219-.215l.386-4.052c.31.104.614.175.91.215s.575.058.834.058c.49 0 .902-.058 1.238-.175.337-.117.62-.298.852-.545.232-.248.438-.552.618-.917.181-.364.376-.792.582-1.286l.93-2.376-7.977-18.702zm42.808 14.279c.893 0 2.072-.328 2.536-.49v3.735c-.468.183-1.478.535-2.536.535-3.691 0-6.695-3.064-6.697-6.831v-11.228h-4.225v-3.675h4.225v-4.66h3.665v4.66h10a13.83 13.83 0 0 0 -3.625 3.675h-6.375v11.228c0 1.688 1.39 3.05 3.032 3.05zm15 3.78c-6.038 0-10.801-4.79-10.801-10.866s4.845-10.868 10.8-10.868h12.183l.004-3.376 6.267 5.245-6.278 5.256.004-3.45h-12.337c-3.775 0-6.897 3.396-6.897 7.193s3.11 7.13 7.053 7.13c3.942 0 7.053-3.163 7.053-7.13 0-1.755-.62-3.377-1.386-4.553h4.139c.65 1.402.993 3.006.993 4.553 0 6.076-4.761 10.866-10.801 10.866zm10.909-42.534h-31.031c-7.074 0-12.807 5.77-12.807 12.886v31.226c0 7.117 5.735 12.886 12.807 12.886h31.031c7.074 0 12.806-5.77 12.806-12.886v-31.226c0-7.116-5.734-12.886-12.806-12.886z",
|
|
187
184
|
fill: g("#000")
|
|
188
|
-
}, null, 8,
|
|
185
|
+
}, null, 8, at)]));
|
|
189
186
|
}
|
|
190
|
-
}), [["__scopeId", "data-v-0b2d8aa0"]]),
|
|
191
|
-
function
|
|
187
|
+
}), [["__scopeId", "data-v-0b2d8aa0"]]), st = "payfurl-combined-container";
|
|
188
|
+
function ct(e, t) {
|
|
192
189
|
if (!e) return null;
|
|
193
190
|
for (; e.parentNode && e.parentNode.nodeName.toLowerCase() !== "body";) if (e = e.parentNode, e.id === t) return e;
|
|
194
191
|
return null;
|
|
195
192
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
var ut = ["id"], dt = ["id", "onClick"], ft = ["value", "id"], pt = { class: "combined-tab-title" }, mt = { class: "combined-tab-name" }, ht = {
|
|
193
|
+
// src/sdk/components/Combined.vue?vue&type=script&setup=true&lang.ts
|
|
194
|
+
var lt = ["id"], ut = ["id", "onClick"], dt = ["value", "id"], ft = { class: "combined-tab-title" }, pt = { class: "combined-tab-name" }, mt = {
|
|
199
195
|
key: 0,
|
|
200
196
|
class: "combined-tab-description"
|
|
201
|
-
},
|
|
197
|
+
}, ht = ["src", "alt"], gt = ["id"], _t = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
202
198
|
__name: "Combined",
|
|
203
199
|
props: { elements: {} },
|
|
204
200
|
setup(e) {
|
|
@@ -234,27 +230,27 @@ var ut = ["id"], dt = ["id", "onClick"], ft = ["value", "id"], pt = { class: "co
|
|
|
234
230
|
t.elements.forEach((e, t) => {
|
|
235
231
|
f(t);
|
|
236
232
|
}), o(0);
|
|
237
|
-
}), (e, r) => (b(),
|
|
233
|
+
}), (e, r) => (b(), j("div", {
|
|
238
234
|
class: "payfurl-sdk-combined-container",
|
|
239
|
-
id: g(
|
|
240
|
-
}, [(b(!0),
|
|
235
|
+
id: g(st)
|
|
236
|
+
}, [(b(!0), j(D, null, Ce(t.elements, (e, t) => (b(), j(D, { key: `container-component${t}` }, [a.value[t] ? T("", !0) : (b(), j("div", {
|
|
241
237
|
key: 0,
|
|
242
238
|
class: ne(["payfurl-sdk-combined-tab", t === n.value ? "active" : ""]),
|
|
243
239
|
id: e.id || `combined-tab${t}`,
|
|
244
240
|
onClick: (e) => o(t)
|
|
245
241
|
}, [
|
|
246
|
-
|
|
242
|
+
A("input", {
|
|
247
243
|
type: "radio",
|
|
248
244
|
name: "payment-type",
|
|
249
245
|
value: e.title,
|
|
250
246
|
id: `payment-type${t}`
|
|
251
|
-
}, null, 8,
|
|
252
|
-
|
|
253
|
-
s(e) ? (b(),
|
|
247
|
+
}, null, 8, dt),
|
|
248
|
+
A("div", ft, [A("div", pt, i(e.title), 1), e.description ? (b(), j("div", mt, i(e.description), 1)) : T("", !0)]),
|
|
249
|
+
s(e) ? (b(), Be(Se(e.icon), {
|
|
254
250
|
key: 0,
|
|
255
251
|
size: 30
|
|
256
252
|
})) : T("", !0),
|
|
257
|
-
l(e) ? (b(),
|
|
253
|
+
l(e) ? (b(), j("img", {
|
|
258
254
|
key: 1,
|
|
259
255
|
src: e.icon,
|
|
260
256
|
style: {
|
|
@@ -263,13 +259,13 @@ var ut = ["id"], dt = ["id", "onClick"], ft = ["value", "id"], pt = { class: "co
|
|
|
263
259
|
"object-fit": "contain"
|
|
264
260
|
},
|
|
265
261
|
alt: e.title
|
|
266
|
-
}, null, 8,
|
|
267
|
-
], 10,
|
|
262
|
+
}, null, 8, ht)) : T("", !0)
|
|
263
|
+
], 10, ut)), u(A("div", {
|
|
268
264
|
class: "payfurl-sdk-container-component",
|
|
269
265
|
id: `container-component${t}`
|
|
270
|
-
}, null, 8,
|
|
266
|
+
}, null, 8, gt), [[Ee, d(t)]])], 64))), 128))], 8, lt));
|
|
271
267
|
}
|
|
272
|
-
}), [["__scopeId", "data-v-240dc514"]]),
|
|
268
|
+
}), [["__scopeId", "data-v-240dc514"]]), vt = {
|
|
273
269
|
AED: "784",
|
|
274
270
|
AFN: "971",
|
|
275
271
|
ALL: "008",
|
|
@@ -448,7 +444,7 @@ var ut = ["id"], dt = ["id", "onClick"], ft = ["value", "id"], pt = { class: "co
|
|
|
448
444
|
ZAR: "710",
|
|
449
445
|
ZMW: "967",
|
|
450
446
|
ZWL: "932"
|
|
451
|
-
},
|
|
447
|
+
}, yt = {
|
|
452
448
|
BHD: 3,
|
|
453
449
|
BIF: 0,
|
|
454
450
|
CLF: 4,
|
|
@@ -476,18 +472,17 @@ var ut = ["id"], dt = ["id", "onClick"], ft = ["value", "id"], pt = { class: "co
|
|
|
476
472
|
XOF: 0,
|
|
477
473
|
XPF: 0
|
|
478
474
|
};
|
|
479
|
-
function
|
|
480
|
-
return !!
|
|
475
|
+
function B(e) {
|
|
476
|
+
return !!vt[String(e).toUpperCase()];
|
|
481
477
|
}
|
|
482
|
-
function
|
|
483
|
-
return
|
|
478
|
+
function bt(e) {
|
|
479
|
+
return vt[String(e).toUpperCase()] || "";
|
|
484
480
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
481
|
+
function xt(e) {
|
|
482
|
+
return yt[String(e).toUpperCase()] || 2;
|
|
487
483
|
}
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
var { hideSpinner: Ct, showSpinner: wt } = Oe(), B = {
|
|
484
|
+
// src/sdk/processors/threeDsProcessor.ts
|
|
485
|
+
var { hideSpinner: St, showSpinner: Ct } = De(), V = {
|
|
491
486
|
PREAUTH: "PREAUTH",
|
|
492
487
|
AUTH: "AUTH",
|
|
493
488
|
POSTAUTH: "POSTAUTH",
|
|
@@ -495,36 +490,36 @@ var { hideSpinner: Ct, showSpinner: wt } = Oe(), B = {
|
|
|
495
490
|
GET_GATEWAY_DATA: "GET_GATEWAY_DATA",
|
|
496
491
|
TOKENISE_CARD: "TOKENISE_CARD",
|
|
497
492
|
PUT_TOKEN_EXTERNAL_3DS_DATA: "PUT_TOKEN_EXTERNAL_3DS_DATA"
|
|
498
|
-
},
|
|
499
|
-
[
|
|
493
|
+
}, H = (e, t) => ({
|
|
494
|
+
[V.PREAUTH]: {
|
|
500
495
|
url: e + (t ? "/3ds/preauth/token/" + t : "/3ds/preauth"),
|
|
501
496
|
method: "POST"
|
|
502
497
|
},
|
|
503
|
-
[
|
|
498
|
+
[V.AUTH]: {
|
|
504
499
|
url: e + (t ? "/3ds/auth/token/" + t : "/3ds/auth"),
|
|
505
500
|
method: "POST"
|
|
506
501
|
},
|
|
507
|
-
[
|
|
502
|
+
[V.POSTAUTH]: {
|
|
508
503
|
url: e + "/3ds/postauth",
|
|
509
504
|
method: "POST"
|
|
510
505
|
},
|
|
511
|
-
[
|
|
506
|
+
[V.AUTH_COMPLETE]: {
|
|
512
507
|
url: e + "/3ds/auth_complete",
|
|
513
508
|
method: "POST"
|
|
514
509
|
},
|
|
515
|
-
[
|
|
510
|
+
[V.GET_GATEWAY_DATA]: {
|
|
516
511
|
url: e + "/token/" + t + "/gateway_data",
|
|
517
512
|
method: "GET"
|
|
518
513
|
},
|
|
519
|
-
[
|
|
514
|
+
[V.TOKENISE_CARD]: {
|
|
520
515
|
url: e + "/token/card",
|
|
521
516
|
method: "POST"
|
|
522
517
|
},
|
|
523
|
-
[
|
|
518
|
+
[V.PUT_TOKEN_EXTERNAL_3DS_DATA]: {
|
|
524
519
|
url: e + "/token/" + t + "/external3dsdata",
|
|
525
520
|
method: "PUT"
|
|
526
521
|
}
|
|
527
|
-
}),
|
|
522
|
+
}), U = class {
|
|
528
523
|
container = null;
|
|
529
524
|
log;
|
|
530
525
|
apiUrl = "";
|
|
@@ -546,8 +541,8 @@ var { hideSpinner: Ct, showSpinner: wt } = Oe(), B = {
|
|
|
546
541
|
httpInvoker = null;
|
|
547
542
|
constructor(e, t) {
|
|
548
543
|
this.log = e, this.apiUrl = t.apiUrl, this.providerId = t.providerId, this.cardProviderId = t.cardProviderId, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null, this.threeDsInvoker = t.threeDsInvoker || null;
|
|
549
|
-
let n = new
|
|
550
|
-
this.httpInvoker = new
|
|
544
|
+
let n = new N(t.environment, P(t.publicKey));
|
|
545
|
+
this.httpInvoker = new F(t.publicKey, t.version, n);
|
|
551
546
|
}
|
|
552
547
|
setTokenId(e) {
|
|
553
548
|
this.tokenId = e;
|
|
@@ -601,10 +596,10 @@ var { hideSpinner: Ct, showSpinner: wt } = Oe(), B = {
|
|
|
601
596
|
return { ...this.clientParameters };
|
|
602
597
|
}
|
|
603
598
|
onError(e) {
|
|
604
|
-
this.log("[3ds error]", e),
|
|
599
|
+
this.log("[3ds error]", e), St(), I(this.container, e.error), this.threeDSFailureHandler ? this.threeDSFailureHandler(e) : this.failureCallback?.(e);
|
|
605
600
|
}
|
|
606
601
|
onSuccess(e) {
|
|
607
|
-
|
|
602
|
+
St(), this.log("[3ds success]", e), this.threeDSCompleteHandler ? this.threeDSCompleteHandler?.(e) : this.successCallback?.(e);
|
|
608
603
|
}
|
|
609
604
|
onPreAuth(e, t) {
|
|
610
605
|
let n = {
|
|
@@ -613,14 +608,14 @@ var { hideSpinner: Ct, showSpinner: wt } = Oe(), B = {
|
|
|
613
608
|
ccv: this.paymentInfo?.ccv,
|
|
614
609
|
cardProviderId: this.cardProviderId
|
|
615
610
|
};
|
|
616
|
-
this.log("[onPreAuth]", n), this.httpInvoker?.invoke(
|
|
611
|
+
this.log("[onPreAuth]", n), this.httpInvoker?.invoke(H(this.apiUrl, this.tokenId)[V.PREAUTH].url, H(this.apiUrl, this.tokenId)[V.PREAUTH].method, JSON.stringify(n), e, t);
|
|
617
612
|
}
|
|
618
613
|
onAuth(e, t, n, r, i, a, o) {
|
|
619
614
|
this.log("[onAuth]", {
|
|
620
615
|
threeDSServerTransID: n,
|
|
621
616
|
isMethodPerformed: r
|
|
622
617
|
});
|
|
623
|
-
let s =
|
|
618
|
+
let s = bt(this.currency), c = xt(this.currency), l = /* @__PURE__ */ new Date(), u = {
|
|
624
619
|
acctNumber: this.paymentInfo?.cardNumber,
|
|
625
620
|
notificationURL: this.apiUrl + "/3ds/auth_complete",
|
|
626
621
|
threeDSAuthURL: e,
|
|
@@ -637,7 +632,7 @@ var { hideSpinner: Ct, showSpinner: wt } = Oe(), B = {
|
|
|
637
632
|
browserJavascriptEnabled: !0,
|
|
638
633
|
browserJavaEnabled: !1,
|
|
639
634
|
browserLanguage: window.navigator.language,
|
|
640
|
-
browserColorDepth: String(
|
|
635
|
+
browserColorDepth: String(Xe()),
|
|
641
636
|
browserScreenHeight: screen.height + "",
|
|
642
637
|
browserScreenWidth: screen.width + "",
|
|
643
638
|
browserTZ: Math.round(l.getTimezoneOffset() / 60) + "",
|
|
@@ -656,26 +651,26 @@ var { hideSpinner: Ct, showSpinner: wt } = Oe(), B = {
|
|
|
656
651
|
ccv: this.paymentInfo?.ccv && String(this.paymentInfo?.ccv) || "",
|
|
657
652
|
threeDSRequestorChallengeInd: this.requireChallenge ? "04" : "01"
|
|
658
653
|
};
|
|
659
|
-
this.httpInvoker?.invoke(
|
|
660
|
-
|
|
654
|
+
this.httpInvoker?.invoke(H(this.apiUrl, this.tokenId)[V.AUTH].url, H(this.apiUrl, this.tokenId)[V.AUTH].method, JSON.stringify(u), (e, t) => {
|
|
655
|
+
St(), a(e, t);
|
|
661
656
|
}, o);
|
|
662
657
|
}
|
|
663
658
|
onPostAuth(e, t, n) {
|
|
664
|
-
this.log("[onPostAuth]", e),
|
|
659
|
+
this.log("[onPostAuth]", e), Ct(), this.httpInvoker?.invoke(H(this.apiUrl, this.tokenId)[V.POSTAUTH].url, H(this.apiUrl, this.tokenId)[V.POSTAUTH].method, JSON.stringify(e), t, n);
|
|
665
660
|
}
|
|
666
661
|
threeDSInvoke(e, t, n, r) {
|
|
667
662
|
this.container = e, this.threeDSCompleteHandler = n || null, this.threeDSFailureHandler = r || null, this.requireChallenge = t, this.threeDsInvoker?.onPreAuth();
|
|
668
663
|
}
|
|
669
664
|
getGatewayData(e, t, n, r) {
|
|
670
|
-
this.httpInvoker?.invoke(
|
|
665
|
+
this.httpInvoker?.invoke(H(this.apiUrl, t)[V.GET_GATEWAY_DATA].url, H(this.apiUrl, t)[V.GET_GATEWAY_DATA].method, null, z(this, "[getGatewayDataSuccessCallback]", (e, t) => {
|
|
671
666
|
this.log("getGatewayDataSuccessCallback", e), n(JSON.parse(t));
|
|
672
|
-
}),
|
|
673
|
-
this.log("getGatewayDataFailureCallback", e, t),
|
|
667
|
+
}), z(this, "[getGatewayDataFailureCallback]", (e, t) => {
|
|
668
|
+
this.log("getGatewayDataFailureCallback", e, t), St(), r();
|
|
674
669
|
}), { providerId: e });
|
|
675
670
|
}
|
|
676
671
|
tokeniseCard(e, t, n) {
|
|
677
672
|
let r = this.getPaymentInfo();
|
|
678
|
-
!r.cardNumber || !r.expiryDate || !r.cardholder ? n("Card information is missing") : (
|
|
673
|
+
!r.cardNumber || !r.expiryDate || !r.cardholder ? n("Card information is missing") : (Ct(), this.httpInvoker?.invoke(H(this.apiUrl)[V.TOKENISE_CARD].url, H(this.apiUrl)[V.TOKENISE_CARD].method, JSON.stringify({
|
|
679
674
|
paymentInformation: {
|
|
680
675
|
cardNumber: r.cardNumber,
|
|
681
676
|
expiryDate: `${r.expiryDate.slice(2)}/${r.expiryDate.slice(0, 2)}`,
|
|
@@ -684,41 +679,39 @@ var { hideSpinner: Ct, showSpinner: wt } = Oe(), B = {
|
|
|
684
679
|
},
|
|
685
680
|
currency: this.getCurrency(),
|
|
686
681
|
amount: this.getAmount()
|
|
687
|
-
}),
|
|
688
|
-
this.log("tokeniseCardSuccessCallback", e, n),
|
|
689
|
-
}),
|
|
690
|
-
this.log("tokeniseCardFailureCallback", e, t),
|
|
682
|
+
}), z(this, "[tokeniseCardSuccessCallback]", (e, n) => {
|
|
683
|
+
this.log("tokeniseCardSuccessCallback", e, n), St(), t(JSON.parse(n));
|
|
684
|
+
}), z(this, "[tokeniseCardFailureCallback]", (e, t) => {
|
|
685
|
+
this.log("tokeniseCardFailureCallback", e, t), St(), n("Unable to tokenise payment information");
|
|
691
686
|
}), { providerId: e }));
|
|
692
687
|
}
|
|
693
688
|
updateTokenExternal3dsData(e) {
|
|
694
|
-
this.tokenId && e && Object.keys(e).length !== 0 && this.httpInvoker?.invoke(
|
|
689
|
+
this.tokenId && e && Object.keys(e).length !== 0 && this.httpInvoker?.invoke(H(this.apiUrl, this.tokenId)[V.PUT_TOKEN_EXTERNAL_3DS_DATA].url, H(this.apiUrl, this.tokenId)[V.PUT_TOKEN_EXTERNAL_3DS_DATA].method, JSON.stringify(e), (e, t) => {
|
|
695
690
|
this.log("updateTokenExternal3dsDataSuccessCallback", e, t);
|
|
696
691
|
}, (e, t) => {
|
|
697
|
-
this.log("updateTokenExternal3dsDataFailureCallback", e, t),
|
|
692
|
+
this.log("updateTokenExternal3dsDataFailureCallback", e, t), St();
|
|
698
693
|
}, {});
|
|
699
694
|
}
|
|
700
695
|
};
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
function U() {
|
|
696
|
+
L([R], U.prototype, "setPaymentInfo", null), L([R], U.prototype, "onError", null), L([R], U.prototype, "onSuccess", null), L([R], U.prototype, "onPreAuth", null), L([R], U.prototype, "onAuth", null), L([R], U.prototype, "onPostAuth", null), L([R], U.prototype, "threeDSInvoke", null), L([R], U.prototype, "getGatewayData", null), L([R], U.prototype, "tokeniseCard", null), L([R], U.prototype, "updateTokenExternal3dsData", null);
|
|
697
|
+
// src/sdk/utils/loading.ts
|
|
698
|
+
var wt = p(!1);
|
|
699
|
+
function W() {
|
|
706
700
|
return {
|
|
707
|
-
isLoading:
|
|
701
|
+
isLoading: wt,
|
|
708
702
|
startLoading: () => {
|
|
709
|
-
|
|
703
|
+
wt.value = !0;
|
|
710
704
|
},
|
|
711
705
|
stopLoading: () => {
|
|
712
|
-
|
|
706
|
+
wt.value = !1;
|
|
713
707
|
}
|
|
714
708
|
};
|
|
715
709
|
}
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
var Et = { style: { position: "relative" } }, Dt = {
|
|
710
|
+
// src/sdk/components/PaypalForm.vue?vue&type=script&setup=true&lang.ts
|
|
711
|
+
var Tt = { style: { position: "relative" } }, Et = {
|
|
719
712
|
key: 0,
|
|
720
713
|
class: "error text-normal"
|
|
721
|
-
},
|
|
714
|
+
}, Dt = "payfurl-paypal-script", Ot = /* @__PURE__ */ C({
|
|
722
715
|
__name: "PaypalForm",
|
|
723
716
|
props: {
|
|
724
717
|
log: { type: Function },
|
|
@@ -735,12 +728,12 @@ var Et = { style: { position: "relative" } }, Dt = {
|
|
|
735
728
|
"close"
|
|
736
729
|
],
|
|
737
730
|
setup(e, { emit: t }) {
|
|
738
|
-
let n = e, r = t, a = p(null), o = p(!0), l = p(""), d = p(null), f = !1, m = null, { isLoading: h } =
|
|
731
|
+
let n = e, r = t, a = p(null), o = p(!0), l = p(""), d = p(null), f = !1, m = null, { isLoading: h } = W();
|
|
739
732
|
function _(e) {
|
|
740
733
|
d.value = e, n.log && n.log("[Paypal]: checkout", d.value), !f && (f = !0, v());
|
|
741
734
|
}
|
|
742
735
|
function v() {
|
|
743
|
-
if (document.getElementById(
|
|
736
|
+
if (document.getElementById(Dt)) {
|
|
744
737
|
y();
|
|
745
738
|
return;
|
|
746
739
|
}
|
|
@@ -753,7 +746,7 @@ var Et = { style: { position: "relative" } }, Dt = {
|
|
|
753
746
|
let t = `https://www.paypal.com/sdk/js?${new URLSearchParams(e)}`;
|
|
754
747
|
window.paypal = null;
|
|
755
748
|
let r = document.createElement("script");
|
|
756
|
-
r.src = t, r.id =
|
|
749
|
+
r.src = t, r.id = Dt, r.onload = y, document.body.appendChild(r);
|
|
757
750
|
}
|
|
758
751
|
function y() {
|
|
759
752
|
window.paypal && window.paypal.Buttons && (window.paypal.Buttons({
|
|
@@ -772,7 +765,7 @@ var Et = { style: { position: "relative" } }, Dt = {
|
|
|
772
765
|
n.clickGate()?.() === !1 ? t.disable() : t.enable();
|
|
773
766
|
}, 1e3);
|
|
774
767
|
}
|
|
775
|
-
}).render(n.el), window.postMessage({ status:
|
|
768
|
+
}).render(n.el), window.postMessage({ status: Re }, "*"));
|
|
776
769
|
}
|
|
777
770
|
function x(e) {
|
|
778
771
|
e?.data?.status && (e.data.status === "activate" && e.data.component === "paypal" && (n.log?.(`[PayPal]: message "${e.data.status}" received`, e.data), o.value = !0, r("activate")), e.data.status === "deactivate" && e.data.component === "paypal" && (n.log?.(`[PayPal]: message "${e.data.status}" received`, e.data), o.value = !1), e.data.status === "checkout-ready" && e.data.component === "paypal" && (n.log?.(`[PayPal]: message "${e.data.status}" received`, e.data), _(e.data.checkoutData)), e.data.status === "message" && e.data.component === "paypal" && (n.log?.(`[PayPal]: message "${e.data.status}" received`, e.data), l.value = e.data.message), e.data.status === "error" && e.data.component === "paypal" && (n.log?.(`[PayPal]: message "${e.data.status}" received`, e.data), l.value = e.data.error));
|
|
@@ -780,32 +773,33 @@ var Et = { style: { position: "relative" } }, Dt = {
|
|
|
780
773
|
return s(() => {
|
|
781
774
|
window.removeEventListener("message", x), m && clearInterval(m);
|
|
782
775
|
}), c(() => {
|
|
783
|
-
window.addEventListener("message", x),
|
|
784
|
-
}), (e, t) => (b(),
|
|
776
|
+
window.addEventListener("message", x), ct(a.value, "payfurl-combined-container") || (o.value = !0, r("activate"));
|
|
777
|
+
}), (e, t) => (b(), j(D, null, [A("div", Tt, [u(Le(se, null, null, 512), [[Ee, g(h)]])]), A("div", {
|
|
785
778
|
style: { position: "relative" },
|
|
786
779
|
ref_key: "root",
|
|
787
780
|
ref: a
|
|
788
|
-
}, [l.value ? (b(),
|
|
781
|
+
}, [l.value ? (b(), j("div", Et, i(l.value), 1)) : T("", !0)], 512)], 64));
|
|
789
782
|
}
|
|
790
|
-
}),
|
|
783
|
+
}), kt = {
|
|
791
784
|
APPROVED: "Approved",
|
|
792
785
|
DECLINED: "Declined",
|
|
793
786
|
UNDECIDED: "Undecided"
|
|
794
787
|
};
|
|
788
|
+
function At(e) {
|
|
789
|
+
return e ? e.decision === kt.DECLINED && e.stopPaymentOnFailure === !0 : !1;
|
|
790
|
+
}
|
|
795
791
|
function jt(e) {
|
|
796
|
-
return e
|
|
792
|
+
return e === "forter";
|
|
797
793
|
}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
function W(e) {
|
|
794
|
+
// src/sdk/utils/optionCleaning.ts
|
|
795
|
+
function G(e) {
|
|
801
796
|
if (e == null) return null;
|
|
802
797
|
var t = {};
|
|
803
798
|
for (var n in e) t[n] = e[n];
|
|
804
799
|
return t;
|
|
805
800
|
}
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
|
|
801
|
+
// src/sdk/processors/paypalProcessor.ts
|
|
802
|
+
var { hideSpinner: Mt, showSpinner: Nt } = De(), Pt = class {
|
|
809
803
|
container = null;
|
|
810
804
|
log;
|
|
811
805
|
apiUrl = "";
|
|
@@ -820,8 +814,8 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
|
|
|
820
814
|
userSuccessMessage = re;
|
|
821
815
|
constructor(e, t) {
|
|
822
816
|
this.log = e, this.apiUrl = t.apiUrl, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null;
|
|
823
|
-
let n = new
|
|
824
|
-
this.httpInvoker = new
|
|
817
|
+
let n = new N(t.environment, P(t.publicKey));
|
|
818
|
+
this.httpInvoker = new F(t.publicKey, t.version, n);
|
|
825
819
|
}
|
|
826
820
|
addFraudProcessor(e) {
|
|
827
821
|
this.fraudProcessor = e;
|
|
@@ -850,9 +844,9 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
|
|
|
850
844
|
}), this.validateOptions(e, n, r);
|
|
851
845
|
let o = !1;
|
|
852
846
|
this.container = e, this.fraudProcessor && (this.fraudProcessor.setAmount(n), this.fraudProcessor.setCurrency(r));
|
|
853
|
-
let s =
|
|
847
|
+
let s = E({
|
|
854
848
|
el: e,
|
|
855
|
-
component:
|
|
849
|
+
component: Ot,
|
|
856
850
|
props: {
|
|
857
851
|
log: this.log,
|
|
858
852
|
el: e,
|
|
@@ -862,7 +856,7 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
|
|
|
862
856
|
clickGate: this.getOnValidate.bind(this)
|
|
863
857
|
},
|
|
864
858
|
on: {
|
|
865
|
-
activate:
|
|
859
|
+
activate: z(this, "[Paypal]: activate", () => {
|
|
866
860
|
o || (o = !0, this.log("[Paypal]: activate paypal form"), this.checkout(this.amount || n, r, i, a || {}, () => {
|
|
867
861
|
o = !1;
|
|
868
862
|
}), this.setAmount = (e) => {
|
|
@@ -871,7 +865,7 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
|
|
|
871
865
|
});
|
|
872
866
|
});
|
|
873
867
|
}),
|
|
874
|
-
approve:
|
|
868
|
+
approve: z(this, "[Paypal]: approved", ({ data: t, actions: n }) => {
|
|
875
869
|
this.log("[Paypal]: approved", {
|
|
876
870
|
data: t,
|
|
877
871
|
actions: n
|
|
@@ -879,24 +873,33 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
|
|
|
879
873
|
let r = n.order.get();
|
|
880
874
|
this.log("[Paypal]: order", r);
|
|
881
875
|
let i = setInterval(() => {
|
|
882
|
-
this.log("[Paypal]: setInterval resolved = " + r.resolved), r.resolved
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
}
|
|
890
|
-
Mt(), jt(t) ? (F(e, "Payment couldn't be processed"), this.failureCallback?.({ error: "Payment couldn't be processed" })) : this.addCharge(e, t);
|
|
891
|
-
}, (t) => {
|
|
892
|
-
Mt(), F(e, t.error), this.failureCallback?.(t);
|
|
893
|
-
})) : this.addCharge(e, null));
|
|
876
|
+
if (this.log("[Paypal]: setInterval resolved = " + r.resolved), r.resolved) {
|
|
877
|
+
clearInterval(i);
|
|
878
|
+
try {
|
|
879
|
+
this.chargeApproved(e, r);
|
|
880
|
+
} catch (t) {
|
|
881
|
+
Mt(), I(e, "Payment couldn't be processed"), this.failureCallback?.({ error: t?.message || "Payment couldn't be processed" });
|
|
882
|
+
}
|
|
883
|
+
}
|
|
894
884
|
}, 200);
|
|
895
885
|
})
|
|
896
886
|
}
|
|
897
887
|
});
|
|
898
888
|
this.destroy = s.destroy;
|
|
899
889
|
}
|
|
890
|
+
chargeApproved(e, t) {
|
|
891
|
+
this.fraudProcessor ? (this.fraudProcessor.setPaypalInfo({
|
|
892
|
+
payerId: t.value.payer.payer_id,
|
|
893
|
+
payerEmail: t.value.payer.email_address,
|
|
894
|
+
paymentStatus: t.value.status,
|
|
895
|
+
payerAccountCountry: t.value.payer.address?.country_code,
|
|
896
|
+
paymentId: t.value.id
|
|
897
|
+
}), Nt(), this.fraudProcessor.fraudCheck((t) => {
|
|
898
|
+
Mt(), At(t) ? (I(e, "Payment couldn't be processed"), this.failureCallback?.({ error: "Payment couldn't be processed" })) : this.addCharge(e, t);
|
|
899
|
+
}, (t) => {
|
|
900
|
+
Mt(), I(e, t.error), this.failureCallback?.(t);
|
|
901
|
+
})) : this.addCharge(e, null);
|
|
902
|
+
}
|
|
900
903
|
setAmount(e) {
|
|
901
904
|
this.amount = e, this.fraudProcessor?.setAmount(e);
|
|
902
905
|
}
|
|
@@ -913,17 +916,17 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
|
|
|
913
916
|
amount: e,
|
|
914
917
|
currency: t,
|
|
915
918
|
options: { HideShipping: r.hideShipping ? "true" : "false" },
|
|
916
|
-
metadata:
|
|
919
|
+
metadata: G(r?.metadata)
|
|
917
920
|
};
|
|
918
921
|
r.transfer?.amount && (o.transfer = {
|
|
919
922
|
account: r.transfer.account,
|
|
920
923
|
amount: r.transfer.amount
|
|
921
|
-
}),
|
|
924
|
+
}), W().startLoading(), this.httpInvoker?.invoke(a, "POST", JSON.stringify(o), this.successCheckoutHandler.bind(this), (e, t) => {
|
|
922
925
|
i?.(e, t), this.failureCheckoutHandler.bind(this)(e, t);
|
|
923
926
|
});
|
|
924
927
|
}
|
|
925
928
|
failureCheckoutHandler = (e, t) => {
|
|
926
|
-
|
|
929
|
+
W().stopLoading(), this.failureCallback?.({
|
|
927
930
|
error: "Failed to configure paypal",
|
|
928
931
|
body: t
|
|
929
932
|
}), window.postMessage({
|
|
@@ -932,29 +935,29 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
|
|
|
932
935
|
error: "Failed to configure paypal"
|
|
933
936
|
}, "*");
|
|
934
937
|
};
|
|
935
|
-
successCheckoutHandler =
|
|
936
|
-
|
|
938
|
+
successCheckoutHandler = z(this, "[PayPal][successCheckoutHandler]", (e, t) => {
|
|
939
|
+
W().stopLoading();
|
|
937
940
|
let n = JSON.parse(t);
|
|
938
941
|
this.log("paypal success", n);
|
|
939
942
|
let r = JSON.parse(t), i = JSON.parse(window.atob(r.checkoutData));
|
|
940
943
|
this.checkoutExternalId = i.externalId, window.postMessage({
|
|
941
|
-
status:
|
|
944
|
+
status: ke,
|
|
942
945
|
component: "paypal",
|
|
943
946
|
checkoutData: i
|
|
944
947
|
}, "*");
|
|
945
948
|
});
|
|
946
949
|
getFailureAddChargeHandler(e) {
|
|
947
|
-
return
|
|
948
|
-
|
|
950
|
+
return z(this, "[PayPalProcessor][getFailureAddChargeHandler]", (t, n) => {
|
|
951
|
+
I(e, "Unable to tokenise payment information"), this.failureCallback?.({
|
|
949
952
|
error: "Unable to finish AddCharge",
|
|
950
953
|
body: n
|
|
951
954
|
}), this.log("Unable to finish AddCharge, error: " + n);
|
|
952
955
|
});
|
|
953
956
|
}
|
|
954
957
|
getSuccessAddChargeHandler(e) {
|
|
955
|
-
return
|
|
958
|
+
return z(this, "[PayPalProcessor][getSuccessAddChargeHandler]", (t, n) => {
|
|
956
959
|
let r = JSON.parse(n);
|
|
957
|
-
this.log("[getSuccessAddChargeHandler]", r),
|
|
960
|
+
this.log("[getSuccessAddChargeHandler]", r), Ze(e, this.getSuccessMessage()), this.successCallback?.({ transactionId: r.chargeId });
|
|
958
961
|
});
|
|
959
962
|
}
|
|
960
963
|
addCharge(e, t) {
|
|
@@ -965,13 +968,12 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
|
|
|
965
968
|
}), this.getSuccessAddChargeHandler(e).bind(this), this.getFailureAddChargeHandler(e).bind(this));
|
|
966
969
|
}
|
|
967
970
|
validateOptions(t, n, r) {
|
|
968
|
-
if (!
|
|
969
|
-
if (!e(n)) throw
|
|
971
|
+
if (!B(r)) throw I(t, "Invalid currency: " + r), TypeError("invalid currency: " + r);
|
|
972
|
+
if (!e(n)) throw I(t, "Invalid amount: " + n), TypeError("invalid amount: " + n);
|
|
970
973
|
}
|
|
971
974
|
};
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
//#region src/sdk/components/CardForm.vue?vue&type=script&setup=true&lang.ts
|
|
975
|
+
L([R], Pt.prototype, "cleanUp", null), L([R], Pt.prototype, "addPaypal", null), L([R], Pt.prototype, "setAmount", null), L([R], Pt.prototype, "checkout", null), L([R], Pt.prototype, "getFailureAddChargeHandler", null), L([R], Pt.prototype, "getSuccessAddChargeHandler", null), L([R], Pt.prototype, "addCharge", null), L([R], Pt.prototype, "validateOptions", null);
|
|
976
|
+
// src/sdk/components/CardForm.vue?vue&type=script&setup=true&lang.ts
|
|
975
977
|
var Ft = ["src"], It = {
|
|
976
978
|
key: 0,
|
|
977
979
|
id: "threeDs"
|
|
@@ -1027,16 +1029,16 @@ var Ft = ["src"], It = {
|
|
|
1027
1029
|
let t = a.value;
|
|
1028
1030
|
t && (e ? (m = t.style.height || "200px", f.value = !0, t.setAttribute("style", `height: ${Lt}px`)) : (f.value = !1, t.setAttribute("style", `height: ${m}`)));
|
|
1029
1031
|
}
|
|
1030
|
-
return (e, t) => (b(),
|
|
1032
|
+
return (e, t) => (b(), j(D, null, [A("iframe", {
|
|
1031
1033
|
src: o.value,
|
|
1032
1034
|
onLoad: _,
|
|
1033
1035
|
ref_key: "iframe",
|
|
1034
1036
|
ref: a,
|
|
1035
|
-
style:
|
|
1037
|
+
style: He(`height:${g(200)}px`),
|
|
1036
1038
|
id: "payfurl-card-iframe"
|
|
1037
|
-
}, null, 44, Ft), l.value ? (b(),
|
|
1039
|
+
}, null, 44, Ft), l.value ? (b(), j("div", It)) : T("", !0)], 64));
|
|
1038
1040
|
}
|
|
1039
|
-
}),
|
|
1041
|
+
}), K = class {
|
|
1040
1042
|
log;
|
|
1041
1043
|
startLoadingCardFormHandler = null;
|
|
1042
1044
|
constructor(e) {
|
|
@@ -1093,14 +1095,14 @@ var Ft = ["src"], It = {
|
|
|
1093
1095
|
showMessage(e) {
|
|
1094
1096
|
let t = this.getCardFormFrame();
|
|
1095
1097
|
t && t.contentWindow?.postMessage({
|
|
1096
|
-
status:
|
|
1098
|
+
status: Te,
|
|
1097
1099
|
message: e
|
|
1098
1100
|
}, "*");
|
|
1099
1101
|
}
|
|
1100
1102
|
showInfoMessage(e) {
|
|
1101
1103
|
let t = this.getCardFormFrame();
|
|
1102
1104
|
t && t.contentWindow?.postMessage({
|
|
1103
|
-
status:
|
|
1105
|
+
status: Ie,
|
|
1104
1106
|
message: e
|
|
1105
1107
|
}, "*");
|
|
1106
1108
|
}
|
|
@@ -1113,11 +1115,10 @@ var Ft = ["src"], It = {
|
|
|
1113
1115
|
}
|
|
1114
1116
|
}
|
|
1115
1117
|
};
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
//#region src/utils/networkTokenOptions.ts
|
|
1118
|
+
L([R], K.prototype, "startLoadingCardForm", null), L([R], K.prototype, "stopLoadingCardForm", null), L([R], K.prototype, "pauseLoadingCardForm", null), L([R], K.prototype, "unpauseLoadingCardForm", null), L([R], K.prototype, "showMessage", null), L([R], K.prototype, "showInfoMessage", null), L([R], K.prototype, "requestCardDetails", null);
|
|
1119
|
+
// src/utils/networkTokenOptions.ts
|
|
1119
1120
|
function zt(e) {
|
|
1120
|
-
return e ===
|
|
1121
|
+
return e === We.PRODUCTION ? {
|
|
1121
1122
|
acquirerMerchantId: "550e8400",
|
|
1122
1123
|
acquirerBIN: "444444",
|
|
1123
1124
|
authenticationReasons: ["TRANSACTION_AUTHENTICATION"]
|
|
@@ -1127,12 +1128,11 @@ function zt(e) {
|
|
|
1127
1128
|
authenticationReasons: ["TRANSACTION_AUTHENTICATION"]
|
|
1128
1129
|
};
|
|
1129
1130
|
}
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
var { hideSpinner: Bt, showSpinner: Vt } = Oe(), Ht = { UPDATE: "UPDATE" }, Ut = (e, t) => ({ [Ht.UPDATE]: {
|
|
1131
|
+
// src/sdk/processors/networkToken/mastercardTokenAuthenticationProcessor.ts
|
|
1132
|
+
var { hideSpinner: Bt, showSpinner: Vt } = De(), Ht = { UPDATE: "UPDATE" }, Ut = (e, t) => ({ [Ht.UPDATE]: {
|
|
1133
1133
|
url: e + ("/token/" + t + "/authentication"),
|
|
1134
1134
|
method: "PUT"
|
|
1135
|
-
} }),
|
|
1135
|
+
} }), Wt = class extends K {
|
|
1136
1136
|
environment;
|
|
1137
1137
|
token;
|
|
1138
1138
|
networkToken;
|
|
@@ -1154,8 +1154,8 @@ var { hideSpinner: Bt, showSpinner: Vt } = Oe(), Ht = { UPDATE: "UPDATE" }, Ut =
|
|
|
1154
1154
|
...n,
|
|
1155
1155
|
...t.networkTokenOptions
|
|
1156
1156
|
};
|
|
1157
|
-
let r = new
|
|
1158
|
-
this.httpInvoker = new
|
|
1157
|
+
let r = new N(t.environment, P(t.publicKey));
|
|
1158
|
+
this.httpInvoker = new F(t.publicKey, "", r), this.apiUrl = t.apiUrl, window.addEventListener("message", this.messageHandler.bind(this)), this.init();
|
|
1159
1159
|
}
|
|
1160
1160
|
invoke(e, t, n, r) {
|
|
1161
1161
|
this.log("[MastercardTokenAuthenticationProcessor][invoke]", {
|
|
@@ -1266,29 +1266,28 @@ var { hideSpinner: Bt, showSpinner: Vt } = Oe(), Ht = { UPDATE: "UPDATE" }, Ut =
|
|
|
1266
1266
|
VerificationTimestamp: t.verificationTimestamp,
|
|
1267
1267
|
AdditionalData: t.additionalData,
|
|
1268
1268
|
VerificationEvents: JSON.stringify(t.verificationEvents)
|
|
1269
|
-
}),
|
|
1269
|
+
}), z(this, "[MastercardTokenAuthenticationProcessor][updateToken]: successCallback", (t, n) => {
|
|
1270
1270
|
this.log("[MastercardTokenAuthenticationProcessor][updateToken]: successCallback", t, n), this.modalHide(), this.onSuccessCallback?.(e);
|
|
1271
|
-
}),
|
|
1271
|
+
}), z(this, "[MastercardTokenAuthenticationProcessor][updateToken]: failureCallback", (e, t) => {
|
|
1272
1272
|
this.log("[MastercardTokenAuthenticationProcessor][updateToken]: failureCallback", e, t), this.modalHide(), this.onFailureCallback?.({ error: "Unknown error" });
|
|
1273
1273
|
}));
|
|
1274
1274
|
}
|
|
1275
1275
|
};
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
1276
|
+
L([R], Wt.prototype, "invoke", null), L([R], Wt.prototype, "messageHandler", null), L([R], Wt.prototype, "authenticate", null), L([R], Wt.prototype, "init", null), L([R], Wt.prototype, "initCss", null), L([R], Wt.prototype, "modalShow", null), L([R], Wt.prototype, "modalHide", null), L([R], Wt.prototype, "updateToken", null);
|
|
1277
|
+
// src/sdk/processors/cardProcessor.ts
|
|
1278
|
+
var { hideSpinner: q, showSpinner: Gt } = De(), Kt = {
|
|
1280
1279
|
TOKENISE_CARD: "TOKENISE_CARD",
|
|
1281
1280
|
GET_PROVIDER_INFO: "GET_PROVIDER_INFO"
|
|
1282
|
-
},
|
|
1283
|
-
[
|
|
1281
|
+
}, qt = (e, t, n) => ({
|
|
1282
|
+
[Kt.TOKENISE_CARD]: {
|
|
1284
1283
|
url: e + "/token/card",
|
|
1285
1284
|
method: "POST"
|
|
1286
1285
|
},
|
|
1287
|
-
[
|
|
1286
|
+
[Kt.GET_PROVIDER_INFO]: {
|
|
1288
1287
|
url: e + "/info/providers/" + t,
|
|
1289
1288
|
method: "GET"
|
|
1290
1289
|
}
|
|
1291
|
-
}), J = class extends
|
|
1290
|
+
}), J = class extends K {
|
|
1292
1291
|
container = null;
|
|
1293
1292
|
iframe = null;
|
|
1294
1293
|
form = null;
|
|
@@ -1335,8 +1334,8 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1335
1334
|
isMessageListenerAttached = !1;
|
|
1336
1335
|
constructor(e, t) {
|
|
1337
1336
|
super(e), this.debug = t.debug, this.environment = t.environment, this.url = t.url, this.apiUrl = t.apiUrl, this.secureUrl = t.secureUrl, this.version = t.version, this.publicKey = t.publicKey, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null, this.validationStatusChangeCallback = t.onValidationStatusChangeCallback || null;
|
|
1338
|
-
let n = new
|
|
1339
|
-
this.httpInvoker = new
|
|
1337
|
+
let n = new N(t.environment, P(t.publicKey));
|
|
1338
|
+
this.httpInvoker = new F(this.publicKey, t.version, n), this.boundMessageHandler = this.messageHandler.bind(this), this.attachMessageListener();
|
|
1340
1339
|
}
|
|
1341
1340
|
attachMessageListener() {
|
|
1342
1341
|
this.isMessageListenerAttached ||= (window.addEventListener("message", this.boundMessageHandler), !0);
|
|
@@ -1379,7 +1378,7 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1379
1378
|
options: a
|
|
1380
1379
|
}), this.attachMessageListener(), a?.createNetworkToken && !a?.tokenAuthenticationEnabled && (a.clickToPayEnabled = !1), a?.clickToPayEnabled && this.clickToPayProcessor && (a.threeDSEnabled = !1), this.secureFallback = !1, this.secureReady = !1, this.secureEnabled = !!a?.secureCardOrchestration?.enabled;
|
|
1381
1380
|
let o = a?.threeDSEmail || "";
|
|
1382
|
-
this.amount = r, this.currency = i, this.vault =
|
|
1381
|
+
this.amount = r, this.currency = i, this.vault = k(a?.vault), this.verifyCard = k(a?.verifyCard), this.metadata = G(a?.metadata), this.fraudProcessor && (this.fraudProcessor.setAmount(r), this.fraudProcessor.setCurrency(i)), this.threeDsProcessor && (this.threeDsProcessor.setEmail(a?.threeDSEmail || ""), this.threeDsProcessor.setAmount(r), this.threeDsProcessor.setCurrency(i), this.threeDsProcessor.setClientParameters(a?.clientParameters || {})), a?.threeDSEnabled && (we(r, O, "Missing or invalid amount", this.failureCallback), we(i, B, "Missing or invalid currency", this.failureCallback), this.threeDSEnabled = !0);
|
|
1383
1382
|
let s = Object.keys(a?.networkTokenOptions || {}).length ? a?.networkTokenOptions : a?.clickToPayOptions?.networkTokenOptions;
|
|
1384
1383
|
a?.clickToPayEnabled && this.clickToPayProcessor && (this.clickToPayProcessor.setAmount(r), this.clickToPayProcessor.setCurrency(i), this.clickToPayProcessor.setCustomerInfo({
|
|
1385
1384
|
...this.customer || {},
|
|
@@ -1390,7 +1389,7 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1390
1389
|
tokenAuthenticationEnabled: !!a?.tokenAuthenticationEnabled,
|
|
1391
1390
|
networkTokenOptions: s
|
|
1392
1391
|
}), this.clickToPayProcessor.setContainer(e), this.clickToPayProcessor.init(), this.clickToPayProcessor.start()), !a?.clickToPayEnabled && this.clickToPayProcessor && this.clickToPayProcessor.isInitialized() && this.clickToPayProcessor.stopUsing(), this.createNetworkToken = !!a?.createNetworkToken, this.tokenAuthenticationEnabled = !!a?.tokenAuthenticationEnabled, this.networkTokenProviders = a?.networkTokenProviders || [], this.networkTokenOptions = a?.networkTokenOptions || {}, this.container = e || null, this.form = t;
|
|
1393
|
-
let c =
|
|
1392
|
+
let c = E({
|
|
1394
1393
|
el: this.container,
|
|
1395
1394
|
component: Rt,
|
|
1396
1395
|
props: {
|
|
@@ -1401,7 +1400,7 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1401
1400
|
clickGate: this.getOnValidate.bind(this)
|
|
1402
1401
|
},
|
|
1403
1402
|
on: {
|
|
1404
|
-
load:
|
|
1403
|
+
load: z(this, "[addCard], onload", (e) => {
|
|
1405
1404
|
this.iframe = e;
|
|
1406
1405
|
let t = this.secureEnabled ? {
|
|
1407
1406
|
...a?.secureCardOrchestration,
|
|
@@ -1433,7 +1432,7 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1433
1432
|
} : null;
|
|
1434
1433
|
this.secureConfig = t;
|
|
1435
1434
|
let c = {
|
|
1436
|
-
status:
|
|
1435
|
+
status: ze,
|
|
1437
1436
|
environment: this.environment,
|
|
1438
1437
|
debug: this.debug,
|
|
1439
1438
|
publicKey: this.publicKey,
|
|
@@ -1441,9 +1440,9 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1441
1440
|
apiUrl: this.apiUrl,
|
|
1442
1441
|
amount: r,
|
|
1443
1442
|
currency: i,
|
|
1444
|
-
vault:
|
|
1445
|
-
verifyCard:
|
|
1446
|
-
showEmail: a?.threeDSEnabled && !
|
|
1443
|
+
vault: k(a?.vault),
|
|
1444
|
+
verifyCard: k(a?.verifyCard),
|
|
1445
|
+
showEmail: a?.threeDSEnabled && !Oe(o),
|
|
1447
1446
|
visProviderId: a?.visProviderId,
|
|
1448
1447
|
requiredFields: a?.requiredFields,
|
|
1449
1448
|
clickToPayEnabled: a?.clickToPayEnabled,
|
|
@@ -1456,12 +1455,12 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1456
1455
|
this.setCardDetailsPort(t.port1), e?.contentWindow?.postMessage(c, "*", [t.port2]);
|
|
1457
1456
|
} else e?.contentWindow?.postMessage(c, "*");
|
|
1458
1457
|
this.customer?.phoneNumber && !de(String(this.customer?.phoneNumber)) && this.getCardFormFrame()?.contentWindow?.postMessage({
|
|
1459
|
-
status:
|
|
1458
|
+
status: Te,
|
|
1460
1459
|
message: "Invalid phone number"
|
|
1461
1460
|
}, "*");
|
|
1462
1461
|
}),
|
|
1463
|
-
submit:
|
|
1464
|
-
this.log("[CardProcessor]: submit event"),
|
|
1462
|
+
submit: z(this, "[addCard], onsubmit", () => {
|
|
1463
|
+
this.log("[CardProcessor]: submit event"), Gt(), this.requestCardDetails();
|
|
1465
1464
|
})
|
|
1466
1465
|
}
|
|
1467
1466
|
});
|
|
@@ -1481,7 +1480,7 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1481
1480
|
else if (e.data.status === "secure-orchestrator-click-to-pay-new-card" && this.isTrustedSecureMessage(e)) this.checkoutWithSecureClickToPayNewCard(e.data.message || {});
|
|
1482
1481
|
else if (e.data.status === "secure-orchestrator-failure" && this.isTrustedSecureMessage(e)) q(), this.showMessage(e.data.error || "Unable to process payment details"), this.failureCallback?.({ error: e.data.error || "Unable to process payment details" });
|
|
1483
1482
|
else if (e.data.status === "hide-spinner") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), q();
|
|
1484
|
-
else if (e.data.status === "show-spinner") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data),
|
|
1483
|
+
else if (e.data.status === "show-spinner") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), Gt();
|
|
1485
1484
|
else if (e.data.status === "card-form-validation-error") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), q(), this.failureCallback?.({ error: e.data.message });
|
|
1486
1485
|
else if (e.data.status === "card-form-validation-status-change") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), q(), this.validationStatusChangeCallback?.(e.data.message?.status, e.data.message?.message);
|
|
1487
1486
|
else if (e.data.status === "tokenise-card-failure") {
|
|
@@ -1514,20 +1513,20 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1514
1513
|
}), this.tokenAuthenticationEnabled && e.data.options?.networkTokenAuthenticateUrl && e.data.options?.networkToken) {
|
|
1515
1514
|
let n = this.initTokenAuthenticationProcessor(e.data.tokenId, e.data.options.networkToken, e.data.options?.networkTokenData, e.data.options.networkTokenAuthenticateUrl, e.data.options?.cardDetails, this.networkTokenOptions);
|
|
1516
1515
|
if (n) {
|
|
1517
|
-
n.invoke(this.amount, this.currency,
|
|
1518
|
-
this.log("[sdk][cardProcessor], token authentication success"), q(),
|
|
1519
|
-
}),
|
|
1516
|
+
n.invoke(this.amount, this.currency, z(this, "[sdk][cardProcessor], token authentication success", () => {
|
|
1517
|
+
this.log("[sdk][cardProcessor], token authentication success"), q(), Ze(this.container, this.getSuccessMessage()), this.successCallback?.(t);
|
|
1518
|
+
}), z(this, "[sdk][cardProcessor], token authentication error", (e) => {
|
|
1520
1519
|
q(), this.log("[sdk][cardProcessor], token authentication error", e);
|
|
1521
1520
|
}));
|
|
1522
1521
|
return;
|
|
1523
1522
|
}
|
|
1524
1523
|
}
|
|
1525
|
-
q(),
|
|
1524
|
+
q(), Ze(this.container, this.getSuccessMessage()), this.successCallback?.(t);
|
|
1526
1525
|
}
|
|
1527
1526
|
}
|
|
1528
1527
|
}
|
|
1529
1528
|
setCardDetailsPort(e) {
|
|
1530
|
-
this.closeCardDetailsPort(), this.cardDetailsPort = e, this.cardDetailsPort.onmessage =
|
|
1529
|
+
this.closeCardDetailsPort(), this.cardDetailsPort = e, this.cardDetailsPort.onmessage = z(this, "[sdk][cardProcessor]: cardDetailsPort message", (e) => {
|
|
1531
1530
|
e?.data?.status && e.data.status === "card-details" && this.handleCardDetailsMessage(e.data);
|
|
1532
1531
|
});
|
|
1533
1532
|
}
|
|
@@ -1558,14 +1557,14 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1558
1557
|
this.isSecureFlowEnabled() && !this.secureReady ? (q(), this.showMessage("Secure payment flow is not ready. Please try again."), this.failureCallback?.({ error: "Secure payment flow is not ready" })) : this.isSecureFlowEnabled() && this.secureReady ? (this.secureConfig?.clickToPay && this.clickToPayProcessor && this.postSecureMessage(x, { clickToPay: {
|
|
1559
1558
|
...this.secureConfig.clickToPay,
|
|
1560
1559
|
rememberMe: this.clickToPayProcessor.getRememberMe()
|
|
1561
|
-
} }), this.postSecureMessage(
|
|
1560
|
+
} }), this.postSecureMessage(xe)) : this.cardDetailsPort ? this.cardDetailsPort.postMessage({ status: a }) : super.requestCardDetails();
|
|
1562
1561
|
}
|
|
1563
1562
|
handleCardDetailsMessage(e) {
|
|
1564
1563
|
if (!e?.message) return;
|
|
1565
|
-
this.log(`[sdk][cardProcessor]: "${
|
|
1564
|
+
this.log(`[sdk][cardProcessor]: "${Me}" message received`, e);
|
|
1566
1565
|
let t = !!(this.clickToPayProcessor?.isEnabled() && this.clickToPayProcessor?.getRememberMe()), n = !!(this.clickToPayProcessor?.isEnabled() && e.message.srcDigitalCardId), r = !!(t && !n && e.message.cardNumber);
|
|
1567
1566
|
r && !this.clickToPayProcessor?.isSchemeSupported(e.message.cardNumber) ? (this.log("[clickToPayProcessor]: checkoutWithNewCard - Scheme is not supported!"), q(), this.showMessage("Please use another card or use an alternative payment method")) : n ? (q(), this.clickToPayProcessor?.checkoutWithCard(e.message, (t) => {
|
|
1568
|
-
this.log("[clickToPayProcessor]: checkoutWithCard", t), t.checkoutActionCode !== "CANCEL" && t.checkoutActionCode !== "CHANGE_CARD" && (
|
|
1567
|
+
this.log("[clickToPayProcessor]: checkoutWithCard", t), t.checkoutActionCode !== "CANCEL" && t.checkoutActionCode !== "CHANGE_CARD" && (Gt(), this.tokenise({ clickToPayInfo: {
|
|
1569
1568
|
correlationId: t.checkoutResponseData.srcCorrelationId,
|
|
1570
1569
|
srcFlowId: t.headers["x-src-cx-flow-id"],
|
|
1571
1570
|
merchantTransactionId: t.headers["merchant-transaction-id"],
|
|
@@ -1589,15 +1588,15 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1589
1588
|
expiryDate: e.message.expiryDate,
|
|
1590
1589
|
cardholder: e.message.cardholder,
|
|
1591
1590
|
ccv: e.message.ccv
|
|
1592
|
-
}), e.message.email && (this.threeDsProcessor?.setEmail(e.message.email), this.secondaryThreeDsProcessor?.setEmail(e.message.email)), this.fraudProcessor && !(n || r) ? (
|
|
1593
|
-
|
|
1591
|
+
}), e.message.email && (this.threeDsProcessor?.setEmail(e.message.email), this.secondaryThreeDsProcessor?.setEmail(e.message.email)), this.fraudProcessor && !(n || r) ? (Gt(), this.fraudProcessor.fraudCheck(z(this, "[fraudProcessor][fraudCheck], success", (t) => {
|
|
1592
|
+
At(t) ? (q(), I(this.container, "Payment couldn't be processed"), this.failureCallback?.({ error: "Payment couldn't be processed" })) : this.onSubmit({
|
|
1594
1593
|
cardNumber: e.message.cardNumber,
|
|
1595
1594
|
expiryDate: e.message.expiryDate,
|
|
1596
1595
|
cardholder: e.message.cardholder,
|
|
1597
1596
|
ccv: e.message.ccv
|
|
1598
1597
|
}, t);
|
|
1599
|
-
}),
|
|
1600
|
-
q(),
|
|
1598
|
+
}), z(this, "[fraudProcessor][fraudCheck], error", (e) => {
|
|
1599
|
+
q(), I(this.container, e.error), this.failureCallback?.(e);
|
|
1601
1600
|
}))) : this.onSubmit({
|
|
1602
1601
|
cardNumber: e.message.cardNumber,
|
|
1603
1602
|
expiryDate: e.message.expiryDate,
|
|
@@ -1609,11 +1608,11 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1609
1608
|
this.log("[cardProcessor]: onSubmit", {
|
|
1610
1609
|
cardInfo: {
|
|
1611
1610
|
...e,
|
|
1612
|
-
cardNumber:
|
|
1611
|
+
cardNumber: Ge(e.cardNumber),
|
|
1613
1612
|
ccv: "***"
|
|
1614
1613
|
},
|
|
1615
1614
|
fraudCheckResult: t
|
|
1616
|
-
}), t?.managedOrderToken ? (q(),
|
|
1615
|
+
}), t?.managedOrderToken ? (q(), I(this.container, "3DS challenge could not be started"), this.failureCallback?.({ error: "3DS challenge could not be started" })) : this.clickToPayProcessor?.isEnabled() && this.clickToPayProcessor?.getRememberMe() ? this.tokeniseWithClickToPay(e, void 0, t) : this.threeDsProcessor ? this.threeDsProcessor?.threeDSInvoke(this.container, !1, (e) => {
|
|
1617
1616
|
q(), this.log("[threeDSInvoke], postAuthData", e), this.tokenise({
|
|
1618
1617
|
threeDSServerTransID: e.threeDSServerTransID,
|
|
1619
1618
|
fraudCheckResult: t,
|
|
@@ -1623,15 +1622,15 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1623
1622
|
}
|
|
1624
1623
|
tokenise(e) {
|
|
1625
1624
|
if (this.log("[cardProcessor]: tokenise", e), !this.iframe) return;
|
|
1626
|
-
|
|
1625
|
+
Gt();
|
|
1627
1626
|
let t = {
|
|
1628
1627
|
status: m,
|
|
1629
1628
|
threeDSServerTransID: e.threeDSServerTransID,
|
|
1630
1629
|
fraudCheckResult: e.fraudCheckResult,
|
|
1631
1630
|
externalThreeDsData: e.externalThreeDsData,
|
|
1632
1631
|
createNetworkToken: this.tokenAuthenticationEnabled || this.createNetworkToken,
|
|
1633
|
-
vault:
|
|
1634
|
-
verifyCard:
|
|
1632
|
+
vault: k(this.vault),
|
|
1633
|
+
verifyCard: k(this.verifyCard),
|
|
1635
1634
|
email: this.customer?.email,
|
|
1636
1635
|
phone: this.customer?.phoneNumber,
|
|
1637
1636
|
billingAddress: this.billingAddress || void 0,
|
|
@@ -1644,8 +1643,8 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1644
1643
|
}), this.iframe.contentWindow?.postMessage(t, "*");
|
|
1645
1644
|
}
|
|
1646
1645
|
tokeniseWithClickToPay(e, t, n) {
|
|
1647
|
-
q(), this.clickToPayProcessor?.checkoutWithNewCard(e.cardNumber, e.expiryDate, e.ccv || "", !0,
|
|
1648
|
-
this.log("[clickToPayProcessor]: checkoutWithNewCard", r), r.checkoutActionCode !== "CANCEL" && (
|
|
1646
|
+
q(), this.clickToPayProcessor?.checkoutWithNewCard(e.cardNumber, e.expiryDate, e.ccv || "", !0, z(this, "[clickToPayProcessor]: checkoutWithNewCard", (r) => {
|
|
1647
|
+
this.log("[clickToPayProcessor]: checkoutWithNewCard", r), r.checkoutActionCode !== "CANCEL" && (Gt(), this.tokenise({
|
|
1649
1648
|
threeDSServerTransID: t,
|
|
1650
1649
|
fraudCheckResult: n,
|
|
1651
1650
|
clickToPayInfo: {
|
|
@@ -1656,32 +1655,32 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1656
1655
|
digitalCardId: r.checkoutResponseData.maskedCard.srcDigitalCardId.replace(/^-/, "")
|
|
1657
1656
|
}
|
|
1658
1657
|
}));
|
|
1659
|
-
}),
|
|
1660
|
-
this.log("[clickToPayProcessor]: checkoutWithNewCard, error", e), q(),
|
|
1658
|
+
}), z(this, "[clickToPayProcessor]: checkoutWithNewCard, error", (e) => {
|
|
1659
|
+
this.log("[clickToPayProcessor]: checkoutWithNewCard, error", e), q(), I(this.container, e.message);
|
|
1661
1660
|
}));
|
|
1662
1661
|
}
|
|
1663
1662
|
checkoutWithSecureClickToPayCard(e) {
|
|
1664
|
-
q(), this.clickToPayProcessor?.checkoutWithCard(e,
|
|
1665
|
-
this.log("[clickToPayProcessor]: secure checkoutWithCard", e), e.checkoutActionCode !== "CANCEL" && e.checkoutActionCode !== "CHANGE_CARD" && (
|
|
1663
|
+
q(), this.clickToPayProcessor?.checkoutWithCard(e, z(this, "[clickToPayProcessor]: secure checkoutWithCard", (e) => {
|
|
1664
|
+
this.log("[clickToPayProcessor]: secure checkoutWithCard", e), e.checkoutActionCode !== "CANCEL" && e.checkoutActionCode !== "CHANGE_CARD" && (Gt(), this.tokenise({ clickToPayInfo: {
|
|
1666
1665
|
correlationId: e.checkoutResponseData.srcCorrelationId,
|
|
1667
1666
|
srcFlowId: e.headers["x-src-cx-flow-id"],
|
|
1668
1667
|
merchantTransactionId: e.headers["merchant-transaction-id"],
|
|
1669
1668
|
digitalCardId: e.checkoutResponseData.maskedCard.srcDigitalCardId.replace(/^-/, "")
|
|
1670
1669
|
} }));
|
|
1671
|
-
}),
|
|
1670
|
+
}), z(this, "[clickToPayProcessor]: secure checkoutWithCard, error", (e) => {
|
|
1672
1671
|
this.log("[clickToPayProcessor]: secure checkoutWithCard, error", e), q();
|
|
1673
1672
|
}));
|
|
1674
1673
|
}
|
|
1675
1674
|
checkoutWithSecureClickToPayNewCard(e) {
|
|
1676
|
-
!e.encryptedCard || !e.cardBrand ? (q(), this.showMessage("Unable to process Click to Pay card"), this.failureCallback?.({ error: "Unable to process Click to Pay card" })) : (q(), this.clickToPayProcessor?.checkoutWithEncryptedNewCard(e.encryptedCard, e.cardBrand,
|
|
1677
|
-
this.log("[clickToPayProcessor]: secure checkoutWithEncryptedNewCard", e), e.checkoutActionCode !== "CANCEL" && (
|
|
1675
|
+
!e.encryptedCard || !e.cardBrand ? (q(), this.showMessage("Unable to process Click to Pay card"), this.failureCallback?.({ error: "Unable to process Click to Pay card" })) : (q(), this.clickToPayProcessor?.checkoutWithEncryptedNewCard(e.encryptedCard, e.cardBrand, z(this, "[clickToPayProcessor]: secure checkoutWithEncryptedNewCard", (e) => {
|
|
1676
|
+
this.log("[clickToPayProcessor]: secure checkoutWithEncryptedNewCard", e), e.checkoutActionCode !== "CANCEL" && (Gt(), this.tokenise({ clickToPayInfo: {
|
|
1678
1677
|
correlationId: e.checkoutResponseData.srcCorrelationId,
|
|
1679
1678
|
srcFlowId: e.headers["x-src-cx-flow-id"],
|
|
1680
1679
|
merchantTransactionId: e.headers["merchant-transaction-id"],
|
|
1681
1680
|
digitalCardId: e.checkoutResponseData.maskedCard.srcDigitalCardId.replace(/^-/, "")
|
|
1682
1681
|
} }));
|
|
1683
|
-
}),
|
|
1684
|
-
this.log("[clickToPayProcessor]: secure checkoutWithEncryptedNewCard, error", e), q(),
|
|
1682
|
+
}), z(this, "[clickToPayProcessor]: secure checkoutWithEncryptedNewCard, error", (e) => {
|
|
1683
|
+
this.log("[clickToPayProcessor]: secure checkoutWithEncryptedNewCard, error", e), q(), I(this.container, e.message);
|
|
1685
1684
|
})));
|
|
1686
1685
|
}
|
|
1687
1686
|
setAmount(e) {
|
|
@@ -1708,8 +1707,8 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1708
1707
|
setGeolocation(e) {
|
|
1709
1708
|
this.geolocation = { ...e }, this.isSecureFlowEnabled() && this.postSecureMessage(x, { geolocation: e });
|
|
1710
1709
|
}
|
|
1711
|
-
tokeniseCard(e, t, n, r, i, a, o, s) {
|
|
1712
|
-
|
|
1710
|
+
tokeniseCard(e, t, n, r, i, a, o, s, c) {
|
|
1711
|
+
O(e) ? ge(t) ? be(n) ? Fe(i) ? this.httpInvoker?.invoke(qt(this.apiUrl, e)[Kt.TOKENISE_CARD].url, qt(this.apiUrl, e)[Kt.TOKENISE_CARD].method, JSON.stringify({
|
|
1713
1712
|
paymentInformation: {
|
|
1714
1713
|
cardNumber: t,
|
|
1715
1714
|
expiryDate: n,
|
|
@@ -1722,7 +1721,7 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1722
1721
|
metadata: a,
|
|
1723
1722
|
verify: s?.verify,
|
|
1724
1723
|
createNetworkToken: s?.createNetworkToken,
|
|
1725
|
-
fraudCheck:
|
|
1724
|
+
fraudCheck: c || null,
|
|
1726
1725
|
amount: this.amount,
|
|
1727
1726
|
currency: this.currency,
|
|
1728
1727
|
firstName: this.customer?.firstName,
|
|
@@ -1739,7 +1738,7 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1739
1738
|
expiryDate: n.card.expiryDate,
|
|
1740
1739
|
cardholder: n.card.cardholder,
|
|
1741
1740
|
scheme: n.card.iinData?.scheme
|
|
1742
|
-
}, r.iinData = n.card.iinData),
|
|
1741
|
+
}, r.iinData = n.card.iinData), c && (r.fraudCheckResult = c), this.successCallback?.(r);
|
|
1743
1742
|
}, (e, t) => {
|
|
1744
1743
|
this.log("tokeniseCardFailureCallback", e, t), q(), this.failureCallback?.({
|
|
1745
1744
|
error: "Unable to tokenise payment information",
|
|
@@ -1755,7 +1754,7 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1755
1754
|
});
|
|
1756
1755
|
let o = (i?.scheme || "").toLowerCase(), s = this.networkTokenProviders.find((e) => e.providerType.toLowerCase() === o);
|
|
1757
1756
|
switch (String(s?.providerType).toLowerCase()) {
|
|
1758
|
-
case "mastercard": return new
|
|
1757
|
+
case "mastercard": return new Wt(this.log.bind(this), {
|
|
1759
1758
|
container: this.container,
|
|
1760
1759
|
token: e,
|
|
1761
1760
|
networkToken: t,
|
|
@@ -1771,36 +1770,34 @@ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
|
|
|
1771
1770
|
}
|
|
1772
1771
|
}
|
|
1773
1772
|
};
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
function Jt() {
|
|
1773
|
+
L([R], J.prototype, "cleanUp", null), L([R], J.prototype, "addCard", null), L([R], J.prototype, "messageHandler", null), L([R], J.prototype, "setCardDetailsPort", null), L([R], J.prototype, "closeCardDetailsPort", null), L([R], J.prototype, "postSecureMessage", null), L([R], J.prototype, "requestCardDetails", null), L([R], J.prototype, "handleCardDetailsMessage", null), L([R], J.prototype, "onSubmit", null), L([R], J.prototype, "tokenise", null), L([R], J.prototype, "tokeniseWithClickToPay", null), L([R], J.prototype, "checkoutWithSecureClickToPayCard", null), L([R], J.prototype, "checkoutWithSecureClickToPayNewCard", null), L([R], J.prototype, "setAmount", null), L([R], J.prototype, "setCurrency", null), L([R], J.prototype, "setCustomerInfo", null), L([R], J.prototype, "setBillingAddress", null), L([R], J.prototype, "setOrderInfo", null), L([R], J.prototype, "setGeolocation", null), L([R], J.prototype, "tokeniseCard", null), L([R], J.prototype, "initTokenAuthenticationProcessor", null);
|
|
1774
|
+
// src/sdk/utils/error.ts
|
|
1775
|
+
var Jt = p("");
|
|
1776
|
+
function Yt() {
|
|
1779
1777
|
return {
|
|
1780
|
-
errorMessage:
|
|
1778
|
+
errorMessage: Jt,
|
|
1781
1779
|
showErrorMessage: (e) => {
|
|
1782
|
-
|
|
1780
|
+
Jt.value = e;
|
|
1783
1781
|
},
|
|
1784
1782
|
hideErrorMessage: () => {
|
|
1785
|
-
|
|
1783
|
+
Jt.value = "";
|
|
1786
1784
|
}
|
|
1787
1785
|
};
|
|
1788
1786
|
}
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
var Yt = {
|
|
1787
|
+
// src/sdk/components/PayToForm.vue?vue&type=script&setup=true&lang.ts
|
|
1788
|
+
var Xt = {
|
|
1792
1789
|
id: "payfurl-payto-form",
|
|
1793
1790
|
class: "payfurl-form"
|
|
1794
|
-
},
|
|
1791
|
+
}, Zt = {
|
|
1795
1792
|
key: 0,
|
|
1796
1793
|
class: "error text-normal"
|
|
1797
|
-
},
|
|
1794
|
+
}, Qt = { class: "row" }, $t = { class: "row" }, en = { class: "row" }, tn = ["placeholder"], nn = {
|
|
1798
1795
|
key: 0,
|
|
1799
1796
|
class: "small"
|
|
1800
|
-
},
|
|
1797
|
+
}, rn = {
|
|
1801
1798
|
key: 1,
|
|
1802
1799
|
class: "error"
|
|
1803
|
-
},
|
|
1800
|
+
}, an = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
1804
1801
|
__name: "PayToForm",
|
|
1805
1802
|
props: {
|
|
1806
1803
|
log: { type: Function },
|
|
@@ -1808,9 +1805,9 @@ var Yt = {
|
|
|
1808
1805
|
},
|
|
1809
1806
|
emits: ["submit"],
|
|
1810
1807
|
setup(e, { emit: t }) {
|
|
1811
|
-
let n = e, r = t, a = p({}), { isLoading: o } =
|
|
1808
|
+
let n = e, r = t, a = p({}), { isLoading: o } = W(), l = p(""), d = p("PHONE"), f = p(""), m = le(() => d.value === "PHONE" ? "0405123456 or 0212341234" : qe(d.value.toLowerCase())), h = p(!0), { errorMessage: _ } = Yt();
|
|
1812
1809
|
function v() {
|
|
1813
|
-
return a.value.payId = "", d.value === "PHONE" && (de(f.value) || (a.value.payId = "Invalid phone number")), d.value === "EMAIL" && (
|
|
1810
|
+
return a.value.payId = "", d.value === "PHONE" && (de(f.value) || (a.value.payId = "Invalid phone number")), d.value === "EMAIL" && (Oe(f.value) || (a.value.payId = "Invalid email")), d.value === "ABN" && (ee(f.value.replace(/ /g, "")) || (a.value.payId = "Invalid ABN")), a.value.payId === "";
|
|
1814
1811
|
}
|
|
1815
1812
|
function y(e) {
|
|
1816
1813
|
if (e?.data?.status) {
|
|
@@ -1823,7 +1820,7 @@ var Yt = {
|
|
|
1823
1820
|
r("submit", {
|
|
1824
1821
|
payerName: l.value,
|
|
1825
1822
|
payIdType: d.value,
|
|
1826
|
-
payId: d.value === "PHONE" ?
|
|
1823
|
+
payId: d.value === "PHONE" ? Ae(f.value) : String(f.value).toLowerCase().replace(/ /g, "")
|
|
1827
1824
|
});
|
|
1828
1825
|
}
|
|
1829
1826
|
e.data.status === "activate" && e.data.component === "payto" && (n.log?.(`[PayTo]: message "${e.data.status}" received`, e.data), _.value = "", h.value = !0), e.data.status === "deactivate" && e.data.component === "payto" && (n.log?.(`[PayTo]: message "${e.data.status}" received`, e.data), h.value = !1);
|
|
@@ -1832,60 +1829,60 @@ var Yt = {
|
|
|
1832
1829
|
return c(() => {
|
|
1833
1830
|
window.addEventListener("message", y), window.addEventListener("keypress", function(e) {
|
|
1834
1831
|
e.altKey && e.code === "KeyP" && (e.preventDefault(), l.value = "test", d.value = "ABN", f.value = "67384721620");
|
|
1835
|
-
}), window.postMessage({ status:
|
|
1832
|
+
}), window.postMessage({ status: Re }, "*");
|
|
1836
1833
|
}), s(() => {
|
|
1837
1834
|
window.removeEventListener("message", y);
|
|
1838
|
-
}), (e, t) => (b(),
|
|
1835
|
+
}), (e, t) => (b(), j("div", Xt, [u(Le(se, null, null, 512), [[Ee, g(o)]]), A("div", {
|
|
1839
1836
|
class: "container-form",
|
|
1840
|
-
style:
|
|
1837
|
+
style: He(`visibility: ${g(o) ? "hidden" : "visible"}`)
|
|
1841
1838
|
}, [
|
|
1842
|
-
g(_) ? (b(),
|
|
1843
|
-
|
|
1839
|
+
g(_) ? (b(), j("div", Zt, i(g(_)), 1)) : T("", !0),
|
|
1840
|
+
A("div", Qt, [t[3] ||= A("label", null, "Payer Name", -1), A("div", null, [u(A("input", {
|
|
1844
1841
|
type: "text",
|
|
1845
1842
|
maxlength: "100",
|
|
1846
1843
|
placeholder: "Payer Name",
|
|
1847
1844
|
"onUpdate:modelValue": t[0] ||= (e) => l.value = e
|
|
1848
|
-
}, null, 512), [[
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
]], 512), [[
|
|
1854
|
-
|
|
1855
|
-
u(
|
|
1845
|
+
}, null, 512), [[je, l.value]])])]),
|
|
1846
|
+
A("div", $t, [t[5] ||= A("label", null, "Payer Id Type", -1), A("div", null, [u(A("select", { "onUpdate:modelValue": t[1] ||= (e) => d.value = e }, [...t[4] ||= [
|
|
1847
|
+
A("option", { value: "PHONE" }, "Phone", -1),
|
|
1848
|
+
A("option", { value: "EMAIL" }, "Email", -1),
|
|
1849
|
+
A("option", { value: "ABN" }, "Abn", -1)
|
|
1850
|
+
]], 512), [[ve, d.value]])])]),
|
|
1851
|
+
A("div", en, [t[6] ||= A("label", null, " Pay Id ", -1), A("div", null, [
|
|
1852
|
+
u(A("input", {
|
|
1856
1853
|
type: "text",
|
|
1857
1854
|
maxlength: "100",
|
|
1858
1855
|
placeholder: m.value,
|
|
1859
1856
|
"onUpdate:modelValue": t[2] ||= (e) => f.value = e,
|
|
1860
1857
|
onKeyup: v
|
|
1861
|
-
}, null, 40,
|
|
1862
|
-
d.value === "PHONE" ? (b(),
|
|
1863
|
-
a.value.payId ? (b(),
|
|
1858
|
+
}, null, 40, tn), [[je, f.value]]),
|
|
1859
|
+
d.value === "PHONE" ? (b(), j("div", nn, "(mobile or landline with area code)")) : T("", !0),
|
|
1860
|
+
a.value.payId ? (b(), j("p", rn, i(a.value.payId), 1)) : T("", !0)
|
|
1864
1861
|
])])
|
|
1865
1862
|
], 4)]));
|
|
1866
1863
|
}
|
|
1867
|
-
}), [["__scopeId", "data-v-3e5bba92"]]),
|
|
1864
|
+
}), [["__scopeId", "data-v-3e5bba92"]]), on = {
|
|
1868
1865
|
id: "payfurl-payto-agreement",
|
|
1869
1866
|
class: "payfurl-form"
|
|
1870
|
-
},
|
|
1867
|
+
}, sn = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
1871
1868
|
__name: "PayToAgreement",
|
|
1872
1869
|
props: { debug: { type: Boolean } },
|
|
1873
1870
|
setup(e) {
|
|
1874
|
-
return (e, t) => (b(),
|
|
1871
|
+
return (e, t) => (b(), j("div", on, [Le(se), t[0] ||= A("div", { class: "message" }, "Approve the agreement in your banking app", -1)]));
|
|
1875
1872
|
}
|
|
1876
|
-
}), [["__scopeId", "data-v-f06289bf"]]),
|
|
1873
|
+
}), [["__scopeId", "data-v-f06289bf"]]), cn = {
|
|
1877
1874
|
TOKENISE: "TOKENISE",
|
|
1878
1875
|
TOKEN_STATUS: "TOKEN_STATUS"
|
|
1879
|
-
},
|
|
1880
|
-
[
|
|
1876
|
+
}, ln = (e, t) => ({
|
|
1877
|
+
[cn.TOKENISE]: {
|
|
1881
1878
|
url: e + "/token/payto",
|
|
1882
1879
|
method: "POST"
|
|
1883
1880
|
},
|
|
1884
|
-
[
|
|
1881
|
+
[cn.TOKEN_STATUS]: {
|
|
1885
1882
|
url: e + "/token/" + t,
|
|
1886
1883
|
method: "GET"
|
|
1887
1884
|
}
|
|
1888
|
-
}),
|
|
1885
|
+
}), un = class {
|
|
1889
1886
|
container = null;
|
|
1890
1887
|
log;
|
|
1891
1888
|
apiUrl = "";
|
|
@@ -1900,8 +1897,8 @@ var Yt = {
|
|
|
1900
1897
|
destroy = () => {};
|
|
1901
1898
|
constructor(e, t) {
|
|
1902
1899
|
this.log = e, this.apiUrl = t.apiUrl, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null;
|
|
1903
|
-
let n = new
|
|
1904
|
-
this.httpInvoker = new
|
|
1900
|
+
let n = new N(t.environment, P(t.publicKey));
|
|
1901
|
+
this.httpInvoker = new F(t.publicKey, t.version, n);
|
|
1905
1902
|
}
|
|
1906
1903
|
setOnValidate(e) {
|
|
1907
1904
|
this.userOnValidate = e;
|
|
@@ -1917,19 +1914,19 @@ var Yt = {
|
|
|
1917
1914
|
amount: n,
|
|
1918
1915
|
providerId: r,
|
|
1919
1916
|
options: i
|
|
1920
|
-
}), this.container = t, this.providerId = r, this.options = i, this.options.metadata =
|
|
1921
|
-
if (!String(i.description).trim()) throw
|
|
1922
|
-
if (i.maximumAmount ||= 1e3, i.maximumAmount < 0 || i.maximumAmount > 9999) throw
|
|
1923
|
-
let a =
|
|
1917
|
+
}), this.container = t, this.providerId = r, this.options = i, this.options.metadata = G(i?.metadata), !e(n)) throw I(t, "Invalid amount: " + n), TypeError("invalid amount: " + n);
|
|
1918
|
+
if (!String(i.description).trim()) throw I(t, "Invalid description"), TypeError("invalid description");
|
|
1919
|
+
if (i.maximumAmount ||= 1e3, i.maximumAmount < 0 || i.maximumAmount > 9999) throw I(t, "Invalid maximum amount: " + i.maximumAmount), TypeError("invalid maximumAmount: " + i.maximumAmount);
|
|
1920
|
+
let a = E({
|
|
1924
1921
|
el: this.container,
|
|
1925
|
-
component:
|
|
1922
|
+
component: an,
|
|
1926
1923
|
props: {
|
|
1927
1924
|
el: this.container,
|
|
1928
1925
|
log: this.log,
|
|
1929
1926
|
clickGate: this.getOnValidate.bind(this)
|
|
1930
1927
|
},
|
|
1931
|
-
on: { submit:
|
|
1932
|
-
this.log("[PayTo]: submit payto form", e),
|
|
1928
|
+
on: { submit: z(this, "[PayTo]: submit", (e) => {
|
|
1929
|
+
this.log("[PayTo]: submit payto form", e), W().startLoading(), setTimeout(() => {
|
|
1933
1930
|
this.tokenise(e);
|
|
1934
1931
|
}, 500);
|
|
1935
1932
|
}) }
|
|
@@ -1948,52 +1945,50 @@ var Yt = {
|
|
|
1948
1945
|
},
|
|
1949
1946
|
metadata: this.options?.metadata
|
|
1950
1947
|
};
|
|
1951
|
-
this.httpInvoker?.invoke(
|
|
1948
|
+
this.httpInvoker?.invoke(ln(this.apiUrl)[cn.TOKENISE].url, ln(this.apiUrl)[cn.TOKENISE].method, JSON.stringify(t), this.successPayToHandler.bind(this), this.failurePayToHandler.bind(this));
|
|
1952
1949
|
}
|
|
1953
|
-
successPayToHandler =
|
|
1950
|
+
successPayToHandler = z(this, "[PayTo][tokenise][successPayToHandler]", (e, t) => {
|
|
1954
1951
|
this.log("successPayToHandler", e, t);
|
|
1955
1952
|
let n = JSON.parse(t);
|
|
1956
1953
|
if (!n || !n?.tokenId) return this.failurePayToHandler(e, t);
|
|
1957
|
-
this.tokenId = n.tokenId,
|
|
1954
|
+
this.tokenId = n.tokenId, E({
|
|
1958
1955
|
el: this.container,
|
|
1959
|
-
component:
|
|
1956
|
+
component: sn,
|
|
1960
1957
|
props: {
|
|
1961
1958
|
el: this.container,
|
|
1962
1959
|
log: this.log
|
|
1963
1960
|
}
|
|
1964
1961
|
}), this.checkAgreement();
|
|
1965
1962
|
});
|
|
1966
|
-
failurePayToHandler =
|
|
1967
|
-
this.log("failurePayToHandler", e, t),
|
|
1963
|
+
failurePayToHandler = z(this, "[PayTo][tokenise][failurePayToHandler]", (e, t) => {
|
|
1964
|
+
this.log("failurePayToHandler", e, t), W().stopLoading(), Yt().showErrorMessage("Invalid payment details");
|
|
1968
1965
|
});
|
|
1969
|
-
failurePayToAgreementHandler =
|
|
1970
|
-
|
|
1966
|
+
failurePayToAgreementHandler = z(this, "[PayTo][tokenise][failurePayToAgreementHandler]", (e, t) => {
|
|
1967
|
+
W().stopLoading(), this.log("failurePayToAgreementHandler", e, t), I(this.container, "Agreement has been canceled"), this.failureCallback?.({
|
|
1971
1968
|
error: "Agreement has been canceled",
|
|
1972
1969
|
body: t
|
|
1973
1970
|
});
|
|
1974
1971
|
});
|
|
1975
1972
|
successPayToAgreementHandler() {
|
|
1976
|
-
|
|
1973
|
+
W().stopLoading(), this.log("success agreement", this.tokenId), Ze(this.container, "PayTo Agreement Approved"), this.successCallback?.({ token: this.tokenId });
|
|
1977
1974
|
}
|
|
1978
1975
|
checkAgreement() {
|
|
1979
|
-
this.checkAgreementHandler ||= setInterval(this.checkAgreement.bind(this), 5e3), this.httpInvoker?.invoke(
|
|
1976
|
+
this.checkAgreementHandler ||= setInterval(this.checkAgreement.bind(this), 5e3), this.httpInvoker?.invoke(ln(this.apiUrl, this.tokenId)[cn.TOKEN_STATUS].url, ln(this.apiUrl, this.tokenId)[cn.TOKEN_STATUS].method, {}, z(this, "[checkAgreement], success", (e, t) => {
|
|
1980
1977
|
this.log("checkAgreement", e, t);
|
|
1981
1978
|
let n = JSON.parse(t);
|
|
1982
1979
|
if (!n) return clearInterval(this.checkAgreementHandler), this.failurePayToAgreementHandler(e, t);
|
|
1983
1980
|
if (n.payToStatus !== "PENDING") return n.payToStatus === "ACTIVE" ? (clearInterval(this.checkAgreementHandler), this.successPayToAgreementHandler()) : (clearInterval(this.checkAgreementHandler), this.failurePayToAgreementHandler(e, ""));
|
|
1984
|
-
}),
|
|
1981
|
+
}), z(this, "[checkAgreement], failure", (e, t) => (this.log("checkAgreement", e, t), clearInterval(this.checkAgreementHandler), this.failurePayToAgreementHandler(e, t))));
|
|
1985
1982
|
}
|
|
1986
1983
|
};
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
//#region src/sdk/checkout/checkoutProvider.type.ts
|
|
1984
|
+
L([R], un.prototype, "cleanUp", null), L([R], un.prototype, "addPayTo", null), L([R], un.prototype, "tokenise", null), L([R], un.prototype, "successPayToAgreementHandler", null), L([R], un.prototype, "checkAgreement", null);
|
|
1985
|
+
// src/sdk/checkout/checkoutProvider.type.ts
|
|
1990
1986
|
var Y;
|
|
1991
1987
|
(function(e) {
|
|
1992
1988
|
e.AZUPAY = "azupay", e.SHIFT = "shift", e.PAYGLOCAL = "payglocal", e.PESAPAL = "pesapal", e.ADDI = "addi", e.AFFIRM = "affirm", e.AFTERPAY = "afterpay", e.ALMA = "alma", e.APLAZAME = "aplazame", e.APLAZO = "aplazo", e.ATOME = "atome", e.BILLEASE = "billease", e.CASHEW = "cashew", e.CASHPRESSO = "cashpresso", e.CLEARPAY = "clearpay", e.CLEO = "cleo", e.DANA = "dana", e.EASYPAISA = "easypaisa", e.FINVERO = "finvero", e.FUPAY = "fupay", e.GCASG = "gcasg", e.GRABPAY = "grabpay", e.HUMM = "humm", e.KAKAOPAY = "kakaopay", e.KLARNA = "klarna", e.KUESKIPAY = "kueskipay", e.LARA = "lara", e.LATITUDEPAY = "latitudepay", e.LAYBUY = "laybuy", e.LIMEPAY = "limepay", e.PACE = "pace", e.PAGALEVE = "pagaleve", e.PARIBAS = "paribas", e.PAYWITHFOUR = "paywithfour", e.PAYJUSTNOW = "payjustnow", e.PAYTM = "paytm", e.PAYBRIGHT = "paybright", e.PAYFLEX = "payflex", e.PAYRIGHT = "payright", e.POSTPAY = "postpay", e.RATEPAY = "ratepay", e.RIVERTY = "riverty", e.SCALAPAY = "scalapay", e.SEZZLE = "sezzle", e.SHOPBACK = "shopback", e.SMARTPAY = "smartpay", e.SOFINCO = "sofinco", e.SPLITIT = "splitit", e.TABBY = "tabby", e.TAMARA = "tamara", e.TENDOPAY = "tendopay", e.TOUCHNGO = "touchngo", e.TRIPLEA = "triplea", e.TRUEMONEY = "truemoney", e.TWISTO = "twisto", e.UPLIFT = "uplift", e.VALU = "valu", e.ZEST = "zest", e.ZIP = "zip", e.ZOODPAY = "zoodpay", e.BKASH = "bkash", e.ERATY = "eraty", e.PAYBYACCOUNT = "pay_by_account", e.UPI = "upi";
|
|
1993
1989
|
})(Y ||= {});
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
var un = {
|
|
1990
|
+
// src/sdk/checkout/checkoutOptions.ts
|
|
1991
|
+
var dn = {
|
|
1997
1992
|
[Y.AZUPAY]: {
|
|
1998
1993
|
name: "PayID",
|
|
1999
1994
|
description: "",
|
|
@@ -2378,10 +2373,10 @@ var un = {
|
|
|
2378
2373
|
buttonTitle: "Pay with eRaty",
|
|
2379
2374
|
icon: "Eraty"
|
|
2380
2375
|
}
|
|
2381
|
-
},
|
|
2376
|
+
}, fn = { class: "modal-header" }, pn = { class: "main-title" }, mn = { class: "modal-body" }, hn = {
|
|
2382
2377
|
key: 0,
|
|
2383
2378
|
class: "modal-footer"
|
|
2384
|
-
},
|
|
2379
|
+
}, gn = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
2385
2380
|
__name: "Modal",
|
|
2386
2381
|
props: {
|
|
2387
2382
|
width: {},
|
|
@@ -2402,27 +2397,27 @@ var un = {
|
|
|
2402
2397
|
let e = [];
|
|
2403
2398
|
return r.width && e.push(`width: ${r.width}`), r.height && e.push(`height: ${r.height}`), e.join(";");
|
|
2404
2399
|
}), u = le(() => r.mode == "confirm" ? "small" : "");
|
|
2405
|
-
return (e, t) => (b(),
|
|
2400
|
+
return (e, t) => (b(), j("div", {
|
|
2406
2401
|
class: "modal-mask",
|
|
2407
|
-
onMousedown:
|
|
2408
|
-
}, [
|
|
2402
|
+
onMousedown: ye(o, ["self"])
|
|
2403
|
+
}, [A("div", {
|
|
2409
2404
|
class: ne(["modal-wrapper", u.value]),
|
|
2410
2405
|
role: "document",
|
|
2411
|
-
onClick: t[0] ||=
|
|
2412
|
-
}, [
|
|
2406
|
+
onClick: t[0] ||= ye(() => {}, ["stop"])
|
|
2407
|
+
}, [A("div", {
|
|
2413
2408
|
class: "modal-content",
|
|
2414
|
-
style:
|
|
2409
|
+
style: He(l.value)
|
|
2415
2410
|
}, [
|
|
2416
|
-
|
|
2411
|
+
A("div", fn, [A("div", {
|
|
2417
2412
|
class: "close-icon",
|
|
2418
|
-
onClick:
|
|
2419
|
-
}, [
|
|
2420
|
-
|
|
2421
|
-
c.value ? (b(),
|
|
2413
|
+
onClick: ye(a, ["stop"])
|
|
2414
|
+
}, [Le(Pe, { size: 15 })]), A("div", pn, [n(e.$slots, "title", {}, void 0, !0)])]),
|
|
2415
|
+
A("div", mn, [n(e.$slots, "body", {}, void 0, !0)]),
|
|
2416
|
+
c.value ? (b(), j("div", hn, [n(e.$slots, "footer", {}, void 0, !0)])) : T("", !0),
|
|
2422
2417
|
n(e.$slots, "default", {}, void 0, !0)
|
|
2423
2418
|
], 4)], 2)], 32));
|
|
2424
2419
|
}
|
|
2425
|
-
}), [["__scopeId", "data-v-2b2c8fc7"]]),
|
|
2420
|
+
}), [["__scopeId", "data-v-2b2c8fc7"]]), _n = ["src"], vn = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
2426
2421
|
__name: "CheckoutPopup",
|
|
2427
2422
|
props: {
|
|
2428
2423
|
url: {},
|
|
@@ -2433,27 +2428,27 @@ var un = {
|
|
|
2433
2428
|
let n = e, r = t, a = p(n.url);
|
|
2434
2429
|
return p(null), y(() => n.url, (e) => {
|
|
2435
2430
|
a.value = e;
|
|
2436
|
-
}), c(() => {}), (t, n) => (b(),
|
|
2431
|
+
}), c(() => {}), (t, n) => (b(), Be(gn, {
|
|
2437
2432
|
width: "80vw",
|
|
2438
2433
|
height: "80vh",
|
|
2439
2434
|
backdrop: "static",
|
|
2440
2435
|
onClose: n[0] ||= (e) => r("close")
|
|
2441
2436
|
}, {
|
|
2442
2437
|
title: S(() => [o(i(e.name), 1)]),
|
|
2443
|
-
body: S(() => [
|
|
2438
|
+
body: S(() => [A("iframe", {
|
|
2444
2439
|
src: a.value,
|
|
2445
2440
|
sandbox: "allow-same-origin allow-scripts allow-popups allow-forms"
|
|
2446
|
-
}, null, 8,
|
|
2441
|
+
}, null, 8, _n)]),
|
|
2447
2442
|
_: 1
|
|
2448
2443
|
}));
|
|
2449
2444
|
}
|
|
2450
|
-
}), [["__scopeId", "data-v-5d26ad8f"]]),
|
|
2445
|
+
}), [["__scopeId", "data-v-5d26ad8f"]]), yn = ["id"], bn = {
|
|
2451
2446
|
key: 0,
|
|
2452
2447
|
class: "error text-normal"
|
|
2453
|
-
},
|
|
2448
|
+
}, xn = { class: "row" }, Sn = {
|
|
2454
2449
|
key: 1,
|
|
2455
2450
|
class: "error"
|
|
2456
|
-
},
|
|
2451
|
+
}, Cn = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
2457
2452
|
__name: "CheckoutForm",
|
|
2458
2453
|
props: {
|
|
2459
2454
|
log: { type: Function },
|
|
@@ -2470,13 +2465,13 @@ var un = {
|
|
|
2470
2465
|
"newWindowClose"
|
|
2471
2466
|
],
|
|
2472
2467
|
setup(e, { emit: t }) {
|
|
2473
|
-
let n = e, r = t, a = p(null), { isLoading: o } =
|
|
2468
|
+
let n = e, r = t, a = p(null), { isLoading: o } = W(), l = p(!0), d = p(n.providerType), f = p(""), m = p(!!n.options.checkoutOptions?.newWindow), h = null, _ = p(null), { errorMessage: v } = Yt(), y = le(() => dn[d.value]?.buttonTitle || `Pay with ${d.value}`), x = le(() => {
|
|
2474
2469
|
let e = _.value?.gatewayTransactionData?.RedirectUrl || "";
|
|
2475
2470
|
return !e || !me(e) ? "" : m.value ? e : `${e}${e.includes("?") ? "&" : "?"}embedded=true`;
|
|
2476
2471
|
}), S = p(!1), ee = p(!1), te = le(() => x.value && !S.value && !ee.value);
|
|
2477
2472
|
function ne(e) {
|
|
2478
2473
|
if (e?.data?.status) {
|
|
2479
|
-
if (e.data.status === "activate" && e.data.component === "checkout" && e.data.providerType === d.value && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), l.value = !0, r("activate", n.options)), e.data.status === "deactivate" && e.data.component === "checkout" && e.data.providerType === d.value && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), l.value = !1), e.data.status === "checkout-ready" && e.data.component === "checkout" && e.data.providerType === d.value && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), v.value = "", _.value = e.data.checkoutData, n.log?.("[BNPL]: checkout", _.value), window.postMessage({ status:
|
|
2474
|
+
if (e.data.status === "activate" && e.data.component === "checkout" && e.data.providerType === d.value && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), l.value = !0, r("activate", n.options)), e.data.status === "deactivate" && e.data.component === "checkout" && e.data.providerType === d.value && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), l.value = !1), e.data.status === "checkout-ready" && e.data.component === "checkout" && e.data.providerType === d.value && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), v.value = "", _.value = e.data.checkoutData, n.log?.("[BNPL]: checkout", _.value), window.postMessage({ status: Re }, "*")), e.data.status === "message" && e.data.component === "checkout" && e.data.providerType === d.value && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), f.value = e.data.message, ee.value = !1, S.value = !1), e.data.status === "error" && e.data.component === "checkout" && e.data.providerType === d.value && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), f.value = e.data.error, e.data.originalError)) {
|
|
2480
2475
|
let t = JSON.parse(e.data.originalError);
|
|
2481
2476
|
t?.message && (f.value = t.message);
|
|
2482
2477
|
}
|
|
@@ -2506,29 +2501,29 @@ var un = {
|
|
|
2506
2501
|
S.value = !1, ee.value = !1, h?.close(), r("popupClose");
|
|
2507
2502
|
}
|
|
2508
2503
|
return c(() => {
|
|
2509
|
-
window.addEventListener("message", ne),
|
|
2504
|
+
window.addEventListener("message", ne), ct(a.value, "payfurl-combined-container") || (l.value = !0, r("activate", n.options));
|
|
2510
2505
|
}), s(() => {
|
|
2511
2506
|
window.removeEventListener("message", ne);
|
|
2512
|
-
}), (e, t) => (b(),
|
|
2513
|
-
u(
|
|
2514
|
-
ee.value && !S.value ? (b(),
|
|
2507
|
+
}), (e, t) => (b(), j(D, null, [
|
|
2508
|
+
u(Le(se, { "use-local": "" }, null, 512), [[Ee, !x.value]]),
|
|
2509
|
+
ee.value && !S.value ? (b(), Be(se, {
|
|
2515
2510
|
key: 0,
|
|
2516
2511
|
message: "Finalise the payment"
|
|
2517
2512
|
})) : T("", !0),
|
|
2518
|
-
|
|
2513
|
+
A("div", {
|
|
2519
2514
|
id: `payfurl-${d.value}-form`,
|
|
2520
2515
|
class: "payfurl-checkout-form",
|
|
2521
2516
|
ref_key: "root",
|
|
2522
2517
|
ref: a
|
|
2523
|
-
}, [
|
|
2518
|
+
}, [A("div", {
|
|
2524
2519
|
class: "container-form",
|
|
2525
|
-
style:
|
|
2526
|
-
}, [g(v) ? (b(),
|
|
2520
|
+
style: He(`visibility: ${g(o) ? "hidden" : "visible"}`)
|
|
2521
|
+
}, [g(v) ? (b(), j("div", bn, i(g(v)), 1)) : T("", !0), A("div", xn, [te.value ? (b(), j("button", {
|
|
2527
2522
|
key: 0,
|
|
2528
2523
|
onClick: re,
|
|
2529
2524
|
type: "button"
|
|
2530
|
-
}, i(y.value), 1)) : T("", !0), f.value ? (b(),
|
|
2531
|
-
S.value ? (b(),
|
|
2525
|
+
}, i(y.value), 1)) : T("", !0), f.value ? (b(), j("p", Sn, i(f.value), 1)) : T("", !0)])], 4)], 8, yn),
|
|
2526
|
+
S.value ? (b(), Be(vn, {
|
|
2532
2527
|
key: 1,
|
|
2533
2528
|
onClose: ie,
|
|
2534
2529
|
url: x.value,
|
|
@@ -2536,19 +2531,19 @@ var un = {
|
|
|
2536
2531
|
}, null, 8, ["url", "name"])) : T("", !0)
|
|
2537
2532
|
], 64));
|
|
2538
2533
|
}
|
|
2539
|
-
}), [["__scopeId", "data-v-8fc4cc32"]]),
|
|
2534
|
+
}), [["__scopeId", "data-v-8fc4cc32"]]), wn = {
|
|
2540
2535
|
CHECKOUT: "CHECKOUT",
|
|
2541
2536
|
CHECK_STATUS: "CHECK_STATUS"
|
|
2542
|
-
},
|
|
2543
|
-
[
|
|
2537
|
+
}, Tn = (e, t) => ({
|
|
2538
|
+
[wn.CHECKOUT]: {
|
|
2544
2539
|
url: e + "/payment_method/checkout",
|
|
2545
2540
|
method: "POST"
|
|
2546
2541
|
},
|
|
2547
|
-
[
|
|
2542
|
+
[wn.CHECK_STATUS]: {
|
|
2548
2543
|
url: e + "/checkout/external/" + t,
|
|
2549
2544
|
method: "GET"
|
|
2550
2545
|
}
|
|
2551
|
-
}),
|
|
2546
|
+
}), En = class {
|
|
2552
2547
|
container = null;
|
|
2553
2548
|
log;
|
|
2554
2549
|
apiUrl = "";
|
|
@@ -2560,8 +2555,8 @@ var un = {
|
|
|
2560
2555
|
destroy = () => {};
|
|
2561
2556
|
constructor(e, t) {
|
|
2562
2557
|
this.log = e, this.apiUrl = t.apiUrl, this.redirectUrl = t.redirectUrl, this.successCallback = t.onSuccess || null;
|
|
2563
|
-
let n = new
|
|
2564
|
-
this.httpInvoker = new
|
|
2558
|
+
let n = new N(t.environment, P(t.publicKey));
|
|
2559
|
+
this.httpInvoker = new F(t.publicKey, t.version, n);
|
|
2565
2560
|
}
|
|
2566
2561
|
setOnValidate(e) {
|
|
2567
2562
|
this.userOnValidate = e;
|
|
@@ -2580,9 +2575,9 @@ var un = {
|
|
|
2580
2575
|
options: a,
|
|
2581
2576
|
checkoutOptions: o
|
|
2582
2577
|
}), this.container = e;
|
|
2583
|
-
let s = !1, c, l =
|
|
2578
|
+
let s = !1, c, l = E({
|
|
2584
2579
|
el: e,
|
|
2585
|
-
component:
|
|
2580
|
+
component: Cn,
|
|
2586
2581
|
props: {
|
|
2587
2582
|
log: this.log,
|
|
2588
2583
|
providerType: r,
|
|
@@ -2595,7 +2590,7 @@ var un = {
|
|
|
2595
2590
|
clickGate: this.getOnValidate.bind(this)
|
|
2596
2591
|
},
|
|
2597
2592
|
on: {
|
|
2598
|
-
activate:
|
|
2593
|
+
activate: z(this, "[sdk][checkoutProcessor][${providerType}]: activate checkout form", (e) => {
|
|
2599
2594
|
if (s) return;
|
|
2600
2595
|
s = !0, this.log(`[sdk][checkoutProcessor][${r}]: activate checkout form`, e);
|
|
2601
2596
|
let t = () => {
|
|
@@ -2603,16 +2598,16 @@ var un = {
|
|
|
2603
2598
|
};
|
|
2604
2599
|
this.checkout(e, r, a, t), c = this.getMessageHandler(e, r, a, t).bind(this), window.addEventListener("message", c);
|
|
2605
2600
|
}),
|
|
2606
|
-
popup:
|
|
2601
|
+
popup: z(this, "[sdk][checkoutProcessor][${providerType}]: popup open", (t) => {
|
|
2607
2602
|
this.log(`[sdk][checkoutProcessor][${r}]: popup open`, t), this.checkStatus(e, t, r, c);
|
|
2608
2603
|
}),
|
|
2609
|
-
popupClose:
|
|
2604
|
+
popupClose: z(this, "[sdk][checkoutProcessor][${providerType}]: popup close", () => {
|
|
2610
2605
|
this.log(`[sdk][checkoutProcessor][${r}]: popup close`), this.stopCheckingStatus(null);
|
|
2611
2606
|
}),
|
|
2612
|
-
newWindow:
|
|
2607
|
+
newWindow: z(this, "[sdk][checkoutProcessor][${providerType}]: new window open", (t) => {
|
|
2613
2608
|
this.log(`[sdk][checkoutProcessor][${r}]: new window open`, t), this.checkStatus(e, t, r, c);
|
|
2614
2609
|
}),
|
|
2615
|
-
newWindowClose:
|
|
2610
|
+
newWindowClose: z(this, "[sdk][checkoutProcessor][${providerType}]: new window close", () => {
|
|
2616
2611
|
this.log(`[sdk][checkoutProcessor][${r}]: new window close`), this.stopCheckingStatus(null);
|
|
2617
2612
|
})
|
|
2618
2613
|
}
|
|
@@ -2620,7 +2615,7 @@ var un = {
|
|
|
2620
2615
|
this.destroy = l.destroy;
|
|
2621
2616
|
}
|
|
2622
2617
|
checkout(e, t, n, r) {
|
|
2623
|
-
this.httpInvoker?.invoke(
|
|
2618
|
+
this.httpInvoker?.invoke(Tn(this.apiUrl)[wn.CHECKOUT].url, Tn(this.apiUrl)[wn.CHECKOUT].method, JSON.stringify({
|
|
2624
2619
|
providerId: e.providerId,
|
|
2625
2620
|
amount: e.amount,
|
|
2626
2621
|
currency: e.currency,
|
|
@@ -2650,17 +2645,17 @@ var un = {
|
|
|
2650
2645
|
...e.checkoutOptions,
|
|
2651
2646
|
redirectUrl: this.redirectUrl
|
|
2652
2647
|
},
|
|
2653
|
-
metadata:
|
|
2654
|
-
}), this.getSuccessCheckoutHandler(t).bind(this),
|
|
2648
|
+
metadata: G(n?.metadata)
|
|
2649
|
+
}), this.getSuccessCheckoutHandler(t).bind(this), z(this, "[sdk][checkoutProcessor][${providerType}]: failureCheckoutHandler", (e, n) => {
|
|
2655
2650
|
r?.(e, n), this.getFailureCheckoutHandler(t).bind(this)(e, n);
|
|
2656
2651
|
}));
|
|
2657
2652
|
}
|
|
2658
2653
|
getSuccessCheckoutHandler(e) {
|
|
2659
|
-
return
|
|
2654
|
+
return z(this, "[sdk][checkoutProcessor][${providerType}]: successCheckoutHandler", (t, n) => {
|
|
2660
2655
|
this.log(`[sdk][checkoutProcessor][${e}]: successCheckoutHandler`, t, n);
|
|
2661
2656
|
let r = JSON.parse(n), i = JSON.parse(window.atob(r.checkoutData));
|
|
2662
2657
|
window.postMessage({
|
|
2663
|
-
status:
|
|
2658
|
+
status: ke,
|
|
2664
2659
|
component: "checkout",
|
|
2665
2660
|
providerType: e,
|
|
2666
2661
|
checkoutData: i
|
|
@@ -2668,8 +2663,8 @@ var un = {
|
|
|
2668
2663
|
});
|
|
2669
2664
|
}
|
|
2670
2665
|
getFailureCheckoutHandler(e) {
|
|
2671
|
-
return
|
|
2672
|
-
this.log(`[sdk][checkoutProcessor][${e}]: failureCheckoutHandler`, t, n),
|
|
2666
|
+
return z(this, "[sdk][checkoutProcessor][${providerType}]: failureCheckoutHandler", (t, n) => {
|
|
2667
|
+
this.log(`[sdk][checkoutProcessor][${e}]: failureCheckoutHandler`, t, n), W().stopLoading(), window.postMessage({
|
|
2673
2668
|
status: "error",
|
|
2674
2669
|
component: "checkout",
|
|
2675
2670
|
providerType: e,
|
|
@@ -2683,32 +2678,32 @@ var un = {
|
|
|
2683
2678
|
}
|
|
2684
2679
|
checkStatus(e, t, n, r) {
|
|
2685
2680
|
this.checkStatusHandler || (this.checkStatusHandler = setInterval(this.checkStatus.bind(this, e, t, n, r), 5e3), this.log(`[sdk][checkoutProcessor][${n}]: Starting polling...`));
|
|
2686
|
-
let i = this, a =
|
|
2687
|
-
|
|
2681
|
+
let i = this, a = z(this, `[sdk][checkoutProcessor][${n}]: failureCheckStatusHandler`, (e, t) => {
|
|
2682
|
+
W().stopLoading(), i.log(`[sdk][checkoutProcessor][${n}]: failureCheckStatusHandler`, e, t), window.postMessage({
|
|
2688
2683
|
status: "message",
|
|
2689
2684
|
component: "checkout",
|
|
2690
2685
|
providerType: n,
|
|
2691
2686
|
message: "Checkout has been cancelled"
|
|
2692
2687
|
}, "*");
|
|
2693
|
-
}), o =
|
|
2694
|
-
|
|
2688
|
+
}), o = z(this, `[sdk][checkoutProcessor][${n}]: successCheckStatusHandler`, (t, r) => {
|
|
2689
|
+
W().stopLoading(), i.log(`[sdk][checkoutProcessor][${n}]: successCheckStatusHandler`, {
|
|
2695
2690
|
transactionId: t,
|
|
2696
2691
|
token: r
|
|
2697
|
-
}),
|
|
2692
|
+
}), Ze(e, "Transaction in progress. Please don't close the window or navigate away");
|
|
2698
2693
|
let a = {};
|
|
2699
2694
|
t && (a.transactionId = t), r && (a.token = r), i.successCallback?.(a);
|
|
2700
2695
|
});
|
|
2701
|
-
this.httpInvoker?.invoke(
|
|
2696
|
+
this.httpInvoker?.invoke(Tn(this.apiUrl, t)[wn.CHECK_STATUS].url, Tn(this.apiUrl, t)[wn.CHECK_STATUS].method, {}, z(this, `[sdk][checkoutProcessor][${n}]: checkStatus, success`, (e, t) => {
|
|
2702
2697
|
let n = JSON.parse(t);
|
|
2703
2698
|
if (this.log("checkoutStatus", n), !n) return this.stopCheckingStatus(r), a(e, t);
|
|
2704
2699
|
if (n.status == "SUCCESS" && n.status === "SUCCESS") return this.stopCheckingStatus(r), o(n.transactionId, n.tokenId);
|
|
2705
|
-
}),
|
|
2700
|
+
}), z(this, `[sdk][checkoutProcessor][${n}]: checkStatus, failure`, (e, t) => (this.log(`[sdk][checkoutProcessor][${n}]: checkStatus`, {
|
|
2706
2701
|
status: e,
|
|
2707
2702
|
body: t
|
|
2708
2703
|
}), this.stopCheckingStatus(r), a(e, t))));
|
|
2709
2704
|
}
|
|
2710
2705
|
getMessageHandler(e, t, n, r) {
|
|
2711
|
-
return
|
|
2706
|
+
return z(this, `[sdk][checkoutProcessor][${t}]: message received`, (i) => {
|
|
2712
2707
|
if (i?.data?.status) {
|
|
2713
2708
|
if (i.data.status === "set-amount") {
|
|
2714
2709
|
if (Number(e.amount) == Number(i.data.amount)) return;
|
|
@@ -2721,27 +2716,37 @@ var un = {
|
|
|
2721
2716
|
});
|
|
2722
2717
|
}
|
|
2723
2718
|
};
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
var En = {
|
|
2719
|
+
L([R], En.prototype, "cleanUp", null), L([R], En.prototype, "addCheckout", null), L([R], En.prototype, "checkout", null), L([R], En.prototype, "getSuccessCheckoutHandler", null), L([R], En.prototype, "getFailureCheckoutHandler", null), L([R], En.prototype, "stopCheckingStatus", null), L([R], En.prototype, "checkStatus", null), L([R], En.prototype, "getMessageHandler", null);
|
|
2720
|
+
// src/sdk/processors/fraudProcessor.ts
|
|
2721
|
+
var Dn = {
|
|
2728
2722
|
CHECK_FRAUD: "CHECK_FRAUD",
|
|
2729
2723
|
RESOLVE_THREE_DS: "RESOLVE_THREE_DS",
|
|
2730
2724
|
CANCEL_THREE_DS: "CANCEL_THREE_DS"
|
|
2731
|
-
},
|
|
2732
|
-
[
|
|
2725
|
+
}, On = (e) => ({
|
|
2726
|
+
[Dn.CHECK_FRAUD]: {
|
|
2733
2727
|
url: e + "/fraud_check",
|
|
2734
2728
|
method: "POST"
|
|
2735
2729
|
},
|
|
2736
|
-
[
|
|
2730
|
+
[Dn.RESOLVE_THREE_DS]: {
|
|
2737
2731
|
url: e + "/3ds/result",
|
|
2738
2732
|
method: "POST"
|
|
2739
2733
|
},
|
|
2740
|
-
[
|
|
2734
|
+
[Dn.CANCEL_THREE_DS]: {
|
|
2741
2735
|
url: e + "/3ds/cancel",
|
|
2742
2736
|
method: "POST"
|
|
2743
2737
|
}
|
|
2744
|
-
})
|
|
2738
|
+
});
|
|
2739
|
+
function kn(e) {
|
|
2740
|
+
try {
|
|
2741
|
+
return JSON.parse(e);
|
|
2742
|
+
} catch {
|
|
2743
|
+
return;
|
|
2744
|
+
}
|
|
2745
|
+
}
|
|
2746
|
+
function An(e) {
|
|
2747
|
+
return typeof e?.decision == "string" && typeof e?.transactionId == "string";
|
|
2748
|
+
}
|
|
2749
|
+
var jn = class {
|
|
2745
2750
|
providerId = "";
|
|
2746
2751
|
stopPaymentOnFailure = !1;
|
|
2747
2752
|
log;
|
|
@@ -2755,31 +2760,34 @@ var En = {
|
|
|
2755
2760
|
order = null;
|
|
2756
2761
|
paymentInformation = null;
|
|
2757
2762
|
paypalInformation = null;
|
|
2758
|
-
|
|
2763
|
+
paymentReference = null;
|
|
2759
2764
|
httpInvoker = null;
|
|
2760
2765
|
constructor(e, t) {
|
|
2761
2766
|
this.log = e, this.providerId = t.providerId, this.stopPaymentOnFailure = t.stopPaymentOnFailure, this.apiUrl = t.apiUrl, this.metadata = t.metadata, this.getFraudCheckData = t.getFraudCheckData;
|
|
2762
|
-
let n = new
|
|
2763
|
-
this.httpInvoker = new
|
|
2767
|
+
let n = new N(t.environment, P(t.publicKey));
|
|
2768
|
+
this.httpInvoker = new F(t.publicKey, t.version, n);
|
|
2764
2769
|
}
|
|
2765
2770
|
fraudCheck(e, t) {
|
|
2766
|
-
if (!this.paymentInformation && !this.paypalInformation) return t({ error: "Payment information is required" });
|
|
2771
|
+
if (!this.paymentInformation && !this.paypalInformation && !this.paymentReference) return t({ error: "Payment information is required" });
|
|
2767
2772
|
this.log("[fraudCheck]", {
|
|
2768
2773
|
amount: this.amount,
|
|
2769
2774
|
currency: this.currency,
|
|
2770
2775
|
paymentInformation: this.paymentInformation,
|
|
2771
2776
|
paypalInformation: this.paypalInformation,
|
|
2777
|
+
paymentReference: this.paymentReference,
|
|
2772
2778
|
customer: this.customer,
|
|
2773
2779
|
address: this.address,
|
|
2774
2780
|
order: this.order,
|
|
2775
2781
|
metadata: this.metadata
|
|
2776
|
-
}), this.httpInvoker?.invoke(
|
|
2777
|
-
|
|
2782
|
+
}), this.httpInvoker?.invoke(On(this.apiUrl)[Dn.CHECK_FRAUD].url, On(this.apiUrl)[Dn.CHECK_FRAUD].method, this.getFraudCheckData(this.providerId, this.amount, this.currency, this.paymentInformation, this.paypalInformation, this.customer, this.address, this.order, this.metadata, this.paymentReference), z(this, "[fraudCheck], success", (n, r) => {
|
|
2783
|
+
this.log("[fraudCheck], success", n, r, this.stopPaymentOnFailure);
|
|
2784
|
+
let i = kn(r);
|
|
2785
|
+
if (!An(i)) return t({
|
|
2778
2786
|
error: "Fraud Check Failed",
|
|
2779
2787
|
body: r
|
|
2780
2788
|
});
|
|
2781
|
-
|
|
2782
|
-
}),
|
|
2789
|
+
i.providerId = this.providerId, i.stopPaymentOnFailure = this.stopPaymentOnFailure, e(i);
|
|
2790
|
+
}), z(this, "[fraudCheck], failure", (e, n) => {
|
|
2783
2791
|
this.log("[fraudCheck], failure", e, n), t({
|
|
2784
2792
|
error: "Fraud Check Failed",
|
|
2785
2793
|
body: n
|
|
@@ -2787,15 +2795,15 @@ var En = {
|
|
|
2787
2795
|
}));
|
|
2788
2796
|
}
|
|
2789
2797
|
resolveThreeDsResult(e, t, n) {
|
|
2790
|
-
this.httpInvoker?.invoke(
|
|
2798
|
+
this.httpInvoker?.invoke(On(this.apiUrl)[Dn.RESOLVE_THREE_DS].url, On(this.apiUrl)[Dn.RESOLVE_THREE_DS].method, JSON.stringify({ threeDSServerTransID: e }), z(this, "[resolveThreeDsResult], success", (e, r) => {
|
|
2791
2799
|
this.log("[resolveThreeDsResult], success", e, r);
|
|
2792
|
-
let i =
|
|
2793
|
-
if (i
|
|
2800
|
+
let i = kn(r);
|
|
2801
|
+
if (i == null) return n({
|
|
2794
2802
|
error: "3DS result resolution failed",
|
|
2795
2803
|
body: r
|
|
2796
2804
|
});
|
|
2797
2805
|
t(i);
|
|
2798
|
-
}),
|
|
2806
|
+
}), z(this, "[resolveThreeDsResult], failure", (e, t) => {
|
|
2799
2807
|
this.log("[resolveThreeDsResult], failure", e, t), n({
|
|
2800
2808
|
error: "3DS result resolution failed",
|
|
2801
2809
|
body: t
|
|
@@ -2803,9 +2811,9 @@ var En = {
|
|
|
2803
2811
|
}));
|
|
2804
2812
|
}
|
|
2805
2813
|
cancelThreeDsOrder(e, t, n) {
|
|
2806
|
-
this.httpInvoker?.invoke(
|
|
2814
|
+
this.httpInvoker?.invoke(On(this.apiUrl)[Dn.CANCEL_THREE_DS].url, On(this.apiUrl)[Dn.CANCEL_THREE_DS].method, JSON.stringify({ threeDSServerTransID: e }), z(this, "[cancelThreeDsOrder], success", (e, n) => {
|
|
2807
2815
|
this.log("[cancelThreeDsOrder], success", e, n), t({});
|
|
2808
|
-
}),
|
|
2816
|
+
}), z(this, "[cancelThreeDsOrder], failure", (e, t) => {
|
|
2809
2817
|
this.log("[cancelThreeDsOrder], failure", e, t), n({
|
|
2810
2818
|
error: "3DS cancel notification failed",
|
|
2811
2819
|
body: t
|
|
@@ -2828,25 +2836,102 @@ var En = {
|
|
|
2828
2836
|
this.order = { ...e };
|
|
2829
2837
|
}
|
|
2830
2838
|
setPaymentInfo(e) {
|
|
2831
|
-
this.paymentInformation = { ...e };
|
|
2839
|
+
this.paymentInformation = { ...e }, this.paypalInformation = null, this.paymentReference = null;
|
|
2840
|
+
}
|
|
2841
|
+
setPaymentReference(e) {
|
|
2842
|
+
this.paymentReference = { ...e }, this.paymentInformation = null, this.paypalInformation = null;
|
|
2832
2843
|
}
|
|
2833
2844
|
setPaypalInfo(e) {
|
|
2834
|
-
this.paypalInformation = { ...e };
|
|
2845
|
+
this.paypalInformation = { ...e }, this.paymentInformation = null, this.paymentReference = null;
|
|
2835
2846
|
}
|
|
2836
2847
|
getProviderId() {
|
|
2837
2848
|
return this.providerId;
|
|
2838
2849
|
}
|
|
2839
|
-
getCheckResult() {
|
|
2840
|
-
return this.checkResult;
|
|
2841
|
-
}
|
|
2842
2850
|
};
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
function
|
|
2851
|
+
L([R], jn.prototype, "fraudCheck", null), L([R], jn.prototype, "resolveThreeDsResult", null), L([R], jn.prototype, "cancelThreeDsOrder", null);
|
|
2852
|
+
// src/sdk/fraud/fraudGate.ts
|
|
2853
|
+
var Mn = 18e4, Nn = 3e4, Pn = "Payment couldn't be processed";
|
|
2854
|
+
function Fn(e) {
|
|
2855
|
+
return new Promise((t, n) => {
|
|
2856
|
+
e.fraudCheck((e) => t(e), (e) => n(Error(e?.error || "Fraud check failed")));
|
|
2857
|
+
});
|
|
2858
|
+
}
|
|
2859
|
+
async function In(e, t, n, r = {}) {
|
|
2860
|
+
if (!e) return {};
|
|
2861
|
+
let i;
|
|
2862
|
+
try {
|
|
2863
|
+
i = await Fn(e);
|
|
2864
|
+
} catch (e) {
|
|
2865
|
+
return r.log?.("fraud check failed", e), { error: e.message };
|
|
2866
|
+
}
|
|
2867
|
+
if (At(i)) return { error: Pn };
|
|
2868
|
+
if (!i.managedOrderToken) return { fraudCheckResult: i };
|
|
2869
|
+
let a = await Ln(e, t, i, n, r);
|
|
2870
|
+
return a ? { error: a } : {
|
|
2871
|
+
fraudCheckResult: i,
|
|
2872
|
+
threeDSServerTransID: i.threeDSServerTransID
|
|
2873
|
+
};
|
|
2874
|
+
}
|
|
2875
|
+
async function Ln(e, t, n, r, i = {}) {
|
|
2876
|
+
let { managedOrderToken: a, threeDSServerTransID: o } = n;
|
|
2877
|
+
if (!a) return "3DS challenge could not be started";
|
|
2878
|
+
try {
|
|
2879
|
+
await Rn(t, a, r, i);
|
|
2880
|
+
} catch (e) {
|
|
2881
|
+
return i.log?.("manageOrder challenge failed", e), "Unable to complete 3DS challenge";
|
|
2882
|
+
}
|
|
2883
|
+
let s;
|
|
2884
|
+
try {
|
|
2885
|
+
s = await zn(e, o);
|
|
2886
|
+
} catch (e) {
|
|
2887
|
+
return i.log?.("3ds/result resolution failed", e), "Unable to resolve 3DS result";
|
|
2888
|
+
}
|
|
2889
|
+
return s?.status === "success" ? null : (i.log?.("3ds/result not successful", s), await Bn(e, o, i), "3DS authentication failed");
|
|
2890
|
+
}
|
|
2891
|
+
function Rn(e, t, n, r) {
|
|
2892
|
+
return new Promise((i, a) => {
|
|
2893
|
+
if (!e) {
|
|
2894
|
+
a(/* @__PURE__ */ Error("Forter managed-order challenge is not available"));
|
|
2895
|
+
return;
|
|
2896
|
+
}
|
|
2897
|
+
let o = !1, s, c = (e) => {
|
|
2898
|
+
o || (o = !0, clearTimeout(l), s?.(), r.onHide?.(), e());
|
|
2899
|
+
}, l = setTimeout(() => c(() => a(/* @__PURE__ */ Error("3DS challenge timed out"))), Mn);
|
|
2900
|
+
r.onShow?.();
|
|
2901
|
+
let u = (e) => c(() => a(e instanceof Error ? e : Error(String(e))));
|
|
2902
|
+
try {
|
|
2903
|
+
s = e(t, n, (e) => {
|
|
2904
|
+
e ? u(e) : c(i);
|
|
2905
|
+
});
|
|
2906
|
+
} catch (e) {
|
|
2907
|
+
u(e);
|
|
2908
|
+
}
|
|
2909
|
+
});
|
|
2910
|
+
}
|
|
2911
|
+
function zn(e, t) {
|
|
2912
|
+
return new Promise((n, r) => {
|
|
2913
|
+
if (!t) {
|
|
2914
|
+
r(/* @__PURE__ */ Error("threeDSServerTransID is missing"));
|
|
2915
|
+
return;
|
|
2916
|
+
}
|
|
2917
|
+
let i = !1, a = (e) => {
|
|
2918
|
+
i || (i = !0, clearTimeout(o), e());
|
|
2919
|
+
}, o = setTimeout(() => a(() => r(/* @__PURE__ */ Error("3DS result timed out"))), Nn);
|
|
2920
|
+
e.resolveThreeDsResult(t, (e) => a(() => n(e)), (e) => a(() => r(Error(e?.error || "3DS result resolution failed"))));
|
|
2921
|
+
});
|
|
2922
|
+
}
|
|
2923
|
+
function Bn(e, t, n) {
|
|
2924
|
+
return new Promise((r) => {
|
|
2925
|
+
t ? e.cancelThreeDsOrder(t, () => r(), (e) => {
|
|
2926
|
+
n.log?.("cancel notification failed", e), r();
|
|
2927
|
+
}) : r();
|
|
2928
|
+
});
|
|
2929
|
+
}
|
|
2930
|
+
// src/sdk/utils/errorDetails.ts
|
|
2931
|
+
function Vn(e) {
|
|
2847
2932
|
return e == null || typeof e == "string" ? e : void 0;
|
|
2848
2933
|
}
|
|
2849
|
-
function
|
|
2934
|
+
function Hn(e) {
|
|
2850
2935
|
if (!e) return;
|
|
2851
2936
|
let t;
|
|
2852
2937
|
try {
|
|
@@ -2857,26 +2942,24 @@ function An(e) {
|
|
|
2857
2942
|
if (typeof t == "object" && t && !Array.isArray(t) && typeof t.code == "number" && typeof t.isRetryable == "boolean") return {
|
|
2858
2943
|
code: t.code,
|
|
2859
2944
|
isRetryable: t.isRetryable,
|
|
2860
|
-
message:
|
|
2861
|
-
gatewayCode:
|
|
2862
|
-
gatewayMessage:
|
|
2863
|
-
type:
|
|
2945
|
+
message: Vn(t.message),
|
|
2946
|
+
gatewayCode: Vn(t.gatewayCode),
|
|
2947
|
+
gatewayMessage: Vn(t.gatewayMessage),
|
|
2948
|
+
type: Vn(t.type)
|
|
2864
2949
|
};
|
|
2865
2950
|
}
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
function jn(e, t) {
|
|
2951
|
+
// src/sdk/utils/googlePayButton.ts
|
|
2952
|
+
function Un(e, t) {
|
|
2869
2953
|
let n = { onClick: e };
|
|
2870
2954
|
if (!t) return n;
|
|
2871
2955
|
for (let [e, r] of Object.entries(t)) r !== void 0 && (n[e] = r);
|
|
2872
2956
|
return n;
|
|
2873
2957
|
}
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
var Mn = { style: { position: "relative" } }, Nn = {
|
|
2958
|
+
// src/sdk/components/GooglePayForm.vue?vue&type=script&setup=true&lang.ts
|
|
2959
|
+
var Wn = { style: { position: "relative" } }, Gn = {
|
|
2877
2960
|
key: 0,
|
|
2878
2961
|
class: "error text-normal"
|
|
2879
|
-
},
|
|
2962
|
+
}, Kn = "payfurl-googlepay-script", qn = /* @__PURE__ */ C({
|
|
2880
2963
|
__name: "GooglePayForm",
|
|
2881
2964
|
props: {
|
|
2882
2965
|
log: { type: Function },
|
|
@@ -2894,20 +2977,20 @@ var Mn = { style: { position: "relative" } }, Nn = {
|
|
|
2894
2977
|
"error"
|
|
2895
2978
|
],
|
|
2896
2979
|
setup(e, { emit: t }) {
|
|
2897
|
-
let n = e, r = t, a = p(null), o = p(n.amount), l = p(n.currency), d = p(!0), f = p(""), m = !1, { isLoading: h } =
|
|
2980
|
+
let n = e, r = t, a = p(null), o = p(n.amount), l = p(n.currency), d = p(!0), f = p(""), m = !1, { isLoading: h } = W();
|
|
2898
2981
|
function _() {
|
|
2899
2982
|
if (m) return;
|
|
2900
|
-
if (m = !0, document.getElementById(
|
|
2983
|
+
if (m = !0, document.getElementById(Kn)) {
|
|
2901
2984
|
ie();
|
|
2902
2985
|
return;
|
|
2903
2986
|
}
|
|
2904
2987
|
window.google = null;
|
|
2905
2988
|
let e = document.createElement("script");
|
|
2906
|
-
e.src = "https://pay.google.com/gp/p/js/pay.js", e.type = "text/javascript", e.id =
|
|
2989
|
+
e.src = "https://pay.google.com/gp/p/js/pay.js", e.type = "text/javascript", e.id = Kn, e.onload = ie, document.body.appendChild(e);
|
|
2907
2990
|
}
|
|
2908
2991
|
let v = null;
|
|
2909
2992
|
function y() {
|
|
2910
|
-
return v === null && (v = new window.google.payments.api.PaymentsClient({ environment: n.environment ==
|
|
2993
|
+
return v === null && (v = new window.google.payments.api.PaymentsClient({ environment: n.environment == We.PRODUCTION ? "PRODUCTION" : "TEST" })), v;
|
|
2911
2994
|
}
|
|
2912
2995
|
let x = {
|
|
2913
2996
|
type: "CARD",
|
|
@@ -2931,11 +3014,11 @@ var Mn = { style: { position: "relative" } }, Nn = {
|
|
|
2931
3014
|
};
|
|
2932
3015
|
}
|
|
2933
3016
|
function ee() {
|
|
2934
|
-
let e = y().createButton(
|
|
3017
|
+
let e = y().createButton(Un(ne, n.options.buttonOptions));
|
|
2935
3018
|
n.el.appendChild(e);
|
|
2936
3019
|
}
|
|
2937
3020
|
function te() {
|
|
2938
|
-
return n.environment ==
|
|
3021
|
+
return n.environment == We.PRODUCTION ? {
|
|
2939
3022
|
merchantName: n.options.googlePayMerchantName ?? "Example Merchant",
|
|
2940
3023
|
merchantId: n.options.googlePayMerchantId
|
|
2941
3024
|
} : { merchantName: n.options.googlePayMerchantName ?? "Example Merchant" };
|
|
@@ -2988,7 +3071,7 @@ var Mn = { style: { position: "relative" } }, Nn = {
|
|
|
2988
3071
|
}
|
|
2989
3072
|
function ie() {
|
|
2990
3073
|
y().isReadyToPay(S()).then(function(e) {
|
|
2991
|
-
e.result && (ee(), window.postMessage({ status:
|
|
3074
|
+
e.result && (ee(), window.postMessage({ status: Re }, "*"));
|
|
2992
3075
|
}).catch(function(e) {
|
|
2993
3076
|
console.error("Load GooglePay error", e);
|
|
2994
3077
|
});
|
|
@@ -2999,17 +3082,17 @@ var Mn = { style: { position: "relative" } }, Nn = {
|
|
|
2999
3082
|
return s(() => {
|
|
3000
3083
|
window.removeEventListener("message", C);
|
|
3001
3084
|
}), c(() => {
|
|
3002
|
-
window.addEventListener("message", C),
|
|
3003
|
-
}), (e, t) => (b(),
|
|
3085
|
+
window.addEventListener("message", C), ct(a.value, "payfurl-combined-container") || (d.value = !0, r("activate"), _());
|
|
3086
|
+
}), (e, t) => (b(), j(D, null, [A("div", Wn, [u(Le(se, null, null, 512), [[Ee, g(h)]])]), A("div", {
|
|
3004
3087
|
style: { position: "relative" },
|
|
3005
3088
|
ref_key: "root",
|
|
3006
3089
|
ref: a
|
|
3007
|
-
}, [f.value ? (b(),
|
|
3090
|
+
}, [f.value ? (b(), j("div", Gn, i(f.value), 1)) : T("", !0)], 512)], 64));
|
|
3008
3091
|
}
|
|
3009
|
-
}),
|
|
3092
|
+
}), Jn = { ADD_CHARGE_WITH_GOOGLE_PAY: "ADD_CHARGE_WITH_GOOGLE_PAY" }, Yn = (e) => ({ [Jn.ADD_CHARGE_WITH_GOOGLE_PAY]: {
|
|
3010
3093
|
url: e + "/charge/token/google",
|
|
3011
3094
|
method: "POST"
|
|
3012
|
-
} }),
|
|
3095
|
+
} }), Xn = class {
|
|
3013
3096
|
container = null;
|
|
3014
3097
|
log;
|
|
3015
3098
|
apiUrl = "";
|
|
@@ -3026,8 +3109,8 @@ var Mn = { style: { position: "relative" } }, Nn = {
|
|
|
3026
3109
|
order = null;
|
|
3027
3110
|
constructor(e, t) {
|
|
3028
3111
|
this.log = e, this.environment = t.environment, this.apiUrl = t.apiUrl, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null;
|
|
3029
|
-
let n = new
|
|
3030
|
-
this.httpInvoker = new
|
|
3112
|
+
let n = new N(t.environment, P(t.publicKey));
|
|
3113
|
+
this.httpInvoker = new F(t.publicKey, t.version, n);
|
|
3031
3114
|
}
|
|
3032
3115
|
setAmount(e) {
|
|
3033
3116
|
this.amount = e;
|
|
@@ -3062,9 +3145,9 @@ var Mn = { style: { position: "relative" } }, Nn = {
|
|
|
3062
3145
|
}), this.validateOptions(e, n, r, i), this.setAmount(n), this.setCurrency(r);
|
|
3063
3146
|
let a = !1;
|
|
3064
3147
|
this.container = e;
|
|
3065
|
-
let o =
|
|
3148
|
+
let o = E({
|
|
3066
3149
|
el: e,
|
|
3067
|
-
component:
|
|
3150
|
+
component: qn,
|
|
3068
3151
|
props: {
|
|
3069
3152
|
log: this.log,
|
|
3070
3153
|
el: e,
|
|
@@ -3075,10 +3158,10 @@ var Mn = { style: { position: "relative" } }, Nn = {
|
|
|
3075
3158
|
clickGate: this.getOnValidate.bind(this)
|
|
3076
3159
|
},
|
|
3077
3160
|
on: {
|
|
3078
|
-
activate:
|
|
3161
|
+
activate: z(this, "[GooglePay]: activate", () => {
|
|
3079
3162
|
a || (a = !0, this.log("[GooglePay]: activate googlepay form"));
|
|
3080
3163
|
}),
|
|
3081
|
-
complete:
|
|
3164
|
+
complete: z(this, "[GooglePay]: complete", (n) => {
|
|
3082
3165
|
this.log("[GooglePay]: complete", n);
|
|
3083
3166
|
let r = n.paymentMethodData.info.billingAddress, [a, ...o] = r?.name?.trim().split(/\s+/) ?? [], s = this.billingAddress ? {
|
|
3084
3167
|
line1: this.billingAddress.streetAddress,
|
|
@@ -3125,12 +3208,12 @@ var Mn = { style: { position: "relative" } }, Nn = {
|
|
|
3125
3208
|
unitOfMeasure: e.unitOfMeasure
|
|
3126
3209
|
}))
|
|
3127
3210
|
} || void 0,
|
|
3128
|
-
metadata:
|
|
3211
|
+
metadata: G(i?.metadata)
|
|
3129
3212
|
};
|
|
3130
3213
|
this.addChargeWithGooglePay(e, t, c);
|
|
3131
3214
|
}),
|
|
3132
|
-
error:
|
|
3133
|
-
this.log("[GooglePay]: error", t),
|
|
3215
|
+
error: z(this, "[GooglePay]: error", (t) => {
|
|
3216
|
+
this.log("[GooglePay]: error", t), I(e, "Unable to pay with Google Pay"), this.failureCallback?.({
|
|
3134
3217
|
error: "Unable to pay with Google Pay",
|
|
3135
3218
|
body: t
|
|
3136
3219
|
});
|
|
@@ -3140,66 +3223,65 @@ var Mn = { style: { position: "relative" } }, Nn = {
|
|
|
3140
3223
|
this.destroy = o.destroy;
|
|
3141
3224
|
}
|
|
3142
3225
|
addChargeWithGooglePay(e, t, n) {
|
|
3143
|
-
this.log("[addChargeWithGooglePay]", n), this.httpInvoker?.invoke(
|
|
3226
|
+
this.log("[addChargeWithGooglePay]", n), this.httpInvoker?.invoke(Yn(this.apiUrl)[Jn.ADD_CHARGE_WITH_GOOGLE_PAY].url, Yn(this.apiUrl)[Jn.ADD_CHARGE_WITH_GOOGLE_PAY].method, JSON.stringify(n), this.getSuccessAddChargeHandler(e).bind(this), this.getFailureAddChargeHandler(e).bind(this), { providerId: t });
|
|
3144
3227
|
}
|
|
3145
3228
|
getFailureAddChargeHandler(e) {
|
|
3146
|
-
return
|
|
3147
|
-
this.log("[GooglePay], failure", n),
|
|
3229
|
+
return z(this, "[GooglePay], failure", (t, n) => {
|
|
3230
|
+
this.log("[GooglePay], failure", n), I(e, "Unable to pay with Google Pay"), this.failureCallback?.({
|
|
3148
3231
|
error: "Unable to pay with Google Pay",
|
|
3149
3232
|
body: n
|
|
3150
3233
|
});
|
|
3151
3234
|
});
|
|
3152
3235
|
}
|
|
3153
3236
|
getSuccessAddChargeHandler(e) {
|
|
3154
|
-
return
|
|
3237
|
+
return z(this, "[GooglePay], success", (e, t) => {
|
|
3155
3238
|
let n = JSON.parse(t);
|
|
3156
3239
|
this.log("[GooglePay], success", n), this.successCallback?.({ transactionId: n.chargeId });
|
|
3157
3240
|
});
|
|
3158
3241
|
}
|
|
3159
3242
|
validateOptions(t, n, r, i) {
|
|
3160
|
-
if (!
|
|
3161
|
-
if (!e(n)) throw
|
|
3162
|
-
if (!i.gateway) throw
|
|
3163
|
-
if (!i.googlePayGatewayMerchantId) throw
|
|
3243
|
+
if (!B(r)) throw I(t, "Invalid currency: " + r), TypeError("invalid currency: " + r);
|
|
3244
|
+
if (!e(n)) throw I(t, "Invalid amount: " + n), TypeError("invalid amount: " + n);
|
|
3245
|
+
if (!i.gateway) throw I(t, "Invalid gateway parameter"), TypeError("Invalid gateway parameter");
|
|
3246
|
+
if (!i.googlePayGatewayMerchantId) throw I(t, "Invalid gateway merchant id parameter"), TypeError("Invalid gateway merchant id parameter");
|
|
3164
3247
|
}
|
|
3165
3248
|
};
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
var zn = (e, t, n) => {
|
|
3249
|
+
L([R], Xn.prototype, "cleanUp", null), L([R], Xn.prototype, "addGooglePay", null), L([R], Xn.prototype, "addChargeWithGooglePay", null), L([R], Xn.prototype, "getFailureAddChargeHandler", null), L([R], Xn.prototype, "getSuccessAddChargeHandler", null), L([R], Xn.prototype, "validateOptions", null);
|
|
3250
|
+
// \0rolldown_dynamic_import_helper.js
|
|
3251
|
+
var Zn = (e, t, n) => {
|
|
3170
3252
|
let r = t.lastIndexOf("?"), i = e[r === -1 || r < t.lastIndexOf("/") ? t : t.slice(0, r)];
|
|
3171
3253
|
return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((e, r) => {
|
|
3172
3254
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(r.bind(null, /* @__PURE__ */ Error("Unknown variable dynamic import: " + t + (t.split("/").length === n ? "" : ". Note that variables only represent file names one level deep."))));
|
|
3173
3255
|
});
|
|
3174
|
-
},
|
|
3256
|
+
}, Qn = ["supports3DS"], $n = [
|
|
3175
3257
|
"visa",
|
|
3176
3258
|
"masterCard",
|
|
3177
3259
|
"amex",
|
|
3178
3260
|
"discover"
|
|
3179
3261
|
];
|
|
3180
|
-
function
|
|
3262
|
+
function er(e) {
|
|
3181
3263
|
try {
|
|
3182
3264
|
return typeof ApplePaySession < "u" && ApplePaySession.supportsVersion(e) === !0;
|
|
3183
3265
|
} catch {
|
|
3184
3266
|
return !1;
|
|
3185
3267
|
}
|
|
3186
3268
|
}
|
|
3187
|
-
function
|
|
3188
|
-
for (let e = 14; e > 3; e--) if (
|
|
3269
|
+
function tr() {
|
|
3270
|
+
for (let e = 14; e > 3; e--) if (er(e)) return e;
|
|
3189
3271
|
return 3;
|
|
3190
3272
|
}
|
|
3191
|
-
function
|
|
3192
|
-
return e &&
|
|
3273
|
+
function nr(e) {
|
|
3274
|
+
return e && er(e) ? e : tr();
|
|
3193
3275
|
}
|
|
3194
|
-
function
|
|
3195
|
-
return e?.length ? [.../* @__PURE__ */ new Set(["supports3DS", ...e])] :
|
|
3276
|
+
function rr(e) {
|
|
3277
|
+
return e?.length ? [.../* @__PURE__ */ new Set(["supports3DS", ...e])] : Qn;
|
|
3196
3278
|
}
|
|
3197
|
-
function
|
|
3279
|
+
function ir(e, t, n) {
|
|
3198
3280
|
let r = {
|
|
3199
3281
|
countryCode: e.countryCode || "AU",
|
|
3200
3282
|
currencyCode: t,
|
|
3201
|
-
merchantCapabilities:
|
|
3202
|
-
supportedNetworks: e.supportedNetworks?.length ? e.supportedNetworks :
|
|
3283
|
+
merchantCapabilities: rr(e.merchantCapabilities),
|
|
3284
|
+
supportedNetworks: e.supportedNetworks?.length ? e.supportedNetworks : $n,
|
|
3203
3285
|
total: {
|
|
3204
3286
|
label: e.lineItemLabel,
|
|
3205
3287
|
type: "final",
|
|
@@ -3208,28 +3290,26 @@ function Kn(e, t, n) {
|
|
|
3208
3290
|
};
|
|
3209
3291
|
return e.supportedCountries?.length && (r.supportedCountries = e.supportedCountries), r;
|
|
3210
3292
|
}
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
function Zn() {
|
|
3293
|
+
// src/sdk/utils/applePaySdkLoader.ts
|
|
3294
|
+
var ar = "payfurl-applepay-script", or = "https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js", sr = 1e4, cr = null;
|
|
3295
|
+
function lr() {
|
|
3215
3296
|
return !!window.ApplePaySession && !!window.customElements?.get("apple-pay-button");
|
|
3216
3297
|
}
|
|
3217
|
-
function
|
|
3218
|
-
return typeof window > "u" || typeof document > "u" ||
|
|
3298
|
+
function ur() {
|
|
3299
|
+
return typeof window > "u" || typeof document > "u" || lr() ? Promise.resolve() : cr || (cr = new Promise((e) => {
|
|
3219
3300
|
let t = document.createElement("script");
|
|
3220
|
-
t.id =
|
|
3221
|
-
let n = setTimeout(() => e(),
|
|
3301
|
+
t.id = ar, t.src = or, t.type = "text/javascript", t.crossOrigin = "anonymous";
|
|
3302
|
+
let n = setTimeout(() => e(), sr), r = () => {
|
|
3222
3303
|
clearTimeout(n), e();
|
|
3223
3304
|
};
|
|
3224
3305
|
t.addEventListener("load", r, { once: !0 }), t.addEventListener("error", r, { once: !0 }), document.head.appendChild(t);
|
|
3225
|
-
}),
|
|
3306
|
+
}), cr);
|
|
3226
3307
|
}
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
var $n = { style: { position: "relative" } }, er = {
|
|
3308
|
+
// src/sdk/components/ApplePayForm.vue?vue&type=script&setup=true&lang.ts
|
|
3309
|
+
var dr = { style: { position: "relative" } }, fr = {
|
|
3230
3310
|
key: 0,
|
|
3231
3311
|
class: "error text-normal"
|
|
3232
|
-
},
|
|
3312
|
+
}, pr = /* @__PURE__ */ C({
|
|
3233
3313
|
__name: "ApplePayForm",
|
|
3234
3314
|
props: {
|
|
3235
3315
|
log: { type: Function },
|
|
@@ -3249,10 +3329,10 @@ var $n = { style: { position: "relative" } }, er = {
|
|
|
3249
3329
|
"cancel"
|
|
3250
3330
|
],
|
|
3251
3331
|
setup(e, { emit: t }) {
|
|
3252
|
-
let n = e, r = t, a = p(null), o = p(n.amount), l = p(n.currency), d = p(!0), f = p(""), m = !1, { isLoading: h } =
|
|
3332
|
+
let n = e, r = t, a = p(null), o = p(n.amount), l = p(n.currency), d = p(!0), f = p(""), m = !1, { isLoading: h } = W();
|
|
3253
3333
|
function _() {
|
|
3254
3334
|
if (n.log("[onApplePayButtonClicked]"), !ApplePaySession || n.clickGate()?.() === !1) return;
|
|
3255
|
-
let e =
|
|
3335
|
+
let e = ir(n.options, l.value, o.value), t = nr(n.options.applePayVersion);
|
|
3256
3336
|
n.log("[onApplePayButtonClicked], Create ApplePaySession", e, t);
|
|
3257
3337
|
let i = new ApplePaySession(t, e);
|
|
3258
3338
|
i.onvalidatemerchant = (e) => {
|
|
@@ -3268,9 +3348,9 @@ var $n = { style: { position: "relative" } }, er = {
|
|
|
3268
3348
|
}, i.begin();
|
|
3269
3349
|
}
|
|
3270
3350
|
function v() {
|
|
3271
|
-
m || (m = !0, window.google = null,
|
|
3351
|
+
m || (m = !0, window.google = null, ur().then(() => {
|
|
3272
3352
|
let e = document.createElement("apple-pay-button");
|
|
3273
|
-
e.buttonstyle = "black", e.locale = "en-US", e.type = "buy", e.onclick = _, a.value?.appendChild(e), window.postMessage({ status:
|
|
3353
|
+
e.buttonstyle = "black", e.locale = "en-US", e.type = "buy", e.onclick = _, a.value?.appendChild(e), window.postMessage({ status: Re }, "*");
|
|
3274
3354
|
}));
|
|
3275
3355
|
}
|
|
3276
3356
|
function y(e) {
|
|
@@ -3279,26 +3359,26 @@ var $n = { style: { position: "relative" } }, er = {
|
|
|
3279
3359
|
return s(() => {
|
|
3280
3360
|
window.removeEventListener("message", y);
|
|
3281
3361
|
}), c(() => {
|
|
3282
|
-
window.addEventListener("message", y),
|
|
3283
|
-
}), (e, t) => (b(),
|
|
3362
|
+
window.addEventListener("message", y), ct(a.value, "payfurl-combined-container") || (d.value = !0, r("activate"), v());
|
|
3363
|
+
}), (e, t) => (b(), j(D, null, [A("div", dr, [u(Le(se, null, null, 512), [[Ee, g(h)]])]), A("div", {
|
|
3284
3364
|
style: { position: "relative" },
|
|
3285
3365
|
ref_key: "root",
|
|
3286
3366
|
ref: a
|
|
3287
|
-
}, [f.value ? (b(),
|
|
3367
|
+
}, [f.value ? (b(), j("div", fr, i(f.value), 1)) : T("", !0)], 512)], 64));
|
|
3288
3368
|
}
|
|
3289
|
-
}),
|
|
3369
|
+
}), mr = {
|
|
3290
3370
|
VALIDATE_MERCHANT: "VALIDATE_MERCHANT",
|
|
3291
3371
|
ADD_CHARGE_WITH_APPLE_PAY: "ADD_CHARGE_WITH_APPLE_PAY"
|
|
3292
|
-
},
|
|
3293
|
-
[
|
|
3372
|
+
}, hr = (e) => ({
|
|
3373
|
+
[mr.VALIDATE_MERCHANT]: {
|
|
3294
3374
|
url: e + "/charge/token/apple/validate",
|
|
3295
3375
|
method: "POST"
|
|
3296
3376
|
},
|
|
3297
|
-
[
|
|
3377
|
+
[mr.ADD_CHARGE_WITH_APPLE_PAY]: {
|
|
3298
3378
|
url: e + "/charge/token/apple",
|
|
3299
3379
|
method: "POST"
|
|
3300
3380
|
}
|
|
3301
|
-
}),
|
|
3381
|
+
}), gr = class {
|
|
3302
3382
|
container = null;
|
|
3303
3383
|
log;
|
|
3304
3384
|
apiUrl = "";
|
|
@@ -3318,8 +3398,8 @@ var $n = { style: { position: "relative" } }, er = {
|
|
|
3318
3398
|
order = null;
|
|
3319
3399
|
constructor(e, t) {
|
|
3320
3400
|
this.log = e, this.environment = t.environment, this.apiUrl = t.apiUrl, this.publicKey = t.publicKey, this.version = t.version, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null;
|
|
3321
|
-
let n = new
|
|
3322
|
-
this.httpInvoker = new
|
|
3401
|
+
let n = new N(t.environment, P(t.publicKey));
|
|
3402
|
+
this.httpInvoker = new F(t.publicKey, t.version, n);
|
|
3323
3403
|
}
|
|
3324
3404
|
setAmount(e) {
|
|
3325
3405
|
this.amount = e, this.applePayButton?.setAmount(e);
|
|
@@ -3354,16 +3434,16 @@ var $n = { style: { position: "relative" } }, er = {
|
|
|
3354
3434
|
}), this.validateOptions(e, n, r, i), this.setAmount(n), this.setCurrency(r);
|
|
3355
3435
|
let a = !1;
|
|
3356
3436
|
this.container = e;
|
|
3357
|
-
let o =
|
|
3437
|
+
let o = z(this, "[ApplePay][renderDefaultComponent]", () => {
|
|
3358
3438
|
this.log("[addApplePay], renderDefaultComponent", {
|
|
3359
3439
|
providerId: t,
|
|
3360
3440
|
amount: n,
|
|
3361
3441
|
currency: r,
|
|
3362
3442
|
options: i
|
|
3363
3443
|
});
|
|
3364
|
-
let o =
|
|
3444
|
+
let o = E({
|
|
3365
3445
|
el: e,
|
|
3366
|
-
component:
|
|
3446
|
+
component: pr,
|
|
3367
3447
|
props: {
|
|
3368
3448
|
log: this.log,
|
|
3369
3449
|
el: e,
|
|
@@ -3377,10 +3457,10 @@ var $n = { style: { position: "relative" } }, er = {
|
|
|
3377
3457
|
activate: () => {
|
|
3378
3458
|
a || (a = !0, this.log("activate applepay form"));
|
|
3379
3459
|
},
|
|
3380
|
-
validateMerchant:
|
|
3460
|
+
validateMerchant: z(this, "[addApplePay], validateMerchant", (n, r) => {
|
|
3381
3461
|
this.log("[ApplePay]: validate", n), this.validateMerchant(e, t, n, r);
|
|
3382
3462
|
}),
|
|
3383
|
-
submit:
|
|
3463
|
+
submit: z(this, "[addApplePay], submit", (n, r) => {
|
|
3384
3464
|
this.log("[ApplePay]: complete", n);
|
|
3385
3465
|
let a = {
|
|
3386
3466
|
amount: this.amount,
|
|
@@ -3412,8 +3492,8 @@ var $n = { style: { position: "relative" } }, er = {
|
|
|
3412
3492
|
};
|
|
3413
3493
|
this.addChargeWithApplePay(e, t, a, r);
|
|
3414
3494
|
}),
|
|
3415
|
-
error:
|
|
3416
|
-
this.log("[ApplePay]: error", t),
|
|
3495
|
+
error: z(this, "[addApplePay], error", (t, n) => {
|
|
3496
|
+
this.log("[ApplePay]: error", t), I(e, "Unable to pay with ApplePay"), n.completePayment({
|
|
3417
3497
|
status: ApplePaySession.STATUS_FAILURE,
|
|
3418
3498
|
errors: [{
|
|
3419
3499
|
code: "unknown",
|
|
@@ -3424,13 +3504,13 @@ var $n = { style: { position: "relative" } }, er = {
|
|
|
3424
3504
|
body: t
|
|
3425
3505
|
});
|
|
3426
3506
|
}),
|
|
3427
|
-
cancel:
|
|
3428
|
-
this.log("[ApplePay]: cancel"),
|
|
3507
|
+
cancel: z(this, "[addApplePay], calcel", () => {
|
|
3508
|
+
this.log("[ApplePay]: cancel"), I(e, "ApplePay canceled"), this.failureCallback?.({ error: "ApplePay canceled" });
|
|
3429
3509
|
})
|
|
3430
3510
|
}
|
|
3431
3511
|
});
|
|
3432
3512
|
this.destroy = o.destroy;
|
|
3433
|
-
}), s =
|
|
3513
|
+
}), s = z(this, "[ApplePay][renderCustomComponent]", (a) => {
|
|
3434
3514
|
this.log("[addApplePay], renderCustomComponent", {
|
|
3435
3515
|
providerId: t,
|
|
3436
3516
|
amount: n,
|
|
@@ -3444,7 +3524,7 @@ var $n = { style: { position: "relative" } }, er = {
|
|
|
3444
3524
|
options: i,
|
|
3445
3525
|
clientParameters: i.clientParameters,
|
|
3446
3526
|
onValidate: this.getOnValidate.bind(this),
|
|
3447
|
-
onSuccess:
|
|
3527
|
+
onSuccess: z(this, "[addApplePay], success", (e) => {
|
|
3448
3528
|
this.log("[addApplePay], success", e), this.applePayButton?.hide();
|
|
3449
3529
|
let t = {
|
|
3450
3530
|
token: e.token,
|
|
@@ -3452,43 +3532,43 @@ var $n = { style: { position: "relative" } }, er = {
|
|
|
3452
3532
|
};
|
|
3453
3533
|
e.clickToPayData && (t.clickToPayData = e.clickToPayData), this.successCallback?.(t);
|
|
3454
3534
|
}),
|
|
3455
|
-
onFailure:
|
|
3535
|
+
onFailure: z(this, "[addApplePay], failure", (e) => {
|
|
3456
3536
|
this.log("[addApplePay], failure", e), this.applePayButton?.redraw(), this.failureCallback?.({ error: e.error });
|
|
3457
3537
|
})
|
|
3458
|
-
}), this.billingAddress && this.applePayButton?.setBillingAddress(this.billingAddress), this.customer && this.applePayButton?.setCustomerInfo(this.customer), this.order && this.applePayButton?.setOrderInfo(this.order), this.applePayButton?.draw(), window.postMessage({ status:
|
|
3538
|
+
}), this.billingAddress && this.applePayButton?.setBillingAddress(this.billingAddress), this.customer && this.applePayButton?.setCustomerInfo(this.customer), this.order && this.applePayButton?.setOrderInfo(this.order), this.applePayButton?.draw(), window.postMessage({ status: Re }, "*");
|
|
3459
3539
|
});
|
|
3460
|
-
|
|
3540
|
+
Zn(/* #__PURE__ */ Object.assign({
|
|
3461
3541
|
"./applepay/ApplePayButton.interface.ts": () => import("./ApplePayButton.interface-BvRk9kiK.js"),
|
|
3462
3542
|
"./applepay/ApplePayButtonOptions.type.ts": () => import("./ApplePayButtonOptions.type-BvRk9kiK.js"),
|
|
3463
|
-
"./applepay/PayWayAppleButton.ts": () => import("./PayWayAppleButton-
|
|
3464
|
-
"./applepay/payway_rest.ts": () => import("./payway_rest-
|
|
3465
|
-
}), `./applepay/${i.providerType.toLowerCase()}.ts`, 3).then(
|
|
3543
|
+
"./applepay/PayWayAppleButton.ts": () => import("./PayWayAppleButton-DlJiWKWp.js"),
|
|
3544
|
+
"./applepay/payway_rest.ts": () => import("./payway_rest-C6IL8JDO.js")
|
|
3545
|
+
}), `./applepay/${i.providerType.toLowerCase()}.ts`, 3).then(z(this, "[localAddApplePay], then", (e) => {
|
|
3466
3546
|
this.log(`Loading ${i.providerType}...`, e), s(e);
|
|
3467
3547
|
})).catch(() => {
|
|
3468
3548
|
this.log(`Error loading ${i.providerType}`), o();
|
|
3469
3549
|
});
|
|
3470
3550
|
}
|
|
3471
3551
|
validateMerchant(e, t, n, r) {
|
|
3472
|
-
this.log("[validateMerchant]", n), this.httpInvoker?.invoke(
|
|
3552
|
+
this.log("[validateMerchant]", n), this.httpInvoker?.invoke(hr(this.apiUrl)[mr.VALIDATE_MERCHANT].url, hr(this.apiUrl)[mr.VALIDATE_MERCHANT].method, JSON.stringify(n), z(this, "[validateMerchant], success", (e, t) => {
|
|
3473
3553
|
try {
|
|
3474
3554
|
let e = JSON.parse(t);
|
|
3475
3555
|
this.log("[validateMerchant], success", e), r.completeMerchantValidation(e);
|
|
3476
3556
|
} catch (e) {
|
|
3477
3557
|
this.log("error parsing validateMerchant response", e);
|
|
3478
3558
|
}
|
|
3479
|
-
}),
|
|
3480
|
-
this.log("[validateMerchant], failure", n),
|
|
3559
|
+
}), z(this, "[validateMerchant], failure", (t, n) => {
|
|
3560
|
+
this.log("[validateMerchant], failure", n), I(e, "Unable to pay with ApplePay"), this.failureCallback?.({
|
|
3481
3561
|
error: "Unable to pay with ApplePay",
|
|
3482
3562
|
body: n
|
|
3483
3563
|
});
|
|
3484
3564
|
}), { providerId: t });
|
|
3485
3565
|
}
|
|
3486
3566
|
addChargeWithApplePay(e, t, n, r) {
|
|
3487
|
-
this.log("[addChargeWithApplePay]", n), this.httpInvoker?.invoke(
|
|
3567
|
+
this.log("[addChargeWithApplePay]", n), this.httpInvoker?.invoke(hr(this.apiUrl)[mr.ADD_CHARGE_WITH_APPLE_PAY].url, hr(this.apiUrl)[mr.ADD_CHARGE_WITH_APPLE_PAY].method, JSON.stringify(n), this.getSuccessAddChargeHandler(e, r).bind(this), this.getFailureAddChargeHandler(e, r).bind(this), { providerId: t });
|
|
3488
3568
|
}
|
|
3489
3569
|
getFailureAddChargeHandler(e, t) {
|
|
3490
|
-
return
|
|
3491
|
-
this.log("[ApplePay], failure", r),
|
|
3570
|
+
return z(this, "[getFailureAddChargeHandler]", (n, r) => {
|
|
3571
|
+
this.log("[ApplePay], failure", r), I(e, "Unable to pay with ApplePay"), t.completePayment({
|
|
3492
3572
|
status: ApplePaySession.STATUS_FAILURE,
|
|
3493
3573
|
errors: [{
|
|
3494
3574
|
code: "unknown",
|
|
@@ -3501,7 +3581,7 @@ var $n = { style: { position: "relative" } }, er = {
|
|
|
3501
3581
|
});
|
|
3502
3582
|
}
|
|
3503
3583
|
getSuccessAddChargeHandler(e, t) {
|
|
3504
|
-
return
|
|
3584
|
+
return z(this, "[getSuccessAddChargeHandler]", (e, n) => {
|
|
3505
3585
|
let r = JSON.parse(n);
|
|
3506
3586
|
this.log("[ApplePay], success", r);
|
|
3507
3587
|
let i = {
|
|
@@ -3512,15 +3592,14 @@ var $n = { style: { position: "relative" } }, er = {
|
|
|
3512
3592
|
});
|
|
3513
3593
|
}
|
|
3514
3594
|
validateOptions(t, n, r, i) {
|
|
3515
|
-
if (!
|
|
3516
|
-
if (!e(n)) throw
|
|
3517
|
-
if (!i.lineItemLabel) throw
|
|
3595
|
+
if (!B(r)) throw I(t, "Invalid currency: " + r), TypeError("invalid currency: " + r);
|
|
3596
|
+
if (!e(n)) throw I(t, "Invalid amount: " + n), TypeError("invalid amount: " + n);
|
|
3597
|
+
if (!i.lineItemLabel) throw I(t, "Invalid lineItemLabel parameter"), TypeError("Invalid lineItemLabel parameter");
|
|
3518
3598
|
}
|
|
3519
3599
|
};
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
var ar = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
3600
|
+
L([R], gr.prototype, "cleanUp", null), L([R], gr.prototype, "addApplePay", null), L([R], gr.prototype, "validateMerchant", null), L([R], gr.prototype, "addChargeWithApplePay", null), L([R], gr.prototype, "getFailureAddChargeHandler", null), L([R], gr.prototype, "getSuccessAddChargeHandler", null), L([R], gr.prototype, "validateOptions", null);
|
|
3601
|
+
// src/components/ApplePayIcon.vue
|
|
3602
|
+
var _r = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
3524
3603
|
__name: "ApplePayIcon",
|
|
3525
3604
|
props: {
|
|
3526
3605
|
size: {},
|
|
@@ -3528,12 +3607,12 @@ var ar = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
|
3528
3607
|
},
|
|
3529
3608
|
setup(e) {
|
|
3530
3609
|
let t = `--size: ${e.size}px`;
|
|
3531
|
-
return (e, n) => (b(),
|
|
3610
|
+
return (e, n) => (b(), j("svg", {
|
|
3532
3611
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3533
3612
|
viewBox: "0 0 512 210.2",
|
|
3534
3613
|
"xml:space": "preserve",
|
|
3535
3614
|
style: t
|
|
3536
|
-
}, [...n[0] ||= [
|
|
3615
|
+
}, [...n[0] ||= [A("path", {
|
|
3537
3616
|
id: "XMLID_34_",
|
|
3538
3617
|
d: "M93.6,27.1C87.6,34.2,78,39.8,68.4,39c-1.2-9.6,3.5-19.8,9-26.1c6-7.3,16.5-12.5,25-12.9\n C103.4,10,99.5,19.8,93.6,27.1 M102.3,40.9c-13.9-0.8-25.8,7.9-32.4,7.9c-6.7,0-16.8-7.5-27.8-7.3c-14.3,0.2-27.6,8.3-34.9,21.2\n c-15,25.8-3.9,64,10.6,85c7.1,10.4,15.6,21.8,26.8,21.4c10.6-0.4,14.8-6.9,27.6-6.9c12.9,0,16.6,6.9,27.8,6.7\n c11.6-0.2,18.9-10.4,26-20.8c8.1-11.8,11.4-23.3,11.6-23.9c-0.2-0.2-22.4-8.7-22.6-34.3c-0.2-21.4,17.5-31.6,18.3-32.2\n C123.3,42.9,107.7,41.3,102.3,40.9 M182.6,11.9v155.9h24.2v-53.3h33.5c30.6,0,52.1-21,52.1-51.4c0-30.4-21.1-51.2-51.3-51.2H182.6z\n M206.8,32.3h27.9c21,0,33,11.2,33,30.9c0,19.7-12,31-33.1,31h-27.8V32.3z M336.6,169c15.2,0,29.3-7.7,35.7-19.9h0.5v18.7h22.4V90.2\n c0-22.5-18-37-45.7-37c-25.7,0-44.7,14.7-45.4,34.9h21.8c1.8-9.6,10.7-15.9,22.9-15.9c14.8,0,23.1,6.9,23.1,19.6v8.6l-30.2,1.8\n c-28.1,1.7-43.3,13.2-43.3,33.2C298.4,155.6,314.1,169,336.6,169z M343.1,150.5c-12.9,0-21.1-6.2-21.1-15.7c0-9.8,7.9-15.5,23-16.4\n l26.9-1.7v8.8C371.9,140.1,359.5,150.5,343.1,150.5z M425.1,210.2c23.6,0,34.7-9,44.4-36.3L512,54.7h-24.6l-28.5,92.1h-0.5\n l-28.5-92.1h-25.3l41,113.5l-2.2,6.9c-3.7,11.7-9.7,16.2-20.4,16.2c-1.9,0-5.6-0.2-7.1-0.4v18.7C417.3,210,423.3,210.2,425.1,210.2z\n "
|
|
3539
3618
|
}, null, -1)]]));
|
|
@@ -3542,65 +3621,64 @@ var ar = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
|
3542
3621
|
(function(e) {
|
|
3543
3622
|
e.mastercard = "mastercard", e.maestro = "maestro", e.visa = "visa", e.amex = "amex", e.discover = "discover";
|
|
3544
3623
|
})(X ||= {});
|
|
3545
|
-
var
|
|
3624
|
+
var vr = [
|
|
3546
3625
|
X.mastercard,
|
|
3547
3626
|
X.maestro,
|
|
3548
3627
|
X.visa,
|
|
3549
3628
|
X.amex,
|
|
3550
3629
|
X.discover
|
|
3551
|
-
],
|
|
3630
|
+
], yr;
|
|
3552
3631
|
(function(e) {
|
|
3553
3632
|
e.NONE = "NONE", e.FULL = "FULL", e.POSTAL_COUNTRY = "POSTAL_COUNTRY";
|
|
3554
|
-
})(
|
|
3555
|
-
|
|
3556
|
-
//#region src/assets/click2pay/mastercard.svg
|
|
3557
|
-
var cr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='28px'%20height='20px'%20viewBox='0%200%2028%2020'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eMC%3c/title%3e%3cg%20id='Page-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Click-to-Pay-Styles-for-UI-Display'%20transform='translate(-3824.000000,%20-619.000000)'%3e%3cg%20id='button_dark_v3.1_178x32'%20transform='translate(3776.000000,%20612.000000)'%3e%3cg%20id='v4_mark_light_S_15px'%20transform='translate(14.500000,%207.500000)'%3e%3cg%20id='MC'%20transform='translate(34.000000,%200.000000)'%3e%3cg%20id='Group'%20transform='translate(0.000000,%200.500000)'%20fill-rule='nonzero'%3e%3cg%20id='mc_symbol'%3e%3crect%20id='Rectangle'%20fill='%23FF5F00'%20x='9.54692308'%20y='1.89561644'%20width='7.99846152'%20height='13.1831507'%3e%3c/rect%3e%3cpath%20d='M10.3707692,8.48835615%20C10.3687609,5.9162332%2011.5388328,3.4860197%2013.5438461,1.8979452%20C10.1376439,-0.803412601%205.24620091,-0.409936474%202.30709182,2.80184914%20C-0.632017274,6.01363474%20-0.632017274,10.9654063%202.30709182,14.1771919%20C5.24620091,17.3889776%2010.1376439,17.7824537%2013.5438461,15.0810959%20C11.5381947,13.4925171%2010.3680514,11.0612963%2010.3707692,8.48835615%20Z'%20id='Path'%20fill='%23EB001B'%3e%3c/path%3e%3cpolygon%20id='Path'%20fill='%23F79E1B'%20points='26.037982%2013.7760322%2026.037982%2013.4940046%2026.1523888%2013.4940046%2026.1523888%2013.447%2025.8778125%2013.447%2025.8778125%2013.4940046%2025.9922193%2013.4940046%2025.9922193%2013.7760322'%3e%3c/polygon%3e%3cpolygon%20id='Path'%20fill='%23F79E1B'%20points='26.5645392%2013.447%2026.4730138%2013.447%2026.3814883%2013.682023%2026.2899629%2013.447%2026.1984375%2013.447%2026.1984375%2013.7760322%2026.2670816%2013.7760322%2026.2670816%2013.5175069%2026.3431635%2013.7290277%2026.4272511%2013.7290277%2026.5008388%2013.5175069%2026.5008388%2013.7760322%2026.5645392%2013.7760322'%3e%3c/polygon%3e%3cpath%20d='M26.9861539,8.48835615%20C26.9861539,11.6981845%2025.1698664,14.6262062%2022.3088666,16.0288794%20C19.4478669,17.4315526%2016.0443669,17.0626193%2013.5438461,15.0787671%20C15.5479847,13.4893444%2016.7181446,11.059454%2016.7181446,8.48719178%20C16.7181446,5.9149296%2015.5479847,3.48503916%2013.5438461,1.89561644%20C16.0443669,-0.0882357813%2019.4478669,-0.45716899%2022.3088666,0.945504164%20C25.1698664,2.34817732%2026.9861539,5.27619909%2026.9861539,8.4860274%20L26.9861539,8.48835615%20Z'%20id='Path'%20fill='%23F79E1B'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3crect%20id='Rectangle-export'%20x='0'%20y='0'%20width='27'%20height='18'%3e%3c/rect%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", lr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='30px'%20height='19px'%20viewBox='0%200%2030%2019'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eVisa-dark%3c/title%3e%3cg%20id='Page-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Click-to-Pay-Styles-for-UI-Display'%20transform='translate(-3857.000000,%20-659.000000)'%3e%3cg%20id='button_dark_v3.1_178x32'%20transform='translate(3776.000000,%20612.000000)'%3e%3cg%20id='v4_mark_light_S_15px'%20transform='translate(14.500000,%207.500000)'%3e%3cg%20id='Visa-dark'%20transform='translate(67.000000,%2040.000000)'%3e%3cg%20id='Group'%20transform='translate(0.000000,%204.500000)'%20fill='%231A1F71'%20fill-rule='nonzero'%3e%3cg%20id='Visa-Brand-Mark-Blue'%3e%3cpath%20d='M10.9839171,0.218028169%20L7.20456221,8.77056338%20L4.73889401,8.77056338%20L2.87995392,1.94450704%20C2.76635945,1.52366197%202.66880184,1.37028169%202.32534562,1.1928169%20C1.76539171,0.903802817%200.839262673,0.633802817%200.0240552995,0.465211268%20L0.0801843318,0.216760563%20L4.04930876,0.216760563%20C4.55447005,0.216760563%205.01018433,0.536197183%205.12511521,1.08887324%20L6.10737327,6.03887324%20L8.53428571,0.218028169%20L10.9839171,0.218028169%20Z%20M20.6447926,5.97802817%20C20.6541475,3.72042254%2017.3532258,3.59619718%2017.3759447,2.5884507%20C17.3826267,2.28169014%2017.6913364,1.95591549%2018.3648848,1.87225352%20C18.6989862,1.83042254%2019.6197696,1.79873239%2020.6648387,2.25507042%20L21.0737788,0.441126761%20C20.5124885,0.247183099%2019.7908295,0.0621126761%2018.8914286,0.0621126761%20C16.586129,0.0621126761%2014.9637327,1.22450704%2014.9490323,2.89014085%20C14.9343318,4.12098592%2016.1076959,4.80802817%2016.9910599,5.21746479%20C17.8998157,5.63704225%2018.2045161,5.90577465%2018.2005069,6.27971831%20C18.1951613,6.85394366%2017.4761751,7.10619718%2016.8052995,7.11633803%20C15.6319355,7.13408451%2014.9517051,6.81591549%2014.4091244,6.57633803%20L13.9868203,8.44985915%20C14.5320737,8.68690141%2015.5370507,8.89352113%2016.5807834,8.90366197%20C19.034424,8.90366197%2020.6367742,7.75521127%2020.6447926,5.97802817%20L20.6447926,5.97802817%20Z%20M26.7321198,8.77056338%20L28.8890783,8.77056338%20L27.0060829,0.218028169%20L25.0148387,0.218028169%20C24.5671429,0.218028169%2024.1902765,0.465211268%2024.0218894,0.845492958%20L20.5231797,8.77056338%20L22.9728111,8.77056338%20L23.4592627,7.4928169%20L26.4514747,7.4928169%20L26.7321198,8.77056338%20Z%20M24.1301382,5.73971831%20L25.3582949,2.52760563%20L26.0652535,5.73971831%20L24.1301382,5.73971831%20Z%20M14.3169124,0.218028169%20L12.3884793,8.77056338%20L10.0564516,8.77056338%20L11.9862212,0.218028169%20L14.3169124,0.218028169%20Z'%20id='Shape'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3crect%20id='Rectangle-export'%20x='0'%20y='0'%20width='29'%20height='18'%3e%3c/rect%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", ur = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='19px'%20height='19px'%20viewBox='0%200%2019%2019'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eAMEX%3c/title%3e%3cg%20id='Page-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Click-to-Pay-Styles-for-UI-Display'%20transform='translate(-3890.000000,%20-619.000000)'%3e%3cg%20id='button_dark_v3.1_178x32'%20transform='translate(3776.000000,%20612.000000)'%3e%3cg%20id='v4_mark_light_S_15px'%20transform='translate(14.500000,%207.500000)'%3e%3cg%20id='AMEX'%20transform='translate(100.000000,%200.000000)'%3e%3cg%20id='Group'%20fill-rule='nonzero'%3e%3cg%20id='Amex-500x500@1x'%3e%3crect%20id='Rectangle'%20fill='%23FFFFFF'%20x='0'%20y='0'%20width='18'%20height='18'%3e%3c/rect%3e%3cpath%20d='M0,0%20L0,18%20L18,18%20L18,15.147828%20L15.828444,15.147828%20L14.710428,13.911588%20L13.58676,15.147828%20L6.426972,15.147828%20L6.426972,9.386172%20L4.116096,9.386172%20L6.982488,2.89926%20L9.746856,2.89926%20L10.733652,5.121576%20L10.733652,2.89926%20L14.155416,2.89926%20L14.749524,4.573872%20L15.34752,2.89926%20L18,2.89926%20L18,0%20L0,0%20Z%20M15.884244,3.620664%20L14.754384,6.758172%20L13.631796,3.620664%20L11.480112,3.620664%20L11.480112,8.658072%20L12.840192,8.658072%20L12.840192,5.131872%20L14.135616,8.658072%20L15.344496,8.658072%20L16.639812,5.1246%20L16.639812,8.658072%20L18,8.658072%20L18,3.620664%20L15.884244,3.620664%20Z%20M7.486272,3.620664%20L5.262516,8.658072%20L6.77376,8.658072%20L7.191216,7.650576%20L9.508356,7.650576%20L9.93294,8.658072%20L11.480112,8.658072%20L9.256608,3.620664%20L7.486272,3.620664%20Z%20M8.349804,4.87278%20L9.03348,6.520716%20L7.666092,6.520716%20L8.349804,4.87278%20Z%20M16.222968,9.389052%20L14.747796,11.00106%20L13.286808,9.389052%20L11.480616,9.389052%20L13.855356,11.907792%20L11.480616,14.426496%20L13.236516,14.426496%20L14.71896,12.800088%20L16.19424,14.426496%20L18,14.426496%20L15.611328,11.893356%20L18,9.389052%20L16.222968,9.389052%20Z%20M7.191576,9.389052%20L7.191576,14.426496%20L11.480508,14.426496%20L11.480508,13.260672%20L8.566128,13.260672%20L8.566128,12.476268%20L11.40858,12.476268%20L11.40858,11.339172%20L8.566128,11.339172%20L8.566128,10.554912%20L11.480508,10.554912%20L11.480508,9.389052%20L7.191576,9.389052%20Z%20M16.6167,11.89548%20L18,13.367124%20L18,10.436112%20L16.6167,11.89548%20Z'%20id='500x500'%20fill='%23006FCF'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3crect%20id='Rectangle-export'%20x='0'%20y='0'%20width='18'%20height='18'%3e%3c/rect%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", dr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='28px'%20height='20px'%20viewBox='0%200%2028%2020'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eDiscover%3c/title%3e%3cg%20id='Page-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Click-to-Pay-Styles-for-UI-Display'%20transform='translate(-3913.000000,%20-619.000000)'%3e%3cg%20id='button_dark_v3.1_178x32'%20transform='translate(3776.000000,%20612.000000)'%3e%3cg%20id='v4_mark_light_S_15px'%20transform='translate(14.500000,%207.500000)'%3e%3cg%20id='Discover'%20transform='translate(123.000000,%200.000000)'%3e%3cg%20id='Group'%20transform='translate(0.000000,%200.500000)'%20fill-rule='nonzero'%3e%3cg%20id='Discover_26x16'%3e%3crect%20id='Rectangle'%20fill='%23FFFFFF'%20x='0'%20y='0'%20width='27'%20height='17'%3e%3c/rect%3e%3cpath%20d='M26.8272,9.445625%20C26.8272,9.445625%2019.494,14.535%206.0696,16.80875%20L26.8272,16.80875%20L26.8272,9.445625%20Z'%20id='Path'%20fill='%23F68C1E'%3e%3c/path%3e%3cpath%20d='M26.9028389,0%20L0,0%20L0,17%20L27,17%20L27,0%20L26.9028389,0%20Z%20M26.8056777,0.19125%20L26.8056777,16.80875%20L0.194322271,16.80875%20C0.194322271,16.6175%200.194322271,0.3825%200.194322271,0.19125%20C0.388644542,0.19125%2026.6113555,0.19125%2026.8056777,0.19125'%20id='Shape'%20fill='%23000105'%3e%3c/path%3e%3cpath%20d='M2.3652,5.20625%20L1.242,5.20625%20L1.242,9.0525%20L2.3544,9.0525%20C2.9484,9.0525%203.3696,8.914375%203.7476,8.60625%20C4.1904,8.245%204.4604,7.6925%204.4604,7.129375%20C4.4604,5.9925%203.5964,5.20625%202.3652,5.20625%20M3.2508,8.09625%20C3.0132,8.30875%202.7,8.39375%202.214,8.39375%20L2.0088,8.39375%20L2.0088,5.854375%20L2.214,5.854375%20C2.7108,5.854375%203.0024,5.939375%203.2616,6.1625%20C3.5208,6.39625%203.672,6.7575%203.672,7.11875%20C3.672,7.490625%203.5208,7.8625%203.2508,8.09625'%20id='Shape'%20fill='%23000105'%3e%3c/path%3e%3crect%20id='Rectangle'%20fill='%23000105'%20x='4.8168'%20y='5.20625'%20width='1'%20height='3.84625'%3e%3c/rect%3e%3cpath%20d='M7.4412,6.6725%20C6.9768,6.513125%206.8472,6.39625%206.8472,6.194375%20C6.8472,5.95%207.0848,5.769375%207.4196,5.769375%20C7.6464,5.769375%207.8408,5.865%208.0352,6.0775%20L8.424,5.5675%20C8.1,5.280625%207.7004,5.1425%207.2792,5.1425%20C6.588,5.1425%206.0588,5.61%206.0588,6.2475%20C6.0588,6.77875%206.3072,7.044375%207.02,7.299375%20C7.3224,7.405625%207.4736,7.469375%207.5492,7.5225%20C7.7004,7.6075%207.776,7.745625%207.776,7.915625%20C7.776,8.22375%207.5276,8.4575%207.182,8.4575%20C6.8148,8.4575%206.5232,8.276875%206.3504,7.9475%20L5.8644,8.404375%20C6.21,8.914375%206.6312,9.1375%207.2144,9.1375%20C8.0028,9.1375%208.5644,8.616875%208.5644,7.873125%20C8.5644,7.2675%208.3052,6.99125%207.4412,6.6725'%20id='Path'%20fill='%23000105'%3e%3c/path%3e%3cpath%20d='M8.802,7.129375%20C8.802,8.255625%209.7092,9.1375%2010.8648,9.1375%20C11.1888,9.1375%2011.4696,9.07375%2011.826,8.914375%20L11.826,8.0325%20C11.5236,8.33%2011.2536,8.4575%2010.908,8.4575%20C10.1412,8.4575%209.5904,7.905%209.5904,7.129375%20C9.5904,6.385625%2010.152,5.811875%2010.8648,5.811875%20C11.232,5.811875%2011.502,5.939375%2011.826,6.2475%20L11.826,5.355%20C11.4912,5.185%2011.2212,5.12125%2010.8864,5.12125%20C9.7308,5.110625%208.802,6.01375%208.802,7.129375'%20id='Path'%20fill='%23000105'%3e%3c/path%3e%3cpolygon%20id='Path'%20fill='%23000105'%20points='17.874%207.788125%2016.8264%205.20625%2015.9948%205.20625%2017.658%209.148125%2018.0684%209.148125%2019.7532%205.20625%2018.9216%205.20625'%3e%3c/polygon%3e%3cpolygon%20id='Path'%20fill='%23000105'%20points='20.0988%209.0525%2022.2588%209.0525%2022.2588%208.39375%2020.8548%208.39375%2020.8548%207.363125%2022.2048%207.363125%2022.2048%206.704375%2020.8548%206.704375%2020.8548%205.854375%2022.2588%205.854375%2022.2588%205.20625%2020.0988%205.20625'%3e%3c/polygon%3e%3cpath%20d='M25.2828,6.3325%20C25.2828,5.61%2024.7752,5.195625%2023.9004,5.195625%20L22.7664,5.195625%20L22.7664,9.041875%20L23.5332,9.041875%20L23.5332,7.50125%20L23.6304,7.50125%20L24.6888,9.041875%20L25.6284,9.041875%20L24.3972,7.426875%20C24.9588,7.31%2025.2828,6.9275%2025.2828,6.3325%20M23.7492,6.97%20L23.5224,6.97%20L23.5224,5.80125%20L23.76,5.80125%20C24.2352,5.80125%2024.4944,5.9925%2024.4944,6.375%20C24.4944,6.768125%2024.2352,6.97%2023.7492,6.97'%20id='Shape'%20fill='%23000105'%3e%3c/path%3e%3cpath%20d='M16.2216,7.129375%20C16.2216,8.255625%2015.2928,9.169375%2014.148,9.169375%20C13.0032,9.169375%2012.0744,8.255625%2012.0744,7.129375%20C12.0744,6.003125%2013.0032,5.089375%2014.148,5.089375%20C15.2928,5.07875%2016.2216,6.003125%2016.2216,7.129375'%20id='Path'%20fill='%23F68C1E'%3e%3c/path%3e%3cpath%20d='M25.6824,5.282375%20C25.6824,5.217575%2025.6392,5.174375%2025.5528,5.174375%20L25.4448,5.174375%20L25.4448,5.519975%20L25.5312,5.519975%20L25.5312,5.379575%20L25.6284,5.509175%20L25.7256,5.509175%20L25.6176,5.368775%20C25.6608,5.357975%2025.6824,5.325575%2025.6824,5.282375'%20id='Shape'%20fill='%23231F20'%3e%3c/path%3e%3cpath%20d='M25.5744,5.046875%20C25.4124,5.046875%2025.272,5.176475%2025.272,5.349275%20C25.272,5.511275%2025.4016,5.651675%2025.5744,5.651675%20C25.7364,5.651675%2025.866,5.522075%2025.866,5.349275%20C25.866,5.187275%2025.7364,5.046875%2025.5744,5.046875%20M25.5744,5.597675%20C25.4448,5.597675%2025.3368,5.489675%2025.3368,5.349275%20C25.3368,5.208875%2025.4448,5.100875%2025.5744,5.100875%20C25.704,5.100875%2025.812,5.208875%2025.812,5.349275%20C25.812,5.478875%2025.704,5.597675%2025.5744,5.597675'%20id='Shape'%20fill='%23231F20'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3crect%20id='Rectangle-export'%20x='0'%20y='0'%20width='27'%20height='18'%3e%3c/rect%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", fr = { class: "click2pay-logo" }, pr = {
|
|
3633
|
+
})(yr ||= {});
|
|
3634
|
+
// src/assets/click2pay/mastercard.svg
|
|
3635
|
+
var br = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='28px'%20height='20px'%20viewBox='0%200%2028%2020'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eMC%3c/title%3e%3cg%20id='Page-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Click-to-Pay-Styles-for-UI-Display'%20transform='translate(-3824.000000,%20-619.000000)'%3e%3cg%20id='button_dark_v3.1_178x32'%20transform='translate(3776.000000,%20612.000000)'%3e%3cg%20id='v4_mark_light_S_15px'%20transform='translate(14.500000,%207.500000)'%3e%3cg%20id='MC'%20transform='translate(34.000000,%200.000000)'%3e%3cg%20id='Group'%20transform='translate(0.000000,%200.500000)'%20fill-rule='nonzero'%3e%3cg%20id='mc_symbol'%3e%3crect%20id='Rectangle'%20fill='%23FF5F00'%20x='9.54692308'%20y='1.89561644'%20width='7.99846152'%20height='13.1831507'%3e%3c/rect%3e%3cpath%20d='M10.3707692,8.48835615%20C10.3687609,5.9162332%2011.5388328,3.4860197%2013.5438461,1.8979452%20C10.1376439,-0.803412601%205.24620091,-0.409936474%202.30709182,2.80184914%20C-0.632017274,6.01363474%20-0.632017274,10.9654063%202.30709182,14.1771919%20C5.24620091,17.3889776%2010.1376439,17.7824537%2013.5438461,15.0810959%20C11.5381947,13.4925171%2010.3680514,11.0612963%2010.3707692,8.48835615%20Z'%20id='Path'%20fill='%23EB001B'%3e%3c/path%3e%3cpolygon%20id='Path'%20fill='%23F79E1B'%20points='26.037982%2013.7760322%2026.037982%2013.4940046%2026.1523888%2013.4940046%2026.1523888%2013.447%2025.8778125%2013.447%2025.8778125%2013.4940046%2025.9922193%2013.4940046%2025.9922193%2013.7760322'%3e%3c/polygon%3e%3cpolygon%20id='Path'%20fill='%23F79E1B'%20points='26.5645392%2013.447%2026.4730138%2013.447%2026.3814883%2013.682023%2026.2899629%2013.447%2026.1984375%2013.447%2026.1984375%2013.7760322%2026.2670816%2013.7760322%2026.2670816%2013.5175069%2026.3431635%2013.7290277%2026.4272511%2013.7290277%2026.5008388%2013.5175069%2026.5008388%2013.7760322%2026.5645392%2013.7760322'%3e%3c/polygon%3e%3cpath%20d='M26.9861539,8.48835615%20C26.9861539,11.6981845%2025.1698664,14.6262062%2022.3088666,16.0288794%20C19.4478669,17.4315526%2016.0443669,17.0626193%2013.5438461,15.0787671%20C15.5479847,13.4893444%2016.7181446,11.059454%2016.7181446,8.48719178%20C16.7181446,5.9149296%2015.5479847,3.48503916%2013.5438461,1.89561644%20C16.0443669,-0.0882357813%2019.4478669,-0.45716899%2022.3088666,0.945504164%20C25.1698664,2.34817732%2026.9861539,5.27619909%2026.9861539,8.4860274%20L26.9861539,8.48835615%20Z'%20id='Path'%20fill='%23F79E1B'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3crect%20id='Rectangle-export'%20x='0'%20y='0'%20width='27'%20height='18'%3e%3c/rect%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", xr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='30px'%20height='19px'%20viewBox='0%200%2030%2019'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eVisa-dark%3c/title%3e%3cg%20id='Page-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Click-to-Pay-Styles-for-UI-Display'%20transform='translate(-3857.000000,%20-659.000000)'%3e%3cg%20id='button_dark_v3.1_178x32'%20transform='translate(3776.000000,%20612.000000)'%3e%3cg%20id='v4_mark_light_S_15px'%20transform='translate(14.500000,%207.500000)'%3e%3cg%20id='Visa-dark'%20transform='translate(67.000000,%2040.000000)'%3e%3cg%20id='Group'%20transform='translate(0.000000,%204.500000)'%20fill='%231A1F71'%20fill-rule='nonzero'%3e%3cg%20id='Visa-Brand-Mark-Blue'%3e%3cpath%20d='M10.9839171,0.218028169%20L7.20456221,8.77056338%20L4.73889401,8.77056338%20L2.87995392,1.94450704%20C2.76635945,1.52366197%202.66880184,1.37028169%202.32534562,1.1928169%20C1.76539171,0.903802817%200.839262673,0.633802817%200.0240552995,0.465211268%20L0.0801843318,0.216760563%20L4.04930876,0.216760563%20C4.55447005,0.216760563%205.01018433,0.536197183%205.12511521,1.08887324%20L6.10737327,6.03887324%20L8.53428571,0.218028169%20L10.9839171,0.218028169%20Z%20M20.6447926,5.97802817%20C20.6541475,3.72042254%2017.3532258,3.59619718%2017.3759447,2.5884507%20C17.3826267,2.28169014%2017.6913364,1.95591549%2018.3648848,1.87225352%20C18.6989862,1.83042254%2019.6197696,1.79873239%2020.6648387,2.25507042%20L21.0737788,0.441126761%20C20.5124885,0.247183099%2019.7908295,0.0621126761%2018.8914286,0.0621126761%20C16.586129,0.0621126761%2014.9637327,1.22450704%2014.9490323,2.89014085%20C14.9343318,4.12098592%2016.1076959,4.80802817%2016.9910599,5.21746479%20C17.8998157,5.63704225%2018.2045161,5.90577465%2018.2005069,6.27971831%20C18.1951613,6.85394366%2017.4761751,7.10619718%2016.8052995,7.11633803%20C15.6319355,7.13408451%2014.9517051,6.81591549%2014.4091244,6.57633803%20L13.9868203,8.44985915%20C14.5320737,8.68690141%2015.5370507,8.89352113%2016.5807834,8.90366197%20C19.034424,8.90366197%2020.6367742,7.75521127%2020.6447926,5.97802817%20L20.6447926,5.97802817%20Z%20M26.7321198,8.77056338%20L28.8890783,8.77056338%20L27.0060829,0.218028169%20L25.0148387,0.218028169%20C24.5671429,0.218028169%2024.1902765,0.465211268%2024.0218894,0.845492958%20L20.5231797,8.77056338%20L22.9728111,8.77056338%20L23.4592627,7.4928169%20L26.4514747,7.4928169%20L26.7321198,8.77056338%20Z%20M24.1301382,5.73971831%20L25.3582949,2.52760563%20L26.0652535,5.73971831%20L24.1301382,5.73971831%20Z%20M14.3169124,0.218028169%20L12.3884793,8.77056338%20L10.0564516,8.77056338%20L11.9862212,0.218028169%20L14.3169124,0.218028169%20Z'%20id='Shape'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3crect%20id='Rectangle-export'%20x='0'%20y='0'%20width='29'%20height='18'%3e%3c/rect%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Sr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='19px'%20height='19px'%20viewBox='0%200%2019%2019'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eAMEX%3c/title%3e%3cg%20id='Page-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Click-to-Pay-Styles-for-UI-Display'%20transform='translate(-3890.000000,%20-619.000000)'%3e%3cg%20id='button_dark_v3.1_178x32'%20transform='translate(3776.000000,%20612.000000)'%3e%3cg%20id='v4_mark_light_S_15px'%20transform='translate(14.500000,%207.500000)'%3e%3cg%20id='AMEX'%20transform='translate(100.000000,%200.000000)'%3e%3cg%20id='Group'%20fill-rule='nonzero'%3e%3cg%20id='Amex-500x500@1x'%3e%3crect%20id='Rectangle'%20fill='%23FFFFFF'%20x='0'%20y='0'%20width='18'%20height='18'%3e%3c/rect%3e%3cpath%20d='M0,0%20L0,18%20L18,18%20L18,15.147828%20L15.828444,15.147828%20L14.710428,13.911588%20L13.58676,15.147828%20L6.426972,15.147828%20L6.426972,9.386172%20L4.116096,9.386172%20L6.982488,2.89926%20L9.746856,2.89926%20L10.733652,5.121576%20L10.733652,2.89926%20L14.155416,2.89926%20L14.749524,4.573872%20L15.34752,2.89926%20L18,2.89926%20L18,0%20L0,0%20Z%20M15.884244,3.620664%20L14.754384,6.758172%20L13.631796,3.620664%20L11.480112,3.620664%20L11.480112,8.658072%20L12.840192,8.658072%20L12.840192,5.131872%20L14.135616,8.658072%20L15.344496,8.658072%20L16.639812,5.1246%20L16.639812,8.658072%20L18,8.658072%20L18,3.620664%20L15.884244,3.620664%20Z%20M7.486272,3.620664%20L5.262516,8.658072%20L6.77376,8.658072%20L7.191216,7.650576%20L9.508356,7.650576%20L9.93294,8.658072%20L11.480112,8.658072%20L9.256608,3.620664%20L7.486272,3.620664%20Z%20M8.349804,4.87278%20L9.03348,6.520716%20L7.666092,6.520716%20L8.349804,4.87278%20Z%20M16.222968,9.389052%20L14.747796,11.00106%20L13.286808,9.389052%20L11.480616,9.389052%20L13.855356,11.907792%20L11.480616,14.426496%20L13.236516,14.426496%20L14.71896,12.800088%20L16.19424,14.426496%20L18,14.426496%20L15.611328,11.893356%20L18,9.389052%20L16.222968,9.389052%20Z%20M7.191576,9.389052%20L7.191576,14.426496%20L11.480508,14.426496%20L11.480508,13.260672%20L8.566128,13.260672%20L8.566128,12.476268%20L11.40858,12.476268%20L11.40858,11.339172%20L8.566128,11.339172%20L8.566128,10.554912%20L11.480508,10.554912%20L11.480508,9.389052%20L7.191576,9.389052%20Z%20M16.6167,11.89548%20L18,13.367124%20L18,10.436112%20L16.6167,11.89548%20Z'%20id='500x500'%20fill='%23006FCF'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3crect%20id='Rectangle-export'%20x='0'%20y='0'%20width='18'%20height='18'%3e%3c/rect%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Cr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='28px'%20height='20px'%20viewBox='0%200%2028%2020'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eDiscover%3c/title%3e%3cg%20id='Page-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Click-to-Pay-Styles-for-UI-Display'%20transform='translate(-3913.000000,%20-619.000000)'%3e%3cg%20id='button_dark_v3.1_178x32'%20transform='translate(3776.000000,%20612.000000)'%3e%3cg%20id='v4_mark_light_S_15px'%20transform='translate(14.500000,%207.500000)'%3e%3cg%20id='Discover'%20transform='translate(123.000000,%200.000000)'%3e%3cg%20id='Group'%20transform='translate(0.000000,%200.500000)'%20fill-rule='nonzero'%3e%3cg%20id='Discover_26x16'%3e%3crect%20id='Rectangle'%20fill='%23FFFFFF'%20x='0'%20y='0'%20width='27'%20height='17'%3e%3c/rect%3e%3cpath%20d='M26.8272,9.445625%20C26.8272,9.445625%2019.494,14.535%206.0696,16.80875%20L26.8272,16.80875%20L26.8272,9.445625%20Z'%20id='Path'%20fill='%23F68C1E'%3e%3c/path%3e%3cpath%20d='M26.9028389,0%20L0,0%20L0,17%20L27,17%20L27,0%20L26.9028389,0%20Z%20M26.8056777,0.19125%20L26.8056777,16.80875%20L0.194322271,16.80875%20C0.194322271,16.6175%200.194322271,0.3825%200.194322271,0.19125%20C0.388644542,0.19125%2026.6113555,0.19125%2026.8056777,0.19125'%20id='Shape'%20fill='%23000105'%3e%3c/path%3e%3cpath%20d='M2.3652,5.20625%20L1.242,5.20625%20L1.242,9.0525%20L2.3544,9.0525%20C2.9484,9.0525%203.3696,8.914375%203.7476,8.60625%20C4.1904,8.245%204.4604,7.6925%204.4604,7.129375%20C4.4604,5.9925%203.5964,5.20625%202.3652,5.20625%20M3.2508,8.09625%20C3.0132,8.30875%202.7,8.39375%202.214,8.39375%20L2.0088,8.39375%20L2.0088,5.854375%20L2.214,5.854375%20C2.7108,5.854375%203.0024,5.939375%203.2616,6.1625%20C3.5208,6.39625%203.672,6.7575%203.672,7.11875%20C3.672,7.490625%203.5208,7.8625%203.2508,8.09625'%20id='Shape'%20fill='%23000105'%3e%3c/path%3e%3crect%20id='Rectangle'%20fill='%23000105'%20x='4.8168'%20y='5.20625'%20width='1'%20height='3.84625'%3e%3c/rect%3e%3cpath%20d='M7.4412,6.6725%20C6.9768,6.513125%206.8472,6.39625%206.8472,6.194375%20C6.8472,5.95%207.0848,5.769375%207.4196,5.769375%20C7.6464,5.769375%207.8408,5.865%208.0352,6.0775%20L8.424,5.5675%20C8.1,5.280625%207.7004,5.1425%207.2792,5.1425%20C6.588,5.1425%206.0588,5.61%206.0588,6.2475%20C6.0588,6.77875%206.3072,7.044375%207.02,7.299375%20C7.3224,7.405625%207.4736,7.469375%207.5492,7.5225%20C7.7004,7.6075%207.776,7.745625%207.776,7.915625%20C7.776,8.22375%207.5276,8.4575%207.182,8.4575%20C6.8148,8.4575%206.5232,8.276875%206.3504,7.9475%20L5.8644,8.404375%20C6.21,8.914375%206.6312,9.1375%207.2144,9.1375%20C8.0028,9.1375%208.5644,8.616875%208.5644,7.873125%20C8.5644,7.2675%208.3052,6.99125%207.4412,6.6725'%20id='Path'%20fill='%23000105'%3e%3c/path%3e%3cpath%20d='M8.802,7.129375%20C8.802,8.255625%209.7092,9.1375%2010.8648,9.1375%20C11.1888,9.1375%2011.4696,9.07375%2011.826,8.914375%20L11.826,8.0325%20C11.5236,8.33%2011.2536,8.4575%2010.908,8.4575%20C10.1412,8.4575%209.5904,7.905%209.5904,7.129375%20C9.5904,6.385625%2010.152,5.811875%2010.8648,5.811875%20C11.232,5.811875%2011.502,5.939375%2011.826,6.2475%20L11.826,5.355%20C11.4912,5.185%2011.2212,5.12125%2010.8864,5.12125%20C9.7308,5.110625%208.802,6.01375%208.802,7.129375'%20id='Path'%20fill='%23000105'%3e%3c/path%3e%3cpolygon%20id='Path'%20fill='%23000105'%20points='17.874%207.788125%2016.8264%205.20625%2015.9948%205.20625%2017.658%209.148125%2018.0684%209.148125%2019.7532%205.20625%2018.9216%205.20625'%3e%3c/polygon%3e%3cpolygon%20id='Path'%20fill='%23000105'%20points='20.0988%209.0525%2022.2588%209.0525%2022.2588%208.39375%2020.8548%208.39375%2020.8548%207.363125%2022.2048%207.363125%2022.2048%206.704375%2020.8548%206.704375%2020.8548%205.854375%2022.2588%205.854375%2022.2588%205.20625%2020.0988%205.20625'%3e%3c/polygon%3e%3cpath%20d='M25.2828,6.3325%20C25.2828,5.61%2024.7752,5.195625%2023.9004,5.195625%20L22.7664,5.195625%20L22.7664,9.041875%20L23.5332,9.041875%20L23.5332,7.50125%20L23.6304,7.50125%20L24.6888,9.041875%20L25.6284,9.041875%20L24.3972,7.426875%20C24.9588,7.31%2025.2828,6.9275%2025.2828,6.3325%20M23.7492,6.97%20L23.5224,6.97%20L23.5224,5.80125%20L23.76,5.80125%20C24.2352,5.80125%2024.4944,5.9925%2024.4944,6.375%20C24.4944,6.768125%2024.2352,6.97%2023.7492,6.97'%20id='Shape'%20fill='%23000105'%3e%3c/path%3e%3cpath%20d='M16.2216,7.129375%20C16.2216,8.255625%2015.2928,9.169375%2014.148,9.169375%20C13.0032,9.169375%2012.0744,8.255625%2012.0744,7.129375%20C12.0744,6.003125%2013.0032,5.089375%2014.148,5.089375%20C15.2928,5.07875%2016.2216,6.003125%2016.2216,7.129375'%20id='Path'%20fill='%23F68C1E'%3e%3c/path%3e%3cpath%20d='M25.6824,5.282375%20C25.6824,5.217575%2025.6392,5.174375%2025.5528,5.174375%20L25.4448,5.174375%20L25.4448,5.519975%20L25.5312,5.519975%20L25.5312,5.379575%20L25.6284,5.509175%20L25.7256,5.509175%20L25.6176,5.368775%20C25.6608,5.357975%2025.6824,5.325575%2025.6824,5.282375'%20id='Shape'%20fill='%23231F20'%3e%3c/path%3e%3cpath%20d='M25.5744,5.046875%20C25.4124,5.046875%2025.272,5.176475%2025.272,5.349275%20C25.272,5.511275%2025.4016,5.651675%2025.5744,5.651675%20C25.7364,5.651675%2025.866,5.522075%2025.866,5.349275%20C25.866,5.187275%2025.7364,5.046875%2025.5744,5.046875%20M25.5744,5.597675%20C25.4448,5.597675%2025.3368,5.489675%2025.3368,5.349275%20C25.3368,5.208875%2025.4448,5.100875%2025.5744,5.100875%20C25.704,5.100875%2025.812,5.208875%2025.812,5.349275%20C25.812,5.478875%2025.704,5.597675%2025.5744,5.597675'%20id='Shape'%20fill='%23231F20'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3crect%20id='Rectangle-export'%20x='0'%20y='0'%20width='27'%20height='18'%3e%3c/rect%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", wr = { class: "click2pay-logo" }, Tr = {
|
|
3558
3636
|
key: 0,
|
|
3559
|
-
src:
|
|
3637
|
+
src: br,
|
|
3560
3638
|
alt: "MasterCard"
|
|
3561
|
-
},
|
|
3639
|
+
}, Er = {
|
|
3562
3640
|
key: 1,
|
|
3563
|
-
src:
|
|
3641
|
+
src: xr,
|
|
3564
3642
|
alt: "Visa"
|
|
3565
|
-
},
|
|
3643
|
+
}, Dr = {
|
|
3566
3644
|
key: 2,
|
|
3567
|
-
src:
|
|
3645
|
+
src: Sr,
|
|
3568
3646
|
alt: "American Express"
|
|
3569
|
-
},
|
|
3647
|
+
}, Or = {
|
|
3570
3648
|
key: 3,
|
|
3571
|
-
src:
|
|
3649
|
+
src: Cr,
|
|
3572
3650
|
alt: "Discover"
|
|
3573
|
-
},
|
|
3651
|
+
}, kr = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
3574
3652
|
__name: "ClickToPayLogo",
|
|
3575
3653
|
props: { options: {} },
|
|
3576
3654
|
setup(e) {
|
|
3577
|
-
let t = e, n = p(t.options.cardBrands ||
|
|
3655
|
+
let t = e, n = p(t.options.cardBrands || vr);
|
|
3578
3656
|
return y(() => t, () => {
|
|
3579
3657
|
n.value = t.options.cardBrands || [];
|
|
3580
3658
|
}, {
|
|
3581
3659
|
flush: "post",
|
|
3582
3660
|
deep: !0
|
|
3583
|
-
}), (e, t) => (b(),
|
|
3584
|
-
t[0] ||=
|
|
3661
|
+
}), (e, t) => (b(), j("div", wr, [
|
|
3662
|
+
t[0] ||= A("img", {
|
|
3585
3663
|
src: "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3csvg%20viewBox='0%204.1942%20233.76%20118.7958'%20width='233.76'%20height='118.7958'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='%23000000'%20d='%20M%200.00%20103.74%20L%200.00%2023.26%20Q%202.71%209.47%2014.47%205.49%20Q%2018.21%204.22%2025.63%204.29%20Q%2036.12%204.39%2046.57%204.28%20Q%2049.98%204.25%2051.32%204.95%20C%2054.47%206.62%2054.71%2012.27%2051.60%2014.18%20Q%2050.30%2014.99%2047.25%2015.02%20Q%2035.25%2015.14%2023.26%2015.04%20Q%2014.82%2014.97%2012.04%2021.22%20Q%2010.75%2024.12%2010.75%2032.47%20Q%2010.77%2064.65%2010.78%2096.84%20C%2010.79%20108.05%2013.62%20112.09%2024.83%20112.11%20Q%2044.80%20112.15%2064.75%20112.07%20C%2068.72%20112.05%2071.55%20109.52%2074.24%20106.26%20Q%2091.06%2085.85%20108.91%2064.44%20A%200.86%200.86%200.0%200%200%20108.91%2063.34%20Q%2088.54%2038.50%2067.91%2013.34%20C%2065.75%2010.71%2065.99%207.28%2068.57%205.40%20Q%2070.05%204.32%2073.59%204.32%20Q%2088.43%204.31%20103.25%204.33%20Q%20105.90%204.33%20107.17%205.80%20Q%20130.58%2032.79%20153.94%2059.81%20C%20156.70%2063.00%20155.25%2065.90%20152.73%2068.88%20Q%20134.57%2090.29%20116.24%20111.71%20A%200.35%200.35%200.0%200%200%20116.51%20112.29%20L%20132.44%20112.24%20A%201.43%201.43%200.0%200%200%20133.55%20111.71%20L%20172.96%2063.93%20A%200.83%200.83%200.0%200%200%20172.96%2062.87%20Q%20152.96%2038.50%20132.93%2014.07%20Q%20131.33%2012.10%20131.02%2010.69%20C%20130.23%207.08%20133.94%203.44%20137.37%204.33%20Q%20139.27%204.83%20141.51%207.48%20Q%20163.74%2033.77%20186.06%2059.98%20Q%20189.13%2063.58%20185.65%2067.66%20Q%20162.44%2094.91%20139.34%20121.71%20A%203.12%203.10%2020.2%200%201%20137.01%20122.78%20Q%20120.84%20122.82%20104.23%20122.76%20C%2097.72%20122.74%2097.24%20117.14%20100.66%20112.96%20Q%20120.69%2088.51%20140.71%2064.30%20A%200.99%200.99%200.0%200%200%20140.71%2063.04%20L%20101.46%2015.56%20A%201.23%201.23%200.0%200%200%20100.51%2015.11%20L%2084.28%2015.01%20A%200.39%200.39%200.0%200%200%2083.98%2015.65%20Q%20102.93%2037.75%20121.70%2059.56%20C%20125.42%2063.89%20122.26%2066.94%20118.90%2070.92%20Q%2099.67%2093.66%2080.30%20116.30%20Q%2077.34%20119.77%2072.30%20121.55%20Q%2068.93%20122.74%2063.06%20122.75%20Q%2042.72%20122.77%2022.39%20122.77%20C%2010.50%20122.77%202.31%20115.51%200.00%20103.74%20Z'%20transform='matrix(1,%200,%200,%201,%20-3.552713678800501e-15,%200)'/%3e%3crect%20fill='%23000000'%20x='228.78'%20y='4.23'%20width='4.98'%20height='118.76'%20rx='2.41'%20transform='matrix(1,%200,%200,%201,%20-3.552713678800501e-15,%200)'/%3e%3c/svg%3e",
|
|
3586
3664
|
alt: "Click To Pay"
|
|
3587
3665
|
}, null, -1),
|
|
3588
|
-
n.value.includes(g(X).mastercard) ? (b(),
|
|
3589
|
-
n.value.includes(g(X).visa) ? (b(),
|
|
3590
|
-
n.value.includes(g(X).amex) ? (b(),
|
|
3591
|
-
n.value.includes(g(X).discover) ? (b(),
|
|
3666
|
+
n.value.includes(g(X).mastercard) ? (b(), j("img", Tr)) : T("", !0),
|
|
3667
|
+
n.value.includes(g(X).visa) ? (b(), j("img", Er)) : T("", !0),
|
|
3668
|
+
n.value.includes(g(X).amex) ? (b(), j("img", Dr)) : T("", !0),
|
|
3669
|
+
n.value.includes(g(X).discover) ? (b(), j("img", Or)) : T("", !0)
|
|
3592
3670
|
]));
|
|
3593
3671
|
}
|
|
3594
|
-
}), [["__scopeId", "data-v-cb006d2b"]]),
|
|
3672
|
+
}), [["__scopeId", "data-v-cb006d2b"]]), Ar = { style: {
|
|
3595
3673
|
display: "flex",
|
|
3596
3674
|
gap: "20px"
|
|
3597
|
-
} },
|
|
3675
|
+
} }, jr = { class: "payfurl-form" }, Mr = { class: "container-form" }, Nr = { class: "row" }, Pr = { style: { width: "100%" } }, Fr = {
|
|
3598
3676
|
key: 0,
|
|
3599
3677
|
class: "error"
|
|
3600
|
-
},
|
|
3678
|
+
}, Ir = { class: "row" }, Lr = { style: { width: "100%" } }, Rr = {
|
|
3601
3679
|
key: 0,
|
|
3602
3680
|
class: "error"
|
|
3603
|
-
},
|
|
3681
|
+
}, zr = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
3604
3682
|
__name: "LoginForm",
|
|
3605
3683
|
props: {
|
|
3606
3684
|
log: { type: Function },
|
|
@@ -3614,7 +3692,7 @@ var cr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csv
|
|
|
3614
3692
|
setup(e, { emit: t }) {
|
|
3615
3693
|
let n = e, r = t, a = p(""), s = p(""), c = p({});
|
|
3616
3694
|
function l() {
|
|
3617
|
-
return c.value = {}, !s.value && !
|
|
3695
|
+
return c.value = {}, !s.value && !Oe(a.value) && (c.value.email = "Please type valid email address"), s.value && !de(s.value) && (c.value.phone = "Please type phone in international format"), Object.keys(c.value).length === 0;
|
|
3618
3696
|
}
|
|
3619
3697
|
function d() {
|
|
3620
3698
|
l() && r("submit", {
|
|
@@ -3628,29 +3706,29 @@ var cr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csv
|
|
|
3628
3706
|
function m() {
|
|
3629
3707
|
r("logout");
|
|
3630
3708
|
}
|
|
3631
|
-
return (e, t) => (b(),
|
|
3709
|
+
return (e, t) => (b(), Be(gn, {
|
|
3632
3710
|
width: "350",
|
|
3633
3711
|
onClose: f
|
|
3634
3712
|
}, {
|
|
3635
|
-
title: S(() => [
|
|
3636
|
-
body: S(() => [
|
|
3713
|
+
title: S(() => [A("div", Ar, [Le(kr, { options: n.options }, null, 8, ["options"]), t[2] ||= o(" Click To Pay Login ", -1)])]),
|
|
3714
|
+
body: S(() => [A("div", jr, [A("div", Mr, [A("div", Nr, [t[3] ||= A("label", null, "Email Address", -1), A("div", Pr, [u(A("input", {
|
|
3637
3715
|
type: "text",
|
|
3638
3716
|
maxlength: "100",
|
|
3639
3717
|
placeholder: "Email Address",
|
|
3640
3718
|
name: "email",
|
|
3641
3719
|
"onUpdate:modelValue": t[0] ||= (e) => a.value = e
|
|
3642
|
-
}, null, 512), [[
|
|
3720
|
+
}, null, 512), [[je, a.value]]), c.value.email ? (b(), j("p", Fr, i(c.value.email), 1)) : T("", !0)])]), A("div", Ir, [t[4] ||= A("label", null, "Phone", -1), A("div", Lr, [u(A("input", {
|
|
3643
3721
|
type: "text",
|
|
3644
3722
|
maxlength: "100",
|
|
3645
3723
|
placeholder: "Phone",
|
|
3646
3724
|
name: "phone",
|
|
3647
3725
|
"onUpdate:modelValue": t[1] ||= (e) => s.value = e
|
|
3648
|
-
}, null, 512), [[
|
|
3649
|
-
footer: S(() => [
|
|
3726
|
+
}, null, 512), [[je, s.value]]), c.value.phone ? (b(), j("p", Rr, i(c.value.phone), 1)) : T("", !0)])])])])]),
|
|
3727
|
+
footer: S(() => [A("div", { class: "payfurl-form payfurl-form-footer" }, [A("button", { onClick: m }, "Continue as Guest"), A("button", { onClick: d }, "Login")])]),
|
|
3650
3728
|
_: 1
|
|
3651
3729
|
}));
|
|
3652
3730
|
}
|
|
3653
|
-
}), [["__scopeId", "data-v-693ba623"]]),
|
|
3731
|
+
}), [["__scopeId", "data-v-693ba623"]]), Br = [
|
|
3654
3732
|
"4761739001010010",
|
|
3655
3733
|
"4005520000000129",
|
|
3656
3734
|
"5413330089010640",
|
|
@@ -3659,9 +3737,9 @@ var cr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csv
|
|
|
3659
3737
|
"4035874000424977",
|
|
3660
3738
|
"5413330089010640"
|
|
3661
3739
|
];
|
|
3662
|
-
function
|
|
3663
|
-
if (t ===
|
|
3664
|
-
switch (
|
|
3740
|
+
function Vr(e, t) {
|
|
3741
|
+
if (t === We.PRODUCTION || !Br.includes(e)) return null;
|
|
3742
|
+
switch (Ne(e)) {
|
|
3665
3743
|
case "visa": return {
|
|
3666
3744
|
cardNumber: "4622943123103732",
|
|
3667
3745
|
expiryDate: "12/25",
|
|
@@ -3679,9 +3757,8 @@ function kr(e, t) {
|
|
|
3679
3757
|
default: return null;
|
|
3680
3758
|
}
|
|
3681
3759
|
}
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
var Ar = "Click to Pay is unavailable. Please proceed with an alternative payment method", jr = {
|
|
3760
|
+
// src/sdk/processors/clickToPayProcessor.ts
|
|
3761
|
+
var Hr = "Click to Pay is unavailable. Please proceed with an alternative payment method", Ur = {
|
|
3685
3762
|
SANDBOX: {
|
|
3686
3763
|
uiKit: "https://src.mastercard.com/srci/integration/components/src-ui-kit/src-ui-kit.esm.js",
|
|
3687
3764
|
uiKitCss: "https://src.mastercard.com/srci/integration/components/src-ui-kit/src-ui-kit.css",
|
|
@@ -3694,7 +3771,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
3694
3771
|
sdk: "https://src.mastercard.com/sdk/srcsdk.mastercard.js",
|
|
3695
3772
|
lib: "https://src.mastercard.com/srci/integration/2/lib.js?srcDpaId={dpaId}&locale=en_AU"
|
|
3696
3773
|
}
|
|
3697
|
-
}, Z = class extends
|
|
3774
|
+
}, Z = class extends K {
|
|
3698
3775
|
enabled = !0;
|
|
3699
3776
|
initialized = !1;
|
|
3700
3777
|
loaded = !1;
|
|
@@ -3722,7 +3799,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
3722
3799
|
startIsRunning = !1;
|
|
3723
3800
|
readyCallbacks = [];
|
|
3724
3801
|
constructor(e, t) {
|
|
3725
|
-
super(e), this.options = t.options || {}, this.container = t.container || document.body, this.environment = t.environment ||
|
|
3802
|
+
super(e), this.options = t.options || {}, this.container = t.container || document.body, this.environment = t.environment || We.DEVELOPMENT;
|
|
3726
3803
|
let n = zt(this.environment);
|
|
3727
3804
|
this.options.networkTokenOptions = {
|
|
3728
3805
|
...n,
|
|
@@ -3796,7 +3873,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
3796
3873
|
else this.log("[setCards] iframe not found");
|
|
3797
3874
|
}
|
|
3798
3875
|
isSchemeSupported(e) {
|
|
3799
|
-
return this.availableCardBrands.includes(
|
|
3876
|
+
return this.availableCardBrands.includes(Ne(e));
|
|
3800
3877
|
}
|
|
3801
3878
|
messageHandler(e) {
|
|
3802
3879
|
e?.data?.status && (e.data.status === "click2pay-remember-me" ? (this.log(`[clickToPayProcessor]: message "${e.data.status}" received`, e.data), this.setRememberMe(!!e.data.message)) : (e.data.status === "click2pay-change-user" && (this.log(`[clickToPayProcessor]: message "${e.data.status}" received`, e.data), this.showChangeUserPopup()), e.data.status === "click2pay-show-learn-more" && (this.log(`[clickToPayProcessor]: message "${e.data.status}" received`, e.data), this.mcShowLearnMore())));
|
|
@@ -3827,9 +3904,9 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
3827
3904
|
return;
|
|
3828
3905
|
}
|
|
3829
3906
|
let t = document.createElement("script");
|
|
3830
|
-
t.src = e, t.onload =
|
|
3907
|
+
t.src = e, t.onload = z(this, "[ClickToPayProcessor]: CheckoutServiceLib loaded", () => {
|
|
3831
3908
|
this.log("[ClickToPayProcessor]: CheckoutServiceLib loaded"), this.mcInitClickToPay();
|
|
3832
|
-
}), t.onerror =
|
|
3909
|
+
}), t.onerror = z(this, "[ClickToPayProcessor]: CheckoutServiceLib error", (t) => {
|
|
3833
3910
|
this.log("[ClickToPayProcessor]: CheckoutServiceLib error", t), this.sendErrorNotification("CheckoutServiceLib error", [e, t]), this.stopUsing();
|
|
3834
3911
|
}), document.head.appendChild(t);
|
|
3835
3912
|
}
|
|
@@ -3888,7 +3965,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
3888
3965
|
let r = document.createElement("div");
|
|
3889
3966
|
r.setAttribute("class", "modal-body"), n.appendChild(r);
|
|
3890
3967
|
let i = this, a = document.createElement("src-learn-more");
|
|
3891
|
-
a.setAttribute("card-brands", (this.options.cardBrands ||
|
|
3968
|
+
a.setAttribute("card-brands", (this.options.cardBrands || vr).join(",")), a.addEventListener("close", function(e) {
|
|
3892
3969
|
i.log("src-learn-more: close", e), i.mcHideLearnMore();
|
|
3893
3970
|
}), a.addEventListener("ok", function(e) {
|
|
3894
3971
|
i.log("src-learn-more: ok", e), i.mcHideLearnMore();
|
|
@@ -3947,9 +4024,9 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
3947
4024
|
mcShowOtpInput(e, t, n) {
|
|
3948
4025
|
this.log("[mcShowOtpInput]", this.requestedValidationChannelId, e, t, n);
|
|
3949
4026
|
let r = this;
|
|
3950
|
-
customElements.whenDefined("src-otp-input").then(
|
|
4027
|
+
customElements.whenDefined("src-otp-input").then(z(this, "[mcShowOtpInput], success", () => {
|
|
3951
4028
|
let i = e.find((e) => e.identityType === "SMS"), a = e.find((e) => e.identityType === "EMAIL"), o = [];
|
|
3952
|
-
|
|
4029
|
+
this.requestedValidationChannelId && this.requestedValidationChannelId !== "EMAIL" || !a || this.requestedValidationChannelId != "EMAIL" && (this.requestedValidationChannelId || t !== "visa") || o.push(a.maskedValidationChannel), (!this.requestedValidationChannelId || this.requestedValidationChannelId === "SMS") && i && o.push(i.maskedValidationChannel), this.log("[src-otp-input], mcShowOtpInput", r.srcOtpInput, e, t, o, n), r.srcOtpInput.loadSupportedValidationChannels?.(e), r.srcOtpInput.setAttribute("network-id", t), r.srcOtpInput.setAttribute("card-brands", t), r.srcOtpInput.setAttribute("masked-identity-value", o.join(",")), n ? r.srcOtpInput.setAttribute("error-reason", n) : r.srcOtpInput.removeAttribute("error-reason"), r.srcOtpInput.style.display = "block", r.adjustRememberMeOnOtpInput(), r.pauseLoadingCardForm();
|
|
3953
4030
|
})).catch((e) => {
|
|
3954
4031
|
this.log("[mcShowOtpInput.whenDefined]", e), this.sendErrorNotification("mcShowOtpInput.whenDefined error", [e]);
|
|
3955
4032
|
});
|
|
@@ -3967,25 +4044,25 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
3967
4044
|
}
|
|
3968
4045
|
mcShowLearnMore() {
|
|
3969
4046
|
this.log("[src-learn-more], mcShowLearnMore", this.srcLearnMore);
|
|
3970
|
-
let e = this.availableCardBrands.length > 0 && this.availableCardBrands ||
|
|
3971
|
-
e.includes(X.mastercard) && (e.splice(e.indexOf(X.mastercard), 1), e.unshift(X.mastercard)), this.srcLearnMoreElement.setAttribute("card-brands", (this.availableCardBrands.length > 0 && this.availableCardBrands ||
|
|
4047
|
+
let e = this.availableCardBrands.length > 0 && this.availableCardBrands || vr;
|
|
4048
|
+
e.includes(X.mastercard) && (e.splice(e.indexOf(X.mastercard), 1), e.unshift(X.mastercard)), this.srcLearnMoreElement.setAttribute("card-brands", (this.availableCardBrands.length > 0 && this.availableCardBrands || vr).join(",")), this.srcLearnMore.style.display = "block";
|
|
3972
4049
|
}
|
|
3973
4050
|
showChangeUserPopup() {
|
|
3974
4051
|
this.showLoginForm();
|
|
3975
4052
|
}
|
|
3976
4053
|
showLoginForm() {
|
|
3977
|
-
let { destroy: e } =
|
|
4054
|
+
let { destroy: e } = E({
|
|
3978
4055
|
el: document.body,
|
|
3979
|
-
component:
|
|
4056
|
+
component: zr,
|
|
3980
4057
|
props: {
|
|
3981
4058
|
log: this.log,
|
|
3982
4059
|
options: this.options
|
|
3983
4060
|
},
|
|
3984
4061
|
on: {
|
|
3985
|
-
close:
|
|
4062
|
+
close: z(this, "[showLoginForm], onclose", () => {
|
|
3986
4063
|
this.log("[LoginForm.close]"), this.stopLoadingCardForm(), e();
|
|
3987
4064
|
}),
|
|
3988
|
-
submit:
|
|
4065
|
+
submit: z(this, "[showLoginForm], onsubmit", ({ email: t, phone: n }) => {
|
|
3989
4066
|
this.log("[LoginForm.submit]", t, n), e(), this.customer || this.setCustomerInfo({
|
|
3990
4067
|
firstName: "",
|
|
3991
4068
|
lastName: "",
|
|
@@ -3993,7 +4070,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
3993
4070
|
phoneNumber: ""
|
|
3994
4071
|
}), this.customer.email = t, this.customer.phoneNumber = n, !t && !n ? this.stopLoadingCardForm() : (this.setCards([]), this.mcIdLookup());
|
|
3995
4072
|
}),
|
|
3996
|
-
logout:
|
|
4073
|
+
logout: z(this, "[showLoginForm], onlogout", () => {
|
|
3997
4074
|
this.log("[LoginForm.logout]"), e(), this.stopLoadingCardForm(), this.setCards([]), this.mcLogout();
|
|
3998
4075
|
})
|
|
3999
4076
|
}
|
|
@@ -4001,10 +4078,10 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4001
4078
|
}
|
|
4002
4079
|
checkoutWithCard(e, t, n) {
|
|
4003
4080
|
this.log("ClickToPayProcessor.checkoutWithExistingCard", e);
|
|
4004
|
-
let r = this, i =
|
|
4081
|
+
let r = this, i = z(this, "[checkoutWithCard.promiseResolvedHandler]", (e) => {
|
|
4005
4082
|
r.log("[checkoutWithCard.promiseResolvedHandler]", e), r.hideModalForm(), t(e);
|
|
4006
|
-
}), a =
|
|
4007
|
-
r.log("[checkoutWithCard.promiseRejectedHandler]", t), r.stopUsing(), r.showInfoMessage(
|
|
4083
|
+
}), a = z(this, "[checkoutWithCard.promiseRejectedHandler]", (t) => {
|
|
4084
|
+
r.log("[checkoutWithCard.promiseRejectedHandler]", t), r.stopUsing(), r.showInfoMessage(Hr), n(t), r.sendErrorNotification("checkoutWithCard error", [
|
|
4008
4085
|
e,
|
|
4009
4086
|
o,
|
|
4010
4087
|
t
|
|
@@ -4021,15 +4098,15 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4021
4098
|
}
|
|
4022
4099
|
checkoutWithNewCard(e, t, n, r, i, a) {
|
|
4023
4100
|
this.log("ClickToPayProcessor.checkoutWithNewCard", {
|
|
4024
|
-
cardNumber:
|
|
4101
|
+
cardNumber: Ge(e),
|
|
4025
4102
|
expiryDate: t,
|
|
4026
4103
|
ccv: "***",
|
|
4027
4104
|
enrollCard: r
|
|
4028
|
-
}), this.tokenAuthenticationEnabled && this.showModalForm(), this.encryptCard(e, t, n,
|
|
4105
|
+
}), this.tokenAuthenticationEnabled && this.showModalForm(), this.encryptCard(e, t, n, z(this, "[mcEncryptCard], success", (e, t) => {
|
|
4029
4106
|
this.checkoutWithEncryptedNewCard(e, t, (e) => {
|
|
4030
4107
|
i(e);
|
|
4031
4108
|
}, a);
|
|
4032
|
-
}),
|
|
4109
|
+
}), z(this, "[mcEncryptCard], error", (n) => {
|
|
4033
4110
|
a(n), this.sendErrorNotification("mcEncryptCard error", [{
|
|
4034
4111
|
cardNumber: e,
|
|
4035
4112
|
expiryDate: t,
|
|
@@ -4038,10 +4115,10 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4038
4115
|
}));
|
|
4039
4116
|
}
|
|
4040
4117
|
checkoutWithEncryptedNewCard(e, t, n, r) {
|
|
4041
|
-
let i = this, a =
|
|
4118
|
+
let i = this, a = z(this, "[checkoutWithNewCard.promiseResolvedHandler]", (e) => {
|
|
4042
4119
|
i.log("[checkoutWithNewCard.promiseResolvedHandler]", e), i.hideModalForm(), e.checkoutActionCode === "SWITCH_CONSUMER" ? i.showLoginForm() : ["CHANGE_CARD", "CANCEL"].includes(e.checkoutActionCode) || n(e);
|
|
4043
|
-
}), o =
|
|
4044
|
-
i.log("[checkoutWithNewCard.promiseRejectedHandler]", e), i.stopUsing(), i.showInfoMessage(
|
|
4120
|
+
}), o = z(this, "[checkoutWithNewCard.promiseRejectedHandler]", (e) => {
|
|
4121
|
+
i.log("[checkoutWithNewCard.promiseRejectedHandler]", e), i.stopUsing(), i.showInfoMessage(Hr), r(e), i.sendErrorNotification("checkoutWithNewCard error", [s, e]);
|
|
4045
4122
|
});
|
|
4046
4123
|
this.showModalForm();
|
|
4047
4124
|
let s = {
|
|
@@ -4054,7 +4131,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4054
4131
|
this.log("checkoutWithNewCard", s), window.mcCheckoutService.checkoutWithNewCard(s).then(a).catch(o);
|
|
4055
4132
|
}
|
|
4056
4133
|
encryptCard(e, t, n, r, i) {
|
|
4057
|
-
let a =
|
|
4134
|
+
let a = Vr(e, this.environment);
|
|
4058
4135
|
this.whenReady().then(() => {
|
|
4059
4136
|
this.mcEncryptCard(a?.cardNumber || e, a?.expiryDate || t, a?.ccv || n, r, i);
|
|
4060
4137
|
}).catch(i);
|
|
@@ -4067,15 +4144,15 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4067
4144
|
this.log("[mcInitClickToPay] mcCheckoutService or sdk not found", window.MastercardCheckoutServices, window.SRCSDK_MASTERCARD), this.stopUsing();
|
|
4068
4145
|
return;
|
|
4069
4146
|
}
|
|
4070
|
-
let e = this, t =
|
|
4147
|
+
let e = this, t = z(this, "[mcInitClickToPay.promiseResolvedHandler]", (t) => {
|
|
4071
4148
|
e.log("[mcInitClickToPay.promiseResolvedHandler]", t), e.updateAvailableCardBrands(t.availableCardBrands), e.loaded = !0, e.resolveReadyCallbacks(), e.localStartCallback && e.localStartCallback();
|
|
4072
|
-
}), n =
|
|
4149
|
+
}), n = z(this, "[mcInitClickToPay.promiseRejectedHandler]", (t) => {
|
|
4073
4150
|
e.log("[mcInitClickToPay.promiseRejectedHandler]", t), e.loaded = !0, e.sendErrorNotification("mcInitClickToPay error", [r, t]), e.stopUsing();
|
|
4074
4151
|
}), r = {
|
|
4075
4152
|
srcDpaId: this.options.dpaId,
|
|
4076
4153
|
dpaData: { dpaName: this.options.dpaName || `TAS-${this.options.dpaId}` },
|
|
4077
4154
|
dpaTransactionOptions: this.generateDpaTransactionOptions(),
|
|
4078
|
-
cardBrands: this.options?.cardBrands?.length ? this.options?.cardBrands :
|
|
4155
|
+
cardBrands: this.options?.cardBrands?.length ? this.options?.cardBrands : vr,
|
|
4079
4156
|
checkoutExperience: "WITHIN_CHECKOUT"
|
|
4080
4157
|
}, i = this.getRecognitionToken();
|
|
4081
4158
|
i && (r.recognitionToken = i), this.log("[mcInitClickToPay]", r), window.mcCheckoutService.init(r).then(t).catch(n);
|
|
@@ -4086,11 +4163,11 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4086
4163
|
return;
|
|
4087
4164
|
}
|
|
4088
4165
|
this.customer?.email || (e = !0);
|
|
4089
|
-
let t = this, n =
|
|
4166
|
+
let t = this, n = z(this, "[mcIdLookup.promiseResolvedHandler]", (n) => {
|
|
4090
4167
|
t.log("[mcIdLookup.promiseResolvedHandler]", n), n.consumerPresent ? t.mcInitiateValidation() : !n.consumerPresent && !e && t.customer?.phoneNumber ? t.mcIdLookup(!0) : t.stopLoadingCardForm();
|
|
4091
|
-
}), r =
|
|
4168
|
+
}), r = z(this, "[mcIdLookup.promiseRejectedHandler]", (e) => {
|
|
4092
4169
|
t.log("[mcIdLookup.promiseRejectedHandler]", e), t.stopLoadingCardForm(), t.sendErrorNotification("mcIdLookup error", [a, e]), t.stopUsing();
|
|
4093
|
-
}), i =
|
|
4170
|
+
}), i = Ue(this.customer?.phoneNumber || ""), a = e ? { mobileNumber: {
|
|
4094
4171
|
phoneNumber: i[1] || "",
|
|
4095
4172
|
countryCode: i[0] || "61"
|
|
4096
4173
|
} } : { email: this.customer?.email };
|
|
@@ -4100,7 +4177,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4100
4177
|
this.log("[mcInitiateValidation]", e);
|
|
4101
4178
|
let t = this;
|
|
4102
4179
|
this.requestedValidationChannelId = e || "";
|
|
4103
|
-
let n =
|
|
4180
|
+
let n = z(this, "[mcInitiateValidation.promiseResolvedHandler]", (e) => {
|
|
4104
4181
|
t.log("[mcInitiateValidation.promiseResolvedHandler]", e), t.supportedValidationChannels = e.supportedValidationChannels, t.validationChannelsNetwork = e.network, e.maskedValidationChannel && (!t.supportedValidationChannels || t.supportedValidationChannels.length === 0) && (t.supportedValidationChannels = [], (e.maskedValidationChannel.split(",") || []).forEach((e) => {
|
|
4105
4182
|
t.supportedValidationChannels.push({
|
|
4106
4183
|
maskedValidationChannel: e,
|
|
@@ -4108,16 +4185,16 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4108
4185
|
validationChannelId: e.includes("@") ? "EMAIL" : "SMS"
|
|
4109
4186
|
});
|
|
4110
4187
|
})), t.mcShowOtpInput(t.supportedValidationChannels, e.network);
|
|
4111
|
-
}), r =
|
|
4188
|
+
}), r = z(this, "[mcInitiateValidation.promiseRejectedHandler]", (n) => {
|
|
4112
4189
|
t.log("[mcInitiateValidation.promiseRejectedHandler]", n), t.stopUsing(), t.sendErrorNotification("mcInitiateValidation error", [{ requestedValidationChannelId: e }, n]);
|
|
4113
4190
|
});
|
|
4114
4191
|
this.log("[mcInitiateValidation]", e ? { requestedValidationChannelId: e } : null), window.mcCheckoutService.initiateValidation(e ? { requestedValidationChannelId: e } : void 0).then(n).catch(r);
|
|
4115
4192
|
}
|
|
4116
4193
|
mcValidate(e) {
|
|
4117
|
-
let t = this, n =
|
|
4194
|
+
let t = this, n = z(this, "[mcValidate.promiseResolvedHandler]", (e) => {
|
|
4118
4195
|
t.log("[mcValidate.promiseResolvedHandler]", e), e.cards ? (t.setCards(e.cards), t.stopLoadingCardForm()) : t.mcGetCards(), t.saveRecognitionToken(e.recognitionToken);
|
|
4119
|
-
}), r =
|
|
4120
|
-
t.log("[mcValidate.promiseRejectedHandler]", e), t.sendErrorNotification("mcValidate error", [i, e]), t.attempts++, t.attempts > 2 || !e?.reason || e.reason == "REQUEST_TIMEOUT" ? (t.stopLoadingCardForm(), t.showMessage("Too many attempts to access your click to pay profile. Please check out as a guest.")) : e.reason === "CODE_INVALID" || e.reason === "RETRIES_EXCEEDED" || e.reason === "ACCT_INACCESSIBLE" || e.reason === "CODE_EXPIRED" ? t.mcShowOtpInput(t.supportedValidationChannels, t.validationChannelsNetwork, e.reason) : (t.stopUsing(), t.showInfoMessage(
|
|
4196
|
+
}), r = z(this, "[mcValidate.promiseRejectedHandler]", (e) => {
|
|
4197
|
+
t.log("[mcValidate.promiseRejectedHandler]", e), t.sendErrorNotification("mcValidate error", [i, e]), t.attempts++, t.attempts > 2 || !e?.reason || e.reason == "REQUEST_TIMEOUT" ? (t.stopLoadingCardForm(), t.showMessage("Too many attempts to access your click to pay profile. Please check out as a guest.")) : e.reason === "CODE_INVALID" || e.reason === "RETRIES_EXCEEDED" || e.reason === "ACCT_INACCESSIBLE" || e.reason === "CODE_EXPIRED" ? t.mcShowOtpInput(t.supportedValidationChannels, t.validationChannelsNetwork, e.reason) : (t.stopUsing(), t.showInfoMessage(Hr));
|
|
4121
4198
|
}), i = {
|
|
4122
4199
|
value: e,
|
|
4123
4200
|
recognitionTokenRequested: this.getRememberMe()
|
|
@@ -4125,25 +4202,25 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4125
4202
|
this.log("[mcValidate]", i), this.startLoadingCardForm(), window.mcCheckoutService.completeValidation(i).then(n).catch(r);
|
|
4126
4203
|
}
|
|
4127
4204
|
runClickToPay() {
|
|
4128
|
-
let e = this, t =
|
|
4205
|
+
let e = this, t = z(this, "[runClickToPay.promiseResolvedHandler]", (t) => {
|
|
4129
4206
|
e.log("[runClickToPay.promiseResolvedHandler]", t), !t || !t.length ? e.mcIdLookup() : (e.setCards(t), e.stopLoadingCardForm());
|
|
4130
|
-
}), n =
|
|
4207
|
+
}), n = z(this, "[runClickToPay.promiseRejectedHandler]", (t) => {
|
|
4131
4208
|
e.log("[runClickToPay.promiseRejectedHandler]", t), e.stopUsing(), e.stopLoadingCardForm(), e.sendErrorNotification("mcCheckoutService.getCards error", [t]);
|
|
4132
4209
|
});
|
|
4133
4210
|
this.log("[runClickToPay]"), window.mcCheckoutService.getCards().then(t).catch(n);
|
|
4134
4211
|
}
|
|
4135
4212
|
mcGetCards() {
|
|
4136
|
-
let e = this, t =
|
|
4213
|
+
let e = this, t = z(this, "[getCards.promiseResolvedHandler]", (t) => {
|
|
4137
4214
|
e.log("[getCards.promiseResolvedHandler]", t), e.setCards(t), e.stopLoadingCardForm();
|
|
4138
|
-
}), n =
|
|
4215
|
+
}), n = z(this, "[getCards.promiseRejectedHandler]", (t) => {
|
|
4139
4216
|
e.log("[getCards.promiseRejectedHandler]", t), e.stopLoadingCardForm(), e.stopUsing(), e.sendErrorNotification("getCards error", [t]);
|
|
4140
4217
|
});
|
|
4141
4218
|
this.log("[getCards]"), window.mcCheckoutService.getCards().then(t).catch(n);
|
|
4142
4219
|
}
|
|
4143
4220
|
mcEncryptCard(e, t, n, r, i) {
|
|
4144
|
-
let a = this, o =
|
|
4221
|
+
let a = this, o = z(this, "[encryptCard.promiseResolvedHandler]", (e) => {
|
|
4145
4222
|
a.log("[encryptCard.promiseResolvedHandler]", e), r(e.encryptedCard, e.cardBrand);
|
|
4146
|
-
}), s =
|
|
4223
|
+
}), s = z(this, "[encryptCard.promiseResolvedHandler]", (e) => {
|
|
4147
4224
|
a.log("[encryptCard.promiseResolvedHandler]", e), i(e), a.sendErrorNotification("encryptCard error", [l, e]);
|
|
4148
4225
|
}), c = t.split("/"), l = {
|
|
4149
4226
|
primaryAccountNumber: e,
|
|
@@ -4170,7 +4247,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4170
4247
|
let t = this.getCardFormFrame();
|
|
4171
4248
|
if (t) try {
|
|
4172
4249
|
t.contentWindow?.postMessage({
|
|
4173
|
-
status:
|
|
4250
|
+
status: _e,
|
|
4174
4251
|
availableCardBrands: e
|
|
4175
4252
|
}, "*");
|
|
4176
4253
|
} catch (e) {
|
|
@@ -4181,7 +4258,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4181
4258
|
return !!this.enabled;
|
|
4182
4259
|
}
|
|
4183
4260
|
getLibUrl(e) {
|
|
4184
|
-
return
|
|
4261
|
+
return Ur[this.environment === We.PRODUCTION ? "PRODUCTION" : "SANDBOX"][e] || "";
|
|
4185
4262
|
}
|
|
4186
4263
|
saveRecognitionToken(e) {
|
|
4187
4264
|
let t = /* @__PURE__ */ new Date();
|
|
@@ -4194,12 +4271,12 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4194
4271
|
return e.length === 2 && e.pop().split(";").shift() || "";
|
|
4195
4272
|
}
|
|
4196
4273
|
sendErrorNotification(e, t) {
|
|
4197
|
-
|
|
4274
|
+
$e("[ClickToPayProcessor]", e, t);
|
|
4198
4275
|
}
|
|
4199
4276
|
generateDpaTransactionOptions() {
|
|
4200
4277
|
let e = {
|
|
4201
4278
|
dpaLocale: this.options.locale || "en_AU",
|
|
4202
|
-
dpaBillingPreference:
|
|
4279
|
+
dpaBillingPreference: yr.NONE,
|
|
4203
4280
|
dpaAcceptedBillingCountries: [],
|
|
4204
4281
|
dpaAcceptedShippingCountries: [],
|
|
4205
4282
|
dpaShippingPreference: "NONE",
|
|
@@ -4210,7 +4287,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4210
4287
|
transactionCurrencyCode: this.currency
|
|
4211
4288
|
}
|
|
4212
4289
|
};
|
|
4213
|
-
return !this.tokenAuthenticationEnabled && this.options.useFpan && (e.paymentOptions = [{ dynamicDataType: "NONE" }]), this.options.confirmPayment !== void 0 && (e.confirmPayment = !!this.options.confirmPayment), this.tokenAuthenticationEnabled && (e.dpaBillingPreference =
|
|
4290
|
+
return !this.tokenAuthenticationEnabled && this.options.useFpan && (e.paymentOptions = [{ dynamicDataType: "NONE" }]), this.options.confirmPayment !== void 0 && (e.confirmPayment = !!this.options.confirmPayment), this.tokenAuthenticationEnabled && (e.dpaBillingPreference = yr.NONE, e.merchantCountryCode = "AU", e.authenticationPreferences = { payloadRequested: "AUTHENTICATED" }, e.paymentOptions = [{
|
|
4214
4291
|
dpaDynamicDataTtlMinutes: 15,
|
|
4215
4292
|
dynamicDataType: "CARD_APPLICATION_CRYPTOGRAM_SHORT_FORM"
|
|
4216
4293
|
}], this.options.networkTokenOptions?.acquirerMerchantId && (e.acquirerMerchantId = this.options.networkTokenOptions.acquirerMerchantId), this.options.networkTokenOptions?.acquirerBIN && (e.acquirerBIN = this.options.networkTokenOptions.acquirerBIN), this.options.networkTokenOptions?.merchantCategoryCode && (e.merchantCategoryCode = this.options.networkTokenOptions.merchantCategoryCode)), e;
|
|
@@ -4218,7 +4295,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4218
4295
|
generateConsumerInfo() {
|
|
4219
4296
|
let e = {};
|
|
4220
4297
|
if (this.customer?.email && (e.emailAddress = this.customer.email), this.customer?.phoneNumber) {
|
|
4221
|
-
let t =
|
|
4298
|
+
let t = Ue(this.customer?.phoneNumber || "");
|
|
4222
4299
|
e.mobileNumber = {
|
|
4223
4300
|
phoneNumber: t[1] || "",
|
|
4224
4301
|
countryCode: t[0] || "61"
|
|
@@ -4227,19 +4304,17 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4227
4304
|
return e;
|
|
4228
4305
|
}
|
|
4229
4306
|
};
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
var Mr;
|
|
4307
|
+
L([R], Z.prototype, "setContainer", null), L([R], Z.prototype, "setCustomerInfo", null), L([R], Z.prototype, "setCards", null), L([R], Z.prototype, "isSchemeSupported", null), L([R], Z.prototype, "messageHandler", null), L([R], Z.prototype, "init", null), L([R], Z.prototype, "cleanUp", null), L([R], Z.prototype, "start", null), L([R], Z.prototype, "initCheckoutServiceLib", null), L([R], Z.prototype, "initScripts", null), L([R], Z.prototype, "initCss", null), L([R], Z.prototype, "createOtpInput", null), L([R], Z.prototype, "attachOtpInput", null), L([R], Z.prototype, "createLearnMore", null), L([R], Z.prototype, "createModalForm", null), L([R], Z.prototype, "showModalForm", null), L([R], Z.prototype, "hideModalForm", null), L([R], Z.prototype, "mcHideOtpInput", null), L([R], Z.prototype, "mcShowOtpInput", null), L([R], Z.prototype, "adjustRememberMeOnOtpInput", null), L([R], Z.prototype, "mcHideLearnMore", null), L([R], Z.prototype, "mcShowLearnMore", null), L([R], Z.prototype, "showChangeUserPopup", null), L([R], Z.prototype, "showLoginForm", null), L([R], Z.prototype, "checkoutWithCard", null), L([R], Z.prototype, "checkoutWithNewCard", null), L([R], Z.prototype, "checkoutWithEncryptedNewCard", null), L([R], Z.prototype, "encryptCard", null), L([R], Z.prototype, "mcLogout", null), L([R], Z.prototype, "mcInitClickToPay", null), L([R], Z.prototype, "mcIdLookup", null), L([R], Z.prototype, "mcInitiateValidation", null), L([R], Z.prototype, "mcValidate", null), L([R], Z.prototype, "runClickToPay", null), L([R], Z.prototype, "mcGetCards", null), L([R], Z.prototype, "mcEncryptCard", null), L([R], Z.prototype, "stopUsing", null), L([R], Z.prototype, "updateAvailableCardBrands", null), L([R], Z.prototype, "getLibUrl", null), L([R], Z.prototype, "saveRecognitionToken", null), L([R], Z.prototype, "getRecognitionToken", null), L([R], Z.prototype, "sendErrorNotification", null), L([R], Z.prototype, "generateDpaTransactionOptions", null), L([R], Z.prototype, "generateConsumerInfo", null);
|
|
4308
|
+
// src/sdk/types/PaymentMethodInfo.type.ts
|
|
4309
|
+
var Wr;
|
|
4234
4310
|
(function(e) {
|
|
4235
4311
|
e.CARD = "CARD", e.PAYPAL = "PAYPAL", e.PAYTO = "PAYTO", e.PAYID = "PAYID", e.OPTTY = "OPTTY", e.GOOGLEPAY = "GOOGLEPAY", e.APPLEPAY = "APPLEPAY", e.VIS = "VIS", e.SHIFT = "SHIFT", e.PESAPAL = "PESAPAL", e.PAYBYACCOUNT = "PAYBYACCOUNT", e.CLICK2PAY = "CLICK2PAY", e.UPI = "UPI", e.PAYGLOCAL = "PAYGLOCAL", e.BANKPAYMENT = "BANKPAYMENT", e.PAYMENT_METHOD = "PAYMENT_METHOD";
|
|
4236
|
-
})(
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
var Nr = {
|
|
4312
|
+
})(Wr ||= {});
|
|
4313
|
+
// src/sdk/components/PaymentMethod.vue?vue&type=script&setup=true&lang.ts
|
|
4314
|
+
var Gr = {
|
|
4240
4315
|
key: 0,
|
|
4241
4316
|
class: "payment-method-info"
|
|
4242
|
-
},
|
|
4317
|
+
}, Kr = ["src", "alt"], qr = { class: "payment-method-details" }, Jr = { class: "payment-method-details-name" }, Yr = { key: 0 }, Xr = { key: 1 }, Zr = { key: 2 }, Qr = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
4243
4318
|
__name: "PaymentMethod",
|
|
4244
4319
|
props: {
|
|
4245
4320
|
log: { type: Function },
|
|
@@ -4274,7 +4349,7 @@ var Nr = {
|
|
|
4274
4349
|
}
|
|
4275
4350
|
function a() {
|
|
4276
4351
|
switch (n.value.type) {
|
|
4277
|
-
case "CARD": return n.value.card?.scheme ? `${t.cssUrl}icons/${
|
|
4352
|
+
case "CARD": return n.value.card?.scheme ? `${t.cssUrl}icons/${qe(String(n.value.card?.scheme).toLowerCase())}.svg` : `${t.cssUrl}icons/Card.svg`;
|
|
4278
4353
|
case "PAYPAL": return `${t.cssUrl}icons/PayPal.svg`;
|
|
4279
4354
|
case "PAYTO": return `${t.cssUrl}icons/PayTo.svg`;
|
|
4280
4355
|
case "PAYID": return `${t.cssUrl}icons/PayID.svg`;
|
|
@@ -4294,49 +4369,49 @@ var Nr = {
|
|
|
4294
4369
|
}
|
|
4295
4370
|
return y(() => t.paymentMethod, () => {
|
|
4296
4371
|
n.value = t.paymentMethod;
|
|
4297
|
-
}, { flush: "post" }), (e, t) => n.value ? (b(),
|
|
4372
|
+
}, { flush: "post" }), (e, t) => n.value ? (b(), j("div", Gr, [A("img", {
|
|
4298
4373
|
src: a(),
|
|
4299
4374
|
alt: r()
|
|
4300
|
-
}, null, 8,
|
|
4301
|
-
|
|
4302
|
-
n.value.type === g(
|
|
4375
|
+
}, null, 8, Kr), A("div", qr, [
|
|
4376
|
+
A("div", Jr, i(r()), 1),
|
|
4377
|
+
n.value.type === g(Wr).CARD ? (b(), j("div", Yr, [
|
|
4303
4378
|
o(" Card: " + i(n.value.card?.cardNumber || "Unknown"), 1),
|
|
4304
|
-
t[0] ||=
|
|
4379
|
+
t[0] ||= A("br", null, null, -1),
|
|
4305
4380
|
o(" Expire: " + i(n.value.card?.expiryDate || "Unknown"), 1)
|
|
4306
4381
|
])) : T("", !0),
|
|
4307
|
-
n.value.type === g(
|
|
4382
|
+
n.value.type === g(Wr).BANKPAYMENT ? (b(), j("div", Xr, [
|
|
4308
4383
|
o(" Name: " + i(n.value.bankPayment?.accountName), 1),
|
|
4309
|
-
t[1] ||=
|
|
4384
|
+
t[1] ||= A("br", null, null, -1),
|
|
4310
4385
|
o(" Acc No: " + i(n.value.bankPayment?.accountNumber), 1)
|
|
4311
4386
|
])) : T("", !0),
|
|
4312
|
-
n.value.type === g(
|
|
4387
|
+
n.value.type === g(Wr).PAYTO ? (b(), j("div", Zr, [
|
|
4313
4388
|
o(" Name: " + i(n.value.payTo?.payerName), 1),
|
|
4314
|
-
t[3] ||=
|
|
4315
|
-
n.value.payTo?.payerPayIdDetails ? (b(),
|
|
4316
|
-
n.value.payTo?.payerDirectDebitDetails ? (b(),
|
|
4389
|
+
t[3] ||= A("br", null, null, -1),
|
|
4390
|
+
n.value.payTo?.payerPayIdDetails ? (b(), j(D, { key: 0 }, [o(i(n.value.payTo?.payerPayIdDetails?.payIdType) + ": " + i(n.value.payTo?.payerPayIdDetails?.payId), 1)], 64)) : T("", !0),
|
|
4391
|
+
n.value.payTo?.payerDirectDebitDetails ? (b(), j(D, { key: 1 }, [
|
|
4317
4392
|
o(" BSB: " + i(n.value.payTo?.payerDirectDebitDetails?.bsb), 1),
|
|
4318
|
-
t[2] ||=
|
|
4393
|
+
t[2] ||= A("br", null, null, -1),
|
|
4319
4394
|
o(" Acc No: " + i(n.value.payTo?.payerDirectDebitDetails?.accountNumber), 1)
|
|
4320
4395
|
], 64)) : T("", !0)
|
|
4321
4396
|
])) : T("", !0)
|
|
4322
4397
|
])])) : T("", !0);
|
|
4323
4398
|
}
|
|
4324
|
-
}), [["__scopeId", "data-v-7894e1cd"]]),
|
|
4399
|
+
}), [["__scopeId", "data-v-7894e1cd"]]), $r = {
|
|
4325
4400
|
key: 0,
|
|
4326
4401
|
class: "saved-payment-methods"
|
|
4327
|
-
},
|
|
4402
|
+
}, ei = {
|
|
4328
4403
|
key: 0,
|
|
4329
4404
|
class: "error"
|
|
4330
|
-
},
|
|
4405
|
+
}, ti = ["onClick"], ni = ["id", "checked"], ri = {
|
|
4331
4406
|
key: 0,
|
|
4332
4407
|
class: "error"
|
|
4333
|
-
},
|
|
4408
|
+
}, ii = {
|
|
4334
4409
|
key: 1,
|
|
4335
4410
|
class: "payment-method-container"
|
|
4336
|
-
},
|
|
4411
|
+
}, ai = {
|
|
4337
4412
|
key: 1,
|
|
4338
4413
|
class: "saved-payment-methods"
|
|
4339
|
-
},
|
|
4414
|
+
}, oi = /*#__PURE__*/ w(/* @__PURE__ */ C({
|
|
4340
4415
|
__name: "PaymentMethodsForm",
|
|
4341
4416
|
props: {
|
|
4342
4417
|
log: { type: Function },
|
|
@@ -4378,23 +4453,23 @@ var Nr = {
|
|
|
4378
4453
|
}, "*");
|
|
4379
4454
|
}
|
|
4380
4455
|
return c(() => {
|
|
4381
|
-
window.addEventListener("message", m), window.postMessage({ status:
|
|
4456
|
+
window.addEventListener("message", m), window.postMessage({ status: Re }, "*"), g();
|
|
4382
4457
|
}), s(() => {
|
|
4383
4458
|
window.removeEventListener("message", m);
|
|
4384
|
-
}), (e, t) => l.value.length > 0 ? (b(),
|
|
4385
|
-
d.value.global ? (b(),
|
|
4386
|
-
(b(!0),
|
|
4459
|
+
}), (e, t) => l.value.length > 0 ? (b(), j("div", $r, [
|
|
4460
|
+
d.value.global ? (b(), j("div", ei, i(d.value.global), 1)) : T("", !0),
|
|
4461
|
+
(b(!0), j(D, null, Ce(f.value, (e, t) => (b(), j("div", {
|
|
4387
4462
|
key: `paymentMethod${t}`,
|
|
4388
4463
|
class: ne(["payment-method-container", `${o.value?.paymentMethodId === e?.paymentMethodId ? "selected" : ""} ${d.value[`${e?.paymentMethodId}`] ? "error" : ""}`]),
|
|
4389
4464
|
onClick: (t) => h(e)
|
|
4390
4465
|
}, [
|
|
4391
|
-
|
|
4466
|
+
A("input", {
|
|
4392
4467
|
type: "radio",
|
|
4393
4468
|
name: "paymentMethod",
|
|
4394
4469
|
id: `payment-method-${e?.paymentMethodId}`,
|
|
4395
4470
|
checked: o.value?.paymentMethodId === e?.paymentMethodId
|
|
4396
|
-
}, null, 8,
|
|
4397
|
-
|
|
4471
|
+
}, null, 8, ni),
|
|
4472
|
+
Le(Qr, {
|
|
4398
4473
|
log: n.log,
|
|
4399
4474
|
"css-url": n.cssUrl,
|
|
4400
4475
|
"payment-method": e
|
|
@@ -4403,22 +4478,22 @@ var Nr = {
|
|
|
4403
4478
|
"css-url",
|
|
4404
4479
|
"payment-method"
|
|
4405
4480
|
]),
|
|
4406
|
-
d.value[`${e?.paymentMethodId}`] ? (b(),
|
|
4407
|
-
], 10,
|
|
4408
|
-
l.value.length > 1 ? (b(),
|
|
4481
|
+
d.value[`${e?.paymentMethodId}`] ? (b(), j("div", ri, i(d.value[`${e?.paymentMethodId}`]), 1)) : T("", !0)
|
|
4482
|
+
], 10, ti))), 128)),
|
|
4483
|
+
l.value.length > 1 ? (b(), j("div", ii, [t[2] ||= A("div", { style: { width: "20px" } }, null, -1), A("div", null, [u.value ? (b(), j("a", {
|
|
4409
4484
|
key: 0,
|
|
4410
4485
|
href: "#",
|
|
4411
4486
|
class: "black",
|
|
4412
4487
|
onClick: t[0] ||= (e) => u.value = !1
|
|
4413
|
-
}, "Show less")) : (b(),
|
|
4488
|
+
}, "Show less")) : (b(), j("a", {
|
|
4414
4489
|
key: 1,
|
|
4415
4490
|
href: "#",
|
|
4416
4491
|
class: "black",
|
|
4417
4492
|
onClick: t[1] ||= (e) => u.value = !0
|
|
4418
4493
|
}, "Show all"))])])) : T("", !0)
|
|
4419
|
-
])) : (b(),
|
|
4494
|
+
])) : (b(), j("div", ai, [...t[3] ||= [A("div", { class: "title" }, "No saved payment methods found", -1)]]));
|
|
4420
4495
|
}
|
|
4421
|
-
}), [["__scopeId", "data-v-d3f0944f"]]),
|
|
4496
|
+
}), [["__scopeId", "data-v-d3f0944f"]]), si = class {
|
|
4422
4497
|
log;
|
|
4423
4498
|
debug = !1;
|
|
4424
4499
|
container = null;
|
|
@@ -4441,8 +4516,8 @@ var Nr = {
|
|
|
4441
4516
|
userSuccessMessage = re;
|
|
4442
4517
|
constructor(e, t) {
|
|
4443
4518
|
this.log = e, this.debug = t.debug, this.environment = t.environment, this.apiUrl = t.apiUrl, this.publicKey = t.publicKey, this.version = t.version, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null;
|
|
4444
|
-
let n = new
|
|
4445
|
-
this.httpInvoker = new
|
|
4519
|
+
let n = new N(t.environment, P(t.publicKey));
|
|
4520
|
+
this.httpInvoker = new F(t.publicKey, t.version, n);
|
|
4446
4521
|
}
|
|
4447
4522
|
setAmount(e) {
|
|
4448
4523
|
this.amount = e;
|
|
@@ -4540,46 +4615,50 @@ var Nr = {
|
|
|
4540
4615
|
};
|
|
4541
4616
|
}
|
|
4542
4617
|
};
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
|
|
4618
|
+
L([R], si.prototype, "setPaymentInfo", null), L([R], si.prototype, "cleanUp", null);
|
|
4619
|
+
// src/sdk/processors/paymentMethodProcessor.ts
|
|
4620
|
+
var { hideSpinner: ci, showSpinner: li } = De(), ui = {
|
|
4547
4621
|
CUSTOMER_INFO: "CUSTOMER_INFO",
|
|
4548
4622
|
PAYMENT_METHODS_INFO: "PAYMENT_METHODS_INFO",
|
|
4549
4623
|
TOKENISE: "TOKENISE"
|
|
4550
|
-
},
|
|
4551
|
-
[
|
|
4624
|
+
}, di = (e, t) => ({
|
|
4625
|
+
[ui.CUSTOMER_INFO]: {
|
|
4552
4626
|
url: e + "/customer/" + t,
|
|
4553
4627
|
method: "GET"
|
|
4554
4628
|
},
|
|
4555
|
-
[
|
|
4629
|
+
[ui.PAYMENT_METHODS_INFO]: {
|
|
4556
4630
|
url: e + "/customer/" + t + "/payment_method",
|
|
4557
4631
|
method: "GET"
|
|
4558
4632
|
},
|
|
4559
|
-
[
|
|
4633
|
+
[ui.TOKENISE]: {
|
|
4560
4634
|
url: e + "/token/payment_method",
|
|
4561
4635
|
method: "POST"
|
|
4562
4636
|
}
|
|
4563
|
-
}),
|
|
4637
|
+
}), fi = class extends si {
|
|
4564
4638
|
cssUrl = "";
|
|
4565
4639
|
networkTokenProviders = [];
|
|
4566
4640
|
validationStatusChangeCallback = null;
|
|
4641
|
+
fraudProcessor = null;
|
|
4642
|
+
fraudManageOrder = null;
|
|
4567
4643
|
constructor(e, t) {
|
|
4568
4644
|
super(e, t), this.cssUrl = t.cssUrl, this.validationStatusChangeCallback = t.onValidationStatusChangeCallback || null, window.addEventListener("message", this.messageHandler.bind(this));
|
|
4569
4645
|
}
|
|
4646
|
+
addFraudProcessor(e, t) {
|
|
4647
|
+
this.fraudProcessor = e, this.fraudManageOrder = t;
|
|
4648
|
+
}
|
|
4570
4649
|
addPaymentMethods(t, n, r, i, a) {
|
|
4571
4650
|
if (this.log("[addPaymentMethods]", {
|
|
4572
4651
|
amount: r,
|
|
4573
4652
|
currency: i,
|
|
4574
4653
|
customerId: n,
|
|
4575
4654
|
options: a
|
|
4576
|
-
}), this.container = t, this.networkTokenProviders = a?.networkTokenProviders || [], this.networkTokenProviders = a?.networkTokenProviders || [], !e(r)) throw
|
|
4655
|
+
}), this.container = t, this.networkTokenProviders = a?.networkTokenProviders || [], this.networkTokenProviders = a?.networkTokenProviders || [], !e(r)) throw I(t, "Invalid amount: " + r), TypeError("invalid amount: " + r);
|
|
4577
4656
|
this.getCustomerData(n, (e) => {
|
|
4578
4657
|
this.log("[addPaymentMethods], customerInfo", e), this.getPaymentMethodsInfo(n, (n) => {
|
|
4579
4658
|
this.log("[addPaymentMethods], paymentMethods", n);
|
|
4580
|
-
let o =
|
|
4659
|
+
let o = E({
|
|
4581
4660
|
el: this.container,
|
|
4582
|
-
component:
|
|
4661
|
+
component: oi,
|
|
4583
4662
|
props: {
|
|
4584
4663
|
el: t,
|
|
4585
4664
|
log: this.log,
|
|
@@ -4621,8 +4700,8 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
|
|
|
4621
4700
|
networkToken: t.networkToken
|
|
4622
4701
|
}))
|
|
4623
4702
|
},
|
|
4624
|
-
on: { submit:
|
|
4625
|
-
this.log("[PaymentMethods]: submit", e), e?.paymentMethodId && (
|
|
4703
|
+
on: { submit: z(this, "[PaymentMethods]: submit", (e) => {
|
|
4704
|
+
this.log("[PaymentMethods]: submit", e), e?.paymentMethodId && (li(), setTimeout(() => {
|
|
4626
4705
|
this.onSubmit(t, r, i, a, e);
|
|
4627
4706
|
}, 500));
|
|
4628
4707
|
}) }
|
|
@@ -4635,15 +4714,16 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
|
|
|
4635
4714
|
this.failureCallback?.({ error: e.message }), this.sendError("", e.message);
|
|
4636
4715
|
});
|
|
4637
4716
|
}
|
|
4638
|
-
tokenise(e, t, n, r, i) {
|
|
4717
|
+
tokenise(e, t, n, r, i, a) {
|
|
4639
4718
|
this.log("[PaymentMethodProcessor][tokenise]", {
|
|
4640
4719
|
paymentMethodId: t,
|
|
4641
4720
|
amount: n,
|
|
4642
4721
|
currency: r,
|
|
4643
|
-
|
|
4722
|
+
fraud: i,
|
|
4723
|
+
authenticationData: a
|
|
4644
4724
|
});
|
|
4645
|
-
let
|
|
4646
|
-
this.log("[PaymentMethodProcessor][tokenise], success", t, n),
|
|
4725
|
+
let o = z(this, "[PaymentMethodProcessor][tokenise], success", (t, n) => {
|
|
4726
|
+
this.log("[PaymentMethodProcessor][tokenise], success", t, n), ci();
|
|
4647
4727
|
let r = JSON.parse(n), i = { token: r.tokenId };
|
|
4648
4728
|
r.card && (i.cardDetails = {
|
|
4649
4729
|
bin: r.card.cardIin,
|
|
@@ -4658,62 +4738,76 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
|
|
|
4658
4738
|
issuer: r.card.iinData.issuer || "",
|
|
4659
4739
|
countryCode: r.card.iinData.countryCode || "",
|
|
4660
4740
|
cardType: r.card.iinData.cardType || ""
|
|
4661
|
-
}), this.successCallback?.(i),
|
|
4662
|
-
}),
|
|
4663
|
-
this.log("[PaymentMethodProcessor][tokenise], failure", e, n),
|
|
4741
|
+
}), this.successCallback?.(i), Ze(e, this.getSuccessMessage());
|
|
4742
|
+
}), s = z(this, "[PaymentMethodProcessor][tokenise], failure", (e, n) => {
|
|
4743
|
+
this.log("[PaymentMethodProcessor][tokenise], failure", e, n), ci();
|
|
4664
4744
|
let r = JSON.parse(n);
|
|
4665
4745
|
this.failureCallback?.({ error: r.message }), this.sendError(t, r.message);
|
|
4666
|
-
}),
|
|
4746
|
+
}), c = {
|
|
4667
4747
|
paymentMethodId: t,
|
|
4668
4748
|
amount: n,
|
|
4669
4749
|
currency: r,
|
|
4670
|
-
authenticationData:
|
|
4671
|
-
VerificationType:
|
|
4672
|
-
VerificationEntity:
|
|
4673
|
-
VerificationMethod:
|
|
4674
|
-
VerificationResults:
|
|
4675
|
-
VerificationTimestamp:
|
|
4676
|
-
AdditionalData:
|
|
4677
|
-
VerificationEvents: JSON.stringify(
|
|
4750
|
+
authenticationData: a && {
|
|
4751
|
+
VerificationType: a.verificationType,
|
|
4752
|
+
VerificationEntity: a.verificationEntity,
|
|
4753
|
+
VerificationMethod: a.verificationMethod,
|
|
4754
|
+
VerificationResults: a.verificationResults,
|
|
4755
|
+
VerificationTimestamp: a.verificationTimestamp,
|
|
4756
|
+
AdditionalData: a.additionalData,
|
|
4757
|
+
VerificationEvents: JSON.stringify(a.verificationEvents)
|
|
4678
4758
|
},
|
|
4759
|
+
fraudCheck: i.fraudCheckResult,
|
|
4760
|
+
threeDSServerTransID: i.threeDSServerTransID,
|
|
4679
4761
|
...this.createBaseApiRequest()
|
|
4680
4762
|
};
|
|
4681
|
-
this.httpInvoker?.invoke(
|
|
4763
|
+
this.httpInvoker?.invoke(di(this.apiUrl)[ui.TOKENISE].url, di(this.apiUrl)[ui.TOKENISE].method, JSON.stringify(c), o, s);
|
|
4682
4764
|
}
|
|
4683
4765
|
getCustomerData(e, t, n) {
|
|
4684
|
-
let r =
|
|
4766
|
+
let r = z(this, "[getCustomerData], success", (e, n) => {
|
|
4685
4767
|
this.log("[getCustomerData], success", e, n), t(JSON.parse(n));
|
|
4686
|
-
}), i =
|
|
4768
|
+
}), i = z(this, "[getCustomerData], failure", (e, t) => {
|
|
4687
4769
|
this.log("[getCustomerData], failure", e, t), n(JSON.parse(t));
|
|
4688
4770
|
});
|
|
4689
|
-
this.httpInvoker?.invoke(
|
|
4771
|
+
this.httpInvoker?.invoke(di(this.apiUrl, e)[ui.CUSTOMER_INFO].url, di(this.apiUrl, e)[ui.CUSTOMER_INFO].method, {}, r, i);
|
|
4690
4772
|
}
|
|
4691
4773
|
getPaymentMethodsInfo(e, t, n) {
|
|
4692
|
-
let r =
|
|
4774
|
+
let r = z(this, "[getPaymentMethodsInfo], success", (e, n) => {
|
|
4693
4775
|
this.log("[getPaymentMethodsInfo], success", e, n), t(JSON.parse(n));
|
|
4694
|
-
}), i =
|
|
4776
|
+
}), i = z(this, "[getPaymentMethodsInfo], failure", (e, t) => {
|
|
4695
4777
|
this.log("[getPaymentMethodsInfo], failure", e, t), n(JSON.parse(t));
|
|
4696
4778
|
});
|
|
4697
|
-
this.httpInvoker?.invoke(
|
|
4779
|
+
this.httpInvoker?.invoke(di(this.apiUrl, e)[ui.PAYMENT_METHODS_INFO].url, di(this.apiUrl, e)[ui.PAYMENT_METHODS_INFO].method, {}, r, i);
|
|
4698
4780
|
}
|
|
4699
4781
|
onSubmit(e, t, n, r, i) {
|
|
4700
|
-
if (!i?.paymentMethodId)
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4782
|
+
if (!i?.paymentMethodId) {
|
|
4783
|
+
this.failureCallback?.({ error: "Invalid payment method" });
|
|
4784
|
+
return;
|
|
4785
|
+
}
|
|
4786
|
+
let a = i.paymentMethodId;
|
|
4787
|
+
this.fraudProcessor?.setPaymentReference({ paymentMethodId: a }), In(this.fraudProcessor, this.fraudManageOrder, e, {
|
|
4788
|
+
onShow: ci,
|
|
4789
|
+
log: this.log
|
|
4790
|
+
}).then(z(this, "[PaymentMethodProcessor][fraudGate]", (o) => {
|
|
4791
|
+
"error" in o ? (ci(), I(e, o.error), this.failureCallback?.({ error: o.error }), this.sendError(a, o.error)) : this.onFraudGatePassed(e, t, n, o, r, i);
|
|
4792
|
+
}));
|
|
4793
|
+
}
|
|
4794
|
+
onFraudGatePassed(e, t, n, r, i, a) {
|
|
4795
|
+
if (!i?.tokenAuthenticationEnabled || !a.networkToken?.schemeTokenId) this.tokenise(e, a.paymentMethodId, t, n, r);
|
|
4796
|
+
else if (i?.tokenAuthenticationEnabled && a.networkToken?.schemeTokenId) {
|
|
4797
|
+
let o = {
|
|
4798
|
+
expiryDate: a.card?.expiryDate || "",
|
|
4799
|
+
cardholder: a.card?.cardholder || "",
|
|
4800
|
+
cardType: a.card?.cardType || "",
|
|
4801
|
+
scheme: a.card?.scheme || ""
|
|
4802
|
+
}, s = this.initTokenAuthenticationProcessor("", a.networkToken?.schemeTokenId, a.networkToken?.schemeTokenData, a.networkToken?.authenticationMethod?.uriData.uri || "", o, i?.networkTokenOptions || {});
|
|
4803
|
+
if (!s) {
|
|
4804
|
+
this.tokenise(e, a.paymentMethodId, t, n, r);
|
|
4711
4805
|
return;
|
|
4712
4806
|
}
|
|
4713
|
-
|
|
4714
|
-
this.log("[sdk][paymentMethodProcessor], token authentication success"), this.tokenise(e,
|
|
4715
|
-
}),
|
|
4716
|
-
|
|
4807
|
+
s.invoke(this.amount, this.currency, z(this, "[sdk][paymentMethodProcessor], token authentication success", (i) => {
|
|
4808
|
+
this.log("[sdk][paymentMethodProcessor], token authentication success"), this.tokenise(e, a.paymentMethodId, t, n, r, i.assuranceData?.verificationData?.[0]);
|
|
4809
|
+
}), z(this, "[sdk][paymentMethodProcessor], token authentication error", (e) => {
|
|
4810
|
+
ci(), this.log("[sdk][paymentMethodProcessor], token authentication error", e), this.failureCallback?.({ error: "Token Authentication Error" });
|
|
4717
4811
|
}));
|
|
4718
4812
|
}
|
|
4719
4813
|
}
|
|
@@ -4733,7 +4827,7 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
|
|
|
4733
4827
|
});
|
|
4734
4828
|
let o = (i?.scheme || "").toLowerCase(), s = this.networkTokenProviders.find((e) => e.providerType.toLowerCase() === o);
|
|
4735
4829
|
switch (String(s?.providerType).toLowerCase()) {
|
|
4736
|
-
case "mastercard": return new
|
|
4830
|
+
case "mastercard": return new Wt(this.log.bind(this), {
|
|
4737
4831
|
container: this.container,
|
|
4738
4832
|
token: e,
|
|
4739
4833
|
networkToken: t,
|
|
@@ -4749,20 +4843,19 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
|
|
|
4749
4843
|
}
|
|
4750
4844
|
}
|
|
4751
4845
|
messageHandler(e) {
|
|
4752
|
-
e?.data?.status && e.data.status === "card-form-validation-status-change" && (this.log(`[sdk][paymentMethodProcessor]: message "${e.data.status}" received`, e.data),
|
|
4846
|
+
e?.data?.status && e.data.status === "card-form-validation-status-change" && (this.log(`[sdk][paymentMethodProcessor]: message "${e.data.status}" received`, e.data), ci(), this.validationStatusChangeCallback?.(e.data.message?.status, e.data.message?.message));
|
|
4753
4847
|
}
|
|
4754
4848
|
};
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
//#region src/sdk/types/PaymentType.type.ts
|
|
4849
|
+
L([R], fi.prototype, "addPaymentMethods", null), L([R], fi.prototype, "tokenise", null), L([R], fi.prototype, "getCustomerData", null), L([R], fi.prototype, "getPaymentMethodsInfo", null), L([R], fi.prototype, "onSubmit", null), L([R], fi.prototype, "onFraudGatePassed", null), L([R], fi.prototype, "sendError", null), L([R], fi.prototype, "initTokenAuthenticationProcessor", null), L([R], fi.prototype, "messageHandler", null);
|
|
4850
|
+
// src/sdk/types/PaymentType.type.ts
|
|
4758
4851
|
var Q;
|
|
4759
4852
|
(function(e) {
|
|
4760
4853
|
e.card = "card", e.paypal = "paypal", e.applepay = "applepay", e.googlepay = "googlepay", e.upi = "upi", e.payto = "payto", e.payid = "payid", e.shift = "shift", e.pesapal = "pesapal", e.paybyaccount = "paybyaccount", e.payglocal = "payglocal", e.zip = "zip", e.dlocal = "dlocal";
|
|
4761
4854
|
})(Q ||= {});
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
function ti(e) {
|
|
4855
|
+
// src/sdk/utils/paymentType.ts
|
|
4856
|
+
function pi(e) {
|
|
4765
4857
|
switch (e) {
|
|
4858
|
+
case Y.AZUPAY: return Q.payid;
|
|
4766
4859
|
case Y.SHIFT: return Q.shift;
|
|
4767
4860
|
case Y.PESAPAL: return Q.pesapal;
|
|
4768
4861
|
case Y.PAYBYACCOUNT: return Q.paybyaccount;
|
|
@@ -4770,53 +4863,51 @@ function ti(e) {
|
|
|
4770
4863
|
case Y.ZIP: return Q.zip;
|
|
4771
4864
|
}
|
|
4772
4865
|
}
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
let t = ni[e.toLowerCase()];
|
|
4866
|
+
// src/sdk/utils/moduleLoader.ts
|
|
4867
|
+
var mi = {
|
|
4868
|
+
cxpay: () => import("./cxpay-B2_DeDZt.js"),
|
|
4869
|
+
default: () => import("./default-2G4dbyeg.js"),
|
|
4870
|
+
ecentric: () => import("./ecentric-kLMDhKl_.js"),
|
|
4871
|
+
epna: () => import("./epna-p_tBGPK3.js"),
|
|
4872
|
+
flashbanc: () => import("./flashbanc-ChTsnYMc.js"),
|
|
4873
|
+
forter: () => import("./forter-BKH-4F0d.js"),
|
|
4874
|
+
gpayments: () => import("./gpayments-Sa7Ek9FT.js"),
|
|
4875
|
+
metrics_global: () => import("./metrics_global-CxURr43F.js"),
|
|
4876
|
+
nmi: () => import("./nmi-Bq5IGnP2.js"),
|
|
4877
|
+
nuvei: () => import("./nuvei-BDdU_s1G.js"),
|
|
4878
|
+
payabli: () => import("./payabli-4-XnuYBw.js"),
|
|
4879
|
+
payglocal: () => import("./payglocal-9n0hrZAf.js"),
|
|
4880
|
+
skybank: () => import("./skybank-BIJrZVJd.js")
|
|
4881
|
+
}, hi = { forter: () => import("./forter-a0WNgzHg.js") };
|
|
4882
|
+
async function gi(e) {
|
|
4883
|
+
let t = mi[e.toLowerCase()];
|
|
4792
4884
|
if (!t) throw Error(`Module ${e} not found`);
|
|
4793
4885
|
return await t();
|
|
4794
4886
|
}
|
|
4795
|
-
async function
|
|
4796
|
-
let t =
|
|
4887
|
+
async function _i(e) {
|
|
4888
|
+
let t = hi[e.toLowerCase()];
|
|
4797
4889
|
if (!t) throw Error(`Module ${e} not found`);
|
|
4798
4890
|
return await t();
|
|
4799
4891
|
}
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
var { hideSpinner: oi } = Oe(), si = {
|
|
4892
|
+
// src/sdk/payfurl.ts
|
|
4893
|
+
var { hideSpinner: vi } = De(), yi = {
|
|
4803
4894
|
PROVIDER_INFO: "PROVIDER_INFO",
|
|
4804
4895
|
PROVIDERS_INFO: "PROVIDERS_INFO"
|
|
4805
|
-
},
|
|
4806
|
-
[
|
|
4896
|
+
}, bi = (e, t, n) => ({
|
|
4897
|
+
[yi.PROVIDERS_INFO]: {
|
|
4807
4898
|
url: e + "/info/providers/",
|
|
4808
4899
|
method: "GET"
|
|
4809
4900
|
},
|
|
4810
|
-
[
|
|
4901
|
+
[yi.PROVIDER_INFO]: {
|
|
4811
4902
|
url: e + (n ? "/info/providers/token/" + n : "/info/providers/" + t),
|
|
4812
4903
|
method: "GET"
|
|
4813
4904
|
}
|
|
4814
4905
|
}), $ = class {
|
|
4815
4906
|
_submitFormHandlers = {};
|
|
4816
4907
|
_destroyDropIns = {};
|
|
4817
|
-
environment =
|
|
4908
|
+
environment = We.PRODUCTION;
|
|
4818
4909
|
debug = !1;
|
|
4819
|
-
config =
|
|
4910
|
+
config = Ke(We.PRODUCTION);
|
|
4820
4911
|
publicKey = "";
|
|
4821
4912
|
amount = 0;
|
|
4822
4913
|
currency = "";
|
|
@@ -4830,6 +4921,11 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
4830
4921
|
payToProcessor = null;
|
|
4831
4922
|
checkoutProcessors = [];
|
|
4832
4923
|
fraudProcessor = null;
|
|
4924
|
+
fraudManageOrder = null;
|
|
4925
|
+
skipCardFraud = !1;
|
|
4926
|
+
get cardFraudProcessor() {
|
|
4927
|
+
return this.skipCardFraud ? null : this.fraudProcessor;
|
|
4928
|
+
}
|
|
4833
4929
|
googlePayProcessor = null;
|
|
4834
4930
|
applePayProcessor = null;
|
|
4835
4931
|
clickToPayProcessor = null;
|
|
@@ -4846,9 +4942,9 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
4846
4942
|
paymentOptions = {};
|
|
4847
4943
|
initProcessorsHandlers = [];
|
|
4848
4944
|
init(e, t, n) {
|
|
4849
|
-
if (this.environment = String(e).toLowerCase(),
|
|
4850
|
-
if (this.debug = n, this.publicKey = t, this.config =
|
|
4851
|
-
return this.regionResolver = new
|
|
4945
|
+
if (this.environment = String(e).toLowerCase(), Qe.init(this.environment, t, M.version), window._payfurl) return window._payfurl;
|
|
4946
|
+
if (this.debug = n, this.publicKey = t, this.config = Ke(this.environment), !this.config) throw this.showErrorMessage(null, "Error: Unable to configure SDK due to an incorrect environment setting."), this.userOnFailure?.({ error: "Unable to configure SDK" }), TypeError("Error: Unable to configure SDK due to an incorrect environment setting.");
|
|
4947
|
+
return this.regionResolver = new N(e, P(t)), this.httpInvoker = new F(t, M.version, this.regionResolver), this.loadCss(), window._payfurl = this, window.addEventListener("message", this.messageHandler.bind(this)), this;
|
|
4852
4948
|
}
|
|
4853
4949
|
execute() {
|
|
4854
4950
|
window.postMessage({ status: oe }, "*");
|
|
@@ -4865,25 +4961,25 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
4865
4961
|
url: this.config.url,
|
|
4866
4962
|
secureUrl: this.config.secureUrl,
|
|
4867
4963
|
apiUrl: this.config.apiUrl,
|
|
4868
|
-
version:
|
|
4869
|
-
onSuccess:
|
|
4964
|
+
version: M.version,
|
|
4965
|
+
onSuccess: z(this, "[cardProcessor], success", (t) => {
|
|
4870
4966
|
this.log("[cardProcessor], success", t), t.token && (this._setToken(e, t.token), setTimeout(() => {
|
|
4871
4967
|
this.userOnSuccess || this.getForm(e)?.submit();
|
|
4872
4968
|
}, 500)), this.userOnSuccess?.(t);
|
|
4873
4969
|
}),
|
|
4874
|
-
onFailure:
|
|
4970
|
+
onFailure: z(this, "[cardProcessor], failure", (e) => {
|
|
4875
4971
|
this.log("[cardProcessor], failure", e);
|
|
4876
|
-
let t =
|
|
4972
|
+
let t = Hn(e.body);
|
|
4877
4973
|
e.body && !t && this.log("[cardProcessor], failure", "no structured error detail in body"), this.userOnFailure?.({
|
|
4878
4974
|
error: e.error,
|
|
4879
4975
|
...t && { errorDetails: t }
|
|
4880
4976
|
});
|
|
4881
4977
|
}),
|
|
4882
|
-
onValidationStatusChangeCallback:
|
|
4978
|
+
onValidationStatusChangeCallback: z(this, "[cardProcessor], ValidationStatusChange", (e, t) => {
|
|
4883
4979
|
this.log("[cardProcessor], ValidationStatusChange", e, t), this.userOnValidationStatusChange?.(e, t);
|
|
4884
4980
|
})
|
|
4885
4981
|
});
|
|
4886
|
-
return this.amount && t.setAmount(this.amount), this.currency && t.setCurrency(this.currency), this.customer && t.setCustomerInfo(this.customer), this.billingAddress && t.setBillingAddress(this.billingAddress), this.order && t.setOrderInfo(this.order), this.threeDsProcessor && t.addThreeDsProcessor(this.threeDsProcessor), this.secondaryThreeDsProcessor && t.addSecondaryThreeDsProcessor(this.secondaryThreeDsProcessor), this.fraudProcessor && t.addFraudProcessor(this.
|
|
4982
|
+
return this.amount && t.setAmount(this.amount), this.currency && t.setCurrency(this.currency), this.customer && t.setCustomerInfo(this.customer), this.billingAddress && t.setBillingAddress(this.billingAddress), this.order && t.setOrderInfo(this.order), this.threeDsProcessor && t.addThreeDsProcessor(this.threeDsProcessor), this.secondaryThreeDsProcessor && t.addSecondaryThreeDsProcessor(this.secondaryThreeDsProcessor), this.fraudProcessor && t.addFraudProcessor(this.cardFraudProcessor), this.clickToPayProcessor && t.addClickToPayProcessor(this.clickToPayProcessor), t.setSuccessMessage(this.userSuccessMessage), t.setOnValidate(this.userOnValidate), this.cardProcessor = t, t;
|
|
4887
4983
|
}
|
|
4888
4984
|
initClickToPayProcessor(e, t) {
|
|
4889
4985
|
return this.log("[initClickToPayProcessor]", { options: t }), this.clickToPayProcessor ||= new Z(this.log.bind(this), {
|
|
@@ -4899,13 +4995,13 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
4899
4995
|
environment: this.environment,
|
|
4900
4996
|
publicKey: this.publicKey,
|
|
4901
4997
|
apiUrl: this.config.apiUrl,
|
|
4902
|
-
version:
|
|
4903
|
-
onSuccess:
|
|
4998
|
+
version: M.version,
|
|
4999
|
+
onSuccess: z(this, "[paypalProcessor], success", (t) => {
|
|
4904
5000
|
this.log("[paypalProcessor], success", t, this.userOnSuccess), !this.userOnSuccess && t.transactionId && (this._setToken(e, t.transactionId, "transactionId"), setTimeout(() => {
|
|
4905
5001
|
this.getForm(e)?.submit();
|
|
4906
5002
|
}, 500)), this.userOnSuccess?.({ transactionId: t.transactionId });
|
|
4907
5003
|
}),
|
|
4908
|
-
onFailure:
|
|
5004
|
+
onFailure: z(this, "[paypalProcessor], failure", (e) => {
|
|
4909
5005
|
this.log("[paypalProcessor], failure", e), this.userOnFailure?.({ error: e.error });
|
|
4910
5006
|
})
|
|
4911
5007
|
});
|
|
@@ -4913,21 +5009,21 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
4913
5009
|
}
|
|
4914
5010
|
initCheckoutProcessor(e) {
|
|
4915
5011
|
this.log("[initCheckoutProcessor]", { container: e });
|
|
4916
|
-
let t = new
|
|
5012
|
+
let t = new En(this.log.bind(this), {
|
|
4917
5013
|
debug: this.debug,
|
|
4918
5014
|
environment: this.environment,
|
|
4919
5015
|
publicKey: this.publicKey,
|
|
4920
5016
|
apiUrl: this.config.apiUrl,
|
|
4921
5017
|
redirectUrl: this.config.redirectUrl,
|
|
4922
|
-
version:
|
|
4923
|
-
onSuccess:
|
|
5018
|
+
version: M.version,
|
|
5019
|
+
onSuccess: z(this, "[checkoutProcessor], success", (t) => {
|
|
4924
5020
|
this.log("[checkoutProcessor], success", t), this.userOnSuccess || (t.transactionId && this._setToken(e, t.transactionId, "transactionId"), t.token && this._setToken(e, t.token, "token"), setTimeout(() => {
|
|
4925
5021
|
this.getForm(e)?.submit();
|
|
4926
5022
|
}, 500));
|
|
4927
5023
|
let n = {};
|
|
4928
5024
|
t.transactionId && (n.transactionId = t.transactionId), t.token && (n.token = t.token), this.userOnSuccess?.(n);
|
|
4929
5025
|
}),
|
|
4930
|
-
onFailure:
|
|
5026
|
+
onFailure: z(this, "[checkoutProcessor], failure", (e) => {
|
|
4931
5027
|
this.log("[checkoutProcessor], failure", e), this.userOnFailure?.({ error: e.error });
|
|
4932
5028
|
})
|
|
4933
5029
|
});
|
|
@@ -4935,18 +5031,18 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
4935
5031
|
}
|
|
4936
5032
|
initGooglePayProcessor(e) {
|
|
4937
5033
|
if (this.log("[initGooglePayProcessor]", { container: e }), this.googlePayProcessor) return this.googlePayProcessor;
|
|
4938
|
-
let t = new
|
|
5034
|
+
let t = new Xn(this.log.bind(this), {
|
|
4939
5035
|
debug: this.debug,
|
|
4940
5036
|
environment: this.environment,
|
|
4941
5037
|
publicKey: this.publicKey,
|
|
4942
5038
|
apiUrl: this.config.apiUrl,
|
|
4943
|
-
version:
|
|
4944
|
-
onSuccess:
|
|
5039
|
+
version: M.version,
|
|
5040
|
+
onSuccess: z(this, "[googlePayProcessor], success", (t) => {
|
|
4945
5041
|
this.log("[googlePayProcessor], success", t), !this.userOnSuccess && t.transactionId && (this._setToken(e, t.transactionId, "transactionId"), setTimeout(() => {
|
|
4946
5042
|
this.getForm(e)?.submit();
|
|
4947
5043
|
}, 500)), this.userOnSuccess?.({ transactionId: t.transactionId });
|
|
4948
5044
|
}),
|
|
4949
|
-
onFailure:
|
|
5045
|
+
onFailure: z(this, "[googlePayProcessor], failure", (e) => {
|
|
4950
5046
|
this.log("[googlePayProcessor], failure", e), this.userOnFailure?.({ error: e.error });
|
|
4951
5047
|
})
|
|
4952
5048
|
});
|
|
@@ -4954,13 +5050,13 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
4954
5050
|
}
|
|
4955
5051
|
initApplePayProcessor(e) {
|
|
4956
5052
|
if (this.log("[initApplePayProcessor]", { container: e }), this.applePayProcessor) return this.applePayProcessor;
|
|
4957
|
-
let t = new
|
|
5053
|
+
let t = new gr(this.log.bind(this), {
|
|
4958
5054
|
debug: this.debug,
|
|
4959
5055
|
environment: this.environment,
|
|
4960
5056
|
publicKey: this.publicKey,
|
|
4961
5057
|
apiUrl: this.config.apiUrl,
|
|
4962
|
-
version:
|
|
4963
|
-
onSuccess:
|
|
5058
|
+
version: M.version,
|
|
5059
|
+
onSuccess: z(this, "[applePayProcessor], success", (t) => {
|
|
4964
5060
|
this.log("[applePayProcessor], success", t), !this.userOnSuccess && t.transactionId ? (this._setToken(e, t.transactionId, "transactionId"), setTimeout(() => {
|
|
4965
5061
|
this.getForm(e)?.submit();
|
|
4966
5062
|
}, 500)) : !this.userOnSuccess && t.token ? (this._setToken(e, t.token), setTimeout(() => {
|
|
@@ -4970,50 +5066,50 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
4970
5066
|
token: t.token
|
|
4971
5067
|
});
|
|
4972
5068
|
}),
|
|
4973
|
-
onFailure:
|
|
5069
|
+
onFailure: z(this, "[applePayProcessor], failure", (e) => {
|
|
4974
5070
|
this.log("[applePayProcessor], failure", e), this.userOnFailure?.({ error: e.error });
|
|
4975
5071
|
})
|
|
4976
5072
|
});
|
|
4977
5073
|
return this.amount && t.setAmount(this.amount), this.currency && t.setCurrency(this.currency), this.customer && t.setCustomerInfo(this.customer), this.billingAddress && t.setBillingAddress(this.billingAddress), this.order && t.setOrderInfo(this.order), t.setOnValidate(this.userOnValidate), this.applePayProcessor = t, this.applePayProcessor;
|
|
4978
5074
|
}
|
|
4979
5075
|
initPayToProcessor(e) {
|
|
4980
|
-
return this.log("[initPayToProcessor]", { container: e }), this.payToProcessor || (this.payToProcessor = new
|
|
5076
|
+
return this.log("[initPayToProcessor]", { container: e }), this.payToProcessor || (this.payToProcessor = new un(this.log.bind(this), {
|
|
4981
5077
|
debug: this.debug,
|
|
4982
5078
|
environment: this.environment,
|
|
4983
5079
|
publicKey: this.publicKey,
|
|
4984
5080
|
apiUrl: this.config.apiUrl,
|
|
4985
|
-
version:
|
|
5081
|
+
version: M.version,
|
|
4986
5082
|
getPaymentOptions: this.getPaymentOptions.bind(this),
|
|
4987
|
-
onSuccess:
|
|
5083
|
+
onSuccess: z(this, "[payToProcessor], success", (t) => {
|
|
4988
5084
|
this.log("[payToProcessor], success", t), t.token && (this._setToken(e, t.token), setTimeout(() => {
|
|
4989
5085
|
this.userOnSuccess || this.getForm(e)?.submit();
|
|
4990
5086
|
}, 500)), this.userOnSuccess?.({ token: t.token });
|
|
4991
5087
|
}),
|
|
4992
|
-
onFailure:
|
|
5088
|
+
onFailure: z(this, "[payToProcessor], failure", (e) => {
|
|
4993
5089
|
this.log("[payToProcessor], failure", e), this.userOnFailure?.({ error: e.error });
|
|
4994
5090
|
})
|
|
4995
5091
|
}), this.payToProcessor.setOnValidate(this.userOnValidate)), this.payToProcessor;
|
|
4996
5092
|
}
|
|
4997
5093
|
initPaymentMethodProcessor(e) {
|
|
4998
|
-
return this.log("[initPaymentMethodProcessor]", { container: e }), this.paymentMethodProcessor || (this.paymentMethodProcessor = new
|
|
5094
|
+
return this.log("[initPaymentMethodProcessor]", { container: e }), this.paymentMethodProcessor || (this.paymentMethodProcessor = new fi(this.log.bind(this), {
|
|
4999
5095
|
debug: this.debug,
|
|
5000
5096
|
environment: this.environment,
|
|
5001
5097
|
publicKey: this.publicKey,
|
|
5002
5098
|
apiUrl: this.config.apiUrl,
|
|
5003
5099
|
cssUrl: this.config.cssUrl,
|
|
5004
|
-
version:
|
|
5005
|
-
onSuccess:
|
|
5100
|
+
version: M.version,
|
|
5101
|
+
onSuccess: z(this, "[paymentMethodProcessor], success", (t) => {
|
|
5006
5102
|
this.log("[paymentMethodProcessor], success", t), t.token && (this._setToken(e, t.token), setTimeout(() => {
|
|
5007
5103
|
this.userOnSuccess || this.getForm(e)?.submit();
|
|
5008
5104
|
}, 500)), this.userOnSuccess?.(t);
|
|
5009
5105
|
}),
|
|
5010
|
-
onFailure:
|
|
5106
|
+
onFailure: z(this, "[paymentMethodProcessor], failure", (e) => {
|
|
5011
5107
|
this.log("[paymentMethodProcessor], failure", e), this.userOnFailure?.({ error: e.error });
|
|
5012
5108
|
}),
|
|
5013
|
-
onValidationStatusChangeCallback:
|
|
5109
|
+
onValidationStatusChangeCallback: z(this, "[paymentMethodProcessor], ValidationStatusChange", (e, t) => {
|
|
5014
5110
|
this.log("[paymentMethodProcessor], ValidationStatusChange", e, t), this.userOnValidationStatusChange?.(e, t);
|
|
5015
5111
|
})
|
|
5016
|
-
}), this.initBaseProcessor(this.paymentMethodProcessor)), this.paymentMethodProcessor;
|
|
5112
|
+
}), this.initBaseProcessor(this.paymentMethodProcessor), this.fraudProcessor && this.paymentMethodProcessor.addFraudProcessor(this.cardFraudProcessor, this.fraudManageOrder)), this.paymentMethodProcessor;
|
|
5017
5113
|
}
|
|
5018
5114
|
loadCss() {
|
|
5019
5115
|
let e = document.createElement("link");
|
|
@@ -5056,7 +5152,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5056
5152
|
t && !t.id && (t.id = "payfurl-form-" + Math.random().toString(36).slice(2, 9));
|
|
5057
5153
|
let n = t?.id || e?.id || "container";
|
|
5058
5154
|
if (this._submitFormHandlers[n]) return this._submitFormHandlers[n];
|
|
5059
|
-
let r =
|
|
5155
|
+
let r = z(this, "[getSubmitFormHandler][handler]", (t) => {
|
|
5060
5156
|
this.log("[sdk], submitForm", t), t.preventDefault();
|
|
5061
5157
|
let n = this.getForm(e);
|
|
5062
5158
|
(!n?.onsubmit || n.onsubmit(new SubmitEvent("submit"))) && (n && this.getInput(e, "token")?.value ? n.submit() : window.postMessage({ status: oe }, "*"));
|
|
@@ -5078,13 +5174,13 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5078
5174
|
});
|
|
5079
5175
|
let i = t && document.getElementById(t) || null;
|
|
5080
5176
|
if (!i) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
|
|
5081
|
-
if (!
|
|
5177
|
+
if (!O(n)) throw this.showErrorMessage(i, "Missing parameter: providerId"), this.userOnFailure?.({ error: "Missing parameter: Provider Id" }), TypeError("Missing parameter: providerId");
|
|
5082
5178
|
let a = Number(r?.amount) || 0;
|
|
5083
5179
|
r?.currency && (r.currency = r?.currency.toUpperCase());
|
|
5084
5180
|
let o = r?.currency || "";
|
|
5085
5181
|
if (a && !e(a)) throw this.showErrorMessage(i, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5086
|
-
return this._cleanUp(i), this._initForm(i), this.setAmount(a), this.setCurrency(o), this.initProcessors(i, a, o, n, "", r || {},
|
|
5087
|
-
let c = this.resolveThreeDsProvider(t, s), l = s.allThreeDsProviders?.[0], u = s.fraudProviders?.[0], d = {
|
|
5182
|
+
return this._cleanUp(i), this._initForm(i), this.setAmount(a), this.setCurrency(o), this.initProcessors(i, a, o, n, "", r || {}, z(this, "[addCard][initProcessors], callback", (t, s) => {
|
|
5183
|
+
let c = this.resolveThreeDsProvider(t, s), l = s.allThreeDsProviders?.[0], u = this.skipCardFraud ? void 0 : s.fraudProviders?.[0], d = {
|
|
5088
5184
|
...r,
|
|
5089
5185
|
requiredFields: t.requiredFields,
|
|
5090
5186
|
clientParameters: t.clientParameters,
|
|
@@ -5099,9 +5195,9 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5099
5195
|
networkTokenProviders: s.networkTokenProviders || [],
|
|
5100
5196
|
createNetworkToken: r?.createNetworkToken !== !1 && s.hasNetworkTokenProviders,
|
|
5101
5197
|
networkTokenOptions: r?.networkTokenOptions,
|
|
5102
|
-
vault:
|
|
5103
|
-
verifyCard:
|
|
5104
|
-
metadata:
|
|
5198
|
+
vault: k(r?.vault),
|
|
5199
|
+
verifyCard: k(r?.verifyCard),
|
|
5200
|
+
metadata: G(r?.metadata),
|
|
5105
5201
|
secureCardOrchestration: {
|
|
5106
5202
|
enabled: !0,
|
|
5107
5203
|
secureUrl: this.config.secureUrl,
|
|
@@ -5109,10 +5205,10 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5109
5205
|
debug: this.debug,
|
|
5110
5206
|
publicKey: this.publicKey,
|
|
5111
5207
|
apiUrl: this.config.apiUrl,
|
|
5112
|
-
version:
|
|
5208
|
+
version: M.version,
|
|
5113
5209
|
amount: a,
|
|
5114
5210
|
currency: o,
|
|
5115
|
-
metadata:
|
|
5211
|
+
metadata: G(r?.metadata),
|
|
5116
5212
|
billingAddress: this.billingAddress,
|
|
5117
5213
|
customer: this.customer,
|
|
5118
5214
|
order: this.order,
|
|
@@ -5148,7 +5244,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5148
5244
|
this.showErrorMessage(i, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" });
|
|
5149
5245
|
return;
|
|
5150
5246
|
}
|
|
5151
|
-
if (!
|
|
5247
|
+
if (!B(o)) {
|
|
5152
5248
|
this.showErrorMessage(i, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" });
|
|
5153
5249
|
return;
|
|
5154
5250
|
}
|
|
@@ -5164,8 +5260,8 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5164
5260
|
});
|
|
5165
5261
|
let a = t && document.getElementById(t) || null;
|
|
5166
5262
|
if (!a) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
|
|
5167
|
-
return r &&= r.toUpperCase(), this._cleanUp(a), this._initForm(a), this.setAmount(n), this.setCurrency(r), this.initProcessors(a, n, r, "", "", i || {},
|
|
5168
|
-
let s = this.resolveThreeDsProvider(t, o), c = o.allThreeDsProviders?.[0], l = o.fraudProviders?.[0], u = {
|
|
5263
|
+
return r &&= r.toUpperCase(), this._cleanUp(a), this._initForm(a), this.setAmount(n), this.setCurrency(r), this.initProcessors(a, n, r, "", "", i || {}, z(this, "[addCardLeastCost][initProcessors], callback", (t, o) => {
|
|
5264
|
+
let s = this.resolveThreeDsProvider(t, o), c = o.allThreeDsProviders?.[0], l = this.skipCardFraud ? void 0 : o.fraudProviders?.[0], u = {
|
|
5169
5265
|
...i,
|
|
5170
5266
|
requiredFields: t.requiredFields,
|
|
5171
5267
|
clientParameters: t.clientParameters,
|
|
@@ -5180,9 +5276,9 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5180
5276
|
networkTokenProviders: o.networkTokenProviders || [],
|
|
5181
5277
|
createNetworkToken: i?.createNetworkToken !== !1 && o.hasNetworkTokenProviders,
|
|
5182
5278
|
networkTokenOptions: i?.networkTokenOptions,
|
|
5183
|
-
vault:
|
|
5184
|
-
verifyCard:
|
|
5185
|
-
metadata:
|
|
5279
|
+
vault: k(i?.vault),
|
|
5280
|
+
verifyCard: k(i?.verifyCard),
|
|
5281
|
+
metadata: G(i?.metadata),
|
|
5186
5282
|
secureCardOrchestration: {
|
|
5187
5283
|
enabled: !0,
|
|
5188
5284
|
secureUrl: this.config.secureUrl,
|
|
@@ -5190,10 +5286,10 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5190
5286
|
debug: this.debug,
|
|
5191
5287
|
publicKey: this.publicKey,
|
|
5192
5288
|
apiUrl: this.config.apiUrl,
|
|
5193
|
-
version:
|
|
5289
|
+
version: M.version,
|
|
5194
5290
|
amount: n,
|
|
5195
5291
|
currency: r,
|
|
5196
|
-
metadata:
|
|
5292
|
+
metadata: G(i?.metadata),
|
|
5197
5293
|
billingAddress: this.billingAddress,
|
|
5198
5294
|
customer: this.customer,
|
|
5199
5295
|
order: this.order,
|
|
@@ -5229,7 +5325,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5229
5325
|
this.showErrorMessage(a, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" });
|
|
5230
5326
|
return;
|
|
5231
5327
|
}
|
|
5232
|
-
if (!
|
|
5328
|
+
if (!B(r)) {
|
|
5233
5329
|
this.showErrorMessage(a, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" });
|
|
5234
5330
|
return;
|
|
5235
5331
|
}
|
|
@@ -5253,7 +5349,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5253
5349
|
createNetworkToken: r?.createNetworkToken,
|
|
5254
5350
|
tokenAuthenticationEnabled: r?.tokenAuthenticationEnabled || r?.clickToPayOptions?.tokenAuthenticationEnabled,
|
|
5255
5351
|
networkTokenOptions: r?.networkTokenOptions || r?.clickToPayOptions?.networkTokenOptions
|
|
5256
|
-
},
|
|
5352
|
+
}, z(this, "[addDropIn][initProcessors], callback", async (a, c) => {
|
|
5257
5353
|
r?.paypalProviderId && c.hasPaypalProviders && c.paypalProviders.includes(r?.paypalProviderId) && (c.hasPaypalProviders = !0, c.paypalProviders.unshift(r?.paypalProviderId)), r?.payToProviderId && c.hasPayToProviders && c.payToProviders.includes(r?.payToProviderId) && (c.hasPayToProviders = !0, c.payToProviders.unshift(r?.payToProviderId));
|
|
5258
5354
|
let l = [
|
|
5259
5355
|
c.hasCardProviders,
|
|
@@ -5262,7 +5358,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5262
5358
|
c.hasBnplProviders,
|
|
5263
5359
|
c.hasGooglePayProviders,
|
|
5264
5360
|
c.hasApplePayProviders && await this.isApplePayAvailable()
|
|
5265
|
-
].filter(Boolean).length > 1, u = this.resolveThreeDsProvider(a, c), d = {
|
|
5361
|
+
].filter(Boolean).length > 1, u = this.resolveThreeDsProvider(a, c), d = this.skipCardFraud ? void 0 : c.fraudProviders?.[0], f = {
|
|
5266
5362
|
threeDSEnabled: !!c.required3dsProvider,
|
|
5267
5363
|
threeDsProviderId: c.required3dsProvider || "",
|
|
5268
5364
|
threeDSEmail: r?.threeDSEmail || "",
|
|
@@ -5279,9 +5375,9 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5279
5375
|
networkTokenProviders: c.networkTokenProviders || [],
|
|
5280
5376
|
createNetworkToken: r?.createNetworkToken !== !1 && c.hasNetworkTokenProviders,
|
|
5281
5377
|
networkTokenOptions: r?.networkTokenOptions,
|
|
5282
|
-
vault:
|
|
5283
|
-
verifyCard:
|
|
5284
|
-
metadata:
|
|
5378
|
+
vault: k(r?.vault),
|
|
5379
|
+
verifyCard: k(r?.verifyCard),
|
|
5380
|
+
metadata: G(r?.metadata),
|
|
5285
5381
|
secureCardOrchestration: {
|
|
5286
5382
|
enabled: !0,
|
|
5287
5383
|
secureUrl: this.config.secureUrl,
|
|
@@ -5289,19 +5385,19 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5289
5385
|
debug: this.debug,
|
|
5290
5386
|
publicKey: this.publicKey,
|
|
5291
5387
|
apiUrl: this.config.apiUrl,
|
|
5292
|
-
version:
|
|
5388
|
+
version: M.version,
|
|
5293
5389
|
amount: t,
|
|
5294
5390
|
currency: n,
|
|
5295
|
-
metadata:
|
|
5391
|
+
metadata: G(r?.metadata),
|
|
5296
5392
|
billingAddress: this.billingAddress,
|
|
5297
5393
|
customer: this.customer,
|
|
5298
5394
|
order: this.order,
|
|
5299
5395
|
geolocation: this.geolocation,
|
|
5300
|
-
fraud: !(r?.clickToPayEnabled !== !1 && c.clickToPayEnabled) &&
|
|
5301
|
-
providerId:
|
|
5302
|
-
providerType:
|
|
5303
|
-
stopPaymentOnFailure: !!
|
|
5304
|
-
clientParameters:
|
|
5396
|
+
fraud: !(r?.clickToPayEnabled !== !1 && c.clickToPayEnabled) && d ? {
|
|
5397
|
+
providerId: d.providerId,
|
|
5398
|
+
providerType: d.providerType,
|
|
5399
|
+
stopPaymentOnFailure: !!d.stopPaymentOnFailure,
|
|
5400
|
+
clientParameters: d.clientParameters || {}
|
|
5305
5401
|
} : void 0,
|
|
5306
5402
|
threeDs: !(r?.clickToPayEnabled !== !1 && c.clickToPayEnabled) && u ? {
|
|
5307
5403
|
providerId: u.providerId,
|
|
@@ -5322,65 +5418,65 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5322
5418
|
}
|
|
5323
5419
|
} : void 0
|
|
5324
5420
|
}
|
|
5325
|
-
},
|
|
5421
|
+
}, p = {
|
|
5326
5422
|
hideShipping: !1,
|
|
5327
5423
|
paypalButtonStyle: null,
|
|
5328
5424
|
paypalEnablePayIn4: !1,
|
|
5329
5425
|
transfer: null,
|
|
5330
|
-
metadata:
|
|
5331
|
-
},
|
|
5426
|
+
metadata: G(r?.metadata)
|
|
5427
|
+
}, m = {
|
|
5332
5428
|
description: String(r?.payToDescription).trim() || String(c.payToProvidersWithOptions[0]?.description) || "",
|
|
5333
5429
|
maximumAmount: r?.payToMaximumAmount || Number(c.payToProvidersWithOptions[0]?.maximumAmount) || 0,
|
|
5334
|
-
metadata:
|
|
5335
|
-
},
|
|
5430
|
+
metadata: G(r?.metadata)
|
|
5431
|
+
}, h = {
|
|
5336
5432
|
taxAmount: this.order?.taxAmount,
|
|
5337
5433
|
shippingAmount: this.order?.shippingAmount,
|
|
5338
5434
|
discountAmount: this.order?.discountAmount,
|
|
5339
5435
|
orderItems: this.order?.orderItems,
|
|
5340
5436
|
customer: this.customer || void 0,
|
|
5341
5437
|
billingAddress: this.billingAddress || void 0,
|
|
5342
|
-
metadata:
|
|
5343
|
-
},
|
|
5344
|
-
gateway: r?.googlePayOptions?.gateway ||
|
|
5345
|
-
googlePayGatewayMerchantId: r?.googlePayOptions?.googlePayGatewayMerchantId ||
|
|
5346
|
-
googlePayMerchantId: r?.googlePayOptions?.googlePayMerchantId ||
|
|
5347
|
-
googlePayMerchantName: r?.googlePayOptions?.googlePayMerchantName ||
|
|
5438
|
+
metadata: G(r?.metadata)
|
|
5439
|
+
}, g = c.hasGooglePayProviders ? c.googlePayProviders.find((e) => e.providerId === r?.googlePayOptions?.providerId) || c.googlePayProviders[0] : null, _ = {
|
|
5440
|
+
gateway: r?.googlePayOptions?.gateway || g?.gateway || "",
|
|
5441
|
+
googlePayGatewayMerchantId: r?.googlePayOptions?.googlePayGatewayMerchantId || g?.googlePayGatewayMerchantId || "",
|
|
5442
|
+
googlePayMerchantId: r?.googlePayOptions?.googlePayMerchantId || g?.googlePayMerchantId || "",
|
|
5443
|
+
googlePayMerchantName: r?.googlePayOptions?.googlePayMerchantName || g?.googlePayMerchantName || "",
|
|
5348
5444
|
buttonOptions: r?.googlePayOptions?.buttonOptions,
|
|
5349
5445
|
billingDetailsRequired: r?.googlePayOptions?.billingDetailsRequired,
|
|
5350
|
-
metadata:
|
|
5351
|
-
},
|
|
5352
|
-
lineItemLabel: r?.applePayOptions?.lineItemLabel ||
|
|
5353
|
-
displayName: r?.applePayOptions?.displayName ||
|
|
5354
|
-
domainName: r?.applePayOptions?.domainName ||
|
|
5355
|
-
merchantIdentifier: r?.applePayOptions?.merchantIdentifier ||
|
|
5356
|
-
providerId: r?.applePayOptions?.providerId ||
|
|
5357
|
-
providerType: r?.applePayOptions?.providerType ||
|
|
5358
|
-
countryCode: r?.applePayOptions?.countryCode ||
|
|
5359
|
-
merchantCapabilities: r?.applePayOptions?.merchantCapabilities ||
|
|
5360
|
-
supportedNetworks: r?.applePayOptions?.supportedNetworks ||
|
|
5361
|
-
supportedCountries: r?.applePayOptions?.supportedCountries ||
|
|
5362
|
-
applePayVersion: r?.applePayOptions?.applePayVersion ||
|
|
5446
|
+
metadata: G(r?.metadata)
|
|
5447
|
+
}, v = c.hasApplePayProviders ? c.applePayProviders.find((e) => e.providerId === r?.applePayOptions?.providerId) || c.applePayProviders[0] : null, y = {
|
|
5448
|
+
lineItemLabel: r?.applePayOptions?.lineItemLabel || v?.lineItemLabel || "",
|
|
5449
|
+
displayName: r?.applePayOptions?.displayName || v?.displayName || "",
|
|
5450
|
+
domainName: r?.applePayOptions?.domainName || v?.domainName || "",
|
|
5451
|
+
merchantIdentifier: r?.applePayOptions?.merchantIdentifier || v?.merchantIdentifier || "",
|
|
5452
|
+
providerId: r?.applePayOptions?.providerId || v?.providerId || "",
|
|
5453
|
+
providerType: r?.applePayOptions?.providerType || v?.providerType || "",
|
|
5454
|
+
countryCode: r?.applePayOptions?.countryCode || v?.countryCode,
|
|
5455
|
+
merchantCapabilities: r?.applePayOptions?.merchantCapabilities || v?.merchantCapabilities,
|
|
5456
|
+
supportedNetworks: r?.applePayOptions?.supportedNetworks || v?.supportedNetworks,
|
|
5457
|
+
supportedCountries: r?.applePayOptions?.supportedCountries || v?.supportedCountries,
|
|
5458
|
+
applePayVersion: r?.applePayOptions?.applePayVersion || v?.applePayVersion,
|
|
5363
5459
|
clientParameters: a.clientParameters,
|
|
5364
|
-
metadata:
|
|
5460
|
+
metadata: G(r?.metadata)
|
|
5365
5461
|
};
|
|
5366
5462
|
if (!l && c.hasCardProviders) {
|
|
5367
5463
|
if (o(Q.card)) {
|
|
5368
5464
|
let r = e && document.getElementById(e) || null;
|
|
5369
|
-
this.initCardProcessor(r).addCard(r, this.getForm(r), s, t, n,
|
|
5465
|
+
this.initCardProcessor(r).addCard(r, this.getForm(r), s, t, n, f);
|
|
5370
5466
|
}
|
|
5371
|
-
} else if (!l && c.hasPaypalProviders) o(Q.paypal) && this.addPaypal(e, t, n, c.paypalProviders[0],
|
|
5372
|
-
else if (!l && c.hasPayToProviders) o(Q.payto) && this.addPayTo(e, t, c.payToProviders[0],
|
|
5373
|
-
else if (!l && c.hasBnplProviders &&
|
|
5467
|
+
} else if (!l && c.hasPaypalProviders) o(Q.paypal) && this.addPaypal(e, t, n, c.paypalProviders[0], p);
|
|
5468
|
+
else if (!l && c.hasPayToProviders) o(Q.payto) && this.addPayTo(e, t, c.payToProviders[0], m);
|
|
5469
|
+
else if (!l && c.hasBnplProviders && dn[c.bnplProviders[0].providerType]) {
|
|
5374
5470
|
if (c.bnplProviders[0].providerType === "upi") o(Q.upi) && this.addUpi(e, t, c.bnplProviders[0].providerId, r?.upiOptions || {});
|
|
5375
5471
|
else {
|
|
5376
|
-
let r =
|
|
5377
|
-
r && o(r) && this.addCheckout(e, t, n, c.bnplProviders[0].providerType, c.bnplProviders[0].providerId,
|
|
5472
|
+
let r = pi(c.bnplProviders[0].providerType);
|
|
5473
|
+
r && o(r) && this.addCheckout(e, t, n, c.bnplProviders[0].providerType, c.bnplProviders[0].providerId, h, {
|
|
5378
5474
|
...c.bnplProviders[0].options,
|
|
5379
5475
|
...c.bnplProviders[0].clientParameters
|
|
5380
5476
|
});
|
|
5381
5477
|
}
|
|
5382
|
-
} else if (!l && c.hasGooglePayProviders) o(Q.googlepay) && this.addGooglePay(e, t, n, c.googlePayProviders[0].providerId,
|
|
5383
|
-
else if (!l && c.hasApplePayProviders && await this.isApplePayAvailable()) o(Q.applepay) && this.addApplePay(e, t, n,
|
|
5478
|
+
} else if (!l && c.hasGooglePayProviders) o(Q.googlepay) && this.addGooglePay(e, t, n, c.googlePayProviders[0].providerId, _);
|
|
5479
|
+
else if (!l && c.hasApplePayProviders && await this.isApplePayAvailable()) o(Q.applepay) && this.addApplePay(e, t, n, y.providerId || "", y);
|
|
5384
5480
|
else if (l) {
|
|
5385
5481
|
let a = () => {
|
|
5386
5482
|
window.postMessage({
|
|
@@ -5409,9 +5505,9 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5409
5505
|
if (c.hasCardProviders && o(Q.card) && s.push({
|
|
5410
5506
|
title: "Card",
|
|
5411
5507
|
description: "Credit or Debit",
|
|
5412
|
-
icon:
|
|
5508
|
+
icon: rt,
|
|
5413
5509
|
render: (e) => {
|
|
5414
|
-
this.initCardProcessor(e).addCard(e, this.getForm(e), r?.cardProviderId || "", t, n,
|
|
5510
|
+
this.initCardProcessor(e).addCard(e, this.getForm(e), r?.cardProviderId || "", t, n, f);
|
|
5415
5511
|
},
|
|
5416
5512
|
activate: () => {
|
|
5417
5513
|
a(), window.postMessage({
|
|
@@ -5421,9 +5517,9 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5421
5517
|
}
|
|
5422
5518
|
}), c.hasPaypalProviders && o(Q.paypal) && s.push({
|
|
5423
5519
|
title: "Paypal",
|
|
5424
|
-
icon:
|
|
5520
|
+
icon: nt,
|
|
5425
5521
|
render: (e) => {
|
|
5426
|
-
this.initPaypalProcessor(e).addPaypal(e, this.getForm(e), t, n, c.paypalProviders[0],
|
|
5522
|
+
this.initPaypalProcessor(e).addPaypal(e, this.getForm(e), t, n, c.paypalProviders[0], p);
|
|
5427
5523
|
},
|
|
5428
5524
|
activate: () => {
|
|
5429
5525
|
a(), window.postMessage({
|
|
@@ -5432,11 +5528,11 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5432
5528
|
}, "*");
|
|
5433
5529
|
}
|
|
5434
5530
|
}), c.hasPayToProviders && o(Q.payto)) {
|
|
5435
|
-
if (
|
|
5531
|
+
if (O(m.description)) s.push({
|
|
5436
5532
|
title: "PayTo",
|
|
5437
|
-
icon:
|
|
5533
|
+
icon: ot,
|
|
5438
5534
|
render: (e) => {
|
|
5439
|
-
this.initPayToProcessor(e).addPayTo(e, t, c.payToProviders[0],
|
|
5535
|
+
this.initPayToProcessor(e).addPayTo(e, t, c.payToProviders[0], m);
|
|
5440
5536
|
},
|
|
5441
5537
|
activate: () => {
|
|
5442
5538
|
a(), window.postMessage({
|
|
@@ -5451,9 +5547,9 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5451
5547
|
}
|
|
5452
5548
|
}
|
|
5453
5549
|
c.hasBnplProviders && c.bnplProviders.forEach((e) => {
|
|
5454
|
-
let i =
|
|
5550
|
+
let i = dn[e.providerType];
|
|
5455
5551
|
if (!i) return;
|
|
5456
|
-
let c =
|
|
5552
|
+
let c = pi(e.providerType);
|
|
5457
5553
|
if (!c || !o(c)) return;
|
|
5458
5554
|
let l = i.icon ? `${this.config.cssUrl}icons/${i.icon}.svg` : null;
|
|
5459
5555
|
s.push({
|
|
@@ -5461,7 +5557,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5461
5557
|
description: i.description || e.options?.terms?.replaceAll(/(\d+\.\d{3,})/g, (e, t) => parseFloat(t).toFixed(2)),
|
|
5462
5558
|
icon: l,
|
|
5463
5559
|
render: (i) => {
|
|
5464
|
-
e.providerType === "upi" ? this.addUpi(i.id, t, e.providerId, r?.upiOptions || {}) : this.initCheckoutProcessor(i).addCheckout(i, t, n, e.providerType, e.providerId,
|
|
5560
|
+
e.providerType === "upi" ? this.addUpi(i.id, t, e.providerId, r?.upiOptions || {}) : this.initCheckoutProcessor(i).addCheckout(i, t, n, e.providerType, e.providerId, h, {
|
|
5465
5561
|
...e.options,
|
|
5466
5562
|
...e.clientParameters
|
|
5467
5563
|
});
|
|
@@ -5476,9 +5572,9 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5476
5572
|
});
|
|
5477
5573
|
}), c.hasGooglePayProviders && o(Q.googlepay) && s.push({
|
|
5478
5574
|
title: "Google Pay",
|
|
5479
|
-
icon:
|
|
5575
|
+
icon: it,
|
|
5480
5576
|
render: (e) => {
|
|
5481
|
-
this.initGooglePayProcessor(e).addGooglePay(e, c.hasGooglePayProviders ? c.googlePayProviders[0].providerId : "", t, n,
|
|
5577
|
+
this.initGooglePayProcessor(e).addGooglePay(e, c.hasGooglePayProviders ? c.googlePayProviders[0].providerId : "", t, n, _);
|
|
5482
5578
|
},
|
|
5483
5579
|
activate: () => {
|
|
5484
5580
|
a(), window.postMessage({
|
|
@@ -5488,9 +5584,9 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5488
5584
|
}
|
|
5489
5585
|
}), c.hasApplePayProviders && o(Q.applepay) && await this.isApplePayAvailable() && s.push({
|
|
5490
5586
|
title: "Apple Pay",
|
|
5491
|
-
icon:
|
|
5587
|
+
icon: _r,
|
|
5492
5588
|
render: (e) => {
|
|
5493
|
-
this.addApplePay(e.id, t, n,
|
|
5589
|
+
this.addApplePay(e.id, t, n, y.providerId || "", y);
|
|
5494
5590
|
},
|
|
5495
5591
|
activate: () => {
|
|
5496
5592
|
a(), window.postMessage({
|
|
@@ -5499,9 +5595,9 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5499
5595
|
}, "*");
|
|
5500
5596
|
}
|
|
5501
5597
|
});
|
|
5502
|
-
let l =
|
|
5598
|
+
let l = E({
|
|
5503
5599
|
el: document.getElementById(e),
|
|
5504
|
-
component:
|
|
5600
|
+
component: _t,
|
|
5505
5601
|
props: { elements: s }
|
|
5506
5602
|
});
|
|
5507
5603
|
this.setDestroyDropIn(i, l.destroy);
|
|
@@ -5518,8 +5614,8 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5518
5614
|
let o = t && document.getElementById(t) || null;
|
|
5519
5615
|
if (!o) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
|
|
5520
5616
|
if (!e(n)) throw this.showErrorMessage(o, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5521
|
-
if (!
|
|
5522
|
-
return r &&= r.toUpperCase(), this._cleanUp(o), this._initForm(o), this.setAmount(n), this.setCurrency(r), this.initProcessors(o, n, r, i || "", "", {},
|
|
5617
|
+
if (!B(r)) throw this.showErrorMessage(o, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
|
|
5618
|
+
return r &&= r.toUpperCase(), this._cleanUp(o), this._initForm(o), this.setAmount(n), this.setCurrency(r), this.initProcessors(o, n, r, i || "", "", {}, z(this, "[addPaypal][initProcessors], callback", (e, t) => {
|
|
5523
5619
|
let s = t.paypalProviders[0] || i || "";
|
|
5524
5620
|
s ? this.initPaypalProcessor(o).addPaypal(o, this.getForm(o), n, r, s, a) : (this.showErrorMessage(o, "Missing parameter: Provider Id"), this.userOnFailure?.({ error: "Missing parameter: Provider Id" }));
|
|
5525
5621
|
})), this;
|
|
@@ -5534,20 +5630,20 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5534
5630
|
if (!a) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
|
|
5535
5631
|
if (!e(n)) throw this.showErrorMessage(a, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5536
5632
|
this._cleanUp(a), this._initForm(a), this.setAmount(n), this.setCurrency("AUD");
|
|
5537
|
-
let o =
|
|
5633
|
+
let o = z(this, "[localAddPayTo]", (e, t) => {
|
|
5538
5634
|
this.log("[addPayTo, local]", {
|
|
5539
5635
|
amount: n,
|
|
5540
5636
|
localProviderId: e,
|
|
5541
5637
|
localOptions: t
|
|
5542
5638
|
}), this.initPayToProcessor(a).addPayTo(a, n, e, t);
|
|
5543
5639
|
});
|
|
5544
|
-
return r && i?.maximumAmount && i?.description ? (o(r, i), this) : (this.initProcessors(a, n, "AUD", r || "", "", {},
|
|
5640
|
+
return r && i?.maximumAmount && i?.description ? (o(r, i), this) : (this.initProcessors(a, n, "AUD", r || "", "", {}, z(this, "[addPayTo][initProcessors], callback", (e, t) => {
|
|
5545
5641
|
if (!t.hasPayToProviders) return;
|
|
5546
5642
|
let n = t.payToProvidersWithOptions[0];
|
|
5547
5643
|
o(n.providerId, {
|
|
5548
5644
|
maximumAmount: n.maximumAmount,
|
|
5549
5645
|
description: n.description,
|
|
5550
|
-
metadata:
|
|
5646
|
+
metadata: G(i?.metadata)
|
|
5551
5647
|
});
|
|
5552
5648
|
})), this);
|
|
5553
5649
|
}
|
|
@@ -5561,9 +5657,9 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5561
5657
|
let o = t && document.getElementById(t) || null;
|
|
5562
5658
|
if (!o) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
|
|
5563
5659
|
if (!e(n)) throw this.showErrorMessage(o, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5564
|
-
if (!
|
|
5660
|
+
if (!B(r)) throw this.showErrorMessage(o, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
|
|
5565
5661
|
r &&= r.toUpperCase(), this._cleanUp(o), this._initForm(o), this.setAmount(n), this.setCurrency(r);
|
|
5566
|
-
let s =
|
|
5662
|
+
let s = z(this, "[localAddGooglePay]", (e, t) => {
|
|
5567
5663
|
this.log("[addGooglePay, local]", {
|
|
5568
5664
|
amount: n,
|
|
5569
5665
|
currency: r,
|
|
@@ -5571,7 +5667,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5571
5667
|
localOptions: t
|
|
5572
5668
|
}), this.initGooglePayProcessor(o).addGooglePay(o, e, n, r, t);
|
|
5573
5669
|
});
|
|
5574
|
-
return i && a?.gateway && a?.googlePayGatewayMerchantId ? (s(i, a), this) : (this.initProcessors(o, n, r, i || "", "", {},
|
|
5670
|
+
return i && a?.gateway && a?.googlePayGatewayMerchantId ? (s(i, a), this) : (this.initProcessors(o, n, r, i || "", "", {}, z(this, "[addGooglePay][initProcessors], callback", (e, t) => {
|
|
5575
5671
|
if (!t.hasGooglePayProviders) return;
|
|
5576
5672
|
let n = i && t.googlePayProviders.find((e) => e.providerId === i) || t.googlePayProviders[0];
|
|
5577
5673
|
s(n.providerId, {
|
|
@@ -5581,12 +5677,12 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5581
5677
|
googlePayMerchantName: n.googlePayMerchantName,
|
|
5582
5678
|
buttonOptions: a?.buttonOptions,
|
|
5583
5679
|
billingDetailsRequired: a?.billingDetailsRequired,
|
|
5584
|
-
metadata:
|
|
5680
|
+
metadata: G(a?.metadata)
|
|
5585
5681
|
});
|
|
5586
5682
|
})), this);
|
|
5587
5683
|
}
|
|
5588
5684
|
async isApplePayAvailable() {
|
|
5589
|
-
if (await
|
|
5685
|
+
if (await ur(), typeof window > "u" || !window.ApplePaySession) return !1;
|
|
5590
5686
|
try {
|
|
5591
5687
|
return ApplePaySession.canMakePayments() === !0;
|
|
5592
5688
|
} catch {
|
|
@@ -5594,7 +5690,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5594
5690
|
}
|
|
5595
5691
|
}
|
|
5596
5692
|
addApplePay(e, t, n, r, i) {
|
|
5597
|
-
return this.isApplePayAvailable().then(
|
|
5693
|
+
return this.isApplePayAvailable().then(z(this, "[addApplePay], available", (a) => {
|
|
5598
5694
|
a ? this.renderApplePay(e, t, n, r, i) : this.log("Your browser does not support ApplePay");
|
|
5599
5695
|
})).catch(() => {}), this;
|
|
5600
5696
|
}
|
|
@@ -5608,9 +5704,9 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5608
5704
|
let o = t && document.getElementById(t) || null;
|
|
5609
5705
|
if (!o) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
|
|
5610
5706
|
if (!e(n)) throw this.showErrorMessage(o, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5611
|
-
if (!
|
|
5707
|
+
if (!B(r)) throw this.showErrorMessage(o, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
|
|
5612
5708
|
r &&= r.toUpperCase(), this._cleanUp(o), this._initForm(o), this.setAmount(n), this.setCurrency(r);
|
|
5613
|
-
let s =
|
|
5709
|
+
let s = z(this, "[localAddApplePay]", (e, t, i, a) => {
|
|
5614
5710
|
this.log("[addApplePay, local]", {
|
|
5615
5711
|
amount: n,
|
|
5616
5712
|
currency: r,
|
|
@@ -5623,7 +5719,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5623
5719
|
clientParameters: a
|
|
5624
5720
|
});
|
|
5625
5721
|
});
|
|
5626
|
-
this.initProcessors(o, n, r, i || "", "", {},
|
|
5722
|
+
this.initProcessors(o, n, r, i || "", "", {}, z(this, "[addApplePay][initProcessors], callback", (e, t) => {
|
|
5627
5723
|
if (!t.hasApplePayProviders) return;
|
|
5628
5724
|
let n = i && t.applePayProviders.find((e) => e.providerId === i) || t.applePayProviders[0];
|
|
5629
5725
|
s(n.providerId, n.providerType, {
|
|
@@ -5638,7 +5734,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5638
5734
|
supportedNetworks: a?.supportedNetworks || n.supportedNetworks,
|
|
5639
5735
|
supportedCountries: a?.supportedCountries || n.supportedCountries,
|
|
5640
5736
|
applePayVersion: a?.applePayVersion || n.applePayVersion,
|
|
5641
|
-
metadata:
|
|
5737
|
+
metadata: G(a?.metadata)
|
|
5642
5738
|
}, e.clientParameters || n.clientParameters);
|
|
5643
5739
|
}));
|
|
5644
5740
|
}
|
|
@@ -5663,13 +5759,13 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5663
5759
|
});
|
|
5664
5760
|
let i = e && document.getElementById(e) || null;
|
|
5665
5761
|
if (!i) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
|
|
5666
|
-
if (!
|
|
5667
|
-
if (!
|
|
5668
|
-
if (!
|
|
5669
|
-
if (!
|
|
5762
|
+
if (!O(n)) throw this.showErrorMessage(i, "Missing parameter: providerId"), this.userOnFailure?.({ error: "Missing parameter: Provider Id" }), TypeError("Missing parameter: providerId");
|
|
5763
|
+
if (!O(r?.email)) throw this.showErrorMessage(i, "Missing parameter: options.email"), this.userOnFailure?.({ error: "Missing parameter: options.email" }), TypeError("Missing parameter: options.email");
|
|
5764
|
+
if (!O(r?.name)) throw this.showErrorMessage(i, "Missing parameter: options.name"), this.userOnFailure?.({ error: "Missing parameter: options.name" }), TypeError("Missing parameter: options.name");
|
|
5765
|
+
if (!O(r?.documentId)) throw this.showErrorMessage(i, "Missing parameter: options.documentId"), this.userOnFailure?.({ error: "Missing parameter: options.documentId" }), TypeError("Missing parameter: options.documentId");
|
|
5670
5766
|
this._initForm(i), this.setAmount(t);
|
|
5671
5767
|
let a = this.order?.orderItems || [], o = this.customer || {}, s = this.billingAddress || {};
|
|
5672
|
-
|
|
5768
|
+
O(o.firstName) || (o.firstName = r.name), O(o.email) || (o.email = r.email), O(s.firstName) || (s.firstName = r.name), O(s.email) || (s.email = r.email), O(o.phoneNumber) || (o.phoneNumber = "+3146781223"), O(s.phoneNumber) || (s.phoneNumber = "+3146781223"), a.length === 0 && a.push({
|
|
5673
5769
|
name: "UPI Payment",
|
|
5674
5770
|
sku: "UPI Payment",
|
|
5675
5771
|
quantity: 1,
|
|
@@ -5683,7 +5779,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5683
5779
|
orderItems: a,
|
|
5684
5780
|
customer: o,
|
|
5685
5781
|
billingAddress: s,
|
|
5686
|
-
metadata:
|
|
5782
|
+
metadata: G(r?.metadata)
|
|
5687
5783
|
};
|
|
5688
5784
|
return this.initCheckoutProcessor(i).addCheckout(i, t, this.currency, "upi", n, c, {
|
|
5689
5785
|
documentId: r.documentId,
|
|
@@ -5697,7 +5793,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5697
5793
|
}
|
|
5698
5794
|
addThreeDsWithFullParameters(t, n, r, i, a, o, s, c, l) {
|
|
5699
5795
|
this.log("[addThreeDsWithFullParameters]", {
|
|
5700
|
-
cardNumber:
|
|
5796
|
+
cardNumber: Ge(n),
|
|
5701
5797
|
expiryDate: r,
|
|
5702
5798
|
cardholder: i,
|
|
5703
5799
|
email: a,
|
|
@@ -5708,18 +5804,18 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5708
5804
|
});
|
|
5709
5805
|
let u = t && document.getElementById(t) || null;
|
|
5710
5806
|
if (!e(o)) throw this.showErrorMessage(u, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5711
|
-
if (!
|
|
5712
|
-
return s &&= s.toUpperCase(), this._cleanUp(u), this._initForm(u), this.setAmount(o), this.setCurrency(s), n =
|
|
5713
|
-
e.hasThreeDsProviders ? this.add3DsProcessor(u, e.threeDsProviders[0].providerId, e.threeDsProviders[0].providerType, "", e.threeDsProviders[0].clientParameters || {},
|
|
5807
|
+
if (!B(s)) throw this.showErrorMessage(u, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
|
|
5808
|
+
return s &&= s.toUpperCase(), this._cleanUp(u), this._initForm(u), this.setAmount(o), this.setCurrency(s), n = Je(n), this.getPaymentOptions(o, s, z(this, "[addThreeDsWithFullParameters][getPaymentOptions], callback", (e) => {
|
|
5809
|
+
e.hasThreeDsProviders ? this.add3DsProcessor(u, e.threeDsProviders[0].providerId, e.threeDsProviders[0].providerType, "", e.threeDsProviders[0].clientParameters || {}, z(this, "[addThreeDsWithFullParameters][add3DsProcessor], onload", () => {
|
|
5714
5810
|
this.threeDsProcessor?.setEmail(a), this.threeDsProcessor?.setPaymentInfo({
|
|
5715
5811
|
cardNumber: n,
|
|
5716
5812
|
expiryDate: r,
|
|
5717
5813
|
cardholder: i,
|
|
5718
5814
|
ccv: c
|
|
5719
5815
|
}), this.threeDsProcessor?.threeDSInvoke(u, !!l?.requireChallenge, (e) => {
|
|
5720
|
-
|
|
5816
|
+
vi(), this.log("[threeDSInvoke], postAuthData", e), this.userOnSuccess?.({ threeDSServerTransID: e.threeDSServerTransID });
|
|
5721
5817
|
});
|
|
5722
|
-
}),
|
|
5818
|
+
}), z(this, "[addThreeDsWithFullParameters][add3DsProcessor], onerror", () => {
|
|
5723
5819
|
this.log(`Cannot load 3DS provider (${e.threeDsProviders[0].providerType})`), this.userOnSuccess?.({});
|
|
5724
5820
|
})) : (this.log("No 3DS providers found"), this.userOnSuccess?.({}));
|
|
5725
5821
|
})), this;
|
|
@@ -5727,7 +5823,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5727
5823
|
tokeniseWith3Ds(t, n, r, i, a, o, s, c, l, u, d) {
|
|
5728
5824
|
this.log("[tokeniseWith3Ds]", {
|
|
5729
5825
|
providerId: n,
|
|
5730
|
-
cardNumber:
|
|
5826
|
+
cardNumber: Ge(r),
|
|
5731
5827
|
expiryDate: i,
|
|
5732
5828
|
cardholder: a,
|
|
5733
5829
|
ccv: "***",
|
|
@@ -5738,35 +5834,59 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5738
5834
|
options: d
|
|
5739
5835
|
});
|
|
5740
5836
|
let f = t && document.getElementById(t) || null;
|
|
5741
|
-
if (!
|
|
5837
|
+
if (!O(n)) throw this.showErrorMessage(f, "Missing parameter: providerId"), this.userOnFailure?.({ error: "Missing parameter: Provider Id" }), TypeError("Missing parameter: providerId");
|
|
5742
5838
|
if (!e(c)) throw this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5743
|
-
if (!
|
|
5744
|
-
return l &&= l.toUpperCase(), this._cleanUp(f), this._initForm(f), this.setAmount(c), this.setCurrency(l), r =
|
|
5839
|
+
if (!B(l)) throw this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
|
|
5840
|
+
return l &&= l.toUpperCase(), this._cleanUp(f), this._initForm(f), this.setAmount(c), this.setCurrency(l), r = Je(r), this.initProcessors(f, c, l, n, "", {
|
|
5745
5841
|
createNetworkToken: d?.createNetworkToken,
|
|
5746
5842
|
clickToPayEnabled: !1
|
|
5747
|
-
},
|
|
5748
|
-
|
|
5749
|
-
this.tokeniseCard(n, r, i, a, o, W(u), e, d);
|
|
5750
|
-
};
|
|
5751
|
-
this.threeDsProcessor ? (this.threeDsProcessor?.setPaymentInfo({
|
|
5843
|
+
}, z(this, "[tokeniseWith3Ds][initProcessors], callback", (e, t) => {
|
|
5844
|
+
this.fraudProcessor?.setPaymentInfo({
|
|
5752
5845
|
cardNumber: r,
|
|
5753
5846
|
expiryDate: i,
|
|
5754
5847
|
cardholder: a,
|
|
5755
5848
|
ccv: o
|
|
5756
|
-
}), this.
|
|
5757
|
-
|
|
5758
|
-
|
|
5849
|
+
}), this.runFraudGate(f, (t, s) => {
|
|
5850
|
+
let c = (e) => {
|
|
5851
|
+
this.initCardProcessor(null).tokeniseCard(n, r, i, a, o, G(u), e, d, t);
|
|
5852
|
+
};
|
|
5853
|
+
s ? c(s) : this.threeDsOrTokenise(f, e, r, i, a, o, d, c);
|
|
5854
|
+
});
|
|
5759
5855
|
})), this;
|
|
5760
5856
|
}
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
})
|
|
5857
|
+
threeDsOrTokenise(e, t, n, r, i, a, o, s) {
|
|
5858
|
+
this.threeDsProcessor ? (this.threeDsProcessor?.setPaymentInfo({
|
|
5859
|
+
cardNumber: n,
|
|
5860
|
+
expiryDate: r,
|
|
5861
|
+
cardholder: i,
|
|
5862
|
+
ccv: a
|
|
5863
|
+
}), this.threeDsProcessor?.threeDSInvoke(e, !!o?.requireChallenge, (e) => {
|
|
5864
|
+
vi(), this.log("[threeDSInvoke], postAuthData", e), t.threeDsProviderType === "payglocal" ? this.userOnSuccess?.({ threeDSServerTransID: e.threeDSServerTransID }) : s(e.threeDSServerTransID);
|
|
5865
|
+
})) : (this.log("threeDsProcessor NOT FOUND"), s());
|
|
5866
|
+
}
|
|
5867
|
+
tokeniseCard(t, n, r, i, a, o, s, c) {
|
|
5868
|
+
this.log("[tokeniseCard]", {
|
|
5869
|
+
providerId: t,
|
|
5870
|
+
cardNumber: Ge(n),
|
|
5871
|
+
expiryDate: r,
|
|
5872
|
+
cardHolderName: i,
|
|
5873
|
+
options: c,
|
|
5874
|
+
metadata: o
|
|
5875
|
+
}), n = Je(n), c?.amount && e(c.amount) && this.setAmount(c.amount), c?.currency && B(c.currency) && this.setCurrency(c.currency.toUpperCase());
|
|
5876
|
+
let l = (e, l) => {
|
|
5877
|
+
this.initCardProcessor(null).tokeniseCard(t, n, r, i, a, G(o), l || s, c, e);
|
|
5878
|
+
};
|
|
5879
|
+
return !this.amount || !this.currency ? (l(), this) : (this.initProcessors(null, this.amount, this.currency, t, "", {
|
|
5880
|
+
createNetworkToken: c?.createNetworkToken,
|
|
5881
|
+
clickToPayEnabled: !1
|
|
5882
|
+
}, z(this, "[tokeniseCard][initProcessors], callback", () => {
|
|
5883
|
+
this.fraudProcessor?.setPaymentInfo({
|
|
5884
|
+
cardNumber: n,
|
|
5885
|
+
expiryDate: r,
|
|
5886
|
+
cardholder: i,
|
|
5887
|
+
ccv: a
|
|
5888
|
+
}), this.runFraudGate(null, l);
|
|
5889
|
+
})), this);
|
|
5770
5890
|
}
|
|
5771
5891
|
addThreeDsWithToken(t, n, r, i, a, o) {
|
|
5772
5892
|
if (this.log("[addThreeDsWithToken]", {
|
|
@@ -5775,37 +5895,50 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5775
5895
|
amount: r,
|
|
5776
5896
|
currency: i,
|
|
5777
5897
|
options: o
|
|
5778
|
-
}), !
|
|
5898
|
+
}), !O(t)) throw this.userOnFailure?.({ error: "Missing parameter: Token Id" }), TypeError("Missing parameter: tokenId");
|
|
5779
5899
|
if (!e(r)) throw this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5780
|
-
if (!
|
|
5781
|
-
return i &&= i.toUpperCase(), this.setAmount(r), this.setCurrency(i), this.initProcessors(null, r, i, "", t, { clickToPayEnabled: !1 },
|
|
5782
|
-
this.
|
|
5783
|
-
|
|
5784
|
-
})
|
|
5785
|
-
cardNumber: "",
|
|
5786
|
-
expiryDate: "",
|
|
5787
|
-
cardholder: "",
|
|
5788
|
-
ccv: a
|
|
5789
|
-
})) : this.userOnFailure?.({ error: "Cannot load 3DS provider" });
|
|
5900
|
+
if (!B(i)) throw this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
|
|
5901
|
+
return i &&= i.toUpperCase(), this.setAmount(r), this.setCurrency(i), this.initProcessors(null, r, i, "", t, { clickToPayEnabled: !1 }, z(this, "[addThreeDsWithToken][initProcessors], callback", () => {
|
|
5902
|
+
this.fraudProcessor?.setPaymentReference({ tokenId: t }), this.runFraudGate(null, (e, r) => {
|
|
5903
|
+
r ? this.userOnSuccess?.({ threeDSServerTransID: r }) : this.threeDsWithToken(t, n, a, o);
|
|
5904
|
+
});
|
|
5790
5905
|
})), this;
|
|
5791
5906
|
}
|
|
5792
|
-
|
|
5907
|
+
threeDsWithToken(e, t, n, r) {
|
|
5908
|
+
this.threeDsProcessor ? (this.threeDsProcessor?.setEmail(t), this.threeDsProcessor?.setTokenId(e), this.threeDsProcessor?.threeDSInvoke(null, !!r?.requireChallenge, (e) => {
|
|
5909
|
+
vi(), this.log("[threeDSInvoke], postAuthData", e), this.userOnSuccess?.({ threeDSServerTransID: e.threeDSServerTransID }), this.threeDsProcessor?.updateTokenExternal3dsData(e.externalThreeDsData);
|
|
5910
|
+
}), this.threeDsProcessor?.setPaymentInfo({
|
|
5911
|
+
cardNumber: "",
|
|
5912
|
+
expiryDate: "",
|
|
5913
|
+
cardholder: "",
|
|
5914
|
+
ccv: n
|
|
5915
|
+
})) : this.userOnFailure?.({ error: "Cannot load 3DS provider" });
|
|
5916
|
+
}
|
|
5917
|
+
runFraudGate(e, t) {
|
|
5918
|
+
In(this.cardFraudProcessor, this.fraudManageOrder, e, {
|
|
5919
|
+
onShow: vi,
|
|
5920
|
+
log: this.log.bind(this)
|
|
5921
|
+
}).then(z(this, "[runFraudGate]", (n) => {
|
|
5922
|
+
"error" in n ? (vi(), this.showErrorMessage(e, n.error), this.userOnFailure?.({ error: n.error })) : t(n.fraudCheckResult, n.threeDSServerTransID);
|
|
5923
|
+
}));
|
|
5924
|
+
}
|
|
5925
|
+
getPaymentOptions(e, t, n, r) {
|
|
5793
5926
|
this.log("[getPaymentOptions], request", {
|
|
5794
5927
|
amount: e,
|
|
5795
5928
|
currency: t
|
|
5796
5929
|
}), t &&= t.toUpperCase();
|
|
5797
|
-
let
|
|
5798
|
-
if (this.paymentOptions[
|
|
5799
|
-
n?.(this.paymentOptions[
|
|
5930
|
+
let i = `${e}${t}`;
|
|
5931
|
+
if (this.paymentOptions[i]) {
|
|
5932
|
+
n?.(this.paymentOptions[i]);
|
|
5800
5933
|
return;
|
|
5801
5934
|
}
|
|
5802
|
-
let
|
|
5803
|
-
this.log("[getPaymentOptions], failure", t), this.showErrorMessage(null, "Unable to configure SDK"), this.userOnFailure?.({ error: "Unable to configure SDK" });
|
|
5804
|
-
}),
|
|
5805
|
-
let
|
|
5806
|
-
this.log("[getPaymentOptions], success",
|
|
5935
|
+
let a = z(this, "[getPaymentOptions], failure", (e, t) => {
|
|
5936
|
+
this.log("[getPaymentOptions], failure", t), r?.(), this.showErrorMessage(null, "Unable to configure SDK"), this.userOnFailure?.({ error: "Unable to configure SDK" });
|
|
5937
|
+
}), o = z(this, "[getPaymentOptions], success", (e, t) => {
|
|
5938
|
+
let r = JSON.parse(t);
|
|
5939
|
+
this.log("[getPaymentOptions], success", r), this.paymentOptions[i] = r, n?.(r);
|
|
5807
5940
|
});
|
|
5808
|
-
this.httpInvoker?.invoke(
|
|
5941
|
+
this.httpInvoker?.invoke(bi(this.config.apiUrl)[yi.PROVIDERS_INFO].url + `?amount=${e}¤cy=${t}`, bi(this.config.apiUrl)[yi.PROVIDERS_INFO].method, {}, o, a);
|
|
5809
5942
|
}
|
|
5810
5943
|
getProviderInfo(e, t, n, r, i, a) {
|
|
5811
5944
|
this.log("[getProviderInfo], request", {
|
|
@@ -5819,14 +5952,14 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5819
5952
|
i?.(this.paymentOptions[o]);
|
|
5820
5953
|
return;
|
|
5821
5954
|
}
|
|
5822
|
-
let s =
|
|
5955
|
+
let s = z(this, "[getProviderInfo], error", (e, t) => {
|
|
5823
5956
|
this.log("[getProviderInfo], error", e, t), a({ error: "Unable to get provider information" });
|
|
5824
|
-
}), c =
|
|
5957
|
+
}), c = z(this, "[getProviderInfo], success", (e, t) => {
|
|
5825
5958
|
this.log("[getProviderInfo], success", e, t);
|
|
5826
5959
|
let n = JSON.parse(t);
|
|
5827
5960
|
this.log("[getProviderInfo], data", n), this.paymentOptions[o] = n, i(n);
|
|
5828
5961
|
});
|
|
5829
|
-
this.httpInvoker?.invoke(
|
|
5962
|
+
this.httpInvoker?.invoke(bi(this.config.apiUrl, e, r)[yi.PROVIDER_INFO].url + `?amount=${t}¤cy=${n}`, bi(this.config.apiUrl, e, r)[yi.PROVIDER_INFO].method, {}, c, s);
|
|
5830
5963
|
}
|
|
5831
5964
|
setAmount(e) {
|
|
5832
5965
|
return Number(e) === Number(this.amount) || Number(e) < 0 || (this.log("[setAmount]", Number(e)), this.amount = Number(e), this.cardProcessor?.setAmount(this.amount), this.threeDsProcessor?.setAmount(this.amount), this.secondaryThreeDsProcessor?.setAmount(this.amount), this.paypalProcessor?.setAmount(this.amount), this.fraudProcessor?.setAmount(this.amount), this.googlePayProcessor?.setAmount(this.amount), this.applePayProcessor?.setAmount(this.amount), this.paymentMethodProcessor?.setAmount(this.amount), window.postMessage({
|
|
@@ -5860,7 +5993,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5860
5993
|
return this;
|
|
5861
5994
|
}
|
|
5862
5995
|
showErrorMessage(e, t) {
|
|
5863
|
-
this.log(t),
|
|
5996
|
+
this.log(t), I(e, t);
|
|
5864
5997
|
}
|
|
5865
5998
|
setBillingAddress(e) {
|
|
5866
5999
|
return this.log("[setBillingAddress]", e), this.billingAddress = { ...e }, this.cardProcessor?.setBillingAddress(this.billingAddress), this.googlePayProcessor?.setBillingAddress(this.billingAddress), this.applePayProcessor?.setBillingAddress(this.billingAddress), this.threeDsProcessor?.setAddressInfo(this.billingAddress), this.fraudProcessor?.setAddressInfo(this.billingAddress), this.paymentMethodProcessor?.setBillingAddress(this.billingAddress), window.postMessage({
|
|
@@ -5876,7 +6009,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5876
6009
|
}
|
|
5877
6010
|
setOrderInfo(e) {
|
|
5878
6011
|
return this.log("[setOrderInfo]", e), this.order = { ...e }, this.cardProcessor?.setOrderInfo(this.order), this.googlePayProcessor?.setOrderInfo(this.order), this.applePayProcessor?.setOrderInfo(this.order), this.fraudProcessor?.setOrderInfo(this.order), this.paymentMethodProcessor?.setOrderInfo(this.order), window.postMessage({
|
|
5879
|
-
status:
|
|
6012
|
+
status: Ve,
|
|
5880
6013
|
order: e
|
|
5881
6014
|
}, "*"), this;
|
|
5882
6015
|
}
|
|
@@ -5906,62 +6039,64 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5906
6039
|
return;
|
|
5907
6040
|
}
|
|
5908
6041
|
this.initProcessorsHandlers.push(o);
|
|
5909
|
-
let s = {}, c = "", l = "", u = !1, d = {}, f = "", p = "", m = {}, h = "", g = "", _ = {}, v = !1, y = (e) => {
|
|
5910
|
-
this.getProviderInfo(r, t, n, i || "",
|
|
6042
|
+
let s = {}, c = "", l = "", u = !1, d = {}, f = "", p = "", m = {}, h = "", g = "", _ = {}, v = !1, y = !1, b = (e) => {
|
|
6043
|
+
this.getProviderInfo(r, t, n, i || "", z(this, "[getProviderInfo], success", (t) => {
|
|
5911
6044
|
s = { ...t }, !v && t.threeDsProviderId && (f = t.threeDsProviderId, p = t.threeDsProviderType, m = t.threeDsClientParameters || {}), e();
|
|
5912
|
-
}),
|
|
6045
|
+
}), z(this, "[getProviderInfo], error", (t) => {
|
|
5913
6046
|
this.log("Unable to get provider information", t), e();
|
|
5914
6047
|
}));
|
|
5915
|
-
},
|
|
5916
|
-
!e || !t ? i() : this.addFraudProcessor(e, t, n, r, {},
|
|
6048
|
+
}, x = z(this, "[initFraudProcessor]", (e, t, n, r, i) => {
|
|
6049
|
+
this.fraudProcessor = null, this.fraudManageOrder = null, this.skipCardFraud = jt(p), this.cardProcessor?.addFraudProcessor(null), this.paypalProcessor?.addFraudProcessor(null), this.paymentMethodProcessor?.addFraudProcessor(null, null), !e || !t ? i() : this.addFraudProcessor(e, t, n, r, {}, z(this, "[addFraudProcessor], success", () => {
|
|
5917
6050
|
i();
|
|
5918
|
-
}),
|
|
6051
|
+
}), z(this, "[addFraudProcessor], error", () => {
|
|
5919
6052
|
this.log("Error loading fraud provider", t), i();
|
|
5920
6053
|
}));
|
|
5921
|
-
}),
|
|
6054
|
+
}), S = z(this, "[initThreeDsProcessor]", (t, n, i) => {
|
|
5922
6055
|
!t || !n ? i() : this.add3DsProcessor(e, t, n, r, {
|
|
5923
6056
|
...s.clientParameters,
|
|
5924
6057
|
...m
|
|
5925
|
-
},
|
|
6058
|
+
}, z(this, "[add3DsProcessor], success", () => {
|
|
5926
6059
|
i();
|
|
5927
|
-
}),
|
|
6060
|
+
}), z(this, "[add3DsProcessor], error", () => {
|
|
5928
6061
|
this.log("Error loading 3ds provider", n), i();
|
|
5929
6062
|
}));
|
|
5930
|
-
}),
|
|
6063
|
+
}), ee = z(this, "[initSecondaryThreeDsProcessor]", (t, n, i) => {
|
|
5931
6064
|
!t || !n ? i() : this.addSecondary3DsProcessor(e, t, n, r, {
|
|
5932
6065
|
...s.clientParameters,
|
|
5933
6066
|
..._
|
|
5934
|
-
},
|
|
6067
|
+
}, z(this, "[addSecondary3DsProcessor], success", () => {
|
|
5935
6068
|
i();
|
|
5936
|
-
}),
|
|
6069
|
+
}), z(this, "[addSecondary3DsProcessor], error", () => {
|
|
5937
6070
|
this.log("Error loading 3ds provider", n), i();
|
|
5938
6071
|
}));
|
|
5939
|
-
}),
|
|
6072
|
+
}), te = z(this, "[callCallbackHandlers]", (e, t) => {
|
|
5940
6073
|
for (let n of this.initProcessorsHandlers) n(e, t);
|
|
5941
6074
|
this.initProcessorsHandlers = [];
|
|
5942
6075
|
});
|
|
5943
|
-
this.getPaymentOptions(t, n,
|
|
5944
|
-
a?.createNetworkToken && !a?.tokenAuthenticationEnabled && (t.clickToPayEnabled = !1), t?.clickToPayEnabled && a?.clickToPayEnabled !== !1 && (v = !0), t?.hasNetworkTokenProviders && a?.tokenAuthenticationEnabled && (v = !0), !v && t.hasThreeDsProviders && (f = t.threeDsProviders[0].providerId, p = t.threeDsProviders[0].providerType, m = t.threeDsProviders[0].clientParameters || {}), !v && t.allThreeDsProviders?.[0]?.providerId && (h = t.allThreeDsProviders[0].providerId, g = t.allThreeDsProviders[0].providerType, _ = t.allThreeDsProviders[0].clientParameters || {}), !
|
|
6076
|
+
this.getPaymentOptions(t, n, z(this, "[getPaymentOptions], callback", (t) => {
|
|
6077
|
+
a?.createNetworkToken && !a?.tokenAuthenticationEnabled && (t.clickToPayEnabled = !1), t?.clickToPayEnabled && a?.clickToPayEnabled !== !1 && (v = !0, y = !0), t?.hasNetworkTokenProviders && a?.tokenAuthenticationEnabled && (v = !0), !v && t.hasThreeDsProviders && (f = t.threeDsProviders[0].providerId, p = t.threeDsProviders[0].providerType, m = t.threeDsProviders[0].clientParameters || {}), !v && t.allThreeDsProviders?.[0]?.providerId && (h = t.allThreeDsProviders[0].providerId, g = t.allThreeDsProviders[0].providerType, _ = t.allThreeDsProviders[0].clientParameters || {}), !y && t.hasFraudProviders && (c = t.fraudProviders[0].providerId, l = t.fraudProviders[0].providerType, u = t.fraudProviders[0].stopPaymentOnFailure, d = t.fraudProviders[0].clientParameters || {}), t.clickToPayEnabled && a?.clickToPayEnabled !== !1 && this.initClickToPayProcessor(e, {
|
|
5945
6078
|
...t.clickToPayOptions,
|
|
5946
6079
|
...a?.clickToPayOptions,
|
|
5947
6080
|
tokenAuthenticationEnabled: !!a?.tokenAuthenticationEnabled,
|
|
5948
6081
|
networkTokenOptions: a?.networkTokenOptions
|
|
5949
|
-
}), !r && !i ?
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
6082
|
+
}), !r && !i ? x(c, l, u, d, () => {
|
|
6083
|
+
S(f, p, () => {
|
|
6084
|
+
ee(h, g, () => {
|
|
6085
|
+
te(s, t);
|
|
5953
6086
|
});
|
|
5954
6087
|
});
|
|
5955
|
-
}) :
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
6088
|
+
}) : b(() => {
|
|
6089
|
+
x(c, l, u, d, () => {
|
|
6090
|
+
S(f, p, () => {
|
|
6091
|
+
ee(h, g, () => {
|
|
6092
|
+
te(s, t);
|
|
5960
6093
|
});
|
|
5961
6094
|
});
|
|
5962
6095
|
});
|
|
5963
6096
|
});
|
|
5964
|
-
}))
|
|
6097
|
+
}), () => {
|
|
6098
|
+
this.initProcessorsHandlers = [];
|
|
6099
|
+
});
|
|
5965
6100
|
}
|
|
5966
6101
|
addFraudProcessor(e, t, n, r, i, a, o) {
|
|
5967
6102
|
this.log("[addFraudProcessor]", e, t, i), !this.amount || !this.currency ? (this.log("[addFraudProcessor], NOT loaded", {
|
|
@@ -5970,15 +6105,15 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5970
6105
|
billingAddress: this.billingAddress,
|
|
5971
6106
|
customer: this.customer,
|
|
5972
6107
|
order: this.order
|
|
5973
|
-
}), a?.()) :
|
|
6108
|
+
}), a?.()) : _i(t).then(z(this, "[addFraudProcessor], onload", (o) => {
|
|
5974
6109
|
this.log(`Loading ${t}...`, o);
|
|
5975
6110
|
let s = o.default(r);
|
|
5976
|
-
s?.getFraudCheckData && (this.fraudProcessor = new
|
|
6111
|
+
s?.getFraudCheckData && (this.fraudProcessor = new jn(this.log.bind(this), {
|
|
5977
6112
|
debug: this.debug,
|
|
5978
6113
|
environment: this.environment,
|
|
5979
6114
|
publicKey: this.publicKey,
|
|
5980
6115
|
apiUrl: this.config.apiUrl,
|
|
5981
|
-
version:
|
|
6116
|
+
version: M.version,
|
|
5982
6117
|
providerId: e,
|
|
5983
6118
|
stopPaymentOnFailure: n,
|
|
5984
6119
|
metadata: i,
|
|
@@ -5989,8 +6124,8 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
5989
6124
|
onFailure: (e) => {
|
|
5990
6125
|
this.log("[fraudProcessor], failure", e);
|
|
5991
6126
|
}
|
|
5992
|
-
}), this.amount && this.fraudProcessor.setAmount(this.amount), this.currency && this.fraudProcessor.setCurrency(this.currency), this.billingAddress && this.fraudProcessor.setAddressInfo(this.billingAddress), this.customer && this.fraudProcessor.setCustomerInfo(this.customer), this.order && this.fraudProcessor.setOrderInfo(this.order), this.cardProcessor?.addFraudProcessor(this.
|
|
5993
|
-
})).catch(
|
|
6127
|
+
}), this.amount && this.fraudProcessor.setAmount(this.amount), this.currency && this.fraudProcessor.setCurrency(this.currency), this.billingAddress && this.fraudProcessor.setAddressInfo(this.billingAddress), this.customer && this.fraudProcessor.setCustomerInfo(this.customer), this.order && this.fraudProcessor.setOrderInfo(this.order), this.fraudManageOrder = typeof s.manageOrder == "function" ? s.manageOrder : null, this.cardProcessor?.addFraudProcessor(this.cardFraudProcessor), this.paypalProcessor?.addFraudProcessor(this.fraudProcessor), this.paymentMethodProcessor?.addFraudProcessor(this.cardFraudProcessor, this.fraudManageOrder), a?.());
|
|
6128
|
+
})).catch(z(this, "[addFraudProcessor], onerror", (e) => {
|
|
5994
6129
|
this.log(`Error loading ${t}`, e), o?.();
|
|
5995
6130
|
}));
|
|
5996
6131
|
}
|
|
@@ -6002,19 +6137,19 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
6002
6137
|
} : t.threeDsProviders?.find((e) => e.providerId === t.required3dsProvider) || t.threeDsProviders?.[0];
|
|
6003
6138
|
}
|
|
6004
6139
|
add3DsProcessor(e, t, n, r, i, a, o) {
|
|
6005
|
-
this.log("[add3DsProcessor]", t, n),
|
|
6140
|
+
this.log("[add3DsProcessor]", t, n), gi(n).then(z(this, "[add3DsProcessor], onload", (o) => {
|
|
6006
6141
|
this.log(`Loading ${n}...`, o);
|
|
6007
6142
|
let s = o.default(this.log.bind(this), e, {
|
|
6008
6143
|
environment: this.environment,
|
|
6009
6144
|
apiUrl: this.config.apiUrl,
|
|
6010
6145
|
clientParameters: i
|
|
6011
6146
|
});
|
|
6012
|
-
s?.setThreeDsProcessor && (this.threeDsProcessor = new
|
|
6147
|
+
s?.setThreeDsProcessor && (this.threeDsProcessor = new U(this.log.bind(this), {
|
|
6013
6148
|
debug: this.debug,
|
|
6014
6149
|
environment: this.environment,
|
|
6015
6150
|
publicKey: this.publicKey,
|
|
6016
6151
|
apiUrl: this.config.apiUrl,
|
|
6017
|
-
version:
|
|
6152
|
+
version: M.version,
|
|
6018
6153
|
providerId: t,
|
|
6019
6154
|
cardProviderId: r,
|
|
6020
6155
|
threeDsInvoker: {
|
|
@@ -6029,24 +6164,24 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
6029
6164
|
this.log("[threeDsProcessor], failure", e), this.userOnFailure?.({ error: e.error });
|
|
6030
6165
|
}
|
|
6031
6166
|
}), this.amount && this.threeDsProcessor.setAmount(this.amount), this.currency && this.threeDsProcessor.setCurrency(this.currency), this.billingAddress && this.threeDsProcessor.setAddressInfo(this.billingAddress), this.cardProcessor?.addThreeDsProcessor(this.threeDsProcessor), s.setThreeDsProcessor(this.threeDsProcessor), a?.());
|
|
6032
|
-
})).catch(
|
|
6167
|
+
})).catch(z(this, "[add3DsProcessor], onerror", (s) => {
|
|
6033
6168
|
this.log(`Error loading ${n}`, s), n === "default" ? o?.() : this.add3DsProcessor(e, t, "default", r, i, a, o);
|
|
6034
6169
|
}));
|
|
6035
6170
|
}
|
|
6036
6171
|
addSecondary3DsProcessor(e, t, n, r, i, a, o) {
|
|
6037
|
-
this.log("[addSecondary3DsProcessor]", t, n),
|
|
6172
|
+
this.log("[addSecondary3DsProcessor]", t, n), gi(n).then(z(this, "[addSecondary3DsProcessor], onload", (o) => {
|
|
6038
6173
|
this.log(`Loading ${n}...`, o);
|
|
6039
6174
|
let s = o.default(this.log.bind(this), e, {
|
|
6040
6175
|
environment: this.environment,
|
|
6041
6176
|
apiUrl: this.config.apiUrl,
|
|
6042
6177
|
clientParameters: i
|
|
6043
6178
|
});
|
|
6044
|
-
s?.setThreeDsProcessor && (this.secondaryThreeDsProcessor = new
|
|
6179
|
+
s?.setThreeDsProcessor && (this.secondaryThreeDsProcessor = new U(this.log.bind(this), {
|
|
6045
6180
|
debug: this.debug,
|
|
6046
6181
|
environment: this.environment,
|
|
6047
6182
|
publicKey: this.publicKey,
|
|
6048
6183
|
apiUrl: this.config.apiUrl,
|
|
6049
|
-
version:
|
|
6184
|
+
version: M.version,
|
|
6050
6185
|
providerId: t,
|
|
6051
6186
|
cardProviderId: r,
|
|
6052
6187
|
threeDsInvoker: {
|
|
@@ -6061,7 +6196,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
6061
6196
|
this.log("[secondaryThreeDsProcessor], failure", e), this.userOnFailure?.({ error: e.error });
|
|
6062
6197
|
}
|
|
6063
6198
|
}), this.amount && this.secondaryThreeDsProcessor.setAmount(this.amount), this.currency && this.secondaryThreeDsProcessor.setCurrency(this.currency), this.billingAddress && this.secondaryThreeDsProcessor.setAddressInfo(this.billingAddress), this.cardProcessor?.addSecondaryThreeDsProcessor(this.secondaryThreeDsProcessor), s.setThreeDsProcessor(this.secondaryThreeDsProcessor), a?.());
|
|
6064
|
-
})).catch(
|
|
6199
|
+
})).catch(z(this, "[addSecondary3DsProcessor], onerror", (s) => {
|
|
6065
6200
|
this.log(`Error loading ${n}`, s), n === "default" ? o?.() : this.addSecondary3DsProcessor(e, t, "default", r, i, a, o);
|
|
6066
6201
|
}));
|
|
6067
6202
|
}
|
|
@@ -6070,7 +6205,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
6070
6205
|
clickToPayOptions: e,
|
|
6071
6206
|
tokenAuthenticationEnabled: e?.tokenAuthenticationEnabled,
|
|
6072
6207
|
networkTokenOptions: e?.networkTokenOptions
|
|
6073
|
-
},
|
|
6208
|
+
}, z(this, "[preloadClickToPay], callback", (t, n) => {
|
|
6074
6209
|
n.clickToPayEnabled && this.initClickToPayProcessor(null, {
|
|
6075
6210
|
...n.clickToPayOptions,
|
|
6076
6211
|
...e
|
|
@@ -6084,10 +6219,13 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
6084
6219
|
});
|
|
6085
6220
|
let i = t && document.getElementById(t) || null;
|
|
6086
6221
|
if (!i) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
|
|
6087
|
-
if (!
|
|
6222
|
+
if (!O(n)) throw this.showErrorMessage(i, "Missing parameter: customerId"), this.userOnFailure?.({ error: "Missing parameter: Customer Id" }), TypeError("Missing parameter: customerId");
|
|
6088
6223
|
let a = Number(r?.amount) || 0, o = r?.currency || "";
|
|
6089
6224
|
if (a && !e(a)) throw this.showErrorMessage(i, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
6090
|
-
return this._cleanUp(i), this._initForm(i), this.setAmount(a), this.setCurrency(o), this.initProcessors(i, a, o, "", "", {
|
|
6225
|
+
return this._cleanUp(i), this._initForm(i), this.setAmount(a), this.setCurrency(o), this.initProcessors(i, a, o, "", "", {
|
|
6226
|
+
clickToPayEnabled: !1,
|
|
6227
|
+
tokenAuthenticationEnabled: r?.tokenAuthenticationEnabled
|
|
6228
|
+
}, z(this, "[addSavedPaymentMethods][initProcessors], callback", (e, t) => {
|
|
6091
6229
|
let s = {
|
|
6092
6230
|
...r,
|
|
6093
6231
|
tokenAuthenticationEnabled: r?.tokenAuthenticationEnabled && t.hasNetworkTokenProviders,
|
|
@@ -6107,9 +6245,7 @@ var { hideSpinner: oi } = Oe(), si = {
|
|
|
6107
6245
|
}), t;
|
|
6108
6246
|
}
|
|
6109
6247
|
};
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
//#endregion
|
|
6115
|
-
export { li as default };
|
|
6248
|
+
L([R], $.prototype, "init", null), L([R], $.prototype, "execute", null), L([R], $.prototype, "messageHandler", null), L([R], $.prototype, "initCardProcessor", null), L([R], $.prototype, "initClickToPayProcessor", null), L([R], $.prototype, "initPaypalProcessor", null), L([R], $.prototype, "initCheckoutProcessor", null), L([R], $.prototype, "initGooglePayProcessor", null), L([R], $.prototype, "initApplePayProcessor", null), L([R], $.prototype, "initPayToProcessor", null), L([R], $.prototype, "loadCss", null), L([R], $.prototype, "_cleanUp", null), L([R], $.prototype, "getForm", null), L([R], $.prototype, "getSubmit", null), L([R], $.prototype, "getInput", null), L([R], $.prototype, "_initForm", null), L([R], $.prototype, "_setToken", null), L([R], $.prototype, "getSubmitFormHandler", null), L([R], $.prototype, "getDestroyDropIn", null), L([R], $.prototype, "setDestroyDropIn", null), L([R], $.prototype, "addCard", null), L([R], $.prototype, "addCardLeastCost", null), L([R], $.prototype, "addDropIn", null), L([R], $.prototype, "addPaypal", null), L([R], $.prototype, "addPayTo", null), L([R], $.prototype, "addGooglePay", null), L([R], $.prototype, "addApplePay", null), L([R], $.prototype, "addCheckout", null), L([R], $.prototype, "addUpi", null), L([R], $.prototype, "addThreeDsWithFullParameters", null), L([R], $.prototype, "tokeniseWith3Ds", null), L([R], $.prototype, "threeDsOrTokenise", null), L([R], $.prototype, "tokeniseCard", null), L([R], $.prototype, "addThreeDsWithToken", null), L([R], $.prototype, "threeDsWithToken", null), L([R], $.prototype, "getPaymentOptions", null), L([R], $.prototype, "getProviderInfo", null), L([R], $.prototype, "setAmount", null), L([R], $.prototype, "setCurrency", null), L([R], $.prototype, "onSuccess", null), L([R], $.prototype, "onFailure", null), L([R], $.prototype, "onLoaded", null), L([R], $.prototype, "onValidationStatusChange", null), L([R], $.prototype, "onValidate", null), L([R], $.prototype, "showErrorMessage", null), L([R], $.prototype, "setBillingAddress", null), L([R], $.prototype, "setCustomerInfo", null), L([R], $.prototype, "setOrderInfo", null), L([R], $.prototype, "setGeolocation", null), L([R], $.prototype, "checkGeolocation", null), L([R], $.prototype, "initProcessors", null), L([R], $.prototype, "addFraudProcessor", null), L([R], $.prototype, "resolveThreeDsProvider", null), L([R], $.prototype, "add3DsProcessor", null), L([R], $.prototype, "addSecondary3DsProcessor", null), L([R], $.prototype, "preloadClickToPay", null), L([R], $.prototype, "addSavedPaymentMethods", null);
|
|
6249
|
+
// src/sdk/main.ts
|
|
6250
|
+
var xi = new $();
|
|
6251
|
+
export { xi as default };
|