@payfurl/client 4.10.0 → 4.11.1
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/CHANGELOG.md +76 -0
- package/README.md +76 -0
- package/dist/sdk/{CloseIcon-B65NDIbM.js → CloseIcon-Ejad61tT.js} +377 -363
- package/dist/sdk/{DefaultThreeDsProvider-CzqbXEws.js → DefaultThreeDsProvider-bLoDSnkd.js} +24 -24
- package/dist/sdk/{MetricsGlobalThreeDsProvider-B-EQQsEV.js → MetricsGlobalThreeDsProvider-C93ttqbB.js} +16 -16
- package/dist/sdk/{PayWayAppleButton-C-XfcgNS.js → PayWayAppleButton-B1Ttj4J_.js} +1 -1
- package/dist/sdk/{alerts-BvNnAm_q.js → alerts-1YSRy5iI.js} +9 -9
- package/dist/sdk/{cxpay-VbaQA3_P.js → cxpay-DblHb5vN.js} +1 -1
- package/dist/sdk/{default-Diji0SXY.js → default-C7f86Fx-.js} +1 -1
- package/dist/sdk/{ecentric-BlNDCZo_.js → ecentric-B3UohyO_.js} +11 -11
- package/dist/sdk/{epna-CxmJ_mqR.js → epna-DwUg2IlB.js} +1 -1
- package/dist/sdk/{flashbanc-BAxvqtBB.js → flashbanc-LXs8bahL.js} +1 -1
- package/dist/sdk/forter-CLFaJUYa.js +30 -0
- package/dist/sdk/{gpayments-B5KWQV4S.js → gpayments-DoZug3PV.js} +13 -13
- package/dist/sdk/{metrics_global-HMMDzPlb.js → metrics_global-BM-ooge-.js} +1 -1
- package/dist/sdk/{nmi-Ch7qQ6Av.js → nmi-BA3ZTdQa.js} +1 -1
- package/dist/sdk/{nuvei-DRmlfpTL.js → nuvei-DIWsLlLz.js} +29 -29
- package/dist/sdk/{payabli-CiBJ1-vC.js → payabli-DgrTI1Et.js} +1 -1
- package/dist/sdk/payfurl.d.ts +35 -3
- package/dist/sdk/payfurl.es.js +1121 -834
- package/dist/sdk/payfurl.umd.js +8 -8
- package/dist/sdk/{payglocal-uAPlijwL.js → payglocal-ezp0MsaZ.js} +18 -18
- package/dist/sdk/{payway_rest-CjgIP42z.js → payway_rest-4Pjb1c7k.js} +1 -1
- package/dist/sdk/{skybank-D7uRF17E.js → skybank-BgDLlFXX.js} +1 -1
- package/dist/sdk/{strings-BthDdeA6.js → strings-DyifLS9r.js} +13 -13
- package/dist/sdk/style.css +1 -1
- package/dist/sdk/whenRendered-jR4Jls4M.js +12 -0
- package/package.json +1 -1
- package/dist/sdk/forter-R2alfHeE.js +0 -26
package/dist/sdk/payfurl.es.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./strings-
|
|
1
|
+
import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./strings-DyifLS9r.js";
|
|
2
2
|
import { t as d } from "./screen-aNRlfrZR.js";
|
|
3
3
|
import { t as f } from "./redact-Bn_hfytX.js";
|
|
4
|
-
import { $ as p,
|
|
5
|
-
import { n as
|
|
4
|
+
import { $ as p, At as m, B as h, Bt as g, C as ee, Ct as _, Dt as v, Et as y, Ft as te, G as ne, H as re, Ht as ie, I as b, It as ae, J as oe, K as se, L as ce, Lt as le, M as ue, Mt as x, N as de, Nt as fe, Ot as pe, Pt as me, R as he, Rt as ge, S as _e, St as S, Tt as C, U as ve, Ut as ye, V as be, Vt as w, Wt as T, X as xe, _t as Se, a as Ce, at as we, b as Te, bt as Ee, c as De, ct as Oe, d as ke, dt as Ae, et as je, f as Me, ft as Ne, gt as Pe, ht as E, it as Fe, j as Ie, jt as Le, kt as D, lt as Re, m as ze, mt as O, n as Be, nt as Ve, o as He, ot as Ue, pt as We, q as Ge, r as Ke, rt as k, st as A, t as qe, tt as j, ut as Je, v as Ye, vt as Xe, w as Ze, wt as M, x as Qe, xt as $e, y as et, yt as tt, z as nt, zt as N } from "./CloseIcon-Ejad61tT.js";
|
|
5
|
+
import { n as rt, t as P } from "./alerts-1YSRy5iI.js";
|
|
6
|
+
import { t as it } from "./whenRendered-jR4Jls4M.js";
|
|
6
7
|
// node_modules/tslib/tslib.es6.mjs
|
|
7
8
|
function F(e, t, n, r) {
|
|
8
9
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
@@ -11,7 +12,7 @@ function F(e, t, n, r) {
|
|
|
11
12
|
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
12
13
|
}
|
|
13
14
|
// src/utils/ErrorHandler.ts
|
|
14
|
-
var
|
|
15
|
+
var at = class e {
|
|
15
16
|
static instance;
|
|
16
17
|
static environment;
|
|
17
18
|
static publicKey;
|
|
@@ -58,10 +59,10 @@ function I(e, t, n) {
|
|
|
58
59
|
try {
|
|
59
60
|
return r.apply(this, arguments);
|
|
60
61
|
} catch (e) {
|
|
61
|
-
throw new
|
|
62
|
+
throw new at().sendError(t, e.message, st(Array.from(arguments))), console.warn("[ErrorHandled], exception", {
|
|
62
63
|
error: e,
|
|
63
64
|
propertyKey: t,
|
|
64
|
-
arguments:
|
|
65
|
+
arguments: st(Array.from(arguments))
|
|
65
66
|
}), e;
|
|
66
67
|
}
|
|
67
68
|
};
|
|
@@ -71,22 +72,22 @@ function L(e, t, n) {
|
|
|
71
72
|
try {
|
|
72
73
|
return n.apply(e, r);
|
|
73
74
|
} catch (e) {
|
|
74
|
-
throw new
|
|
75
|
+
throw new at().sendError(t, e.message, st(r)), console.warn("[ErrorHandledFunction], exception", {
|
|
75
76
|
error: e,
|
|
76
77
|
funcName: t,
|
|
77
|
-
args:
|
|
78
|
+
args: st(r)
|
|
78
79
|
}), e;
|
|
79
80
|
}
|
|
80
81
|
};
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
-
new
|
|
83
|
+
function ot(e, t, n) {
|
|
84
|
+
new at().sendError(e, t, st(n));
|
|
84
85
|
}
|
|
85
|
-
function
|
|
86
|
+
function st(e) {
|
|
86
87
|
return e.map((e) => f(e));
|
|
87
88
|
}
|
|
88
89
|
// src/components/PaypalIcon.vue
|
|
89
|
-
var
|
|
90
|
+
var ct = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
90
91
|
__name: "PaypalIcon",
|
|
91
92
|
props: {
|
|
92
93
|
size: {},
|
|
@@ -94,31 +95,31 @@ var it = /*#__PURE__*/ E(/* @__PURE__ */ T({
|
|
|
94
95
|
},
|
|
95
96
|
setup(e) {
|
|
96
97
|
let t = e, n = t.grayscale ? "#2A2A2B" : "#253b80", r = t.grayscale ? "#555557" : "#179bd7", i = t.grayscale ? "#000000" : "#222d65", a = `--size: ${t.size}px`;
|
|
97
|
-
return (e, t) => (
|
|
98
|
+
return (e, t) => (x(), C("svg", {
|
|
98
99
|
id: "paypal",
|
|
99
100
|
style: a,
|
|
100
101
|
xmlns: "http://www.w3.org/2000/svg",
|
|
101
102
|
viewBox: "0 0 25.576353 30.177"
|
|
102
103
|
}, [
|
|
103
|
-
|
|
104
|
+
S("path", {
|
|
104
105
|
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",
|
|
105
|
-
style:
|
|
106
|
+
style: ye(`fill: ${w(n)}`)
|
|
106
107
|
}, null, 4),
|
|
107
|
-
|
|
108
|
+
S("path", {
|
|
108
109
|
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",
|
|
109
|
-
style:
|
|
110
|
+
style: ye(`fill: ${w(r)}`)
|
|
110
111
|
}, null, 4),
|
|
111
|
-
|
|
112
|
+
S("path", {
|
|
112
113
|
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",
|
|
113
|
-
style:
|
|
114
|
+
style: ye(`fill: ${w(i)}`)
|
|
114
115
|
}, null, 4),
|
|
115
|
-
|
|
116
|
+
S("path", {
|
|
116
117
|
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",
|
|
117
|
-
style:
|
|
118
|
+
style: ye(`fill: ${w(n)}`)
|
|
118
119
|
}, null, 4)
|
|
119
120
|
]));
|
|
120
121
|
}
|
|
121
|
-
}), [["__scopeId", "data-v-2b840669"]]),
|
|
122
|
+
}), [["__scopeId", "data-v-2b840669"]]), lt = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
122
123
|
__name: "CreditCardIcon",
|
|
123
124
|
props: {
|
|
124
125
|
size: {},
|
|
@@ -126,23 +127,23 @@ var it = /*#__PURE__*/ E(/* @__PURE__ */ T({
|
|
|
126
127
|
color: {}
|
|
127
128
|
},
|
|
128
129
|
setup(e) {
|
|
129
|
-
let t = e, n =
|
|
130
|
-
|
|
130
|
+
let t = e, n = g(t.color);
|
|
131
|
+
le(() => t.color, (e) => {
|
|
131
132
|
n.value = e;
|
|
132
133
|
});
|
|
133
|
-
let r =
|
|
134
|
-
return (e, t) => (
|
|
134
|
+
let r = $e(() => `--size: ${t.size}px;fill:${n.value}`);
|
|
135
|
+
return (e, t) => (x(), C("svg", {
|
|
135
136
|
xmlns: "http://www.w3.org/2000/svg",
|
|
136
|
-
style:
|
|
137
|
+
style: ye([{
|
|
137
138
|
width: "1.2587890625em",
|
|
138
139
|
height: "1em",
|
|
139
140
|
"vertical-align": "middle",
|
|
140
141
|
overflow: "hidden"
|
|
141
142
|
}, r.value]),
|
|
142
143
|
viewBox: "0 0 1289 1024"
|
|
143
|
-
}, [...t[0] ||= [
|
|
144
|
+
}, [...t[0] ||= [S("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), S("path", { d: "M41.105077 252.675325h1221.062574v258.720189H41.105077zM177.719008 778.578512h174.09209v71.329398H177.719008zM432.812279 778.578512h259.929161v71.329398H432.812279z" }, null, -1)]], 4));
|
|
144
145
|
}
|
|
145
|
-
}), [["__scopeId", "data-v-6a1e8b23"]]),
|
|
146
|
+
}), [["__scopeId", "data-v-6a1e8b23"]]), ut = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
146
147
|
__name: "GooglePayIcon",
|
|
147
148
|
props: {
|
|
148
149
|
size: {},
|
|
@@ -150,14 +151,14 @@ var it = /*#__PURE__*/ E(/* @__PURE__ */ T({
|
|
|
150
151
|
},
|
|
151
152
|
setup(e) {
|
|
152
153
|
let t = `--size: ${Number(e.size || 30) + 10}px`;
|
|
153
|
-
return (e, n) => (
|
|
154
|
+
return (e, n) => (x(), C("svg", {
|
|
154
155
|
xmlns: "http://www.w3.org/2000/svg",
|
|
155
156
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
156
157
|
style: t,
|
|
157
158
|
viewBox: "170.7 170 752 400"
|
|
158
|
-
}, [...n[0] ||= [
|
|
159
|
+
}, [...n[0] ||= [y("<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)]]));
|
|
159
160
|
}
|
|
160
|
-
}), [["__scopeId", "data-v-f87e02ce"]]),
|
|
161
|
+
}), [["__scopeId", "data-v-f87e02ce"]]), dt = ["fill"], ft = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
161
162
|
__name: "PayToIcon",
|
|
162
163
|
props: {
|
|
163
164
|
size: {},
|
|
@@ -167,31 +168,31 @@ var it = /*#__PURE__*/ E(/* @__PURE__ */ T({
|
|
|
167
168
|
let t = e;
|
|
168
169
|
t.grayscale;
|
|
169
170
|
let n = `--size: ${t.size}px`;
|
|
170
|
-
return (e, t) => (
|
|
171
|
+
return (e, t) => (x(), C("svg", {
|
|
171
172
|
id: "payto-icon",
|
|
172
173
|
viewBox: "0 0 120 57",
|
|
173
174
|
xmlns: "http://www.w3.org/2000/svg",
|
|
174
175
|
style: n
|
|
175
|
-
}, [
|
|
176
|
+
}, [S("path", {
|
|
176
177
|
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",
|
|
177
|
-
fill:
|
|
178
|
-
}, null, 8,
|
|
178
|
+
fill: w("#000")
|
|
179
|
+
}, null, 8, dt)]));
|
|
179
180
|
}
|
|
180
|
-
}), [["__scopeId", "data-v-0b2d8aa0"]]),
|
|
181
|
-
function
|
|
181
|
+
}), [["__scopeId", "data-v-0b2d8aa0"]]), pt = "payfurl-combined-container";
|
|
182
|
+
function mt(e, t) {
|
|
182
183
|
if (!e) return null;
|
|
183
184
|
for (; e.parentNode && e.parentNode.nodeName.toLowerCase() !== "body";) if (e = e.parentNode, e.id === t) return e;
|
|
184
185
|
return null;
|
|
185
186
|
}
|
|
186
187
|
// src/sdk/components/Combined.vue?vue&type=script&setup=true&lang.ts
|
|
187
|
-
var
|
|
188
|
+
var ht = ["id"], gt = ["id", "onClick"], _t = ["value", "id"], vt = { class: "combined-tab-title" }, yt = { class: "combined-tab-name" }, bt = {
|
|
188
189
|
key: 0,
|
|
189
190
|
class: "combined-tab-description"
|
|
190
|
-
},
|
|
191
|
+
}, xt = ["src", "alt"], St = ["id"], Ct = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
191
192
|
__name: "Combined",
|
|
192
193
|
props: { elements: {} },
|
|
193
194
|
setup(e) {
|
|
194
|
-
let t = e, n =
|
|
195
|
+
let t = e, n = g(0), r = {}, i = g({});
|
|
195
196
|
function a(e) {
|
|
196
197
|
n.value = e, setTimeout(() => {
|
|
197
198
|
l(e), t.elements[e].activate();
|
|
@@ -219,31 +220,31 @@ var dt = ["id"], ft = ["id", "onClick"], pt = ["value", "id"], mt = { class: "co
|
|
|
219
220
|
r[e] = !0;
|
|
220
221
|
}
|
|
221
222
|
}
|
|
222
|
-
return
|
|
223
|
+
return m(() => {
|
|
223
224
|
t.elements.forEach((e, t) => {
|
|
224
225
|
l(t);
|
|
225
226
|
}), a(0);
|
|
226
|
-
}), (e, r) => (
|
|
227
|
+
}), (e, r) => (x(), C("div", {
|
|
227
228
|
class: "payfurl-sdk-combined-container",
|
|
228
|
-
id:
|
|
229
|
-
}, [(
|
|
229
|
+
id: w(pt)
|
|
230
|
+
}, [(x(!0), C(Ee, null, fe(t.elements, (e, t) => (x(), C(Ee, { key: `container-component${t}` }, [i.value[t] ? M("", !0) : (x(), C("div", {
|
|
230
231
|
key: 0,
|
|
231
|
-
class:
|
|
232
|
+
class: ie(["payfurl-sdk-combined-tab", t === n.value ? "active" : ""]),
|
|
232
233
|
id: e.id || `combined-tab${t}`,
|
|
233
234
|
onClick: (e) => a(t)
|
|
234
235
|
}, [
|
|
235
|
-
|
|
236
|
+
S("input", {
|
|
236
237
|
type: "radio",
|
|
237
238
|
name: "payment-type",
|
|
238
239
|
value: e.title,
|
|
239
240
|
id: `payment-type${t}`
|
|
240
|
-
}, null, 8,
|
|
241
|
-
|
|
242
|
-
o(e) ? (
|
|
241
|
+
}, null, 8, _t),
|
|
242
|
+
S("div", vt, [S("div", yt, T(e.title), 1), e.description ? (x(), C("div", bt, T(e.description), 1)) : M("", !0)]),
|
|
243
|
+
o(e) ? (x(), _(te(e.icon), {
|
|
243
244
|
key: 0,
|
|
244
245
|
size: 30
|
|
245
|
-
})) :
|
|
246
|
-
s(e) ? (
|
|
246
|
+
})) : M("", !0),
|
|
247
|
+
s(e) ? (x(), C("img", {
|
|
247
248
|
key: 1,
|
|
248
249
|
src: e.icon,
|
|
249
250
|
style: {
|
|
@@ -252,13 +253,13 @@ var dt = ["id"], ft = ["id", "onClick"], pt = ["value", "id"], mt = { class: "co
|
|
|
252
253
|
"object-fit": "contain"
|
|
253
254
|
},
|
|
254
255
|
alt: e.title
|
|
255
|
-
}, null, 8,
|
|
256
|
-
], 10,
|
|
256
|
+
}, null, 8, xt)) : M("", !0)
|
|
257
|
+
], 10, gt)), N(S("div", {
|
|
257
258
|
class: "payfurl-sdk-container-component",
|
|
258
259
|
id: `container-component${t}`
|
|
259
|
-
}, null, 8,
|
|
260
|
+
}, null, 8, St), [[Xe, c(t)]])], 64))), 128))], 8, ht));
|
|
260
261
|
}
|
|
261
|
-
}), [["__scopeId", "data-v-240dc514"]]),
|
|
262
|
+
}), [["__scopeId", "data-v-240dc514"]]), wt = {
|
|
262
263
|
AED: "784",
|
|
263
264
|
AFN: "971",
|
|
264
265
|
ALL: "008",
|
|
@@ -437,7 +438,7 @@ var dt = ["id"], ft = ["id", "onClick"], pt = ["value", "id"], mt = { class: "co
|
|
|
437
438
|
ZAR: "710",
|
|
438
439
|
ZMW: "967",
|
|
439
440
|
ZWL: "932"
|
|
440
|
-
},
|
|
441
|
+
}, Tt = {
|
|
441
442
|
BHD: 3,
|
|
442
443
|
BIF: 0,
|
|
443
444
|
CLF: 4,
|
|
@@ -466,16 +467,16 @@ var dt = ["id"], ft = ["id", "onClick"], pt = ["value", "id"], mt = { class: "co
|
|
|
466
467
|
XPF: 0
|
|
467
468
|
};
|
|
468
469
|
function R(e) {
|
|
469
|
-
return !!
|
|
470
|
+
return !!wt[String(e).toUpperCase()];
|
|
470
471
|
}
|
|
471
|
-
function
|
|
472
|
-
return
|
|
472
|
+
function Et(e) {
|
|
473
|
+
return wt[String(e).toUpperCase()] || "";
|
|
473
474
|
}
|
|
474
|
-
function
|
|
475
|
-
return
|
|
475
|
+
function Dt(e) {
|
|
476
|
+
return Tt[String(e).toUpperCase()] || 2;
|
|
476
477
|
}
|
|
477
478
|
// src/sdk/processors/threeDsProcessor.ts
|
|
478
|
-
var { hideSpinner:
|
|
479
|
+
var { hideSpinner: Ot, showSpinner: kt } = Be(), z = {
|
|
479
480
|
PREAUTH: "PREAUTH",
|
|
480
481
|
AUTH: "AUTH",
|
|
481
482
|
POSTAUTH: "POSTAUTH",
|
|
@@ -531,9 +532,12 @@ var { hideSpinner: wt, showSpinner: Tt } = Re(), z = {
|
|
|
531
532
|
successCallback = null;
|
|
532
533
|
threeDSCompleteHandler = null;
|
|
533
534
|
threeDSFailureHandler = null;
|
|
535
|
+
progressCallback = null;
|
|
536
|
+
running = !1;
|
|
537
|
+
challengeReported = !1;
|
|
534
538
|
httpInvoker = null;
|
|
535
539
|
constructor(e, t) {
|
|
536
|
-
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;
|
|
540
|
+
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.progressCallback = t.onProgress || null, this.threeDsInvoker = t.threeDsInvoker || null;
|
|
537
541
|
let n = new o(t.environment, s(t.publicKey));
|
|
538
542
|
this.httpInvoker = new c(t.publicKey, t.version, n);
|
|
539
543
|
}
|
|
@@ -589,10 +593,17 @@ var { hideSpinner: wt, showSpinner: Tt } = Re(), z = {
|
|
|
589
593
|
return { ...this.clientParameters };
|
|
590
594
|
}
|
|
591
595
|
onError(e) {
|
|
592
|
-
this.log("[3ds error]", e),
|
|
596
|
+
this.log("[3ds error]", e), Ot(), P(this.container, oe), this.complete({
|
|
597
|
+
step: "completed",
|
|
598
|
+
success: !1,
|
|
599
|
+
error: e.error
|
|
600
|
+
}), this.threeDSFailureHandler ? this.threeDSFailureHandler(e) : this.failureCallback?.(e);
|
|
593
601
|
}
|
|
594
602
|
onSuccess(e) {
|
|
595
|
-
|
|
603
|
+
Ot(), this.log("[3ds success]", e), this.complete({
|
|
604
|
+
step: "completed",
|
|
605
|
+
success: !0
|
|
606
|
+
}), this.threeDSCompleteHandler ? this.threeDSCompleteHandler?.(e) : this.successCallback?.(e);
|
|
596
607
|
}
|
|
597
608
|
onPreAuth(e, t) {
|
|
598
609
|
let n = {
|
|
@@ -608,7 +619,7 @@ var { hideSpinner: wt, showSpinner: Tt } = Re(), z = {
|
|
|
608
619
|
threeDSServerTransID: n,
|
|
609
620
|
isMethodPerformed: r
|
|
610
621
|
});
|
|
611
|
-
let s =
|
|
622
|
+
let s = Et(this.currency), c = Dt(this.currency), l = /* @__PURE__ */ new Date(), u = {
|
|
612
623
|
acctNumber: this.paymentInfo?.cardNumber,
|
|
613
624
|
notificationURL: this.apiUrl + "/3ds/auth_complete",
|
|
614
625
|
threeDSAuthURL: e,
|
|
@@ -645,25 +656,31 @@ var { hideSpinner: wt, showSpinner: Tt } = Re(), z = {
|
|
|
645
656
|
threeDSRequestorChallengeInd: this.requireChallenge ? "04" : "01"
|
|
646
657
|
};
|
|
647
658
|
this.httpInvoker?.invoke(B(this.apiUrl, this.tokenId)[z.AUTH].url, B(this.apiUrl, this.tokenId)[z.AUTH].method, JSON.stringify(u), (e, t) => {
|
|
648
|
-
|
|
659
|
+
Ot(), a(e, t);
|
|
649
660
|
}, o);
|
|
650
661
|
}
|
|
651
662
|
onPostAuth(e, t, n) {
|
|
652
|
-
this.log("[onPostAuth]", e),
|
|
663
|
+
this.log("[onPostAuth]", e), kt(), this.httpInvoker?.invoke(B(this.apiUrl, this.tokenId)[z.POSTAUTH].url, B(this.apiUrl, this.tokenId)[z.POSTAUTH].method, JSON.stringify(e), t, n);
|
|
664
|
+
}
|
|
665
|
+
challengeShown() {
|
|
666
|
+
this.running && !this.challengeReported && (this.challengeReported = !0, this.progressCallback?.({ step: "challenge" }));
|
|
667
|
+
}
|
|
668
|
+
complete(e) {
|
|
669
|
+
this.running && (this.running = !1, this.progressCallback?.(e));
|
|
653
670
|
}
|
|
654
671
|
threeDSInvoke(e, t, n, r) {
|
|
655
|
-
this.container = e, this.threeDSCompleteHandler = n || null, this.threeDSFailureHandler = r || null, this.requireChallenge = t, this.threeDsInvoker?.onPreAuth();
|
|
672
|
+
this.running = !0, this.challengeReported = !1, this.progressCallback?.({ step: "started" }), this.container = e, this.threeDSCompleteHandler = n || null, this.threeDSFailureHandler = r || null, this.requireChallenge = t, this.threeDsInvoker?.onPreAuth();
|
|
656
673
|
}
|
|
657
674
|
getGatewayData(e, t, n, r) {
|
|
658
675
|
this.httpInvoker?.invoke(B(this.apiUrl, t)[z.GET_GATEWAY_DATA].url, B(this.apiUrl, t)[z.GET_GATEWAY_DATA].method, null, L(this, "[getGatewayDataSuccessCallback]", (e, t) => {
|
|
659
676
|
this.log("getGatewayDataSuccessCallback", e), n(JSON.parse(t));
|
|
660
677
|
}), L(this, "[getGatewayDataFailureCallback]", (e, t) => {
|
|
661
|
-
this.log("getGatewayDataFailureCallback", e, t),
|
|
678
|
+
this.log("getGatewayDataFailureCallback", e, t), Ot(), r();
|
|
662
679
|
}), { providerId: e });
|
|
663
680
|
}
|
|
664
681
|
tokeniseCard(e, t, n) {
|
|
665
682
|
let r = this.getPaymentInfo();
|
|
666
|
-
!r.cardNumber || !r.expiryDate || !r.cardholder ? n("Card information is missing") : (
|
|
683
|
+
!r.cardNumber || !r.expiryDate || !r.cardholder ? n("Card information is missing") : (kt(), this.httpInvoker?.invoke(B(this.apiUrl)[z.TOKENISE_CARD].url, B(this.apiUrl)[z.TOKENISE_CARD].method, JSON.stringify({
|
|
667
684
|
paymentInformation: {
|
|
668
685
|
cardNumber: r.cardNumber,
|
|
669
686
|
expiryDate: `${r.expiryDate.slice(2)}/${r.expiryDate.slice(0, 2)}`,
|
|
@@ -673,38 +690,38 @@ var { hideSpinner: wt, showSpinner: Tt } = Re(), z = {
|
|
|
673
690
|
currency: this.getCurrency(),
|
|
674
691
|
amount: this.getAmount()
|
|
675
692
|
}), L(this, "[tokeniseCardSuccessCallback]", (e, n) => {
|
|
676
|
-
this.log("tokeniseCardSuccessCallback", e, n),
|
|
693
|
+
this.log("tokeniseCardSuccessCallback", e, n), Ot(), t(JSON.parse(n));
|
|
677
694
|
}), L(this, "[tokeniseCardFailureCallback]", (e, t) => {
|
|
678
|
-
this.log("tokeniseCardFailureCallback", e, t),
|
|
695
|
+
this.log("tokeniseCardFailureCallback", e, t), Ot(), n("Unable to tokenise payment information");
|
|
679
696
|
}), { providerId: e }));
|
|
680
697
|
}
|
|
681
698
|
updateTokenExternal3dsData(e) {
|
|
682
699
|
this.tokenId && e && Object.keys(e).length !== 0 && this.httpInvoker?.invoke(B(this.apiUrl, this.tokenId)[z.PUT_TOKEN_EXTERNAL_3DS_DATA].url, B(this.apiUrl, this.tokenId)[z.PUT_TOKEN_EXTERNAL_3DS_DATA].method, JSON.stringify(e), (e, t) => {
|
|
683
700
|
this.log("updateTokenExternal3dsDataSuccessCallback", e, t);
|
|
684
701
|
}, (e, t) => {
|
|
685
|
-
this.log("updateTokenExternal3dsDataFailureCallback", e, t),
|
|
702
|
+
this.log("updateTokenExternal3dsDataFailureCallback", e, t), Ot();
|
|
686
703
|
}, {});
|
|
687
704
|
}
|
|
688
705
|
};
|
|
689
706
|
F([I], V.prototype, "setPaymentInfo", null), F([I], V.prototype, "onError", null), F([I], V.prototype, "onSuccess", null), F([I], V.prototype, "onPreAuth", null), F([I], V.prototype, "onAuth", null), F([I], V.prototype, "onPostAuth", null), F([I], V.prototype, "threeDSInvoke", null), F([I], V.prototype, "getGatewayData", null), F([I], V.prototype, "tokeniseCard", null), F([I], V.prototype, "updateTokenExternal3dsData", null);
|
|
690
707
|
// src/sdk/utils/loading.ts
|
|
691
|
-
var
|
|
708
|
+
var At = g(!1);
|
|
692
709
|
function H() {
|
|
693
710
|
return {
|
|
694
|
-
isLoading:
|
|
711
|
+
isLoading: At,
|
|
695
712
|
startLoading: () => {
|
|
696
|
-
|
|
713
|
+
At.value = !0;
|
|
697
714
|
},
|
|
698
715
|
stopLoading: () => {
|
|
699
|
-
|
|
716
|
+
At.value = !1;
|
|
700
717
|
}
|
|
701
718
|
};
|
|
702
719
|
}
|
|
703
720
|
// src/sdk/components/PaypalForm.vue?vue&type=script&setup=true&lang.ts
|
|
704
|
-
var
|
|
721
|
+
var jt = { style: { position: "relative" } }, Mt = {
|
|
705
722
|
key: 0,
|
|
706
723
|
class: "error text-normal"
|
|
707
|
-
},
|
|
724
|
+
}, Nt = "payfurl-paypal-script", Pt = /* @__PURE__ */ D({
|
|
708
725
|
__name: "PaypalForm",
|
|
709
726
|
props: {
|
|
710
727
|
log: { type: Function },
|
|
@@ -721,12 +738,12 @@ var Dt = { style: { position: "relative" } }, Ot = {
|
|
|
721
738
|
"close"
|
|
722
739
|
],
|
|
723
740
|
setup(e, { emit: t }) {
|
|
724
|
-
let n = e, r = t, i =
|
|
741
|
+
let n = e, r = t, i = g(null), a = g(!0), o = g(""), s = g(null), c = !1, l = null, { isLoading: u } = H();
|
|
725
742
|
function d(e) {
|
|
726
743
|
s.value = e, n.log && n.log("[Paypal]: checkout", s.value), c || (c = !0, f());
|
|
727
744
|
}
|
|
728
745
|
function f() {
|
|
729
|
-
if (document.getElementById(
|
|
746
|
+
if (document.getElementById(Nt)) {
|
|
730
747
|
p();
|
|
731
748
|
return;
|
|
732
749
|
}
|
|
@@ -739,11 +756,13 @@ var Dt = { style: { position: "relative" } }, Ot = {
|
|
|
739
756
|
let t = `https://www.paypal.com/sdk/js?${new URLSearchParams(e)}`;
|
|
740
757
|
window.paypal = null;
|
|
741
758
|
let r = document.createElement("script");
|
|
742
|
-
r.src = t, r.id =
|
|
759
|
+
r.src = t, r.id = Nt, r.onload = p, r.onerror = () => {
|
|
760
|
+
r.remove(), h("PayPal script failed to load");
|
|
761
|
+
}, document.body.appendChild(r);
|
|
743
762
|
}
|
|
744
763
|
function p() {
|
|
745
|
-
window.paypal && window.paypal.Buttons && (window.paypal.Buttons({
|
|
746
|
-
style: { color: n.buttonStyle },
|
|
764
|
+
window.paypal && window.paypal.Buttons && new Promise((e) => e(window.paypal.Buttons({
|
|
765
|
+
style: typeof n.buttonStyle == "string" ? { color: n.buttonStyle } : n.buttonStyle ?? {},
|
|
747
766
|
createOrder: function() {
|
|
748
767
|
return s.value?.gatewayTransactionId;
|
|
749
768
|
},
|
|
@@ -758,30 +777,41 @@ var Dt = { style: { position: "relative" } }, Ot = {
|
|
|
758
777
|
n.clickGate()?.() === !1 ? t.disable() : t.enable();
|
|
759
778
|
}, 1e3);
|
|
760
779
|
}
|
|
761
|
-
}).render(n.el)
|
|
780
|
+
}).render(n.el))).then(() => window.postMessage({
|
|
781
|
+
status: Qe,
|
|
782
|
+
paymentMethod: "paypal"
|
|
783
|
+
}, "*")).catch((e) => h(e?.message || "PayPal buttons failed to render"));
|
|
762
784
|
}
|
|
763
|
-
function
|
|
785
|
+
function h(e) {
|
|
786
|
+
window.postMessage({
|
|
787
|
+
status: ee,
|
|
788
|
+
paymentMethod: "paypal",
|
|
789
|
+
reason: "error",
|
|
790
|
+
message: e
|
|
791
|
+
}, "*");
|
|
792
|
+
}
|
|
793
|
+
function _(e) {
|
|
764
794
|
e?.data?.status && (e.data.status === "activate" && e.data.component === "paypal" && (n.log?.(`[PayPal]: message "${e.data.status}" received`, e.data), a.value = !0, r("activate")), e.data.status === "deactivate" && e.data.component === "paypal" && (n.log?.(`[PayPal]: message "${e.data.status}" received`, e.data), a.value = !1), e.data.status === "checkout-ready" && e.data.component === "paypal" && (n.log?.(`[PayPal]: message "${e.data.status}" received`, e.data), d(e.data.checkoutData)), e.data.status === "message" && e.data.component === "paypal" && (n.log?.(`[PayPal]: message "${e.data.status}" received`, e.data), o.value = e.data.message), e.data.status === "error" && e.data.component === "paypal" && (n.log?.(`[PayPal]: message "${e.data.status}" received`, e.data), o.value = e.data.error));
|
|
765
795
|
}
|
|
766
|
-
return
|
|
767
|
-
window.removeEventListener("message",
|
|
768
|
-
}),
|
|
769
|
-
window.addEventListener("message",
|
|
770
|
-
}), (e, t) => (
|
|
796
|
+
return Le(() => {
|
|
797
|
+
window.removeEventListener("message", _), l && clearInterval(l);
|
|
798
|
+
}), m(() => {
|
|
799
|
+
window.addEventListener("message", _), mt(i.value, "payfurl-combined-container") || (a.value = !0, r("activate"));
|
|
800
|
+
}), (e, t) => (x(), C(Ee, null, [S("div", jt, [N(pe(je, null, null, 512), [[Xe, w(u)]])]), S("div", {
|
|
771
801
|
style: { position: "relative" },
|
|
772
802
|
ref_key: "root",
|
|
773
803
|
ref: i
|
|
774
|
-
}, [o.value ? (
|
|
804
|
+
}, [o.value ? (x(), C("div", Mt, T(o.value), 1)) : M("", !0)], 512)], 64));
|
|
775
805
|
}
|
|
776
|
-
}),
|
|
806
|
+
}), Ft = {
|
|
777
807
|
APPROVED: "Approved",
|
|
778
808
|
DECLINED: "Declined",
|
|
779
809
|
UNDECIDED: "Undecided"
|
|
780
810
|
};
|
|
781
|
-
function
|
|
782
|
-
return e ? e.decision ===
|
|
811
|
+
function It(e) {
|
|
812
|
+
return e ? e.decision === Ft.DECLINED && e.stopPaymentOnFailure === !0 : !1;
|
|
783
813
|
}
|
|
784
|
-
function
|
|
814
|
+
function Lt(e) {
|
|
785
815
|
return e === "forter";
|
|
786
816
|
}
|
|
787
817
|
// src/sdk/utils/optionCleaning.ts
|
|
@@ -792,7 +822,7 @@ function U(e) {
|
|
|
792
822
|
return t;
|
|
793
823
|
}
|
|
794
824
|
// src/sdk/processors/paypalProcessor.ts
|
|
795
|
-
var { hideSpinner:
|
|
825
|
+
var { hideSpinner: Rt, showSpinner: zt } = Be(), Bt = class {
|
|
796
826
|
container = null;
|
|
797
827
|
log;
|
|
798
828
|
apiUrl = "";
|
|
@@ -804,7 +834,7 @@ var { hideSpinner: Pt, showSpinner: Ft } = Re(), It = class {
|
|
|
804
834
|
destroy = () => {};
|
|
805
835
|
checkoutExternalId = "";
|
|
806
836
|
amount = 0;
|
|
807
|
-
userSuccessMessage =
|
|
837
|
+
userSuccessMessage = _e;
|
|
808
838
|
constructor(e, t) {
|
|
809
839
|
this.log = e, this.apiUrl = t.apiUrl, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null;
|
|
810
840
|
let n = new o(t.environment, s(t.publicKey));
|
|
@@ -837,9 +867,9 @@ var { hideSpinner: Pt, showSpinner: Ft } = Re(), It = class {
|
|
|
837
867
|
}), this.validateOptions(e, n, r);
|
|
838
868
|
let o = !1;
|
|
839
869
|
this.container = e, this.fraudProcessor && (this.fraudProcessor.setAmount(n), this.fraudProcessor.setCurrency(r));
|
|
840
|
-
let s =
|
|
870
|
+
let s = E({
|
|
841
871
|
el: e,
|
|
842
|
-
component:
|
|
872
|
+
component: Pt,
|
|
843
873
|
props: {
|
|
844
874
|
log: this.log,
|
|
845
875
|
el: e,
|
|
@@ -871,7 +901,7 @@ var { hideSpinner: Pt, showSpinner: Ft } = Re(), It = class {
|
|
|
871
901
|
try {
|
|
872
902
|
this.chargeApproved(e, r);
|
|
873
903
|
} catch (t) {
|
|
874
|
-
|
|
904
|
+
Rt(), P(e, "Payment couldn't be processed"), this.failureCallback?.({ error: t?.message || "Payment couldn't be processed" });
|
|
875
905
|
}
|
|
876
906
|
}
|
|
877
907
|
}, 200);
|
|
@@ -887,10 +917,10 @@ var { hideSpinner: Pt, showSpinner: Ft } = Re(), It = class {
|
|
|
887
917
|
paymentStatus: t.value.status,
|
|
888
918
|
payerAccountCountry: t.value.payer.address?.country_code,
|
|
889
919
|
paymentId: t.value.id
|
|
890
|
-
}),
|
|
891
|
-
|
|
920
|
+
}), zt(), this.fraudProcessor.fraudCheck((t) => {
|
|
921
|
+
Rt(), It(t) ? (P(e, "Payment couldn't be processed"), this.failureCallback?.({ error: "Payment couldn't be processed" })) : this.addCharge(e, t);
|
|
892
922
|
}, (t) => {
|
|
893
|
-
|
|
923
|
+
Rt(), P(e, t.error), this.failureCallback?.(t);
|
|
894
924
|
})) : this.addCharge(e, null);
|
|
895
925
|
}
|
|
896
926
|
setAmount(e) {
|
|
@@ -934,7 +964,7 @@ var { hideSpinner: Pt, showSpinner: Ft } = Re(), It = class {
|
|
|
934
964
|
this.log("paypal success", n);
|
|
935
965
|
let r = JSON.parse(t), i = JSON.parse(window.atob(r.checkoutData));
|
|
936
966
|
this.checkoutExternalId = i.externalId, window.postMessage({
|
|
937
|
-
status:
|
|
967
|
+
status: He,
|
|
938
968
|
component: "paypal",
|
|
939
969
|
checkoutData: i
|
|
940
970
|
}, "*");
|
|
@@ -950,7 +980,7 @@ var { hideSpinner: Pt, showSpinner: Ft } = Re(), It = class {
|
|
|
950
980
|
getSuccessAddChargeHandler(e) {
|
|
951
981
|
return L(this, "[PayPalProcessor][getSuccessAddChargeHandler]", (t, n) => {
|
|
952
982
|
let r = JSON.parse(n);
|
|
953
|
-
this.log("[getSuccessAddChargeHandler]", r),
|
|
983
|
+
this.log("[getSuccessAddChargeHandler]", r), rt(e, this.getSuccessMessage()), this.successCallback?.({ transactionId: r.chargeId });
|
|
954
984
|
});
|
|
955
985
|
}
|
|
956
986
|
addCharge(e, t) {
|
|
@@ -962,15 +992,15 @@ var { hideSpinner: Pt, showSpinner: Ft } = Re(), It = class {
|
|
|
962
992
|
}
|
|
963
993
|
validateOptions(e, t, n) {
|
|
964
994
|
if (!R(n)) throw P(e, "Invalid currency: " + n), TypeError("invalid currency: " + n);
|
|
965
|
-
if (!
|
|
995
|
+
if (!k(t)) throw P(e, "Invalid amount: " + t), TypeError("invalid amount: " + t);
|
|
966
996
|
}
|
|
967
997
|
};
|
|
968
|
-
F([I],
|
|
998
|
+
F([I], Bt.prototype, "cleanUp", null), F([I], Bt.prototype, "addPaypal", null), F([I], Bt.prototype, "setAmount", null), F([I], Bt.prototype, "checkout", null), F([I], Bt.prototype, "getFailureAddChargeHandler", null), F([I], Bt.prototype, "getSuccessAddChargeHandler", null), F([I], Bt.prototype, "addCharge", null), F([I], Bt.prototype, "validateOptions", null);
|
|
969
999
|
// src/sdk/components/CardForm.vue?vue&type=script&setup=true&lang.ts
|
|
970
|
-
var
|
|
1000
|
+
var Vt = ["src"], Ht = {
|
|
971
1001
|
key: 0,
|
|
972
1002
|
id: "threeDs"
|
|
973
|
-
},
|
|
1003
|
+
}, Ut = 620, Wt = /* @__PURE__ */ D({
|
|
974
1004
|
__name: "CardForm",
|
|
975
1005
|
props: {
|
|
976
1006
|
log: { type: Function },
|
|
@@ -985,10 +1015,10 @@ var Lt = ["src"], Rt = {
|
|
|
985
1015
|
"close"
|
|
986
1016
|
],
|
|
987
1017
|
setup(e, { emit: t }) {
|
|
988
|
-
let n = e, r = t, i =
|
|
1018
|
+
let n = e, r = t, i = g(null), a = g(n.iframeSrc + "?v=" + Math.random()), o = g(n.threeDSEnabled), s = g(!1), c = g(!0), l = g(!1), u = "";
|
|
989
1019
|
function d(e) {
|
|
990
1020
|
if (e?.data?.status) {
|
|
991
|
-
if (e.data.status === "iframe-has-changed" && (n.log?.(`[CardForm]: message "${e.data.status}" received`, e.data), e.stopPropagation(), p(e.data.message?.height || 0)), (e.data.status === "secure-orchestrator-show-challenge" || e.data.status === "secure-orchestrator-hide-challenge") && (n.log?.(`[CardForm]: message "${e.data.status}" received`, e.data), h(e.data.status ===
|
|
1021
|
+
if (e.data.status === "iframe-has-changed" && (n.log?.(`[CardForm]: message "${e.data.status}" received`, e.data), e.stopPropagation(), p(e.data.message?.height || 0)), (e.data.status === "secure-orchestrator-show-challenge" || e.data.status === "secure-orchestrator-hide-challenge") && (n.log?.(`[CardForm]: message "${e.data.status}" received`, e.data), h(e.data.status === Ie)), e.data.status === "submit-card-form") {
|
|
992
1022
|
if (n.log?.(`[CardForm]: message "${e.data.status}" received`, e.data), !n.form || !c.value) return;
|
|
993
1023
|
if (e.stopPropagation(), n.form.querySelector("input[name=\"token\"]")?.value) {
|
|
994
1024
|
n.form.submit();
|
|
@@ -1000,9 +1030,9 @@ var Lt = ["src"], Rt = {
|
|
|
1000
1030
|
e.data.status === "activate" && e.data.component === "card" && (n.log?.(`[CardForm]: message "${e.data.status}" received`, e.data), c.value = !0), e.data.status === "deactivate" && e.data.component === "card" && (n.log?.(`[CardForm]: message "${e.data.status}" received`, e.data), c.value = !1);
|
|
1001
1031
|
}
|
|
1002
1032
|
}
|
|
1003
|
-
|
|
1033
|
+
Le(() => {
|
|
1004
1034
|
window.removeEventListener("message", d);
|
|
1005
|
-
}),
|
|
1035
|
+
}), m(() => {
|
|
1006
1036
|
window.addEventListener("message", d);
|
|
1007
1037
|
});
|
|
1008
1038
|
function f() {
|
|
@@ -1020,16 +1050,16 @@ var Lt = ["src"], Rt = {
|
|
|
1020
1050
|
}
|
|
1021
1051
|
function h(e) {
|
|
1022
1052
|
let t = i.value;
|
|
1023
|
-
t && (e ? (u = t.style.height || "200px", l.value = !0, t.setAttribute("style", `height: ${
|
|
1053
|
+
t && (e ? (u = t.style.height || "200px", l.value = !0, t.setAttribute("style", `height: ${Ut}px`)) : (l.value = !1, t.setAttribute("style", `height: ${u}`)));
|
|
1024
1054
|
}
|
|
1025
|
-
return (e, t) => (
|
|
1055
|
+
return (e, t) => (x(), C(Ee, null, [S("iframe", {
|
|
1026
1056
|
src: a.value,
|
|
1027
1057
|
onLoad: f,
|
|
1028
1058
|
ref_key: "iframe",
|
|
1029
1059
|
ref: i,
|
|
1030
|
-
style:
|
|
1060
|
+
style: ye(`height:${w(200)}px`),
|
|
1031
1061
|
id: "payfurl-card-iframe"
|
|
1032
|
-
}, null, 44,
|
|
1062
|
+
}, null, 44, Vt), o.value ? (x(), C("div", Ht)) : M("", !0)], 64));
|
|
1033
1063
|
}
|
|
1034
1064
|
}), W = class {
|
|
1035
1065
|
log;
|
|
@@ -1063,7 +1093,7 @@ var Lt = ["src"], Rt = {
|
|
|
1063
1093
|
else {
|
|
1064
1094
|
this.log("[stopLoadingCardForm]");
|
|
1065
1095
|
try {
|
|
1066
|
-
e.contentWindow?.postMessage({ status:
|
|
1096
|
+
e.contentWindow?.postMessage({ status: se }, "*");
|
|
1067
1097
|
} catch (e) {
|
|
1068
1098
|
this.log("[stopLoadingCardForm] iframe error", e);
|
|
1069
1099
|
}
|
|
@@ -1072,7 +1102,7 @@ var Lt = ["src"], Rt = {
|
|
|
1072
1102
|
pauseLoadingCardForm() {
|
|
1073
1103
|
let e = this.getCardFormFrame();
|
|
1074
1104
|
if (e) try {
|
|
1075
|
-
e.contentWindow?.postMessage({ status:
|
|
1105
|
+
e.contentWindow?.postMessage({ status: Te }, "*");
|
|
1076
1106
|
} catch (e) {
|
|
1077
1107
|
this.log("[pauseLoadingCardForm] iframe error", e);
|
|
1078
1108
|
}
|
|
@@ -1080,7 +1110,7 @@ var Lt = ["src"], Rt = {
|
|
|
1080
1110
|
unpauseLoadingCardForm() {
|
|
1081
1111
|
let e = this.getCardFormFrame();
|
|
1082
1112
|
if (e) try {
|
|
1083
|
-
e.contentWindow?.postMessage({ status:
|
|
1113
|
+
e.contentWindow?.postMessage({ status: p }, "*");
|
|
1084
1114
|
} catch (e) {
|
|
1085
1115
|
this.log("[unpauseLoadingCardForm] iframe error", e);
|
|
1086
1116
|
}
|
|
@@ -1088,21 +1118,21 @@ var Lt = ["src"], Rt = {
|
|
|
1088
1118
|
showMessage(e) {
|
|
1089
1119
|
let t = this.getCardFormFrame();
|
|
1090
1120
|
t && t.contentWindow?.postMessage({
|
|
1091
|
-
status:
|
|
1121
|
+
status: ze,
|
|
1092
1122
|
message: e
|
|
1093
1123
|
}, "*");
|
|
1094
1124
|
}
|
|
1095
1125
|
showInfoMessage(e) {
|
|
1096
1126
|
let t = this.getCardFormFrame();
|
|
1097
1127
|
t && t.contentWindow?.postMessage({
|
|
1098
|
-
status:
|
|
1128
|
+
status: Ye,
|
|
1099
1129
|
message: e
|
|
1100
1130
|
}, "*");
|
|
1101
1131
|
}
|
|
1102
1132
|
requestCardDetails() {
|
|
1103
1133
|
let e = this.getCardFormFrame();
|
|
1104
1134
|
if (e) try {
|
|
1105
|
-
e.contentWindow?.postMessage({ status:
|
|
1135
|
+
e.contentWindow?.postMessage({ status: Ze }, "*");
|
|
1106
1136
|
} catch (e) {
|
|
1107
1137
|
this.log("[requestCardDetails] iframe error", e);
|
|
1108
1138
|
}
|
|
@@ -1110,7 +1140,7 @@ var Lt = ["src"], Rt = {
|
|
|
1110
1140
|
};
|
|
1111
1141
|
F([I], W.prototype, "startLoadingCardForm", null), F([I], W.prototype, "stopLoadingCardForm", null), F([I], W.prototype, "pauseLoadingCardForm", null), F([I], W.prototype, "unpauseLoadingCardForm", null), F([I], W.prototype, "showMessage", null), F([I], W.prototype, "showInfoMessage", null), F([I], W.prototype, "requestCardDetails", null);
|
|
1112
1142
|
// src/utils/networkTokenOptions.ts
|
|
1113
|
-
function
|
|
1143
|
+
function Gt(e) {
|
|
1114
1144
|
return e === t.PRODUCTION ? {
|
|
1115
1145
|
acquirerMerchantId: "550e8400",
|
|
1116
1146
|
acquirerBIN: "444444",
|
|
@@ -1122,7 +1152,7 @@ function Vt(e) {
|
|
|
1122
1152
|
};
|
|
1123
1153
|
}
|
|
1124
1154
|
// src/sdk/processors/networkToken/mastercardTokenAuthenticationProcessor.ts
|
|
1125
|
-
var { hideSpinner:
|
|
1155
|
+
var { hideSpinner: Kt, showSpinner: qt } = Be(), Jt = { UPDATE: "UPDATE" }, Yt = (e, t) => ({ [Jt.UPDATE]: {
|
|
1126
1156
|
url: e + ("/token/" + t + "/authentication"),
|
|
1127
1157
|
method: "PUT"
|
|
1128
1158
|
} }), G = class extends W {
|
|
@@ -1142,7 +1172,7 @@ var { hideSpinner: Ht, showSpinner: Ut } = Re(), Wt = { UPDATE: "UPDATE" }, Gt =
|
|
|
1142
1172
|
onFailureCallback;
|
|
1143
1173
|
constructor(e, t) {
|
|
1144
1174
|
super(e), this.log("[MastercardTokenAuthenticationProcessor]", t), this.environment = t.environment, this.token = t.token, this.networkToken = t.networkToken, this.networkTokenData = t.networkTokenData, this.networkTokenAuthenticateUrl = t.redirectUrl, this.networkTokenProvider = t.networkTokenProvider;
|
|
1145
|
-
let n =
|
|
1175
|
+
let n = Gt(this.environment);
|
|
1146
1176
|
this.networkTokenOptions = {
|
|
1147
1177
|
...n,
|
|
1148
1178
|
...t.networkTokenOptions
|
|
@@ -1227,7 +1257,7 @@ var { hideSpinner: Ht, showSpinner: Ut } = Re(), Wt = { UPDATE: "UPDATE" }, Gt =
|
|
|
1227
1257
|
modalShow() {
|
|
1228
1258
|
if (this.modal) return;
|
|
1229
1259
|
let e = "maxTouchPoints" in navigator && navigator.maxTouchPoints > 0 ? 791 : 637, t = window.screenLeft === void 0 ? window.screenX : window.screenLeft, n = window.screenTop === void 0 ? window.screenY : window.screenTop, r = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width, i = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height, a = r / window.screen.availWidth, o = (r - 375) / 2 / a + t, s = (i - e) / 2 / a + n;
|
|
1230
|
-
|
|
1260
|
+
Kt(), Ne(this.networkTokenAuthenticateUrl) && (this.modal = window.open(this.networkTokenAuthenticateUrl + "?origin=" + window.location.origin, "targetWindow", `toolbar=no,
|
|
1231
1261
|
location=no,
|
|
1232
1262
|
status=no,
|
|
1233
1263
|
menubar=no,
|
|
@@ -1239,7 +1269,7 @@ var { hideSpinner: Ht, showSpinner: Ut } = Re(), Wt = { UPDATE: "UPDATE" }, Gt =
|
|
|
1239
1269
|
left=${o}`));
|
|
1240
1270
|
}
|
|
1241
1271
|
modalHide() {
|
|
1242
|
-
this.modal && (
|
|
1272
|
+
this.modal && (qt(), this.modal.close());
|
|
1243
1273
|
}
|
|
1244
1274
|
updateToken(e) {
|
|
1245
1275
|
if (this.log("[MastercardTokenAuthenticationProcessor][updateToken]", e), !e.assuranceData?.verificationData.length) {
|
|
@@ -1251,7 +1281,7 @@ var { hideSpinner: Ht, showSpinner: Ut } = Re(), Wt = { UPDATE: "UPDATE" }, Gt =
|
|
|
1251
1281
|
return;
|
|
1252
1282
|
}
|
|
1253
1283
|
let t = e.assuranceData.verificationData[0];
|
|
1254
|
-
this.httpInvoker?.invoke(
|
|
1284
|
+
this.httpInvoker?.invoke(Yt(this.apiUrl, this.token)[Jt.UPDATE].url, Yt(this.apiUrl, this.token)[Jt.UPDATE].method, JSON.stringify({
|
|
1255
1285
|
VerificationType: t.verificationType,
|
|
1256
1286
|
VerificationEntity: t.verificationEntity,
|
|
1257
1287
|
VerificationMethod: t.verificationMethod,
|
|
@@ -1268,15 +1298,15 @@ var { hideSpinner: Ht, showSpinner: Ut } = Re(), Wt = { UPDATE: "UPDATE" }, Gt =
|
|
|
1268
1298
|
};
|
|
1269
1299
|
F([I], G.prototype, "invoke", null), F([I], G.prototype, "messageHandler", null), F([I], G.prototype, "authenticate", null), F([I], G.prototype, "init", null), F([I], G.prototype, "initCss", null), F([I], G.prototype, "modalShow", null), F([I], G.prototype, "modalHide", null), F([I], G.prototype, "updateToken", null);
|
|
1270
1300
|
// src/sdk/processors/cardProcessor.ts
|
|
1271
|
-
var { hideSpinner: K, showSpinner:
|
|
1301
|
+
var { hideSpinner: K, showSpinner: Xt } = Be(), Zt = {
|
|
1272
1302
|
TOKENISE_CARD: "TOKENISE_CARD",
|
|
1273
1303
|
GET_PROVIDER_INFO: "GET_PROVIDER_INFO"
|
|
1274
|
-
},
|
|
1275
|
-
[
|
|
1304
|
+
}, Qt = (e, t, n) => ({
|
|
1305
|
+
[Zt.TOKENISE_CARD]: {
|
|
1276
1306
|
url: e + "/token/card",
|
|
1277
1307
|
method: "POST"
|
|
1278
1308
|
},
|
|
1279
|
-
[
|
|
1309
|
+
[Zt.GET_PROVIDER_INFO]: {
|
|
1280
1310
|
url: e + "/info/providers/" + t,
|
|
1281
1311
|
method: "GET"
|
|
1282
1312
|
}
|
|
@@ -1292,6 +1322,7 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1292
1322
|
version = "";
|
|
1293
1323
|
publicKey = "";
|
|
1294
1324
|
customer = null;
|
|
1325
|
+
threeDSEmail = "";
|
|
1295
1326
|
billingAddress = null;
|
|
1296
1327
|
order = null;
|
|
1297
1328
|
geolocation = null;
|
|
@@ -1301,7 +1332,7 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1301
1332
|
vault;
|
|
1302
1333
|
verifyCard;
|
|
1303
1334
|
metadata;
|
|
1304
|
-
userSuccessMessage =
|
|
1335
|
+
userSuccessMessage = _e;
|
|
1305
1336
|
threeDSEnabled = !1;
|
|
1306
1337
|
threeDsProcessor = null;
|
|
1307
1338
|
secondaryThreeDsProcessor = null;
|
|
@@ -1313,6 +1344,7 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1313
1344
|
failureCallback = null;
|
|
1314
1345
|
successCallback = null;
|
|
1315
1346
|
validationStatusChangeCallback = null;
|
|
1347
|
+
threeDsProgressCallback = null;
|
|
1316
1348
|
userOnValidate;
|
|
1317
1349
|
httpInvoker;
|
|
1318
1350
|
destroy = () => {};
|
|
@@ -1326,7 +1358,7 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1326
1358
|
boundMessageHandler;
|
|
1327
1359
|
isMessageListenerAttached = !1;
|
|
1328
1360
|
constructor(e, t) {
|
|
1329
|
-
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;
|
|
1361
|
+
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, this.threeDsProgressCallback = t.onThreeDsProgress || null;
|
|
1330
1362
|
let n = new o(t.environment, s(t.publicKey));
|
|
1331
1363
|
this.httpInvoker = new c(this.publicKey, t.version, n), this.boundMessageHandler = this.messageHandler.bind(this), this.attachMessageListener();
|
|
1332
1364
|
}
|
|
@@ -1363,28 +1395,38 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1363
1395
|
cleanUp(e) {
|
|
1364
1396
|
e?.id === this.container?.id && (this.destroy?.(), this.container = null, this.form = null, this.iframe = null, this.closeCardDetailsPort(), this.secureReady = !1, this.secureEnabled = !1, this.secureFallback = !1, this.secureConfig = null, this.secureOrigin = "", this.secureWindow = null, this.detachMessageListener());
|
|
1365
1397
|
}
|
|
1398
|
+
getEmail() {
|
|
1399
|
+
return this.customer?.email || this.threeDSEmail;
|
|
1400
|
+
}
|
|
1401
|
+
getCustomerWithEmail() {
|
|
1402
|
+
let e = this.getEmail();
|
|
1403
|
+
return e ? {
|
|
1404
|
+
...this.customer || {},
|
|
1405
|
+
email: e
|
|
1406
|
+
} : this.customer;
|
|
1407
|
+
}
|
|
1366
1408
|
addCard(e, t, n, r, i, a) {
|
|
1367
1409
|
this.log("[addCard]", {
|
|
1368
1410
|
providerId: n,
|
|
1369
1411
|
amount: r,
|
|
1370
1412
|
currency: i,
|
|
1371
1413
|
options: a
|
|
1372
|
-
}), 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;
|
|
1373
|
-
let o =
|
|
1374
|
-
this.amount = r, this.currency = i, this.vault =
|
|
1414
|
+
}), 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, this.threeDSEmail = a?.threeDSEmail || "";
|
|
1415
|
+
let o = this.getEmail();
|
|
1416
|
+
this.amount = r, this.currency = i, this.vault = O(a?.vault), this.verifyCard = O(a?.verifyCard), this.metadata = U(a?.metadata), this.fraudProcessor && (this.fraudProcessor.setAmount(r), this.fraudProcessor.setCurrency(i)), this.threeDsProcessor && (this.threeDsProcessor.setEmail(o), this.threeDsProcessor.setAmount(r), this.threeDsProcessor.setCurrency(i), this.threeDsProcessor.setClientParameters(a?.clientParameters || {})), a?.threeDSEnabled && (We(r, A, "Missing or invalid amount", this.failureCallback), We(i, R, "Missing or invalid currency", this.failureCallback), this.threeDSEnabled = !0);
|
|
1375
1417
|
let s = Object.keys(a?.networkTokenOptions || {}).length ? a?.networkTokenOptions : a?.clickToPayOptions?.networkTokenOptions;
|
|
1376
1418
|
a?.clickToPayEnabled && this.clickToPayProcessor && (this.clickToPayProcessor.setAmount(r), this.clickToPayProcessor.setCurrency(i), this.clickToPayProcessor.setCustomerInfo({
|
|
1377
1419
|
...this.customer || {},
|
|
1378
|
-
email:
|
|
1420
|
+
email: o
|
|
1379
1421
|
}, !0), this.clickToPayProcessor.setOptions({
|
|
1380
1422
|
...a?.clickToPayOptions,
|
|
1381
1423
|
dpaId: a?.clickToPayOptions?.dpaId || "",
|
|
1382
1424
|
tokenAuthenticationEnabled: !!a?.tokenAuthenticationEnabled,
|
|
1383
1425
|
networkTokenOptions: s
|
|
1384
1426
|
}), 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;
|
|
1385
|
-
let c =
|
|
1427
|
+
let c = E({
|
|
1386
1428
|
el: this.container,
|
|
1387
|
-
component:
|
|
1429
|
+
component: Wt,
|
|
1388
1430
|
props: {
|
|
1389
1431
|
log: this.log,
|
|
1390
1432
|
iframeSrc: this.url,
|
|
@@ -1408,7 +1450,7 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1408
1450
|
currency: this.currency,
|
|
1409
1451
|
metadata: this.metadata || {},
|
|
1410
1452
|
billingAddress: this.billingAddress || null,
|
|
1411
|
-
customer: this.
|
|
1453
|
+
customer: this.getCustomerWithEmail(),
|
|
1412
1454
|
order: this.order || null,
|
|
1413
1455
|
geolocation: this.geolocation || null,
|
|
1414
1456
|
clickToPay: a?.clickToPayEnabled && this.clickToPayProcessor ? {
|
|
@@ -1424,8 +1466,8 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1424
1466
|
} : void 0
|
|
1425
1467
|
} : null;
|
|
1426
1468
|
this.secureConfig = t;
|
|
1427
|
-
let
|
|
1428
|
-
status:
|
|
1469
|
+
let o = {
|
|
1470
|
+
status: et,
|
|
1429
1471
|
environment: this.environment,
|
|
1430
1472
|
debug: this.debug,
|
|
1431
1473
|
publicKey: this.publicKey,
|
|
@@ -1433,9 +1475,9 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1433
1475
|
apiUrl: this.apiUrl,
|
|
1434
1476
|
amount: r,
|
|
1435
1477
|
currency: i,
|
|
1436
|
-
vault:
|
|
1437
|
-
verifyCard:
|
|
1438
|
-
showEmail: a?.threeDSEnabled && !
|
|
1478
|
+
vault: O(a?.vault),
|
|
1479
|
+
verifyCard: O(a?.verifyCard),
|
|
1480
|
+
showEmail: a?.threeDSEnabled && !Ue(this.getEmail()),
|
|
1439
1481
|
visProviderId: a?.visProviderId,
|
|
1440
1482
|
requiredFields: a?.requiredFields,
|
|
1441
1483
|
clickToPayEnabled: a?.clickToPayEnabled,
|
|
@@ -1445,15 +1487,15 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1445
1487
|
};
|
|
1446
1488
|
if (this.closeCardDetailsPort(), !this.isSecureFlowEnabled() && typeof MessageChannel < "u") {
|
|
1447
1489
|
let t = new MessageChannel();
|
|
1448
|
-
this.setCardDetailsPort(t.port1), e?.contentWindow?.postMessage(
|
|
1449
|
-
} else e?.contentWindow?.postMessage(
|
|
1450
|
-
this.customer?.phoneNumber && !
|
|
1451
|
-
status:
|
|
1490
|
+
this.setCardDetailsPort(t.port1), e?.contentWindow?.postMessage(o, "*", [t.port2]);
|
|
1491
|
+
} else e?.contentWindow?.postMessage(o, "*");
|
|
1492
|
+
this.customer?.phoneNumber && !Re(String(this.customer?.phoneNumber)) && this.getCardFormFrame()?.contentWindow?.postMessage({
|
|
1493
|
+
status: ze,
|
|
1452
1494
|
message: "Invalid phone number"
|
|
1453
1495
|
}, "*");
|
|
1454
1496
|
}),
|
|
1455
1497
|
submit: L(this, "[addCard], onsubmit", () => {
|
|
1456
|
-
this.log("[CardProcessor]: submit event"),
|
|
1498
|
+
this.log("[CardProcessor]: submit event"), Xt(), this.requestCardDetails();
|
|
1457
1499
|
})
|
|
1458
1500
|
}
|
|
1459
1501
|
});
|
|
@@ -1469,16 +1511,25 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1469
1511
|
fraudCheckResult: t.fraudCheckResult,
|
|
1470
1512
|
externalThreeDsData: t.externalThreeDsData
|
|
1471
1513
|
});
|
|
1472
|
-
} else if (e.data.status === "secure-orchestrator-
|
|
1514
|
+
} else if (e.data.status === "secure-orchestrator-three-ds-progress" && this.isTrustedSecureMessage(e)) this.threeDsProgressCallback?.(e.data.progress);
|
|
1515
|
+
else if (e.data.status === "secure-orchestrator-click-to-pay-card" && this.isTrustedSecureMessage(e)) this.checkoutWithSecureClickToPayCard(e.data.message || {});
|
|
1473
1516
|
else if (e.data.status === "secure-orchestrator-click-to-pay-new-card" && this.isTrustedSecureMessage(e)) this.checkoutWithSecureClickToPayNewCard(e.data.message || {});
|
|
1474
|
-
else if (e.data.status === "secure-orchestrator-failure" && this.isTrustedSecureMessage(e))
|
|
1475
|
-
|
|
1476
|
-
|
|
1517
|
+
else if (e.data.status === "secure-orchestrator-failure" && this.isTrustedSecureMessage(e)) {
|
|
1518
|
+
this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), K();
|
|
1519
|
+
let t = e.data.error || "Unable to process payment details";
|
|
1520
|
+
this.showMessage(t);
|
|
1521
|
+
let n = typeof e.data.reason == "string" ? e.data.reason : "";
|
|
1522
|
+
this.failureCallback?.({
|
|
1523
|
+
error: t,
|
|
1524
|
+
...n && { errorDetails: { reason: n } }
|
|
1525
|
+
});
|
|
1526
|
+
} else if (e.data.status === "hide-spinner") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), K();
|
|
1527
|
+
else if (e.data.status === "show-spinner") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), Xt();
|
|
1477
1528
|
else if (e.data.status === "card-form-validation-error") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), K(), this.failureCallback?.({ error: e.data.message });
|
|
1478
1529
|
else if (e.data.status === "card-form-validation-status-change") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), K(), this.validationStatusChangeCallback?.(e.data.message?.status, e.data.message?.message);
|
|
1479
1530
|
else if (e.data.status === "tokenise-card-failure") {
|
|
1480
1531
|
if (this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), K(), e.data.message === "3D Secure required" && this.isSecureFlowEnabled()) {
|
|
1481
|
-
this.postSecureMessage(
|
|
1532
|
+
this.postSecureMessage(de);
|
|
1482
1533
|
return;
|
|
1483
1534
|
}
|
|
1484
1535
|
if (e.data.message === "3D Secure required" && this.secondaryThreeDsProcessor) {
|
|
@@ -1507,14 +1558,14 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1507
1558
|
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);
|
|
1508
1559
|
if (n) {
|
|
1509
1560
|
n.invoke(this.amount, this.currency, L(this, "[sdk][cardProcessor], token authentication success", () => {
|
|
1510
|
-
this.log("[sdk][cardProcessor], token authentication success"), K(),
|
|
1561
|
+
this.log("[sdk][cardProcessor], token authentication success"), K(), rt(this.container, this.getSuccessMessage()), this.successCallback?.(t);
|
|
1511
1562
|
}), L(this, "[sdk][cardProcessor], token authentication error", (e) => {
|
|
1512
1563
|
K(), this.log("[sdk][cardProcessor], token authentication error", e);
|
|
1513
1564
|
}));
|
|
1514
1565
|
return;
|
|
1515
1566
|
}
|
|
1516
1567
|
}
|
|
1517
|
-
K(),
|
|
1568
|
+
K(), rt(this.container, this.getSuccessMessage()), this.successCallback?.(t);
|
|
1518
1569
|
}
|
|
1519
1570
|
}
|
|
1520
1571
|
}
|
|
@@ -1547,26 +1598,34 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1547
1598
|
return this.secureEnabled && !this.secureFallback;
|
|
1548
1599
|
}
|
|
1549
1600
|
requestCardDetails() {
|
|
1550
|
-
this.isSecureFlowEnabled() && !this.secureReady ? (K(), 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(
|
|
1601
|
+
this.isSecureFlowEnabled() && !this.secureReady ? (K(), 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(b, { clickToPay: {
|
|
1551
1602
|
...this.secureConfig.clickToPay,
|
|
1552
1603
|
rememberMe: this.clickToPayProcessor.getRememberMe()
|
|
1553
|
-
} }), this.postSecureMessage(
|
|
1604
|
+
} }), this.postSecureMessage(ue)) : this.cardDetailsPort ? this.cardDetailsPort.postMessage({ status: Ze }) : super.requestCardDetails();
|
|
1554
1605
|
}
|
|
1555
1606
|
handleCardDetailsMessage(e) {
|
|
1556
1607
|
if (!e?.message) return;
|
|
1557
|
-
this.log(`[sdk][cardProcessor]: "${
|
|
1608
|
+
this.log(`[sdk][cardProcessor]: "${Ke}" message received`, e);
|
|
1558
1609
|
let t = !!(this.clickToPayProcessor?.isEnabled() && this.clickToPayProcessor?.getRememberMe()), n = !!(this.clickToPayProcessor?.isEnabled() && e.message.srcDigitalCardId), r = !!(t && !n && e.message.cardNumber);
|
|
1559
|
-
r && !this.clickToPayProcessor?.isSchemeSupported(e.message.cardNumber)
|
|
1560
|
-
this.log("[clickToPayProcessor]:
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1610
|
+
if (r && !this.clickToPayProcessor?.isSchemeSupported(e.message.cardNumber)) {
|
|
1611
|
+
this.log("[clickToPayProcessor]: checkoutWithNewCard - Scheme is not supported!"), K(), this.showMessage("Please use another card or use an alternative payment method");
|
|
1612
|
+
return;
|
|
1613
|
+
}
|
|
1614
|
+
if (n) {
|
|
1615
|
+
K(), this.clickToPayProcessor?.checkoutWithCard(e.message, (t) => {
|
|
1616
|
+
this.log("[clickToPayProcessor]: checkoutWithCard", t), t.checkoutActionCode !== "CANCEL" && t.checkoutActionCode !== "CHANGE_CARD" && (Xt(), this.tokenise({ clickToPayInfo: {
|
|
1617
|
+
correlationId: t.checkoutResponseData.srcCorrelationId,
|
|
1618
|
+
srcFlowId: t.headers["x-src-cx-flow-id"],
|
|
1619
|
+
merchantTransactionId: t.headers["merchant-transaction-id"],
|
|
1620
|
+
ccv: e.message.ccv,
|
|
1621
|
+
digitalCardId: t.checkoutResponseData.maskedCard.srcDigitalCardId.replace(/^-/, "")
|
|
1622
|
+
} }));
|
|
1623
|
+
}, (e) => {
|
|
1624
|
+
this.log("[clickToPayProcessor]: checkoutWithCard, error", e), K();
|
|
1625
|
+
});
|
|
1626
|
+
return;
|
|
1627
|
+
}
|
|
1628
|
+
this.fraudProcessor?.setPaymentInfo({
|
|
1570
1629
|
cardNumber: e.message.cardNumber,
|
|
1571
1630
|
expiryDate: e.message.expiryDate,
|
|
1572
1631
|
cardholder: e.message.cardholder,
|
|
@@ -1581,8 +1640,10 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1581
1640
|
expiryDate: e.message.expiryDate,
|
|
1582
1641
|
cardholder: e.message.cardholder,
|
|
1583
1642
|
ccv: e.message.ccv
|
|
1584
|
-
})
|
|
1585
|
-
|
|
1643
|
+
});
|
|
1644
|
+
let i = e.message.email || this.getEmail();
|
|
1645
|
+
i && (this.threeDsProcessor?.setEmail(i), this.secondaryThreeDsProcessor?.setEmail(i)), this.fraudProcessor && !(n || r) ? (Xt(), this.fraudProcessor.fraudCheck(L(this, "[fraudProcessor][fraudCheck], success", (t) => {
|
|
1646
|
+
It(t) ? (K(), P(this.container, "Payment couldn't be processed"), this.failureCallback?.({ error: "Payment couldn't be processed" })) : this.onSubmit({
|
|
1586
1647
|
cardNumber: e.message.cardNumber,
|
|
1587
1648
|
expiryDate: e.message.expiryDate,
|
|
1588
1649
|
cardholder: e.message.cardholder,
|
|
@@ -1595,7 +1656,7 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1595
1656
|
expiryDate: e.message.expiryDate,
|
|
1596
1657
|
cardholder: e.message.cardholder,
|
|
1597
1658
|
ccv: e.message.ccv
|
|
1598
|
-
})
|
|
1659
|
+
});
|
|
1599
1660
|
}
|
|
1600
1661
|
onSubmit(e, t) {
|
|
1601
1662
|
this.log("[cardProcessor]: onSubmit", {
|
|
@@ -1605,7 +1666,10 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1605
1666
|
ccv: "***"
|
|
1606
1667
|
},
|
|
1607
1668
|
fraudCheckResult: t
|
|
1608
|
-
}), t?.managedOrderToken ? (K(), P(this.container,
|
|
1669
|
+
}), t?.managedOrderToken ? (K(), P(this.container, oe), this.failureCallback?.({
|
|
1670
|
+
error: oe,
|
|
1671
|
+
errorDetails: { reason: "3DS challenge could not be started" }
|
|
1672
|
+
})) : this.clickToPayProcessor?.isEnabled() && this.clickToPayProcessor?.getRememberMe() ? this.tokeniseWithClickToPay(e, void 0, t) : this.threeDsProcessor ? this.threeDsProcessor?.threeDSInvoke(this.container, !1, (e) => {
|
|
1609
1673
|
K(), this.log("[threeDSInvoke], postAuthData", e), this.tokenise({
|
|
1610
1674
|
threeDSServerTransID: e.threeDSServerTransID,
|
|
1611
1675
|
fraudCheckResult: t,
|
|
@@ -1615,16 +1679,16 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1615
1679
|
}
|
|
1616
1680
|
tokenise(e) {
|
|
1617
1681
|
if (this.log("[cardProcessor]: tokenise", e), !this.iframe) return;
|
|
1618
|
-
|
|
1682
|
+
Xt();
|
|
1619
1683
|
let t = {
|
|
1620
|
-
status:
|
|
1684
|
+
status: xe,
|
|
1621
1685
|
threeDSServerTransID: e.threeDSServerTransID,
|
|
1622
1686
|
fraudCheckResult: e.fraudCheckResult,
|
|
1623
1687
|
externalThreeDsData: e.externalThreeDsData,
|
|
1624
1688
|
createNetworkToken: this.tokenAuthenticationEnabled || this.createNetworkToken,
|
|
1625
|
-
vault:
|
|
1626
|
-
verifyCard:
|
|
1627
|
-
email: this.
|
|
1689
|
+
vault: O(this.vault),
|
|
1690
|
+
verifyCard: O(this.verifyCard),
|
|
1691
|
+
email: this.getEmail() || void 0,
|
|
1628
1692
|
phone: this.customer?.phoneNumber,
|
|
1629
1693
|
billingAddress: this.billingAddress || void 0,
|
|
1630
1694
|
geolocation: this.geolocation || void 0,
|
|
@@ -1637,7 +1701,7 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1637
1701
|
}
|
|
1638
1702
|
tokeniseWithClickToPay(e, t, n) {
|
|
1639
1703
|
K(), this.clickToPayProcessor?.checkoutWithNewCard(e.cardNumber, e.expiryDate, e.ccv || "", !0, L(this, "[clickToPayProcessor]: checkoutWithNewCard", (r) => {
|
|
1640
|
-
this.log("[clickToPayProcessor]: checkoutWithNewCard", r), r.checkoutActionCode !== "CANCEL" && (
|
|
1704
|
+
this.log("[clickToPayProcessor]: checkoutWithNewCard", r), r.checkoutActionCode !== "CANCEL" && (Xt(), this.tokenise({
|
|
1641
1705
|
threeDSServerTransID: t,
|
|
1642
1706
|
fraudCheckResult: n,
|
|
1643
1707
|
clickToPayInfo: {
|
|
@@ -1654,7 +1718,7 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1654
1718
|
}
|
|
1655
1719
|
checkoutWithSecureClickToPayCard(e) {
|
|
1656
1720
|
K(), this.clickToPayProcessor?.checkoutWithCard(e, L(this, "[clickToPayProcessor]: secure checkoutWithCard", (e) => {
|
|
1657
|
-
this.log("[clickToPayProcessor]: secure checkoutWithCard", e), e.checkoutActionCode !== "CANCEL" && e.checkoutActionCode !== "CHANGE_CARD" && (
|
|
1721
|
+
this.log("[clickToPayProcessor]: secure checkoutWithCard", e), e.checkoutActionCode !== "CANCEL" && e.checkoutActionCode !== "CHANGE_CARD" && (Xt(), this.tokenise({ clickToPayInfo: {
|
|
1658
1722
|
correlationId: e.checkoutResponseData.srcCorrelationId,
|
|
1659
1723
|
srcFlowId: e.headers["x-src-cx-flow-id"],
|
|
1660
1724
|
merchantTransactionId: e.headers["merchant-transaction-id"],
|
|
@@ -1666,7 +1730,7 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1666
1730
|
}
|
|
1667
1731
|
checkoutWithSecureClickToPayNewCard(e) {
|
|
1668
1732
|
!e.encryptedCard || !e.cardBrand ? (K(), this.showMessage("Unable to process Click to Pay card"), this.failureCallback?.({ error: "Unable to process Click to Pay card" })) : (K(), this.clickToPayProcessor?.checkoutWithEncryptedNewCard(e.encryptedCard, e.cardBrand, L(this, "[clickToPayProcessor]: secure checkoutWithEncryptedNewCard", (e) => {
|
|
1669
|
-
this.log("[clickToPayProcessor]: secure checkoutWithEncryptedNewCard", e), e.checkoutActionCode !== "CANCEL" && (
|
|
1733
|
+
this.log("[clickToPayProcessor]: secure checkoutWithEncryptedNewCard", e), e.checkoutActionCode !== "CANCEL" && (Xt(), this.tokenise({ clickToPayInfo: {
|
|
1670
1734
|
correlationId: e.checkoutResponseData.srcCorrelationId,
|
|
1671
1735
|
srcFlowId: e.headers["x-src-cx-flow-id"],
|
|
1672
1736
|
merchantTransactionId: e.headers["merchant-transaction-id"],
|
|
@@ -1677,31 +1741,36 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1677
1741
|
})));
|
|
1678
1742
|
}
|
|
1679
1743
|
setAmount(e) {
|
|
1680
|
-
this.amount = e, this.clickToPayProcessor?.setAmount(e), this.isSecureFlowEnabled() && this.postSecureMessage(
|
|
1681
|
-
status:
|
|
1744
|
+
this.amount = e, this.clickToPayProcessor?.setAmount(e), this.isSecureFlowEnabled() && this.postSecureMessage(b, { amount: e }), this.iframe && this.iframe.contentWindow?.postMessage({
|
|
1745
|
+
status: ce,
|
|
1682
1746
|
amount: e
|
|
1683
1747
|
}, "*");
|
|
1684
1748
|
}
|
|
1685
1749
|
setCurrency(e) {
|
|
1686
|
-
this.currency = e, this.clickToPayProcessor?.setCurrency(e), this.isSecureFlowEnabled() && this.postSecureMessage(
|
|
1687
|
-
status:
|
|
1750
|
+
this.currency = e, this.clickToPayProcessor?.setCurrency(e), this.isSecureFlowEnabled() && this.postSecureMessage(b, { currency: e }), this.iframe && this.iframe.contentWindow?.postMessage({
|
|
1751
|
+
status: nt,
|
|
1688
1752
|
currency: e
|
|
1689
1753
|
}, "*");
|
|
1690
1754
|
}
|
|
1691
1755
|
setCustomerInfo(e) {
|
|
1692
|
-
this.customer = { ...e }, this.clickToPayProcessor?.setCustomerInfo(e)
|
|
1756
|
+
this.customer = { ...e }, this.clickToPayProcessor?.setCustomerInfo(e);
|
|
1757
|
+
let t = this.getEmail();
|
|
1758
|
+
t && (this.threeDsProcessor?.setEmail(t), this.secondaryThreeDsProcessor?.setEmail(t)), this.isSecureFlowEnabled() && this.postSecureMessage(b, { customer: this.getCustomerWithEmail() }), this.iframe && t && this.iframe.contentWindow?.postMessage({
|
|
1759
|
+
status: be,
|
|
1760
|
+
email: t
|
|
1761
|
+
}, this.getOriginFromUrl(this.url) || "*");
|
|
1693
1762
|
}
|
|
1694
1763
|
setBillingAddress(e) {
|
|
1695
|
-
this.billingAddress = { ...e }, this.isSecureFlowEnabled() && this.postSecureMessage(
|
|
1764
|
+
this.billingAddress = { ...e }, this.isSecureFlowEnabled() && this.postSecureMessage(b, { billingAddress: e });
|
|
1696
1765
|
}
|
|
1697
1766
|
setOrderInfo(e) {
|
|
1698
|
-
this.order = { ...e }, this.isSecureFlowEnabled() && this.postSecureMessage(
|
|
1767
|
+
this.order = { ...e }, this.isSecureFlowEnabled() && this.postSecureMessage(b, { order: e });
|
|
1699
1768
|
}
|
|
1700
1769
|
setGeolocation(e) {
|
|
1701
|
-
this.geolocation = { ...e }, this.isSecureFlowEnabled() && this.postSecureMessage(
|
|
1770
|
+
this.geolocation = { ...e }, this.isSecureFlowEnabled() && this.postSecureMessage(b, { geolocation: e });
|
|
1702
1771
|
}
|
|
1703
1772
|
tokeniseCard(e, t, n, r, i, a, o, s, c) {
|
|
1704
|
-
A(e) ?
|
|
1773
|
+
A(e) ? Fe(t) ? Oe(n) ? we(i) ? this.httpInvoker?.invoke(Qt(this.apiUrl, e)[Zt.TOKENISE_CARD].url, Qt(this.apiUrl, e)[Zt.TOKENISE_CARD].method, JSON.stringify({
|
|
1705
1774
|
paymentInformation: {
|
|
1706
1775
|
cardNumber: t,
|
|
1707
1776
|
expiryDate: n,
|
|
@@ -1765,32 +1834,32 @@ var { hideSpinner: K, showSpinner: Kt } = Re(), qt = {
|
|
|
1765
1834
|
};
|
|
1766
1835
|
F([I], q.prototype, "cleanUp", null), F([I], q.prototype, "addCard", null), F([I], q.prototype, "messageHandler", null), F([I], q.prototype, "setCardDetailsPort", null), F([I], q.prototype, "closeCardDetailsPort", null), F([I], q.prototype, "postSecureMessage", null), F([I], q.prototype, "requestCardDetails", null), F([I], q.prototype, "handleCardDetailsMessage", null), F([I], q.prototype, "onSubmit", null), F([I], q.prototype, "tokenise", null), F([I], q.prototype, "tokeniseWithClickToPay", null), F([I], q.prototype, "checkoutWithSecureClickToPayCard", null), F([I], q.prototype, "checkoutWithSecureClickToPayNewCard", null), F([I], q.prototype, "setAmount", null), F([I], q.prototype, "setCurrency", null), F([I], q.prototype, "setCustomerInfo", null), F([I], q.prototype, "setBillingAddress", null), F([I], q.prototype, "setOrderInfo", null), F([I], q.prototype, "setGeolocation", null), F([I], q.prototype, "tokeniseCard", null), F([I], q.prototype, "initTokenAuthenticationProcessor", null);
|
|
1767
1836
|
// src/sdk/utils/error.ts
|
|
1768
|
-
var
|
|
1769
|
-
function
|
|
1837
|
+
var $t = g("");
|
|
1838
|
+
function en() {
|
|
1770
1839
|
return {
|
|
1771
|
-
errorMessage:
|
|
1840
|
+
errorMessage: $t,
|
|
1772
1841
|
showErrorMessage: (e) => {
|
|
1773
|
-
|
|
1842
|
+
$t.value = e;
|
|
1774
1843
|
},
|
|
1775
1844
|
hideErrorMessage: () => {
|
|
1776
|
-
|
|
1845
|
+
$t.value = "";
|
|
1777
1846
|
}
|
|
1778
1847
|
};
|
|
1779
1848
|
}
|
|
1780
1849
|
// src/sdk/components/PayToForm.vue?vue&type=script&setup=true&lang.ts
|
|
1781
|
-
var
|
|
1850
|
+
var tn = {
|
|
1782
1851
|
id: "payfurl-payto-form",
|
|
1783
1852
|
class: "payfurl-form"
|
|
1784
|
-
},
|
|
1853
|
+
}, nn = {
|
|
1785
1854
|
key: 0,
|
|
1786
1855
|
class: "error text-normal"
|
|
1787
|
-
},
|
|
1856
|
+
}, rn = { class: "row" }, an = { class: "row" }, on = { class: "row" }, sn = ["placeholder"], cn = {
|
|
1788
1857
|
key: 0,
|
|
1789
1858
|
class: "small"
|
|
1790
|
-
},
|
|
1859
|
+
}, ln = {
|
|
1791
1860
|
key: 1,
|
|
1792
1861
|
class: "error"
|
|
1793
|
-
},
|
|
1862
|
+
}, un = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
1794
1863
|
__name: "PayToForm",
|
|
1795
1864
|
props: {
|
|
1796
1865
|
log: { type: Function },
|
|
@@ -1798,11 +1867,11 @@ var Zt = {
|
|
|
1798
1867
|
},
|
|
1799
1868
|
emits: ["submit"],
|
|
1800
1869
|
setup(e, { emit: t }) {
|
|
1801
|
-
let n = e, r = t, i =
|
|
1870
|
+
let n = e, r = t, i = g({}), { isLoading: o } = H(), s = g(""), c = g("PHONE"), l = g(""), u = $e(() => c.value === "PHONE" ? "0405123456 or 0212341234" : a(c.value.toLowerCase())), d = g(!0), { errorMessage: f } = en();
|
|
1802
1871
|
function p() {
|
|
1803
|
-
return i.value.payId = "", c.value === "PHONE" && (
|
|
1872
|
+
return i.value.payId = "", c.value === "PHONE" && (Re(l.value) || (i.value.payId = "Invalid phone number")), c.value === "EMAIL" && (Ue(l.value) || (i.value.payId = "Invalid email")), c.value === "ABN" && (Ve(l.value.replace(/ /g, "")) || (i.value.payId = "Invalid ABN")), i.value.payId === "";
|
|
1804
1873
|
}
|
|
1805
|
-
function
|
|
1874
|
+
function h(e) {
|
|
1806
1875
|
if (e?.data?.status) {
|
|
1807
1876
|
if (e.data.status === "submit-card-form") {
|
|
1808
1877
|
if (n.log?.(`[PayTo]: message "${e.data.status}" received`, e.data), !d.value || (e.stopPropagation(), n.log && n.log("[PayTo]: form submit", {
|
|
@@ -1813,69 +1882,72 @@ var Zt = {
|
|
|
1813
1882
|
r("submit", {
|
|
1814
1883
|
payerName: s.value,
|
|
1815
1884
|
payIdType: c.value,
|
|
1816
|
-
payId: c.value === "PHONE" ?
|
|
1885
|
+
payId: c.value === "PHONE" ? Je(l.value) : String(l.value).toLowerCase().replace(/ /g, "")
|
|
1817
1886
|
});
|
|
1818
1887
|
}
|
|
1819
1888
|
e.data.status === "activate" && e.data.component === "payto" && (n.log?.(`[PayTo]: message "${e.data.status}" received`, e.data), f.value = "", d.value = !0), e.data.status === "deactivate" && e.data.component === "payto" && (n.log?.(`[PayTo]: message "${e.data.status}" received`, e.data), d.value = !1);
|
|
1820
1889
|
}
|
|
1821
1890
|
}
|
|
1822
|
-
return
|
|
1823
|
-
window.addEventListener("message",
|
|
1891
|
+
return m(() => {
|
|
1892
|
+
window.addEventListener("message", h), window.addEventListener("keypress", function(e) {
|
|
1824
1893
|
e.altKey && e.code === "KeyP" && (e.preventDefault(), s.value = "test", c.value = "ABN", l.value = "67384721620");
|
|
1825
|
-
}), window.postMessage({
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1894
|
+
}), window.postMessage({
|
|
1895
|
+
status: Qe,
|
|
1896
|
+
paymentMethod: "payto"
|
|
1897
|
+
}, "*");
|
|
1898
|
+
}), Le(() => {
|
|
1899
|
+
window.removeEventListener("message", h);
|
|
1900
|
+
}), (e, t) => (x(), C("div", tn, [N(pe(je, null, null, 512), [[Xe, w(o)]]), S("div", {
|
|
1829
1901
|
class: "container-form",
|
|
1830
|
-
style:
|
|
1902
|
+
style: ye(`visibility: ${w(o) ? "hidden" : "visible"}`)
|
|
1831
1903
|
}, [
|
|
1832
|
-
|
|
1833
|
-
|
|
1904
|
+
w(f) ? (x(), C("div", nn, T(w(f)), 1)) : M("", !0),
|
|
1905
|
+
S("div", rn, [t[3] ||= S("label", null, "Payer Name", -1), S("div", null, [N(S("input", {
|
|
1834
1906
|
type: "text",
|
|
1835
1907
|
maxlength: "100",
|
|
1836
1908
|
placeholder: "Payer Name",
|
|
1837
1909
|
"onUpdate:modelValue": t[0] ||= (e) => s.value = e
|
|
1838
|
-
}, null, 512), [[
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
]], 512), [[
|
|
1844
|
-
|
|
1845
|
-
|
|
1910
|
+
}, null, 512), [[Se, s.value]])])]),
|
|
1911
|
+
S("div", an, [t[5] ||= S("label", null, "Payer Id Type", -1), S("div", null, [N(S("select", { "onUpdate:modelValue": t[1] ||= (e) => c.value = e }, [...t[4] ||= [
|
|
1912
|
+
S("option", { value: "PHONE" }, "Phone", -1),
|
|
1913
|
+
S("option", { value: "EMAIL" }, "Email", -1),
|
|
1914
|
+
S("option", { value: "ABN" }, "Abn", -1)
|
|
1915
|
+
]], 512), [[Pe, c.value]])])]),
|
|
1916
|
+
S("div", on, [t[6] ||= S("label", null, " Pay Id ", -1), S("div", null, [
|
|
1917
|
+
N(S("input", {
|
|
1846
1918
|
type: "text",
|
|
1847
1919
|
maxlength: "100",
|
|
1848
1920
|
placeholder: u.value,
|
|
1849
1921
|
"onUpdate:modelValue": t[2] ||= (e) => l.value = e,
|
|
1850
1922
|
onKeyup: p
|
|
1851
|
-
}, null, 40,
|
|
1852
|
-
c.value === "PHONE" ? (
|
|
1853
|
-
i.value.payId ? (
|
|
1923
|
+
}, null, 40, sn), [[Se, l.value]]),
|
|
1924
|
+
c.value === "PHONE" ? (x(), C("div", cn, "(mobile or landline with area code)")) : M("", !0),
|
|
1925
|
+
i.value.payId ? (x(), C("p", ln, T(i.value.payId), 1)) : M("", !0)
|
|
1854
1926
|
])])
|
|
1855
1927
|
], 4)]));
|
|
1856
1928
|
}
|
|
1857
|
-
}), [["__scopeId", "data-v-
|
|
1929
|
+
}), [["__scopeId", "data-v-edac356c"]]), dn = {
|
|
1858
1930
|
id: "payfurl-payto-agreement",
|
|
1859
1931
|
class: "payfurl-form"
|
|
1860
|
-
},
|
|
1932
|
+
}, fn = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
1861
1933
|
__name: "PayToAgreement",
|
|
1862
1934
|
props: { debug: { type: Boolean } },
|
|
1863
1935
|
setup(e) {
|
|
1864
|
-
return (e, t) => (
|
|
1936
|
+
return (e, t) => (x(), C("div", dn, [pe(je), t[0] ||= S("div", { class: "message" }, "Approve the agreement in your banking app", -1)]));
|
|
1865
1937
|
}
|
|
1866
|
-
}), [["__scopeId", "data-v-f90fa6e7"]]),
|
|
1938
|
+
}), [["__scopeId", "data-v-f90fa6e7"]]), pn = {
|
|
1867
1939
|
TOKENISE: "TOKENISE",
|
|
1868
1940
|
TOKEN_STATUS: "TOKEN_STATUS"
|
|
1869
|
-
},
|
|
1870
|
-
[
|
|
1941
|
+
}, mn = (e, t) => ({
|
|
1942
|
+
[pn.TOKENISE]: {
|
|
1871
1943
|
url: e + "/token/payto",
|
|
1872
1944
|
method: "POST"
|
|
1873
1945
|
},
|
|
1874
|
-
[
|
|
1946
|
+
[pn.TOKEN_STATUS]: {
|
|
1875
1947
|
url: e + "/token/" + t,
|
|
1876
1948
|
method: "GET"
|
|
1877
1949
|
}
|
|
1878
|
-
}),
|
|
1950
|
+
}), hn = class {
|
|
1879
1951
|
container = null;
|
|
1880
1952
|
log;
|
|
1881
1953
|
apiUrl = "";
|
|
@@ -1903,16 +1975,23 @@ var Zt = {
|
|
|
1903
1975
|
this.container?.id === e?.id && this.destroy?.();
|
|
1904
1976
|
}
|
|
1905
1977
|
addPayTo(e, t, n, r) {
|
|
1906
|
-
|
|
1978
|
+
this.log("[addPayTo]", {
|
|
1907
1979
|
amount: t,
|
|
1908
1980
|
providerId: n,
|
|
1909
1981
|
options: r
|
|
1910
|
-
}), this.container = e, this.providerId = n, this.options = r, this.options.metadata = U(r?.metadata)
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1982
|
+
}), this.container = e, this.providerId = n, this.options = r, this.options.metadata = U(r?.metadata);
|
|
1983
|
+
let i = (t) => {
|
|
1984
|
+
throw P(e, t), window.postMessage({
|
|
1985
|
+
status: ee,
|
|
1986
|
+
paymentMethod: "payto",
|
|
1987
|
+
reason: "error",
|
|
1988
|
+
message: t
|
|
1989
|
+
}, "*"), TypeError(t);
|
|
1990
|
+
};
|
|
1991
|
+
k(t) || i("Invalid amount: " + t), String(r.description).trim() || i("Invalid description"), r.maximumAmount ||= 1e3, (r.maximumAmount < 0 || r.maximumAmount > 9999) && i("Invalid maximum amount: " + r.maximumAmount);
|
|
1992
|
+
let a = E({
|
|
1914
1993
|
el: this.container,
|
|
1915
|
-
component:
|
|
1994
|
+
component: un,
|
|
1916
1995
|
props: {
|
|
1917
1996
|
el: this.container,
|
|
1918
1997
|
log: this.log,
|
|
@@ -1924,7 +2003,7 @@ var Zt = {
|
|
|
1924
2003
|
}, 500);
|
|
1925
2004
|
}) }
|
|
1926
2005
|
});
|
|
1927
|
-
this.destroy =
|
|
2006
|
+
this.destroy = a.destroy;
|
|
1928
2007
|
}
|
|
1929
2008
|
tokenise(e) {
|
|
1930
2009
|
let t = {
|
|
@@ -1938,15 +2017,15 @@ var Zt = {
|
|
|
1938
2017
|
},
|
|
1939
2018
|
metadata: this.options?.metadata
|
|
1940
2019
|
};
|
|
1941
|
-
this.httpInvoker?.invoke(
|
|
2020
|
+
this.httpInvoker?.invoke(mn(this.apiUrl)[pn.TOKENISE].url, mn(this.apiUrl)[pn.TOKENISE].method, JSON.stringify(t), this.successPayToHandler.bind(this), this.failurePayToHandler.bind(this));
|
|
1942
2021
|
}
|
|
1943
2022
|
successPayToHandler = L(this, "[PayTo][tokenise][successPayToHandler]", (e, t) => {
|
|
1944
2023
|
this.log("successPayToHandler", e, t);
|
|
1945
2024
|
let n = JSON.parse(t);
|
|
1946
2025
|
if (!n || !n?.tokenId) return this.failurePayToHandler(e, t);
|
|
1947
|
-
this.tokenId = n.tokenId,
|
|
2026
|
+
this.tokenId = n.tokenId, E({
|
|
1948
2027
|
el: this.container,
|
|
1949
|
-
component:
|
|
2028
|
+
component: fn,
|
|
1950
2029
|
props: {
|
|
1951
2030
|
el: this.container,
|
|
1952
2031
|
log: this.log
|
|
@@ -1954,7 +2033,10 @@ var Zt = {
|
|
|
1954
2033
|
}), this.checkAgreement();
|
|
1955
2034
|
});
|
|
1956
2035
|
failurePayToHandler = L(this, "[PayTo][tokenise][failurePayToHandler]", (e, t) => {
|
|
1957
|
-
this.log("failurePayToHandler", e, t), H().stopLoading(),
|
|
2036
|
+
this.log("failurePayToHandler", e, t), H().stopLoading(), en().showErrorMessage("Invalid payment details"), this.failureCallback?.({
|
|
2037
|
+
error: "Invalid payment details",
|
|
2038
|
+
body: t
|
|
2039
|
+
});
|
|
1958
2040
|
});
|
|
1959
2041
|
failurePayToAgreementHandler = L(this, "[PayTo][tokenise][failurePayToAgreementHandler]", (e, t) => {
|
|
1960
2042
|
H().stopLoading(), this.log("failurePayToAgreementHandler", e, t), P(this.container, "Agreement has been canceled"), this.failureCallback?.({
|
|
@@ -1963,10 +2045,10 @@ var Zt = {
|
|
|
1963
2045
|
});
|
|
1964
2046
|
});
|
|
1965
2047
|
successPayToAgreementHandler() {
|
|
1966
|
-
H().stopLoading(), this.log("success agreement", this.tokenId),
|
|
2048
|
+
H().stopLoading(), this.log("success agreement", this.tokenId), rt(this.container, "PayTo Agreement Approved"), this.successCallback?.({ token: this.tokenId });
|
|
1967
2049
|
}
|
|
1968
2050
|
checkAgreement() {
|
|
1969
|
-
this.checkAgreementHandler ||= setInterval(this.checkAgreement.bind(this), 5e3), this.httpInvoker?.invoke(
|
|
2051
|
+
this.checkAgreementHandler ||= setInterval(this.checkAgreement.bind(this), 5e3), this.httpInvoker?.invoke(mn(this.apiUrl, this.tokenId)[pn.TOKEN_STATUS].url, mn(this.apiUrl, this.tokenId)[pn.TOKEN_STATUS].method, {}, L(this, "[checkAgreement], success", (e, t) => {
|
|
1970
2052
|
this.log("checkAgreement", e, t);
|
|
1971
2053
|
let n = JSON.parse(t);
|
|
1972
2054
|
if (!n) return clearInterval(this.checkAgreementHandler), this.failurePayToAgreementHandler(e, t);
|
|
@@ -1974,14 +2056,14 @@ var Zt = {
|
|
|
1974
2056
|
}), L(this, "[checkAgreement], failure", (e, t) => (this.log("checkAgreement", e, t), clearInterval(this.checkAgreementHandler), this.failurePayToAgreementHandler(e, t))));
|
|
1975
2057
|
}
|
|
1976
2058
|
};
|
|
1977
|
-
F([I],
|
|
2059
|
+
F([I], hn.prototype, "cleanUp", null), F([I], hn.prototype, "addPayTo", null), F([I], hn.prototype, "tokenise", null), F([I], hn.prototype, "successPayToAgreementHandler", null), F([I], hn.prototype, "checkAgreement", null);
|
|
1978
2060
|
// src/sdk/checkout/checkoutProvider.type.ts
|
|
1979
2061
|
var J;
|
|
1980
2062
|
(function(e) {
|
|
1981
2063
|
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";
|
|
1982
2064
|
})(J ||= {});
|
|
1983
2065
|
// src/sdk/checkout/checkoutOptions.ts
|
|
1984
|
-
var
|
|
2066
|
+
var gn = {
|
|
1985
2067
|
[J.AZUPAY]: {
|
|
1986
2068
|
name: "PayID",
|
|
1987
2069
|
description: "",
|
|
@@ -2366,10 +2448,10 @@ var fn = {
|
|
|
2366
2448
|
buttonTitle: "Pay with eRaty",
|
|
2367
2449
|
icon: "Eraty"
|
|
2368
2450
|
}
|
|
2369
|
-
},
|
|
2451
|
+
}, _n = { class: "modal-header" }, vn = { class: "main-title" }, yn = { class: "modal-body" }, bn = {
|
|
2370
2452
|
key: 0,
|
|
2371
2453
|
class: "modal-footer"
|
|
2372
|
-
},
|
|
2454
|
+
}, xn = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
2373
2455
|
__name: "Modal",
|
|
2374
2456
|
props: {
|
|
2375
2457
|
width: {},
|
|
@@ -2386,31 +2468,31 @@ var fn = {
|
|
|
2386
2468
|
function a() {
|
|
2387
2469
|
n.backdrop !== "static" && i();
|
|
2388
2470
|
}
|
|
2389
|
-
let o =
|
|
2471
|
+
let o = ae(), s = $e(() => !!o.footer), c = $e(() => {
|
|
2390
2472
|
let e = [];
|
|
2391
2473
|
return n.width && e.push(`width: ${n.width}`), n.height && e.push(`height: ${n.height}`), e.join(";");
|
|
2392
|
-
}), l =
|
|
2393
|
-
return (e, t) => (
|
|
2474
|
+
}), l = $e(() => n.mode == "confirm" ? "small" : "");
|
|
2475
|
+
return (e, t) => (x(), C("div", {
|
|
2394
2476
|
class: "modal-mask",
|
|
2395
|
-
onMousedown:
|
|
2396
|
-
}, [
|
|
2397
|
-
class:
|
|
2477
|
+
onMousedown: tt(a, ["self"])
|
|
2478
|
+
}, [S("div", {
|
|
2479
|
+
class: ie(["modal-wrapper", l.value]),
|
|
2398
2480
|
role: "document",
|
|
2399
|
-
onClick: t[0] ||=
|
|
2400
|
-
}, [
|
|
2481
|
+
onClick: t[0] ||= tt(() => {}, ["stop"])
|
|
2482
|
+
}, [S("div", {
|
|
2401
2483
|
class: "modal-content",
|
|
2402
|
-
style:
|
|
2484
|
+
style: ye(c.value)
|
|
2403
2485
|
}, [
|
|
2404
|
-
|
|
2486
|
+
S("div", _n, [S("div", {
|
|
2405
2487
|
class: "close-icon",
|
|
2406
|
-
onClick:
|
|
2407
|
-
}, [
|
|
2408
|
-
|
|
2409
|
-
s.value ? (
|
|
2410
|
-
|
|
2488
|
+
onClick: tt(i, ["stop"])
|
|
2489
|
+
}, [pe(qe, { size: 15 })]), S("div", vn, [me(e.$slots, "title", {}, void 0, !0)])]),
|
|
2490
|
+
S("div", yn, [me(e.$slots, "body", {}, void 0, !0)]),
|
|
2491
|
+
s.value ? (x(), C("div", bn, [me(e.$slots, "footer", {}, void 0, !0)])) : M("", !0),
|
|
2492
|
+
me(e.$slots, "default", {}, void 0, !0)
|
|
2411
2493
|
], 4)], 2)], 32));
|
|
2412
2494
|
}
|
|
2413
|
-
}), [["__scopeId", "data-v-2b2c8fc7"]]),
|
|
2495
|
+
}), [["__scopeId", "data-v-2b2c8fc7"]]), Sn = ["src"], Cn = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
2414
2496
|
__name: "CheckoutPopup",
|
|
2415
2497
|
props: {
|
|
2416
2498
|
url: {},
|
|
@@ -2418,30 +2500,52 @@ var fn = {
|
|
|
2418
2500
|
},
|
|
2419
2501
|
emits: ["close"],
|
|
2420
2502
|
setup(e, { emit: t }) {
|
|
2421
|
-
let n = e, r = t, i =
|
|
2422
|
-
return
|
|
2503
|
+
let n = e, r = t, i = g(n.url);
|
|
2504
|
+
return le(() => n.url, (e) => {
|
|
2423
2505
|
i.value = e;
|
|
2424
|
-
}),
|
|
2506
|
+
}), m(() => {}), (t, n) => (x(), _(xn, {
|
|
2425
2507
|
width: "80vw",
|
|
2426
2508
|
height: "80vh",
|
|
2427
2509
|
backdrop: "static",
|
|
2428
2510
|
onClose: n[0] ||= (e) => r("close")
|
|
2429
2511
|
}, {
|
|
2430
|
-
title:
|
|
2431
|
-
body:
|
|
2512
|
+
title: ge(() => [v(T(e.name), 1)]),
|
|
2513
|
+
body: ge(() => [S("iframe", {
|
|
2432
2514
|
src: i.value,
|
|
2433
2515
|
sandbox: "allow-same-origin allow-scripts allow-popups allow-forms"
|
|
2434
|
-
}, null, 8,
|
|
2516
|
+
}, null, 8, Sn)]),
|
|
2435
2517
|
_: 1
|
|
2436
2518
|
}));
|
|
2437
2519
|
}
|
|
2438
|
-
}), [["__scopeId", "data-v-630d3092"]]),
|
|
2520
|
+
}), [["__scopeId", "data-v-630d3092"]]), Y;
|
|
2521
|
+
(function(e) {
|
|
2522
|
+
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";
|
|
2523
|
+
})(Y ||= {});
|
|
2524
|
+
// src/sdk/utils/paymentType.ts
|
|
2525
|
+
function wn(e) {
|
|
2526
|
+
switch (e) {
|
|
2527
|
+
case J.AZUPAY: return Y.payid;
|
|
2528
|
+
case J.SHIFT: return Y.shift;
|
|
2529
|
+
case J.PESAPAL: return Y.pesapal;
|
|
2530
|
+
case J.PAYBYACCOUNT: return Y.paybyaccount;
|
|
2531
|
+
case J.PAYGLOCAL: return Y.payglocal;
|
|
2532
|
+
case J.ZIP: return Y.zip;
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
function Tn(e) {
|
|
2536
|
+
return e === J.UPI ? { paymentMethod: "upi" } : {
|
|
2537
|
+
paymentMethod: "checkout",
|
|
2538
|
+
providerType: e
|
|
2539
|
+
};
|
|
2540
|
+
}
|
|
2541
|
+
// src/sdk/components/CheckoutForm.vue?vue&type=script&setup=true&lang.ts
|
|
2542
|
+
var En = ["id"], Dn = {
|
|
2439
2543
|
key: 0,
|
|
2440
2544
|
class: "error text-normal"
|
|
2441
|
-
},
|
|
2545
|
+
}, On = { class: "row" }, kn = {
|
|
2442
2546
|
key: 1,
|
|
2443
2547
|
class: "error"
|
|
2444
|
-
},
|
|
2548
|
+
}, An = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
2445
2549
|
__name: "CheckoutForm",
|
|
2446
2550
|
props: {
|
|
2447
2551
|
log: { type: Function },
|
|
@@ -2458,24 +2562,37 @@ var fn = {
|
|
|
2458
2562
|
"newWindowClose"
|
|
2459
2563
|
],
|
|
2460
2564
|
setup(e, { emit: t }) {
|
|
2461
|
-
let n = e, r = t, i =
|
|
2565
|
+
let n = e, r = t, i = g(null), { isLoading: a } = H(), o = g(!0), s = g(n.providerType), c = g(""), l = g(!!n.options.checkoutOptions?.newWindow), u = null, d = g(null), { errorMessage: f } = en(), p = $e(() => gn[s.value]?.buttonTitle || `Pay with ${s.value}`), h = $e(() => {
|
|
2462
2566
|
let e = d.value?.gatewayTransactionData?.RedirectUrl || "";
|
|
2463
|
-
return !e || !
|
|
2464
|
-
}),
|
|
2465
|
-
function
|
|
2567
|
+
return !e || !Ne(e) ? "" : l.value ? e : `${e}${e.includes("?") ? "&" : "?"}embedded=true`;
|
|
2568
|
+
}), v = g(!1), y = g(!1), te = $e(() => h.value && !v.value && !y.value);
|
|
2569
|
+
function ne(e) {
|
|
2466
2570
|
if (e?.data?.status) {
|
|
2467
|
-
if (e.data.status === "activate" && e.data.component === "checkout" && e.data.providerType === s.value && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), o.value = !0, r("activate", n.options)), e.data.status === "deactivate" && e.data.component === "checkout" && e.data.providerType === s.value && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), o.value = !1), e.data.status === "checkout-ready" && e.data.component === "checkout" && e.data.providerType === s.value
|
|
2571
|
+
if (e.data.status === "activate" && e.data.component === "checkout" && e.data.providerType === s.value && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), o.value = !0, r("activate", n.options)), e.data.status === "deactivate" && e.data.component === "checkout" && e.data.providerType === s.value && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), o.value = !1), e.data.status === "checkout-ready" && e.data.component === "checkout" && e.data.providerType === s.value) {
|
|
2572
|
+
n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), f.value = "", d.value = e.data.checkoutData, n.log?.("[BNPL]: checkout", d.value);
|
|
2573
|
+
let t = Tn(s.value);
|
|
2574
|
+
window.postMessage(h.value ? {
|
|
2575
|
+
status: Qe,
|
|
2576
|
+
...t
|
|
2577
|
+
} : {
|
|
2578
|
+
status: ee,
|
|
2579
|
+
...t,
|
|
2580
|
+
reason: "error",
|
|
2581
|
+
message: "The checkout has no payment page"
|
|
2582
|
+
}, "*");
|
|
2583
|
+
}
|
|
2584
|
+
if (e.data.status === "message" && e.data.component === "checkout" && e.data.providerType === s.value && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), c.value = e.data.message, y.value = !1, v.value = !1), e.data.status === "error" && e.data.component === "checkout" && e.data.providerType === s.value && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), c.value = e.data.error, e.data.originalError)) {
|
|
2468
2585
|
let t = JSON.parse(e.data.originalError);
|
|
2469
2586
|
t?.message && (c.value = t.message);
|
|
2470
2587
|
}
|
|
2471
|
-
e.data.status === "redirect" && e.data.component === "checkout" && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data),
|
|
2588
|
+
e.data.status === "redirect" && e.data.component === "checkout" && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), v.value = !1, e.data.result === "failed" && (c.value = "Payment has been canceled", ie())), e.data.component === "checkout" && e.data.providerType === J.PAYBYACCOUNT && (e.data.status === "failure" ? (n.log?.("[BNPL][PayByAccount]: message received", e.data), c.value = e.data.error, r("newWindowClose")) : e.data.status === "success" && (n.log?.("[BNPL][PayByAccount]: message received", e.data), f.value = ""));
|
|
2472
2589
|
}
|
|
2473
2590
|
}
|
|
2474
|
-
function
|
|
2591
|
+
function re() {
|
|
2475
2592
|
if (c.value = "", n.clickGate()?.() !== !1) {
|
|
2476
2593
|
if (l.value) {
|
|
2477
2594
|
let e = "maxTouchPoints" in navigator && navigator.maxTouchPoints > 0 ? 791 : 637, t = window.screenLeft === void 0 ? window.screenX : window.screenLeft, n = window.screenTop === void 0 ? window.screenY : window.screenTop, i = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width, a = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height, o = i / window.screen.availWidth, s = (i - 400) / 2 / o + t, c = (a - e) / 2 / o + n;
|
|
2478
|
-
u = window.open(
|
|
2595
|
+
u = window.open(h.value, "_blank", `popup=yes,
|
|
2479
2596
|
toolbar=no,
|
|
2480
2597
|
location=no,
|
|
2481
2598
|
status=no,
|
|
@@ -2486,68 +2603,70 @@ var fn = {
|
|
|
2486
2603
|
height=${e},
|
|
2487
2604
|
top=${c},
|
|
2488
2605
|
left=${s}`), r("newWindow", d.value?.externalId);
|
|
2489
|
-
} else
|
|
2606
|
+
} else v.value = !0, y.value = !0, r("popup", d.value?.externalId);
|
|
2490
2607
|
return !1;
|
|
2491
2608
|
}
|
|
2492
2609
|
}
|
|
2493
|
-
function
|
|
2494
|
-
|
|
2610
|
+
function ie() {
|
|
2611
|
+
v.value = !1, y.value = !1, u?.close(), r("popupClose");
|
|
2495
2612
|
}
|
|
2496
|
-
return
|
|
2497
|
-
window.addEventListener("message",
|
|
2498
|
-
}),
|
|
2499
|
-
window.removeEventListener("message",
|
|
2500
|
-
}), (e, t) => (
|
|
2501
|
-
|
|
2502
|
-
|
|
2613
|
+
return m(() => {
|
|
2614
|
+
window.addEventListener("message", ne), mt(i.value, "payfurl-combined-container") || (o.value = !0, r("activate", n.options));
|
|
2615
|
+
}), Le(() => {
|
|
2616
|
+
window.removeEventListener("message", ne);
|
|
2617
|
+
}), (e, t) => (x(), C(Ee, null, [
|
|
2618
|
+
N(pe(je, { "use-local": "" }, null, 512), [[Xe, !h.value]]),
|
|
2619
|
+
y.value && !v.value ? (x(), _(je, {
|
|
2503
2620
|
key: 0,
|
|
2504
2621
|
message: "Finalise the payment"
|
|
2505
|
-
})) :
|
|
2506
|
-
|
|
2622
|
+
})) : M("", !0),
|
|
2623
|
+
S("div", {
|
|
2507
2624
|
id: `payfurl-${s.value}-form`,
|
|
2508
2625
|
class: "payfurl-checkout-form",
|
|
2509
2626
|
ref_key: "root",
|
|
2510
2627
|
ref: i
|
|
2511
|
-
}, [
|
|
2628
|
+
}, [S("div", {
|
|
2512
2629
|
class: "container-form",
|
|
2513
|
-
style:
|
|
2514
|
-
}, [
|
|
2630
|
+
style: ye(`visibility: ${w(a) ? "hidden" : "visible"}`)
|
|
2631
|
+
}, [w(f) ? (x(), C("div", Dn, T(w(f)), 1)) : M("", !0), S("div", On, [te.value ? (x(), C("button", {
|
|
2515
2632
|
key: 0,
|
|
2516
|
-
onClick:
|
|
2633
|
+
onClick: re,
|
|
2517
2634
|
type: "button"
|
|
2518
|
-
},
|
|
2519
|
-
|
|
2635
|
+
}, T(p.value), 1)) : M("", !0), c.value ? (x(), C("p", kn, T(c.value), 1)) : M("", !0)])], 4)], 8, En),
|
|
2636
|
+
v.value ? (x(), _(Cn, {
|
|
2520
2637
|
key: 1,
|
|
2521
|
-
onClose:
|
|
2522
|
-
url:
|
|
2638
|
+
onClose: ie,
|
|
2639
|
+
url: h.value,
|
|
2523
2640
|
name: p.value
|
|
2524
|
-
}, null, 8, ["url", "name"])) :
|
|
2641
|
+
}, null, 8, ["url", "name"])) : M("", !0)
|
|
2525
2642
|
], 64));
|
|
2526
2643
|
}
|
|
2527
|
-
}), [["__scopeId", "data-v-
|
|
2644
|
+
}), [["__scopeId", "data-v-ae6f5b6e"]]), jn = {
|
|
2528
2645
|
CHECKOUT: "CHECKOUT",
|
|
2529
2646
|
CHECK_STATUS: "CHECK_STATUS"
|
|
2530
|
-
},
|
|
2531
|
-
[
|
|
2647
|
+
}, Mn = (e, t) => ({
|
|
2648
|
+
[jn.CHECKOUT]: {
|
|
2532
2649
|
url: e + "/payment_method/checkout",
|
|
2533
2650
|
method: "POST"
|
|
2534
2651
|
},
|
|
2535
|
-
[
|
|
2652
|
+
[jn.CHECK_STATUS]: {
|
|
2536
2653
|
url: e + "/checkout/external/" + t,
|
|
2537
2654
|
method: "GET"
|
|
2538
2655
|
}
|
|
2539
|
-
}),
|
|
2656
|
+
}), Nn = class {
|
|
2540
2657
|
container = null;
|
|
2541
2658
|
log;
|
|
2542
2659
|
apiUrl = "";
|
|
2543
2660
|
redirectUrl = "";
|
|
2544
2661
|
checkStatusHandler = null;
|
|
2662
|
+
statusSettled = !1;
|
|
2545
2663
|
successCallback = null;
|
|
2664
|
+
failureCallback = null;
|
|
2546
2665
|
userOnValidate;
|
|
2547
2666
|
httpInvoker = null;
|
|
2548
2667
|
destroy = () => {};
|
|
2549
2668
|
constructor(e, t) {
|
|
2550
|
-
this.log = e, this.apiUrl = t.apiUrl, this.redirectUrl = t.redirectUrl, this.successCallback = t.onSuccess || null;
|
|
2669
|
+
this.log = e, this.apiUrl = t.apiUrl, this.redirectUrl = t.redirectUrl, this.successCallback = t.onSuccess || null, this.failureCallback = t.onFailure || null;
|
|
2551
2670
|
let n = new o(t.environment, s(t.publicKey));
|
|
2552
2671
|
this.httpInvoker = new c(t.publicKey, t.version, n);
|
|
2553
2672
|
}
|
|
@@ -2568,9 +2687,9 @@ var fn = {
|
|
|
2568
2687
|
options: a,
|
|
2569
2688
|
checkoutOptions: o
|
|
2570
2689
|
}), this.container = e;
|
|
2571
|
-
let s = !1, c, l =
|
|
2690
|
+
let s = !1, c, l = E({
|
|
2572
2691
|
el: e,
|
|
2573
|
-
component:
|
|
2692
|
+
component: An,
|
|
2574
2693
|
props: {
|
|
2575
2694
|
log: this.log,
|
|
2576
2695
|
providerType: r,
|
|
@@ -2608,7 +2727,7 @@ var fn = {
|
|
|
2608
2727
|
this.destroy = l.destroy;
|
|
2609
2728
|
}
|
|
2610
2729
|
checkout(e, t, n, r) {
|
|
2611
|
-
this.httpInvoker?.invoke(
|
|
2730
|
+
this.httpInvoker?.invoke(Mn(this.apiUrl)[jn.CHECKOUT].url, Mn(this.apiUrl)[jn.CHECKOUT].method, JSON.stringify({
|
|
2612
2731
|
providerId: e.providerId,
|
|
2613
2732
|
amount: e.amount,
|
|
2614
2733
|
currency: e.currency,
|
|
@@ -2648,7 +2767,7 @@ var fn = {
|
|
|
2648
2767
|
this.log(`[sdk][checkoutProcessor][${e}]: successCheckoutHandler`, t, n);
|
|
2649
2768
|
let r = JSON.parse(n), i = JSON.parse(window.atob(r.checkoutData));
|
|
2650
2769
|
window.postMessage({
|
|
2651
|
-
status:
|
|
2770
|
+
status: He,
|
|
2652
2771
|
component: "checkout",
|
|
2653
2772
|
providerType: e,
|
|
2654
2773
|
checkoutData: i
|
|
@@ -2664,29 +2783,43 @@ var fn = {
|
|
|
2664
2783
|
error: "Invalid payment details",
|
|
2665
2784
|
originalError: n
|
|
2666
2785
|
}, "*");
|
|
2786
|
+
let r = "Invalid payment details";
|
|
2787
|
+
try {
|
|
2788
|
+
r = JSON.parse(n)?.message || r;
|
|
2789
|
+
} catch {}
|
|
2790
|
+
window.postMessage({
|
|
2791
|
+
status: ee,
|
|
2792
|
+
...Tn(e),
|
|
2793
|
+
reason: "error",
|
|
2794
|
+
message: r
|
|
2795
|
+
}, "*");
|
|
2667
2796
|
});
|
|
2668
2797
|
}
|
|
2669
2798
|
stopCheckingStatus(e) {
|
|
2670
2799
|
this.checkStatusHandler &&= (clearInterval(this.checkStatusHandler), null), e && window.removeEventListener("message", e);
|
|
2671
2800
|
}
|
|
2672
2801
|
checkStatus(e, t, n, r) {
|
|
2673
|
-
this.checkStatusHandler || (this.checkStatusHandler = setInterval(this.checkStatus.bind(this, e, t, n, r), 5e3), this.log(`[sdk][checkoutProcessor][${n}]: Starting polling...`));
|
|
2802
|
+
this.checkStatusHandler || (this.checkStatusHandler = setInterval(this.checkStatus.bind(this, e, t, n, r), 5e3), this.statusSettled = !1, this.log(`[sdk][checkoutProcessor][${n}]: Starting polling...`));
|
|
2674
2803
|
let i = this, a = L(this, `[sdk][checkoutProcessor][${n}]: failureCheckStatusHandler`, (e, t) => {
|
|
2675
|
-
H().stopLoading(), i.log(`[sdk][checkoutProcessor][${n}]: failureCheckStatusHandler`, e, t), window.postMessage({
|
|
2804
|
+
i.statusSettled || (i.statusSettled = !0, H().stopLoading(), i.log(`[sdk][checkoutProcessor][${n}]: failureCheckStatusHandler`, e, t), window.postMessage({
|
|
2676
2805
|
status: "message",
|
|
2677
2806
|
component: "checkout",
|
|
2678
2807
|
providerType: n,
|
|
2679
2808
|
message: "Checkout has been cancelled"
|
|
2680
|
-
}, "*")
|
|
2809
|
+
}, "*"), i.failureCallback?.({
|
|
2810
|
+
error: "Checkout has been cancelled",
|
|
2811
|
+
body: t
|
|
2812
|
+
}));
|
|
2681
2813
|
}), o = L(this, `[sdk][checkoutProcessor][${n}]: successCheckStatusHandler`, (t, r) => {
|
|
2682
|
-
|
|
2814
|
+
if (i.statusSettled) return;
|
|
2815
|
+
i.statusSettled = !0, H().stopLoading(), i.log(`[sdk][checkoutProcessor][${n}]: successCheckStatusHandler`, {
|
|
2683
2816
|
transactionId: t,
|
|
2684
2817
|
token: r
|
|
2685
|
-
}),
|
|
2818
|
+
}), rt(e, "Transaction in progress. Please don't close the window or navigate away");
|
|
2686
2819
|
let a = {};
|
|
2687
2820
|
t && (a.transactionId = t), r && (a.token = r), i.successCallback?.(a);
|
|
2688
2821
|
});
|
|
2689
|
-
this.httpInvoker?.invoke(
|
|
2822
|
+
this.httpInvoker?.invoke(Mn(this.apiUrl, t)[jn.CHECK_STATUS].url, Mn(this.apiUrl, t)[jn.CHECK_STATUS].method, {}, L(this, `[sdk][checkoutProcessor][${n}]: checkStatus, success`, (e, t) => {
|
|
2690
2823
|
let n = JSON.parse(t);
|
|
2691
2824
|
if (this.log("checkoutStatus", n), !n) return this.stopCheckingStatus(r), a(e, t);
|
|
2692
2825
|
if (n.status == "SUCCESS" && n.status === "SUCCESS") return this.stopCheckingStatus(r), o(n.transactionId, n.tokenId);
|
|
@@ -2709,37 +2842,37 @@ var fn = {
|
|
|
2709
2842
|
});
|
|
2710
2843
|
}
|
|
2711
2844
|
};
|
|
2712
|
-
F([I],
|
|
2845
|
+
F([I], Nn.prototype, "cleanUp", null), F([I], Nn.prototype, "addCheckout", null), F([I], Nn.prototype, "checkout", null), F([I], Nn.prototype, "getSuccessCheckoutHandler", null), F([I], Nn.prototype, "getFailureCheckoutHandler", null), F([I], Nn.prototype, "stopCheckingStatus", null), F([I], Nn.prototype, "checkStatus", null), F([I], Nn.prototype, "getMessageHandler", null);
|
|
2713
2846
|
// src/sdk/processors/fraudProcessor.ts
|
|
2714
|
-
var
|
|
2847
|
+
var Pn = {
|
|
2715
2848
|
CHECK_FRAUD: "CHECK_FRAUD",
|
|
2716
2849
|
RESOLVE_THREE_DS: "RESOLVE_THREE_DS",
|
|
2717
2850
|
CANCEL_THREE_DS: "CANCEL_THREE_DS"
|
|
2718
|
-
},
|
|
2719
|
-
[
|
|
2851
|
+
}, Fn = (e) => ({
|
|
2852
|
+
[Pn.CHECK_FRAUD]: {
|
|
2720
2853
|
url: e + "/fraud_check",
|
|
2721
2854
|
method: "POST"
|
|
2722
2855
|
},
|
|
2723
|
-
[
|
|
2856
|
+
[Pn.RESOLVE_THREE_DS]: {
|
|
2724
2857
|
url: e + "/3ds/result",
|
|
2725
2858
|
method: "POST"
|
|
2726
2859
|
},
|
|
2727
|
-
[
|
|
2860
|
+
[Pn.CANCEL_THREE_DS]: {
|
|
2728
2861
|
url: e + "/3ds/cancel",
|
|
2729
2862
|
method: "POST"
|
|
2730
2863
|
}
|
|
2731
2864
|
});
|
|
2732
|
-
function
|
|
2865
|
+
function In(e) {
|
|
2733
2866
|
try {
|
|
2734
2867
|
return JSON.parse(e);
|
|
2735
2868
|
} catch {
|
|
2736
2869
|
return;
|
|
2737
2870
|
}
|
|
2738
2871
|
}
|
|
2739
|
-
function
|
|
2872
|
+
function Ln(e) {
|
|
2740
2873
|
return typeof e?.decision == "string" && typeof e?.transactionId == "string";
|
|
2741
2874
|
}
|
|
2742
|
-
var
|
|
2875
|
+
var Rn = class {
|
|
2743
2876
|
providerId = "";
|
|
2744
2877
|
stopPaymentOnFailure = !1;
|
|
2745
2878
|
log;
|
|
@@ -2774,10 +2907,10 @@ var Mn = class {
|
|
|
2774
2907
|
address: this.address,
|
|
2775
2908
|
order: this.order,
|
|
2776
2909
|
metadata: this.metadata
|
|
2777
|
-
}), this.httpInvoker?.invoke(
|
|
2910
|
+
}), this.httpInvoker?.invoke(Fn(this.apiUrl)[Pn.CHECK_FRAUD].url, Fn(this.apiUrl)[Pn.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, this.walletInformation), L(this, "[fraudCheck], success", (n, r) => {
|
|
2778
2911
|
this.log("[fraudCheck], success", n, r, this.stopPaymentOnFailure);
|
|
2779
|
-
let i =
|
|
2780
|
-
if (!
|
|
2912
|
+
let i = In(r);
|
|
2913
|
+
if (!Ln(i)) return t({
|
|
2781
2914
|
error: "Fraud Check Failed",
|
|
2782
2915
|
body: r
|
|
2783
2916
|
});
|
|
@@ -2790,9 +2923,9 @@ var Mn = class {
|
|
|
2790
2923
|
}));
|
|
2791
2924
|
}
|
|
2792
2925
|
resolveThreeDsResult(e, t, n) {
|
|
2793
|
-
this.httpInvoker?.invoke(
|
|
2926
|
+
this.httpInvoker?.invoke(Fn(this.apiUrl)[Pn.RESOLVE_THREE_DS].url, Fn(this.apiUrl)[Pn.RESOLVE_THREE_DS].method, JSON.stringify({ threeDSServerTransID: e }), L(this, "[resolveThreeDsResult], success", (e, r) => {
|
|
2794
2927
|
this.log("[resolveThreeDsResult], success", e, r);
|
|
2795
|
-
let i =
|
|
2928
|
+
let i = In(r);
|
|
2796
2929
|
if (i == null) return n({
|
|
2797
2930
|
error: "3DS result resolution failed",
|
|
2798
2931
|
body: r
|
|
@@ -2806,7 +2939,7 @@ var Mn = class {
|
|
|
2806
2939
|
}));
|
|
2807
2940
|
}
|
|
2808
2941
|
cancelThreeDsOrder(e, t, n) {
|
|
2809
|
-
this.httpInvoker?.invoke(
|
|
2942
|
+
this.httpInvoker?.invoke(Fn(this.apiUrl)[Pn.CANCEL_THREE_DS].url, Fn(this.apiUrl)[Pn.CANCEL_THREE_DS].method, JSON.stringify({ threeDSServerTransID: e }), L(this, "[cancelThreeDsOrder], success", (e, n) => {
|
|
2810
2943
|
this.log("[cancelThreeDsOrder], success", e, n), t({});
|
|
2811
2944
|
}), L(this, "[cancelThreeDsOrder], failure", (e, t) => {
|
|
2812
2945
|
this.log("[cancelThreeDsOrder], failure", e, t), n({
|
|
@@ -2846,67 +2979,82 @@ var Mn = class {
|
|
|
2846
2979
|
return this.providerId;
|
|
2847
2980
|
}
|
|
2848
2981
|
};
|
|
2849
|
-
F([I],
|
|
2982
|
+
F([I], Rn.prototype, "fraudCheck", null), F([I], Rn.prototype, "resolveThreeDsResult", null), F([I], Rn.prototype, "cancelThreeDsOrder", null);
|
|
2850
2983
|
// src/sdk/fraud/fraudGate.ts
|
|
2851
|
-
var
|
|
2852
|
-
function
|
|
2984
|
+
var zn = 18e4, Bn = 3e4, Vn = "Payment couldn't be processed";
|
|
2985
|
+
function Hn(e) {
|
|
2853
2986
|
return new Promise((t, n) => {
|
|
2854
2987
|
e.fraudCheck((e) => t(e), (e) => n(Error(e?.error || "Fraud check failed")));
|
|
2855
2988
|
});
|
|
2856
2989
|
}
|
|
2857
|
-
async function
|
|
2990
|
+
async function Un(e, t, n, r = {}) {
|
|
2858
2991
|
if (!e) return {};
|
|
2859
2992
|
let i;
|
|
2860
2993
|
try {
|
|
2861
|
-
i = await
|
|
2994
|
+
i = await Hn(e);
|
|
2862
2995
|
} catch (e) {
|
|
2863
2996
|
return r.log?.("fraud check failed", e), { error: e.message };
|
|
2864
2997
|
}
|
|
2865
|
-
if (
|
|
2998
|
+
if (It(i)) return { error: Vn };
|
|
2866
2999
|
if (!i.managedOrderToken) return { fraudCheckResult: i };
|
|
2867
|
-
let a = await
|
|
2868
|
-
return a ? {
|
|
3000
|
+
let a = await Wn(e, t, i, n, r);
|
|
3001
|
+
return a ? {
|
|
3002
|
+
error: oe,
|
|
3003
|
+
reason: a
|
|
3004
|
+
} : {
|
|
2869
3005
|
fraudCheckResult: i,
|
|
2870
3006
|
threeDSServerTransID: i.threeDSServerTransID
|
|
2871
3007
|
};
|
|
2872
3008
|
}
|
|
2873
|
-
async function
|
|
3009
|
+
async function Wn(e, t, n, r, i = {}) {
|
|
3010
|
+
i.onProgress?.({ step: "started" });
|
|
3011
|
+
let a = await Gn(e, t, n, r, i);
|
|
3012
|
+
return i.onProgress?.(a ? {
|
|
3013
|
+
step: "completed",
|
|
3014
|
+
success: !1,
|
|
3015
|
+
error: a
|
|
3016
|
+
} : {
|
|
3017
|
+
step: "completed",
|
|
3018
|
+
success: !0
|
|
3019
|
+
}), a;
|
|
3020
|
+
}
|
|
3021
|
+
async function Gn(e, t, n, r, i) {
|
|
2874
3022
|
let { managedOrderToken: a, threeDSServerTransID: o } = n;
|
|
2875
3023
|
if (!a) return "3DS challenge could not be started";
|
|
2876
3024
|
try {
|
|
2877
|
-
await
|
|
3025
|
+
await Kn(t, a, r, i);
|
|
2878
3026
|
} catch (e) {
|
|
2879
3027
|
return i.log?.("manageOrder challenge failed", e), "Unable to complete 3DS challenge";
|
|
2880
3028
|
}
|
|
2881
3029
|
let s;
|
|
2882
3030
|
try {
|
|
2883
|
-
s = await
|
|
3031
|
+
s = await qn(e, o);
|
|
2884
3032
|
} catch (e) {
|
|
2885
3033
|
return i.log?.("3ds/result resolution failed", e), "Unable to resolve 3DS result";
|
|
2886
3034
|
}
|
|
2887
|
-
return s?.status === "success" ? null : (i.log?.("3ds/result not successful", s), await
|
|
3035
|
+
return s?.status === "success" ? null : (i.log?.("3ds/result not successful", s), await Jn(e, o, i), "3DS authentication failed");
|
|
2888
3036
|
}
|
|
2889
|
-
function
|
|
3037
|
+
function Kn(e, t, n, r) {
|
|
2890
3038
|
return new Promise((i, a) => {
|
|
2891
3039
|
if (!e) {
|
|
2892
3040
|
a(/* @__PURE__ */ Error("Forter managed-order challenge is not available"));
|
|
2893
3041
|
return;
|
|
2894
3042
|
}
|
|
2895
|
-
let o = !1, s, c = (e) => {
|
|
2896
|
-
o || (o = !0, clearTimeout(
|
|
2897
|
-
},
|
|
2898
|
-
|
|
2899
|
-
|
|
3043
|
+
let o = !1, s = !1, c, l = (e) => {
|
|
3044
|
+
o || (o = !0, clearTimeout(u), d(), c?.(), s && r.onHide?.(), e());
|
|
3045
|
+
}, u = setTimeout(() => l(() => a(/* @__PURE__ */ Error("3DS challenge timed out"))), zn), d = it(n, () => {
|
|
3046
|
+
o || (s = !0, r.onShow?.(), r.onProgress?.({ step: "challenge" }));
|
|
3047
|
+
}), f = (e) => l(() => a(e instanceof Error ? e : Error(String(e))));
|
|
2900
3048
|
try {
|
|
2901
|
-
|
|
2902
|
-
e ?
|
|
3049
|
+
c = e(t, n, (e) => {
|
|
3050
|
+
e ? f(e) : l(i);
|
|
2903
3051
|
});
|
|
2904
3052
|
} catch (e) {
|
|
2905
|
-
|
|
3053
|
+
f(e);
|
|
2906
3054
|
}
|
|
2907
3055
|
});
|
|
2908
3056
|
}
|
|
2909
|
-
function
|
|
3057
|
+
function qn(e, t) {
|
|
2910
3058
|
return new Promise((n, r) => {
|
|
2911
3059
|
if (!t) {
|
|
2912
3060
|
r(/* @__PURE__ */ Error("threeDSServerTransID is missing"));
|
|
@@ -2914,11 +3062,11 @@ function Bn(e, t) {
|
|
|
2914
3062
|
}
|
|
2915
3063
|
let i = !1, a = (e) => {
|
|
2916
3064
|
i || (i = !0, clearTimeout(o), e());
|
|
2917
|
-
}, o = setTimeout(() => a(() => r(/* @__PURE__ */ Error("3DS result timed out"))),
|
|
3065
|
+
}, o = setTimeout(() => a(() => r(/* @__PURE__ */ Error("3DS result timed out"))), Bn);
|
|
2918
3066
|
e.resolveThreeDsResult(t, (e) => a(() => n(e)), (e) => a(() => r(Error(e?.error || "3DS result resolution failed"))));
|
|
2919
3067
|
});
|
|
2920
3068
|
}
|
|
2921
|
-
function
|
|
3069
|
+
function Jn(e, t, n) {
|
|
2922
3070
|
return new Promise((r) => {
|
|
2923
3071
|
t ? e.cancelThreeDsOrder(t, () => r(), (e) => {
|
|
2924
3072
|
n.log?.("cancel notification failed", e), r();
|
|
@@ -2926,10 +3074,10 @@ function Vn(e, t, n) {
|
|
|
2926
3074
|
});
|
|
2927
3075
|
}
|
|
2928
3076
|
// src/sdk/utils/errorDetails.ts
|
|
2929
|
-
function
|
|
3077
|
+
function Yn(e) {
|
|
2930
3078
|
return e == null || typeof e == "string" ? e : void 0;
|
|
2931
3079
|
}
|
|
2932
|
-
function
|
|
3080
|
+
function Xn(e) {
|
|
2933
3081
|
if (!e) return;
|
|
2934
3082
|
let t;
|
|
2935
3083
|
try {
|
|
@@ -2940,24 +3088,24 @@ function Un(e) {
|
|
|
2940
3088
|
if (typeof t == "object" && t && !Array.isArray(t) && typeof t.code == "number" && typeof t.isRetryable == "boolean") return {
|
|
2941
3089
|
code: t.code,
|
|
2942
3090
|
isRetryable: t.isRetryable,
|
|
2943
|
-
message:
|
|
2944
|
-
gatewayCode:
|
|
2945
|
-
gatewayMessage:
|
|
2946
|
-
type:
|
|
3091
|
+
message: Yn(t.message),
|
|
3092
|
+
gatewayCode: Yn(t.gatewayCode),
|
|
3093
|
+
gatewayMessage: Yn(t.gatewayMessage),
|
|
3094
|
+
type: Yn(t.type)
|
|
2947
3095
|
};
|
|
2948
3096
|
}
|
|
2949
3097
|
// src/sdk/utils/googlePayButton.ts
|
|
2950
|
-
function
|
|
3098
|
+
function Zn(e, t) {
|
|
2951
3099
|
let n = { onClick: e };
|
|
2952
3100
|
if (!t) return n;
|
|
2953
3101
|
for (let [e, r] of Object.entries(t)) r !== void 0 && (n[e] = r);
|
|
2954
3102
|
return n;
|
|
2955
3103
|
}
|
|
2956
3104
|
// src/sdk/components/GooglePayForm.vue?vue&type=script&setup=true&lang.ts
|
|
2957
|
-
var
|
|
3105
|
+
var Qn = { style: { position: "relative" } }, $n = {
|
|
2958
3106
|
key: 0,
|
|
2959
3107
|
class: "error text-normal"
|
|
2960
|
-
},
|
|
3108
|
+
}, er = "payfurl-googlepay-script", tr = /* @__PURE__ */ D({
|
|
2961
3109
|
__name: "GooglePayForm",
|
|
2962
3110
|
props: {
|
|
2963
3111
|
log: { type: Function },
|
|
@@ -2975,22 +3123,24 @@ var Gn = { style: { position: "relative" } }, Kn = {
|
|
|
2975
3123
|
"error"
|
|
2976
3124
|
],
|
|
2977
3125
|
setup(e, { emit: n }) {
|
|
2978
|
-
let r = e, i = n, a =
|
|
3126
|
+
let r = e, i = n, a = g(null), o = g(r.amount), s = g(r.currency), c = g(!0), l = g(""), u = !1, { isLoading: d } = H();
|
|
2979
3127
|
function f() {
|
|
2980
3128
|
if (u) return;
|
|
2981
|
-
if (u = !0, document.getElementById(
|
|
2982
|
-
|
|
3129
|
+
if (u = !0, document.getElementById(er)) {
|
|
3130
|
+
ie();
|
|
2983
3131
|
return;
|
|
2984
3132
|
}
|
|
2985
3133
|
window.google = null;
|
|
2986
3134
|
let e = document.createElement("script");
|
|
2987
|
-
e.src = "https://pay.google.com/gp/p/js/pay.js", e.type = "text/javascript", e.id =
|
|
3135
|
+
e.src = "https://pay.google.com/gp/p/js/pay.js", e.type = "text/javascript", e.id = er, e.onload = ie, e.onerror = () => {
|
|
3136
|
+
e.remove(), b("error", "Google Pay script failed to load");
|
|
3137
|
+
}, document.body.appendChild(e);
|
|
2988
3138
|
}
|
|
2989
3139
|
let p = null;
|
|
2990
|
-
function
|
|
3140
|
+
function h() {
|
|
2991
3141
|
return p === null && (p = new window.google.payments.api.PaymentsClient({ environment: r.environment == t.PRODUCTION ? "PRODUCTION" : "TEST" })), p;
|
|
2992
3142
|
}
|
|
2993
|
-
let
|
|
3143
|
+
let _ = {
|
|
2994
3144
|
type: "CARD",
|
|
2995
3145
|
parameters: {
|
|
2996
3146
|
allowedAuthMethods: ["PAN_ONLY", "CRYPTOGRAM_3DS"],
|
|
@@ -3004,26 +3154,26 @@ var Gn = { style: { position: "relative" } }, Kn = {
|
|
|
3004
3154
|
]
|
|
3005
3155
|
}
|
|
3006
3156
|
};
|
|
3007
|
-
function
|
|
3157
|
+
function v() {
|
|
3008
3158
|
return {
|
|
3009
3159
|
apiVersion: 2,
|
|
3010
3160
|
apiVersionMinor: 0,
|
|
3011
|
-
allowedPaymentMethods: [
|
|
3161
|
+
allowedPaymentMethods: [_]
|
|
3012
3162
|
};
|
|
3013
3163
|
}
|
|
3014
|
-
function
|
|
3015
|
-
let e =
|
|
3164
|
+
function y() {
|
|
3165
|
+
let e = h().createButton(Zn(ne, r.options.buttonOptions));
|
|
3016
3166
|
r.el.appendChild(e);
|
|
3017
3167
|
}
|
|
3018
|
-
function
|
|
3168
|
+
function te() {
|
|
3019
3169
|
return r.environment == t.PRODUCTION ? {
|
|
3020
3170
|
merchantName: r.options.googlePayMerchantName ?? "Example Merchant",
|
|
3021
3171
|
merchantId: r.options.googlePayMerchantId
|
|
3022
3172
|
} : { merchantName: r.options.googlePayMerchantName ?? "Example Merchant" };
|
|
3023
3173
|
}
|
|
3024
|
-
function
|
|
3174
|
+
function ne() {
|
|
3025
3175
|
if (r.log("[onGooglePaymentButtonClicked]"), r.clickGate()?.() === !1) return;
|
|
3026
|
-
let e =
|
|
3176
|
+
let e = re(), t = h();
|
|
3027
3177
|
r.log("[paymentData], request", e), t.loadPaymentData(e).then(function(e) {
|
|
3028
3178
|
r.log("[paymentData], success", e);
|
|
3029
3179
|
let t = JSON.parse(e.paymentMethodData.tokenizationData.token);
|
|
@@ -3035,16 +3185,16 @@ var Gn = { style: { position: "relative" } }, Kn = {
|
|
|
3035
3185
|
r.log("[paymentData], error", e), e?.statusCode !== "CANCELED" && i("error", e?.statusMessage || e?.message || "Google Pay failed");
|
|
3036
3186
|
});
|
|
3037
3187
|
}
|
|
3038
|
-
function
|
|
3188
|
+
function re() {
|
|
3039
3189
|
let e = r.options.billingDetailsRequired === !0;
|
|
3040
3190
|
return {
|
|
3041
3191
|
apiVersion: 2,
|
|
3042
3192
|
apiVersionMinor: 0,
|
|
3043
3193
|
...e ? { emailRequired: !0 } : {},
|
|
3044
3194
|
allowedPaymentMethods: [{
|
|
3045
|
-
...
|
|
3195
|
+
..._,
|
|
3046
3196
|
parameters: {
|
|
3047
|
-
...
|
|
3197
|
+
..._.parameters,
|
|
3048
3198
|
...e ? {
|
|
3049
3199
|
billingAddressRequired: !0,
|
|
3050
3200
|
billingAddressParameters: { format: "FULL" }
|
|
@@ -3064,33 +3214,44 @@ var Gn = { style: { position: "relative" } }, Kn = {
|
|
|
3064
3214
|
currencyCode: s.value,
|
|
3065
3215
|
totalPrice: Number(o.value).toFixed(2)
|
|
3066
3216
|
},
|
|
3067
|
-
merchantInfo:
|
|
3217
|
+
merchantInfo: te()
|
|
3068
3218
|
};
|
|
3069
3219
|
}
|
|
3070
|
-
function
|
|
3071
|
-
|
|
3072
|
-
e.result
|
|
3220
|
+
function ie() {
|
|
3221
|
+
h().isReadyToPay(v()).then(function(e) {
|
|
3222
|
+
e.result ? (y(), window.postMessage({
|
|
3223
|
+
status: Qe,
|
|
3224
|
+
paymentMethod: "googlepay"
|
|
3225
|
+
}, "*")) : b("unsupported");
|
|
3073
3226
|
}).catch(function(e) {
|
|
3074
|
-
console.error("Load GooglePay error", e);
|
|
3227
|
+
console.error("Load GooglePay error", e), b("error", e?.statusMessage || e?.message || "Google Pay availability check failed");
|
|
3075
3228
|
});
|
|
3076
3229
|
}
|
|
3077
|
-
function
|
|
3230
|
+
function b(e, t) {
|
|
3231
|
+
window.postMessage({
|
|
3232
|
+
status: ee,
|
|
3233
|
+
paymentMethod: "googlepay",
|
|
3234
|
+
reason: e,
|
|
3235
|
+
message: t
|
|
3236
|
+
}, "*");
|
|
3237
|
+
}
|
|
3238
|
+
function ae(e) {
|
|
3078
3239
|
e?.data?.status && (e.data.status === "activate" && e.data.component === "googlepay" && (r.log?.(`[GooglePay]: message "${e.data.status}" received`, e.data), c.value = !0, i("activate"), f()), e.data.status === "deactivate" && e.data.component === "googlepay" && (r.log?.(`[GooglePay]: message "${e.data.status}" received`, e.data), c.value = !1), e.data.status === "message" && e.data.component === "googlepay" && (r.log?.(`[GooglePay]: message "${e.data.status}" received`, e.data), l.value = e.data.message), e.data.status === "error" && e.data.component === "googlepay" && (r.log?.(`[GooglePay]: message "${e.data.status}" received`, e.data), l.value = e.data.error), e.data.status === "set-amount" && (r.log?.(`[GooglePay]: message "${e.data.status}" received`, e.data), o.value = Number(e.data.amount)), e.data.status === "set-currency" && (r.log?.(`[GooglePay]: message "${e.data.status}" received`, e.data), s.value = e.data.currency));
|
|
3079
3240
|
}
|
|
3080
|
-
return
|
|
3081
|
-
window.removeEventListener("message",
|
|
3082
|
-
}),
|
|
3083
|
-
window.addEventListener("message",
|
|
3084
|
-
}), (e, t) => (
|
|
3241
|
+
return Le(() => {
|
|
3242
|
+
window.removeEventListener("message", ae);
|
|
3243
|
+
}), m(() => {
|
|
3244
|
+
window.addEventListener("message", ae), mt(a.value, "payfurl-combined-container") || (c.value = !0, i("activate"), f());
|
|
3245
|
+
}), (e, t) => (x(), C(Ee, null, [S("div", Qn, [N(pe(je, null, null, 512), [[Xe, w(d)]])]), S("div", {
|
|
3085
3246
|
style: { position: "relative" },
|
|
3086
3247
|
ref_key: "root",
|
|
3087
3248
|
ref: a
|
|
3088
|
-
}, [l.value ? (
|
|
3249
|
+
}, [l.value ? (x(), C("div", $n, T(l.value), 1)) : M("", !0)], 512)], 64));
|
|
3089
3250
|
}
|
|
3090
|
-
}),
|
|
3251
|
+
}), nr = { ADD_CHARGE_WITH_GOOGLE_PAY: "ADD_CHARGE_WITH_GOOGLE_PAY" }, rr = (e) => ({ [nr.ADD_CHARGE_WITH_GOOGLE_PAY]: {
|
|
3091
3252
|
url: e + "/charge/token/google",
|
|
3092
3253
|
method: "POST"
|
|
3093
|
-
} }),
|
|
3254
|
+
} }), ir = class {
|
|
3094
3255
|
container = null;
|
|
3095
3256
|
log;
|
|
3096
3257
|
apiUrl = "";
|
|
@@ -3149,9 +3310,9 @@ var Gn = { style: { position: "relative" } }, Kn = {
|
|
|
3149
3310
|
this.validateOptions(e, n, r, i), this.setAmount(n), this.setCurrency(r);
|
|
3150
3311
|
let o = !1;
|
|
3151
3312
|
this.container = e;
|
|
3152
|
-
let s =
|
|
3313
|
+
let s = E({
|
|
3153
3314
|
el: e,
|
|
3154
|
-
component:
|
|
3315
|
+
component: tr,
|
|
3155
3316
|
props: {
|
|
3156
3317
|
log: this.log,
|
|
3157
3318
|
el: e,
|
|
@@ -3227,14 +3388,17 @@ var Gn = { style: { position: "relative" } }, Kn = {
|
|
|
3227
3388
|
this.destroy = s.destroy;
|
|
3228
3389
|
}
|
|
3229
3390
|
fraudCheckAndCharge(e, t, n, r) {
|
|
3230
|
-
let i = (t) => {
|
|
3231
|
-
P(e, t), this.failureCallback?.({
|
|
3391
|
+
let i = (t, n) => {
|
|
3392
|
+
P(e, t), this.failureCallback?.({
|
|
3393
|
+
error: t,
|
|
3394
|
+
...n && { errorDetails: { reason: n } }
|
|
3395
|
+
});
|
|
3232
3396
|
};
|
|
3233
3397
|
r?.setAmount(this.amount), r?.setCurrency(this.currency), this.customer && r?.setCustomerInfo(this.customer), this.billingAddress && r?.setAddressInfo(this.billingAddress), this.order && r?.setOrderInfo(this.order), r?.setWalletInfo({
|
|
3234
3398
|
type: "GOOGLEPAY",
|
|
3235
3399
|
lastFourDigits: n.paymentData.paymentInfo.cardDetails
|
|
3236
|
-
}),
|
|
3237
|
-
if ("error" in r) return i(r.error);
|
|
3400
|
+
}), Un(r, null, e, { log: this.log }).then((r) => {
|
|
3401
|
+
if ("error" in r) return i(r.error, r.reason);
|
|
3238
3402
|
this.addChargeWithGooglePay(e, t, {
|
|
3239
3403
|
...n,
|
|
3240
3404
|
fraudCheck: r.fraudCheckResult
|
|
@@ -3242,7 +3406,7 @@ var Gn = { style: { position: "relative" } }, Kn = {
|
|
|
3242
3406
|
}).catch(() => i("Unable to pay with Google Pay"));
|
|
3243
3407
|
}
|
|
3244
3408
|
addChargeWithGooglePay(e, t, n) {
|
|
3245
|
-
this.log("[addChargeWithGooglePay]", n), this.httpInvoker?.invoke(
|
|
3409
|
+
this.log("[addChargeWithGooglePay]", n), this.httpInvoker?.invoke(rr(this.apiUrl)[nr.ADD_CHARGE_WITH_GOOGLE_PAY].url, rr(this.apiUrl)[nr.ADD_CHARGE_WITH_GOOGLE_PAY].method, JSON.stringify(n), this.getSuccessAddChargeHandler(e).bind(this), this.getFailureAddChargeHandler(e).bind(this), { providerId: t });
|
|
3246
3410
|
}
|
|
3247
3411
|
getFailureAddChargeHandler(e) {
|
|
3248
3412
|
return L(this, "[GooglePay], failure", (t, n) => {
|
|
@@ -3260,47 +3424,47 @@ var Gn = { style: { position: "relative" } }, Kn = {
|
|
|
3260
3424
|
}
|
|
3261
3425
|
validateOptions(e, t, n, r) {
|
|
3262
3426
|
if (!R(n)) throw P(e, "Invalid currency: " + n), TypeError("invalid currency: " + n);
|
|
3263
|
-
if (!
|
|
3427
|
+
if (!k(t)) throw P(e, "Invalid amount: " + t), TypeError("invalid amount: " + t);
|
|
3264
3428
|
if (!r.gateway) throw P(e, "Invalid gateway parameter"), TypeError("Invalid gateway parameter");
|
|
3265
3429
|
if (!r.googlePayGatewayMerchantId) throw P(e, "Invalid gateway merchant id parameter"), TypeError("Invalid gateway merchant id parameter");
|
|
3266
3430
|
}
|
|
3267
3431
|
};
|
|
3268
|
-
F([I],
|
|
3432
|
+
F([I], ir.prototype, "cleanUp", null), F([I], ir.prototype, "addGooglePay", null), F([I], ir.prototype, "addChargeWithGooglePay", null), F([I], ir.prototype, "getFailureAddChargeHandler", null), F([I], ir.prototype, "getSuccessAddChargeHandler", null), F([I], ir.prototype, "validateOptions", null);
|
|
3269
3433
|
// \0rolldown_dynamic_import_helper.js
|
|
3270
|
-
var
|
|
3434
|
+
var ar = (e, t, n) => {
|
|
3271
3435
|
let r = t.lastIndexOf("?"), i = e[r === -1 || r < t.lastIndexOf("/") ? t : t.slice(0, r)];
|
|
3272
3436
|
return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((e, r) => {
|
|
3273
3437
|
(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."))));
|
|
3274
3438
|
});
|
|
3275
|
-
},
|
|
3439
|
+
}, or = ["supports3DS"], sr = [
|
|
3276
3440
|
"visa",
|
|
3277
3441
|
"masterCard",
|
|
3278
3442
|
"amex",
|
|
3279
3443
|
"discover"
|
|
3280
3444
|
];
|
|
3281
|
-
function
|
|
3445
|
+
function cr(e) {
|
|
3282
3446
|
try {
|
|
3283
3447
|
return typeof ApplePaySession < "u" && ApplePaySession.supportsVersion(e) === !0;
|
|
3284
3448
|
} catch {
|
|
3285
3449
|
return !1;
|
|
3286
3450
|
}
|
|
3287
3451
|
}
|
|
3288
|
-
function
|
|
3289
|
-
for (let e = 14; e > 3; e--) if (
|
|
3452
|
+
function lr() {
|
|
3453
|
+
for (let e = 14; e > 3; e--) if (cr(e)) return e;
|
|
3290
3454
|
return 3;
|
|
3291
3455
|
}
|
|
3292
|
-
function
|
|
3293
|
-
return e &&
|
|
3456
|
+
function ur(e) {
|
|
3457
|
+
return e && cr(e) ? e : lr();
|
|
3294
3458
|
}
|
|
3295
|
-
function
|
|
3296
|
-
return e?.length ? [.../* @__PURE__ */ new Set(["supports3DS", ...e])] :
|
|
3459
|
+
function dr(e) {
|
|
3460
|
+
return e?.length ? [.../* @__PURE__ */ new Set(["supports3DS", ...e])] : or;
|
|
3297
3461
|
}
|
|
3298
|
-
function
|
|
3462
|
+
function fr(e, t, n) {
|
|
3299
3463
|
let r = {
|
|
3300
3464
|
countryCode: e.countryCode || "AU",
|
|
3301
3465
|
currencyCode: t,
|
|
3302
|
-
merchantCapabilities:
|
|
3303
|
-
supportedNetworks: e.supportedNetworks?.length ? e.supportedNetworks :
|
|
3466
|
+
merchantCapabilities: dr(e.merchantCapabilities),
|
|
3467
|
+
supportedNetworks: e.supportedNetworks?.length ? e.supportedNetworks : sr,
|
|
3304
3468
|
total: {
|
|
3305
3469
|
label: e.lineItemLabel || "",
|
|
3306
3470
|
type: "final",
|
|
@@ -3310,25 +3474,28 @@ function ar(e, t, n) {
|
|
|
3310
3474
|
return e.supportedCountries?.length && (r.supportedCountries = e.supportedCountries), r;
|
|
3311
3475
|
}
|
|
3312
3476
|
// src/sdk/utils/applePaySdkLoader.ts
|
|
3313
|
-
var
|
|
3314
|
-
function
|
|
3477
|
+
var pr = "payfurl-applepay-script", mr = "https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js", hr = 1e4, gr = null;
|
|
3478
|
+
function _r() {
|
|
3315
3479
|
return !!window.ApplePaySession && !!window.customElements?.get("apple-pay-button");
|
|
3316
3480
|
}
|
|
3317
|
-
function
|
|
3318
|
-
return typeof window > "u" || typeof document > "u" ||
|
|
3319
|
-
let t =
|
|
3320
|
-
|
|
3321
|
-
let n = setTimeout(() => e(), cr), r = () => {
|
|
3322
|
-
clearTimeout(n), e();
|
|
3481
|
+
function vr() {
|
|
3482
|
+
return typeof window > "u" || typeof document > "u" || _r() ? Promise.resolve() : gr || (gr = new Promise((e) => {
|
|
3483
|
+
let t = setTimeout(() => e(), hr), n = () => {
|
|
3484
|
+
clearTimeout(t), e();
|
|
3323
3485
|
};
|
|
3324
|
-
|
|
3325
|
-
|
|
3486
|
+
try {
|
|
3487
|
+
let e = document.createElement("script");
|
|
3488
|
+
e.id = pr, e.src = mr, e.type = "text/javascript", e.crossOrigin = "anonymous", e.addEventListener("load", n, { once: !0 }), e.addEventListener("error", n, { once: !0 }), document.head.appendChild(e);
|
|
3489
|
+
} catch {
|
|
3490
|
+
n();
|
|
3491
|
+
}
|
|
3492
|
+
}), gr);
|
|
3326
3493
|
}
|
|
3327
3494
|
// src/sdk/components/ApplePayForm.vue?vue&type=script&setup=true&lang.ts
|
|
3328
|
-
var
|
|
3495
|
+
var yr = { style: { position: "relative" } }, br = {
|
|
3329
3496
|
key: 0,
|
|
3330
3497
|
class: "error text-normal"
|
|
3331
|
-
},
|
|
3498
|
+
}, xr = /* @__PURE__ */ D({
|
|
3332
3499
|
__name: "ApplePayForm",
|
|
3333
3500
|
props: {
|
|
3334
3501
|
log: { type: Function },
|
|
@@ -3348,10 +3515,10 @@ var fr = { style: { position: "relative" } }, pr = {
|
|
|
3348
3515
|
"cancel"
|
|
3349
3516
|
],
|
|
3350
3517
|
setup(e, { emit: t }) {
|
|
3351
|
-
let n = e, r = t, i =
|
|
3518
|
+
let n = e, r = t, i = g(null), a = g(n.amount), o = g(n.currency), s = g(!0), c = g(""), l = !1, { isLoading: u } = H();
|
|
3352
3519
|
function d() {
|
|
3353
3520
|
if (n.log("[onApplePayButtonClicked]"), !ApplePaySession || n.clickGate()?.() === !1) return;
|
|
3354
|
-
let e =
|
|
3521
|
+
let e = fr(n.options, o.value, a.value), t = ur(n.options.applePayVersion);
|
|
3355
3522
|
n.log("[onApplePayButtonClicked], Create ApplePaySession", e, t);
|
|
3356
3523
|
let i = new ApplePaySession(t, e);
|
|
3357
3524
|
i.onvalidatemerchant = (e) => {
|
|
@@ -3367,37 +3534,40 @@ var fr = { style: { position: "relative" } }, pr = {
|
|
|
3367
3534
|
}, i.begin();
|
|
3368
3535
|
}
|
|
3369
3536
|
function f() {
|
|
3370
|
-
l || (l = !0, window.google = null,
|
|
3537
|
+
l || (l = !0, window.google = null, vr().then(() => {
|
|
3371
3538
|
let e = document.createElement("apple-pay-button");
|
|
3372
|
-
e.buttonstyle = "black", e.locale = "en-US", e.type = "buy", e.onclick = d, i.value?.appendChild(e), window.postMessage({
|
|
3539
|
+
e.buttonstyle = "black", e.locale = "en-US", e.type = "buy", e.onclick = d, i.value?.appendChild(e), window.postMessage({
|
|
3540
|
+
status: Qe,
|
|
3541
|
+
paymentMethod: "applepay"
|
|
3542
|
+
}, "*");
|
|
3373
3543
|
}));
|
|
3374
3544
|
}
|
|
3375
3545
|
function p(e) {
|
|
3376
3546
|
e?.data?.status && (e.data.status === "activate" && e.data.component === "applepay" && (n.log?.(`[ApplePay]: message "${e.data.status}" received`, e.data), s.value = !0, r("activate"), f()), e.data.status === "deactivate" && e.data.component === "applepay" && (n.log?.(`[ApplePay]: message "${e.data.status}" received`, e.data), s.value = !1), e.data.status === "message" && e.data.component === "applepay" && (n.log?.(`[ApplePay]: message "${e.data.status}" received`, e.data), c.value = e.data.message), e.data.status === "error" && e.data.component === "applepay" && (n.log?.(`[ApplePay]: message "${e.data.status}" received`, e.data), c.value = e.data.error), e.data.status === "set-amount" && (n.log?.(`[ApplePay]: message "${e.data.status}" received`, e.data), a.value = Number(e.data.amount)), e.data.status === "set-currency" && (n.log?.(`[ApplePay]: message "${e.data.status}" received`, e.data), o.value = e.data.currency));
|
|
3377
3547
|
}
|
|
3378
|
-
return
|
|
3548
|
+
return Le(() => {
|
|
3379
3549
|
window.removeEventListener("message", p);
|
|
3380
|
-
}),
|
|
3381
|
-
window.addEventListener("message", p),
|
|
3382
|
-
}), (e, t) => (
|
|
3550
|
+
}), m(() => {
|
|
3551
|
+
window.addEventListener("message", p), mt(i.value, "payfurl-combined-container") || (s.value = !0, r("activate"), f());
|
|
3552
|
+
}), (e, t) => (x(), C(Ee, null, [S("div", yr, [N(pe(je, null, null, 512), [[Xe, w(u)]])]), S("div", {
|
|
3383
3553
|
style: { position: "relative" },
|
|
3384
3554
|
ref_key: "root",
|
|
3385
3555
|
ref: i
|
|
3386
|
-
}, [c.value ? (
|
|
3556
|
+
}, [c.value ? (x(), C("div", br, T(c.value), 1)) : M("", !0)], 512)], 64));
|
|
3387
3557
|
}
|
|
3388
|
-
}),
|
|
3558
|
+
}), Sr = {
|
|
3389
3559
|
VALIDATE_MERCHANT: "VALIDATE_MERCHANT",
|
|
3390
3560
|
ADD_CHARGE_WITH_APPLE_PAY: "ADD_CHARGE_WITH_APPLE_PAY"
|
|
3391
|
-
},
|
|
3392
|
-
[
|
|
3561
|
+
}, Cr = (e) => ({
|
|
3562
|
+
[Sr.VALIDATE_MERCHANT]: {
|
|
3393
3563
|
url: e + "/charge/token/apple/validate",
|
|
3394
3564
|
method: "POST"
|
|
3395
3565
|
},
|
|
3396
|
-
[
|
|
3566
|
+
[Sr.ADD_CHARGE_WITH_APPLE_PAY]: {
|
|
3397
3567
|
url: e + "/charge/token/apple",
|
|
3398
3568
|
method: "POST"
|
|
3399
3569
|
}
|
|
3400
|
-
}),
|
|
3570
|
+
}), wr = class {
|
|
3401
3571
|
container = null;
|
|
3402
3572
|
log;
|
|
3403
3573
|
apiUrl = "";
|
|
@@ -3466,9 +3636,9 @@ var fr = { style: { position: "relative" } }, pr = {
|
|
|
3466
3636
|
currency: r,
|
|
3467
3637
|
options: i
|
|
3468
3638
|
});
|
|
3469
|
-
let s =
|
|
3639
|
+
let s = E({
|
|
3470
3640
|
el: e,
|
|
3471
|
-
component:
|
|
3641
|
+
component: xr,
|
|
3472
3642
|
props: {
|
|
3473
3643
|
log: this.log,
|
|
3474
3644
|
el: e,
|
|
@@ -3560,13 +3730,16 @@ var fr = { style: { position: "relative" } }, pr = {
|
|
|
3560
3730
|
onFailure: L(this, "[addApplePay], failure", (e) => {
|
|
3561
3731
|
this.log("[addApplePay], failure", e), this.applePayButton?.redraw(), this.failureCallback?.({ error: e.error });
|
|
3562
3732
|
})
|
|
3563
|
-
}), 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({
|
|
3733
|
+
}), 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({
|
|
3734
|
+
status: Qe,
|
|
3735
|
+
paymentMethod: "applepay"
|
|
3736
|
+
}, "*");
|
|
3564
3737
|
});
|
|
3565
|
-
|
|
3738
|
+
ar(/* #__PURE__ */ Object.assign({
|
|
3566
3739
|
"./applepay/ApplePayButton.interface.ts": () => import("./ApplePayButton.interface-BvRk9kiK.js"),
|
|
3567
3740
|
"./applepay/ApplePayButtonOptions.type.ts": () => import("./ApplePayButtonOptions.type-BvRk9kiK.js"),
|
|
3568
|
-
"./applepay/PayWayAppleButton.ts": () => import("./PayWayAppleButton-
|
|
3569
|
-
"./applepay/payway_rest.ts": () => import("./payway_rest-
|
|
3741
|
+
"./applepay/PayWayAppleButton.ts": () => import("./PayWayAppleButton-B1Ttj4J_.js"),
|
|
3742
|
+
"./applepay/payway_rest.ts": () => import("./payway_rest-4Pjb1c7k.js")
|
|
3570
3743
|
}), `./applepay/${i.providerType?.toLowerCase()}.ts`, 3).then(L(this, "[localAddApplePay], then", (e) => {
|
|
3571
3744
|
this.log(`Loading ${i.providerType}...`, e), c(e);
|
|
3572
3745
|
})).catch(() => {
|
|
@@ -3574,7 +3747,7 @@ var fr = { style: { position: "relative" } }, pr = {
|
|
|
3574
3747
|
});
|
|
3575
3748
|
}
|
|
3576
3749
|
validateMerchant(e, t, n, r) {
|
|
3577
|
-
this.log("[validateMerchant]", n), this.httpInvoker?.invoke(
|
|
3750
|
+
this.log("[validateMerchant]", n), this.httpInvoker?.invoke(Cr(this.apiUrl)[Sr.VALIDATE_MERCHANT].url, Cr(this.apiUrl)[Sr.VALIDATE_MERCHANT].method, JSON.stringify(n), L(this, "[validateMerchant], success", (e, t) => {
|
|
3578
3751
|
try {
|
|
3579
3752
|
let e = JSON.parse(t);
|
|
3580
3753
|
this.log("[validateMerchant], success", e), r.completeMerchantValidation(e);
|
|
@@ -3589,17 +3762,20 @@ var fr = { style: { position: "relative" } }, pr = {
|
|
|
3589
3762
|
}), { providerId: t });
|
|
3590
3763
|
}
|
|
3591
3764
|
fraudCheckAndCharge(e, t, n, r, i) {
|
|
3592
|
-
let a = (t) => {
|
|
3765
|
+
let a = (t, n) => {
|
|
3593
3766
|
P(e, t), r.completePayment({
|
|
3594
3767
|
status: ApplePaySession.STATUS_FAILURE,
|
|
3595
3768
|
errors: []
|
|
3596
|
-
}), this.failureCallback?.({
|
|
3769
|
+
}), this.failureCallback?.({
|
|
3770
|
+
error: t,
|
|
3771
|
+
...n && { errorDetails: { reason: n } }
|
|
3772
|
+
});
|
|
3597
3773
|
}, o = n.token.paymentMethod?.displayName?.slice(-4);
|
|
3598
3774
|
i?.setAmount(this.amount), i?.setCurrency(this.currency), this.customer && i?.setCustomerInfo(this.customer), this.billingAddress && i?.setAddressInfo(this.billingAddress), this.order && i?.setOrderInfo(this.order), i?.setWalletInfo({
|
|
3599
3775
|
type: "APPLEPAY",
|
|
3600
3776
|
lastFourDigits: /^\d{4}$/.test(o ?? "") ? o : void 0
|
|
3601
|
-
}),
|
|
3602
|
-
if ("error" in i) return a(i.error);
|
|
3777
|
+
}), Un(i, null, e, { log: this.log }).then((i) => {
|
|
3778
|
+
if ("error" in i) return a(i.error, i.reason);
|
|
3603
3779
|
this.addChargeWithApplePay(e, t, {
|
|
3604
3780
|
...n,
|
|
3605
3781
|
fraudCheck: i.fraudCheckResult
|
|
@@ -3607,7 +3783,7 @@ var fr = { style: { position: "relative" } }, pr = {
|
|
|
3607
3783
|
}).catch(() => a("Unable to pay with ApplePay"));
|
|
3608
3784
|
}
|
|
3609
3785
|
addChargeWithApplePay(e, t, n, r) {
|
|
3610
|
-
this.log("[addChargeWithApplePay]", n), this.httpInvoker?.invoke(
|
|
3786
|
+
this.log("[addChargeWithApplePay]", n), this.httpInvoker?.invoke(Cr(this.apiUrl)[Sr.ADD_CHARGE_WITH_APPLE_PAY].url, Cr(this.apiUrl)[Sr.ADD_CHARGE_WITH_APPLE_PAY].method, JSON.stringify(n), this.getSuccessAddChargeHandler(e, r).bind(this), this.getFailureAddChargeHandler(e, r).bind(this), { providerId: t });
|
|
3611
3787
|
}
|
|
3612
3788
|
getFailureAddChargeHandler(e, t) {
|
|
3613
3789
|
return L(this, "[getFailureAddChargeHandler]", (n, r) => {
|
|
@@ -3636,13 +3812,13 @@ var fr = { style: { position: "relative" } }, pr = {
|
|
|
3636
3812
|
}
|
|
3637
3813
|
validateOptions(e, t, n, r) {
|
|
3638
3814
|
if (!R(n)) throw P(e, "Invalid currency: " + n), TypeError("invalid currency: " + n);
|
|
3639
|
-
if (!
|
|
3815
|
+
if (!k(t)) throw P(e, "Invalid amount: " + t), TypeError("invalid amount: " + t);
|
|
3640
3816
|
if (!r.lineItemLabel) throw P(e, "Invalid lineItemLabel parameter"), TypeError("Invalid lineItemLabel parameter");
|
|
3641
3817
|
}
|
|
3642
3818
|
};
|
|
3643
|
-
F([I],
|
|
3819
|
+
F([I], wr.prototype, "cleanUp", null), F([I], wr.prototype, "addApplePay", null), F([I], wr.prototype, "validateMerchant", null), F([I], wr.prototype, "addChargeWithApplePay", null), F([I], wr.prototype, "getFailureAddChargeHandler", null), F([I], wr.prototype, "getSuccessAddChargeHandler", null), F([I], wr.prototype, "validateOptions", null);
|
|
3644
3820
|
// src/components/ApplePayIcon.vue
|
|
3645
|
-
var
|
|
3821
|
+
var Tr = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
3646
3822
|
__name: "ApplePayIcon",
|
|
3647
3823
|
props: {
|
|
3648
3824
|
size: {},
|
|
@@ -3650,78 +3826,78 @@ var vr = /*#__PURE__*/ E(/* @__PURE__ */ T({
|
|
|
3650
3826
|
},
|
|
3651
3827
|
setup(e) {
|
|
3652
3828
|
let t = `--size: ${e.size}px`;
|
|
3653
|
-
return (e, n) => (
|
|
3829
|
+
return (e, n) => (x(), C("svg", {
|
|
3654
3830
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3655
3831
|
viewBox: "0 0 512 210.2",
|
|
3656
3832
|
"xml:space": "preserve",
|
|
3657
3833
|
style: t
|
|
3658
|
-
}, [...n[0] ||= [
|
|
3834
|
+
}, [...n[0] ||= [S("path", {
|
|
3659
3835
|
id: "XMLID_34_",
|
|
3660
3836
|
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 "
|
|
3661
3837
|
}, null, -1)]]));
|
|
3662
3838
|
}
|
|
3663
|
-
}), [["__scopeId", "data-v-7d3fe743"]]),
|
|
3839
|
+
}), [["__scopeId", "data-v-7d3fe743"]]), X;
|
|
3664
3840
|
(function(e) {
|
|
3665
3841
|
e.mastercard = "mastercard", e.maestro = "maestro", e.visa = "visa", e.amex = "amex", e.discover = "discover";
|
|
3666
|
-
})(
|
|
3667
|
-
var
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
],
|
|
3842
|
+
})(X ||= {});
|
|
3843
|
+
var Er = [
|
|
3844
|
+
X.mastercard,
|
|
3845
|
+
X.maestro,
|
|
3846
|
+
X.visa,
|
|
3847
|
+
X.amex,
|
|
3848
|
+
X.discover
|
|
3849
|
+
], Dr;
|
|
3674
3850
|
(function(e) {
|
|
3675
3851
|
e.NONE = "NONE", e.FULL = "FULL", e.POSTAL_COUNTRY = "POSTAL_COUNTRY";
|
|
3676
|
-
})(
|
|
3852
|
+
})(Dr ||= {});
|
|
3677
3853
|
// src/assets/click2pay/mastercard.svg
|
|
3678
|
-
var xr = "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", Sr = "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", Cr = "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", wr = "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", Tr = { class: "click2pay-logo" }, Er = {
|
|
3854
|
+
var Or = "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", kr = "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", Ar = "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", jr = "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", Mr = { class: "click2pay-logo" }, Nr = {
|
|
3679
3855
|
key: 0,
|
|
3680
|
-
src:
|
|
3856
|
+
src: Or,
|
|
3681
3857
|
alt: "MasterCard"
|
|
3682
|
-
},
|
|
3858
|
+
}, Pr = {
|
|
3683
3859
|
key: 1,
|
|
3684
|
-
src:
|
|
3860
|
+
src: kr,
|
|
3685
3861
|
alt: "Visa"
|
|
3686
|
-
},
|
|
3862
|
+
}, Fr = {
|
|
3687
3863
|
key: 2,
|
|
3688
|
-
src:
|
|
3864
|
+
src: Ar,
|
|
3689
3865
|
alt: "American Express"
|
|
3690
|
-
},
|
|
3866
|
+
}, Ir = {
|
|
3691
3867
|
key: 3,
|
|
3692
|
-
src:
|
|
3868
|
+
src: jr,
|
|
3693
3869
|
alt: "Discover"
|
|
3694
|
-
},
|
|
3870
|
+
}, Lr = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
3695
3871
|
__name: "ClickToPayLogo",
|
|
3696
3872
|
props: { options: {} },
|
|
3697
3873
|
setup(e) {
|
|
3698
|
-
let t = e, n =
|
|
3699
|
-
return
|
|
3874
|
+
let t = e, n = g(t.options.cardBrands || Er);
|
|
3875
|
+
return le(() => t, () => {
|
|
3700
3876
|
n.value = t.options.cardBrands || [];
|
|
3701
3877
|
}, {
|
|
3702
3878
|
flush: "post",
|
|
3703
3879
|
deep: !0
|
|
3704
|
-
}), (e, t) => (
|
|
3705
|
-
t[0] ||=
|
|
3880
|
+
}), (e, t) => (x(), C("div", Mr, [
|
|
3881
|
+
t[0] ||= S("img", {
|
|
3706
3882
|
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",
|
|
3707
3883
|
alt: "Click To Pay"
|
|
3708
3884
|
}, null, -1),
|
|
3709
|
-
n.value.includes(
|
|
3710
|
-
n.value.includes(
|
|
3711
|
-
n.value.includes(
|
|
3712
|
-
n.value.includes(
|
|
3885
|
+
n.value.includes(w(X).mastercard) ? (x(), C("img", Nr)) : M("", !0),
|
|
3886
|
+
n.value.includes(w(X).visa) ? (x(), C("img", Pr)) : M("", !0),
|
|
3887
|
+
n.value.includes(w(X).amex) ? (x(), C("img", Fr)) : M("", !0),
|
|
3888
|
+
n.value.includes(w(X).discover) ? (x(), C("img", Ir)) : M("", !0)
|
|
3713
3889
|
]));
|
|
3714
3890
|
}
|
|
3715
|
-
}), [["__scopeId", "data-v-c2abe5c3"]]),
|
|
3891
|
+
}), [["__scopeId", "data-v-c2abe5c3"]]), Rr = { style: {
|
|
3716
3892
|
display: "flex",
|
|
3717
3893
|
gap: "20px"
|
|
3718
|
-
} },
|
|
3894
|
+
} }, zr = { class: "payfurl-form" }, Br = { class: "container-form" }, Vr = { class: "row" }, Hr = { style: { width: "100%" } }, Ur = {
|
|
3719
3895
|
key: 0,
|
|
3720
3896
|
class: "error"
|
|
3721
|
-
},
|
|
3897
|
+
}, Wr = { class: "row" }, Gr = { style: { width: "100%" } }, Kr = {
|
|
3722
3898
|
key: 0,
|
|
3723
3899
|
class: "error"
|
|
3724
|
-
},
|
|
3900
|
+
}, qr = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
3725
3901
|
__name: "LoginForm",
|
|
3726
3902
|
props: {
|
|
3727
3903
|
log: { type: Function },
|
|
@@ -3733,9 +3909,9 @@ var xr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csv
|
|
|
3733
3909
|
"logout"
|
|
3734
3910
|
],
|
|
3735
3911
|
setup(e, { emit: t }) {
|
|
3736
|
-
let n = e, r = t, i =
|
|
3912
|
+
let n = e, r = t, i = g(""), a = g(""), o = g({});
|
|
3737
3913
|
function s() {
|
|
3738
|
-
return o.value = {}, !a.value && !
|
|
3914
|
+
return o.value = {}, !a.value && !Ue(i.value) && (o.value.email = "Please type valid email address"), a.value && !Re(a.value) && (o.value.phone = "Please type phone in international format"), Object.keys(o.value).length === 0;
|
|
3739
3915
|
}
|
|
3740
3916
|
function c() {
|
|
3741
3917
|
s() && r("submit", {
|
|
@@ -3749,29 +3925,29 @@ var xr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csv
|
|
|
3749
3925
|
function u() {
|
|
3750
3926
|
r("logout");
|
|
3751
3927
|
}
|
|
3752
|
-
return (e, t) => (
|
|
3928
|
+
return (e, t) => (x(), _(xn, {
|
|
3753
3929
|
width: "350",
|
|
3754
3930
|
onClose: l
|
|
3755
3931
|
}, {
|
|
3756
|
-
title:
|
|
3757
|
-
body:
|
|
3932
|
+
title: ge(() => [S("div", Rr, [pe(Lr, { options: n.options }, null, 8, ["options"]), t[2] ||= v(" Click To Pay Login ", -1)])]),
|
|
3933
|
+
body: ge(() => [S("div", zr, [S("div", Br, [S("div", Vr, [t[3] ||= S("label", null, "Email Address", -1), S("div", Hr, [N(S("input", {
|
|
3758
3934
|
type: "text",
|
|
3759
3935
|
maxlength: "100",
|
|
3760
3936
|
placeholder: "Email Address",
|
|
3761
3937
|
name: "email",
|
|
3762
3938
|
"onUpdate:modelValue": t[0] ||= (e) => i.value = e
|
|
3763
|
-
}, null, 512), [[
|
|
3939
|
+
}, null, 512), [[Se, i.value]]), o.value.email ? (x(), C("p", Ur, T(o.value.email), 1)) : M("", !0)])]), S("div", Wr, [t[4] ||= S("label", null, "Phone", -1), S("div", Gr, [N(S("input", {
|
|
3764
3940
|
type: "text",
|
|
3765
3941
|
maxlength: "100",
|
|
3766
3942
|
placeholder: "Phone",
|
|
3767
3943
|
name: "phone",
|
|
3768
3944
|
"onUpdate:modelValue": t[1] ||= (e) => a.value = e
|
|
3769
|
-
}, null, 512), [[
|
|
3770
|
-
footer:
|
|
3945
|
+
}, null, 512), [[Se, a.value]]), o.value.phone ? (x(), C("p", Kr, T(o.value.phone), 1)) : M("", !0)])])])])]),
|
|
3946
|
+
footer: ge(() => [S("div", { class: "payfurl-form payfurl-form-footer" }, [S("button", { onClick: u }, "Continue as Guest"), S("button", { onClick: c }, "Login")])]),
|
|
3771
3947
|
_: 1
|
|
3772
3948
|
}));
|
|
3773
3949
|
}
|
|
3774
|
-
}), [["__scopeId", "data-v-693ba623"]]),
|
|
3950
|
+
}), [["__scopeId", "data-v-693ba623"]]), Jr = [
|
|
3775
3951
|
"4761739001010010",
|
|
3776
3952
|
"4005520000000129",
|
|
3777
3953
|
"5413330089010640",
|
|
@@ -3780,9 +3956,9 @@ var xr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csv
|
|
|
3780
3956
|
"4035874000424977",
|
|
3781
3957
|
"5413330089010640"
|
|
3782
3958
|
];
|
|
3783
|
-
function
|
|
3784
|
-
if (n === t.PRODUCTION || !
|
|
3785
|
-
switch (
|
|
3959
|
+
function Yr(e, n) {
|
|
3960
|
+
if (n === t.PRODUCTION || !Jr.includes(e)) return null;
|
|
3961
|
+
switch (Ae(e)) {
|
|
3786
3962
|
case "visa": return {
|
|
3787
3963
|
cardNumber: "4622943123103732",
|
|
3788
3964
|
expiryDate: "12/25",
|
|
@@ -3801,7 +3977,7 @@ function Hr(e, n) {
|
|
|
3801
3977
|
}
|
|
3802
3978
|
}
|
|
3803
3979
|
// src/sdk/processors/clickToPayProcessor.ts
|
|
3804
|
-
var
|
|
3980
|
+
var Xr = 1e3, Zr = (e) => `${(e?.email || "").trim().toLowerCase()}|${e?.phoneNumber || ""}`, Qr = "Click to Pay is unavailable. Please proceed with an alternative payment method", $r = {
|
|
3805
3981
|
SANDBOX: {
|
|
3806
3982
|
uiKit: "https://src.mastercard.com/srci/integration/components/src-ui-kit/src-ui-kit.esm.js",
|
|
3807
3983
|
uiKitCss: "https://src.mastercard.com/srci/integration/components/src-ui-kit/src-ui-kit.css",
|
|
@@ -3814,7 +3990,7 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
3814
3990
|
sdk: "https://src.mastercard.com/sdk/srcsdk.mastercard.js",
|
|
3815
3991
|
lib: "https://src.mastercard.com/srci/integration/2/lib.js?srcDpaId={dpaId}&locale=en_AU"
|
|
3816
3992
|
}
|
|
3817
|
-
},
|
|
3993
|
+
}, Z = class extends W {
|
|
3818
3994
|
enabled = !0;
|
|
3819
3995
|
initialized = !1;
|
|
3820
3996
|
loaded = !1;
|
|
@@ -3841,9 +4017,14 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
3841
4017
|
attempts = 0;
|
|
3842
4018
|
startIsRunning = !1;
|
|
3843
4019
|
readyCallbacks = [];
|
|
4020
|
+
started = !1;
|
|
4021
|
+
run = 0;
|
|
4022
|
+
lookedUp = /* @__PURE__ */ new Set();
|
|
4023
|
+
restartTimer = null;
|
|
4024
|
+
visibilityObserver = null;
|
|
3844
4025
|
constructor(e, n) {
|
|
3845
4026
|
super(e), this.options = n.options || {}, this.container = n.container || document.body, this.environment = n.environment || t.DEVELOPMENT;
|
|
3846
|
-
let r =
|
|
4027
|
+
let r = Gt(this.environment);
|
|
3847
4028
|
this.options.networkTokenOptions = {
|
|
3848
4029
|
...r,
|
|
3849
4030
|
...this.options.networkTokenOptions || {}
|
|
@@ -3868,12 +4049,18 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
3868
4049
|
this.log("[ClickToPayProcessor][setOptions]", e), this.options = e, this.options?.tokenAuthenticationEnabled ? this.enableTokenAuthentication() : this.disableTokenAuthentication();
|
|
3869
4050
|
}
|
|
3870
4051
|
setCustomerInfo(e, t) {
|
|
3871
|
-
this.log("[ClickToPayProcessor][setCustomerInfo]", e)
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
this.cleanUp(this.container), this.start();
|
|
3876
|
-
}
|
|
4052
|
+
this.log("[ClickToPayProcessor][setCustomerInfo]", e), this.customer = {
|
|
4053
|
+
...e,
|
|
4054
|
+
email: e?.email || this.customer?.email || ""
|
|
4055
|
+
}, !t && this.initialized && this.started && (this.cancelRestart(), (this.customer.email || this.customer.phoneNumber) && (this.lookedUp.has(Zr(this.customer)) || (this.restartTimer = window.setTimeout(() => {
|
|
4056
|
+
this.restartTimer = null, this.cleanUp(this.container), this.start();
|
|
4057
|
+
}, Xr))));
|
|
4058
|
+
}
|
|
4059
|
+
cancelRestart() {
|
|
4060
|
+
this.restartTimer !== null && (window.clearTimeout(this.restartTimer), this.restartTimer = null);
|
|
4061
|
+
}
|
|
4062
|
+
stopWaitingForVisibility() {
|
|
4063
|
+
this.visibilityObserver?.disconnect(), this.visibilityObserver = null;
|
|
3877
4064
|
}
|
|
3878
4065
|
getCustomerInfo() {
|
|
3879
4066
|
return this.customer;
|
|
@@ -3907,7 +4094,7 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
3907
4094
|
let t = this.getCardFormFrame();
|
|
3908
4095
|
if (t) try {
|
|
3909
4096
|
t.contentWindow?.postMessage({
|
|
3910
|
-
status:
|
|
4097
|
+
status: De,
|
|
3911
4098
|
cards: e
|
|
3912
4099
|
}, "*");
|
|
3913
4100
|
} catch (e) {
|
|
@@ -3916,7 +4103,7 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
3916
4103
|
else this.log("[setCards] iframe not found");
|
|
3917
4104
|
}
|
|
3918
4105
|
isSchemeSupported(e) {
|
|
3919
|
-
return this.availableCardBrands.includes(
|
|
4106
|
+
return this.availableCardBrands.includes(Ae(e));
|
|
3920
4107
|
}
|
|
3921
4108
|
messageHandler(e) {
|
|
3922
4109
|
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())));
|
|
@@ -3925,14 +4112,14 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
3925
4112
|
this.initialized ||= (this.log("[ClickToPayProcessor] - INIT", this.getCustomerInfo()), this.startLoadingCardForm(), this.initCss(), this.createOtpInput(), this.createModalForm(), this.createLearnMore(), this.initScripts(), !0);
|
|
3926
4113
|
}
|
|
3927
4114
|
cleanUp(e) {
|
|
3928
|
-
this.stopLoadingCardForm(), this.mcHideOtpInput(), this.hideModalForm(), this.setCards([]);
|
|
4115
|
+
this.stopWaitingForVisibility(), this.stopLoadingCardForm(), this.mcHideOtpInput(), this.hideModalForm(), this.setCards([]);
|
|
3929
4116
|
}
|
|
3930
4117
|
isInitialized() {
|
|
3931
4118
|
return this.initialized;
|
|
3932
4119
|
}
|
|
3933
4120
|
start() {
|
|
3934
4121
|
if (this.log("[ClickToPayProcessor] - START", this.startIsRunning, this.loaded, this.getCustomerInfo()), this.startIsRunning) return;
|
|
3935
|
-
this.startIsRunning = !0;
|
|
4122
|
+
this.startIsRunning = !0, this.started = !0, this.cancelRestart();
|
|
3936
4123
|
let e = () => {
|
|
3937
4124
|
this.attachOtpInput(), this.runClickToPay(), this.startLoadingCardForm(), this.startIsRunning = !1;
|
|
3938
4125
|
};
|
|
@@ -4008,7 +4195,7 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4008
4195
|
let r = document.createElement("div");
|
|
4009
4196
|
r.setAttribute("class", "modal-body"), n.appendChild(r);
|
|
4010
4197
|
let i = this, a = document.createElement("src-learn-more");
|
|
4011
|
-
a.setAttribute("card-brands", (this.options.cardBrands ||
|
|
4198
|
+
a.setAttribute("card-brands", (this.options.cardBrands || Er).join(",")), a.addEventListener("close", function(e) {
|
|
4012
4199
|
i.log("src-learn-more: close", e), i.mcHideLearnMore();
|
|
4013
4200
|
}), a.addEventListener("ok", function(e) {
|
|
4014
4201
|
i.log("src-learn-more: ok", e), i.mcHideLearnMore();
|
|
@@ -4087,16 +4274,16 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4087
4274
|
}
|
|
4088
4275
|
mcShowLearnMore() {
|
|
4089
4276
|
this.log("[src-learn-more], mcShowLearnMore", this.srcLearnMore);
|
|
4090
|
-
let e = this.availableCardBrands.length > 0 && this.availableCardBrands ||
|
|
4091
|
-
e.includes(
|
|
4277
|
+
let e = this.availableCardBrands.length > 0 && this.availableCardBrands || Er;
|
|
4278
|
+
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 || Er).join(",")), this.srcLearnMore.style.display = "block";
|
|
4092
4279
|
}
|
|
4093
4280
|
showChangeUserPopup() {
|
|
4094
4281
|
this.showLoginForm();
|
|
4095
4282
|
}
|
|
4096
4283
|
showLoginForm() {
|
|
4097
|
-
let { destroy: e } =
|
|
4284
|
+
let { destroy: e } = E({
|
|
4098
4285
|
el: document.body,
|
|
4099
|
-
component:
|
|
4286
|
+
component: qr,
|
|
4100
4287
|
props: {
|
|
4101
4288
|
log: this.log,
|
|
4102
4289
|
options: this.options
|
|
@@ -4111,7 +4298,7 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4111
4298
|
lastName: "",
|
|
4112
4299
|
email: "",
|
|
4113
4300
|
phoneNumber: ""
|
|
4114
|
-
}), this.customer.email = t, this.customer.phoneNumber = n, !t && !n ? this.stopLoadingCardForm() : (this.setCards([]), this.mcIdLookup());
|
|
4301
|
+
}), this.customer.email = t, this.customer.phoneNumber = n, !t && !n ? this.stopLoadingCardForm() : (this.setCards([]), this.mcIdLookup(!1, ++this.run));
|
|
4115
4302
|
}),
|
|
4116
4303
|
logout: L(this, "[showLoginForm], onlogout", () => {
|
|
4117
4304
|
this.log("[LoginForm.logout]"), e(), this.stopLoadingCardForm(), this.setCards([]), this.mcLogout();
|
|
@@ -4124,7 +4311,7 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4124
4311
|
let r = this, i = L(this, "[checkoutWithCard.promiseResolvedHandler]", (e) => {
|
|
4125
4312
|
r.log("[checkoutWithCard.promiseResolvedHandler]", e), r.hideModalForm(), t(e);
|
|
4126
4313
|
}), a = L(this, "[checkoutWithCard.promiseRejectedHandler]", (t) => {
|
|
4127
|
-
r.log("[checkoutWithCard.promiseRejectedHandler]", t), r.stopUsing(), r.showInfoMessage(
|
|
4314
|
+
r.log("[checkoutWithCard.promiseRejectedHandler]", t), r.stopUsing(), r.showInfoMessage(Qr), n(t), r.sendErrorNotification("checkoutWithCard error", [
|
|
4128
4315
|
e,
|
|
4129
4316
|
o,
|
|
4130
4317
|
t
|
|
@@ -4161,7 +4348,7 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4161
4348
|
let i = this, a = L(this, "[checkoutWithNewCard.promiseResolvedHandler]", (e) => {
|
|
4162
4349
|
i.log("[checkoutWithNewCard.promiseResolvedHandler]", e), i.hideModalForm(), e.checkoutActionCode === "SWITCH_CONSUMER" ? i.showLoginForm() : ["CHANGE_CARD", "CANCEL"].includes(e.checkoutActionCode) || n(e);
|
|
4163
4350
|
}), o = L(this, "[checkoutWithNewCard.promiseRejectedHandler]", (e) => {
|
|
4164
|
-
i.log("[checkoutWithNewCard.promiseRejectedHandler]", e), i.stopUsing(), i.showInfoMessage(
|
|
4351
|
+
i.log("[checkoutWithNewCard.promiseRejectedHandler]", e), i.stopUsing(), i.showInfoMessage(Qr), r(e), i.sendErrorNotification("checkoutWithNewCard error", [s, e]);
|
|
4165
4352
|
});
|
|
4166
4353
|
this.showModalForm();
|
|
4167
4354
|
let s = {
|
|
@@ -4174,7 +4361,7 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4174
4361
|
this.log("checkoutWithNewCard", s), window.mcCheckoutService.checkoutWithNewCard(s).then(a).catch(o);
|
|
4175
4362
|
}
|
|
4176
4363
|
encryptCard(e, t, n, r, i) {
|
|
4177
|
-
let a =
|
|
4364
|
+
let a = Yr(e, this.environment);
|
|
4178
4365
|
this.whenReady().then(() => {
|
|
4179
4366
|
this.mcEncryptCard(a?.cardNumber || e, a?.expiryDate || t, a?.ccv || n, r, i);
|
|
4180
4367
|
}).catch(i);
|
|
@@ -4195,26 +4382,32 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4195
4382
|
srcDpaId: this.options.dpaId,
|
|
4196
4383
|
dpaData: { dpaName: this.options.dpaName || `TAS-${this.options.dpaId}` },
|
|
4197
4384
|
dpaTransactionOptions: this.generateDpaTransactionOptions(),
|
|
4198
|
-
cardBrands: this.options?.cardBrands?.length ? this.options?.cardBrands :
|
|
4385
|
+
cardBrands: this.options?.cardBrands?.length ? this.options?.cardBrands : Er,
|
|
4199
4386
|
checkoutExperience: "WITHIN_CHECKOUT"
|
|
4200
4387
|
}, i = this.getRecognitionToken();
|
|
4201
4388
|
i && (r.recognitionToken = i), this.log("[mcInitClickToPay]", r), window.mcCheckoutService.init(r).then(t).catch(n);
|
|
4202
4389
|
}
|
|
4203
|
-
mcIdLookup(t = !1) {
|
|
4204
|
-
if (this.log("[mcIdLookup]", this.customer, t), this.attempts = 0, !this.customer?.phoneNumber && !this.customer?.email) {
|
|
4390
|
+
mcIdLookup(t = !1, n = this.run) {
|
|
4391
|
+
if (this.log("[mcIdLookup]", this.customer, t), this.attempts = 0, this.stopWaitingForVisibility(), !this.customer?.phoneNumber && !this.customer?.email) {
|
|
4205
4392
|
this.cleanUp(this.container);
|
|
4206
4393
|
return;
|
|
4207
4394
|
}
|
|
4208
4395
|
this.customer?.email || (t = !0);
|
|
4209
|
-
let
|
|
4210
|
-
|
|
4211
|
-
}),
|
|
4212
|
-
|
|
4213
|
-
}),
|
|
4214
|
-
phoneNumber:
|
|
4215
|
-
countryCode:
|
|
4396
|
+
let r = this, i = L(this, "[mcIdLookup.promiseResolvedHandler]", (e) => {
|
|
4397
|
+
r.log("[mcIdLookup.promiseResolvedHandler]", e), n === r.run && (e.consumerPresent ? r.initiateValidationWhenVisible(n) : !e.consumerPresent && !t && r.customer?.phoneNumber ? r.mcIdLookup(!0, n) : r.stopLoadingCardForm());
|
|
4398
|
+
}), a = L(this, "[mcIdLookup.promiseRejectedHandler]", (e) => {
|
|
4399
|
+
r.log("[mcIdLookup.promiseRejectedHandler]", e), r.stopLoadingCardForm(), r.sendErrorNotification("mcIdLookup error", [s, e]), r.stopUsing();
|
|
4400
|
+
}), o = e(this.customer?.phoneNumber || ""), s = t ? { mobileNumber: {
|
|
4401
|
+
phoneNumber: o[1] || "",
|
|
4402
|
+
countryCode: o[0] || "61"
|
|
4216
4403
|
} } : { email: this.customer?.email };
|
|
4217
|
-
this.log("[mcIdLookup]",
|
|
4404
|
+
this.log("[mcIdLookup]", s), window.mcCheckoutService.idLookup(s).then(i).catch(a);
|
|
4405
|
+
}
|
|
4406
|
+
initiateValidationWhenVisible(e) {
|
|
4407
|
+
let t = this.container;
|
|
4408
|
+
t.getClientRects().length > 0 || typeof IntersectionObserver > "u" ? this.mcInitiateValidation() : (this.stopWaitingForVisibility(), this.visibilityObserver = new IntersectionObserver(L(this, "[initiateValidationWhenVisible]", (t) => {
|
|
4409
|
+
t.some((e) => e.isIntersecting) && (this.stopWaitingForVisibility(), e === this.run && this.mcInitiateValidation());
|
|
4410
|
+
})), this.visibilityObserver.observe(t));
|
|
4218
4411
|
}
|
|
4219
4412
|
mcInitiateValidation(e) {
|
|
4220
4413
|
this.log("[mcInitiateValidation]", e);
|
|
@@ -4238,7 +4431,7 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4238
4431
|
let t = this, n = L(this, "[mcValidate.promiseResolvedHandler]", (e) => {
|
|
4239
4432
|
t.log("[mcValidate.promiseResolvedHandler]", e), e.cards ? (t.setCards(e.cards), t.stopLoadingCardForm()) : t.mcGetCards(), t.saveRecognitionToken(e.recognitionToken);
|
|
4240
4433
|
}), r = L(this, "[mcValidate.promiseRejectedHandler]", (e) => {
|
|
4241
|
-
t.log("[mcValidate.promiseRejectedHandler]", e), t.sendErrorNotification("mcValidate error", [{ recognitionTokenRequested: i.recognitionTokenRequested }, 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(
|
|
4434
|
+
t.log("[mcValidate.promiseRejectedHandler]", e), t.sendErrorNotification("mcValidate error", [{ recognitionTokenRequested: i.recognitionTokenRequested }, 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(Qr));
|
|
4242
4435
|
}), i = {
|
|
4243
4436
|
value: e,
|
|
4244
4437
|
recognitionTokenRequested: this.getRememberMe()
|
|
@@ -4249,12 +4442,14 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4249
4442
|
}
|
|
4250
4443
|
}
|
|
4251
4444
|
runClickToPay() {
|
|
4252
|
-
let e = this, t =
|
|
4253
|
-
|
|
4254
|
-
|
|
4445
|
+
let e = this, t = ++this.run;
|
|
4446
|
+
this.lookedUp.add(Zr(this.customer));
|
|
4447
|
+
let n = L(this, "[runClickToPay.promiseResolvedHandler]", (n) => {
|
|
4448
|
+
e.log("[runClickToPay.promiseResolvedHandler]", n), t === e.run && (!n || !n.length ? e.mcIdLookup(!1, t) : (e.setCards(n), e.stopLoadingCardForm()));
|
|
4449
|
+
}), r = L(this, "[runClickToPay.promiseRejectedHandler]", (t) => {
|
|
4255
4450
|
e.log("[runClickToPay.promiseRejectedHandler]", t), e.stopUsing(), e.stopLoadingCardForm(), e.sendErrorNotification("mcCheckoutService.getCards error", [t]);
|
|
4256
4451
|
});
|
|
4257
|
-
this.log("[runClickToPay]"), window.mcCheckoutService.getCards().then(
|
|
4452
|
+
this.log("[runClickToPay]"), window.mcCheckoutService.getCards().then(n).catch(r);
|
|
4258
4453
|
}
|
|
4259
4454
|
mcGetCards() {
|
|
4260
4455
|
let e = this, t = L(this, "[getCards.promiseResolvedHandler]", (t) => {
|
|
@@ -4284,7 +4479,7 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4284
4479
|
this.log("[ClickToPayProcessor]: stop using Click To Pay"), this.enabled = !1, this.cleanUp(this.container);
|
|
4285
4480
|
let e = this.getCardFormFrame();
|
|
4286
4481
|
if (e) try {
|
|
4287
|
-
e.contentWindow?.postMessage({ status:
|
|
4482
|
+
e.contentWindow?.postMessage({ status: ke }, "*"), e.contentWindow?.postMessage({ status: ve }, "*");
|
|
4288
4483
|
} catch (e) {
|
|
4289
4484
|
this.log("[stopUsing] iframe error", e);
|
|
4290
4485
|
}
|
|
@@ -4294,7 +4489,7 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4294
4489
|
let t = this.getCardFormFrame();
|
|
4295
4490
|
if (t) try {
|
|
4296
4491
|
t.contentWindow?.postMessage({
|
|
4297
|
-
status:
|
|
4492
|
+
status: Me,
|
|
4298
4493
|
availableCardBrands: e
|
|
4299
4494
|
}, "*");
|
|
4300
4495
|
} catch (e) {
|
|
@@ -4305,7 +4500,7 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4305
4500
|
return !!this.enabled;
|
|
4306
4501
|
}
|
|
4307
4502
|
getLibUrl(e) {
|
|
4308
|
-
return
|
|
4503
|
+
return $r[this.environment === t.PRODUCTION ? "PRODUCTION" : "SANDBOX"][e] || "";
|
|
4309
4504
|
}
|
|
4310
4505
|
saveRecognitionToken(e) {
|
|
4311
4506
|
let t = /* @__PURE__ */ new Date();
|
|
@@ -4318,12 +4513,12 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4318
4513
|
return e.length === 2 && e.pop().split(";").shift() || "";
|
|
4319
4514
|
}
|
|
4320
4515
|
sendErrorNotification(e, t) {
|
|
4321
|
-
|
|
4516
|
+
ot("[ClickToPayProcessor]", e, t);
|
|
4322
4517
|
}
|
|
4323
4518
|
generateDpaTransactionOptions() {
|
|
4324
4519
|
let e = {
|
|
4325
4520
|
dpaLocale: this.options.locale || "en_AU",
|
|
4326
|
-
dpaBillingPreference:
|
|
4521
|
+
dpaBillingPreference: Dr.NONE,
|
|
4327
4522
|
dpaAcceptedBillingCountries: [],
|
|
4328
4523
|
dpaAcceptedShippingCountries: [],
|
|
4329
4524
|
dpaShippingPreference: "NONE",
|
|
@@ -4334,7 +4529,7 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4334
4529
|
transactionCurrencyCode: this.currency
|
|
4335
4530
|
}
|
|
4336
4531
|
};
|
|
4337
|
-
return !this.tokenAuthenticationEnabled && this.options.useFpan && (e.paymentOptions = [{ dynamicDataType: "NONE" }]), this.options.confirmPayment !== void 0 && (e.confirmPayment = !!this.options.confirmPayment), this.tokenAuthenticationEnabled && (e.dpaBillingPreference =
|
|
4532
|
+
return !this.tokenAuthenticationEnabled && this.options.useFpan && (e.paymentOptions = [{ dynamicDataType: "NONE" }]), this.options.confirmPayment !== void 0 && (e.confirmPayment = !!this.options.confirmPayment), this.tokenAuthenticationEnabled && (e.dpaBillingPreference = Dr.NONE, e.merchantCountryCode = "AU", e.authenticationPreferences = { payloadRequested: "AUTHENTICATED" }, e.paymentOptions = [{
|
|
4338
4533
|
dpaDynamicDataTtlMinutes: 15,
|
|
4339
4534
|
dynamicDataType: "CARD_APPLICATION_CRYPTOGRAM_SHORT_FORM"
|
|
4340
4535
|
}], 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;
|
|
@@ -4351,17 +4546,17 @@ var Ur = "Click to Pay is unavailable. Please proceed with an alternative paymen
|
|
|
4351
4546
|
return t;
|
|
4352
4547
|
}
|
|
4353
4548
|
};
|
|
4354
|
-
F([I],
|
|
4549
|
+
F([I], Z.prototype, "setContainer", null), F([I], Z.prototype, "setCustomerInfo", null), F([I], Z.prototype, "setCards", null), F([I], Z.prototype, "isSchemeSupported", null), F([I], Z.prototype, "messageHandler", null), F([I], Z.prototype, "init", null), F([I], Z.prototype, "cleanUp", null), F([I], Z.prototype, "start", null), F([I], Z.prototype, "initCheckoutServiceLib", null), F([I], Z.prototype, "initScripts", null), F([I], Z.prototype, "initCss", null), F([I], Z.prototype, "createOtpInput", null), F([I], Z.prototype, "attachOtpInput", null), F([I], Z.prototype, "createLearnMore", null), F([I], Z.prototype, "createModalForm", null), F([I], Z.prototype, "showModalForm", null), F([I], Z.prototype, "hideModalForm", null), F([I], Z.prototype, "mcHideOtpInput", null), F([I], Z.prototype, "mcShowOtpInput", null), F([I], Z.prototype, "adjustRememberMeOnOtpInput", null), F([I], Z.prototype, "mcHideLearnMore", null), F([I], Z.prototype, "mcShowLearnMore", null), F([I], Z.prototype, "showChangeUserPopup", null), F([I], Z.prototype, "showLoginForm", null), F([I], Z.prototype, "checkoutWithCard", null), F([I], Z.prototype, "checkoutWithNewCard", null), F([I], Z.prototype, "checkoutWithEncryptedNewCard", null), F([I], Z.prototype, "encryptCard", null), F([I], Z.prototype, "mcLogout", null), F([I], Z.prototype, "mcInitClickToPay", null), F([I], Z.prototype, "mcIdLookup", null), F([I], Z.prototype, "mcInitiateValidation", null), F([I], Z.prototype, "runClickToPay", null), F([I], Z.prototype, "mcGetCards", null), F([I], Z.prototype, "mcEncryptCard", null), F([I], Z.prototype, "stopUsing", null), F([I], Z.prototype, "updateAvailableCardBrands", null), F([I], Z.prototype, "getLibUrl", null), F([I], Z.prototype, "saveRecognitionToken", null), F([I], Z.prototype, "getRecognitionToken", null), F([I], Z.prototype, "sendErrorNotification", null), F([I], Z.prototype, "generateDpaTransactionOptions", null), F([I], Z.prototype, "generateConsumerInfo", null);
|
|
4355
4550
|
// src/sdk/types/PaymentMethodInfo.type.ts
|
|
4356
|
-
var
|
|
4551
|
+
var ei;
|
|
4357
4552
|
(function(e) {
|
|
4358
4553
|
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";
|
|
4359
|
-
})(
|
|
4554
|
+
})(ei ||= {});
|
|
4360
4555
|
// src/sdk/components/PaymentMethod.vue?vue&type=script&setup=true&lang.ts
|
|
4361
|
-
var
|
|
4556
|
+
var ti = {
|
|
4362
4557
|
key: 0,
|
|
4363
4558
|
class: "payment-method-info"
|
|
4364
|
-
},
|
|
4559
|
+
}, ni = ["src", "alt"], ri = { class: "payment-method-details" }, ii = { class: "payment-method-details-name" }, ai = { key: 0 }, oi = { key: 1 }, si = { key: 2 }, ci = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
4365
4560
|
__name: "PaymentMethod",
|
|
4366
4561
|
props: {
|
|
4367
4562
|
log: { type: Function },
|
|
@@ -4369,8 +4564,8 @@ var Kr = {
|
|
|
4369
4564
|
paymentMethod: {}
|
|
4370
4565
|
},
|
|
4371
4566
|
setup(e) {
|
|
4372
|
-
let t = e, n =
|
|
4373
|
-
|
|
4567
|
+
let t = e, n = g(t.paymentMethod);
|
|
4568
|
+
le(() => t.paymentMethod, () => {
|
|
4374
4569
|
n.value = t.paymentMethod;
|
|
4375
4570
|
}, { flush: "post" });
|
|
4376
4571
|
function r() {
|
|
@@ -4414,51 +4609,51 @@ var Kr = {
|
|
|
4414
4609
|
default: return "Unknown";
|
|
4415
4610
|
}
|
|
4416
4611
|
}
|
|
4417
|
-
return
|
|
4612
|
+
return le(() => t.paymentMethod, () => {
|
|
4418
4613
|
n.value = t.paymentMethod;
|
|
4419
|
-
}, { flush: "post" }), (e, t) => n.value ? (
|
|
4614
|
+
}, { flush: "post" }), (e, t) => n.value ? (x(), C("div", ti, [S("img", {
|
|
4420
4615
|
src: i(),
|
|
4421
4616
|
alt: r()
|
|
4422
|
-
}, null, 8,
|
|
4423
|
-
|
|
4424
|
-
n.value.type ===
|
|
4425
|
-
v(" Card: " +
|
|
4426
|
-
t[0] ||=
|
|
4427
|
-
v(" Expire: " +
|
|
4428
|
-
])) :
|
|
4429
|
-
n.value.type ===
|
|
4430
|
-
v(" Name: " +
|
|
4431
|
-
t[1] ||=
|
|
4432
|
-
v(" Acc No: " +
|
|
4433
|
-
])) :
|
|
4434
|
-
n.value.type ===
|
|
4435
|
-
v(" Name: " +
|
|
4436
|
-
t[3] ||=
|
|
4437
|
-
n.value.payTo?.payerPayIdDetails ? (
|
|
4438
|
-
n.value.payTo?.payerDirectDebitDetails ? (
|
|
4439
|
-
v(" BSB: " +
|
|
4440
|
-
t[2] ||=
|
|
4441
|
-
v(" Acc No: " +
|
|
4442
|
-
], 64)) :
|
|
4443
|
-
])) :
|
|
4444
|
-
])])) :
|
|
4445
|
-
}
|
|
4446
|
-
}), [["__scopeId", "data-v-7894e1cd"]]),
|
|
4617
|
+
}, null, 8, ni), S("div", ri, [
|
|
4618
|
+
S("div", ii, T(r()), 1),
|
|
4619
|
+
n.value.type === w(ei).CARD ? (x(), C("div", ai, [
|
|
4620
|
+
v(" Card: " + T(n.value.card?.cardNumber || "Unknown"), 1),
|
|
4621
|
+
t[0] ||= S("br", null, null, -1),
|
|
4622
|
+
v(" Expire: " + T(n.value.card?.expiryDate || "Unknown"), 1)
|
|
4623
|
+
])) : M("", !0),
|
|
4624
|
+
n.value.type === w(ei).BANKPAYMENT ? (x(), C("div", oi, [
|
|
4625
|
+
v(" Name: " + T(n.value.bankPayment?.accountName), 1),
|
|
4626
|
+
t[1] ||= S("br", null, null, -1),
|
|
4627
|
+
v(" Acc No: " + T(n.value.bankPayment?.accountNumber), 1)
|
|
4628
|
+
])) : M("", !0),
|
|
4629
|
+
n.value.type === w(ei).PAYTO ? (x(), C("div", si, [
|
|
4630
|
+
v(" Name: " + T(n.value.payTo?.payerName), 1),
|
|
4631
|
+
t[3] ||= S("br", null, null, -1),
|
|
4632
|
+
n.value.payTo?.payerPayIdDetails ? (x(), C(Ee, { key: 0 }, [v(T(n.value.payTo?.payerPayIdDetails?.payIdType) + ": " + T(n.value.payTo?.payerPayIdDetails?.payId), 1)], 64)) : M("", !0),
|
|
4633
|
+
n.value.payTo?.payerDirectDebitDetails ? (x(), C(Ee, { key: 1 }, [
|
|
4634
|
+
v(" BSB: " + T(n.value.payTo?.payerDirectDebitDetails?.bsb), 1),
|
|
4635
|
+
t[2] ||= S("br", null, null, -1),
|
|
4636
|
+
v(" Acc No: " + T(n.value.payTo?.payerDirectDebitDetails?.accountNumber), 1)
|
|
4637
|
+
], 64)) : M("", !0)
|
|
4638
|
+
])) : M("", !0)
|
|
4639
|
+
])])) : M("", !0);
|
|
4640
|
+
}
|
|
4641
|
+
}), [["__scopeId", "data-v-7894e1cd"]]), li = {
|
|
4447
4642
|
key: 0,
|
|
4448
4643
|
class: "saved-payment-methods"
|
|
4449
|
-
},
|
|
4644
|
+
}, ui = {
|
|
4450
4645
|
key: 0,
|
|
4451
4646
|
class: "error"
|
|
4452
|
-
},
|
|
4647
|
+
}, di = ["onClick"], fi = ["id", "checked"], pi = {
|
|
4453
4648
|
key: 0,
|
|
4454
4649
|
class: "error"
|
|
4455
|
-
},
|
|
4650
|
+
}, mi = {
|
|
4456
4651
|
key: 1,
|
|
4457
4652
|
class: "payment-method-container"
|
|
4458
|
-
},
|
|
4653
|
+
}, hi = {
|
|
4459
4654
|
key: 1,
|
|
4460
4655
|
class: "saved-payment-methods"
|
|
4461
|
-
},
|
|
4656
|
+
}, gi = /*#__PURE__*/ j(/* @__PURE__ */ D({
|
|
4462
4657
|
__name: "PaymentMethodsForm",
|
|
4463
4658
|
props: {
|
|
4464
4659
|
log: { type: Function },
|
|
@@ -4468,7 +4663,7 @@ var Kr = {
|
|
|
4468
4663
|
},
|
|
4469
4664
|
emits: ["submit", "select"],
|
|
4470
4665
|
setup(e, { emit: t }) {
|
|
4471
|
-
let n = e, r = t, i =
|
|
4666
|
+
let n = e, r = t, i = g(!0), a = g(null), o = g(n.paymentMethods), s = g(!1), c = g({}), l = $e(() => s.value ? o.value : a.value ? [a.value] : [o.value[0]]);
|
|
4472
4667
|
function u(e) {
|
|
4473
4668
|
if (e?.data?.status) {
|
|
4474
4669
|
if (e.data.status === "submit-card-form") {
|
|
@@ -4478,7 +4673,7 @@ var Kr = {
|
|
|
4478
4673
|
e.data.status === "activate" && e.data.component === "payment-methods" && (n.log?.(`[PaymentMethods]: message "${e.data.status}" received`, e.data), i.value = !0), e.data.status === "deactivate" && e.data.component === "payment-methods" && (n.log?.(`[PaymentMethods]: message "${e.data.status}" received`, e.data), i.value = !1), e.data.status === "message" && e.data.component === "payment-methods" && (n.log?.(`[PaymentMethods]: message "${e.data.status}" received`, e.data), c.value = e.data.message), e.data.status === "error" && e.data.component === "payment-methods" && (n.log?.(`[PaymentMethods]: message "${e.data.status}" received`, e.data), c.value[e.data.paymentMethodId || "global"] = e.data.error);
|
|
4479
4674
|
}
|
|
4480
4675
|
}
|
|
4481
|
-
|
|
4676
|
+
le(() => n.paymentMethods, () => {
|
|
4482
4677
|
o.value = n.paymentMethods, f();
|
|
4483
4678
|
}, { flush: "post" });
|
|
4484
4679
|
function d(e) {
|
|
@@ -4486,37 +4681,37 @@ var Kr = {
|
|
|
4486
4681
|
}
|
|
4487
4682
|
function f() {
|
|
4488
4683
|
o.value.length > 0 ? (d(o.value.find((e) => e.isDefault) || o.value[0]), window.postMessage({
|
|
4489
|
-
status:
|
|
4684
|
+
status: Ce,
|
|
4490
4685
|
message: {
|
|
4491
4686
|
status: "success",
|
|
4492
4687
|
message: ""
|
|
4493
4688
|
}
|
|
4494
4689
|
}, "*")) : window.postMessage({
|
|
4495
|
-
status:
|
|
4690
|
+
status: Ce,
|
|
4496
4691
|
message: {
|
|
4497
4692
|
status: "error",
|
|
4498
4693
|
message: "No saved payment methods found"
|
|
4499
4694
|
}
|
|
4500
4695
|
}, "*");
|
|
4501
4696
|
}
|
|
4502
|
-
return
|
|
4503
|
-
window.addEventListener("message", u), window.postMessage({ status:
|
|
4504
|
-
}),
|
|
4697
|
+
return m(() => {
|
|
4698
|
+
window.addEventListener("message", u), window.postMessage({ status: Qe }, "*"), f();
|
|
4699
|
+
}), Le(() => {
|
|
4505
4700
|
window.removeEventListener("message", u);
|
|
4506
|
-
}), (e, t) => o.value.length > 0 ? (
|
|
4507
|
-
c.value.global ? (
|
|
4508
|
-
(
|
|
4701
|
+
}), (e, t) => o.value.length > 0 ? (x(), C("div", li, [
|
|
4702
|
+
c.value.global ? (x(), C("div", ui, T(c.value.global), 1)) : M("", !0),
|
|
4703
|
+
(x(!0), C(Ee, null, fe(l.value, (e, t) => (x(), C("div", {
|
|
4509
4704
|
key: `paymentMethod${t}`,
|
|
4510
|
-
class:
|
|
4705
|
+
class: ie(["payment-method-container", `${a.value?.paymentMethodId === e?.paymentMethodId ? "selected" : ""} ${c.value[`${e?.paymentMethodId}`] ? "error" : ""}`]),
|
|
4511
4706
|
onClick: (t) => d(e)
|
|
4512
4707
|
}, [
|
|
4513
|
-
|
|
4708
|
+
S("input", {
|
|
4514
4709
|
type: "radio",
|
|
4515
4710
|
name: "paymentMethod",
|
|
4516
4711
|
id: `payment-method-${e?.paymentMethodId}`,
|
|
4517
4712
|
checked: a.value?.paymentMethodId === e?.paymentMethodId
|
|
4518
|
-
}, null, 8,
|
|
4519
|
-
|
|
4713
|
+
}, null, 8, fi),
|
|
4714
|
+
pe(ci, {
|
|
4520
4715
|
log: n.log,
|
|
4521
4716
|
"css-url": n.cssUrl,
|
|
4522
4717
|
"payment-method": e
|
|
@@ -4525,22 +4720,22 @@ var Kr = {
|
|
|
4525
4720
|
"css-url",
|
|
4526
4721
|
"payment-method"
|
|
4527
4722
|
]),
|
|
4528
|
-
c.value[`${e?.paymentMethodId}`] ? (
|
|
4529
|
-
], 10,
|
|
4530
|
-
o.value.length > 1 ? (
|
|
4723
|
+
c.value[`${e?.paymentMethodId}`] ? (x(), C("div", pi, T(c.value[`${e?.paymentMethodId}`]), 1)) : M("", !0)
|
|
4724
|
+
], 10, di))), 128)),
|
|
4725
|
+
o.value.length > 1 ? (x(), C("div", mi, [t[2] ||= S("div", { style: { width: "20px" } }, null, -1), S("div", null, [s.value ? (x(), C("a", {
|
|
4531
4726
|
key: 0,
|
|
4532
4727
|
href: "#",
|
|
4533
4728
|
class: "black",
|
|
4534
4729
|
onClick: t[0] ||= (e) => s.value = !1
|
|
4535
|
-
}, "Show less")) : (
|
|
4730
|
+
}, "Show less")) : (x(), C("a", {
|
|
4536
4731
|
key: 1,
|
|
4537
4732
|
href: "#",
|
|
4538
4733
|
class: "black",
|
|
4539
4734
|
onClick: t[1] ||= (e) => s.value = !0
|
|
4540
|
-
}, "Show all"))])])) :
|
|
4541
|
-
])) : (
|
|
4735
|
+
}, "Show all"))])])) : M("", !0)
|
|
4736
|
+
])) : (x(), C("div", hi, [...t[3] ||= [S("div", { class: "title" }, "No saved payment methods found", -1)]]));
|
|
4542
4737
|
}
|
|
4543
|
-
}), [["__scopeId", "data-v-d3f0944f"]]),
|
|
4738
|
+
}), [["__scopeId", "data-v-d3f0944f"]]), _i = class {
|
|
4544
4739
|
log;
|
|
4545
4740
|
debug = !1;
|
|
4546
4741
|
container = null;
|
|
@@ -4560,7 +4755,7 @@ var Kr = {
|
|
|
4560
4755
|
order = null;
|
|
4561
4756
|
paymentInfo = null;
|
|
4562
4757
|
geolocation = null;
|
|
4563
|
-
userSuccessMessage =
|
|
4758
|
+
userSuccessMessage = _e;
|
|
4564
4759
|
constructor(e, t) {
|
|
4565
4760
|
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;
|
|
4566
4761
|
let n = new o(t.environment, s(t.publicKey));
|
|
@@ -4662,33 +4857,34 @@ var Kr = {
|
|
|
4662
4857
|
};
|
|
4663
4858
|
}
|
|
4664
4859
|
};
|
|
4665
|
-
F([I],
|
|
4860
|
+
F([I], _i.prototype, "setPaymentInfo", null), F([I], _i.prototype, "cleanUp", null);
|
|
4666
4861
|
// src/sdk/processors/paymentMethodProcessor.ts
|
|
4667
|
-
var { hideSpinner:
|
|
4862
|
+
var { hideSpinner: vi, showSpinner: yi } = Be(), bi = {
|
|
4668
4863
|
CUSTOMER_INFO: "CUSTOMER_INFO",
|
|
4669
4864
|
PAYMENT_METHODS_INFO: "PAYMENT_METHODS_INFO",
|
|
4670
4865
|
TOKENISE: "TOKENISE"
|
|
4671
|
-
},
|
|
4672
|
-
[
|
|
4866
|
+
}, xi = (e, t) => ({
|
|
4867
|
+
[bi.CUSTOMER_INFO]: {
|
|
4673
4868
|
url: e + "/customer/" + t,
|
|
4674
4869
|
method: "GET"
|
|
4675
4870
|
},
|
|
4676
|
-
[
|
|
4871
|
+
[bi.PAYMENT_METHODS_INFO]: {
|
|
4677
4872
|
url: e + "/customer/" + t + "/payment_method",
|
|
4678
4873
|
method: "GET"
|
|
4679
4874
|
},
|
|
4680
|
-
[
|
|
4875
|
+
[bi.TOKENISE]: {
|
|
4681
4876
|
url: e + "/token/payment_method",
|
|
4682
4877
|
method: "POST"
|
|
4683
4878
|
}
|
|
4684
|
-
}),
|
|
4879
|
+
}), Q = class extends _i {
|
|
4685
4880
|
cssUrl = "";
|
|
4686
4881
|
networkTokenProviders = [];
|
|
4687
4882
|
validationStatusChangeCallback = null;
|
|
4883
|
+
threeDsProgressCallback;
|
|
4688
4884
|
fraudProcessor = null;
|
|
4689
4885
|
fraudManageOrder = null;
|
|
4690
4886
|
constructor(e, t) {
|
|
4691
|
-
super(e, t), this.cssUrl = t.cssUrl, this.validationStatusChangeCallback = t.onValidationStatusChangeCallback || null, window.addEventListener("message", this.messageHandler.bind(this));
|
|
4887
|
+
super(e, t), this.cssUrl = t.cssUrl, this.validationStatusChangeCallback = t.onValidationStatusChangeCallback || null, this.threeDsProgressCallback = t.onThreeDsProgress, window.addEventListener("message", this.messageHandler.bind(this));
|
|
4692
4888
|
}
|
|
4693
4889
|
addFraudProcessor(e, t) {
|
|
4694
4890
|
this.fraudProcessor = e, this.fraudManageOrder = t;
|
|
@@ -4699,13 +4895,13 @@ var { hideSpinner: li, showSpinner: ui } = Re(), di = {
|
|
|
4699
4895
|
currency: r,
|
|
4700
4896
|
customerId: t,
|
|
4701
4897
|
options: i
|
|
4702
|
-
}), this.container = e, this.networkTokenProviders = i?.networkTokenProviders || [], this.networkTokenProviders = i?.networkTokenProviders || [], !
|
|
4898
|
+
}), this.container = e, this.networkTokenProviders = i?.networkTokenProviders || [], this.networkTokenProviders = i?.networkTokenProviders || [], !k(n)) throw P(e, "Invalid amount: " + n), TypeError("invalid amount: " + n);
|
|
4703
4899
|
this.getCustomerData(t, (a) => {
|
|
4704
4900
|
this.log("[addPaymentMethods], customerInfo", a), this.getPaymentMethodsInfo(t, (t) => {
|
|
4705
4901
|
this.log("[addPaymentMethods], paymentMethods", t);
|
|
4706
|
-
let o =
|
|
4902
|
+
let o = E({
|
|
4707
4903
|
el: this.container,
|
|
4708
|
-
component:
|
|
4904
|
+
component: gi,
|
|
4709
4905
|
props: {
|
|
4710
4906
|
el: e,
|
|
4711
4907
|
log: this.log,
|
|
@@ -4748,7 +4944,7 @@ var { hideSpinner: li, showSpinner: ui } = Re(), di = {
|
|
|
4748
4944
|
}))
|
|
4749
4945
|
},
|
|
4750
4946
|
on: { submit: L(this, "[PaymentMethods]: submit", (t) => {
|
|
4751
|
-
this.log("[PaymentMethods]: submit", t), t?.paymentMethodId && (
|
|
4947
|
+
this.log("[PaymentMethods]: submit", t), t?.paymentMethodId && (yi(), setTimeout(() => {
|
|
4752
4948
|
this.onSubmit(e, n, r, i, t);
|
|
4753
4949
|
}, 500));
|
|
4754
4950
|
}) }
|
|
@@ -4770,7 +4966,7 @@ var { hideSpinner: li, showSpinner: ui } = Re(), di = {
|
|
|
4770
4966
|
authenticationData: a
|
|
4771
4967
|
});
|
|
4772
4968
|
let o = L(this, "[PaymentMethodProcessor][tokenise], success", (t, n) => {
|
|
4773
|
-
this.log("[PaymentMethodProcessor][tokenise], success", t, n),
|
|
4969
|
+
this.log("[PaymentMethodProcessor][tokenise], success", t, n), vi();
|
|
4774
4970
|
let r = JSON.parse(n), i = { token: r.tokenId };
|
|
4775
4971
|
r.card && (i.cardDetails = {
|
|
4776
4972
|
bin: r.card.cardIin,
|
|
@@ -4785,9 +4981,9 @@ var { hideSpinner: li, showSpinner: ui } = Re(), di = {
|
|
|
4785
4981
|
issuer: r.card.iinData.issuer || "",
|
|
4786
4982
|
countryCode: r.card.iinData.countryCode || "",
|
|
4787
4983
|
cardType: r.card.iinData.cardType || ""
|
|
4788
|
-
}), this.successCallback?.(i),
|
|
4984
|
+
}), this.successCallback?.(i), rt(e, this.getSuccessMessage());
|
|
4789
4985
|
}), s = L(this, "[PaymentMethodProcessor][tokenise], failure", (e, n) => {
|
|
4790
|
-
this.log("[PaymentMethodProcessor][tokenise], failure", e, n),
|
|
4986
|
+
this.log("[PaymentMethodProcessor][tokenise], failure", e, n), vi();
|
|
4791
4987
|
let r = JSON.parse(n);
|
|
4792
4988
|
this.failureCallback?.({ error: r.message }), this.sendError(t, r.message);
|
|
4793
4989
|
}), c = {
|
|
@@ -4807,7 +5003,7 @@ var { hideSpinner: li, showSpinner: ui } = Re(), di = {
|
|
|
4807
5003
|
threeDSServerTransID: i.threeDSServerTransID,
|
|
4808
5004
|
...this.createBaseApiRequest()
|
|
4809
5005
|
};
|
|
4810
|
-
this.httpInvoker?.invoke(
|
|
5006
|
+
this.httpInvoker?.invoke(xi(this.apiUrl)[bi.TOKENISE].url, xi(this.apiUrl)[bi.TOKENISE].method, JSON.stringify(c), o, s);
|
|
4811
5007
|
}
|
|
4812
5008
|
getCustomerData(e, t, n) {
|
|
4813
5009
|
let r = L(this, "[getCustomerData], success", (e, n) => {
|
|
@@ -4815,7 +5011,7 @@ var { hideSpinner: li, showSpinner: ui } = Re(), di = {
|
|
|
4815
5011
|
}), i = L(this, "[getCustomerData], failure", (e, t) => {
|
|
4816
5012
|
this.log("[getCustomerData], failure", e, t), n(JSON.parse(t));
|
|
4817
5013
|
});
|
|
4818
|
-
this.httpInvoker?.invoke(
|
|
5014
|
+
this.httpInvoker?.invoke(xi(this.apiUrl, e)[bi.CUSTOMER_INFO].url, xi(this.apiUrl, e)[bi.CUSTOMER_INFO].method, {}, r, i);
|
|
4819
5015
|
}
|
|
4820
5016
|
getPaymentMethodsInfo(e, t, n) {
|
|
4821
5017
|
let r = L(this, "[getPaymentMethodsInfo], success", (e, n) => {
|
|
@@ -4823,7 +5019,7 @@ var { hideSpinner: li, showSpinner: ui } = Re(), di = {
|
|
|
4823
5019
|
}), i = L(this, "[getPaymentMethodsInfo], failure", (e, t) => {
|
|
4824
5020
|
this.log("[getPaymentMethodsInfo], failure", e, t), n(JSON.parse(t));
|
|
4825
5021
|
});
|
|
4826
|
-
this.httpInvoker?.invoke(
|
|
5022
|
+
this.httpInvoker?.invoke(xi(this.apiUrl, e)[bi.PAYMENT_METHODS_INFO].url, xi(this.apiUrl, e)[bi.PAYMENT_METHODS_INFO].method, {}, r, i);
|
|
4827
5023
|
}
|
|
4828
5024
|
onSubmit(e, t, n, r, i) {
|
|
4829
5025
|
if (!i?.paymentMethodId) {
|
|
@@ -4831,11 +5027,15 @@ var { hideSpinner: li, showSpinner: ui } = Re(), di = {
|
|
|
4831
5027
|
return;
|
|
4832
5028
|
}
|
|
4833
5029
|
let a = i.paymentMethodId;
|
|
4834
|
-
this.fraudProcessor?.setPaymentReference({ paymentMethodId: a }),
|
|
4835
|
-
onShow:
|
|
5030
|
+
this.fraudProcessor?.setPaymentReference({ paymentMethodId: a }), Un(this.fraudProcessor, this.fraudManageOrder, e, {
|
|
5031
|
+
onShow: vi,
|
|
5032
|
+
onProgress: this.threeDsProgressCallback,
|
|
4836
5033
|
log: this.log
|
|
4837
5034
|
}).then(L(this, "[PaymentMethodProcessor][fraudGate]", (o) => {
|
|
4838
|
-
"error" in o ? (
|
|
5035
|
+
"error" in o ? (vi(), P(e, o.error), this.failureCallback?.({
|
|
5036
|
+
error: o.error,
|
|
5037
|
+
...o.reason && { errorDetails: { reason: o.reason } }
|
|
5038
|
+
}), this.sendError(a, o.reason || o.error)) : this.onFraudGatePassed(e, t, n, o, r, i);
|
|
4839
5039
|
}));
|
|
4840
5040
|
}
|
|
4841
5041
|
onFraudGatePassed(e, t, n, r, i, a) {
|
|
@@ -4854,7 +5054,7 @@ var { hideSpinner: li, showSpinner: ui } = Re(), di = {
|
|
|
4854
5054
|
s.invoke(this.amount, this.currency, L(this, "[sdk][paymentMethodProcessor], token authentication success", (i) => {
|
|
4855
5055
|
this.log("[sdk][paymentMethodProcessor], token authentication success"), this.tokenise(e, a.paymentMethodId, t, n, r, i.assuranceData?.verificationData?.[0]);
|
|
4856
5056
|
}), L(this, "[sdk][paymentMethodProcessor], token authentication error", (e) => {
|
|
4857
|
-
|
|
5057
|
+
vi(), this.log("[sdk][paymentMethodProcessor], token authentication error", e), this.failureCallback?.({ error: "Token Authentication Error" });
|
|
4858
5058
|
}));
|
|
4859
5059
|
}
|
|
4860
5060
|
}
|
|
@@ -4890,62 +5090,46 @@ var { hideSpinner: li, showSpinner: ui } = Re(), di = {
|
|
|
4890
5090
|
}
|
|
4891
5091
|
}
|
|
4892
5092
|
messageHandler(e) {
|
|
4893
|
-
e?.data?.status && e.data.status === "card-form-validation-status-change" && (this.log(`[sdk][paymentMethodProcessor]: message "${e.data.status}" received`, e.data),
|
|
5093
|
+
e?.data?.status && e.data.status === "card-form-validation-status-change" && (this.log(`[sdk][paymentMethodProcessor]: message "${e.data.status}" received`, e.data), vi(), this.validationStatusChangeCallback?.(e.data.message?.status, e.data.message?.message));
|
|
4894
5094
|
}
|
|
4895
5095
|
};
|
|
4896
|
-
F([I],
|
|
4897
|
-
// src/sdk/types/PaymentType.type.ts
|
|
4898
|
-
var Q;
|
|
4899
|
-
(function(e) {
|
|
4900
|
-
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";
|
|
4901
|
-
})(Q ||= {});
|
|
4902
|
-
// src/sdk/utils/paymentType.ts
|
|
4903
|
-
function pi(e) {
|
|
4904
|
-
switch (e) {
|
|
4905
|
-
case J.AZUPAY: return Q.payid;
|
|
4906
|
-
case J.SHIFT: return Q.shift;
|
|
4907
|
-
case J.PESAPAL: return Q.pesapal;
|
|
4908
|
-
case J.PAYBYACCOUNT: return Q.paybyaccount;
|
|
4909
|
-
case J.PAYGLOCAL:
|
|
4910
|
-
case J.ZIP: return Q.zip;
|
|
4911
|
-
}
|
|
4912
|
-
}
|
|
5096
|
+
F([I], Q.prototype, "addPaymentMethods", null), F([I], Q.prototype, "tokenise", null), F([I], Q.prototype, "getCustomerData", null), F([I], Q.prototype, "getPaymentMethodsInfo", null), F([I], Q.prototype, "onSubmit", null), F([I], Q.prototype, "onFraudGatePassed", null), F([I], Q.prototype, "sendError", null), F([I], Q.prototype, "initTokenAuthenticationProcessor", null), F([I], Q.prototype, "messageHandler", null);
|
|
4913
5097
|
// src/sdk/utils/moduleLoader.ts
|
|
4914
|
-
var
|
|
4915
|
-
cxpay: () => import("./cxpay-
|
|
4916
|
-
default: () => import("./default-
|
|
4917
|
-
ecentric: () => import("./ecentric-
|
|
4918
|
-
epna: () => import("./epna-
|
|
4919
|
-
flashbanc: () => import("./flashbanc-
|
|
4920
|
-
forter: () => import("./forter-
|
|
4921
|
-
gpayments: () => import("./gpayments-
|
|
4922
|
-
metrics_global: () => import("./metrics_global-
|
|
4923
|
-
nmi: () => import("./nmi-
|
|
4924
|
-
nuvei: () => import("./nuvei-
|
|
4925
|
-
payabli: () => import("./payabli-
|
|
4926
|
-
payglocal: () => import("./payglocal-
|
|
4927
|
-
skybank: () => import("./skybank-
|
|
4928
|
-
},
|
|
4929
|
-
async function
|
|
4930
|
-
let t =
|
|
5098
|
+
var Si = {
|
|
5099
|
+
cxpay: () => import("./cxpay-DblHb5vN.js"),
|
|
5100
|
+
default: () => import("./default-C7f86Fx-.js"),
|
|
5101
|
+
ecentric: () => import("./ecentric-B3UohyO_.js"),
|
|
5102
|
+
epna: () => import("./epna-DwUg2IlB.js"),
|
|
5103
|
+
flashbanc: () => import("./flashbanc-LXs8bahL.js"),
|
|
5104
|
+
forter: () => import("./forter-CLFaJUYa.js"),
|
|
5105
|
+
gpayments: () => import("./gpayments-DoZug3PV.js"),
|
|
5106
|
+
metrics_global: () => import("./metrics_global-BM-ooge-.js"),
|
|
5107
|
+
nmi: () => import("./nmi-BA3ZTdQa.js"),
|
|
5108
|
+
nuvei: () => import("./nuvei-DIWsLlLz.js"),
|
|
5109
|
+
payabli: () => import("./payabli-DgrTI1Et.js"),
|
|
5110
|
+
payglocal: () => import("./payglocal-ezp0MsaZ.js"),
|
|
5111
|
+
skybank: () => import("./skybank-BgDLlFXX.js")
|
|
5112
|
+
}, Ci = { forter: () => import("./forter-DXQjpKVH.js") };
|
|
5113
|
+
async function wi(e) {
|
|
5114
|
+
let t = Si[e.toLowerCase()];
|
|
4931
5115
|
if (!t) throw Error(`Module ${e} not found`);
|
|
4932
5116
|
return await t();
|
|
4933
5117
|
}
|
|
4934
|
-
async function
|
|
4935
|
-
let t =
|
|
5118
|
+
async function Ti(e) {
|
|
5119
|
+
let t = Ci[e.toLowerCase()];
|
|
4936
5120
|
if (!t) throw Error(`Module ${e} not found`);
|
|
4937
5121
|
return await t();
|
|
4938
5122
|
}
|
|
4939
5123
|
// src/sdk/payfurl.ts
|
|
4940
|
-
var { hideSpinner:
|
|
5124
|
+
var { hideSpinner: Ei } = Be(), Di = {
|
|
4941
5125
|
PROVIDER_INFO: "PROVIDER_INFO",
|
|
4942
5126
|
PROVIDERS_INFO: "PROVIDERS_INFO"
|
|
4943
|
-
},
|
|
4944
|
-
[
|
|
5127
|
+
}, Oi = (e, t, n) => ({
|
|
5128
|
+
[Di.PROVIDERS_INFO]: {
|
|
4945
5129
|
url: e + "/info/providers/",
|
|
4946
5130
|
method: "GET"
|
|
4947
5131
|
},
|
|
4948
|
-
[
|
|
5132
|
+
[Di.PROVIDER_INFO]: {
|
|
4949
5133
|
url: e + (n ? "/info/providers/token/" + n : "/info/providers/" + t),
|
|
4950
5134
|
method: "GET"
|
|
4951
5135
|
}
|
|
@@ -4980,7 +5164,9 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
4980
5164
|
userOnSuccess = null;
|
|
4981
5165
|
userOnFailure = null;
|
|
4982
5166
|
userOnLoaded = null;
|
|
4983
|
-
|
|
5167
|
+
userOnPaymentMethodStatus = null;
|
|
5168
|
+
userOnThreeDsProgress = null;
|
|
5169
|
+
userSuccessMessage = _e;
|
|
4984
5170
|
userOnValidationStatusChange = null;
|
|
4985
5171
|
userOnValidate;
|
|
4986
5172
|
billingAddress = null;
|
|
@@ -4990,15 +5176,43 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
4990
5176
|
initProcessorsRunning = !1;
|
|
4991
5177
|
initProcessorsQueue = [];
|
|
4992
5178
|
init(e, t, r) {
|
|
4993
|
-
if (this.environment = String(e).toLowerCase(),
|
|
5179
|
+
if (this.environment = String(e).toLowerCase(), at.init(this.environment, t, n.version), window._payfurl) return window._payfurl;
|
|
4994
5180
|
if (this.debug = r, this.publicKey = t, this.config = i(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.");
|
|
4995
5181
|
return this.regionResolver = new o(e, s(t)), this.httpInvoker = new c(t, n.version, this.regionResolver), this.loadCss(), window._payfurl = this, window.addEventListener("message", this.messageHandler.bind(this)), this;
|
|
4996
5182
|
}
|
|
4997
5183
|
execute() {
|
|
4998
|
-
window.postMessage({ status:
|
|
5184
|
+
window.postMessage({ status: Ge }, "*");
|
|
4999
5185
|
}
|
|
5000
5186
|
messageHandler(e) {
|
|
5001
|
-
e?.data?.status
|
|
5187
|
+
if (!e?.data?.status || (e.data.status === "payfurl-init" && this.userOnLoaded?.(), e.source !== window)) return;
|
|
5188
|
+
let { paymentMethod: t, providerType: n } = e.data;
|
|
5189
|
+
e.data.status === "payfurl-init" && t && this.paymentMethodStatus({
|
|
5190
|
+
paymentMethod: t,
|
|
5191
|
+
...n && { providerType: n },
|
|
5192
|
+
status: "rendered"
|
|
5193
|
+
}), e.data.status === "payfurl-payment-method-unavailable" && this.paymentMethodStatus({
|
|
5194
|
+
paymentMethod: t,
|
|
5195
|
+
...n && { providerType: n },
|
|
5196
|
+
status: "unavailable",
|
|
5197
|
+
reason: e.data.reason,
|
|
5198
|
+
message: e.data.message
|
|
5199
|
+
});
|
|
5200
|
+
}
|
|
5201
|
+
paymentMethodStatus(e) {
|
|
5202
|
+
this.log("[paymentMethodStatus]", e);
|
|
5203
|
+
try {
|
|
5204
|
+
this.userOnPaymentMethodStatus?.(e);
|
|
5205
|
+
} catch (e) {
|
|
5206
|
+
console.error("[payfurl] onPaymentMethodStatus handler threw", f(e));
|
|
5207
|
+
}
|
|
5208
|
+
}
|
|
5209
|
+
threeDsProgress(e) {
|
|
5210
|
+
this.log("[threeDsProgress]", e);
|
|
5211
|
+
try {
|
|
5212
|
+
this.userOnThreeDsProgress?.(e);
|
|
5213
|
+
} catch (e) {
|
|
5214
|
+
console.error("[payfurl] onThreeDsProgress handler threw", f(e));
|
|
5215
|
+
}
|
|
5002
5216
|
}
|
|
5003
5217
|
initCardProcessor(e) {
|
|
5004
5218
|
if (this.log("[initCardProcessor]", { container: e }), this.cardProcessor) return this.cardProcessor;
|
|
@@ -5017,7 +5231,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5017
5231
|
}),
|
|
5018
5232
|
onFailure: L(this, "[cardProcessor], failure", (e) => {
|
|
5019
5233
|
this.log("[cardProcessor], failure", e);
|
|
5020
|
-
let t =
|
|
5234
|
+
let t = Xn(e.body) || e.errorDetails;
|
|
5021
5235
|
e.body && !t && this.log("[cardProcessor], failure", "no structured error detail in body"), this.userOnFailure?.({
|
|
5022
5236
|
error: e.error,
|
|
5023
5237
|
...t && { errorDetails: t }
|
|
@@ -5025,12 +5239,13 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5025
5239
|
}),
|
|
5026
5240
|
onValidationStatusChangeCallback: L(this, "[cardProcessor], ValidationStatusChange", (e, t) => {
|
|
5027
5241
|
this.log("[cardProcessor], ValidationStatusChange", e, t), this.userOnValidationStatusChange?.(e, t);
|
|
5028
|
-
})
|
|
5242
|
+
}),
|
|
5243
|
+
onThreeDsProgress: this.threeDsProgress.bind(this)
|
|
5029
5244
|
});
|
|
5030
5245
|
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;
|
|
5031
5246
|
}
|
|
5032
5247
|
initClickToPayProcessor(e, t) {
|
|
5033
|
-
return this.log("[initClickToPayProcessor]", { options: t }), this.clickToPayProcessor ||= new
|
|
5248
|
+
return this.log("[initClickToPayProcessor]", { options: t }), this.clickToPayProcessor ||= new Z(this.log.bind(this), {
|
|
5034
5249
|
container: e,
|
|
5035
5250
|
environment: this.environment,
|
|
5036
5251
|
options: t
|
|
@@ -5038,7 +5253,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5038
5253
|
}
|
|
5039
5254
|
initPaypalProcessor(e) {
|
|
5040
5255
|
if (this.log("[initPaypalProcessor]", { container: e }), this.paypalProcessor) return this.paypalProcessor;
|
|
5041
|
-
let t = new
|
|
5256
|
+
let t = new Bt(this.log.bind(this), {
|
|
5042
5257
|
debug: this.debug,
|
|
5043
5258
|
environment: this.environment,
|
|
5044
5259
|
publicKey: this.publicKey,
|
|
@@ -5057,7 +5272,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5057
5272
|
}
|
|
5058
5273
|
initCheckoutProcessor(e) {
|
|
5059
5274
|
this.log("[initCheckoutProcessor]", { container: e });
|
|
5060
|
-
let t = new
|
|
5275
|
+
let t = new Nn(this.log.bind(this), {
|
|
5061
5276
|
debug: this.debug,
|
|
5062
5277
|
environment: this.environment,
|
|
5063
5278
|
publicKey: this.publicKey,
|
|
@@ -5072,14 +5287,19 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5072
5287
|
t.transactionId && (n.transactionId = t.transactionId), t.token && (n.token = t.token), this.userOnSuccess?.(n);
|
|
5073
5288
|
}),
|
|
5074
5289
|
onFailure: L(this, "[checkoutProcessor], failure", (e) => {
|
|
5075
|
-
this.log("[checkoutProcessor], failure", e)
|
|
5290
|
+
this.log("[checkoutProcessor], failure", e);
|
|
5291
|
+
let t = Xn(e.body);
|
|
5292
|
+
this.userOnFailure?.({
|
|
5293
|
+
error: e.error,
|
|
5294
|
+
...t && { errorDetails: t }
|
|
5295
|
+
});
|
|
5076
5296
|
})
|
|
5077
5297
|
});
|
|
5078
5298
|
return t.setOnValidate(this.userOnValidate), this.checkoutProcessors.push(t), t;
|
|
5079
5299
|
}
|
|
5080
5300
|
initGooglePayProcessor(e) {
|
|
5081
5301
|
if (this.log("[initGooglePayProcessor]", { container: e }), this.googlePayProcessor) return this.googlePayProcessor;
|
|
5082
|
-
let t = new
|
|
5302
|
+
let t = new ir(this.log.bind(this), {
|
|
5083
5303
|
debug: this.debug,
|
|
5084
5304
|
environment: this.environment,
|
|
5085
5305
|
publicKey: this.publicKey,
|
|
@@ -5091,14 +5311,17 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5091
5311
|
}, 500)), this.userOnSuccess?.({ transactionId: t.transactionId });
|
|
5092
5312
|
}),
|
|
5093
5313
|
onFailure: L(this, "[googlePayProcessor], failure", (e) => {
|
|
5094
|
-
this.log("[googlePayProcessor], failure", e), this.userOnFailure?.({
|
|
5314
|
+
this.log("[googlePayProcessor], failure", e), this.userOnFailure?.({
|
|
5315
|
+
error: e.error,
|
|
5316
|
+
...e.errorDetails && { errorDetails: e.errorDetails }
|
|
5317
|
+
});
|
|
5095
5318
|
})
|
|
5096
5319
|
});
|
|
5097
5320
|
return this.amount && t.setAmount(this.amount), this.currency && t.setCurrency(this.currency), this.billingAddress && t.setBillingAddress(this.billingAddress), this.customer && t.setCustomerInfo(this.customer), this.order && t.setOrderInfo(this.order), t.addFraudProcessor(this.fraudProcessor), t.setOnValidate(this.userOnValidate), this.googlePayProcessor = t, this.googlePayProcessor;
|
|
5098
5321
|
}
|
|
5099
5322
|
initApplePayProcessor(e) {
|
|
5100
5323
|
if (this.log("[initApplePayProcessor]", { container: e }), this.applePayProcessor) return this.applePayProcessor;
|
|
5101
|
-
let t = new
|
|
5324
|
+
let t = new wr(this.log.bind(this), {
|
|
5102
5325
|
debug: this.debug,
|
|
5103
5326
|
environment: this.environment,
|
|
5104
5327
|
publicKey: this.publicKey,
|
|
@@ -5115,13 +5338,16 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5115
5338
|
});
|
|
5116
5339
|
}),
|
|
5117
5340
|
onFailure: L(this, "[applePayProcessor], failure", (e) => {
|
|
5118
|
-
this.log("[applePayProcessor], failure", e), this.userOnFailure?.({
|
|
5341
|
+
this.log("[applePayProcessor], failure", e), this.userOnFailure?.({
|
|
5342
|
+
error: e.error,
|
|
5343
|
+
...e.errorDetails && { errorDetails: e.errorDetails }
|
|
5344
|
+
});
|
|
5119
5345
|
})
|
|
5120
5346
|
});
|
|
5121
5347
|
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.addFraudProcessor(this.fraudProcessor), t.setOnValidate(this.userOnValidate), this.applePayProcessor = t, this.applePayProcessor;
|
|
5122
5348
|
}
|
|
5123
5349
|
initPayToProcessor(e) {
|
|
5124
|
-
return this.log("[initPayToProcessor]", { container: e }), this.payToProcessor || (this.payToProcessor = new
|
|
5350
|
+
return this.log("[initPayToProcessor]", { container: e }), this.payToProcessor || (this.payToProcessor = new hn(this.log.bind(this), {
|
|
5125
5351
|
debug: this.debug,
|
|
5126
5352
|
environment: this.environment,
|
|
5127
5353
|
publicKey: this.publicKey,
|
|
@@ -5134,12 +5360,17 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5134
5360
|
}, 500)), this.userOnSuccess?.({ token: t.token });
|
|
5135
5361
|
}),
|
|
5136
5362
|
onFailure: L(this, "[payToProcessor], failure", (e) => {
|
|
5137
|
-
this.log("[payToProcessor], failure", e)
|
|
5363
|
+
this.log("[payToProcessor], failure", e);
|
|
5364
|
+
let t = Xn(e.body);
|
|
5365
|
+
this.userOnFailure?.({
|
|
5366
|
+
error: e.error,
|
|
5367
|
+
...t && { errorDetails: t }
|
|
5368
|
+
});
|
|
5138
5369
|
})
|
|
5139
5370
|
}), this.payToProcessor.setOnValidate(this.userOnValidate)), this.payToProcessor;
|
|
5140
5371
|
}
|
|
5141
5372
|
initPaymentMethodProcessor(e) {
|
|
5142
|
-
return this.log("[initPaymentMethodProcessor]", { container: e }), this.paymentMethodProcessor || (this.paymentMethodProcessor = new
|
|
5373
|
+
return this.log("[initPaymentMethodProcessor]", { container: e }), this.paymentMethodProcessor || (this.paymentMethodProcessor = new Q(this.log.bind(this), {
|
|
5143
5374
|
debug: this.debug,
|
|
5144
5375
|
environment: this.environment,
|
|
5145
5376
|
publicKey: this.publicKey,
|
|
@@ -5152,11 +5383,15 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5152
5383
|
}, 500)), this.userOnSuccess?.(t);
|
|
5153
5384
|
}),
|
|
5154
5385
|
onFailure: L(this, "[paymentMethodProcessor], failure", (e) => {
|
|
5155
|
-
this.log("[paymentMethodProcessor], failure", e), this.userOnFailure?.({
|
|
5386
|
+
this.log("[paymentMethodProcessor], failure", e), this.userOnFailure?.({
|
|
5387
|
+
error: e.error,
|
|
5388
|
+
...e.errorDetails && { errorDetails: e.errorDetails }
|
|
5389
|
+
});
|
|
5156
5390
|
}),
|
|
5157
5391
|
onValidationStatusChangeCallback: L(this, "[paymentMethodProcessor], ValidationStatusChange", (e, t) => {
|
|
5158
5392
|
this.log("[paymentMethodProcessor], ValidationStatusChange", e, t), this.userOnValidationStatusChange?.(e, t);
|
|
5159
|
-
})
|
|
5393
|
+
}),
|
|
5394
|
+
onThreeDsProgress: this.threeDsProgress.bind(this)
|
|
5160
5395
|
}), this.initBaseProcessor(this.paymentMethodProcessor), this.fraudProcessor && this.paymentMethodProcessor.addFraudProcessor(this.cardFraudProcessor, this.fraudManageOrder)), this.paymentMethodProcessor;
|
|
5161
5396
|
}
|
|
5162
5397
|
loadCss() {
|
|
@@ -5203,7 +5438,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5203
5438
|
let r = L(this, "[getSubmitFormHandler][handler]", (t) => {
|
|
5204
5439
|
this.log("[sdk], submitForm", t), t.preventDefault();
|
|
5205
5440
|
let n = this.getForm(e);
|
|
5206
|
-
(!n?.onsubmit || n.onsubmit(new SubmitEvent("submit"))) && (n && this.getInput(e, "token")?.value ? n.submit() : window.postMessage({ status:
|
|
5441
|
+
(!n?.onsubmit || n.onsubmit(new SubmitEvent("submit"))) && (n && this.getInput(e, "token")?.value ? n.submit() : window.postMessage({ status: Ge }, "*"));
|
|
5207
5442
|
});
|
|
5208
5443
|
return this._submitFormHandlers[n] = r, r;
|
|
5209
5444
|
}
|
|
@@ -5226,7 +5461,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5226
5461
|
let a = Number(r?.amount) || 0;
|
|
5227
5462
|
r?.currency && (r.currency = r?.currency.toUpperCase());
|
|
5228
5463
|
let o = r?.currency || "";
|
|
5229
|
-
if (a && !
|
|
5464
|
+
if (a && !k(a)) throw this.showErrorMessage(i, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5230
5465
|
return this._cleanUp(i), this._initForm(i), this.setAmount(a), this.setCurrency(o), this.initProcessors(i, a, o, t, "", r || {}, L(this, "[addCard][initProcessors], callback", (e, s) => {
|
|
5231
5466
|
let c = this.resolveThreeDsProvider(e, s), l = s.allThreeDsProviders?.[0], u = this.skipCardFraud ? void 0 : s.fraudProviders?.[0], d = {
|
|
5232
5467
|
...r,
|
|
@@ -5243,8 +5478,8 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5243
5478
|
networkTokenProviders: s.networkTokenProviders || [],
|
|
5244
5479
|
createNetworkToken: r?.createNetworkToken !== !1 && s.hasNetworkTokenProviders,
|
|
5245
5480
|
networkTokenOptions: r?.networkTokenOptions,
|
|
5246
|
-
vault:
|
|
5247
|
-
verifyCard:
|
|
5481
|
+
vault: O(r?.vault),
|
|
5482
|
+
verifyCard: O(r?.verifyCard),
|
|
5248
5483
|
metadata: U(r?.metadata),
|
|
5249
5484
|
secureCardOrchestration: {
|
|
5250
5485
|
enabled: !0,
|
|
@@ -5288,7 +5523,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5288
5523
|
}
|
|
5289
5524
|
};
|
|
5290
5525
|
if (d.threeDSEnabled) {
|
|
5291
|
-
if (!
|
|
5526
|
+
if (!k(a)) {
|
|
5292
5527
|
this.showErrorMessage(i, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" });
|
|
5293
5528
|
return;
|
|
5294
5529
|
}
|
|
@@ -5324,8 +5559,8 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5324
5559
|
networkTokenProviders: o.networkTokenProviders || [],
|
|
5325
5560
|
createNetworkToken: i?.createNetworkToken !== !1 && o.hasNetworkTokenProviders,
|
|
5326
5561
|
networkTokenOptions: i?.networkTokenOptions,
|
|
5327
|
-
vault:
|
|
5328
|
-
verifyCard:
|
|
5562
|
+
vault: O(i?.vault),
|
|
5563
|
+
verifyCard: O(i?.verifyCard),
|
|
5329
5564
|
metadata: U(i?.metadata),
|
|
5330
5565
|
secureCardOrchestration: {
|
|
5331
5566
|
enabled: !0,
|
|
@@ -5369,7 +5604,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5369
5604
|
}
|
|
5370
5605
|
};
|
|
5371
5606
|
if (u.threeDSEnabled) {
|
|
5372
|
-
if (!
|
|
5607
|
+
if (!k(t)) {
|
|
5373
5608
|
this.showErrorMessage(a, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" });
|
|
5374
5609
|
return;
|
|
5375
5610
|
}
|
|
@@ -5398,15 +5633,20 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5398
5633
|
tokenAuthenticationEnabled: i?.tokenAuthenticationEnabled || i?.clickToPayOptions?.tokenAuthenticationEnabled,
|
|
5399
5634
|
networkTokenOptions: i?.networkTokenOptions || i?.clickToPayOptions?.networkTokenOptions
|
|
5400
5635
|
}, L(this, "[addDropIn][initProcessors], callback", async (o, l) => {
|
|
5401
|
-
|
|
5402
|
-
|
|
5636
|
+
let u = l.hasApplePayProviders && await this.isApplePayAvailable();
|
|
5637
|
+
l.hasApplePayProviders && !u && s(Y.applepay) && this.paymentMethodStatus({
|
|
5638
|
+
paymentMethod: "applepay",
|
|
5639
|
+
status: "unavailable",
|
|
5640
|
+
reason: "unsupported"
|
|
5641
|
+
}), i?.paypalProviderId && l.hasPaypalProviders && l.paypalProviders.includes(i?.paypalProviderId) && (l.hasPaypalProviders = !0, l.paypalProviders.unshift(i?.paypalProviderId)), i?.payToProviderId && l.hasPayToProviders && l.payToProviders.includes(i?.payToProviderId) && (l.hasPayToProviders = !0, l.payToProviders.unshift(i?.payToProviderId));
|
|
5642
|
+
let d = [
|
|
5403
5643
|
l.hasCardProviders,
|
|
5404
5644
|
l.hasPaypalProviders,
|
|
5405
5645
|
l.hasPayToProviders,
|
|
5406
5646
|
l.hasBnplProviders,
|
|
5407
5647
|
l.hasGooglePayProviders,
|
|
5408
|
-
|
|
5409
|
-
].filter(Boolean).length > 1,
|
|
5648
|
+
u
|
|
5649
|
+
].filter(Boolean).length > 1, f = this.resolveThreeDsProvider(o, l), p = this.skipCardFraud ? void 0 : l.fraudProviders?.[0], m = {
|
|
5410
5650
|
threeDSEnabled: !!l.required3dsProvider,
|
|
5411
5651
|
threeDsProviderId: l.required3dsProvider || "",
|
|
5412
5652
|
threeDSEmail: i?.threeDSEmail || "",
|
|
@@ -5423,8 +5663,8 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5423
5663
|
networkTokenProviders: l.networkTokenProviders || [],
|
|
5424
5664
|
createNetworkToken: i?.createNetworkToken !== !1 && l.hasNetworkTokenProviders,
|
|
5425
5665
|
networkTokenOptions: i?.networkTokenOptions,
|
|
5426
|
-
vault:
|
|
5427
|
-
verifyCard:
|
|
5666
|
+
vault: O(i?.vault),
|
|
5667
|
+
verifyCard: O(i?.verifyCard),
|
|
5428
5668
|
metadata: U(i?.metadata),
|
|
5429
5669
|
secureCardOrchestration: {
|
|
5430
5670
|
enabled: !0,
|
|
@@ -5441,19 +5681,19 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5441
5681
|
customer: this.customer,
|
|
5442
5682
|
order: this.order,
|
|
5443
5683
|
geolocation: this.geolocation,
|
|
5444
|
-
fraud: !(i?.clickToPayEnabled !== !1 && l.clickToPayEnabled) &&
|
|
5684
|
+
fraud: !(i?.clickToPayEnabled !== !1 && l.clickToPayEnabled) && p ? {
|
|
5685
|
+
providerId: p.providerId,
|
|
5686
|
+
providerType: p.providerType,
|
|
5687
|
+
stopPaymentOnFailure: !!p.stopPaymentOnFailure,
|
|
5688
|
+
clientParameters: p.clientParameters || {}
|
|
5689
|
+
} : void 0,
|
|
5690
|
+
threeDs: !(i?.clickToPayEnabled !== !1 && l.clickToPayEnabled) && f ? {
|
|
5445
5691
|
providerId: f.providerId,
|
|
5446
5692
|
providerType: f.providerType,
|
|
5447
|
-
stopPaymentOnFailure: !!f.stopPaymentOnFailure,
|
|
5448
|
-
clientParameters: f.clientParameters || {}
|
|
5449
|
-
} : void 0,
|
|
5450
|
-
threeDs: !(i?.clickToPayEnabled !== !1 && l.clickToPayEnabled) && d ? {
|
|
5451
|
-
providerId: d.providerId,
|
|
5452
|
-
providerType: d.providerType,
|
|
5453
5693
|
cardProviderId: i?.cardProviderId || "",
|
|
5454
5694
|
clientParameters: {
|
|
5455
5695
|
...o.clientParameters,
|
|
5456
|
-
...
|
|
5696
|
+
...f.clientParameters
|
|
5457
5697
|
}
|
|
5458
5698
|
} : void 0,
|
|
5459
5699
|
secondaryThreeDs: !(i?.clickToPayEnabled !== !1 && l.clickToPayEnabled) && l.allThreeDsProviders?.[0] ? {
|
|
@@ -5466,17 +5706,17 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5466
5706
|
}
|
|
5467
5707
|
} : void 0
|
|
5468
5708
|
}
|
|
5469
|
-
},
|
|
5470
|
-
hideShipping:
|
|
5471
|
-
paypalButtonStyle:
|
|
5472
|
-
paypalEnablePayIn4:
|
|
5709
|
+
}, h = {
|
|
5710
|
+
hideShipping: !!i?.paypalHideShipping,
|
|
5711
|
+
paypalButtonStyle: i?.paypalButtonStyle,
|
|
5712
|
+
paypalEnablePayIn4: !!i?.paypalEnablePayIn4,
|
|
5473
5713
|
transfer: null,
|
|
5474
5714
|
metadata: U(i?.metadata)
|
|
5475
|
-
},
|
|
5715
|
+
}, g = {
|
|
5476
5716
|
description: String(i?.payToDescription).trim() || String(l.payToProvidersWithOptions[0]?.description) || "",
|
|
5477
5717
|
maximumAmount: i?.payToMaximumAmount || Number(l.payToProvidersWithOptions[0]?.maximumAmount) || 0,
|
|
5478
5718
|
metadata: U(i?.metadata)
|
|
5479
|
-
},
|
|
5719
|
+
}, ee = {
|
|
5480
5720
|
taxAmount: this.order?.taxAmount,
|
|
5481
5721
|
shippingAmount: this.order?.shippingAmount,
|
|
5482
5722
|
discountAmount: this.order?.discountAmount,
|
|
@@ -5484,7 +5724,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5484
5724
|
customer: this.customer || void 0,
|
|
5485
5725
|
billingAddress: this.billingAddress || void 0,
|
|
5486
5726
|
metadata: U(i?.metadata)
|
|
5487
|
-
}, _ = l.hasGooglePayProviders ? l.googlePayProviders.find((e) => e.providerId === i?.googlePayOptions?.providerId) || l.googlePayProviders[0] : null,
|
|
5727
|
+
}, _ = l.hasGooglePayProviders ? l.googlePayProviders.find((e) => e.providerId === i?.googlePayOptions?.providerId) || l.googlePayProviders[0] : null, v = {
|
|
5488
5728
|
gateway: i?.googlePayOptions?.gateway || _?.gateway || "",
|
|
5489
5729
|
googlePayGatewayMerchantId: i?.googlePayOptions?.googlePayGatewayMerchantId || _?.googlePayGatewayMerchantId || "",
|
|
5490
5730
|
googlePayMerchantId: i?.googlePayOptions?.googlePayMerchantId || _?.googlePayMerchantId || "",
|
|
@@ -5492,40 +5732,40 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5492
5732
|
buttonOptions: i?.googlePayOptions?.buttonOptions,
|
|
5493
5733
|
billingDetailsRequired: i?.googlePayOptions?.billingDetailsRequired,
|
|
5494
5734
|
metadata: U(i?.metadata)
|
|
5495
|
-
},
|
|
5496
|
-
lineItemLabel: i?.applePayOptions?.lineItemLabel ||
|
|
5497
|
-
displayName: i?.applePayOptions?.displayName ||
|
|
5498
|
-
domainName: i?.applePayOptions?.domainName ||
|
|
5499
|
-
merchantIdentifier: i?.applePayOptions?.merchantIdentifier ||
|
|
5500
|
-
providerId: i?.applePayOptions?.providerId ||
|
|
5501
|
-
providerType: i?.applePayOptions?.providerType ||
|
|
5502
|
-
countryCode: i?.applePayOptions?.countryCode ||
|
|
5503
|
-
merchantCapabilities: i?.applePayOptions?.merchantCapabilities ||
|
|
5504
|
-
supportedNetworks: i?.applePayOptions?.supportedNetworks ||
|
|
5505
|
-
supportedCountries: i?.applePayOptions?.supportedCountries ||
|
|
5506
|
-
applePayVersion: i?.applePayOptions?.applePayVersion ||
|
|
5735
|
+
}, y = l.hasApplePayProviders ? l.applePayProviders.find((e) => e.providerId === i?.applePayOptions?.providerId) || l.applePayProviders[0] : null, te = {
|
|
5736
|
+
lineItemLabel: i?.applePayOptions?.lineItemLabel || y?.lineItemLabel || "",
|
|
5737
|
+
displayName: i?.applePayOptions?.displayName || y?.displayName || "",
|
|
5738
|
+
domainName: i?.applePayOptions?.domainName || y?.domainName || "",
|
|
5739
|
+
merchantIdentifier: i?.applePayOptions?.merchantIdentifier || y?.merchantIdentifier || "",
|
|
5740
|
+
providerId: i?.applePayOptions?.providerId || y?.providerId || "",
|
|
5741
|
+
providerType: i?.applePayOptions?.providerType || y?.providerType || "",
|
|
5742
|
+
countryCode: i?.applePayOptions?.countryCode || y?.countryCode,
|
|
5743
|
+
merchantCapabilities: i?.applePayOptions?.merchantCapabilities || y?.merchantCapabilities,
|
|
5744
|
+
supportedNetworks: i?.applePayOptions?.supportedNetworks || y?.supportedNetworks,
|
|
5745
|
+
supportedCountries: i?.applePayOptions?.supportedCountries || y?.supportedCountries,
|
|
5746
|
+
applePayVersion: i?.applePayOptions?.applePayVersion || y?.applePayVersion,
|
|
5507
5747
|
clientParameters: o.clientParameters,
|
|
5508
5748
|
metadata: U(i?.metadata)
|
|
5509
5749
|
};
|
|
5510
|
-
if (!
|
|
5511
|
-
if (s(
|
|
5750
|
+
if (!d && l.hasCardProviders) {
|
|
5751
|
+
if (s(Y.card)) {
|
|
5512
5752
|
let n = e && document.getElementById(e) || null;
|
|
5513
|
-
this.initCardProcessor(n).addCard(n, this.getForm(n), c, t, r,
|
|
5753
|
+
this.initCardProcessor(n).addCard(n, this.getForm(n), c, t, r, m);
|
|
5514
5754
|
}
|
|
5515
|
-
} else if (!
|
|
5516
|
-
else if (!
|
|
5517
|
-
else if (!
|
|
5518
|
-
if (l.bnplProviders[0].providerType === "upi") s(
|
|
5755
|
+
} else if (!d && l.hasPaypalProviders) s(Y.paypal) && this.addPaypal(e, t, r, l.paypalProviders[0], h);
|
|
5756
|
+
else if (!d && l.hasPayToProviders) s(Y.payto) && this.addPayTo(e, t, l.payToProviders[0], g);
|
|
5757
|
+
else if (!d && l.hasBnplProviders && gn[l.bnplProviders[0].providerType]) {
|
|
5758
|
+
if (l.bnplProviders[0].providerType === "upi") s(Y.upi) && this.addUpi(e, t, l.bnplProviders[0].providerId, i?.upiOptions || {});
|
|
5519
5759
|
else {
|
|
5520
|
-
let n =
|
|
5521
|
-
n && s(n) && this.addCheckout(e, t, r, l.bnplProviders[0].providerType, l.bnplProviders[0].providerId,
|
|
5760
|
+
let n = wn(l.bnplProviders[0].providerType);
|
|
5761
|
+
n && s(n) && this.addCheckout(e, t, r, l.bnplProviders[0].providerType, l.bnplProviders[0].providerId, ee, {
|
|
5522
5762
|
...l.bnplProviders[0].options,
|
|
5523
5763
|
...l.bnplProviders[0].clientParameters
|
|
5524
5764
|
});
|
|
5525
5765
|
}
|
|
5526
|
-
} else if (!
|
|
5527
|
-
else if (!
|
|
5528
|
-
else if (
|
|
5766
|
+
} else if (!d && l.hasGooglePayProviders) s(Y.googlepay) && this.addGooglePay(e, t, r, l.googlePayProviders[0].providerId, v);
|
|
5767
|
+
else if (!d && u) s(Y.applepay) && this.addApplePay(e, t, r, te.providerId || "", te);
|
|
5768
|
+
else if (d) {
|
|
5529
5769
|
let n = () => {
|
|
5530
5770
|
window.postMessage({
|
|
5531
5771
|
status: "deactivate",
|
|
@@ -5550,12 +5790,12 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5550
5790
|
}, "*");
|
|
5551
5791
|
});
|
|
5552
5792
|
}, o = [];
|
|
5553
|
-
if (l.hasCardProviders && s(
|
|
5793
|
+
if (l.hasCardProviders && s(Y.card) && o.push({
|
|
5554
5794
|
title: "Card",
|
|
5555
5795
|
description: "Credit or Debit",
|
|
5556
|
-
icon:
|
|
5796
|
+
icon: lt,
|
|
5557
5797
|
render: (e) => {
|
|
5558
|
-
this.initCardProcessor(e).addCard(e, this.getForm(e), i?.cardProviderId || "", t, r,
|
|
5798
|
+
this.initCardProcessor(e).addCard(e, this.getForm(e), i?.cardProviderId || "", t, r, m);
|
|
5559
5799
|
},
|
|
5560
5800
|
activate: () => {
|
|
5561
5801
|
n(), window.postMessage({
|
|
@@ -5563,11 +5803,11 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5563
5803
|
component: "card"
|
|
5564
5804
|
}, "*");
|
|
5565
5805
|
}
|
|
5566
|
-
}), l.hasPaypalProviders && s(
|
|
5806
|
+
}), l.hasPaypalProviders && s(Y.paypal) && o.push({
|
|
5567
5807
|
title: "Paypal",
|
|
5568
|
-
icon:
|
|
5808
|
+
icon: ct,
|
|
5569
5809
|
render: (e) => {
|
|
5570
|
-
this.initPaypalProcessor(e).addPaypal(e, this.getForm(e), t, r, l.paypalProviders[0],
|
|
5810
|
+
this.initPaypalProcessor(e).addPaypal(e, this.getForm(e), t, r, l.paypalProviders[0], h);
|
|
5571
5811
|
},
|
|
5572
5812
|
activate: () => {
|
|
5573
5813
|
n(), window.postMessage({
|
|
@@ -5575,12 +5815,12 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5575
5815
|
component: "paypal"
|
|
5576
5816
|
}, "*");
|
|
5577
5817
|
}
|
|
5578
|
-
}), l.hasPayToProviders && s(
|
|
5579
|
-
if (A(
|
|
5818
|
+
}), l.hasPayToProviders && s(Y.payto)) {
|
|
5819
|
+
if (A(g.description)) o.push({
|
|
5580
5820
|
title: "PayTo",
|
|
5581
|
-
icon:
|
|
5821
|
+
icon: ft,
|
|
5582
5822
|
render: (e) => {
|
|
5583
|
-
this.initPayToProcessor(e).addPayTo(e, t, l.payToProviders[0],
|
|
5823
|
+
this.initPayToProcessor(e).addPayTo(e, t, l.payToProviders[0], g);
|
|
5584
5824
|
},
|
|
5585
5825
|
activate: () => {
|
|
5586
5826
|
n(), window.postMessage({
|
|
@@ -5595,9 +5835,9 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5595
5835
|
}
|
|
5596
5836
|
}
|
|
5597
5837
|
l.hasBnplProviders && l.bnplProviders.forEach((e) => {
|
|
5598
|
-
let a =
|
|
5838
|
+
let a = gn[e.providerType];
|
|
5599
5839
|
if (!a) return;
|
|
5600
|
-
let c =
|
|
5840
|
+
let c = wn(e.providerType);
|
|
5601
5841
|
if (!c || !s(c)) return;
|
|
5602
5842
|
let l = a.icon ? `${this.config.cssUrl}icons/${a.icon}.svg` : null;
|
|
5603
5843
|
o.push({
|
|
@@ -5605,7 +5845,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5605
5845
|
description: a.description || e.options?.terms?.replaceAll(/(\d+\.\d{3,})/g, (e, t) => parseFloat(t).toFixed(2)),
|
|
5606
5846
|
icon: l,
|
|
5607
5847
|
render: (n) => {
|
|
5608
|
-
e.providerType === "upi" ? this.addUpi(n.id, t, e.providerId, i?.upiOptions || {}) : this.initCheckoutProcessor(n).addCheckout(n, t, r, e.providerType, e.providerId,
|
|
5848
|
+
e.providerType === "upi" ? this.addUpi(n.id, t, e.providerId, i?.upiOptions || {}) : this.initCheckoutProcessor(n).addCheckout(n, t, r, e.providerType, e.providerId, ee, {
|
|
5609
5849
|
...e.options,
|
|
5610
5850
|
...e.clientParameters
|
|
5611
5851
|
});
|
|
@@ -5618,11 +5858,11 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5618
5858
|
}, "*");
|
|
5619
5859
|
}
|
|
5620
5860
|
});
|
|
5621
|
-
}), l.hasGooglePayProviders && s(
|
|
5861
|
+
}), l.hasGooglePayProviders && s(Y.googlepay) && o.push({
|
|
5622
5862
|
title: "Google Pay",
|
|
5623
|
-
icon:
|
|
5863
|
+
icon: ut,
|
|
5624
5864
|
render: (e) => {
|
|
5625
|
-
this.initGooglePayProcessor(e).addGooglePay(e, l.hasGooglePayProviders ? l.googlePayProviders[0].providerId : "", t, r,
|
|
5865
|
+
this.initGooglePayProcessor(e).addGooglePay(e, l.hasGooglePayProviders ? l.googlePayProviders[0].providerId : "", t, r, v);
|
|
5626
5866
|
},
|
|
5627
5867
|
activate: () => {
|
|
5628
5868
|
n(), window.postMessage({
|
|
@@ -5630,11 +5870,11 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5630
5870
|
component: "googlepay"
|
|
5631
5871
|
}, "*");
|
|
5632
5872
|
}
|
|
5633
|
-
}),
|
|
5873
|
+
}), u && s(Y.applepay) && o.push({
|
|
5634
5874
|
title: "Apple Pay",
|
|
5635
|
-
icon:
|
|
5875
|
+
icon: Tr,
|
|
5636
5876
|
render: (e) => {
|
|
5637
|
-
this.addApplePay(e.id, t, r,
|
|
5877
|
+
this.addApplePay(e.id, t, r, te.providerId || "", te);
|
|
5638
5878
|
},
|
|
5639
5879
|
activate: () => {
|
|
5640
5880
|
n(), window.postMessage({
|
|
@@ -5643,9 +5883,9 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5643
5883
|
}, "*");
|
|
5644
5884
|
}
|
|
5645
5885
|
});
|
|
5646
|
-
let c =
|
|
5886
|
+
let c = E({
|
|
5647
5887
|
el: document.getElementById(e),
|
|
5648
|
-
component:
|
|
5888
|
+
component: Ct,
|
|
5649
5889
|
props: { elements: o }
|
|
5650
5890
|
});
|
|
5651
5891
|
this.setDestroyDropIn(a, c.destroy);
|
|
@@ -5661,11 +5901,15 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5661
5901
|
});
|
|
5662
5902
|
let a = e && document.getElementById(e) || null;
|
|
5663
5903
|
if (!a) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
|
|
5664
|
-
if (!
|
|
5904
|
+
if (!k(t)) throw this.showErrorMessage(a, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5665
5905
|
if (!R(n)) throw this.showErrorMessage(a, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
|
|
5666
5906
|
return n &&= n.toUpperCase(), this._cleanUp(a), this._initForm(a), this.setAmount(t), this.setCurrency(n), this.initProcessors(a, t, n, r || "", "", { clickToPayEnabled: !1 }, L(this, "[addPaypal][initProcessors], callback", (e, o) => {
|
|
5667
5907
|
let s = o.paypalProviders[0] || r || "";
|
|
5668
|
-
s ? this.initPaypalProcessor(a).addPaypal(a, this.getForm(a), t, n, s, i) : (this.
|
|
5908
|
+
s ? this.initPaypalProcessor(a).addPaypal(a, this.getForm(a), t, n, s, i) : (this.paymentMethodStatus({
|
|
5909
|
+
paymentMethod: "paypal",
|
|
5910
|
+
status: "unavailable",
|
|
5911
|
+
reason: "no_provider"
|
|
5912
|
+
}), this.showErrorMessage(a, "Missing parameter: Provider Id"), this.userOnFailure?.({ error: "Missing parameter: Provider Id" }));
|
|
5669
5913
|
})), this;
|
|
5670
5914
|
}
|
|
5671
5915
|
addPayTo(e, t, n, r) {
|
|
@@ -5676,7 +5920,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5676
5920
|
});
|
|
5677
5921
|
let i = e && document.getElementById(e) || null;
|
|
5678
5922
|
if (!i) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
|
|
5679
|
-
if (!
|
|
5923
|
+
if (!k(t)) throw this.showErrorMessage(i, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5680
5924
|
this._cleanUp(i), this._initForm(i), this.setAmount(t), this.setCurrency("AUD");
|
|
5681
5925
|
let a = L(this, "[localAddPayTo]", (e, n) => {
|
|
5682
5926
|
this.log("[addPayTo, local]", {
|
|
@@ -5686,7 +5930,14 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5686
5930
|
}), this.initPayToProcessor(i).addPayTo(i, t, e, n);
|
|
5687
5931
|
});
|
|
5688
5932
|
return n && r?.maximumAmount && r?.description ? (a(n, r), this) : (this.initProcessors(i, t, "AUD", n || "", "", {}, L(this, "[addPayTo][initProcessors], callback", (e, t) => {
|
|
5689
|
-
if (!t.hasPayToProviders)
|
|
5933
|
+
if (!t.hasPayToProviders) {
|
|
5934
|
+
this.paymentMethodStatus({
|
|
5935
|
+
paymentMethod: "payto",
|
|
5936
|
+
status: "unavailable",
|
|
5937
|
+
reason: "no_provider"
|
|
5938
|
+
});
|
|
5939
|
+
return;
|
|
5940
|
+
}
|
|
5690
5941
|
let n = t.payToProvidersWithOptions[0];
|
|
5691
5942
|
a(n.providerId, {
|
|
5692
5943
|
maximumAmount: n.maximumAmount,
|
|
@@ -5704,7 +5955,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5704
5955
|
});
|
|
5705
5956
|
let a = e && document.getElementById(e) || null;
|
|
5706
5957
|
if (!a) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
|
|
5707
|
-
if (!
|
|
5958
|
+
if (!k(t)) throw this.showErrorMessage(a, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5708
5959
|
if (!R(n)) throw this.showErrorMessage(a, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
|
|
5709
5960
|
n &&= n.toUpperCase(), this._cleanUp(a), this._initForm(a), this.setAmount(t), this.setCurrency(n);
|
|
5710
5961
|
let o = L(this, "[localAddGooglePay]", (e, r) => {
|
|
@@ -5720,7 +5971,14 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5720
5971
|
o(r, i);
|
|
5721
5972
|
return;
|
|
5722
5973
|
}
|
|
5723
|
-
if (!t.hasGooglePayProviders)
|
|
5974
|
+
if (!t.hasGooglePayProviders) {
|
|
5975
|
+
this.paymentMethodStatus({
|
|
5976
|
+
paymentMethod: "googlepay",
|
|
5977
|
+
status: "unavailable",
|
|
5978
|
+
reason: "no_provider"
|
|
5979
|
+
});
|
|
5980
|
+
return;
|
|
5981
|
+
}
|
|
5724
5982
|
let n = r && t.googlePayProviders.find((e) => e.providerId === r) || t.googlePayProviders[0];
|
|
5725
5983
|
o(n.providerId, {
|
|
5726
5984
|
gateway: n.gateway,
|
|
@@ -5734,7 +5992,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5734
5992
|
})), this;
|
|
5735
5993
|
}
|
|
5736
5994
|
async isApplePayAvailable() {
|
|
5737
|
-
if (await
|
|
5995
|
+
if (await vr(), typeof window > "u" || !window.ApplePaySession) return !1;
|
|
5738
5996
|
try {
|
|
5739
5997
|
return ApplePaySession.canMakePayments() === !0;
|
|
5740
5998
|
} catch {
|
|
@@ -5743,7 +6001,11 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5743
6001
|
}
|
|
5744
6002
|
addApplePay(e, t, n, r, i) {
|
|
5745
6003
|
return this.isApplePayAvailable().then(L(this, "[addApplePay], available", (a) => {
|
|
5746
|
-
a ? this.renderApplePay(e, t, n, r, i) : this.log("Your browser does not support ApplePay")
|
|
6004
|
+
a ? this.renderApplePay(e, t, n, r, i) : (this.log("Your browser does not support ApplePay"), this.paymentMethodStatus({
|
|
6005
|
+
paymentMethod: "applepay",
|
|
6006
|
+
status: "unavailable",
|
|
6007
|
+
reason: "unsupported"
|
|
6008
|
+
}));
|
|
5747
6009
|
})).catch(() => {}), this;
|
|
5748
6010
|
}
|
|
5749
6011
|
renderApplePay(e, t, n, r, i) {
|
|
@@ -5755,7 +6017,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5755
6017
|
});
|
|
5756
6018
|
let a = e && document.getElementById(e) || null;
|
|
5757
6019
|
if (!a) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
|
|
5758
|
-
if (!
|
|
6020
|
+
if (!k(t)) throw this.showErrorMessage(a, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5759
6021
|
if (!R(n)) throw this.showErrorMessage(a, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
|
|
5760
6022
|
n &&= n.toUpperCase(), this._cleanUp(a), this._initForm(a), this.setAmount(t), this.setCurrency(n);
|
|
5761
6023
|
let o = L(this, "[localAddApplePay]", (e, r, i, o) => {
|
|
@@ -5772,7 +6034,14 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5772
6034
|
});
|
|
5773
6035
|
});
|
|
5774
6036
|
this.initProcessors(a, t, n, r || "", "", { clickToPayEnabled: !1 }, L(this, "[addApplePay][initProcessors], callback", (e, t) => {
|
|
5775
|
-
if (!t.hasApplePayProviders)
|
|
6037
|
+
if (!t.hasApplePayProviders) {
|
|
6038
|
+
this.paymentMethodStatus({
|
|
6039
|
+
paymentMethod: "applepay",
|
|
6040
|
+
status: "unavailable",
|
|
6041
|
+
reason: "no_provider"
|
|
6042
|
+
});
|
|
6043
|
+
return;
|
|
6044
|
+
}
|
|
5776
6045
|
let n = r && t.applePayProviders.find((e) => e.providerId === r) || t.applePayProviders[0];
|
|
5777
6046
|
o(n.providerId, n.providerType, {
|
|
5778
6047
|
lineItemLabel: i?.lineItemLabel || n.lineItemLabel,
|
|
@@ -5855,7 +6124,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5855
6124
|
options: u
|
|
5856
6125
|
});
|
|
5857
6126
|
let d = e && document.getElementById(e) || null;
|
|
5858
|
-
if (!
|
|
6127
|
+
if (!k(o)) throw this.showErrorMessage(d, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5859
6128
|
if (!R(s)) throw this.showErrorMessage(d, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
|
|
5860
6129
|
return s &&= s.toUpperCase(), this._cleanUp(d), this._initForm(d), this.setAmount(o), this.setCurrency(s), t = l(t), this.getPaymentOptions(o, s, L(this, "[addThreeDsWithFullParameters][getPaymentOptions], callback", (e) => {
|
|
5861
6130
|
e.hasThreeDsProviders ? this.add3DsProcessor(d, e.threeDsProviders[0].providerId, e.threeDsProviders[0].providerType, "", e.threeDsProviders[0].clientParameters || {}, L(this, "[addThreeDsWithFullParameters][add3DsProcessor], onload", () => {
|
|
@@ -5865,7 +6134,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5865
6134
|
cardholder: i,
|
|
5866
6135
|
ccv: c
|
|
5867
6136
|
}), this.threeDsProcessor?.threeDSInvoke(d, !!u?.requireChallenge, (e) => {
|
|
5868
|
-
|
|
6137
|
+
Ei(), this.log("[threeDSInvoke], postAuthData", e), this.userOnSuccess?.({ threeDSServerTransID: e.threeDSServerTransID });
|
|
5869
6138
|
});
|
|
5870
6139
|
}), L(this, "[addThreeDsWithFullParameters][add3DsProcessor], onerror", () => {
|
|
5871
6140
|
this.log(`Cannot load 3DS provider (${e.threeDsProviders[0].providerType})`), this.userOnSuccess?.({});
|
|
@@ -5885,11 +6154,11 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5885
6154
|
metadata: d,
|
|
5886
6155
|
options: f
|
|
5887
6156
|
});
|
|
5888
|
-
let
|
|
5889
|
-
if (!A(t)) throw this.showErrorMessage(
|
|
5890
|
-
if (!
|
|
6157
|
+
let p = e && document.getElementById(e) || null;
|
|
6158
|
+
if (!A(t)) throw this.showErrorMessage(p, "Missing parameter: providerId"), this.userOnFailure?.({ error: "Missing parameter: Provider Id" }), TypeError("Missing parameter: providerId");
|
|
6159
|
+
if (!k(c)) throw this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5891
6160
|
if (!R(u)) throw this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
|
|
5892
|
-
return u &&= u.toUpperCase(), this._cleanUp(
|
|
6161
|
+
return u &&= u.toUpperCase(), this._cleanUp(p), this._initForm(p), this.setAmount(c), this.setCurrency(u), n = l(n), this.initProcessors(p, c, u, t, "", {
|
|
5893
6162
|
createNetworkToken: f?.createNetworkToken,
|
|
5894
6163
|
clickToPayEnabled: !1
|
|
5895
6164
|
}, L(this, "[tokeniseWith3Ds][initProcessors], callback", (e, r) => {
|
|
@@ -5898,11 +6167,11 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5898
6167
|
expiryDate: i,
|
|
5899
6168
|
cardholder: a,
|
|
5900
6169
|
ccv: o
|
|
5901
|
-
}), this.runFraudGate(
|
|
6170
|
+
}), this.runFraudGate(p, (r, s) => {
|
|
5902
6171
|
let c = (e) => {
|
|
5903
6172
|
this.initCardProcessor(null).tokeniseCard(t, n, i, a, o, U(d), e, f, r);
|
|
5904
6173
|
};
|
|
5905
|
-
s ? c(s) : this.threeDsOrTokenise(
|
|
6174
|
+
s ? c(s) : this.threeDsOrTokenise(p, e, n, i, a, o, f, c);
|
|
5906
6175
|
});
|
|
5907
6176
|
})), this;
|
|
5908
6177
|
}
|
|
@@ -5913,7 +6182,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5913
6182
|
cardholder: i,
|
|
5914
6183
|
ccv: a
|
|
5915
6184
|
}), this.threeDsProcessor?.threeDSInvoke(e, !!o?.requireChallenge, (e) => {
|
|
5916
|
-
|
|
6185
|
+
Ei(), this.log("[threeDSInvoke], postAuthData", e), t.threeDsProviderType === "payglocal" ? this.userOnSuccess?.({ threeDSServerTransID: e.threeDSServerTransID }) : s(e.threeDSServerTransID);
|
|
5917
6186
|
})) : (this.log("threeDsProcessor NOT FOUND"), s());
|
|
5918
6187
|
}
|
|
5919
6188
|
tokeniseCard(e, t, n, i, a, o, s, c) {
|
|
@@ -5924,7 +6193,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5924
6193
|
cardHolderName: i,
|
|
5925
6194
|
options: c,
|
|
5926
6195
|
metadata: o
|
|
5927
|
-
}), t = l(t), c?.amount &&
|
|
6196
|
+
}), t = l(t), c?.amount && k(c.amount) && this.setAmount(c.amount), c?.currency && R(c.currency) && this.setCurrency(c.currency.toUpperCase());
|
|
5928
6197
|
let u = (r, l) => {
|
|
5929
6198
|
this.initCardProcessor(null).tokeniseCard(e, t, n, i, a, U(o), l || s, c, r);
|
|
5930
6199
|
};
|
|
@@ -5948,7 +6217,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5948
6217
|
currency: r,
|
|
5949
6218
|
options: a
|
|
5950
6219
|
}), !A(e)) throw this.userOnFailure?.({ error: "Missing parameter: Token Id" }), TypeError("Missing parameter: tokenId");
|
|
5951
|
-
if (!
|
|
6220
|
+
if (!k(n)) throw this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
5952
6221
|
if (!R(r)) throw this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
|
|
5953
6222
|
return r &&= r.toUpperCase(), this.setAmount(n), this.setCurrency(r), this.initProcessors(null, n, r, "", e, { clickToPayEnabled: !1 }, L(this, "[addThreeDsWithToken][initProcessors], callback", () => {
|
|
5954
6223
|
this.fraudProcessor?.setPaymentReference({ tokenId: e }), this.runFraudGate(null, (n, r) => {
|
|
@@ -5958,7 +6227,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5958
6227
|
}
|
|
5959
6228
|
threeDsWithToken(e, t, n, r) {
|
|
5960
6229
|
this.threeDsProcessor ? (this.threeDsProcessor?.setEmail(t), this.threeDsProcessor?.setTokenId(e), this.threeDsProcessor?.threeDSInvoke(null, !!r?.requireChallenge, (e) => {
|
|
5961
|
-
|
|
6230
|
+
Ei(), this.log("[threeDSInvoke], postAuthData", e), this.userOnSuccess?.({ threeDSServerTransID: e.threeDSServerTransID }), this.threeDsProcessor?.updateTokenExternal3dsData(e.externalThreeDsData);
|
|
5962
6231
|
}), this.threeDsProcessor?.setPaymentInfo({
|
|
5963
6232
|
cardNumber: "",
|
|
5964
6233
|
expiryDate: "",
|
|
@@ -5967,11 +6236,15 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5967
6236
|
})) : this.userOnFailure?.({ error: "Cannot load 3DS provider" });
|
|
5968
6237
|
}
|
|
5969
6238
|
runFraudGate(e, t) {
|
|
5970
|
-
|
|
5971
|
-
onShow:
|
|
6239
|
+
Un(this.cardFraudProcessor, this.fraudManageOrder, e, {
|
|
6240
|
+
onShow: Ei,
|
|
6241
|
+
onProgress: this.threeDsProgress.bind(this),
|
|
5972
6242
|
log: this.log.bind(this)
|
|
5973
6243
|
}).then(L(this, "[runFraudGate]", (n) => {
|
|
5974
|
-
"error" in n ? (
|
|
6244
|
+
"error" in n ? (Ei(), this.log("[runFraudGate], failure", n), this.showErrorMessage(e, n.error), this.userOnFailure?.({
|
|
6245
|
+
error: n.error,
|
|
6246
|
+
...n.reason && { errorDetails: { reason: n.reason } }
|
|
6247
|
+
})) : t(n.fraudCheckResult, n.threeDSServerTransID);
|
|
5975
6248
|
}));
|
|
5976
6249
|
}
|
|
5977
6250
|
getPaymentOptions(e, t, n, r) {
|
|
@@ -5990,7 +6263,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
5990
6263
|
let r = JSON.parse(t);
|
|
5991
6264
|
this.log("[getPaymentOptions], success", r), this.paymentOptions[i] = r, n?.(r);
|
|
5992
6265
|
});
|
|
5993
|
-
this.httpInvoker?.invoke(
|
|
6266
|
+
this.httpInvoker?.invoke(Oi(this.config.apiUrl)[Di.PROVIDERS_INFO].url + `?amount=${e}¤cy=${t}`, Oi(this.config.apiUrl)[Di.PROVIDERS_INFO].method, {}, o, a);
|
|
5994
6267
|
}
|
|
5995
6268
|
getProviderInfo(e, t, n, r, i, a) {
|
|
5996
6269
|
this.log("[getProviderInfo], request", {
|
|
@@ -6011,17 +6284,17 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
6011
6284
|
let n = JSON.parse(t);
|
|
6012
6285
|
this.log("[getProviderInfo], data", n), this.paymentOptions[o] = n, i(n);
|
|
6013
6286
|
});
|
|
6014
|
-
this.httpInvoker?.invoke(
|
|
6287
|
+
this.httpInvoker?.invoke(Oi(this.config.apiUrl, e, r)[Di.PROVIDER_INFO].url + `?amount=${t}¤cy=${n}`, Oi(this.config.apiUrl, e, r)[Di.PROVIDER_INFO].method, {}, c, s);
|
|
6015
6288
|
}
|
|
6016
6289
|
setAmount(e) {
|
|
6017
6290
|
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({
|
|
6018
|
-
status:
|
|
6291
|
+
status: ce,
|
|
6019
6292
|
amount: this.amount
|
|
6020
6293
|
}, "*")), this;
|
|
6021
6294
|
}
|
|
6022
6295
|
setCurrency(e) {
|
|
6023
6296
|
return e === this.currency || (e &&= e.toUpperCase(), this.log("[setCurrency]", e), this.currency = e, this.cardProcessor?.setCurrency(e), this.threeDsProcessor?.setCurrency(e), this.secondaryThreeDsProcessor?.setCurrency(e), this.googlePayProcessor?.setCurrency(e), this.applePayProcessor?.setCurrency(e), this.paymentMethodProcessor?.setCurrency(e), window.postMessage({
|
|
6024
|
-
status:
|
|
6297
|
+
status: nt,
|
|
6025
6298
|
currency: e
|
|
6026
6299
|
}, "*")), this;
|
|
6027
6300
|
}
|
|
@@ -6037,6 +6310,12 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
6037
6310
|
onLoaded(e) {
|
|
6038
6311
|
return this.log("[onLoaded]"), this.userOnLoaded = e, this;
|
|
6039
6312
|
}
|
|
6313
|
+
onPaymentMethodStatus(e) {
|
|
6314
|
+
return this.log("[onPaymentMethodStatus]"), this.userOnPaymentMethodStatus = e, this;
|
|
6315
|
+
}
|
|
6316
|
+
onThreeDsProgress(e) {
|
|
6317
|
+
return this.log("[onThreeDsProgress]"), this.userOnThreeDsProgress = e, this;
|
|
6318
|
+
}
|
|
6040
6319
|
onValidationStatusChange(e) {
|
|
6041
6320
|
return this.log("[onValidationStatusChange]"), this.userOnValidationStatusChange = e, this;
|
|
6042
6321
|
}
|
|
@@ -6049,19 +6328,19 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
6049
6328
|
}
|
|
6050
6329
|
setBillingAddress(e) {
|
|
6051
6330
|
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({
|
|
6052
|
-
status:
|
|
6331
|
+
status: he,
|
|
6053
6332
|
address: e
|
|
6054
6333
|
}, "*"), this;
|
|
6055
6334
|
}
|
|
6056
6335
|
setCustomerInfo(e) {
|
|
6057
6336
|
return this.log("[setCustomerInfo]", e), e?.phoneNumber && (e.phoneNumber = e.phoneNumber.replace(/[^0-9+]/g, "")), this.customer = { ...e }, this.cardProcessor?.setCustomerInfo(this.customer), this.googlePayProcessor?.setCustomerInfo(this.customer), this.applePayProcessor?.setCustomerInfo(this.customer), this.fraudProcessor?.setCustomerInfo(this.customer), this.paymentMethodProcessor?.setCustomerInfo(this.customer), window.postMessage({
|
|
6058
|
-
status:
|
|
6337
|
+
status: h,
|
|
6059
6338
|
customer: e
|
|
6060
6339
|
}, "*"), this;
|
|
6061
6340
|
}
|
|
6062
6341
|
setOrderInfo(e) {
|
|
6063
6342
|
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({
|
|
6064
|
-
status:
|
|
6343
|
+
status: re,
|
|
6065
6344
|
order: e
|
|
6066
6345
|
}, "*"), this;
|
|
6067
6346
|
}
|
|
@@ -6093,19 +6372,19 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
6093
6372
|
this.initProcessorsRunning = !0;
|
|
6094
6373
|
let s = () => {
|
|
6095
6374
|
this.initProcessorsRunning = !1, this.initProcessorsQueue.shift()?.();
|
|
6096
|
-
}, c = {}, l = "", u = "", d = !1, f = {}, p = "", m = "", h = {}, g = "",
|
|
6375
|
+
}, c = {}, l = "", u = "", d = !1, f = {}, p = "", m = "", h = {}, g = "", ee = "", _ = {}, v = !1, y = !1, te = (e) => {
|
|
6097
6376
|
this.getProviderInfo(r, t, n, i || "", L(this, "[getProviderInfo], success", (t) => {
|
|
6098
6377
|
c = { ...t }, !v && t.threeDsProviderId && (p = t.threeDsProviderId, m = t.threeDsProviderType, h = t.threeDsClientParameters || {}), e();
|
|
6099
6378
|
}), L(this, "[getProviderInfo], error", (t) => {
|
|
6100
6379
|
this.log("Unable to get provider information", t), e();
|
|
6101
6380
|
}));
|
|
6102
|
-
},
|
|
6103
|
-
this.fraudProcessor = null, this.fraudManageOrder = null, this.skipCardFraud =
|
|
6381
|
+
}, ne = L(this, "[initFraudProcessor]", (e, t, n, r, i) => {
|
|
6382
|
+
this.fraudProcessor = null, this.fraudManageOrder = null, this.skipCardFraud = Lt(m), this.cardProcessor?.addFraudProcessor(null), this.paypalProcessor?.addFraudProcessor(null), this.googlePayProcessor?.addFraudProcessor(null), this.applePayProcessor?.addFraudProcessor(null), this.paymentMethodProcessor?.addFraudProcessor(null, null), !e || !t ? i() : this.addFraudProcessor(e, t, n, r, {}, L(this, "[addFraudProcessor], success", () => {
|
|
6104
6383
|
i();
|
|
6105
6384
|
}), L(this, "[addFraudProcessor], error", () => {
|
|
6106
6385
|
this.log("Error loading fraud provider", t), i();
|
|
6107
6386
|
}));
|
|
6108
|
-
}),
|
|
6387
|
+
}), re = L(this, "[initThreeDsProcessor]", (t, n, i) => {
|
|
6109
6388
|
!t || !n ? i() : this.add3DsProcessor(e, t, n, r, {
|
|
6110
6389
|
...c.clientParameters,
|
|
6111
6390
|
...h
|
|
@@ -6114,16 +6393,16 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
6114
6393
|
}), L(this, "[add3DsProcessor], error", () => {
|
|
6115
6394
|
this.log("Error loading 3ds provider", n), i();
|
|
6116
6395
|
}));
|
|
6117
|
-
}),
|
|
6396
|
+
}), ie = L(this, "[initSecondaryThreeDsProcessor]", (t, n, i) => {
|
|
6118
6397
|
!t || !n ? i() : this.addSecondary3DsProcessor(e, t, n, r, {
|
|
6119
6398
|
...c.clientParameters,
|
|
6120
|
-
...
|
|
6399
|
+
..._
|
|
6121
6400
|
}, L(this, "[addSecondary3DsProcessor], success", () => {
|
|
6122
6401
|
i();
|
|
6123
6402
|
}), L(this, "[addSecondary3DsProcessor], error", () => {
|
|
6124
6403
|
this.log("Error loading 3ds provider", n), i();
|
|
6125
6404
|
}));
|
|
6126
|
-
}),
|
|
6405
|
+
}), b = L(this, "[callCallback]", (e, t) => {
|
|
6127
6406
|
try {
|
|
6128
6407
|
o(e, t);
|
|
6129
6408
|
} finally {
|
|
@@ -6131,22 +6410,22 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
6131
6410
|
}
|
|
6132
6411
|
});
|
|
6133
6412
|
this.getPaymentOptions(t, n, L(this, "[getPaymentOptions], callback", (t) => {
|
|
6134
|
-
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 && (p = t.threeDsProviders[0].providerId, m = t.threeDsProviders[0].providerType, h = t.threeDsProviders[0].clientParameters || {}), !v && t.allThreeDsProviders?.[0]?.providerId && (g = t.allThreeDsProviders[0].providerId,
|
|
6413
|
+
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 && (p = t.threeDsProviders[0].providerId, m = t.threeDsProviders[0].providerType, h = t.threeDsProviders[0].clientParameters || {}), !v && t.allThreeDsProviders?.[0]?.providerId && (g = t.allThreeDsProviders[0].providerId, ee = t.allThreeDsProviders[0].providerType, _ = t.allThreeDsProviders[0].clientParameters || {}), !y && t.hasFraudProviders && (l = t.fraudProviders[0].providerId, u = t.fraudProviders[0].providerType, d = t.fraudProviders[0].stopPaymentOnFailure, f = t.fraudProviders[0].clientParameters || {}), t.clickToPayEnabled && a?.clickToPayEnabled !== !1 && this.initClickToPayProcessor(e, {
|
|
6135
6414
|
...t.clickToPayOptions,
|
|
6136
6415
|
...a?.clickToPayOptions,
|
|
6137
6416
|
tokenAuthenticationEnabled: !!a?.tokenAuthenticationEnabled,
|
|
6138
6417
|
networkTokenOptions: a?.networkTokenOptions
|
|
6139
|
-
}), !r && !i ?
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6418
|
+
}), !r && !i ? ne(l, u, d, f, () => {
|
|
6419
|
+
re(p, m, () => {
|
|
6420
|
+
ie(g, ee, () => {
|
|
6421
|
+
b(c, t);
|
|
6143
6422
|
});
|
|
6144
6423
|
});
|
|
6145
|
-
}) :
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6424
|
+
}) : te(() => {
|
|
6425
|
+
ne(l, u, d, f, () => {
|
|
6426
|
+
re(p, m, () => {
|
|
6427
|
+
ie(g, ee, () => {
|
|
6428
|
+
b(c, t);
|
|
6150
6429
|
});
|
|
6151
6430
|
});
|
|
6152
6431
|
});
|
|
@@ -6160,10 +6439,10 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
6160
6439
|
billingAddress: this.billingAddress,
|
|
6161
6440
|
customer: this.customer,
|
|
6162
6441
|
order: this.order
|
|
6163
|
-
}), o?.()) :
|
|
6442
|
+
}), o?.()) : Ti(t).then(L(this, "[addFraudProcessor], onload", (s) => {
|
|
6164
6443
|
this.log(`Loading ${t}...`, s);
|
|
6165
6444
|
let c = s.default(i);
|
|
6166
|
-
c?.getFraudCheckData && (this.fraudProcessor = new
|
|
6445
|
+
c?.getFraudCheckData && (this.fraudProcessor = new Rn(this.log.bind(this), {
|
|
6167
6446
|
debug: this.debug,
|
|
6168
6447
|
environment: this.environment,
|
|
6169
6448
|
publicKey: this.publicKey,
|
|
@@ -6192,7 +6471,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
6192
6471
|
} : t.threeDsProviders?.find((e) => e.providerId === t.required3dsProvider) || t.threeDsProviders?.[0];
|
|
6193
6472
|
}
|
|
6194
6473
|
add3DsProcessor(e, t, r, i, a, o, s) {
|
|
6195
|
-
this.log("[add3DsProcessor]", t, r),
|
|
6474
|
+
this.log("[add3DsProcessor]", t, r), wi(r).then(L(this, "[add3DsProcessor], onload", (s) => {
|
|
6196
6475
|
this.log(`Loading ${r}...`, s);
|
|
6197
6476
|
let c = s.default(this.log.bind(this), e, {
|
|
6198
6477
|
environment: this.environment,
|
|
@@ -6216,15 +6495,19 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
6216
6495
|
this.log("[threeDsProcessor], success", e), this.userOnSuccess?.(e);
|
|
6217
6496
|
},
|
|
6218
6497
|
onFailure: (e) => {
|
|
6219
|
-
this.log("[threeDsProcessor], failure", e), this.userOnFailure?.({
|
|
6220
|
-
|
|
6498
|
+
this.log("[threeDsProcessor], failure", e), this.userOnFailure?.({
|
|
6499
|
+
error: oe,
|
|
6500
|
+
errorDetails: { reason: e.error }
|
|
6501
|
+
});
|
|
6502
|
+
},
|
|
6503
|
+
onProgress: this.threeDsProgress.bind(this)
|
|
6221
6504
|
}), 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), c.setThreeDsProcessor(this.threeDsProcessor), o?.());
|
|
6222
6505
|
})).catch(L(this, "[add3DsProcessor], onerror", (n) => {
|
|
6223
6506
|
this.log(`Error loading ${r}`, n), r === "default" ? s?.() : this.add3DsProcessor(e, t, "default", i, a, o, s);
|
|
6224
6507
|
}));
|
|
6225
6508
|
}
|
|
6226
6509
|
addSecondary3DsProcessor(e, t, r, i, a, o, s) {
|
|
6227
|
-
this.log("[addSecondary3DsProcessor]", t, r),
|
|
6510
|
+
this.log("[addSecondary3DsProcessor]", t, r), wi(r).then(L(this, "[addSecondary3DsProcessor], onload", (s) => {
|
|
6228
6511
|
this.log(`Loading ${r}...`, s);
|
|
6229
6512
|
let c = s.default(this.log.bind(this), e, {
|
|
6230
6513
|
environment: this.environment,
|
|
@@ -6248,8 +6531,12 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
6248
6531
|
this.log("[secondaryThreeDsProcessor], success", e), this.userOnSuccess?.(e);
|
|
6249
6532
|
},
|
|
6250
6533
|
onFailure: (e) => {
|
|
6251
|
-
this.log("[secondaryThreeDsProcessor], failure", e), this.userOnFailure?.({
|
|
6252
|
-
|
|
6534
|
+
this.log("[secondaryThreeDsProcessor], failure", e), this.userOnFailure?.({
|
|
6535
|
+
error: oe,
|
|
6536
|
+
errorDetails: { reason: e.error }
|
|
6537
|
+
});
|
|
6538
|
+
},
|
|
6539
|
+
onProgress: this.threeDsProgress.bind(this)
|
|
6253
6540
|
}), 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), c.setThreeDsProcessor(this.secondaryThreeDsProcessor), o?.());
|
|
6254
6541
|
})).catch(L(this, "[addSecondary3DsProcessor], onerror", (n) => {
|
|
6255
6542
|
this.log(`Error loading ${r}`, n), r === "default" ? s?.() : this.addSecondary3DsProcessor(e, t, "default", i, a, o, s);
|
|
@@ -6276,7 +6563,7 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
6276
6563
|
if (!r) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
|
|
6277
6564
|
if (!A(t)) throw this.showErrorMessage(r, "Missing parameter: customerId"), this.userOnFailure?.({ error: "Missing parameter: Customer Id" }), TypeError("Missing parameter: customerId");
|
|
6278
6565
|
let i = Number(n?.amount) || 0, a = n?.currency || "";
|
|
6279
|
-
if (i && !
|
|
6566
|
+
if (i && !k(i)) throw this.showErrorMessage(r, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
|
|
6280
6567
|
return this._cleanUp(r), this._initForm(r), this.setAmount(i), this.setCurrency(a), this.initProcessors(r, i, a, "", "", {
|
|
6281
6568
|
clickToPayEnabled: !1,
|
|
6282
6569
|
tokenAuthenticationEnabled: n?.tokenAuthenticationEnabled
|
|
@@ -6293,14 +6580,14 @@ var { hideSpinner: vi } = Re(), yi = {
|
|
|
6293
6580
|
e.setAmount(this.amount), e.setCurrency(this.currency), e.setCustomerInfo(this.customer), e.setBillingAddress(this.billingAddress), e.setOrderInfo(this.order), e.setGeolocation(this.geolocation), e.setOnValidate(this.userOnValidate);
|
|
6294
6581
|
}
|
|
6295
6582
|
filterAllowedPaymentTypes(e) {
|
|
6296
|
-
let t = [], n = Object.values(
|
|
6583
|
+
let t = [], n = Object.values(Y);
|
|
6297
6584
|
return Array.isArray(e) || (e = [e]), (e || []).forEach((e) => {
|
|
6298
6585
|
let r = String(e).toLowerCase().replace(/[^a-z]/g, "");
|
|
6299
6586
|
n.includes(r) && t.push(r);
|
|
6300
6587
|
}), t;
|
|
6301
6588
|
}
|
|
6302
6589
|
};
|
|
6303
|
-
F([I], $.prototype, "init", null), F([I], $.prototype, "execute", null), F([I], $.prototype, "messageHandler", null), F([I], $.prototype, "initCardProcessor", null), F([I], $.prototype, "initClickToPayProcessor", null), F([I], $.prototype, "initPaypalProcessor", null), F([I], $.prototype, "initCheckoutProcessor", null), F([I], $.prototype, "initGooglePayProcessor", null), F([I], $.prototype, "initApplePayProcessor", null), F([I], $.prototype, "initPayToProcessor", null), F([I], $.prototype, "loadCss", null), F([I], $.prototype, "_cleanUp", null), F([I], $.prototype, "getForm", null), F([I], $.prototype, "getSubmit", null), F([I], $.prototype, "getInput", null), F([I], $.prototype, "_initForm", null), F([I], $.prototype, "_setToken", null), F([I], $.prototype, "getSubmitFormHandler", null), F([I], $.prototype, "getDestroyDropIn", null), F([I], $.prototype, "setDestroyDropIn", null), F([I], $.prototype, "addCard", null), F([I], $.prototype, "addCardLeastCost", null), F([I], $.prototype, "addDropIn", null), F([I], $.prototype, "addPaypal", null), F([I], $.prototype, "addPayTo", null), F([I], $.prototype, "addGooglePay", null), F([I], $.prototype, "addApplePay", null), F([I], $.prototype, "addCheckout", null), F([I], $.prototype, "addUpi", null), F([I], $.prototype, "addThreeDsWithFullParameters", null), F([I], $.prototype, "tokeniseWith3Ds", null), F([I], $.prototype, "threeDsOrTokenise", null), F([I], $.prototype, "tokeniseCard", null), F([I], $.prototype, "addThreeDsWithToken", null), F([I], $.prototype, "threeDsWithToken", null), F([I], $.prototype, "getPaymentOptions", null), F([I], $.prototype, "getProviderInfo", null), F([I], $.prototype, "setAmount", null), F([I], $.prototype, "setCurrency", null), F([I], $.prototype, "onSuccess", null), F([I], $.prototype, "onFailure", null), F([I], $.prototype, "onLoaded", null), F([I], $.prototype, "onValidationStatusChange", null), F([I], $.prototype, "onValidate", null), F([I], $.prototype, "showErrorMessage", null), F([I], $.prototype, "setBillingAddress", null), F([I], $.prototype, "setCustomerInfo", null), F([I], $.prototype, "setOrderInfo", null), F([I], $.prototype, "setGeolocation", null), F([I], $.prototype, "checkGeolocation", null), F([I], $.prototype, "initProcessors", null), F([I], $.prototype, "addFraudProcessor", null), F([I], $.prototype, "resolveThreeDsProvider", null), F([I], $.prototype, "add3DsProcessor", null), F([I], $.prototype, "addSecondary3DsProcessor", null), F([I], $.prototype, "preloadClickToPay", null), F([I], $.prototype, "addSavedPaymentMethods", null);
|
|
6590
|
+
F([I], $.prototype, "init", null), F([I], $.prototype, "execute", null), F([I], $.prototype, "messageHandler", null), F([I], $.prototype, "initCardProcessor", null), F([I], $.prototype, "initClickToPayProcessor", null), F([I], $.prototype, "initPaypalProcessor", null), F([I], $.prototype, "initCheckoutProcessor", null), F([I], $.prototype, "initGooglePayProcessor", null), F([I], $.prototype, "initApplePayProcessor", null), F([I], $.prototype, "initPayToProcessor", null), F([I], $.prototype, "loadCss", null), F([I], $.prototype, "_cleanUp", null), F([I], $.prototype, "getForm", null), F([I], $.prototype, "getSubmit", null), F([I], $.prototype, "getInput", null), F([I], $.prototype, "_initForm", null), F([I], $.prototype, "_setToken", null), F([I], $.prototype, "getSubmitFormHandler", null), F([I], $.prototype, "getDestroyDropIn", null), F([I], $.prototype, "setDestroyDropIn", null), F([I], $.prototype, "addCard", null), F([I], $.prototype, "addCardLeastCost", null), F([I], $.prototype, "addDropIn", null), F([I], $.prototype, "addPaypal", null), F([I], $.prototype, "addPayTo", null), F([I], $.prototype, "addGooglePay", null), F([I], $.prototype, "addApplePay", null), F([I], $.prototype, "addCheckout", null), F([I], $.prototype, "addUpi", null), F([I], $.prototype, "addThreeDsWithFullParameters", null), F([I], $.prototype, "tokeniseWith3Ds", null), F([I], $.prototype, "threeDsOrTokenise", null), F([I], $.prototype, "tokeniseCard", null), F([I], $.prototype, "addThreeDsWithToken", null), F([I], $.prototype, "threeDsWithToken", null), F([I], $.prototype, "getPaymentOptions", null), F([I], $.prototype, "getProviderInfo", null), F([I], $.prototype, "setAmount", null), F([I], $.prototype, "setCurrency", null), F([I], $.prototype, "onSuccess", null), F([I], $.prototype, "onFailure", null), F([I], $.prototype, "onLoaded", null), F([I], $.prototype, "onPaymentMethodStatus", null), F([I], $.prototype, "onThreeDsProgress", null), F([I], $.prototype, "onValidationStatusChange", null), F([I], $.prototype, "onValidate", null), F([I], $.prototype, "showErrorMessage", null), F([I], $.prototype, "setBillingAddress", null), F([I], $.prototype, "setCustomerInfo", null), F([I], $.prototype, "setOrderInfo", null), F([I], $.prototype, "setGeolocation", null), F([I], $.prototype, "checkGeolocation", null), F([I], $.prototype, "initProcessors", null), F([I], $.prototype, "addFraudProcessor", null), F([I], $.prototype, "resolveThreeDsProvider", null), F([I], $.prototype, "add3DsProcessor", null), F([I], $.prototype, "addSecondary3DsProcessor", null), F([I], $.prototype, "preloadClickToPay", null), F([I], $.prototype, "addSavedPaymentMethods", null);
|
|
6304
6591
|
// src/sdk/main.ts
|
|
6305
|
-
var
|
|
6306
|
-
export {
|
|
6592
|
+
var ki = new $();
|
|
6593
|
+
export { ki as default };
|