@payfurl/react-plugin 1.0.11 → 1.2.0

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 (31) hide show
  1. package/dist/{CxPayThreeDsProvider-DHyY0SJN-mkHWDkHg.js → CxPayThreeDsProvider-BLfTGjPF-kfggfjdU.js} +1 -1
  2. package/dist/{DefaultThreeDsProvider-BbyoW5gI-Bm2Tl1xC.js → DefaultThreeDsProvider-ByqIuIMb-DCABeZFY.js} +33 -33
  3. package/dist/{EcentricThreeDsProvider-CJkAKhCm-4a0z3e8l.js → EcentricThreeDsProvider-C0fijqNm-J1HqpcUG.js} +32 -32
  4. package/dist/{EpnaThreeDsProvider-CbuCAz8E-8AT3NiUZ.js → EpnaThreeDsProvider-BKcMV0Ni-C8jATWyJ.js} +1 -1
  5. package/dist/{FlashBancThreeDsProvider-yEpICp2s-B-fAmFIe.js → FlashBancThreeDsProvider-BL79DnxY-CKAnpF83.js} +1 -1
  6. package/dist/{GPaymentsThreeDsProvider-ZzFlXQYx-DxEfT4MU.js → GPaymentsThreeDsProvider-DK7o9MEd-CotMfLS4.js} +23 -22
  7. package/dist/{MetricsGlobalThreeDsProvider-COVvDD_A-BpwZGUJd.js → MetricsGlobalThreeDsProvider-DCFNNBAG-DWwOWfRj.js} +33 -33
  8. package/dist/{NmiThreeDsProvider-CyQ9ToCv-C5qjGxEE.js → NmiThreeDsProvider-CjG8JCAW-SClrMiRm.js} +1 -1
  9. package/dist/{NuveiThreeDsProvider-wpWbdDVQ-Df-izyuz.js → NuveiThreeDsProvider-C511D4Vv-CI0PLP-t.js} +6 -6
  10. package/dist/{PayGLocalThreeDsProvider-piT2VTln-BSZsat2V.js → PayGLocalThreeDsProvider-Isk8RrpT-Du6bWeJa.js} +31 -31
  11. package/dist/{PayWayAppleButton-lOpUyVhK-C3sG34i0.js → PayWayAppleButton-CP2C2UFi-CE7cLGod.js} +1 -1
  12. package/dist/{PayabliThreeDsProvider-chEmLOO6-DsAXAJs1.js → PayabliThreeDsProvider-D04tIaoI-C9P-h4fx.js} +1 -1
  13. package/dist/{SkyBankThreeDsProvider-B1KB-MBu-BvB-_qyj.js → SkyBankThreeDsProvider-CI5tCFi6-Bc7KqUKb.js} +1 -1
  14. package/dist/{cxpay-CkpinAwr-ChgTpH3-.js → cxpay-CXd-gWgJ-o6fIVfHa.js} +1 -1
  15. package/dist/{default-CCjRF2gJ-CD4CwffS.js → default-Bn_jZqbH-Bl2uje9s.js} +1 -1
  16. package/dist/{ecentric-C7aOx_5y-CEzn5wge.js → ecentric-BUuKlIAj-DtLsDgEq.js} +1 -1
  17. package/dist/{epna-C3FB2xZQ-DH6OQlXc.js → epna-DquO2ajM-D6mOIN8h.js} +1 -1
  18. package/dist/{flashbanc-tBq9tJrU-YpLBHiBR.js → flashbanc-C4qF4wum-YDAB9IfO.js} +1 -1
  19. package/dist/{gpayments-utHsl2Sf-CVGRwoei.js → gpayments-B99Rhx-h-CQnyzSas.js} +1 -1
  20. package/dist/{index-BK7gCCkz.js → index-BmYcZJxX.js} +6257 -5865
  21. package/dist/{metrics_global-CP2_hsNY-PAbKkq2a.js → metrics_global-BhM_CqUq-uWSbroEt.js} +1 -1
  22. package/dist/nmi-B31Ng1Zj-CtTrEAj2.js +7 -0
  23. package/dist/{nuvei-DFcv1FC6-Do0hVbvU.js → nuvei-C_wJxvcg-9I4of95a.js} +1 -1
  24. package/dist/{payabli-C_GFUDE_-B3AKtHbR.js → payabli-DEjkMyU_-CjTbSafb.js} +1 -1
  25. package/dist/payfurl-react.es.js +1 -1
  26. package/dist/payfurl-react.umd.js +29 -29
  27. package/dist/{payglocal-CfnXIS4O-DFlDGlnE.js → payglocal-DrWsvnYA-WB4rb0ul.js} +1 -1
  28. package/dist/{payway_rest-Bl-RqdsM-DtXvxCWL.js → payway_rest-gds3Rn3R-B9t3rfRC.js} +1 -1
  29. package/dist/{skybank-ChiLuKWf-CtXaMyvJ.js → skybank-Cr24BYBd-BmDAIEtF.js} +1 -1
  30. package/package.json +2 -2
  31. package/dist/nmi-Crex5ZZF-Cq6YYDcI.js +0 -7
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-COVvDD_A-BpwZGUJd.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-DCFNNBAG-DWwOWfRj.js";
2
2
  class t extends e {
3
3
  getType() {
4
4
  return "CxPay";
@@ -1,6 +1,6 @@
1
- import { c as d, f as S, y as g, z as p, a as m, i as T, J as v, X as f, L as u, $ as I, m as y, O as A, Y as C } from "./index-BK7gCCkz.js";
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, a = (l, e, s) => E(l, typeof e != "symbol" ? e + "" : e, s);
3
- const P = { class: "mask" }, U = { class: "wrapper" }, b = { class: "container" }, L = ["action"], $ = ["value"], M = /* @__PURE__ */ m({
1
+ import { K as d, P as S, u as g, J as p, F as m, O as T, e as v, a as I, b as u, c as f, D as y, I as A, i as C, j as R, Y as E } from "./index-BmYcZJxX.js";
2
+ var P = Object.defineProperty, b = (l, e, s) => e in l ? P(l, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : l[e] = s, a = (l, e, s) => b(l, typeof e != "symbol" ? e + "" : e, s);
3
+ const U = { class: "mask" }, L = { class: "wrapper" }, M = { class: "container" }, $ = ["action"], _ = ["value"], w = /* @__PURE__ */ m({
4
4
  __name: "ThreeDsChallenge",
5
5
  props: {
6
6
  threeDSServerTransID: {},
@@ -9,43 +9,43 @@ const P = { class: "mask" }, U = { class: "wrapper" }, b = { class: "container"
9
9
  },
10
10
  emits: ["close", "submit"],
11
11
  setup(l, { emit: e }) {
12
- const s = l, n = e, o = T(null), i = JSON.stringify({
12
+ const s = l, n = e, o = T(() => R(s.formAction) ? s.formAction : ""), i = C(null), r = JSON.stringify({
13
13
  threeDSServerTransID: s.threeDSServerTransID,
14
14
  acsTransID: s.acsTransID,
15
15
  messageVersion: "2.2.0",
16
16
  messageType: "CReq",
17
17
  challengeWindowSize: "01"
18
- }), r = encodeURI(window.btoa(i).replace(/=*$/, ""));
19
- return f(() => {
20
- var t;
21
- (t = o.value) == null || t.submit();
22
- }), (t, h) => (C(), v("div", P, [
23
- u("div", U, [
24
- u("div", b, [
25
- I(y, {
26
- onClick: h[0] || (h[0] = (c) => n("close")),
18
+ }), t = encodeURI(window.btoa(r).replace(/=*$/, ""));
19
+ return v(() => {
20
+ var h;
21
+ o.value && ((h = i.value) == null || h.submit());
22
+ }), (h, c) => (E(), I("div", U, [
23
+ u("div", L, [
24
+ u("div", M, [
25
+ f(y, {
26
+ onClick: c[0] || (c[0] = (F) => n("close")),
27
27
  id: "3ds-challenge-close"
28
28
  }),
29
- h[1] || (h[1] = u("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
29
+ c[1] || (c[1] = u("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
30
30
  u("form", {
31
- action: s.formAction,
31
+ action: o.value,
32
32
  target: "ThreeDsChallengeIFrame",
33
33
  method: "post",
34
34
  ref_key: "form",
35
- ref: o
35
+ ref: i
36
36
  }, [
37
37
  u("input", {
38
38
  type: "hidden",
39
39
  name: "creq",
40
- value: A(r)
41
- }, null, 8, $)
42
- ], 8, L)
40
+ value: A(t)
41
+ }, null, 8, _)
42
+ ], 8, $)
43
43
  ])
44
44
  ])
45
45
  ]));
46
46
  }
47
- }), _ = /* @__PURE__ */ p(M, [["__scopeId", "data-v-ac351494"]]);
48
- class w {
47
+ }), O = /* @__PURE__ */ p(w, [["__scopeId", "data-v-07081e85"]]);
48
+ class k {
49
49
  constructor() {
50
50
  a(this, "iframeId", "threeDsIframeMethod"), a(this, "containerId", "payfurlContainerFormInvoker"), a(this, "iframe", null), a(this, "container", null);
51
51
  }
@@ -64,8 +64,8 @@ class w {
64
64
  t.submit();
65
65
  }
66
66
  }
67
- const { hideSpinner: D, showSpinner: O } = d(), k = "3ds_method_invocation_complete", N = "3ds_challenge_complete";
68
- class q {
67
+ const { hideSpinner: D, showSpinner: N } = g(), q = "3ds_method_invocation_complete", V = "3ds_challenge_complete";
68
+ class J {
69
69
  constructor(e, s, n) {
70
70
  a(this, "log"), a(this, "container"), a(this, "options"), a(this, "threeDsProcessor", null), a(this, "threeDSDestroy", () => {
71
71
  }), a(this, "threeDSServerTransID", ""), a(this, "threeDSAuthURL", ""), a(this, "threeDSRequestorTransID", ""), a(this, "threeDSMonitorURL", ""), a(this, "internalMessageHandler", this.messageHandler.bind(this)), a(this, "onError", (o, i) => {
@@ -141,7 +141,7 @@ class q {
141
141
  return "";
142
142
  }
143
143
  onPreAuth() {
144
- this.log(`[${this.getType()}][onPreAuth]`), this.threeDsProcessor && (O(), this.threeDsProcessor.onPreAuth(this.onInitAuthSuccess, this.onError), window.addEventListener("message", this.internalMessageHandler));
144
+ this.log(`[${this.getType()}][onPreAuth]`), this.threeDsProcessor && (N(), this.threeDsProcessor.onPreAuth(this.onInitAuthSuccess, this.onError), window.addEventListener("message", this.internalMessageHandler));
145
145
  }
146
146
  onAuth(e, s) {
147
147
  var n;
@@ -165,12 +165,12 @@ class q {
165
165
  }
166
166
  messageHandler(e) {
167
167
  var s, n;
168
- if (!(!((s = e == null ? void 0 : e.data) != null && s.status) || ((n = e == null ? void 0 : e.data) == null ? void 0 : n.status) === S)) {
169
- if (e.data.status === k) {
168
+ if (!(!((s = e == null ? void 0 : e.data) != null && s.status) || ((n = e == null ? void 0 : e.data) == null ? void 0 : n.status) === d)) {
169
+ if (e.data.status === q) {
170
170
  e.stopPropagation(), this.invocationComplete(e);
171
171
  return;
172
172
  }
173
- e.data.status === N && (e.stopPropagation(), this.challengeComplete(e));
173
+ e.data.status === V && (e.stopPropagation(), this.challengeComplete(e));
174
174
  }
175
175
  }
176
176
  invocationComplete(e) {
@@ -183,9 +183,9 @@ class q {
183
183
  }
184
184
  doChallenge(e, s, n) {
185
185
  this.log(`[${this.getType()}][doChallenge]`), D();
186
- const { destroy: o } = g({
186
+ const { destroy: o } = S({
187
187
  el: document.body,
188
- component: _,
188
+ component: O,
189
189
  props: {
190
190
  threeDSServerTransID: this.threeDSServerTransID,
191
191
  acsTransID: s,
@@ -212,13 +212,13 @@ class q {
212
212
  threeDSServerTransID: e,
213
213
  threeDSMethodNotificationURL: this.options.apiUrl + "/3ds/method_invocation"
214
214
  }, o = encodeURI(window.btoa(JSON.stringify(n)).replace(/=*$/, ""));
215
- new w().invoke(s, "POST", {
215
+ new k().invoke(s, "POST", {
216
216
  threeDSMethodData: o
217
217
  });
218
218
  }
219
219
  }
220
220
  export {
221
- q as DefaultThreeDsProvider,
222
- N as THREE_DS_CHALLENGE_COMPLETE,
223
- k as THREE_DS_METHOD_INVOCATION_COMPLETE
221
+ J as DefaultThreeDsProvider,
222
+ V as THREE_DS_CHALLENGE_COMPLETE,
223
+ q as THREE_DS_METHOD_INVOCATION_COMPLETE
224
224
  };
@@ -1,7 +1,7 @@
1
- import { DefaultThreeDsProvider as l } from "./DefaultThreeDsProvider-BbyoW5gI-Bm2Tl1xC.js";
2
- import { y as i, z as h, a as c, i as u, J as D, X as d, Y as p, L as o, $ as m, m as g, O as v } from "./index-BK7gCCkz.js";
3
- var y = Object.defineProperty, S = (r, e, t) => e in r ? y(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, T = (r, e, t) => S(r, e + "", t);
4
- const P = { class: "mask" }, f = { class: "wrapper" }, I = { class: "container" }, C = ["action"], A = ["value"], $ = /* @__PURE__ */ c({
1
+ import { DefaultThreeDsProvider as i } from "./DefaultThreeDsProvider-ByqIuIMb-DCABeZFY.js";
2
+ import { P as h, J as c, F as u, O as D, e as d, Y as p, a as m, b as s, c as v, D as g, I as S, i as T, j as y } from "./index-BmYcZJxX.js";
3
+ var P = Object.defineProperty, f = (a, e, t) => e in a ? P(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, I = (a, e, t) => f(a, e + "", t);
4
+ const C = { class: "mask" }, A = { class: "wrapper" }, F = { class: "container" }, b = ["action"], E = ["value"], R = /* @__PURE__ */ u({
5
5
  __name: "ecentric",
6
6
  props: {
7
7
  threeDSServerTransID: {},
@@ -9,39 +9,39 @@ const P = { class: "mask" }, f = { class: "wrapper" }, I = { class: "container"
9
9
  formAction: {},
10
10
  authenticationValue: {}
11
11
  },
12
- setup(r) {
13
- const e = r, t = u(null), n = e.authenticationValue;
12
+ setup(a) {
13
+ const e = a, t = D(() => y(e.formAction) ? e.formAction : ""), o = T(null), n = e.authenticationValue;
14
14
  return d(() => {
15
- var a;
16
- (a = t.value) == null || a.submit();
17
- }), (a, s) => (p(), D("div", P, [
18
- o("div", f, [
19
- o("div", I, [
20
- m(g, {
21
- onClick: s[0] || (s[0] = (b) => a.emit("close"))
15
+ var r;
16
+ t.value && ((r = o.value) == null || r.submit());
17
+ }), (r, l) => (p(), m("div", C, [
18
+ s("div", A, [
19
+ s("div", F, [
20
+ v(g, {
21
+ onClick: l[0] || (l[0] = ($) => r.emit("close"))
22
22
  }),
23
- s[1] || (s[1] = o("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
24
- o("form", {
25
- action: e.formAction,
23
+ l[1] || (l[1] = s("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
24
+ s("form", {
25
+ action: t.value,
26
26
  target: "ThreeDsChallengeIFrame",
27
27
  method: "post",
28
28
  ref_key: "form",
29
- ref: t
29
+ ref: o
30
30
  }, [
31
- o("input", {
31
+ s("input", {
32
32
  type: "hidden",
33
33
  name: "PaReq",
34
- value: v(n)
35
- }, null, 8, A)
36
- ], 8, C)
34
+ value: S(n)
35
+ }, null, 8, E)
36
+ ], 8, b)
37
37
  ])
38
38
  ])
39
39
  ]));
40
40
  }
41
- }), V = /* @__PURE__ */ h($, [["__scopeId", "data-v-8d26953f"]]);
42
- class R extends l {
41
+ }), V = /* @__PURE__ */ c(R, [["__scopeId", "data-v-d0f7984c"]]);
42
+ class j extends i {
43
43
  constructor() {
44
- super(...arguments), T(this, "paResPayload", "");
44
+ super(...arguments), I(this, "paResPayload", "");
45
45
  }
46
46
  getType() {
47
47
  return "Ecentric";
@@ -56,31 +56,31 @@ class R extends l {
56
56
  authenticationValue: this.paResPayload
57
57
  }, this.onSuccess, this.onError);
58
58
  }
59
- doChallenge(e, t, n) {
59
+ doChallenge(e, t, o) {
60
60
  this.log(`[${this.getType()}][doChallenge]`);
61
- const { destroy: a } = i({
61
+ const { destroy: n } = h({
62
62
  el: document.body,
63
63
  component: V,
64
64
  props: {
65
65
  threeDSServerTransID: this.threeDSServerTransID,
66
66
  acsTransID: t,
67
67
  formAction: e,
68
- authenticationValue: n
68
+ authenticationValue: o
69
69
  },
70
70
  on: {
71
71
  close: () => {
72
- var s;
73
- a(), this.threeDSDestroy = () => {
74
- }, (s = this.threeDsProcessor) == null || s.onError({ error: "Challenge cancelled" });
72
+ var r;
73
+ n(), this.threeDSDestroy = () => {
74
+ }, (r = this.threeDsProcessor) == null || r.onError({ error: "Challenge cancelled" });
75
75
  }
76
76
  }
77
77
  });
78
- this.threeDSDestroy = a;
78
+ this.threeDSDestroy = n;
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"));
82
82
  }
83
83
  }
84
84
  export {
85
- R as EcentricThreeDsProvider
85
+ j as EcentricThreeDsProvider
86
86
  };
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-COVvDD_A-BpwZGUJd.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-DCFNNBAG-DWwOWfRj.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-COVvDD_A-BpwZGUJd.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-DCFNNBAG-DWwOWfRj.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-BbyoW5gI-Bm2Tl1xC.js";
2
- import { y as o, z as l, a as u, J as c, Y as p, L as h, C as i } from "./index-BK7gCCkz.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 S = { class: "mask" }, D = { class: "wrapper" }, m = ["src"], y = /* @__PURE__ */ u({
1
+ import { DefaultThreeDsProvider as o } from "./DefaultThreeDsProvider-ByqIuIMb-DCABeZFY.js";
2
+ import { P as l, j as n, J as u, F as c, O as p, Y as d, a as g, b as a, C as h } from "./index-BmYcZJxX.js";
3
+ var D = Object.defineProperty, S = (r, e, t) => e in r ? D(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, i = (r, e, t) => S(r, typeof e != "symbol" ? e + "" : e, t);
4
+ const m = { class: "mask" }, y = { class: "wrapper" }, f = ["src"], v = /* @__PURE__ */ c({
5
5
  __name: "GPayments",
6
6
  props: {
7
7
  url: {},
@@ -9,31 +9,31 @@ const S = { class: "mask" }, D = { class: "wrapper" }, m = ["src"], y = /* @__PU
9
9
  height: {}
10
10
  },
11
11
  setup(r) {
12
- const e = r;
13
- function t() {
12
+ const e = r, t = p(() => n(e.url) ? e.url : "");
13
+ function s() {
14
14
  return {
15
15
  width: `${e.width || 650}px`,
16
16
  height: `${e.height || 400}px`
17
17
  };
18
18
  }
19
- return (s, v) => (p(), c("div", S, [
20
- h("div", D, [
21
- h("div", {
19
+ return (T, b) => (d(), g("div", m, [
20
+ a("div", y, [
21
+ a("div", {
22
22
  class: "container",
23
- style: i([t(), { padding: "0", margin: "0" }])
23
+ style: h([s(), { padding: "0", margin: "0" }])
24
24
  }, [
25
- h("iframe", {
26
- src: e.url,
27
- style: i(t())
28
- }, null, 12, m)
25
+ a("iframe", {
26
+ src: t.value,
27
+ style: h(s())
28
+ }, null, 12, f)
29
29
  ], 4)
30
30
  ])
31
31
  ]));
32
32
  }
33
- }), f = /* @__PURE__ */ l(y, [["__scopeId", "data-v-9b0ef3a8"]]);
34
- class T extends n {
33
+ }), C = /* @__PURE__ */ u(v, [["__scopeId", "data-v-cf5aa816"]]);
34
+ class P extends o {
35
35
  constructor() {
36
- super(...arguments), a(this, "onDoAuthSuccess", (e, t) => {
36
+ super(...arguments), i(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 T 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
+ }), i(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");
@@ -69,9 +69,9 @@ class T extends n {
69
69
  }
70
70
  doChallenge(e) {
71
71
  this.log(`[${this.getType()}][doChallenge]`);
72
- const { destroy: t } = o({
72
+ const { destroy: t } = l({
73
73
  el: document.body,
74
- component: f,
74
+ component: C,
75
75
  props: {
76
76
  url: e,
77
77
  width: 390,
@@ -90,11 +90,12 @@ class T extends n {
90
90
  this.log(`[${this.getType()}]: 3Ds Challenge complete`, e.data), this.closeChallenge(), this.onPostAuth();
91
91
  }
92
92
  initFrame(e) {
93
- this.log(`[${this.getType()}][init3DSFrame]`, e);
93
+ if (this.log(`[${this.getType()}][init3DSFrame]`, e), !n(e))
94
+ return;
94
95
  const t = document.createElement("iframe");
95
96
  t.src = e, t.style.width = "1px", t.style.height = "1px", t.style.border = "0", document.body.appendChild(t);
96
97
  }
97
98
  }
98
99
  export {
99
- T as GPaymentsThreeDsProvider
100
+ P as GPaymentsThreeDsProvider
100
101
  };
@@ -1,23 +1,23 @@
1
- import { DefaultThreeDsProvider as w } from "./DefaultThreeDsProvider-BbyoW5gI-Bm2Tl1xC.js";
2
- import { c as A, b as g, y as E, z as b, a as f, i as T, A as L, X as _, e as x, l as G, Y as N, J as I, L as m, $, m as H } from "./index-BK7gCCkz.js";
3
- var O = Object.defineProperty, M = (h, e, t) => e in h ? O(h, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[e] = t, p = (h, e, t) => M(h, typeof e != "symbol" ? e + "" : e, t);
4
- const U = { class: "mask" }, j = { class: "wrapper" }, F = { class: "container" }, k = /* @__PURE__ */ f({
1
+ import { DefaultThreeDsProvider as w } from "./DefaultThreeDsProvider-ByqIuIMb-DCABeZFY.js";
2
+ import { v as g, P as E, u as A, J as f, F as b, e as T, h as L, S as _, g as x, Y as G, a as N, b as m, c as I, D as $, i as F } from "./index-BmYcZJxX.js";
3
+ var H = Object.defineProperty, O = (h, e, t) => e in h ? H(h, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[e] = t, p = (h, e, t) => O(h, typeof e != "symbol" ? e + "" : e, t);
4
+ const M = { class: "mask" }, j = { class: "wrapper" }, U = { class: "container" }, k = /* @__PURE__ */ b({
5
5
  __name: "MetricsGlobalThreeDsChallenge",
6
6
  emits: ["close", "submit"],
7
7
  setup(h, { emit: e }) {
8
- const t = e, r = T(!1);
8
+ const t = e, r = F(!1);
9
9
  function a(c) {
10
10
  var o;
11
11
  ["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes((o = c.data) == null ? void 0 : o.message) && (r.value = c.data.message === "3DS_CHALLENGE_SHOW");
12
12
  }
13
- return _(() => {
13
+ return T(() => {
14
14
  window.addEventListener("message", a);
15
- }), x(() => {
15
+ }), L(() => {
16
16
  window.removeEventListener("message", a);
17
- }), (c, o) => L((N(), I("div", U, [
17
+ }), (c, o) => _((G(), N("div", M, [
18
18
  m("div", j, [
19
- m("div", F, [
20
- $(H, {
19
+ m("div", U, [
20
+ I($, {
21
21
  onClick: o[0] || (o[0] = (i) => t("close")),
22
22
  id: "3ds-challenge-close"
23
23
  }),
@@ -25,11 +25,11 @@ const U = { class: "mask" }, j = { class: "wrapper" }, F = { class: "container"
25
25
  ])
26
26
  ])
27
27
  ], 512)), [
28
- [G, r.value]
28
+ [x, r.value]
29
29
  ]);
30
30
  }
31
- }), W = /* @__PURE__ */ b(k, [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: d, showSpinner: R } = A(), D = 5;
32
- class Y extends w {
31
+ }), R = /* @__PURE__ */ f(k, [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: d, showSpinner: W } = A(), D = 5;
32
+ class q extends w {
33
33
  constructor(e, t, r) {
34
34
  var a;
35
35
  super(e, t, r), p(this, "gateway"), p(this, "threeDS"), p(this, "numAttempts", 0), this.initScript(((a = r.clientParameters) == null ? void 0 : a.PublicKey) || "");
@@ -69,11 +69,11 @@ class Y extends w {
69
69
  d(), g(this.container, "Payment information is missing");
70
70
  return;
71
71
  }
72
- R();
73
- const s = (t = this.threeDsProcessor) == null ? void 0 : t.getAddressInfo(), y = i.expiryDate.length === 4 ? i.expiryDate[2] + i.expiryDate[3] : "", v = i.expiryDate.length === 4 ? i.expiryDate[0] + i.expiryDate[1] : "", [C = "", P = ""] = ((r = i.cardholder) == null ? void 0 : r.split(/\s+/)) || [], S = {
72
+ W();
73
+ const s = (t = this.threeDsProcessor) == null ? void 0 : t.getAddressInfo(), v = i.expiryDate.length === 4 ? i.expiryDate[2] + i.expiryDate[3] : "", y = i.expiryDate.length === 4 ? i.expiryDate[0] + i.expiryDate[1] : "", [P = "", C = ""] = ((r = i.cardholder) == null ? void 0 : r.split(/\s+/)) || [], S = {
74
74
  cardNumber: i.cardNumber,
75
- cardExpMonth: y,
76
- cardExpYear: parseInt(v) + 2e3,
75
+ cardExpMonth: v,
76
+ cardExpYear: parseInt(y) + 2e3,
77
77
  currency: (a = this.threeDsProcessor) == null ? void 0 : a.getCurrency(),
78
78
  amount: (c = this.threeDsProcessor) == null ? void 0 : c.getAmount(),
79
79
  email: (o = this.threeDsProcessor) == null ? void 0 : o.getEmail(),
@@ -82,23 +82,23 @@ class Y extends w {
82
82
  state: s == null ? void 0 : s.state,
83
83
  address1: s == null ? void 0 : s.streetAddress,
84
84
  country: s == null ? void 0 : s.country,
85
- firstName: (s == null ? void 0 : s.firstName) || C || "payFURL",
86
- lastName: (s == null ? void 0 : s.lastName) || P || "payFURL",
85
+ firstName: (s == null ? void 0 : s.firstName) || P || "payFURL",
86
+ lastName: (s == null ? void 0 : s.lastName) || C || "payFURL",
87
87
  postalCode: s == null ? void 0 : s.postalCode
88
88
  }, u = this.threeDS.createUI(S);
89
- u.start("#ThreeDsChallengeIFrame"), u.on("challenge", (l) => {
90
- this.log(`[${this.getType()}][onChallenge]`, l), d(), this.showChallenge();
91
- }), u.on("complete", (l) => {
92
- var n;
93
- this.log(`[${this.getType()}][onComplete]`, l), this.removeChallenge(), (n = this.threeDsProcessor) == null || n.onSuccess({
94
- externalThreeDsData: l
89
+ u.start("#ThreeDsChallengeIFrame"), u.on("challenge", (n) => {
90
+ this.log(`[${this.getType()}][onChallenge]`, n), d(), this.showChallenge();
91
+ }), u.on("complete", (n) => {
92
+ var l;
93
+ this.log(`[${this.getType()}][onComplete]`, n), this.removeChallenge(), (l = this.threeDsProcessor) == null || l.onSuccess({
94
+ externalThreeDsData: n
95
95
  });
96
- }), u.on("failure", (l) => {
97
- var n;
98
- this.log(`[${this.getType()}][onFailure]`, l), d(), this.closeChallenge(), (n = this.threeDsProcessor) == null || n.onError({ error: l.message });
99
- }), u.on("error", (l) => {
100
- var n;
101
- this.log(`[${this.getType()}][error]`, l), d(), this.closeChallenge(), (n = this.threeDsProcessor) == null || n.onError({ error: l.message });
96
+ }), u.on("failure", (n) => {
97
+ var l;
98
+ this.log(`[${this.getType()}][onFailure]`, n), d(), this.closeChallenge(), (l = this.threeDsProcessor) == null || l.onError({ error: n.message });
99
+ }), u.on("error", (n) => {
100
+ var l;
101
+ this.log(`[${this.getType()}][error]`, n), d(), this.closeChallenge(), (l = this.threeDsProcessor) == null || l.onError({ error: n.message });
102
102
  });
103
103
  }
104
104
  initScript(e) {
@@ -116,7 +116,7 @@ class Y extends w {
116
116
  initChallenge() {
117
117
  const { destroy: e } = E({
118
118
  el: document.body,
119
- component: W,
119
+ component: R,
120
120
  on: {
121
121
  close: () => {
122
122
  var t;
@@ -142,5 +142,5 @@ class Y extends w {
142
142
  }
143
143
  }
144
144
  export {
145
- Y as MetricsGlobalThreeDsProvider
145
+ q as MetricsGlobalThreeDsProvider
146
146
  };
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-COVvDD_A-BpwZGUJd.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-DCFNNBAG-DWwOWfRj.js";
2
2
  class t extends e {
3
3
  getType() {
4
4
  return "NMI";
@@ -1,5 +1,5 @@
1
- import { b as d, y as p, z as m, a as g, c as h, X as D, J as S, Y as y, L as l } from "./index-BK7gCCkz.js";
2
- import { DefaultThreeDsProvider as v, THREE_DS_METHOD_INVOCATION_COMPLETE as P, THREE_DS_CHALLENGE_COMPLETE as T } from "./DefaultThreeDsProvider-BbyoW5gI-Bm2Tl1xC.js";
1
+ import { v as d, P as p, J as m, u as h, F as g, e as D, Y as S, a as v, b as l } from "./index-BmYcZJxX.js";
2
+ import { DefaultThreeDsProvider as y, THREE_DS_METHOD_INVOCATION_COMPLETE as P, THREE_DS_CHALLENGE_COMPLETE as T } from "./DefaultThreeDsProvider-ByqIuIMb-DCABeZFY.js";
3
3
  var f = Object.defineProperty, I = (n, e, a) => e in n ? f(n, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[e] = a, c = (n, e, a) => I(n, typeof e != "symbol" ? e + "" : e, a);
4
4
  const N = { class: "mask" }, C = /* @__PURE__ */ g({
5
5
  __name: "nuvei",
@@ -71,18 +71,18 @@ const N = { class: "mask" }, C = /* @__PURE__ */ g({
71
71
  window.postMessage({ status: "3ds_challenge_complete", cres: r }, "*");
72
72
  });
73
73
  }
74
- return (t, r) => (y(), S("div", N, [...r[0] || (r[0] = [
74
+ return (t, r) => (S(), v("div", N, [...r[0] || (r[0] = [
75
75
  l("div", { class: "wrapper" }, [
76
76
  l("div", { class: "container" })
77
77
  ], -1)
78
78
  ])]));
79
79
  }
80
- }), _ = /* @__PURE__ */ m(C, [["__scopeId", "data-v-6293d147"]]), { hideSpinner: b } = h();
81
- class A extends v {
80
+ }), _ = /* @__PURE__ */ m(C, [["__scopeId", "data-v-6293d147"]]), { hideSpinner: E } = h();
81
+ class A extends y {
82
82
  constructor() {
83
83
  super(...arguments), c(this, "_paResPayload", null), c(this, "onSuccess", (e, a) => {
84
84
  var s, o;
85
- this.closeChallenge(), b();
85
+ this.closeChallenge(), E();
86
86
  const t = JSON.parse(a);
87
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, a) => {