@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.
Files changed (29) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/README.md +76 -0
  3. package/dist/sdk/{CloseIcon-B65NDIbM.js → CloseIcon-Ejad61tT.js} +377 -363
  4. package/dist/sdk/{DefaultThreeDsProvider-CzqbXEws.js → DefaultThreeDsProvider-bLoDSnkd.js} +24 -24
  5. package/dist/sdk/{MetricsGlobalThreeDsProvider-B-EQQsEV.js → MetricsGlobalThreeDsProvider-C93ttqbB.js} +16 -16
  6. package/dist/sdk/{PayWayAppleButton-C-XfcgNS.js → PayWayAppleButton-B1Ttj4J_.js} +1 -1
  7. package/dist/sdk/{alerts-BvNnAm_q.js → alerts-1YSRy5iI.js} +9 -9
  8. package/dist/sdk/{cxpay-VbaQA3_P.js → cxpay-DblHb5vN.js} +1 -1
  9. package/dist/sdk/{default-Diji0SXY.js → default-C7f86Fx-.js} +1 -1
  10. package/dist/sdk/{ecentric-BlNDCZo_.js → ecentric-B3UohyO_.js} +11 -11
  11. package/dist/sdk/{epna-CxmJ_mqR.js → epna-DwUg2IlB.js} +1 -1
  12. package/dist/sdk/{flashbanc-BAxvqtBB.js → flashbanc-LXs8bahL.js} +1 -1
  13. package/dist/sdk/forter-CLFaJUYa.js +30 -0
  14. package/dist/sdk/{gpayments-B5KWQV4S.js → gpayments-DoZug3PV.js} +13 -13
  15. package/dist/sdk/{metrics_global-HMMDzPlb.js → metrics_global-BM-ooge-.js} +1 -1
  16. package/dist/sdk/{nmi-Ch7qQ6Av.js → nmi-BA3ZTdQa.js} +1 -1
  17. package/dist/sdk/{nuvei-DRmlfpTL.js → nuvei-DIWsLlLz.js} +29 -29
  18. package/dist/sdk/{payabli-CiBJ1-vC.js → payabli-DgrTI1Et.js} +1 -1
  19. package/dist/sdk/payfurl.d.ts +35 -3
  20. package/dist/sdk/payfurl.es.js +1121 -834
  21. package/dist/sdk/payfurl.umd.js +8 -8
  22. package/dist/sdk/{payglocal-uAPlijwL.js → payglocal-ezp0MsaZ.js} +18 -18
  23. package/dist/sdk/{payway_rest-CjgIP42z.js → payway_rest-4Pjb1c7k.js} +1 -1
  24. package/dist/sdk/{skybank-D7uRF17E.js → skybank-BgDLlFXX.js} +1 -1
  25. package/dist/sdk/{strings-BthDdeA6.js → strings-DyifLS9r.js} +13 -13
  26. package/dist/sdk/style.css +1 -1
  27. package/dist/sdk/whenRendered-jR4Jls4M.js +12 -0
  28. package/package.json +1 -1
  29. package/dist/sdk/forter-R2alfHeE.js +0 -26
@@ -1,6 +1,6 @@
1
- import { A as e, Et as t, It as n, Lt as r, O as i, Ot as a, Tt as o, Z as s, _t as c, ct as l, dt as u, h as d, n as f, t as p, vt as m, wt as h, xt as g } from "./CloseIcon-B65NDIbM.js";
1
+ import { At as e, Bt as t, Mt as n, Ot as r, St as i, Tt as a, Vt as o, ft as s, h as c, ht as l, j as u, k as d, kt as f, n as p, t as m, tt as h, xt as g } from "./CloseIcon-Ejad61tT.js";
2
2
  // src/sdk/3ds/ThreeDsChallenge.vue?vue&type=script&setup=true&lang.ts
