@payfurl/react-plugin 1.0.2 → 1.0.6

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 (35) hide show
  1. package/dist/{CxPayThreeDsProvider-qI6LA8iK-7hd6hU9V.js → CxPayThreeDsProvider-4BCpCsdK-5y-jJAUH.js} +1 -1
  2. package/dist/{DefaultThreeDsProvider-BKnpkX8X-Cz7DrRsl.js → DefaultThreeDsProvider-C8FSCo8b-Bifhwxc_.js} +9 -9
  3. package/dist/{EcentricThreeDsProvider-Dor61dsV-GhDmnDn-.js → EcentricThreeDsProvider-DMFPFtaO-B6oROY8T.js} +19 -19
  4. package/dist/{EpnaThreeDsProvider-6j4cBf2g-Cd_oxzGb.js → EpnaThreeDsProvider-B5S5hU_--Dsl9eOr2.js} +1 -1
  5. package/dist/{FlashBancThreeDsProvider-B1IMjfpm-DrqCM_Cb.js → FlashBancThreeDsProvider-luFjZ63i-BySOhThG.js} +1 -1
  6. package/dist/{GPaymentsThreeDsProvider-PKB94NB4-CNkJLCnl.js → GPaymentsThreeDsProvider-6qulsjP4-CfWQs-AG.js} +9 -9
  7. package/dist/{MetricsGlobalThreeDsProvider-CkIGiDkd-DUSl24lr.js → MetricsGlobalThreeDsProvider-CMbA70S4-DWNzNSwW.js} +37 -37
  8. package/dist/{NmiThreeDsProvider-CcMEqhmQ-CFas_kIM.js → NmiThreeDsProvider-CaDEfbnA-DS5gnDcf.js} +1 -1
  9. package/dist/{NuveiThreeDsProvider-CwXxM_h7-BITQd7Iq.js → NuveiThreeDsProvider-NHowIDoE-_Je2HZn5.js} +19 -19
  10. package/dist/{PayGLocalThreeDsProvider-sIfhhTia-CvvMuyyq.js → PayGLocalThreeDsProvider-BURFf-eJ-CffD4wbC.js} +13 -13
  11. package/dist/PayWayAppleButton-Kiqg1nWI-DlAdkLl4.js +157 -0
  12. package/dist/{PayabliThreeDsProvider-Dbril8Rp-3ZWzXe4X.js → PayabliThreeDsProvider-C6ourY3u-4S5vdBoa.js} +1 -1
  13. package/dist/{SkyBankThreeDsProvider-C07fNAvi-DkOg-Std.js → SkyBankThreeDsProvider-CocwPgj3-CSQSEtCI.js} +1 -1
  14. package/dist/{cxpay-CEQ4-BTN-DtdA08b6.js → cxpay-BCOYAnDK-BUEsu20K.js} +1 -1
  15. package/dist/{default-C_HQSLX4-DWKpaokp.js → default-B9fgGMCu-cvfbDfsL.js} +1 -1
  16. package/dist/{ecentric-BNc1h8Eo-wq39vDkR.js → ecentric-BdxLq2Fp-DpZS-ORt.js} +1 -1
  17. package/dist/{epna-B9Y2q1w--DGUu8ZJW.js → epna-VMfQGBHy-Db9GqDwv.js} +1 -1
  18. package/dist/{flashbanc-C0Ty8vp7-CIVRvn_D.js → flashbanc-C5_gW-Ru-BLtd2df2.js} +1 -1
  19. package/dist/{gpayments-rnHqXJDK-DoKIhXX0.js → gpayments-ta5TF0Vv-DjYWBYkx.js} +1 -1
  20. package/dist/{index-C07A5tMl.js → index-CwPndRAR.js} +5951 -5566
  21. package/dist/{metrics_global-B6yYoxRR-CP7W0f7G.js → metrics_global-B9vt1fuY-B-mFPkPv.js} +1 -1
  22. package/dist/nmi-7Noaj-hm-C8r_dvJq.js +7 -0
  23. package/dist/{nuvei-Bh2t9NPs-CeU1te1v.js → nuvei-BfNusJeN-C-yeYE1M.js} +1 -1
  24. package/dist/{payabli-NfqCrBOu-CjD5Swso.js → payabli-NvcAIz8a-CVrjJnVT.js} +1 -1
  25. package/dist/payfurl-react.es.js +1 -1
  26. package/dist/payfurl-react.umd.js +43 -24
  27. package/dist/{payglocal-D3sg1uGV-zrK77nM8.js → payglocal-XRSVL_Mu-xTaim_K3.js} +1 -1
  28. package/dist/payway_rest-DYhBIk_r-i9UWjHTv.js +7 -0
  29. package/dist/{skybank-CrMnPsZ3-Bz6P0PvB.js → skybank-CLI49-PQ-AY_KHOf-.js} +1 -1
  30. package/dist/src/sdk/types/DropInOptions.type.d.ts +2 -0
  31. package/dist/src/sdk/types/PaymentType.type.d.ts +15 -0
  32. package/package.json +2 -2
  33. package/dist/PayWayAppleButton-BhhFv3LB-C565KkXF.js +0 -141
  34. package/dist/nmi-2JLTZ129-DlW8mhIU.js +0 -7
  35. package/dist/payway_rest-B7rIKWt2-BQ72GP3z.js +0 -7
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-CkIGiDkd-DUSl24lr.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-CMbA70S4-DWNzNSwW.js";
2
2
  class t extends e {
3
3
  getType() {
4
4
  return "CxPay";
@@ -1,6 +1,6 @@
1
- import { n as d, f as S, y as g, j as p, M as m, t as T, N as v, W as I, z as f, a as u, x as y, c as A, b as C } from "./index-C07A5tMl.js";
1
+ import { c as d, g as S, v as g, z as p, F as m, i as T, a as v, Y as I, J as f, N as u, $ as y, b as A, O as C } from "./index-CwPndRAR.js";
2
2
  var R = Object.defineProperty, E = (l, e, s) => e in l ? R(l, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : l[e] = s, n = (l, e, s) => E(l, typeof e != "symbol" ? e + "" : e, s);
3
- const P = { class: "mask" }, b = { class: "wrapper" }, U = { class: "container" }, M = ["action"], L = ["value"], $ = /* @__PURE__ */ m({
3
+ const P = { class: "mask" }, b = { class: "wrapper" }, U = { class: "container" }, $ = ["action"], L = ["value"], M = /* @__PURE__ */ m({
4
4
  __name: "ThreeDsChallenge",
5
5
  props: {
6
6
  threeDSServerTransID: {},
@@ -39,12 +39,12 @@ const P = { class: "mask" }, b = { class: "wrapper" }, U = { class: "container"
39
39
  name: "creq",
40
40
  value: C(r)
41
41
  }, null, 8, L)
42
- ], 8, M)
42
+ ], 8, $)
43
43
  ])
44
44
  ])
