@payfurl/react-plugin 1.0.8 → 1.0.10

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 (33) hide show
  1. package/dist/{CxPayThreeDsProvider-DUx0ZP9g-CZ0dDiUf.js → CxPayThreeDsProvider-DfJyYDV8-BtwTH6Vv.js} +1 -1
  2. package/dist/{DefaultThreeDsProvider-OrSUoygj-C1fnz8Dl.js → DefaultThreeDsProvider-DvV6zVzO-DDYac6nh.js} +33 -33
  3. package/dist/{EcentricThreeDsProvider-C0n-kUpY-B7faJJZS.js → EcentricThreeDsProvider-DC4tQCJ4-43cDaJIh.js} +13 -13
  4. package/dist/{EpnaThreeDsProvider-BlzPLUQj-5xYvlDhH.js → EpnaThreeDsProvider-D9tTUWnr-EX6HQmg0.js} +1 -1
  5. package/dist/{FlashBancThreeDsProvider-BZD1Bmox-CXii2Z5u.js → FlashBancThreeDsProvider-Dc_WgWyQ-D2rZd6ti.js} +1 -1
  6. package/dist/{GPaymentsThreeDsProvider-Dmc3T7m7-ClWUXsKr.js → GPaymentsThreeDsProvider-BAJmTSdj-BmLQFvQr.js} +2 -2
  7. package/dist/{MetricsGlobalThreeDsProvider-D8pmLCaF-9Zn9KMBT.js → MetricsGlobalThreeDsProvider-DiPpCK4e-CRZ470ug.js} +27 -27
  8. package/dist/{NmiThreeDsProvider-D6MYO9TE-XP3i5DD0.js → NmiThreeDsProvider-X5Wb78Qq-D6zRtIK-.js} +1 -1
  9. package/dist/{NuveiThreeDsProvider-B0_hr137-BSeS3Dtw.js → NuveiThreeDsProvider-C7kP4S9V-CKRUbO6O.js} +41 -41
  10. package/dist/{PayGLocalThreeDsProvider-CcVtz_cC-CryvMpZk.js → PayGLocalThreeDsProvider-pa38V_3c-BYX0XJ0I.js} +20 -20
  11. package/dist/{PayWayAppleButton-DI0k_xsw-gdBZ6sUf.js → PayWayAppleButton-DGBgHxM1--mVa2z-I.js} +1 -1
  12. package/dist/{PayabliThreeDsProvider-BTuW5mNX-zUudDCiq.js → PayabliThreeDsProvider-CMCehiRL-Dsv7XOl0.js} +1 -1
  13. package/dist/{SkyBankThreeDsProvider-CFsEdtDi-D_AeZUTT.js → SkyBankThreeDsProvider-BJXZbNSS-DjLydBX-.js} +1 -1
  14. package/dist/{cxpay-CzXEk7uT-CHEaX1oC.js → cxpay-CmCXB_3H-CFTLoWfG.js} +1 -1
  15. package/dist/{default-CVlT2ZTw-GAb6ONvT.js → default-DwmL369u-CFn9gU9h.js} +1 -1
  16. package/dist/{ecentric-p4HkLdd1-CNm1w3kN.js → ecentric-CkX8jlMS-CIF3TL3n.js} +1 -1
  17. package/dist/{epna-ugAK06qE-CkwGUb_w.js → epna-CQuWi-kj-Bp3oLoVZ.js} +1 -1
  18. package/dist/{flashbanc-BD7QXswZ-Fdy1B6BS.js → flashbanc-ROJhNrEr-CkfPZX3E.js} +1 -1
  19. package/dist/{gpayments-BJ23p2Lx-QfoNtcpr.js → gpayments-CMf-VGx8-woOHZ2Uf.js} +1 -1
  20. package/dist/{index-gsXnNX5E.js → index-DjmLClKy.js} +4256 -4250
  21. package/dist/{metrics_global-Ce0HIVhq-DU1Eh9Do.js → metrics_global-DCnzJ8W3-owheVXbs.js} +1 -1
  22. package/dist/nmi-BAQHxhKe-DtWC05bC.js +7 -0
  23. package/dist/{nuvei-Dy9kXWcy-D3SDtRgj.js → nuvei-DY1eIaaI-CH37Pkov.js} +1 -1
  24. package/dist/{payabli-FwdYUjhG-AALDzHYk.js → payabli-DD1ZuFv1-GPn71phq.js} +1 -1
  25. package/dist/payfurl-react.es.js +1 -1
  26. package/dist/payfurl-react.umd.js +27 -27
  27. package/dist/{payglocal-DX_7nogS-CX5mt--e.js → payglocal-CC7Mmvkg-B93wBeJX.js} +1 -1
  28. package/dist/{payway_rest-BMXIpCn0-DUHYQ0hf.js → payway_rest-C2bgT2mt-DZYerbzI.js} +1 -1
  29. package/dist/{skybank-JGD9tw1a-Bnir5oV2.js → skybank-DLUEQlDI-CALhFzpW.js} +1 -1
  30. package/dist/src/sdk/types/DropInOptions.type.d.ts +4 -0
  31. package/dist/src/sdk/types/UpiOptions.type.d.ts +3 -0
  32. package/package.json +2 -2
  33. package/dist/nmi-Ci4ItU_O-Dp-mCkGK.js +0 -7
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-D8pmLCaF-9Zn9KMBT.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-DiPpCK4e-CRZ470ug.js";
2
2
  class t extends e {
3
3
  getType() {
4
4
  return "CxPay";
@@ -1,5 +1,5 @@
1
- import { c as d, M as S, P as g, z as p, U as m, i as T, J as v, q as I, N as u, $ as f, C as y, O as A, Y as C } from "./index-gsXnNX5E.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, n = (l, e, s) => E(l, typeof e != "symbol" ? e + "" : e, s);
1
+ import { d, f as S, P as g, Y as p, U as m, n as T, J as v, X as f, M as u, $ as I, c as y, O as A, a as C } from "./index-DjmLClKy.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
3
  const P = { class: "mask" }, U = { class: "wrapper" }, b = { class: "container" }, $ = ["action"], M = ["value"], L = /* @__PURE__ */ m({
4
4
  __name: "ThreeDsChallenge",
5
5
  props: {
@@ -9,21 +9,21 @@ 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, a = e, o = T(null), i = JSON.stringify({
12
+ const s = l, n = e, o = T(null), i = 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
18
  }), r = encodeURI(window.btoa(i).replace(/=*$/, ""));
19
- return I(() => {
19
+ return f(() => {
20
20
  var t;
21
21
  (t = o.value) == null || t.submit();
22
22
  }), (t, h) => (C(), v("div", P, [
23
23
  u("div", U, [
24
24
  u("div", b, [
25
- f(y, {
26
- onClick: h[0] || (h[0] = (c) => a("close")),
25
+ I(y, {
26
+ onClick: h[0] || (h[0] = (c) => n("close")),
27
27
  id: "3ds-challenge-close"
28
28
  }),
29
29
  h[1] || (h[1] = u("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
@@ -47,47 +47,47 @@ const P = { class: "mask" }, U = { class: "wrapper" }, b = { class: "container"
47
47
  }), _ = /* @__PURE__ */ p(L, [["__scopeId", "data-v-ac351494"]]);
48
48
  class w {
49
49
  constructor() {
50
- n(this, "iframeId", "threeDsIframeMethod"), n(this, "containerId", "payfurlContainerFormInvoker"), n(this, "iframe", null), n(this, "container", null);
50
+ a(this, "iframeId", "threeDsIframeMethod"), a(this, "containerId", "payfurlContainerFormInvoker"), a(this, "iframe", null), a(this, "container", null);
51
51
  }
52
52
  createIFrame() {
53
53
  this.iframe || (this.container = document.createElement("div"), this.container.id = this.containerId, document.body.appendChild(this.container), this.iframe = document.createElement("iframe"), this.iframe.name = this.iframeId, this.iframe.style.display = "none", this.container.appendChild(this.iframe));
54
54
  }
55
- invoke(e, s, a, o, i) {
55
+ invoke(e, s, n, o, i) {
56
56
  var r;
57
57
  this.createIFrame();
58
58
  const t = document.createElement("form");
59
59
  t.action = e, t.target = this.iframeId, t.method = "post", (r = this.container) == null || r.appendChild(t);
60
- for (let h in a) {
60
+ for (let h in n) {
61
61
  const c = document.createElement("input");
62
- c.type = "hidden", c.name = h, c.value = a[h], t.appendChild(c);
62
+ c.type = "hidden", c.name = h, c.value = n[h], t.appendChild(c);
63
63
  }
64
64
  t.submit();
65
65
  }
66
66
  }
67
- const { hideSpinner: D, showSpinner: N } = d(), O = "3ds_method_invocation_complete", k = "3ds_challenge_complete";
68
- class V {
69
- constructor(e, s, a) {
70
- n(this, "log"), n(this, "container"), n(this, "options"), n(this, "threeDsProcessor", null), n(this, "threeDSDestroy", () => {
71
- }), n(this, "threeDSServerTransID", ""), n(this, "threeDSAuthURL", ""), n(this, "threeDSRequestorTransID", ""), n(this, "threeDSMonitorURL", ""), n(this, "internalMessageHandler", this.messageHandler.bind(this)), n(this, "onError", (o, i) => {
67
+ const { hideSpinner: D, showSpinner: O } = d(), k = "3ds_method_invocation_complete", N = "3ds_challenge_complete";
68
+ class q {
69
+ constructor(e, s, n) {
70
+ a(this, "log"), a(this, "container"), a(this, "options"), a(this, "threeDsProcessor", null), a(this, "threeDSDestroy", () => {
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) => {
72
72
  var r, t;
73
73
  if (this.closeChallenge(), D(), o === 404) {
74
74
  (r = this.threeDsProcessor) == null || r.onError({ error: "This feature is only supported by ActiveServer v1.1.2+" });
75
75
  return;
76
76
  }
77
77
  (t = this.threeDsProcessor) == null || t.onError({ error: "3D Secure failed", body: i });
78
- }), n(this, "onSuccess", (o, i) => {
78
+ }), a(this, "onSuccess", (o, i) => {
79
79
  var r, t;
80
80
  this.closeChallenge(), D();
81
81
  const h = JSON.parse(i);
82
82
  ["Y", "A"].includes(h.transStatus) ? (r = this.threeDsProcessor) == null || r.onSuccess(h) : (this.log(`[${this.getType()}]: 3D Secure failed`, h), (t = this.threeDsProcessor) == null || t.onError({ error: "3D Secure failed" }));
83
- }), n(this, "onInitAuthSuccess", (o, i) => {
83
+ }), a(this, "onInitAuthSuccess", (o, i) => {
84
84
  const r = JSON.parse(i);
85
85
  if (this.log(`[${this.getType()}][onInitAuthSuccess]`, r), this.threeDSRequestorTransID = r.threeDSRequestorTransID, this.threeDSServerTransID = r.threeDSServerTransID, this.threeDSMonitorURL = r.threeDSMonitorURL, this.threeDSAuthURL = r.threeDSAuthURL, r.threeDSMethodURL) {
86
86
  this.threeDsMethodInvoke(r.threeDSServerTransID, r.threeDSMethodURL);
87
87
  return;
88
88
  }
89
89
  this.onAuth(!1, "");
90
- }), n(this, "onDoAuthSuccess", (o, i) => {
90
+ }), a(this, "onDoAuthSuccess", (o, i) => {
91
91
  var r;
92
92
  const t = JSON.parse(i);
93
93
  if (this.log(`[${this.getType()}][onDoAuthSuccess]`, t), !t.transStatus) {
@@ -132,7 +132,7 @@ class V {
132
132
  });
133
133
  break;
134
134
  }
135
- }), this.log = e, this.container = s, this.options = a;
135
+ }), this.log = e, this.container = s, this.options = n;
136
136
  }
137
137
  getType() {
138
138
  return "Default";
@@ -141,16 +141,16 @@ class V {
141
141
  return "";
142
142
  }
143
143
  onPreAuth() {
144
- this.log(`[${this.getType()}][onPreAuth]`), this.threeDsProcessor && (N(), this.threeDsProcessor.onPreAuth(this.onInitAuthSuccess, this.onError), window.addEventListener("message", this.internalMessageHandler));
144
+ this.log(`[${this.getType()}][onPreAuth]`), this.threeDsProcessor && (O(), this.threeDsProcessor.onPreAuth(this.onInitAuthSuccess, this.onError), window.addEventListener("message", this.internalMessageHandler));
145
145
  }
146
146
  onAuth(e, s) {
147
- var a;
147
+ var n;
148
148
  this.log(`[${this.getType()}][onAuth]`, {
149
149
  threeDSAuthURL: this.threeDSAuthURL,
150
150
  threeDSRequestorTransID: this.threeDSRequestorTransID,
151
151
  threeDSServerTransID: this.threeDSServerTransID,
152
152
  isMethodPerformed: e
153
- }), (a = this.threeDsProcessor) == null || a.onAuth(this.threeDSAuthURL, this.threeDSRequestorTransID, this.threeDSServerTransID, e, s, this.onDoAuthSuccess, this.onError);
153
+ }), (n = this.threeDsProcessor) == null || n.onAuth(this.threeDSAuthURL, this.threeDSRequestorTransID, this.threeDSServerTransID, e, s, this.onDoAuthSuccess, this.onError);
154
154
  }
155
155
  onPostAuth() {
156
156
  var e;
@@ -164,13 +164,13 @@ class V {
164
164
  this.log(`[${this.getType()}][setThreeDsProcessor]`), this.threeDsProcessor = e;
165
165
  }
166
166
  messageHandler(e) {
167
- var s, a;
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 === O) {
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) {
170
170
  e.stopPropagation(), this.invocationComplete(e);
171
171
  return;
172
172
  }
173
- e.data.status === k && (e.stopPropagation(), this.challengeComplete(e));
173
+ e.data.status === N && (e.stopPropagation(), this.challengeComplete(e));
174
174
  }
175
175
  }
176
176
  invocationComplete(e) {
@@ -181,7 +181,7 @@ class V {
181
181
  const s = JSON.parse(window.atob(e.data.cres));
182
182
  this.log(`[${this.getType()}]: cresData`, s), ["Y", "A"].includes(s.transStatus) ? this.onPostAuth() : ["N", "U", "R"].includes(s.transStatus) && (this.log(`[${this.getType()}]: Failed 3DS Challenge`, e.data), this.onError(400, "Failed 3DS Challenge"));
183
183
  }
184
- doChallenge(e, s, a) {
184
+ doChallenge(e, s, n) {
185
185
  this.log(`[${this.getType()}][doChallenge]`), D();
186
186
  const { destroy: o } = g({
187
187
  el: document.body,
@@ -190,7 +190,7 @@ class V {
190
190
  threeDSServerTransID: this.threeDSServerTransID,
191
191
  acsTransID: s,
192
192
  formAction: e,
193
- authenticationValue: a
193
+ authenticationValue: n
194
194
  },
195
195
  on: {
196
196
  close: () => {
@@ -208,17 +208,17 @@ class V {
208
208
  }
209
209
  threeDsMethodInvoke(e, s) {
210
210
  this.log(`[${this.getType()}][threeDsMethodInvoke]`, { threeDSServerTransID: e, threeDSMethodURL: s });
211
- const a = {
211
+ const n = {
212
212
  threeDSServerTransID: e,
213
213
  threeDSMethodNotificationURL: this.options.apiUrl + "/3ds/method_invocation"
214
- }, o = encodeURI(window.btoa(JSON.stringify(a)).replace(/=*$/, ""));
214
+ }, o = encodeURI(window.btoa(JSON.stringify(n)).replace(/=*$/, ""));
215
215
  new w().invoke(s, "POST", {
216
216
  threeDSMethodData: o
217
217
  });
218
218
  }
219
219
  }
220
220
  export {
221
- V as DefaultThreeDsProvider,
222
- k as THREE_DS_CHALLENGE_COMPLETE,
223
- O as THREE_DS_METHOD_INVOCATION_COMPLETE
221
+ q as DefaultThreeDsProvider,
222
+ N as THREE_DS_CHALLENGE_COMPLETE,
223
+ k as THREE_DS_METHOD_INVOCATION_COMPLETE
224
224
  };
@@ -1,7 +1,7 @@
1
- import { DefaultThreeDsProvider as l } from "./DefaultThreeDsProvider-OrSUoygj-C1fnz8Dl.js";
2
- import { P as i, z as h, U as c, i as u, J as D, q as d, Y as p, N as o, $ as m, C as g, O as v } from "./index-gsXnNX5E.js";
1
+ import { DefaultThreeDsProvider as l } from "./DefaultThreeDsProvider-DvV6zVzO-DDYac6nh.js";
2
+ import { P as i, Y as h, U as c, n as u, J as D, X as d, a as p, M as n, $ as m, c as g, O as v } from "./index-DjmLClKy.js";
3
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 P = { class: "mask" }, f = { class: "wrapper" }, C = { class: "container" }, I = ["action"], A = ["value"], $ = /* @__PURE__ */ c({
4
+ const P = { class: "mask" }, f = { class: "wrapper" }, I = { class: "container" }, C = ["action"], A = ["value"], $ = /* @__PURE__ */ c({
5
5
  __name: "ecentric",
6
6
  props: {
7
7
  threeDSServerTransID: {},
@@ -10,30 +10,30 @@ const P = { class: "mask" }, f = { class: "wrapper" }, C = { class: "container"
10
10
  authenticationValue: {}
11
11
  },
12
12
  setup(r) {
13
- const e = r, t = u(null), n = e.authenticationValue;
13
+ const e = r, t = u(null), o = e.authenticationValue;
14
14
  return d(() => {
15
15
  var a;
16
16
  (a = t.value) == null || a.submit();
17
17
  }), (a, s) => (p(), D("div", P, [
18
- o("div", f, [
19
- o("div", C, [
18
+ n("div", f, [
19
+ n("div", I, [
20
20
  m(g, {
21
21
  onClick: s[0] || (s[0] = (b) => a.emit("close"))
22
22
  }),
23
- s[1] || (s[1] = o("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
24
- o("form", {
23
+ s[1] || (s[1] = n("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
24
+ n("form", {
25
25
  action: e.formAction,
26
26
  target: "ThreeDsChallengeIFrame",
27
27
  method: "post",
28
28
  ref_key: "form",
29
29
  ref: t
30
30
  }, [
31
- o("input", {
31
+ n("input", {
32
32
  type: "hidden",
33
33
  name: "PaReq",
34
- value: v(n)
34
+ value: v(o)
35
35
  }, null, 8, A)
36
- ], 8, I)
36
+ ], 8, C)
37
37
  ])
38
38
  ])
39
39
  ]));
@@ -56,7 +56,7 @@ 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
61
  const { destroy: a } = i({
62
62
  el: document.body,
@@ -65,7 +65,7 @@ class R extends l {
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: () => {
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-D8pmLCaF-9Zn9KMBT.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-DiPpCK4e-CRZ470ug.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-D8pmLCaF-9Zn9KMBT.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-DiPpCK4e-CRZ470ug.js";
2
2
  class s extends e {
3
3
  getType() {
4
4
  return "FlashBanc";
@@ -1,5 +1,5 @@
1
- import { DefaultThreeDsProvider as n } from "./DefaultThreeDsProvider-OrSUoygj-C1fnz8Dl.js";
2
- import { P as o, z as l, U as u, J as c, Y as p, N as h, E as i } from "./index-gsXnNX5E.js";
1
+ import { DefaultThreeDsProvider as n } from "./DefaultThreeDsProvider-DvV6zVzO-DDYac6nh.js";
2
+ import { P as o, Y as l, U as u, J as c, a as p, M as h, E as i } from "./index-DjmLClKy.js";
3
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
4
  const S = { class: "mask" }, D = { class: "wrapper" }, m = ["src"], y = /* @__PURE__ */ u({
5
5
  __name: "GPayments",
@@ -1,23 +1,23 @@
1
- import { DefaultThreeDsProvider as C } from "./DefaultThreeDsProvider-OrSUoygj-C1fnz8Dl.js";
2
- import { c as P, b as d, P as S, z as w, U as E, i as A, I as b, q as f, u as T, R as L, Y as _, J as I, N as g, $ as N, C as x } from "./index-gsXnNX5E.js";
3
- var G = Object.defineProperty, $ = (l, e, t) => e in l ? G(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" }, j = /* @__PURE__ */ E({
1
+ import { DefaultThreeDsProvider as P } from "./DefaultThreeDsProvider-DvV6zVzO-DDYac6nh.js";
2
+ import { d as C, b as d, P as S, Y as w, U as E, n as A, S as b, X as f, l as T, e as L, a as _, J as x, M as g, $ as G, c as N } from "./index-DjmLClKy.js";
3
+ var $ = Object.defineProperty, I = (l, e, t) => e in l ? $(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t, m = (l, e, t) => I(l, typeof e != "symbol" ? e + "" : e, t);
4
+ const M = { class: "mask" }, H = { class: "wrapper" }, O = { class: "container" }, j = /* @__PURE__ */ E({
5
5
  __name: "MetricsGlobalThreeDsChallenge",
6
6
  emits: ["close", "submit"],
7
7
  setup(l, { emit: e }) {
8
- const t = e, o = A(!1);
9
- function a(h) {
8
+ const t = e, a = A(!1);
9
+ function o(h) {
10
10
  var r;
11
- ["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes((r = h.data) == null ? void 0 : r.message) && (o.value = h.data.message === "3DS_CHALLENGE_SHOW");
11
+ ["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes((r = h.data) == null ? void 0 : r.message) && (a.value = h.data.message === "3DS_CHALLENGE_SHOW");
12
12
  }
13
13
  return f(() => {
14
- window.addEventListener("message", a);
14
+ window.addEventListener("message", o);
15
15
  }), T(() => {
16
- window.removeEventListener("message", a);
17
- }), (h, r) => b((_(), I("div", H, [
18
- g("div", M, [
16
+ window.removeEventListener("message", o);
17
+ }), (h, r) => b((_(), x("div", M, [
18
+ g("div", H, [
19
19
  g("div", O, [
20
- N(x, {
20
+ G(N, {
21
21
  onClick: r[0] || (r[0] = (s) => t("close")),
22
22
  id: "3ds-challenge-close"
23
23
  }),
@@ -25,14 +25,14 @@ const H = { class: "mask" }, M = { class: "wrapper" }, O = { class: "container"
25
25
  ])
26
26
  ])
27
27
  ], 512)), [
28
- [L, o.value]
28
+ [L, a.value]
29
29
  ]);
30
30
  }
31
- }), k = /* @__PURE__ */ w(j, [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: u, showSpinner: F } = P(), p = 5;
32
- class q 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) || "");
31
+ }), k = /* @__PURE__ */ w(j, [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: u, showSpinner: F } = C(), p = 5;
32
+ class W 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) || "");
36
36
  }
37
37
  getType() {
38
38
  return "MetricsGlobal";
@@ -50,9 +50,9 @@ class q extends C {
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(), (o) => {
54
- var a;
55
- (a = this.threeDsProcessor) == null || a.setPaymentInfo(o), this.startAuth();
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();
56
56
  }, () => {
57
57
  d(this.container, "Unable to get card information");
58
58
  }) : this.startAuth();
@@ -62,7 +62,7 @@ class q extends C {
62
62
  onPostAuth() {
63
63
  }
64
64
  startAuth() {
65
- var e, t, o, a, h;
65
+ var e, t, a, o, h;
66
66
  this.log(`[${this.getType()}]: startAuth`);
67
67
  const r = (e = this.threeDsProcessor) == null ? void 0 : e.getPaymentInfo();
68
68
  if (!r) {
@@ -74,8 +74,8 @@ class q extends C {
74
74
  cardNumber: r.cardNumber,
75
75
  cardExpMonth: D,
76
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(),
77
+ currency: (a = this.threeDsProcessor) == null ? void 0 : a.getCurrency(),
78
+ amount: (o = this.threeDsProcessor) == null ? void 0 : o.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,
@@ -109,8 +109,8 @@ class q extends C {
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 o;
113
- this.log(`[${this.getType()}]: gateway error`, t), (o = this.threeDsProcessor) == null || o.onError({ error: t.message }), this.threeDS = null, this.numAttempts = p;
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;
114
114
  });
115
115
  }
116
116
  initChallenge() {
@@ -142,5 +142,5 @@ class q extends C {
142
142
  }
143
143
  }
144
144
  export {
145
- q as MetricsGlobalThreeDsProvider
145
+ W as MetricsGlobalThreeDsProvider
146
146
  };
@@ -1,4 +1,4 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-D8pmLCaF-9Zn9KMBT.js";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-DiPpCK4e-CRZ470ug.js";
2
2
  class t extends e {
3
3
  getType() {
4
4
  return "NMI";
@@ -1,7 +1,7 @@
1
- import { b as d, P as p, z as m, U as g, c as h, q as D, J as S, Y as v, N as l } from "./index-gsXnNX5E.js";
2
- import { DefaultThreeDsProvider as y, THREE_DS_METHOD_INVOCATION_COMPLETE as P, THREE_DS_CHALLENGE_COMPLETE as T } from "./DefaultThreeDsProvider-OrSUoygj-C1fnz8Dl.js";
3
- var f = Object.defineProperty, N = (n, e, a) => e in n ? f(n, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[e] = a, c = (n, e, a) => N(n, typeof e != "symbol" ? e + "" : e, a);
4
- const I = { class: "mask" }, C = /* @__PURE__ */ g({
1
+ import { b as d, P as p, Y as m, U as g, d as h, X as D, J as S, a as v, M as l } from "./index-DjmLClKy.js";
2
+ import { DefaultThreeDsProvider as y, THREE_DS_METHOD_INVOCATION_COMPLETE as P, THREE_DS_CHALLENGE_COMPLETE as T } from "./DefaultThreeDsProvider-DvV6zVzO-DDYac6nh.js";
3
+ var f = Object.defineProperty, I = (n, e, r) => e in n ? f(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r, c = (n, e, r) => I(n, typeof e != "symbol" ? e + "" : e, r);
4
+ const N = { class: "mask" }, C = /* @__PURE__ */ g({
5
5
  __name: "nuvei",
6
6
  props: {
7
7
  threeDSServerTransID: {},
@@ -20,15 +20,15 @@ const I = { class: "mask" }, C = /* @__PURE__ */ g({
20
20
  country: {}
21
21
  },
22
22
  setup(n) {
23
- const { hideSpinner: e, showSpinner: a } = h(), s = n;
23
+ const { hideSpinner: e, showSpinner: r } = h(), s = n;
24
24
  D(() => {
25
- a();
25
+ r();
26
26
  const t = document.createElement("script");
27
27
  t.type = "text/javascript", t.src = "https://cdn.safecharge.com/safecharge_resources/v1/websdk/safecharge.js", t.onload = () => {
28
- const r = new MutationObserver(function() {
29
- document.getElementsByClassName("sfcModal-dialog")[0] && (e(), r.disconnect());
28
+ const a = new MutationObserver(function() {
29
+ document.getElementsByClassName("sfcModal-dialog")[0] && (e(), a.disconnect());
30
30
  }), i = { childList: !0 }, u = document.querySelector("body");
31
- r.observe(u, i), o();
31
+ a.observe(u, i), o();
32
32
  }, document.head.appendChild(t);
33
33
  });
34
34
  function o() {
@@ -67,11 +67,11 @@ const I = { class: "mask" }, C = /* @__PURE__ */ g({
67
67
  email: s.email,
68
68
  country: s.country
69
69
  }
70
- }, function(r) {
71
- window.postMessage({ status: "3ds_challenge_complete", cres: r }, "*");
70
+ }, function(a) {
71
+ window.postMessage({ status: "3ds_challenge_complete", cres: a }, "*");
72
72
  });
73
73
  }
74
- return (t, r) => (v(), S("div", I, r[0] || (r[0] = [
74
+ return (t, a) => (v(), S("div", N, a[0] || (a[0] = [
75
75
  l("div", { class: "wrapper" }, [
76
76
  l("div", { class: "container" })
77
77
  ], -1)
@@ -80,40 +80,40 @@ const I = { class: "mask" }, C = /* @__PURE__ */ g({
80
80
  }), _ = /* @__PURE__ */ m(C, [["__scopeId", "data-v-6293d147"]]), { hideSpinner: b } = h();
81
81
  class A extends y {
82
82
  constructor() {
83
- super(...arguments), c(this, "_paResPayload", null), c(this, "onSuccess", (e, a) => {
83
+ super(...arguments), c(this, "_paResPayload", null), c(this, "onSuccess", (e, r) => {
84
84
  var s, o;
85
85
  this.closeChallenge(), b();
86
- const t = JSON.parse(a);
86
+ const t = JSON.parse(r);
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
- }), c(this, "onDoAuthSuccess", (e, a) => {
88
+ }), c(this, "onDoAuthSuccess", (e, r) => {
89
89
  var s, o, t;
90
- const r = JSON.parse(a);
91
- if (this.log(`[${this.getType()}][onDoAuthSuccess]`, r), !r.transStatus || !r.authenticationValue) {
90
+ const a = JSON.parse(r);
91
+ if (this.log(`[${this.getType()}][onDoAuthSuccess]`, a), !a.transStatus || !a.authenticationValue) {
92
92
  this.onError(e, "No transStatus specified");
93
93
  return;
94
94
  }
95
- switch (r.transStatus) {
95
+ switch (a.transStatus) {
96
96
  case "C":
97
- this.doNuveiChallenge(r.authenticationValue, (s = this.threeDsProcessor) == null ? void 0 : s.getAddressInfo(), (o = this.threeDsProcessor) == null ? void 0 : o.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
- this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ` + r.transStatus), (t = this.threeDsProcessor) == null || t.onSuccess({
101
- threeDSServerTransID: r.threeDSServerTransID,
100
+ this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ` + a.transStatus), (t = this.threeDsProcessor) == null || t.onSuccess({
101
+ threeDSServerTransID: a.threeDSServerTransID,
102
102
  threeDSRequestorTransID: "",
103
- acsRenderingType: r.acsRenderingType,
104
- acsTransID: r.acsTransID,
105
- authenticationType: r.authenticationType,
106
- authenticationValue: r.authenticationValue,
103
+ acsRenderingType: a.acsRenderingType,
104
+ acsTransID: a.acsTransID,
105
+ authenticationType: a.authenticationType,
106
+ authenticationValue: a.authenticationValue,
107
107
  challengeCancel: "",
108
- dsTransID: r.dsTransID,
109
- eci: r.eci,
108
+ dsTransID: a.dsTransID,
109
+ eci: a.eci,
110
110
  interactionCounter: "",
111
111
  messageCategory: "",
112
- messageExtension: r.messageExtension,
113
- messageType: r.messageType,
114
- messageVersion: r.messageVersion,
115
- transStatus: r.transStatus,
116
- transStatusReason: r.transStatusReason
112
+ messageExtension: a.messageExtension,
113
+ messageType: a.messageType,
114
+ messageVersion: a.messageVersion,
115
+ transStatus: a.transStatus,
116
+ transStatusReason: a.transStatusReason
117
117
  });
118
118
  break;
119
119
  }
@@ -123,8 +123,8 @@ class A extends y {
123
123
  return "Nuvei";
124
124
  }
125
125
  onPreAuth() {
126
- var e, a;
127
- this.log(`[${this.getType()}]: onPreAuth`), (e = this.threeDsProcessor) != null && e.getTokenId() ? (a = this.threeDsProcessor) == null || a.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (s) => {
126
+ var e, r;
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
128
  var o;
129
129
  (o = this.threeDsProcessor) == null || o.setPaymentInfo(s), super.onPreAuth();
130
130
  }, () => {
@@ -142,27 +142,27 @@ class A extends y {
142
142
  xid: this._paResPayload.xid
143
143
  }, this.onSuccess, this.onError);
144
144
  }
145
- doNuveiChallenge(e, a, s) {
145
+ doNuveiChallenge(e, r, s) {
146
146
  var o;
147
147
  const t = JSON.parse(e);
148
- (t === null || !t.merchantId || !t.merchantSiteId) && ((o = this.threeDsProcessor) == null || o.onError({ error: "3D Secure failed" })), a && (t.firstName = a.firstName, t.lastName = a.lastName, t.email = a.email, t.country = a.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
- const { destroy: r } = p({
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
+ const { destroy: a } = p({
150
150
  el: document.body,
151
151
  component: _,
152
152
  props: t,
153
153
  on: {
154
154
  close: () => {
155
155
  var i;
156
- r(), this.threeDSDestroy = () => {
156
+ a(), this.threeDSDestroy = () => {
157
157
  }, (i = this.threeDsProcessor) == null || i.onError({ error: "Challenge cancelled" });
158
158
  }
159
159
  }
160
160
  });
161
- this.threeDSDestroy = r;
161
+ this.threeDSDestroy = a;
162
162
  }
163
163
  messageHandler(e) {
164
- var a, s, o;
165
- if ((a = e == null ? void 0 : e.data) != null && a.status) {
164
+ var r, s, o;
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;
@@ -1,36 +1,36 @@
1
- import { DefaultThreeDsProvider as y } from "./DefaultThreeDsProvider-OrSUoygj-C1fnz8Dl.js";
2
- import { b as c, P as f, z as C, i as u, U as w, a as E, q as D, u as m, J as I, Y as L, N as g, _ as S } from "./index-gsXnNX5E.js";
3
- const h = u(!1);
1
+ import { DefaultThreeDsProvider as f } from "./DefaultThreeDsProvider-DvV6zVzO-DDYac6nh.js";
2
+ import { b as c, P as y, Y as C, n as h, U as w, o as E, X as m, l as p, J as I, a as L, M as g, h as S } from "./index-DjmLClKy.js";
3
+ const u = h(!1);
4
4
  function k(r, ...e) {
5
- h.value && console.log(r, e);
5
+ u.value && console.log(r, e);
6
6
  }
7
- function p(r) {
7
+ function D(r) {
8
8
  var e, t;
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));
9
+ (e = r == null ? void 0 : r.data) != null && e.status && r.data.status === S && (u.value = !!((t = r == null ? void 0 : r.data) != null && t.debug));
10
10
  }
11
11
  function R() {
12
- return D(() => {
13
- window.addEventListener("message", p);
14
- }), m(() => {
15
- window.removeEventListener("message", p);
12
+ return m(() => {
13
+ window.addEventListener("message", D);
14
+ }), p(() => {
15
+ window.removeEventListener("message", D);
16
16
  }), {
17
- debug: h,
17
+ debug: u,
18
18
  logMessage: k
19
19
  };
20
20
  }
21
- const b = { class: "modal-mask" }, U = { class: "modal-wrapper" }, A = ["src"], _ = /* @__PURE__ */ w({
21
+ const b = { class: "modal-mask" }, U = { class: "modal-wrapper" }, A = ["src"], M = /* @__PURE__ */ w({
22
22
  __name: "PayGLocalThreeDsChallenge",
23
23
  props: {
24
24
  url: {}
25
25
  },
26
26
  emits: ["close"],
27
27
  setup(r, { emit: e }) {
28
- const { logMessage: t } = R(), a = r, s = e, o = u(a.url);
29
- u(null), E(() => a.url, (l) => {
28
+ const { logMessage: t } = R(), a = r, s = e, o = h(a.url);
29
+ h(null), E(() => a.url, (l) => {
30
30
  o.value = l;
31
- }), D(() => {
32
- window.addEventListener("message", n);
33
31
  }), m(() => {
32
+ window.addEventListener("message", n);
33
+ }), p(() => {
34
34
  window.removeEventListener("message", n);
35
35
  });
36
36
  function n(l) {
@@ -50,8 +50,8 @@ const b = { class: "modal-mask" }, U = { class: "modal-wrapper" }, A = ["src"],
50
50
  ])
51
51
  ]));
52
52
  }
53
- }), x = /* @__PURE__ */ C(_, [["__scopeId", "data-v-6f042298"]]);
54
- class G extends y {
53
+ }), $ = /* @__PURE__ */ C(M, [["__scopeId", "data-v-6f042298"]]);
54
+ class G extends f {
55
55
  getType() {
56
56
  return "PayGLocal";
57
57
  }
@@ -81,9 +81,9 @@ class G extends y {
81
81
  c(this.container, "3D Secure URL is missing");
82
82
  return;
83
83
  }
84
- const { destroy: t } = f({
84
+ const { destroy: t } = y({
85
85
  el: document.body,
86
- component: x,
86
+ component: $,
87
87
  props: {
88
88
  url: e
89
89
  },
@@ -1,4 +1,4 @@
1
- import { L as b, x as v, k as g } from "./index-gsXnNX5E.js";
1
+ import { x as b, F as v, k as g } from "./index-DjmLClKy.js";
2
2
  var A = Object.defineProperty, C = (n, t, e) => t in n ? A(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, i = (n, t, e) => C(n, typeof t != "symbol" ? t + "" : t, e);
3
3
  const h = {
4
4
  CHECKOUT: "CHECKOUT",