@spot-flow/checkout-inline-js 0.1.36 → 0.1.38-dev.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/dist/checkout-inline.es.js +105 -109
- package/dist/checkout-inline.js +20 -21
- package/dist/utils/redirectTo.d.ts +1 -1
- package/package.json +1 -1
|
@@ -138,7 +138,7 @@ const Oe = (n, e, i) => {
|
|
|
138
138
|
} catch (s) {
|
|
139
139
|
throw s instanceof X ? console.error(`FetchError: ${s.message} (status: ${s.status})`) : s instanceof De ? console.error(`AuthorizationError: ${s.message}`) : console.error(`UnexpectedError: ${s}`), s;
|
|
140
140
|
}
|
|
141
|
-
},
|
|
141
|
+
}, cn = async (n, e, i, t, s) => {
|
|
142
142
|
try {
|
|
143
143
|
const o = Oe(n, t), a = await fetch(
|
|
144
144
|
`${fe(Ue, s)}/payments/verify?reference=${e}`,
|
|
@@ -631,9 +631,9 @@ const Yt = [
|
|
|
631
631
|
Discover: [16],
|
|
632
632
|
UnionPay: [16],
|
|
633
633
|
Verve: [16, 17, 18, 19]
|
|
634
|
-
},
|
|
634
|
+
}, ln = class ln {
|
|
635
635
|
};
|
|
636
|
-
h(
|
|
636
|
+
h(ln, "createToast", (e, i) => {
|
|
637
637
|
const t = document.createElement("div");
|
|
638
638
|
t.classList.add("toast", i, "grid", "grid-cols-[1fr_auto]");
|
|
639
639
|
const s = document.createElement("span");
|
|
@@ -651,20 +651,20 @@ h(rn, "createToast", (e, i) => {
|
|
|
651
651
|
</svg>
|
|
652
652
|
<span id="custom-toast-msg">${e}</span>` : e, t.appendChild(s);
|
|
653
653
|
const o = document.createElement("span");
|
|
654
|
-
return o.textContent = "×", o.classList.add("close-btn", "opacity-0"), o.onclick = () =>
|
|
655
|
-
}), h(
|
|
654
|
+
return o.textContent = "×", o.classList.add("close-btn", "opacity-0"), o.onclick = () => ln.removeToast(t), t.appendChild(o), t;
|
|
655
|
+
}), h(ln, "showToast", (e, i, t = 3e3) => {
|
|
656
656
|
const s = document.getElementById("toast-container");
|
|
657
657
|
if (s) {
|
|
658
|
-
const o =
|
|
659
|
-
s.appendChild(o), o.offsetHeight, o.classList.add("show"), setTimeout(() =>
|
|
658
|
+
const o = ln.createToast(e, i);
|
|
659
|
+
s.appendChild(o), o.offsetHeight, o.classList.add("show"), setTimeout(() => ln.removeToast(o), t);
|
|
660
660
|
}
|
|
661
661
|
}), // Function to remove a toast
|
|
662
|
-
h(
|
|
662
|
+
h(ln, "removeToast", (e) => {
|
|
663
663
|
e.classList.remove("show"), e.addEventListener("transitionend", () => {
|
|
664
664
|
e.parentElement && e.parentElement.removeChild(e);
|
|
665
665
|
});
|
|
666
666
|
});
|
|
667
|
-
let ki =
|
|
667
|
+
let ki = ln;
|
|
668
668
|
class Qt {
|
|
669
669
|
constructor(e) {
|
|
670
670
|
h(this, "container");
|
|
@@ -23729,7 +23729,7 @@ class Fr {
|
|
|
23729
23729
|
return Gr;
|
|
23730
23730
|
}
|
|
23731
23731
|
}
|
|
23732
|
-
function
|
|
23732
|
+
function nn(n, e, i) {
|
|
23733
23733
|
const s = e.get("spf-redirect-url") || i;
|
|
23734
23734
|
s && setTimeout(() => {
|
|
23735
23735
|
const o = new URL(s);
|
|
@@ -23781,7 +23781,7 @@ class Ri {
|
|
|
23781
23781
|
this.container.innerHTML = this.renderSuccessComponent();
|
|
23782
23782
|
const s = document.querySelector("#go-back-merchant");
|
|
23783
23783
|
s && s.addEventListener("click", () => {
|
|
23784
|
-
|
|
23784
|
+
nn(
|
|
23785
23785
|
this.paymentResponse,
|
|
23786
23786
|
this.paymentResponseHeaders,
|
|
23787
23787
|
this.callbackUrl
|
|
@@ -23791,7 +23791,7 @@ class Ri {
|
|
|
23791
23791
|
this.container.innerHTML = this.renderErrorComponent();
|
|
23792
23792
|
const s = document.querySelector("#go-back-merchant");
|
|
23793
23793
|
s && s.addEventListener("click", () => {
|
|
23794
|
-
|
|
23794
|
+
nn(
|
|
23795
23795
|
this.paymentResponse,
|
|
23796
23796
|
this.paymentResponseHeaders,
|
|
23797
23797
|
this.callbackUrl
|
|
@@ -25305,7 +25305,7 @@ function Li(n) {
|
|
|
25305
25305
|
}
|
|
25306
25306
|
return i(n, e);
|
|
25307
25307
|
}
|
|
25308
|
-
function
|
|
25308
|
+
function rn(n, e, i) {
|
|
25309
25309
|
let t, s;
|
|
25310
25310
|
return n ? (n.ownerNode ? t = e.getId(n.ownerNode) : s = i.getId(n), {
|
|
25311
25311
|
styleId: s,
|
|
@@ -25319,7 +25319,7 @@ function Bl({ styleSheetRuleCb: n, mirror: e, stylesheetManager: i }, { win: t }
|
|
|
25319
25319
|
const s = t.CSSStyleSheet.prototype.insertRule;
|
|
25320
25320
|
t.CSSStyleSheet.prototype.insertRule = new Proxy(s, {
|
|
25321
25321
|
apply: z((v, g, f) => {
|
|
25322
|
-
const [y, k] = f, { id: C, styleId: w } =
|
|
25322
|
+
const [y, k] = f, { id: C, styleId: w } = rn(g, e, i.styleMirror);
|
|
25323
25323
|
return (C && C !== -1 || w && w !== -1) && n({
|
|
25324
25324
|
id: C,
|
|
25325
25325
|
styleId: w,
|
|
@@ -25330,7 +25330,7 @@ function Bl({ styleSheetRuleCb: n, mirror: e, stylesheetManager: i }, { win: t }
|
|
|
25330
25330
|
const o = t.CSSStyleSheet.prototype.deleteRule;
|
|
25331
25331
|
t.CSSStyleSheet.prototype.deleteRule = new Proxy(o, {
|
|
25332
25332
|
apply: z((v, g, f) => {
|
|
25333
|
-
const [y] = f, { id: k, styleId: C } =
|
|
25333
|
+
const [y] = f, { id: k, styleId: C } = rn(g, e, i.styleMirror);
|
|
25334
25334
|
return (k && k !== -1 || C && C !== -1) && n({
|
|
25335
25335
|
id: k,
|
|
25336
25336
|
styleId: C,
|
|
@@ -25341,7 +25341,7 @@ function Bl({ styleSheetRuleCb: n, mirror: e, stylesheetManager: i }, { win: t }
|
|
|
25341
25341
|
let a;
|
|
25342
25342
|
t.CSSStyleSheet.prototype.replace && (a = t.CSSStyleSheet.prototype.replace, t.CSSStyleSheet.prototype.replace = new Proxy(a, {
|
|
25343
25343
|
apply: z((v, g, f) => {
|
|
25344
|
-
const [y] = f, { id: k, styleId: C } =
|
|
25344
|
+
const [y] = f, { id: k, styleId: C } = rn(g, e, i.styleMirror);
|
|
25345
25345
|
return (k && k !== -1 || C && C !== -1) && n({
|
|
25346
25346
|
id: k,
|
|
25347
25347
|
styleId: C,
|
|
@@ -25352,7 +25352,7 @@ function Bl({ styleSheetRuleCb: n, mirror: e, stylesheetManager: i }, { win: t }
|
|
|
25352
25352
|
let l;
|
|
25353
25353
|
t.CSSStyleSheet.prototype.replaceSync && (l = t.CSSStyleSheet.prototype.replaceSync, t.CSSStyleSheet.prototype.replaceSync = new Proxy(l, {
|
|
25354
25354
|
apply: z((v, g, f) => {
|
|
25355
|
-
const [y] = f, { id: k, styleId: C } =
|
|
25355
|
+
const [y] = f, { id: k, styleId: C } = rn(g, e, i.styleMirror);
|
|
25356
25356
|
return (k && k !== -1 || C && C !== -1) && n({
|
|
25357
25357
|
id: k,
|
|
25358
25358
|
styleId: C,
|
|
@@ -25369,7 +25369,7 @@ function Bl({ styleSheetRuleCb: n, mirror: e, stylesheetManager: i }, { win: t }
|
|
|
25369
25369
|
deleteRule: g.prototype.deleteRule
|
|
25370
25370
|
}, g.prototype.insertRule = new Proxy(b[v].insertRule, {
|
|
25371
25371
|
apply: z((f, y, k) => {
|
|
25372
|
-
const [C, w] = k, { id: M, styleId: A } =
|
|
25372
|
+
const [C, w] = k, { id: M, styleId: A } = rn(y.parentStyleSheet, e, i.styleMirror);
|
|
25373
25373
|
return (M && M !== -1 || A && A !== -1) && n({
|
|
25374
25374
|
id: M,
|
|
25375
25375
|
styleId: A,
|
|
@@ -25386,7 +25386,7 @@ function Bl({ styleSheetRuleCb: n, mirror: e, stylesheetManager: i }, { win: t }
|
|
|
25386
25386
|
})
|
|
25387
25387
|
}), g.prototype.deleteRule = new Proxy(b[v].deleteRule, {
|
|
25388
25388
|
apply: z((f, y, k) => {
|
|
25389
|
-
const [C] = k, { id: w, styleId: M } =
|
|
25389
|
+
const [C] = k, { id: w, styleId: M } = rn(y.parentStyleSheet, e, i.styleMirror);
|
|
25390
25390
|
return (w && w !== -1 || M && M !== -1) && n({
|
|
25391
25391
|
id: w,
|
|
25392
25392
|
styleId: M,
|
|
@@ -25442,7 +25442,7 @@ function Dl({ styleDeclarationCb: n, mirror: e, ignoreCSSAttributes: i, styleshe
|
|
|
25442
25442
|
const [g, f, y] = b;
|
|
25443
25443
|
if (i.has(g))
|
|
25444
25444
|
return o.apply(d, [g, f, y]);
|
|
25445
|
-
const { id: k, styleId: C } =
|
|
25445
|
+
const { id: k, styleId: C } = rn((v = d.parentRule) === null || v === void 0 ? void 0 : v.parentStyleSheet, e, t.styleMirror);
|
|
25446
25446
|
return (k && k !== -1 || C && C !== -1) && n({
|
|
25447
25447
|
id: k,
|
|
25448
25448
|
styleId: C,
|
|
@@ -25462,7 +25462,7 @@ function Dl({ styleDeclarationCb: n, mirror: e, ignoreCSSAttributes: i, styleshe
|
|
|
25462
25462
|
const [g] = b;
|
|
25463
25463
|
if (i.has(g))
|
|
25464
25464
|
return a.apply(d, [g]);
|
|
25465
|
-
const { id: f, styleId: y } =
|
|
25465
|
+
const { id: f, styleId: y } = rn((v = d.parentRule) === null || v === void 0 ? void 0 : v.parentStyleSheet, e, t.styleMirror);
|
|
25466
25466
|
return (f && f !== -1 || y && y !== -1) && n({
|
|
25467
25467
|
id: f,
|
|
25468
25468
|
styleId: y,
|
|
@@ -26432,7 +26432,7 @@ function ti(n = {}) {
|
|
|
26432
26432
|
if (we && !e)
|
|
26433
26433
|
throw new Error("emit function is required");
|
|
26434
26434
|
T !== void 0 && A.mousemove === void 0 && (A.mousemove = T), Re.reset();
|
|
26435
|
-
const
|
|
26435
|
+
const sn = g === !0 ? {
|
|
26436
26436
|
color: !0,
|
|
26437
26437
|
date: !0,
|
|
26438
26438
|
"datetime-local": !0,
|
|
@@ -26462,7 +26462,7 @@ function ti(n = {}) {
|
|
|
26462
26462
|
headMetaDescKeywords: y === "all"
|
|
26463
26463
|
} : y || {};
|
|
26464
26464
|
Sl();
|
|
26465
|
-
let pn,
|
|
26465
|
+
let pn, on = 0;
|
|
26466
26466
|
const Te = (B) => {
|
|
26467
26467
|
for (const de of V || [])
|
|
26468
26468
|
de.eventProcessor && (B = de.eventProcessor(B));
|
|
@@ -26482,12 +26482,12 @@ function ti(n = {}) {
|
|
|
26482
26482
|
window.parent.postMessage(ue, "*");
|
|
26483
26483
|
}
|
|
26484
26484
|
if (B.type === W.FullSnapshot)
|
|
26485
|
-
pn = B,
|
|
26485
|
+
pn = B, on = 0;
|
|
26486
26486
|
else if (B.type === W.IncrementalSnapshot) {
|
|
26487
26487
|
if (B.data.source === q.Mutation && B.data.isAttachIframe)
|
|
26488
26488
|
return;
|
|
26489
|
-
|
|
26490
|
-
const ue = t &&
|
|
26489
|
+
on++;
|
|
26490
|
+
const ue = t && on >= t, Pe = i && B.timestamp - pn.timestamp > i;
|
|
26491
26491
|
(ue || Pe) && Ci(!0);
|
|
26492
26492
|
}
|
|
26493
26493
|
};
|
|
@@ -26541,7 +26541,7 @@ function ti(n = {}) {
|
|
|
26541
26541
|
maskTextClass: d,
|
|
26542
26542
|
maskTextSelector: b,
|
|
26543
26543
|
inlineStylesheet: v,
|
|
26544
|
-
maskInputOptions:
|
|
26544
|
+
maskInputOptions: sn,
|
|
26545
26545
|
dataURLOptions: _,
|
|
26546
26546
|
maskTextFn: C,
|
|
26547
26547
|
maskInputFn: k,
|
|
@@ -26575,7 +26575,7 @@ function ti(n = {}) {
|
|
|
26575
26575
|
maskTextClass: d,
|
|
26576
26576
|
maskTextSelector: b,
|
|
26577
26577
|
inlineStylesheet: v,
|
|
26578
|
-
maskAllInputs:
|
|
26578
|
+
maskAllInputs: sn,
|
|
26579
26579
|
maskTextFn: C,
|
|
26580
26580
|
slimDOM: We,
|
|
26581
26581
|
dataURLOptions: _,
|
|
@@ -26607,10 +26607,10 @@ function ti(n = {}) {
|
|
|
26607
26607
|
var Pe;
|
|
26608
26608
|
return z(Kl)({
|
|
26609
26609
|
mutationCb: Ze,
|
|
26610
|
-
mousemoveCb: (J,
|
|
26610
|
+
mousemoveCb: (J, an) => re(me({
|
|
26611
26611
|
type: W.IncrementalSnapshot,
|
|
26612
26612
|
data: {
|
|
26613
|
-
source:
|
|
26613
|
+
source: an,
|
|
26614
26614
|
positions: J
|
|
26615
26615
|
}
|
|
26616
26616
|
})),
|
|
@@ -26661,7 +26661,7 @@ function ti(n = {}) {
|
|
|
26661
26661
|
ignoreSelector: l,
|
|
26662
26662
|
maskTextClass: d,
|
|
26663
26663
|
maskTextSelector: b,
|
|
26664
|
-
maskInputOptions:
|
|
26664
|
+
maskInputOptions: sn,
|
|
26665
26665
|
inlineStylesheet: v,
|
|
26666
26666
|
sampling: A,
|
|
26667
26667
|
recordDOM: I,
|
|
@@ -26686,11 +26686,11 @@ function ti(n = {}) {
|
|
|
26686
26686
|
plugins: ((Pe = V == null ? void 0 : V.filter((J) => J.observer)) === null || Pe === void 0 ? void 0 : Pe.map((J) => ({
|
|
26687
26687
|
observer: J.observer,
|
|
26688
26688
|
options: J.options,
|
|
26689
|
-
callback: (
|
|
26689
|
+
callback: (an) => re(me({
|
|
26690
26690
|
type: W.Plugin,
|
|
26691
26691
|
data: {
|
|
26692
26692
|
plugin: J.name,
|
|
26693
|
-
payload:
|
|
26693
|
+
payload: an
|
|
26694
26694
|
}
|
|
26695
26695
|
}))
|
|
26696
26696
|
}))) || []
|
|
@@ -26762,7 +26762,7 @@ if (typeof window > "u") {
|
|
|
26762
26762
|
};
|
|
26763
26763
|
} else
|
|
26764
26764
|
R = window;
|
|
26765
|
-
var Zn = 24 * 60 * 60 * 1e3, tt = 8 * 1e3, Oi = Array.prototype, od = Function.prototype, io = Object.prototype,
|
|
26765
|
+
var Zn = 24 * 60 * 60 * 1e3, tt = 8 * 1e3, Oi = Array.prototype, od = Function.prototype, io = Object.prototype, dn = Oi.slice, si = io.toString, Ui = io.hasOwnProperty, he = R.console, un = R.navigator, ee = R.document, pi = R.opera, Ti = R.screen, Fe = un.userAgent, st = od.bind, hs = Oi.forEach, ms = Oi.indexOf, vs = Oi.map, ad = Array.isArray, ct = {}, m = {
|
|
26766
26766
|
trim: function(n) {
|
|
26767
26767
|
return n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
26768
26768
|
}
|
|
@@ -26831,17 +26831,17 @@ var Zn = 24 * 60 * 60 * 1e3, tt = 8 * 1e3, Oi = Array.prototype, od = Function.p
|
|
|
26831
26831
|
m.bind = function(n, e) {
|
|
26832
26832
|
var i, t;
|
|
26833
26833
|
if (st && n.bind === st)
|
|
26834
|
-
return st.apply(n,
|
|
26834
|
+
return st.apply(n, dn.call(arguments, 1));
|
|
26835
26835
|
if (!m.isFunction(n))
|
|
26836
26836
|
throw new TypeError();
|
|
26837
|
-
return i =
|
|
26837
|
+
return i = dn.call(arguments, 2), t = function() {
|
|
26838
26838
|
if (!(this instanceof t))
|
|
26839
|
-
return n.apply(e, i.concat(
|
|
26839
|
+
return n.apply(e, i.concat(dn.call(arguments)));
|
|
26840
26840
|
var s = {};
|
|
26841
26841
|
s.prototype = n.prototype;
|
|
26842
26842
|
var o = new s();
|
|
26843
26843
|
s.prototype = null;
|
|
26844
|
-
var a = n.apply(o, i.concat(
|
|
26844
|
+
var a = n.apply(o, i.concat(dn.call(arguments)));
|
|
26845
26845
|
return Object(a) === a ? a : o;
|
|
26846
26846
|
}, t;
|
|
26847
26847
|
};
|
|
@@ -26860,7 +26860,7 @@ m.each = function(n, e, i) {
|
|
|
26860
26860
|
}
|
|
26861
26861
|
};
|
|
26862
26862
|
m.extend = function(n) {
|
|
26863
|
-
return m.each(
|
|
26863
|
+
return m.each(dn.call(arguments, 1), function(e) {
|
|
26864
26864
|
for (var i in e)
|
|
26865
26865
|
e[i] !== void 0 && (n[i] = e[i]);
|
|
26866
26866
|
}), n;
|
|
@@ -26879,7 +26879,7 @@ m.isArguments = function(n) {
|
|
|
26879
26879
|
return !!(n && Ui.call(n, "callee"));
|
|
26880
26880
|
};
|
|
26881
26881
|
m.toArray = function(n) {
|
|
26882
|
-
return n ? n.toArray ? n.toArray() : m.isArray(n) || m.isArguments(n) ?
|
|
26882
|
+
return n ? n.toArray ? n.toArray() : m.isArray(n) || m.isArguments(n) ? dn.call(n) : m.values(n) : [];
|
|
26883
26883
|
};
|
|
26884
26884
|
m.map = function(n, e, i) {
|
|
26885
26885
|
if (vs && n.map === vs)
|
|
@@ -27545,13 +27545,13 @@ m.info = {
|
|
|
27545
27545
|
properties: function(n) {
|
|
27546
27546
|
return typeof n != "object" && (n = {}), m.extend(m.strip_empty_properties({
|
|
27547
27547
|
$os: m.info.os(),
|
|
27548
|
-
$browser: m.info.browser(Fe,
|
|
27548
|
+
$browser: m.info.browser(Fe, un.vendor, pi),
|
|
27549
27549
|
$referrer: ee.referrer,
|
|
27550
27550
|
$referring_domain: m.info.referringDomain(ee.referrer),
|
|
27551
27551
|
$device: m.info.device(Fe)
|
|
27552
27552
|
}), {
|
|
27553
27553
|
$current_url: m.info.currentUrl(),
|
|
27554
|
-
$browser_version: m.info.browserVersion(Fe,
|
|
27554
|
+
$browser_version: m.info.browserVersion(Fe, un.vendor, pi),
|
|
27555
27555
|
$screen_height: Ti.height,
|
|
27556
27556
|
$screen_width: Ti.width,
|
|
27557
27557
|
mp_lib: "web",
|
|
@@ -27564,9 +27564,9 @@ m.info = {
|
|
|
27564
27564
|
people_properties: function() {
|
|
27565
27565
|
return m.extend(m.strip_empty_properties({
|
|
27566
27566
|
$os: m.info.os(),
|
|
27567
|
-
$browser: m.info.browser(Fe,
|
|
27567
|
+
$browser: m.info.browser(Fe, un.vendor, pi)
|
|
27568
27568
|
}), {
|
|
27569
|
-
$browser_version: m.info.browserVersion(Fe,
|
|
27569
|
+
$browser_version: m.info.browserVersion(Fe, un.vendor, pi)
|
|
27570
27570
|
});
|
|
27571
27571
|
},
|
|
27572
27572
|
mpPageViewProperties: function() {
|
|
@@ -28142,18 +28142,18 @@ Ke.prototype.reportError = function(n, e) {
|
|
|
28142
28142
|
}
|
|
28143
28143
|
};
|
|
28144
28144
|
R.__mp_recorder = Ke;
|
|
28145
|
-
var
|
|
28145
|
+
var tn = function() {
|
|
28146
28146
|
};
|
|
28147
|
-
|
|
28147
|
+
tn.prototype.create_properties = function() {
|
|
28148
28148
|
};
|
|
28149
|
-
|
|
28149
|
+
tn.prototype.event_handler = function() {
|
|
28150
28150
|
};
|
|
28151
|
-
|
|
28151
|
+
tn.prototype.after_track_handler = function() {
|
|
28152
28152
|
};
|
|
28153
|
-
|
|
28153
|
+
tn.prototype.init = function(n) {
|
|
28154
28154
|
return this.mp = n, this;
|
|
28155
28155
|
};
|
|
28156
|
-
|
|
28156
|
+
tn.prototype.track = function(n, e, i, t) {
|
|
28157
28157
|
var s = this, o = m.dom_query(n);
|
|
28158
28158
|
if (o.length === 0) {
|
|
28159
28159
|
$.error("The DOM query (" + n + ") returned 0 elements");
|
|
@@ -28166,21 +28166,21 @@ nn.prototype.track = function(n, e, i, t) {
|
|
|
28166
28166
|
});
|
|
28167
28167
|
}, this), !0;
|
|
28168
28168
|
};
|
|
28169
|
-
|
|
28169
|
+
tn.prototype.track_callback = function(n, e, i, t) {
|
|
28170
28170
|
t = t || !1;
|
|
28171
28171
|
var s = this;
|
|
28172
28172
|
return function() {
|
|
28173
28173
|
i.callback_fired || (i.callback_fired = !0, !(n && n(t, e) === !1) && s.after_track_handler(e, i, t));
|
|
28174
28174
|
};
|
|
28175
28175
|
};
|
|
28176
|
-
|
|
28176
|
+
tn.prototype.create_properties = function(n, e) {
|
|
28177
28177
|
var i;
|
|
28178
28178
|
return typeof n == "function" ? i = n(e) : i = m.extend({}, n), i;
|
|
28179
28179
|
};
|
|
28180
28180
|
var Hn = function() {
|
|
28181
28181
|
this.override_event = "click";
|
|
28182
28182
|
};
|
|
28183
|
-
m.inherit(Hn,
|
|
28183
|
+
m.inherit(Hn, tn);
|
|
28184
28184
|
Hn.prototype.create_properties = function(n, e) {
|
|
28185
28185
|
var i = Hn.superclass.create_properties.apply(this, arguments);
|
|
28186
28186
|
return e.href && (i.url = e.href), i;
|
|
@@ -28196,7 +28196,7 @@ Hn.prototype.after_track_handler = function(n, e) {
|
|
|
28196
28196
|
var Ki = function() {
|
|
28197
28197
|
this.override_event = "submit";
|
|
28198
28198
|
};
|
|
28199
|
-
m.inherit(Ki,
|
|
28199
|
+
m.inherit(Ki, tn);
|
|
28200
28200
|
Ki.prototype.event_handler = function(n, e, i) {
|
|
28201
28201
|
i.element = e, n.preventDefault();
|
|
28202
28202
|
};
|
|
@@ -28593,8 +28593,8 @@ var Lt, uo = function(n, e) {
|
|
|
28593
28593
|
return n;
|
|
28594
28594
|
}, ei = function() {
|
|
28595
28595
|
}, Ne = "mixpanel", ho = "base64", xd = "json", xt = "$device:", Dn = R.XMLHttpRequest && "withCredentials" in new XMLHttpRequest(), mo = !Dn && Fe.indexOf("MSIE") === -1 && Fe.indexOf("Mozilla") === -1, Bi = null;
|
|
28596
|
-
|
|
28597
|
-
return
|
|
28596
|
+
un.sendBeacon && (Bi = function() {
|
|
28597
|
+
return un.sendBeacon.apply(un, arguments);
|
|
28598
28598
|
});
|
|
28599
28599
|
var vo = {
|
|
28600
28600
|
track: "track/",
|
|
@@ -29178,7 +29178,7 @@ L.prototype.get_config = function(n) {
|
|
|
29178
29178
|
return this.config[n];
|
|
29179
29179
|
};
|
|
29180
29180
|
L.prototype._run_hook = function(n) {
|
|
29181
|
-
var e = (this.config.hooks[n] || Ld).apply(this,
|
|
29181
|
+
var e = (this.config.hooks[n] || Ld).apply(this, dn.call(arguments, 1));
|
|
29182
29182
|
return typeof e > "u" && (this.report_error(n + " hook did not return a value"), e = null), e;
|
|
29183
29183
|
};
|
|
29184
29184
|
L.prototype.get_property = function(n) {
|
|
@@ -29394,7 +29394,7 @@ class fo {
|
|
|
29394
29394
|
"#goback-to-merchant"
|
|
29395
29395
|
);
|
|
29396
29396
|
e && e.addEventListener("click", () => {
|
|
29397
|
-
|
|
29397
|
+
nn(
|
|
29398
29398
|
this.paymentResponse,
|
|
29399
29399
|
this.paymentResponseHeaders,
|
|
29400
29400
|
this.callBackUrl
|
|
@@ -29484,7 +29484,7 @@ class Rd {
|
|
|
29484
29484
|
}
|
|
29485
29485
|
o += 1;
|
|
29486
29486
|
try {
|
|
29487
|
-
const v = await
|
|
29487
|
+
const v = await cn(
|
|
29488
29488
|
e,
|
|
29489
29489
|
this.ref,
|
|
29490
29490
|
d,
|
|
@@ -29749,6 +29749,7 @@ class Hd {
|
|
|
29749
29749
|
this.currentStep = 7;
|
|
29750
29750
|
return;
|
|
29751
29751
|
}
|
|
29752
|
+
this.currentStep = 10;
|
|
29752
29753
|
}
|
|
29753
29754
|
}).catch((a) => {
|
|
29754
29755
|
P.track("verify_payment", {
|
|
@@ -29834,6 +29835,7 @@ class Hd {
|
|
|
29834
29835
|
this.cardResponse = l, this.currentStep = 3;
|
|
29835
29836
|
return;
|
|
29836
29837
|
}
|
|
29838
|
+
this.currentStep = 10;
|
|
29837
29839
|
}
|
|
29838
29840
|
}).catch((l) => {
|
|
29839
29841
|
this.currentStep = 4, P.track("verify_payment", {
|
|
@@ -29862,7 +29864,7 @@ class Hd {
|
|
|
29862
29864
|
this.rdtCode,
|
|
29863
29865
|
this.url
|
|
29864
29866
|
).then(({ data: o, headers: a }) => {
|
|
29865
|
-
var l, d, b, v, g, f, y
|
|
29867
|
+
var l, d, b, v, g, f, y;
|
|
29866
29868
|
if (o.status === "failed")
|
|
29867
29869
|
this.currentStep = 4, P.track("verify_payment", {
|
|
29868
29870
|
payment_method: "Card",
|
|
@@ -29884,15 +29886,11 @@ class Hd {
|
|
|
29884
29886
|
(b = o == null ? void 0 : o.authorization) != null && b.redirectUrl && this.redirectTo3DS((v = o == null ? void 0 : o.authorization) == null ? void 0 : v.redirectUrl), (g = o == null ? void 0 : o.authorization) != null && g.embeddedHtml && this.redirectToPreciumDoc((f = o == null ? void 0 : o.authorization) == null ? void 0 : f.embeddedHtml);
|
|
29885
29887
|
return;
|
|
29886
29888
|
}
|
|
29887
|
-
if (((y = o == null ? void 0 : o.authorization) == null ? void 0 : y.mode) === "
|
|
29888
|
-
this.cardResponse = o, this.currentStep = 3;
|
|
29889
|
-
return;
|
|
29890
|
-
}
|
|
29891
|
-
if (((k = o == null ? void 0 : o.authorization) == null ? void 0 : k.mode) === "avs") {
|
|
29889
|
+
if (((y = o == null ? void 0 : o.authorization) == null ? void 0 : y.mode) === "avs") {
|
|
29892
29890
|
this.currentStep = 7;
|
|
29893
29891
|
return;
|
|
29894
29892
|
}
|
|
29895
|
-
this.currentStep =
|
|
29893
|
+
this.currentStep = 10;
|
|
29896
29894
|
}
|
|
29897
29895
|
}).catch((o) => {
|
|
29898
29896
|
this.currentStep = 4, P.track("verify_payment", {
|
|
@@ -29967,7 +29965,7 @@ class Hd {
|
|
|
29967
29965
|
}
|
|
29968
29966
|
async verifyPayment(e, i) {
|
|
29969
29967
|
try {
|
|
29970
|
-
const t = await
|
|
29968
|
+
const t = await cn(
|
|
29971
29969
|
this.token,
|
|
29972
29970
|
this.activeRef,
|
|
29973
29971
|
void 0,
|
|
@@ -29985,7 +29983,7 @@ class Hd {
|
|
|
29985
29983
|
}
|
|
29986
29984
|
async verifyPaymentProcess() {
|
|
29987
29985
|
try {
|
|
29988
|
-
const e = await
|
|
29986
|
+
const e = await cn(
|
|
29989
29987
|
this.token,
|
|
29990
29988
|
this.reference,
|
|
29991
29989
|
void 0,
|
|
@@ -30706,7 +30704,7 @@ var go = { exports: {} };
|
|
|
30706
30704
|
}, ze = window.btoa || function(c) {
|
|
30707
30705
|
return c.replace(/[\s\S]{1,3}/g, we);
|
|
30708
30706
|
};
|
|
30709
|
-
class
|
|
30707
|
+
class sn {
|
|
30710
30708
|
constructor(r, u, p, S) {
|
|
30711
30709
|
this.clear = u, this.timer = r(() => {
|
|
30712
30710
|
this.timer && (this.timer = S(this.timer));
|
|
@@ -30719,11 +30717,11 @@ var go = { exports: {} };
|
|
|
30719
30717
|
this.timer && (this.clear(this.timer), this.timer = null);
|
|
30720
30718
|
}
|
|
30721
30719
|
}
|
|
30722
|
-
var We =
|
|
30720
|
+
var We = sn;
|
|
30723
30721
|
function pn(c) {
|
|
30724
30722
|
window.clearTimeout(c);
|
|
30725
30723
|
}
|
|
30726
|
-
function
|
|
30724
|
+
function on(c) {
|
|
30727
30725
|
window.clearInterval(c);
|
|
30728
30726
|
}
|
|
30729
30727
|
class Te extends We {
|
|
@@ -30735,7 +30733,7 @@ var go = { exports: {} };
|
|
|
30735
30733
|
}
|
|
30736
30734
|
class Ze extends We {
|
|
30737
30735
|
constructor(r, u) {
|
|
30738
|
-
super(setInterval,
|
|
30736
|
+
super(setInterval, on, r, function(p) {
|
|
30739
30737
|
return u(), p;
|
|
30740
30738
|
});
|
|
30741
30739
|
}
|
|
@@ -30823,7 +30821,7 @@ var go = { exports: {} };
|
|
|
30823
30821
|
(r && r(p, S, c, u) || p) && (u[S] = p);
|
|
30824
30822
|
}), u;
|
|
30825
30823
|
}
|
|
30826
|
-
function
|
|
30824
|
+
function an(c) {
|
|
30827
30825
|
var r = [];
|
|
30828
30826
|
return Ce(c, function(u, p) {
|
|
30829
30827
|
r.push([p, u]);
|
|
@@ -30849,7 +30847,7 @@ var go = { exports: {} };
|
|
|
30849
30847
|
function ri(c) {
|
|
30850
30848
|
var r = J(c, function(p) {
|
|
30851
30849
|
return p !== void 0;
|
|
30852
|
-
}), u = Y(
|
|
30850
|
+
}), u = Y(an(ai(r)), ae.method("join", "=")).join("&");
|
|
30853
30851
|
return u;
|
|
30854
30852
|
}
|
|
30855
30853
|
function li(c) {
|
|
@@ -33157,15 +33155,12 @@ class Gd {
|
|
|
33157
33155
|
this.abortController && (l = this.abortController.signal);
|
|
33158
33156
|
const d = async () => {
|
|
33159
33157
|
if (this.timeLeft <= 0) {
|
|
33160
|
-
a = !1, this.onAction(8)
|
|
33161
|
-
payment_method: "Transfer",
|
|
33162
|
-
verification_status: "In Progress"
|
|
33163
|
-
});
|
|
33158
|
+
a = !1, this.onAction(8);
|
|
33164
33159
|
return;
|
|
33165
33160
|
}
|
|
33166
33161
|
s += 1;
|
|
33167
33162
|
try {
|
|
33168
|
-
const b = await
|
|
33163
|
+
const b = await cn(
|
|
33169
33164
|
e,
|
|
33170
33165
|
this.ref,
|
|
33171
33166
|
l,
|
|
@@ -33316,9 +33311,7 @@ class zd {
|
|
|
33316
33311
|
h(this, "isMobile", !1);
|
|
33317
33312
|
this.currency = l, this.container = s, this.contents = this.container.querySelector(
|
|
33318
33313
|
"#payment-content-view"
|
|
33319
|
-
), this.closeModal = t, this.token = a, this.email = o, this.amount = e, this.totalAmount = i, this.rdtCode = d, this.url = b, this.reference = v, this._currentStep = 1, this.callBackUrl = g, this.metadata = f, this.localCurrency = y, this.disablePaymentMethods = k, this.paymentResponse = {}, this.paymentResponseHeaders = {}, this.restartTransactionProcess = C, this.hidePaymentMethods = w, this.retryingPayment = M, this.isMaxRetriesReached = !1, this.renderTransferContent(), this.paymentResponse = {}, this.activeRef = "", this.timerId = null, this.mainLoader = new Be(this.contents),
|
|
33320
|
-
payment_method: "Transfer"
|
|
33321
|
-
}), this.mainLoader.mountLoader("25dvh"), this.currentStep === 1 && (this.abortController = new AbortController(), this.createTransfer()), this.isMobile = window.matchMedia("(max-width: 767px)").matches;
|
|
33314
|
+
), this.closeModal = t, this.token = a, this.email = o, this.amount = e, this.totalAmount = i, this.rdtCode = d, this.url = b, this.reference = v, this._currentStep = 1, this.callBackUrl = g, this.metadata = f, this.localCurrency = y, this.disablePaymentMethods = k, this.paymentResponse = {}, this.paymentResponseHeaders = {}, this.restartTransactionProcess = C, this.hidePaymentMethods = w, this.retryingPayment = M, this.isMaxRetriesReached = !1, this.renderTransferContent(), this.paymentResponse = {}, this.activeRef = "", this.timerId = null, this.mainLoader = new Be(this.contents), this.mainLoader.mountLoader("25dvh"), this.currentStep === 1 && (this.abortController = new AbortController(), this.createTransfer()), this.isMobile = window.matchMedia("(max-width: 767px)").matches;
|
|
33322
33315
|
}
|
|
33323
33316
|
get currentStep() {
|
|
33324
33317
|
return this._currentStep;
|
|
@@ -33343,7 +33336,7 @@ class zd {
|
|
|
33343
33336
|
}
|
|
33344
33337
|
async verifyTransfer() {
|
|
33345
33338
|
try {
|
|
33346
|
-
const e = await
|
|
33339
|
+
const e = await cn(
|
|
33347
33340
|
this.token,
|
|
33348
33341
|
this.reference,
|
|
33349
33342
|
void 0,
|
|
@@ -33358,7 +33351,7 @@ class zd {
|
|
|
33358
33351
|
async createTransfer() {
|
|
33359
33352
|
requestAnimationFrame(() => {
|
|
33360
33353
|
const e = this.container.querySelector("#loader"), i = this.container.querySelector("#details-content");
|
|
33361
|
-
i && (this.mainLoader = new Be(this.contents), this.mainLoader.mountLoader("25dvh"), i.classList.add("hidden")), P.track("
|
|
33354
|
+
i && (this.mainLoader = new Be(this.contents), this.mainLoader.mountLoader("25dvh"), i.classList.add("hidden")), P.track("start_payment", {
|
|
33362
33355
|
payment_method: "Transfer"
|
|
33363
33356
|
}), (() => {
|
|
33364
33357
|
var s, o;
|
|
@@ -33427,7 +33420,7 @@ class zd {
|
|
|
33427
33420
|
});
|
|
33428
33421
|
}
|
|
33429
33422
|
goBackToMerchant() {
|
|
33430
|
-
|
|
33423
|
+
nn(
|
|
33431
33424
|
this.paymentResponse,
|
|
33432
33425
|
this.paymentResponseHeaders,
|
|
33433
33426
|
this.callBackUrl
|
|
@@ -34124,10 +34117,7 @@ class Co {
|
|
|
34124
34117
|
validate() {
|
|
34125
34118
|
let e;
|
|
34126
34119
|
if (this.abortController ? e = this.abortController.signal : (this.abortController = new AbortController(), e = this.abortController.signal), this._retry_count <= 0) {
|
|
34127
|
-
clearInterval(this.intervalPayment), this.currentStep = 3
|
|
34128
|
-
payment_method: "USSD",
|
|
34129
|
-
verification_status: "In Progress"
|
|
34130
|
-
});
|
|
34120
|
+
clearInterval(this.intervalPayment), this.currentStep = 3;
|
|
34131
34121
|
return;
|
|
34132
34122
|
}
|
|
34133
34123
|
this.paymentService.verifyPayment(this.activeRef, e || this.abortController.signal).then(({ data: i, headers: t }) => {
|
|
@@ -34433,7 +34423,7 @@ class su {
|
|
|
34433
34423
|
});
|
|
34434
34424
|
}
|
|
34435
34425
|
renderComponent() {
|
|
34436
|
-
var F, U, j, te, ge, V, ke, le, xe, we, ze,
|
|
34426
|
+
var F, U, j, te, ge, V, ke, le, xe, we, ze, sn, We, pn, on, Te, Ze, fn, ae, be, Ie, Ee, Ce, je, B, de, Y, ue, Pe, J, an, Kn, oi, ai, ri, li, gn;
|
|
34437
34427
|
this.container.innerHTML = this.render(), this.amount = this.amount;
|
|
34438
34428
|
const e = this.container.querySelector(
|
|
34439
34429
|
"#merchant-logo-container"
|
|
@@ -34470,18 +34460,18 @@ class su {
|
|
|
34470
34460
|
const jn = ((ze = (we = this.merchantDetail) == null ? void 0 : we.plan) == null ? void 0 : ze.title) || "";
|
|
34471
34461
|
a.textContent = fi(jn);
|
|
34472
34462
|
}
|
|
34473
|
-
(
|
|
34463
|
+
(sn = this.metadata) != null && sn.productName && (a.textContent = fi(
|
|
34474
34464
|
this.metadata.productName
|
|
34475
34465
|
));
|
|
34476
34466
|
}
|
|
34477
|
-
d && (this.currency === "USD" ? v && (v.innerHTML = `1 ${((pn = (We = this.merchantDetail) == null ? void 0 : We.rate) == null ? void 0 : pn.to) || "-"} = ${((Te = (
|
|
34467
|
+
d && (this.currency === "USD" ? v && (v.innerHTML = `1 ${((pn = (We = this.merchantDetail) == null ? void 0 : We.rate) == null ? void 0 : pn.to) || "-"} = ${((Te = (on = this.merchantDetail) == null ? void 0 : on.rate) == null ? void 0 : Te.from) || "-"} ${Le(
|
|
34478
34468
|
((Ze = this.merchantDetail.rate) == null ? void 0 : Ze.rate) || 1,
|
|
34479
34469
|
2
|
|
34480
34470
|
)} `) : d.innerHTML = ""), b && (this.currency === "USD" ? g && (g.innerHTML = `1 ${((ae = (fn = this.merchantDetail) == null ? void 0 : fn.rate) == null ? void 0 : ae.to) || "-"} = ${((Ie = (be = this.merchantDetail) == null ? void 0 : be.rate) == null ? void 0 : Ie.from) || "-"} ${Le(
|
|
34481
34471
|
((Ee = this.merchantDetail.rate) == null ? void 0 : Ee.rate) || 1,
|
|
34482
34472
|
2
|
|
34483
34473
|
)} `) : b.innerHTML = ""), (je = (Ce = this.merchantDetail) == null ? void 0 : Ce.plan) != null && je.title || (B = this.metadata) != null && B.productName ? f && (f.innerHTML = `${this.currency} ${Le(this.amount, 2)}`) : (k && (k.innerHTML = `<span> ${this.currency} ${Le(this.amount, 2)} </span>`), o && a && (o.remove(), a == null || a.remove()), this.localCurrency ? f == null || f.remove() : l && l.remove()), y && (y.innerHTML = `${this.currency} ${Le(this.amount, 2)}`), C && (this.localCurrency && this.localCurrency !== this.currency ? C.children[1].innerHTML = `${this.localCurrency} ${Le(this.amount * (((Y = (de = this.merchantDetail) == null ? void 0 : de.rate) == null ? void 0 : Y.rate) || 1), 2)}` : C.remove()), w && (this.localCurrency && this.localCurrency !== this.currency ? w.children[1].innerHTML = `${this.localCurrency} ${Le(this.amount * (((Pe = (ue = this.merchantDetail) == null ? void 0 : ue.rate) == null ? void 0 : Pe.rate) || 1), 2)}` : w.remove());
|
|
34484
|
-
const I = this.localCurrency !== this.currency ? this.amount * (((
|
|
34474
|
+
const I = this.localCurrency !== this.currency ? this.amount * (((an = (J = this.merchantDetail) == null ? void 0 : J.rate) == null ? void 0 : an.rate) || 1) : this.amount;
|
|
34485
34475
|
M && (Kn = this.merchantDetail) != null && Kn.taxQuoteId && (oi = this.merchantDetail) != null && oi.totalAmount && (M.classList.remove("hidden"), M.children[1].innerHTML = `${this.localCurrency !== this.currency ? this.localCurrency : this.currency} ${Le(((ai = this.merchantDetail) == null ? void 0 : ai.totalAmount) - I, 2)}`), A && (ri = this.merchantDetail) != null && ri.taxQuoteId && (li = this.merchantDetail) != null && li.totalAmount && (A.classList.remove("hidden"), A.children[1].innerHTML = `${this.localCurrency !== this.currency ? this.localCurrency : this.currency} ${Le(((gn = this.merchantDetail) == null ? void 0 : gn.totalAmount) - I, 2)}`);
|
|
34486
34476
|
const K = eu[this.localCurrency];
|
|
34487
34477
|
_ && this.localCurrency && (_.innerHTML = K ? `${K} (${this.localCurrency})` : this.localCurrency), T && this.localCurrency && (T.innerHTML = K ? `${K} (${this.localCurrency})` : this.localCurrency), this.renderPaymentOptions(this.container), this.attachListeners();
|
|
@@ -34562,7 +34552,7 @@ class su {
|
|
|
34562
34552
|
const ou = `<div class="flex items-center justify-center md:justify-between w-full text-xxs mt-5">
|
|
34563
34553
|
<div class="text-tone-60"><span>Powered by</span> <span class="font-bold">Spotflow</span></div>
|
|
34564
34554
|
<div class="align-center text-tone-60 hidden md:flex gap-4">
|
|
34565
|
-
|
|
34555
|
+
<span id="test-cards-link" class="hover:font-bold">Test Cards</span>
|
|
34566
34556
|
<a href="https://ribbon-scowl-35f.notion.site/Terms-Conditions-940742f0a1b144498ffc1786c5bc6a08?pvs=4" target="_blank" class="hover:font-bold">Terms</a>
|
|
34567
34557
|
<a href="https://ribbon-scowl-35f.notion.site/Privacy-Policy-Spotflow-3997ee8d923d4cd39a3dc43b7249b713" target="_blank" class="hover:font-bold">Privacy</a>
|
|
34568
34558
|
<a href="mailto:hello@spotflow.one" class="hover:font-bold">Contact</a>
|
|
@@ -34590,8 +34580,7 @@ const ou = `<div class="flex items-center justify-center md:justify-between w-fu
|
|
|
34590
34580
|
<div class="flex justify-between items-center">
|
|
34591
34581
|
<span class="text-tone-60 font-medium text-sm">Number</span>
|
|
34592
34582
|
<div class="flex items-center gap-1">
|
|
34593
|
-
<span data-copy-value="4111112000062555" class="text-tone-100 text-sm font-medium">
|
|
34594
|
-
2555 </span>
|
|
34583
|
+
<span data-copy-value="4111112000062555" class="text-tone-100 text-sm font-medium">4111112000062555</span>
|
|
34595
34584
|
<button class="copy-btn p-1 hover:opacity-80 transition-opacity">
|
|
34596
34585
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
34597
34586
|
<path
|
|
@@ -34775,7 +34764,7 @@ const ou = `<div class="flex items-center justify-center md:justify-between w-fu
|
|
|
34775
34764
|
<span class="text-tone-60 font-medium text-sm">Number</span>
|
|
34776
34765
|
<div class="flex items-center gap-1">
|
|
34777
34766
|
<span data-copy-value="5555558684543932"
|
|
34778
|
-
class="text-tone-100 text-sm font-medium">
|
|
34767
|
+
class="text-tone-100 text-sm font-medium">5555577124976817 </span>
|
|
34779
34768
|
<button class="copy-btn p-1 hover:opacity-80 transition-opacity">
|
|
34780
34769
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
|
34781
34770
|
xmlns="http://www.w3.org/2000/svg">
|
|
@@ -35049,7 +35038,7 @@ class du {
|
|
|
35049
35038
|
}
|
|
35050
35039
|
o += 1;
|
|
35051
35040
|
try {
|
|
35052
|
-
const v = await
|
|
35041
|
+
const v = await cn(
|
|
35053
35042
|
e,
|
|
35054
35043
|
this.ref,
|
|
35055
35044
|
d,
|
|
@@ -35059,10 +35048,7 @@ class du {
|
|
|
35059
35048
|
v.data.status === "failed" && (l = !1, clearTimeout(this.timer), clearInterval(this.timerId || void 0), this.setPaymentResponses(v.data, v.headers), P.track("verify_payment", {
|
|
35060
35049
|
payment_method: "Mobile Money",
|
|
35061
35050
|
verification_status: "Failed"
|
|
35062
|
-
}), s(v)), v.data.status === "inProgress" && (l && (a = i * (o + 1), this.timer = setTimeout(b, a)), this.setPaymentResponses(v.data, v.headers), P.track("verify_payment", {
|
|
35063
|
-
payment_method: "Mobile Money",
|
|
35064
|
-
verification_status: "In Progress"
|
|
35065
|
-
})), (v.data.status === "success" || v.data.status === "successful") && (this.setPaymentResponses(v.data, v.headers), l = !1, clearTimeout(this.timer), clearInterval(this.timerId || void 0), P.track("verify_payment", {
|
|
35051
|
+
}), s(v)), v.data.status === "inProgress" && (l && (a = i * (o + 1), this.timer = setTimeout(b, a)), this.setPaymentResponses(v.data, v.headers)), (v.data.status === "success" || v.data.status === "successful") && (this.setPaymentResponses(v.data, v.headers), l = !1, clearTimeout(this.timer), clearInterval(this.timerId || void 0), P.track("verify_payment", {
|
|
35066
35052
|
payment_method: "Mobile Money",
|
|
35067
35053
|
verification_status: "Success"
|
|
35068
35054
|
}), t(v));
|
|
@@ -35374,7 +35360,7 @@ class vu {
|
|
|
35374
35360
|
".details-form-button"
|
|
35375
35361
|
);
|
|
35376
35362
|
e && e.addEventListener("click", () => {
|
|
35377
|
-
|
|
35363
|
+
nn(
|
|
35378
35364
|
this.paymentResponse,
|
|
35379
35365
|
this.paymentResponseHeaders,
|
|
35380
35366
|
this.callBackUrl
|
|
@@ -35523,6 +35509,12 @@ class bu {
|
|
|
35523
35509
|
verification_status: "Failed"
|
|
35524
35510
|
});
|
|
35525
35511
|
return;
|
|
35512
|
+
} else if (a.status === "success" || a.status === "successful") {
|
|
35513
|
+
this.currentStep = 4, P.track("start_payment", {
|
|
35514
|
+
payment_method: "Mobile Money",
|
|
35515
|
+
verification_status: "Success"
|
|
35516
|
+
}), nn(a, l, a == null ? void 0 : a.callBackUrl);
|
|
35517
|
+
return;
|
|
35526
35518
|
} else if (((d = a == null ? void 0 : a.authorization) == null ? void 0 : d.mode) === "otp") {
|
|
35527
35519
|
this.activeRef = a.reference, this.currentStep = 6;
|
|
35528
35520
|
return;
|
|
@@ -35571,14 +35563,18 @@ class bu {
|
|
|
35571
35563
|
authentication_type: "OTP"
|
|
35572
35564
|
});
|
|
35573
35565
|
const d = this.container.querySelector("#otp-error");
|
|
35574
|
-
l.code === "invalid_otp" ? d && (d.innerHTML = l.message)
|
|
35566
|
+
l.code === "invalid_otp" ? (d && (d.innerHTML = l.message), P.track("verify_payment", {
|
|
35567
|
+
payment_method: "Mobile Money",
|
|
35568
|
+
verification_status: "Failed",
|
|
35569
|
+
authentication_type: "OTP"
|
|
35570
|
+
})) : this.currentStep = 3;
|
|
35575
35571
|
}).finally(() => {
|
|
35576
35572
|
t && s && (t.classList.add("hidden"), s.classList.remove("hidden"));
|
|
35577
35573
|
});
|
|
35578
35574
|
}
|
|
35579
35575
|
async verifyPaymentProcess() {
|
|
35580
35576
|
try {
|
|
35581
|
-
const e = await
|
|
35577
|
+
const e = await cn(
|
|
35582
35578
|
this.token,
|
|
35583
35579
|
this.reference,
|
|
35584
35580
|
void 0,
|
|
@@ -35591,7 +35587,7 @@ class bu {
|
|
|
35591
35587
|
}
|
|
35592
35588
|
}
|
|
35593
35589
|
goBackToMerchant() {
|
|
35594
|
-
|
|
35590
|
+
nn(
|
|
35595
35591
|
this.paymentResponse,
|
|
35596
35592
|
this.paymentResponseHeaders,
|
|
35597
35593
|
this.callBackUrl
|
|
@@ -35843,7 +35839,7 @@ class fu {
|
|
|
35843
35839
|
i && (i.textContent = e);
|
|
35844
35840
|
}
|
|
35845
35841
|
goBackToMerchant() {
|
|
35846
|
-
|
|
35842
|
+
nn(
|
|
35847
35843
|
this.paymentResponse,
|
|
35848
35844
|
this.paymentResponseHeaders,
|
|
35849
35845
|
this.callBackUrl
|
|
@@ -35928,7 +35924,7 @@ class fu {
|
|
|
35928
35924
|
}
|
|
35929
35925
|
async verifyPaymentProcess() {
|
|
35930
35926
|
try {
|
|
35931
|
-
const e = await
|
|
35927
|
+
const e = await cn(
|
|
35932
35928
|
this.token,
|
|
35933
35929
|
this.reference,
|
|
35934
35930
|
void 0,
|
|
@@ -35940,7 +35936,7 @@ class fu {
|
|
|
35940
35936
|
i === "successful" ? (this.currentStep = 2, P.track("verify_payment", {
|
|
35941
35937
|
payment_method: "EFT",
|
|
35942
35938
|
verification_status: "Success"
|
|
35943
|
-
}),
|
|
35939
|
+
}), nn(
|
|
35944
35940
|
this.paymentResponse,
|
|
35945
35941
|
this.paymentResponseHeaders,
|
|
35946
35942
|
"success"
|