45
45
  ]));
46
46
  }
47
- }), _ = /* @__PURE__ */ p($, [["__scopeId", "data-v-ac351494"]]);
47
+ }), _ = /* @__PURE__ */ p(M, [["__scopeId", "data-v-ac351494"]]);
48
48
  class w {
49
49
  constructor() {
50
50
  n(this, "iframeId", "threeDsIframeMethod"), n(this, "containerId", "payfurlContainerFormInvoker"), n(this, "iframe", null), n(this, "container", null);
@@ -64,7 +64,7 @@ class w {
64
64
  t.submit();
65
65
  }
66
66
  }
67
- const { hideSpinner: D, showSpinner: N } = d(), k = "3ds_method_invocation_complete", O = "3ds_challenge_complete";
67
+ const { hideSpinner: D, showSpinner: N } = d(), O = "3ds_method_invocation_complete", k = "3ds_challenge_complete";
68
68
  class q {
69
69
  constructor(e, s, a) {
70
70
  n(this, "log"), n(this, "container"), n(this, "options"), n(this, "threeDsProcessor", null), n(this, "threeDSDestroy", () => {
@@ -166,11 +166,11 @@ class q {
166
166
  messageHandler(e) {
167
167
  var s, a;
168
168
  if (!(!((s = e == null ? void 0 : e.data) != null && s.status) || ((a = e == null ? void 0 : e.data) == null ? void 0 : a.status) === S)) {
169
- if (e.data.status === k) {
169
+ if (e.data.status === O) {
170
170
  e.stopPropagation(), this.invocationComplete(e);
171
171
  return;
172
172
  }
173
- e.data.status === O && (e.stopPropagation(), this.challengeComplete(e));
173
+ e.data.status === k && (e.stopPropagation(), this.challengeComplete(e));
174
174
  }
175
175
  }
176
176
  invocationComplete(e) {
@@ -219,6 +219,6 @@ class q {
219
219
  }
220
220
  export {
221
221
  q as DefaultThreeDsProvider,
222
- O as THREE_DS_CHALLENGE_COMPLETE,
223
- k as THREE_DS_METHOD_INVOCATION_COMPLETE
222
+ k as THREE_DS_CHALLENGE_COMPLETE,
223
+ O as THREE_DS_METHOD_INVOCATION_COMPLETE
224
224
  };
@@ -1,7 +1,7 @@
1
- import { DefaultThreeDsProvider as l } from "./DefaultThreeDsProvider-BKnpkX8X-Cz7DrRsl.js";
2
- import { y as i, j as h, M as c, t as u, N as D, W as d, z as p, a as o, x as m, c as g, b as v } from "./index-C07A5tMl.js";
3
- var y = Object.defineProperty, S = (a, e, t) => e in a ? y(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, T = (a, e, t) => S(a, e + "", t);
4
- const f = { class: "mask" }, P = { class: "wrapper" }, I = { class: "container" }, C = ["action"], A = ["value"], b = /* @__PURE__ */ c({
1
+ import { DefaultThreeDsProvider as l } from "./DefaultThreeDsProvider-C8FSCo8b-Bifhwxc_.js";
2
+ import { v as i, z as h, F as c, i as u, a as D, Y as d, J as p, N as o, $ as v, b as m, O as g } from "./index-CwPndRAR.js";
3
+ var S = Object.defineProperty, T = (r, e, t) => e in r ? S(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, y = (r, e, t) => T(r, e + "", t);
4
+ const f = { class: "mask" }, P = { class: "wrapper" }, I = { class: "container" }, C = ["action"], b = ["value"], A = /* @__PURE__ */ c({
5
5
  __name: "ecentric",
6
6
  props: {
7
7
  threeDSServerTransID: {},
@@ -9,16 +9,16 @@ const f = { class: "mask" }, P = { class: "wrapper" }, I = { class: "container"
9
9
  formAction: {},
10
10
  authenticationValue: {}
11
11
  },
12
- setup(a) {
13
- const e = a, t = u(null), n = e.authenticationValue;
12
+ setup(r) {
13
+ const e = r, t = u(null), n = e.authenticationValue;
14
14
  return D(() => {
15
- var r;
16
- (r = t.value) == null || r.submit();
17
- }), (r, s) => (d(), p("div", f, [
15
+ var a;
16
+ (a = t.value) == null || a.submit();
17
+ }), (a, s) => (d(), p("div", f, [
18
18
  o("div", P, [
19
19
  o("div", I, [
20
- m(g, {
21
- onClick: s[0] || (s[0] = (E) => r.emit("close"))
20
+ v(m, {
21
+ onClick: s[0] || (s[0] = (F) => a.emit("close"))
22
22
  }),
23
23
  s[1] || (s[1] = o("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
24
24
  o("form", {
@@ -31,17 +31,17 @@ const f = { class: "mask" }, P = { class: "wrapper" }, I = { class: "container"
31
31
  o("input", {
32
32
  type: "hidden",
33
33
  name: "PaReq",
34
- value: v(n)
35
- }, null, 8, A)
34
+ value: g(n)
35
+ }, null, 8, b)
36
36
  ], 8, C)
37
37
  ])
38
38
  ])
39
39
  ]));
40
40
  }
41
- }), V = /* @__PURE__ */ h(b, [["__scopeId", "data-v-8d26953f"]]);
41
+ }), $ = /* @__PURE__ */ h(A, [["__scopeId", "data-v-8d26953f"]]);
42
42
  class R extends l {
43
43
  constructor() {
44
- super(...arguments), T(this, "paResPayload", "");
44
+ super(...arguments), y(this, "paResPayload", "");
45
45
  }
46
46
  getType() {
47
47
  return "Ecentric";
@@ -58,9 +58,9 @@ class R extends l {
58
58
  }
59
59
  doChallenge(e, t, n) {
60
60
  this.log(`[${this.getType()}][doChallenge]`);
61
- const { destroy: r } = i({
61
+ const { destroy: a } = i({
62
62
  el: document.body,
63
- component: V,
63
+ component: $,
64
64
  props: {
65
65
  threeDSServerTransID: this.threeDSServerTransID,
66
66
  acsTransID: t,
@@ -70,12 +70,12 @@ class R extends l {
70
70
  on: {
71
71
  close: () => {
72
72
  var s;
73
- r(), this.threeDSDestroy = () => {
73
+ a(), this.threeDSDestroy = () => {
74
74
  }, (s = this.threeDsProcessor) == null || s.onError({ error: "Challenge cancelled" });
75
75
  }
76
76
  }
77
77
  });
78
- this.threeDSDestroy = r;
78
+ this.threeDSDestroy = a;
79
79
  }
80
80
  challengeComplete(e) {
81
81
  this.log(`[${this.getType()}]: 3Ds Challenge complete`, e.data), this.closeChallenge(), this.log(`[${this.getType()}]: cresData`, e.data.cres), e.data.cres ? (this.paResPayload = e.data.cres, this.onPostAuth()) : (this.log(`[${this.getType()}]: Failed 3DS Challenge`, e.data), this.onError(400, "Failed 3DS Challenge"));
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-CkIGiDkd-DUSl24lr.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-CMbA70S4-DWNzNSwW.js";
2
2
  class t extends e {
3
3
  getType() {
4
4
  return "EPNA";
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-CkIGiDkd-DUSl24lr.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-CMbA70S4-DWNzNSwW.js";
2
2
  class s extends e {
3
3
  getType() {
4
4
  return "FlashBanc";
@@ -1,7 +1,7 @@
1
- import { DefaultThreeDsProvider as n } from "./DefaultThreeDsProvider-BKnpkX8X-Cz7DrRsl.js";
2
- import { y as o, j as l, M as u, W as c, z as p, a as h, k as i } from "./index-C07A5tMl.js";
3
- var d = Object.defineProperty, g = (r, e, t) => e in r ? d(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, a = (r, e, t) => g(r, typeof e != "symbol" ? e + "" : e, t);
4
- const D = { class: "mask" }, S = { class: "wrapper" }, m = ["src"], y = /* @__PURE__ */ u({
1
+ import { DefaultThreeDsProvider as a } from "./DefaultThreeDsProvider-C8FSCo8b-Bifhwxc_.js";
2
+ import { v as o, z as l, F as u, Y as c, J as p, N as h, E as i } from "./index-CwPndRAR.js";
3
+ var d = Object.defineProperty, g = (r, e, t) => e in r ? d(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, n = (r, e, t) => g(r, typeof e != "symbol" ? e + "" : e, t);
4
+ const S = { class: "mask" }, D = { class: "wrapper" }, m = ["src"], y = /* @__PURE__ */ u({
5
5
  __name: "GPayments",
6
6
  props: {
7
7
  url: {},
@@ -16,8 +16,8 @@ const D = { class: "mask" }, S = { class: "wrapper" }, m = ["src"], y = /* @__PU
16
16
  height: `${e.height || 400}px`
17
17
  };
18
18
  }
19
- return (s, v) => (c(), p("div", D, [
20
- h("div", S, [
19
+ return (s, v) => (c(), p("div", S, [
20
+ h("div", D, [
21
21
  h("div", {
22
22
  class: "container",
23
23
  style: i([t(), { padding: "0", margin: "0" }])
@@ -31,9 +31,9 @@ const D = { class: "mask" }, S = { class: "wrapper" }, m = ["src"], y = /* @__PU
31
31
  ]));
32
32
  }
33
33
  }), f = /* @__PURE__ */ l(y, [["__scopeId", "data-v-9b0ef3a8"]]);
34
- class A extends n {
34
+ class A extends a {
35
35
  constructor() {
36
- super(...arguments), a(this, "onDoAuthSuccess", (e, t) => {
36
+ super(...arguments), n(this, "onDoAuthSuccess", (e, t) => {
37
37
  const s = JSON.parse(t);
38
38
  if (this.log(`[${this.getType()}][onDoAuthSuccess]`, s), !s.transStatus) {
39
39
  this.onError(e, "No transStatus specified");
@@ -51,7 +51,7 @@ class A extends n {
51
51
  this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ${s.transStatus}`), this.onPostAuth();
52
52
  break;
53
53
  }
54
- }), a(this, "onInitAuthSuccess", (e, t) => {
54
+ }), n(this, "onInitAuthSuccess", (e, t) => {
55
55
  const s = JSON.parse(t);
56
56
  if (this.log(`[${this.getType()}][onInitAuthSuccess]`, s), !s.threeDSAuthURL) {
57
57
  this.onError(e, "No AuthUrl specified");
@@ -1,23 +1,23 @@
1
- import { DefaultThreeDsProvider as P } from "./DefaultThreeDsProvider-BKnpkX8X-Cz7DrRsl.js";
2
- import { n as C, P as d, y as S, j as w, M as A, t as E, N as f, e as b, A as T, U as x, W as L, z as N, a as g, x as _, c as G } from "./index-C07A5tMl.js";
3
- var I = Object.defineProperty, M = (l, e, t) => e in l ? I(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t, m = (l, e, t) => M(l, typeof e != "symbol" ? e + "" : e, t);
4
- const $ = { class: "mask" }, H = { class: "wrapper" }, j = { class: "container" }, O = /* @__PURE__ */ A({
1
+ import { DefaultThreeDsProvider as C } from "./DefaultThreeDsProvider-C8FSCo8b-Bifhwxc_.js";
2
+ import { c as P, d, v as S, z as w, F as E, i as A, a as b, u as f, D as T, R as L, Y as _, J as N, N as g, $ as x, b as G } from "./index-CwPndRAR.js";
3
+ var I = Object.defineProperty, $ = (l, e, t) => e in l ? I(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t, m = (l, e, t) => $(l, typeof e != "symbol" ? e + "" : e, t);
4
+ const H = { class: "mask" }, M = { class: "wrapper" }, O = { class: "container" }, F = /* @__PURE__ */ E({
5
5
  __name: "MetricsGlobalThreeDsChallenge",
6
6
  emits: ["close", "submit"],
7
7
  setup(l, { emit: e }) {
8
- const t = e, a = E(!1);
9
- function o(h) {
8
+ const t = e, o = A(!1);
9
+ function a(h) {
10
10
  var r;
11
- ["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes((r = h.data) == null ? void 0 : r.message) && (a.value = h.data.message === "3DS_CHALLENGE_SHOW");
11
+ ["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes((r = h.data) == null ? void 0 : r.message) && (o.value = h.data.message === "3DS_CHALLENGE_SHOW");
12
12
  }
13
- return f(() => {
14
- window.addEventListener("message", o);
15
- }), b(() => {
16
- window.removeEventListener("message", o);
17
- }), (h, r) => T((L(), N("div", $, [
18
- g("div", H, [
19
- g("div", j, [
20
- _(G, {
13
+ return b(() => {
14
+ window.addEventListener("message", a);
15
+ }), f(() => {
16
+ window.removeEventListener("message", a);
17
+ }), (h, r) => T((_(), N("div", H, [
18
+ g("div", M, [
19
+ g("div", O, [
20
+ x(G, {
21
21
  onClick: r[0] || (r[0] = (s) => t("close")),
22
22
  id: "3ds-challenge-close"
23
23
  }),
@@ -25,14 +25,14 @@ const $ = { class: "mask" }, H = { class: "wrapper" }, j = { class: "container"
25
25
  ])
26
26
  ])
27
27
  ], 512)), [
28
- [x, a.value]
28
+ [L, o.value]
29
29
  ]);
30
30
  }
31
- }), k = /* @__PURE__ */ w(O, [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: u, showSpinner: F } = C(), p = 5;
32
- class K extends P {
33
- constructor(e, t, a) {
34
- var o;
35
- super(e, t, a), m(this, "gateway"), m(this, "threeDS"), m(this, "numAttempts", 0), this.initScript(((o = a.clientParameters) == null ? void 0 : o.PublicKey) || "");
31
+ }), j = /* @__PURE__ */ w(F, [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: u, showSpinner: k } = P(), D = 5;
32
+ class K extends C {
33
+ constructor(e, t, o) {
34
+ var a;
35
+ super(e, t, o), m(this, "gateway"), m(this, "threeDS"), m(this, "numAttempts", 0), this.initScript(((a = o.clientParameters) == null ? void 0 : a.PublicKey) || "");
36
36
  }
37
37
  getType() {
38
38
  return "MetricsGlobal";
@@ -42,17 +42,17 @@ class K extends P {
42
42
  }
43
43
  onPreAuth() {
44
44
  var e, t;
45
- if (this.log(`[${this.getType()}]: onPreAuth`), !this.threeDS && this.numAttempts >= p) {
45
+ if (this.log(`[${this.getType()}]: onPreAuth`), !this.threeDS && this.numAttempts >= D) {
46
46
  u(), d(this.container, "Error loading 3D Secure");
47
47
  return;
48
48
  }
49
- if (!this.threeDS && this.numAttempts < p) {
49
+ if (!this.threeDS && this.numAttempts < D) {
50
50
  this.numAttempts++, this.log(`[${this.getType()}]: 3DS not ready, retrying in 1s`), setTimeout(() => this.onPreAuth(), 1e3);
51
51
  return;
52
52
  }
53
- (e = this.threeDsProcessor) != null && e.getTokenId() ? (t = this.threeDsProcessor) == null || t.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (a) => {
54
- var o;
55
- (o = this.threeDsProcessor) == null || o.setPaymentInfo(a), this.startAuth();
53
+ (e = this.threeDsProcessor) != null && e.getTokenId() ? (t = this.threeDsProcessor) == null || t.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (o) => {
54
+ var a;
55
+ (a = this.threeDsProcessor) == null || a.setPaymentInfo(o), this.startAuth();
56
56
  }, () => {
57
57
  d(this.container, "Unable to get card information");
58
58
  }) : this.startAuth();
@@ -62,20 +62,20 @@ class K extends P {
62
62
  onPostAuth() {
63
63
  }
64
64
  startAuth() {
65
- var e, t, a, o, h;
65
+ var e, t, o, a, h;
66
66
  this.log(`[${this.getType()}]: startAuth`);
67
67
  const r = (e = this.threeDsProcessor) == null ? void 0 : e.getPaymentInfo();
68
68
  if (!r) {
69
69
  u(), d(this.container, "Payment information is missing");
70
70
  return;
71
71
  }
72
- F();
73
- const s = (t = this.threeDsProcessor) == null ? void 0 : t.getAddressInfo(), D = r.expiryDate.length === 4 ? r.expiryDate[2] + r.expiryDate[3] : "", y = r.expiryDate.length === 4 ? r.expiryDate[0] + r.expiryDate[1] : "", v = {
72
+ k();
73
+ const s = (t = this.threeDsProcessor) == null ? void 0 : t.getAddressInfo(), p = r.expiryDate.length === 4 ? r.expiryDate[2] + r.expiryDate[3] : "", v = r.expiryDate.length === 4 ? r.expiryDate[0] + r.expiryDate[1] : "", y = {
74
74
  cardNumber: r.cardNumber,
75
- cardExpMonth: D,
76
- cardExpYear: parseInt(y) + 2e3,
77
- currency: (a = this.threeDsProcessor) == null ? void 0 : a.getCurrency(),
78
- amount: (o = this.threeDsProcessor) == null ? void 0 : o.getAmount(),
75
+ cardExpMonth: p,
76
+ cardExpYear: parseInt(v) + 2e3,
77
+ currency: (o = this.threeDsProcessor) == null ? void 0 : o.getCurrency(),
78
+ amount: (a = this.threeDsProcessor) == null ? void 0 : a.getAmount(),
79
79
  email: (h = this.threeDsProcessor) == null ? void 0 : h.getEmail(),
80
80
  phone: s == null ? void 0 : s.phoneNumber,
81
81
  city: s == null ? void 0 : s.city,
@@ -85,7 +85,7 @@ class K extends P {
85
85
  firstName: s == null ? void 0 : s.firstName,
86
86
  lastName: s == null ? void 0 : s.lastName,
87
87
  postalCode: s == null ? void 0 : s.postalCode
88
- }, c = this.threeDS.createUI(v);
88
+ }, c = this.threeDS.createUI(y);
89
89
  c.start("#ThreeDsChallengeIFrame"), c.on("challenge", (i) => {
90
90
  this.log(`[${this.getType()}][onChallenge]`, i), u(), this.showChallenge();
91
91
  }), c.on("complete", (i) => {
@@ -109,14 +109,14 @@ class K extends P {
109
109
  }
110
110
  initGateway(e) {
111
111
  this.gateway = window.Gateway.create(e), this.threeDS = this.gateway.get3DSecure(), this.gateway.on("error", (t) => {
112
- var a;
113
- this.log(`[${this.getType()}]: gateway error`, t), (a = this.threeDsProcessor) == null || a.onError({ error: t.message }), this.threeDS = null, this.numAttempts = p;
112
+ var o;
113
+ this.log(`[${this.getType()}]: gateway error`, t), (o = this.threeDsProcessor) == null || o.onError({ error: t.message }), this.threeDS = null, this.numAttempts = D;
114
114
  });
115
115
  }
116
116
  initChallenge() {
117
117
  const { destroy: e } = S({
118
118
  el: document.body,
119
- component: k,
119
+ component: j,
120
120
  on: {
121
121
  close: () => {
122
122
  var t;
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-CkIGiDkd-DUSl24lr.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-CMbA70S4-DWNzNSwW.js";
2
2
  class t extends e {
3
3
  getType() {
4
4
  return "NMI";
@@ -1,6 +1,6 @@
1
- import { n as h, P as u, y as p, j as m, M as g, N as D, W as S, z as y, a as l } from "./index-C07A5tMl.js";
2
- import { DefaultThreeDsProvider as v, THREE_DS_METHOD_INVOCATION_COMPLETE as P, THREE_DS_CHALLENGE_COMPLETE as T } from "./DefaultThreeDsProvider-BKnpkX8X-Cz7DrRsl.js";
3
- var f = Object.defineProperty, N = (o, e, r) => e in o ? f(o, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[e] = r, c = (o, e, r) => N(o, typeof e != "symbol" ? e + "" : e, r);
1
+ import { c as h, d as u, v as p, z as m, F as g, a as D, Y as S, J as v, N as l } from "./index-CwPndRAR.js";
2
+ import { DefaultThreeDsProvider as y, THREE_DS_METHOD_INVOCATION_COMPLETE as P, THREE_DS_CHALLENGE_COMPLETE as T } from "./DefaultThreeDsProvider-C8FSCo8b-Bifhwxc_.js";
3
+ var f = Object.defineProperty, N = (n, e, r) => e in n ? f(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r, c = (n, e, r) => N(n, typeof e != "symbol" ? e + "" : e, r);
4
4
  const I = { class: "mask" }, C = /* @__PURE__ */ g({
5
5
  __name: "nuvei",
6
6
  props: {
@@ -19,8 +19,8 @@ const I = { class: "mask" }, C = /* @__PURE__ */ g({
19
19
  email: {},
20
20
  country: {}
21
21
  },
22
- setup(o) {
23
- const { hideSpinner: e, showSpinner: r } = h(), s = o;
22
+ setup(n) {
23
+ const { hideSpinner: e, showSpinner: r } = h(), s = n;
24
24
  D(() => {
25
25
  r();
26
26
  const t = document.createElement("script");
@@ -28,10 +28,10 @@ const I = { class: "mask" }, C = /* @__PURE__ */ g({
28
28
  const a = new MutationObserver(function() {
29
29
  document.getElementsByClassName("sfcModal-dialog")[0] && (e(), a.disconnect());
30
30
  }), i = { childList: !0 }, d = document.querySelector("body");
31
- a.observe(d, i), n();
31
+ a.observe(d, i), o();
32
32
  }, document.head.appendChild(t);
33
33
  });
34
- function n() {
34
+ function o() {
35
35
  var t = SafeCharge({
36
36
  env: s.env,
37
37
  // Nuvei API environment - 'int' (integration) or 'prod' (production - default if omitted)
@@ -71,22 +71,22 @@ const I = { class: "mask" }, C = /* @__PURE__ */ g({
71
71
  window.postMessage({ status: "3ds_challenge_complete", cres: a }, "*");
72
72
  });
73
73
  }
74
- return (t, a) => (S(), y("div", I, a[0] || (a[0] = [
74
+ return (t, a) => (S(), v("div", I, a[0] || (a[0] = [
75
75
  l("div", { class: "wrapper" }, [
76
76
  l("div", { class: "container" })
77
77
  ], -1)
78
78
  ])));
79
79
  }
80
80
  }), _ = /* @__PURE__ */ m(C, [["__scopeId", "data-v-6293d147"]]), { hideSpinner: E } = h();
81
- class A extends v {
81
+ class A extends y {
82
82
  constructor() {
83
83
  super(...arguments), c(this, "_paResPayload", null), c(this, "onSuccess", (e, r) => {
84
- var s, n;
84
+ var s, o;
85
85
  this.closeChallenge(), E();
86
86
  const t = JSON.parse(r);
87
- t.authenticationValue ? (s = this.threeDsProcessor) == null || s.onSuccess(t) : (this.log(`[${this.getType()}][_onSuccess] 3D Secure failed`, t), (n = this.threeDsProcessor) == null || n.onError({ error: "3D Secure failed" }));
87
+ t.authenticationValue ? (s = this.threeDsProcessor) == null || s.onSuccess(t) : (this.log(`[${this.getType()}][_onSuccess] 3D Secure failed`, t), (o = this.threeDsProcessor) == null || o.onError({ error: "3D Secure failed" }));
88
88
  }), c(this, "onDoAuthSuccess", (e, r) => {
89
- var s, n, t;
89
+ var s, o, t;
90
90
  const a = JSON.parse(r);
91
91
  if (this.log(`[${this.getType()}][onDoAuthSuccess]`, a), !a.transStatus || !a.authenticationValue) {
92
92
  this.onError(e, "No transStatus specified");
@@ -94,7 +94,7 @@ class A extends v {
94
94
  }
95
95
  switch (a.transStatus) {
96
96
  case "C":
97
- this.doNuveiChallenge(a.authenticationValue, (s = this.threeDsProcessor) == null ? void 0 : s.getAddressInfo(), (n = this.threeDsProcessor) == null ? void 0 : n.getPaymentInfo());
97
+ this.doNuveiChallenge(a.authenticationValue, (s = this.threeDsProcessor) == null ? void 0 : s.getAddressInfo(), (o = this.threeDsProcessor) == null ? void 0 : o.getPaymentInfo());
98
98
  break;
99
99
  default:
100
100
  this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ` + a.transStatus), (t = this.threeDsProcessor) == null || t.onSuccess({
@@ -125,8 +125,8 @@ class A extends v {
125
125
  onPreAuth() {
126
126
  var e, r;
127
127
  this.log(`[${this.getType()}]: onPreAuth`), (e = this.threeDsProcessor) != null && e.getTokenId() ? (r = this.threeDsProcessor) == null || r.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (s) => {
128
- var n;
129
- (n = this.threeDsProcessor) == null || n.setPaymentInfo(s), super.onPreAuth();
128
+ var o;
129
+ (o = this.threeDsProcessor) == null || o.setPaymentInfo(s), super.onPreAuth();
130
130
  }, () => {
131
131
  u(this.container, "Unable to get card information");
132
132
  }) : super.onPreAuth();
@@ -143,9 +143,9 @@ class A extends v {
143
143
  }, this.onSuccess, this.onError);
144
144
  }
145
145
  doNuveiChallenge(e, r, s) {
146
- var n;
146
+ var o;
147
147
  const t = JSON.parse(e);
148
- (t === null || !t.merchantId || !t.merchantSiteId) && ((n = this.threeDsProcessor) == null || n.onError({ error: "3D Secure failed" })), r && (t.firstName = r.firstName, t.lastName = r.lastName, t.email = r.email, t.country = r.country), s && (t.cardNumber = s.cardNumber, t.cardHolderName = s.cardholder, t.expirationMonth = s.expiryDate.substring(2, 4), t.expirationYear = s.expiryDate.substring(0, 2), t.CVV = s.ccv);
148
+ (t === null || !t.merchantId || !t.merchantSiteId) && ((o = this.threeDsProcessor) == null || o.onError({ error: "3D Secure failed" })), r && (t.firstName = r.firstName, t.lastName = r.lastName, t.email = r.email, t.country = r.country), s && (t.cardNumber = s.cardNumber, t.cardHolderName = s.cardholder || "", t.expirationMonth = s.expiryDate.substring(2, 4), t.expirationYear = s.expiryDate.substring(0, 2), t.CVV = s.ccv);
149
149
  const { destroy: a } = p({
150
150
  el: document.body,
151
151
  component: _,
@@ -161,13 +161,13 @@ class A extends v {
161
161
  this.threeDSDestroy = a;
162
162
  }
163
163
  messageHandler(e) {
164
- var r, s, n;
164
+ var r, s, o;
165
165
  if ((r = e == null ? void 0 : e.data) != null && r.status) {
166
166
  if (e.data.status === P) {
167
167
  this.log(`[${this.getType()}][messageHandler] 3Ds Method invocation complete`), e.stopPropagation(), this.onAuth(!0, "");
168
168
  return;
169
169
  }
170
- e.data.status === T && (this.log(`[${this.getType()}][messageHandler] 3Ds Challenge complete`, e.data), e.stopPropagation(), this.closeChallenge(), e.data.cres && ((s = e.data.cres) == null ? void 0 : s.result) === "APPROVED" && ((n = e.data.cres) == null ? void 0 : n.errCode) === "0" ? (this._paResPayload = e.data.cres, this.onPostAuth()) : (this.log(`[${this.getType()}][messageHandler] Failed 3DS Challenge`, e.data), this.onError(400, "Failed 3DS Challenge")));
170
+ e.data.status === T && (this.log(`[${this.getType()}][messageHandler] 3Ds Challenge complete`, e.data), e.stopPropagation(), this.closeChallenge(), e.data.cres && ((s = e.data.cres) == null ? void 0 : s.result) === "APPROVED" && ((o = e.data.cres) == null ? void 0 : o.errCode) === "0" ? (this._paResPayload = e.data.cres, this.onPostAuth()) : (this.log(`[${this.getType()}][messageHandler] Failed 3DS Challenge`, e.data), this.onError(400, "Failed 3DS Challenge")));
171
171
  }
172
172
  }
173
173
  }
@@ -1,24 +1,24 @@
1
- import { DefaultThreeDsProvider as y } from "./DefaultThreeDsProvider-BKnpkX8X-Cz7DrRsl.js";
2
- import { t as u, P as c, y as f, j as C, M as w, d as E, N as p, e as m, W as I, z as L, a as g, u as S } from "./index-C07A5tMl.js";
1
+ import { DefaultThreeDsProvider as y } from "./DefaultThreeDsProvider-C8FSCo8b-Bifhwxc_.js";
2
+ import { i as u, d as c, v as f, z as C, F as w, e as E, a as p, u as D, Y as I, J as L, N as g, f as S } from "./index-CwPndRAR.js";
3
3
  const h = u(!1);
4
4
  function k(r, ...e) {
5
5
  h.value && console.log(r, e);
6
6
  }
7
- function D(r) {
7
+ function v(r) {
8
8
  var e, t;
9
9
  (e = r == null ? void 0 : r.data) != null && e.status && r.data.status === S && (h.value = !!((t = r == null ? void 0 : r.data) != null && t.debug));
10
10
  }
11
11
  function R() {
12
12
  return p(() => {
13
- window.addEventListener("message", D);
14
- }), m(() => {
15
- window.removeEventListener("message", D);
13
+ window.addEventListener("message", v);
14
+ }), D(() => {
15
+ window.removeEventListener("message", v);
16
16
  }), {
17
17
  debug: h,
18
18
  logMessage: k
19
19
  };
20
20
  }
21
- const b = { class: "modal-mask" }, A = { class: "modal-wrapper" }, M = ["src"], U = /* @__PURE__ */ w({
21
+ const b = { class: "modal-mask" }, A = { class: "modal-wrapper" }, U = ["src"], x = /* @__PURE__ */ w({
22
22
  __name: "PayGLocalThreeDsChallenge",
23
23
  props: {
24
24
  url: {}
@@ -30,7 +30,7 @@ const b = { class: "modal-mask" }, A = { class: "modal-wrapper" }, M = ["src"],
30
30
  o.value = l;
31
31
  }), p(() => {
32
32
  window.addEventListener("message", n);
33
- }), m(() => {
33
+ }), D(() => {
34
34
  window.removeEventListener("message", n);
35
35
  });
36
36
  function n(l) {
@@ -38,19 +38,19 @@ const b = { class: "modal-mask" }, A = { class: "modal-wrapper" }, M = ["src"],
38
38
  if (t("PayGLocalThreeDsChallenge: Message received", l.data), !((i = l == null ? void 0 : l.data) != null && i["payglocal-token"])) return;
39
39
  const d = l.data["payglocal-token"];
40
40
  t("Token received", d);
41
- const v = d.split(".")[1], P = window.atob(v), T = JSON.parse(P);
42
- s("close", T);
41
+ const m = d.split(".")[1], T = window.atob(m), P = JSON.parse(T);
42
+ s("close", P);
43
43
  }
44
44
  return (l, i) => (I(), L("div", b, [
45
45
  g("div", A, [
46
46
  g("iframe", {
47
47
  src: o.value,
48
48
  sandbox: "allow-same-origin allow-scripts allow-popups allow-forms"
49
- }, null, 8, M)
49
+ }, null, 8, U)
50
50
  ])
51
51
  ]));
52
52
  }
53
- }), x = /* @__PURE__ */ C(U, [["__scopeId", "data-v-6f042298"]]);
53
+ }), M = /* @__PURE__ */ C(x, [["__scopeId", "data-v-6f042298"]]);
54
54
  class G extends y {
55
55
  getType() {
56
56
  return "PayGLocal";
@@ -83,7 +83,7 @@ class G extends y {
83
83
  }
84
84
  const { destroy: t } = f({
85
85
  el: document.body,
86
- component: x,
86
+ component: M,
87
87
  props: {
88
88
  url: e
89
89
  },