3
- var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = ["action"], x = ["value"], S = /*#__PURE__*/ s(/* @__PURE__ */ o({
3
+ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = ["action"], x = ["value"], S = /*#__PURE__*/ h(/* @__PURE__ */ f({
4
4
  __name: "ThreeDsChallenge",
5
5
  props: {
6
6
  threeDSServerTransID: {},
@@ -8,32 +8,32 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
8
8
  formAction: {}
9
9
  },
10
10
  emits: ["close", "submit"],
11
- setup(e, { emit: i }) {
12
- let o = e, s = i, u = c(() => l(o.formAction) ? o.formAction : ""), d = n(null), f = JSON.stringify({
13
- threeDSServerTransID: o.threeDSServerTransID,
14
- acsTransID: o.acsTransID,
11
+ setup(c, { emit: l }) {
12
+ let u = c, d = l, f = g(() => s(u.formAction) ? u.formAction : ""), p = t(null), h = JSON.stringify({
13
+ threeDSServerTransID: u.threeDSServerTransID,
14
+ acsTransID: u.acsTransID,
15
15
  messageVersion: "2.2.0",
16
16
  messageType: "CReq",
17
17
  challengeWindowSize: "01"
18
- }), S = encodeURI(window.btoa(f).replace(/=*$/, ""));
19
- return t(() => {
20
- u.value && d.value?.submit();
21
- }), (e, t) => (a(), g("div", _, [m("div", v, [m("div", y, [
22
- h(p, {
23
- onClick: t[0] ||= (e) => s("close"),
18
+ }), S = encodeURI(window.btoa(h).replace(/=*$/, ""));
19
+ return e(() => {
20
+ f.value && p.value?.submit();
21
+ }), (e, t) => (n(), a("div", _, [i("div", v, [i("div", y, [
22
+ r(m, {
23
+ onClick: t[0] ||= (e) => d("close"),
24
24
  id: "3ds-challenge-close"
25
25
  }),
26
- t[1] ||= m("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1),
27
- m("form", {
28
- action: u.value,
26
+ t[1] ||= i("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1),
27
+ i("form", {
28
+ action: f.value,
29
29
  target: "ThreeDsChallengeIFrame",
30
30
  method: "post",
31
31
  ref_key: "form",
32
- ref: d
33
- }, [m("input", {
32
+ ref: p
33
+ }, [i("input", {
34
34
  type: "hidden",
35
35
  name: "creq",
36
- value: r(S)
36
+ value: o(S)
37
37
  }, null, 8, x)], 8, b)
38
38
  ])])]));
39
39
  }
@@ -55,7 +55,7 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
55
55
  }
56
56
  a.submit();
57
57
  }
58
- }, { hideSpinner: w, showSpinner: T } = f(), E = "3ds_method_invocation_complete", D = "3ds_challenge_complete", O = class {
58
+ }, { hideSpinner: w, showSpinner: T } = p(), E = "3ds_method_invocation_complete", D = "3ds_challenge_complete", O = class {
59
59
  log;
60
60
  container;
61
61
  options;
@@ -107,12 +107,12 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
107
107
  "R"
108
108
  ].includes(t.transStatus) && (this.log(`[${this.getType()}]: Failed 3DS Challenge`, e.data), this.onError(400, "Failed 3DS Challenge"));
109
109
  }
110
- setChallengeFrameVisible(t) {
111
- window.self !== window.top && window.parent.postMessage({ status: t ? e : i }, "*");
110
+ setChallengeFrameVisible(e) {
111
+ e && this.threeDsProcessor?.challengeShown(), window.self !== window.top && window.parent.postMessage({ status: e ? u : d }, "*");
112
112
  }
113
113
  doChallenge(e, t, n) {
114
114
  this.log(`[${this.getType()}][doChallenge]`), w(), this.setChallengeFrameVisible(!0);
115
- let { destroy: r } = u({
115
+ let { destroy: r } = l({
116
116
  el: document.body,
117
117
  component: S,
118
118
  props: {
@@ -132,14 +132,14 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
132
132
  }
133
133
  onError = (e, t) => {
134
134
  this.closeChallenge(), w(), e === 404 ? this.threeDsProcessor?.onError({ error: "This feature is only supported by ActiveServer v1.1.2+" }) : this.threeDsProcessor?.onError({
135
- error: d,
135
+ error: c,
136
136
  body: t
137
137
  });
138
138
  };
139
139
  onSuccess = (e, t) => {
140
140
  this.closeChallenge(), w();
141
141
  let n = JSON.parse(t);
142
- ["Y", "A"].includes(n.transStatus) ? this.threeDsProcessor?.onSuccess(n) : (this.log(`[${this.getType()}]: ${d}`, n), this.threeDsProcessor?.onError({ error: d }));
142
+ ["Y", "A"].includes(n.transStatus) ? this.threeDsProcessor?.onSuccess(n) : (this.log(`[${this.getType()}]: ${c}`, n), this.threeDsProcessor?.onError({ error: c }));
143
143
  };
144
144
  threeDsMethodInvoke(e, t) {
145
145
  this.log(`[${this.getType()}][threeDsMethodInvoke]`, {
@@ -1,24 +1,24 @@
1
- import { t as e } from "./DefaultThreeDsProvider-CzqbXEws.js";
2
- import { Dt as t, Et as n, Ft as r, It as i, Ot as a, Tt as o, Z as s, dt as c, mt as l, n as u, t as d, vt as f, wt as p, xt as m } from "./CloseIcon-B65NDIbM.js";
3
- import { t as h } from "./alerts-BvNnAm_q.js";
1
+ import { t as e } from "./DefaultThreeDsProvider-bLoDSnkd.js";
2
+ import { At as t, Bt as n, Mt as r, Ot as i, St as a, Tt as o, ht as s, jt as c, kt as l, n as u, t as d, tt as f, vt as p, zt as m } from "./CloseIcon-Ejad61tT.js";
3
+ import { t as h } from "./alerts-1YSRy5iI.js";
4
4
  import { t as g } from "./screen-aNRlfrZR.js";
5
5
  // src/sdk/3ds/MetricsGlobalThreeDsChallenge.vue?vue&type=script&setup=true&lang.ts
6
- var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = /*#__PURE__*/ s(/* @__PURE__ */ o({
6
+ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = /*#__PURE__*/ f(/* @__PURE__ */ l({
7
7
  __name: "MetricsGlobalThreeDsChallenge",
8
8
  emits: ["close", "submit"],
9
- setup(e, { emit: o }) {
10
- let s = o, c = i(!1);
11
- function u(e) {
12
- ["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes(e.data?.message) && (c.value = e.data.message === "3DS_CHALLENGE_SHOW");
9
+ setup(e, { emit: s }) {
10
+ let l = s, u = n(!1);
11
+ function f(e) {
12
+ ["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes(e.data?.message) && (u.value = e.data.message === "3DS_CHALLENGE_SHOW");
13
13
  }
14
- return n(() => {
15
- window.addEventListener("message", u);
16
- }), t(() => {
17
- window.removeEventListener("message", u);
18
- }), (e, t) => r((a(), m("div", _, [f("div", v, [f("div", y, [p(d, {
19
- onClick: t[0] ||= (e) => s("close"),
14
+ return t(() => {
15
+ window.addEventListener("message", f);
16
+ }), c(() => {
17
+ window.removeEventListener("message", f);
18
+ }), (e, t) => m((r(), o("div", _, [a("div", v, [a("div", y, [i(d, {
19
+ onClick: t[0] ||= (e) => l("close"),
20
20
  id: "3ds-challenge-close"
21
- }), t[1] ||= f("div", { id: "ThreeDsChallengeIFrame" }, null, -1)])])], 512)), [[l, c.value]]);
21
+ }), t[1] ||= a("div", { id: "ThreeDsChallengeIFrame" }, null, -1)])])], 512)), [[p, u.value]]);
22
22
  }
23
23
  }), [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: x, showSpinner: S } = u(), C = 5, w = class extends e {
24
24
  gateway;
@@ -103,7 +103,7 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
103
103
  });
104
104
  }
105
105
  initChallenge() {
106
- let { destroy: e } = c({
106
+ let { destroy: e } = s({
107
107
  el: document.body,
108
108
  component: b,
109
109
  on: { close: () => {
@@ -1,4 +1,4 @@
1
- import { o as e, r as t, s as n } from "./strings-BthDdeA6.js";
1
+ import { o as e, r as t, s as n } from "./strings-DyifLS9r.js";
2
2
  // src/sdk/processors/applepay/PayWayAppleButton.ts
3
3
  var r = {
4
4
  CHECKOUT: "CHECKOUT",
@@ -1,22 +1,22 @@
1
- import { Bt as e, It as t, Ot as n, Tt as r, Z as i, bt as a, dt as o, gt as s, vt as c, xt as l } from "./CloseIcon-B65NDIbM.js";
1
+ import { Bt as e, Mt as t, St as n, Tt as r, Wt as i, bt as a, ht as o, kt as s, tt as c, wt as l } from "./CloseIcon-Ejad61tT.js";
2
2
  // src/sdk/components/Error.vue?vue&type=script&setup=true&lang.ts
3
- var u = { class: "message" }, d = /*#__PURE__*/ i(/* @__PURE__ */ r({
3
+ var u = { class: "message" }, d = /*#__PURE__*/ c(/* @__PURE__ */ s({
4
4
  __name: "Error",
5
5
  props: { error: {} },
6
- setup(r) {
7
- let i = t(r.error);
8
- return (t, r) => (n(), l("div", u, e(i.value), 1));
6
+ setup(n) {
7
+ let a = e(n.error);
8
+ return (e, n) => (t(), r("div", u, i(a.value), 1));
9
9
  }
10
- }), [["__scopeId", "data-v-ae4be0f9"]]), f = { class: "message" }, p = { key: 0 }, m = /*#__PURE__*/ i(/* @__PURE__ */ r({
10
+ }), [["__scopeId", "data-v-ae4be0f9"]]), f = { class: "message" }, p = { key: 0 }, m = /*#__PURE__*/ c(/* @__PURE__ */ s({
11
11
  __name: "Success",
12
12
  props: {
13
13
  message: {},
14
14
  token: {}
15
15
  },
16
16
  emits: ["close"],
17
- setup(t, { emit: r }) {
18
- let i = t;
19
- return (t, r) => (n(), l(s, null, [c("div", f, e(i.message), 1), i.token ? (n(), l("div", p, "TokenId = " + e(i.token), 1)) : a("", !0)], 64));
17
+ setup(e, { emit: o }) {
18
+ let s = e;
19
+ return (e, o) => (t(), r(a, null, [n("div", f, i(s.message), 1), s.token ? (t(), r("div", p, "TokenId = " + i(s.token), 1)) : l("", !0)], 64));
20
20
  }
21
21
  }), [["__scopeId", "data-v-6a4e1608"]]);
22
22
  // src/sdk/utils/alerts.ts
@@ -1,4 +1,4 @@
1
- import { t as e } from "./MetricsGlobalThreeDsProvider-B-EQQsEV.js";
1
+ import { t as e } from "./MetricsGlobalThreeDsProvider-C93ttqbB.js";
2
2
  // src/sdk/3ds/CxPayThreeDsProvider.ts
3
3
  var t = class extends e {
4
4
  getType() {
@@ -1,4 +1,4 @@
1
- import { t as e } from "./DefaultThreeDsProvider-CzqbXEws.js";
1
+ import { t as e } from "./DefaultThreeDsProvider-bLoDSnkd.js";
2
2
  // src/sdk/3ds/default.ts
3
3
  function t(t, n, r) {
4
4
  return new e(t, n, r);
@@ -1,7 +1,7 @@
1
- import { t as e } from "./DefaultThreeDsProvider-CzqbXEws.js";
2
- import { Et as t, It as n, Lt as r, Ot as i, Tt as a, Z as o, _t as s, ct as c, dt as l, t as u, vt as d, wt as f, xt as p } from "./CloseIcon-B65NDIbM.js";
1
+ import { t as e } from "./DefaultThreeDsProvider-bLoDSnkd.js";
2
+ import { At as t, Bt as n, Mt as r, Ot as i, St as a, Tt as o, Vt as s, ft as c, ht as l, kt as u, t as d, tt as f, xt as p } from "./CloseIcon-Ejad61tT.js";
3
3
  // src/sdk/3ds/ecentric.vue?vue&type=script&setup=true&lang.ts
4
- var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" }, _ = ["action"], v = ["value"], y = /*#__PURE__*/ o(/* @__PURE__ */ a({
4
+ var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" }, _ = ["action"], v = ["value"], y = /*#__PURE__*/ f(/* @__PURE__ */ u({
5
5
  __name: "ecentric",
6
6
  props: {
7
7
  threeDSServerTransID: {},
@@ -10,23 +10,23 @@ var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" },
10
10
  authenticationValue: {}
11
11
  },
12
12
  emits: ["close", "submit"],
13
- setup(e, { emit: a }) {
14
- let o = e, l = a, y = s(() => c(o.formAction) ? o.formAction : ""), b = n(null), x = o.authenticationValue;
13
+ setup(e, { emit: l }) {
14
+ let u = e, f = l, y = p(() => c(u.formAction) ? u.formAction : ""), b = n(null), x = u.authenticationValue;
15
15
  return t(() => {
16
16
  y.value && b.value?.submit();
17
- }), (e, t) => (i(), p("div", m, [d("div", h, [d("div", g, [
18
- f(u, { onClick: t[0] ||= (e) => l("close") }),
19
- t[1] ||= d("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1),
20
- d("form", {
17
+ }), (e, t) => (r(), o("div", m, [a("div", h, [a("div", g, [
18
+ i(d, { onClick: t[0] ||= (e) => f("close") }),
19
+ t[1] ||= a("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1),
20
+ a("form", {
21
21
  action: y.value,
22
22
  target: "ThreeDsChallengeIFrame",
23
23
  method: "post",
24
24
  ref_key: "form",
25
25
  ref: b
26
- }, [d("input", {
26
+ }, [a("input", {
27
27
  type: "hidden",
28
28
  name: "PaReq",
29
- value: r(x)
29
+ value: s(x)
30
30
  }, null, 8, v)], 8, _)
31
31
  ])])]));
32
32
  }
@@ -1,4 +1,4 @@
1
- import { t as e } from "./MetricsGlobalThreeDsProvider-B-EQQsEV.js";
1
+ import { t as e } from "./MetricsGlobalThreeDsProvider-C93ttqbB.js";
2
2
  // src/sdk/3ds/EpnaThreeDsProvider.ts
3
3
  var t = class extends e {
4
4
  getType() {
@@ -1,4 +1,4 @@
1
- import { t as e } from "./MetricsGlobalThreeDsProvider-B-EQQsEV.js";
1
+ import { t as e } from "./MetricsGlobalThreeDsProvider-C93ttqbB.js";
2
2
  // src/sdk/3ds/FlashBancThreeDsProvider.ts
3
3
  var t = class extends e {
4
4
  getType() {
@@ -0,0 +1,30 @@
1
+ import { t as e } from "./DefaultThreeDsProvider-bLoDSnkd.js";
2
+ import { n as t, r as n, t as r } from "./managedOrders-ojoMZ0Ab.js";
3
+ import { n as i } from "./CloseIcon-Ejad61tT.js";
4
+ import { t as a } from "./whenRendered-jR4Jls4M.js";
5
+ // src/sdk/3ds/ForterThreeDsProvider.ts
6
+ var { hideSpinner: o } = i(), s = class extends e {
7
+ getType() {
8
+ return "Forter";
9
+ }
10
+ onDoAuthSuccess = (e, i) => {
11
+ let s = JSON.parse(i);
12
+ this.log(`[${this.getType()}][onDoAuthSuccess]`, s);
13
+ let c = this.options.clientParameters?.SiteId || "", l = s.managedOrderToken;
14
+ !l || !r.test(c) ? this.onError(e, "3DS could not be started") : t(c).then(() => {
15
+ let e = !1, t = a(this.container, () => {
16
+ e = !0, this.setChallengeFrameVisible(!0), o();
17
+ });
18
+ n(l, this.container, (n) => {
19
+ t(), e && this.setChallengeFrameVisible(!1), n ? (this.log(`[${this.getType()}]: manageOrder failed`, n), this.onError(400, "3DS failed")) : this.onPostAuth();
20
+ });
21
+ }, (e) => {
22
+ this.log(`[${this.getType()}]: managedOrders.js failed to load`, e), this.onError(400, "3DS could not be started");
23
+ });
24
+ };
25
+ };
26
+ // src/sdk/3ds/forter.ts
27
+ function c(e, t, n) {
28
+ return new s(e, t, n);
29
+ }
30
+ export { c as default };
@@ -1,7 +1,7 @@
1
- import { t as e } from "./DefaultThreeDsProvider-CzqbXEws.js";
2
- import { Ot as t, Tt as n, Z as r, _t as i, ct as a, dt as o, n as s, vt as c, xt as l, zt as u } from "./CloseIcon-B65NDIbM.js";
1
+ import { t as e } from "./DefaultThreeDsProvider-bLoDSnkd.js";
2
+ import { Mt as t, St as n, Tt as r, Ut as i, ft as a, ht as o, kt as s, n as c, tt as l, xt as u } from "./CloseIcon-Ejad61tT.js";
3
3
  // src/sdk/3ds/GPayments.vue?vue&type=script&setup=true&lang.ts
4
- var d = { class: "mask" }, f = { class: "wrapper" }, p = ["src"], m = /*#__PURE__*/ r(/* @__PURE__ */ n({
4
+ var d = { class: "mask" }, f = { class: "wrapper" }, p = ["src"], m = /*#__PURE__*/ l(/* @__PURE__ */ s({
5
5
  __name: "GPayments",
6
6
  props: {
7
7
  url: {},
@@ -9,25 +9,25 @@ var d = { class: "mask" }, f = { class: "wrapper" }, p = ["src"], m = /*#__PURE_
9
9
  height: {}
10
10
  },
11
11
  setup(e) {
12
- let n = e, r = i(() => a(n.url) ? n.url : "");
13
- function o() {
12
+ let o = e, s = u(() => a(o.url) ? o.url : "");
13
+ function c() {
14
14
  return {
15
- width: `${n.width || 650}px`,
16
- height: `${n.height || 400}px`
15
+ width: `${o.width || 650}px`,
16
+ height: `${o.height || 400}px`
17
17
  };
18
18
  }
19
- return (e, n) => (t(), l("div", d, [c("div", f, [c("div", {
19
+ return (e, a) => (t(), r("div", d, [n("div", f, [n("div", {
20
20
  class: "container",
21
- style: u([o(), {
21
+ style: i([c(), {
22
22
  padding: "0",
23
23
  margin: "0"
24
24
  }])
25
- }, [c("iframe", {
26
- src: r.value,
27
- style: u(o())
25
+ }, [n("iframe", {
26
+ src: s.value,
27
+ style: i(c())
28
28
  }, null, 12, p)], 4)])]));
29
29
  }
30
- }), [["__scopeId", "data-v-cf5aa816"]]), { hideSpinner: h } = s(), g = class extends e {
30
+ }), [["__scopeId", "data-v-cf5aa816"]]), { hideSpinner: h } = c(), g = class extends e {
31
31
  getType() {
32
32
  return "GPayments";
33
33
  }
@@ -1,4 +1,4 @@
1
- import { t as e } from "./MetricsGlobalThreeDsProvider-B-EQQsEV.js";
1
+ import { t as e } from "./MetricsGlobalThreeDsProvider-C93ttqbB.js";
2
2
  // src/sdk/3ds/metrics_global.ts
3
3
  function t(t, n, r) {
4
4
  return new e(t, n, r);
@@ -1,4 +1,4 @@
1
- import { t as e } from "./MetricsGlobalThreeDsProvider-B-EQQsEV.js";
1
+ import { t as e } from "./MetricsGlobalThreeDsProvider-C93ttqbB.js";
2
2
  // src/sdk/3ds/NmiThreeDsProvider.ts
3
3
  var t = class extends e {
4
4
  getType() {
@@ -1,7 +1,7 @@
1
- import { Et as e, Ot as t, Tt as n, Z as r, dt as i, h as a, n as o, vt as s, xt as c } from "./CloseIcon-B65NDIbM.js";
2
- import { t as l } from "./DefaultThreeDsProvider-CzqbXEws.js";
1
+ import { At as e, Mt as t, St as n, Tt as r, h as i, ht as a, kt as o, n as s, tt as c } from "./CloseIcon-Ejad61tT.js";
2
+ import { t as l } from "./DefaultThreeDsProvider-bLoDSnkd.js";
3
3
  // src/sdk/3ds/nuvei.vue?vue&type=script&setup=true&lang.ts
4
- var u = { class: "mask" }, d = /*#__PURE__*/ r(/* @__PURE__ */ n({
4
+ var u = { class: "mask" }, d = /*#__PURE__*/ c(/* @__PURE__ */ o({
5
5
  __name: "nuvei",
6
6
  props: {
7
7
  threeDSServerTransID: {},
@@ -21,47 +21,47 @@ var u = { class: "mask" }, d = /*#__PURE__*/ r(/* @__PURE__ */ n({
21
21
  email: {},
22
22
  country: {}
23
23
  },
24
- setup(n) {
25
- let { hideSpinner: r, showSpinner: i } = o(), a = n;
24
+ setup(i) {
25
+ let { hideSpinner: a, showSpinner: o } = s(), c = i;
26
26
  e(() => {
27
- i();
27
+ o();
28
28
  let e = document.createElement("script");
29
29
  e.type = "text/javascript", e.src = "https://cdn.safecharge.com/safecharge_resources/v1/websdk/safecharge.js", e.onload = () => {
30
30
  let e = new MutationObserver(function() {
31
- document.getElementsByClassName("sfcModal-dialog")[0] && (r(), e.disconnect());
31
+ document.getElementsByClassName("sfcModal-dialog")[0] && (a(), e.disconnect());
32
32
  }), t = { childList: !0 }, n = document.querySelector("body");
33
33
  e.observe(n, t), l();
34
34
  }, document.head.appendChild(e);
35
35
  });
36
36
  function l() {
37
37
  let e = window.SafeCharge({
38
- env: a.env,
39
- merchantId: a.merchantId,
40
- merchantSiteId: a.merchantSiteId
38
+ env: c.env,
39
+ merchantId: c.merchantId,
40
+ merchantSiteId: c.merchantSiteId
41
41
  });
42
42
  e.fields({
43
43
  fonts: [{ cssUrl: "https://fonts.googleapis.com/css?family=Source+Code+Pro" }],
44
44
  locale: "en"
45
45
  });
46
- let t = a.userPaymentOptionId ? {
47
- userPaymentOptionId: a.userPaymentOptionId,
48
- ...a.CVV ? { card: { CVV: a.CVV } } : {}
46
+ let t = c.userPaymentOptionId ? {
47
+ userPaymentOptionId: c.userPaymentOptionId,
48
+ ...c.CVV ? { card: { CVV: c.CVV } } : {}
49
49
  } : { card: {
50
- cardNumber: a.cardNumber,
51
- cardHolderName: a.cardHolderName,
52
- expirationMonth: a.expirationMonth,
53
- expirationYear: a.expirationYear,
54
- CVV: a.CVV
50
+ cardNumber: c.cardNumber,
51
+ cardHolderName: c.cardHolderName,
52
+ expirationMonth: c.expirationMonth,
53
+ expirationYear: c.expirationYear,
54
+ CVV: c.CVV
55
55
  } };
56
56
  e.authenticate3d({
57
- sessionToken: a.sessionToken,
58
- ...a.userTokenId ? { userTokenId: a.userTokenId } : {},
57
+ sessionToken: c.sessionToken,
58
+ ...c.userTokenId ? { userTokenId: c.userTokenId } : {},
59
59
  paymentOption: t,
60
60
  billingAddress: {
61
- firstName: a.firstName,
62
- lastName: a.lastName,
63
- email: a.email,
64
- country: a.country
61
+ firstName: c.firstName,
62
+ lastName: c.lastName,
63
+ email: c.email,
64
+ country: c.country
65
65
  }
66
66
  }, function(e) {
67
67
  window.postMessage({
@@ -70,9 +70,9 @@ var u = { class: "mask" }, d = /*#__PURE__*/ r(/* @__PURE__ */ n({
70
70
  }, "*");
71
71
  });
72
72
  }
73
- return (e, n) => (t(), c("div", u, [...n[0] ||= [s("div", { class: "wrapper" }, [s("div", { class: "container" })], -1)]]));
73
+ return (e, i) => (t(), r("div", u, [...i[0] ||= [n("div", { class: "wrapper" }, [n("div", { class: "container" })], -1)]]));
74
74
  }
75
- }), [["__scopeId", "data-v-299db412"]]), { hideSpinner: f } = o(), p = class extends l {
75
+ }), [["__scopeId", "data-v-299db412"]]), { hideSpinner: f } = s(), p = class extends l {
76
76
  _paResPayload = null;
77
77
  getType() {
78
78
  return "Nuvei";
@@ -90,7 +90,7 @@ var u = { class: "mask" }, d = /*#__PURE__*/ r(/* @__PURE__ */ n({
90
90
  doNuveiChallenge(e, t, n) {
91
91
  let r = JSON.parse(e);
92
92
  if (r === null || !r.merchantId || !r.merchantSiteId) {
93
- this.threeDsProcessor?.onError({ error: a });
93
+ this.threeDsProcessor?.onError({ error: i });
94
94
  return;
95
95
  }
96
96
  if (this.threeDsProcessor?.getTokenId() && !r?.userPaymentOptionId) {
@@ -98,7 +98,7 @@ var u = { class: "mask" }, d = /*#__PURE__*/ r(/* @__PURE__ */ n({
98
98
  return;
99
99
  }
100
100
  t && (r.firstName = t.firstName, r.lastName = t.lastName, r.email = t.email, r.country = t.country), n && (r.cardNumber = n.cardNumber, r.cardHolderName = n.cardholder || "", r.expirationMonth = n.expiryDate.substring(2, 4), r.expirationYear = n.expiryDate.substring(0, 2), r.CVV = n.ccv), this.setChallengeFrameVisible(!0);
101
- let { destroy: o } = i({
101
+ let { destroy: o } = a({
102
102
  el: document.body,
103
103
  component: d,
104
104
  props: r,
@@ -111,7 +111,7 @@ var u = { class: "mask" }, d = /*#__PURE__*/ r(/* @__PURE__ */ n({
111
111
  onSuccess = (e, t) => {
112
112
  this.closeChallenge(), f();
113
113
  let n = JSON.parse(t);
114
- n.authenticationValue ? this.threeDsProcessor?.onSuccess(n) : (this.log(`[${this.getType()}][_onSuccess] ${a}`, n), this.threeDsProcessor?.onError({ error: a }));
114
+ n.authenticationValue ? this.threeDsProcessor?.onSuccess(n) : (this.log(`[${this.getType()}][_onSuccess] ${i}`, n), this.threeDsProcessor?.onError({ error: i }));
115
115
  };
116
116
  onDoAuthSuccess = (e, t) => {
117
117
  let n = JSON.parse(t);
@@ -1,4 +1,4 @@
1
- import { t as e } from "./MetricsGlobalThreeDsProvider-B-EQQsEV.js";
1
+ import { t as e } from "./MetricsGlobalThreeDsProvider-C93ttqbB.js";
2
2
  // src/sdk/3ds/PayabliThreeDsProvider.ts
3
3
  var t = class extends e {
4
4
  getType() {
@@ -163,8 +163,9 @@ export declare type DropInGooglePayOptionsType = {
163
163
  };
164
164
 
165
165
  export declare type DropInOptionsType = {
166
- paypalButtonStyle?: string;
166
+ paypalButtonStyle?: PaypalButtonColor | PaypalButtonStyle;
167
167
  paypalEnablePayIn4?: boolean;
168
+ paypalHideShipping?: boolean;
168
169
  cardProviderId?: string;
169
170
  paypalProviderId?: string;
170
171
  payToProviderId?: string;
@@ -314,7 +315,8 @@ export declare interface PayfurlInterface {
314
315
  addPaypal(parentId: string, amount: number, currency: string, providerId?: string, options?: PaypalOptionsType): PayfurlInterface;
315
316
  addPayTo(parentId: string, amount: number, providerId?: string, options?: PayToOptionsType): PayfurlInterface;
316
317
  addGooglePay(parentId: string, amount: number, currency: string, providerId?: string, options?: GooglePayOptionsType): PayfurlInterface;
317
- addApplePay(parentId: string, amount: number, currency: string, providerId: string, options: ApplePayOptionsType): PayfurlInterface;
318
+ addApplePay(parentId: string, amount: number, currency: string, providerId?: string, options?: ApplePayOptionsType): PayfurlInterface;
319
+ isApplePayAvailable(): Promise<boolean>;
318
320
  addCheckout(parentId: string, amount: number, currency: string, providerType: string, providerId: string, options: CheckoutOptionsType, checkoutOptions: {
319
321
  [key: string]: string;
320
322
  }): PayfurlInterface;
@@ -325,6 +327,8 @@ export declare interface PayfurlInterface {
325
327
  onFailure(f: (message: FailureResponseType) => void): PayfurlInterface;
326
328
  successMessage(message: string): PayfurlInterface;
327
329
  onLoaded(f: () => void): PayfurlInterface;
330
+ onPaymentMethodStatus(f: (status: PaymentMethodStatusType) => void): PayfurlInterface;
331
+ onThreeDsProgress(f: (progress: ThreeDsProgressType) => void): PayfurlInterface;
328
332
  onValidationStatusChange(f: (status: string, message: string) => void): PayfurlInterface;
329
333
  onValidate(f: () => boolean): PayfurlInterface;
330
334
  setBillingAddress(address: AddressInfoType): PayfurlInterface;
@@ -334,6 +338,14 @@ export declare interface PayfurlInterface {
334
338
  addSavedPaymentMethods(iframeParentId: string, customerId: string, options?: AddSavedPaymentMethodsOptionsType): PayfurlInterface;
335
339
  }
336
340
 
341
+ export declare type PaymentMethodStatusType = {
342
+ paymentMethod: "googlepay" | "applepay" | "paypal" | "payto" | "checkout" | "upi";
343
+ providerType?: string;
344
+ status: "rendered" | "unavailable";
345
+ reason?: "no_provider" | "unsupported" | "error";
346
+ message?: string;
347
+ };
348
+
337
349
  declare enum PaymentType {
338
350
  card = "card",
339
351
  paypal = "paypal",
@@ -350,9 +362,23 @@ declare enum PaymentType {
350
362
  dlocal = "dlocal"
351
363
  }
352
364
 
365
+ export declare type PaypalButtonColor = "gold" | "blue" | "silver" | "white" | "black";
366
+
367
+ export declare type PaypalButtonStyle = {
368
+ color?: PaypalButtonColor;
369
+ shape?: "rect" | "pill" | "sharp";
370
+ borderRadius?: number;
371
+ label?: "paypal" | "checkout" | "buynow" | "pay" | "installment";
372
+ period?: number;
373
+ layout?: "vertical" | "horizontal";
374
+ height?: number;
375
+ tagline?: boolean;
376
+ disableMaxWidth?: boolean;
377
+ };
378
+
353
379
  export declare type PaypalOptionsType = {
354
380
  hideShipping?: boolean;
355
- paypalButtonStyle?: any;
381
+ paypalButtonStyle?: PaypalButtonColor | PaypalButtonStyle | null;
356
382
  paypalEnablePayIn4?: boolean;
357
383
  transfer?: {
358
384
  account: string;
@@ -397,6 +423,12 @@ export declare type SuccessResponseType = {
397
423
  };
398
424
  };
399
425
 
426
+ export declare type ThreeDsProgressType = {
427
+ step: "started" | "challenge" | "completed";
428
+ success?: boolean;
429
+ error?: string;
430
+ };
431
+
400
432
  /**
401
433
  * The shape of `errorDetails` that the tokenise flow populates on `onFailure` when
402
434
  * `POST /token/card` fails during `tokeniseWith3Ds`, the case PAY-4804 was raised for.