@payfurl/client 4.6.0 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+ import { MetricsGlobalThreeDsProvider as r } from "./MetricsGlobalThreeDsProvider-7f36be7b.mjs";
2
+ import "./DefaultThreeDsProvider-e98c909f.mjs";
3
+ import "./main-eb4bb451.mjs";
4
+ class i extends r {
5
+ getType() {
6
+ return "CxPay";
7
+ }
8
+ getDomain() {
9
+ return "cxpay.transactiongateway.com";
10
+ }
11
+ }
12
+ export {
13
+ i as CxPayThreeDsProvider
14
+ };
@@ -1,7 +1,7 @@
1
1
  var D = Object.defineProperty;
2
2
  var u = (a, e, s) => e in a ? D(a, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[e] = s;
3
- var r = (a, e, s) => (u(a, typeof e != "symbol" ? e + "" : e, s), s);
4
- import { d as S, r as d, o as p, a as g, c as T, b as n, e as _, C as I, u as m, p as f, f as y, _ as A, i as v, T as C, j as c, g as E, F as R } from "./main-f2996bc2.mjs";
3
+ var o = (a, e, s) => (u(a, typeof e != "symbol" ? e + "" : e, s), s);
4
+ import { d as S, r as d, o as g, a as p, c as T, b as n, e as _, C as m, u as I, p as f, f as y, _ as A, j as v, T as C, i as c, g as E, F as R } from "./main-eb4bb451.mjs";
5
5
  const P = (a) => (f("data-v-c82daa22"), a = a(), y(), a), U = { class: "mask" }, $ = { class: "wrapper" }, L = { class: "container" }, b = /* @__PURE__ */ P(() => /* @__PURE__ */ n("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)), M = ["action"], w = ["value"], N = /* @__PURE__ */ S({
6
6
  __name: "ThreeDsChallenge",
7
7
  props: {
@@ -11,20 +11,20 @@ const P = (a) => (f("data-v-c82daa22"), a = a(), y(), a), U = { class: "mask" },
11
11
  },
12
12
  emits: ["close", "submit"],
13
13
  setup(a, { emit: e }) {
14
- const s = a, t = d(null), o = JSON.stringify({
14
+ const s = a, t = d(null), r = JSON.stringify({
15
15
  threeDSServerTransID: s.threeDSServerTransID,
16
16
  acsTransID: s.acsTransID,
17
17
  messageVersion: "2.1.0",
18
18
  messageType: "CReq",
19
19
  challengeWindowSize: "01"
20
- }), i = encodeURI(window.btoa(o).replace(/=*$/, ""));
21
- return p(() => {
20
+ }), i = encodeURI(window.btoa(r).replace(/=*$/, ""));
21
+ return g(() => {
22
22
  var h;
23
23
  (h = t.value) == null || h.submit();
24
- }), (h, l) => (g(), T("div", U, [
24
+ }), (h, l) => (p(), T("div", U, [
25
25
  n("div", $, [
26
26
  n("div", L, [
27
- _(I, {
27
+ _(m, {
28
28
  onClick: l[0] || (l[0] = (V) => e("close")),
29
29
  id: "3ds-challenge-close"
30
30
  }),
@@ -39,7 +39,7 @@ const P = (a) => (f("data-v-c82daa22"), a = a(), y(), a), U = { class: "mask" },
39
39
  n("input", {
40
40
  type: "hidden",
41
41
  name: "creq",
42
- value: m(i)
42
+ value: I(i)
43
43
  }, null, 8, w)
44
44
  ], 8, M)
45
45
  ])
@@ -50,44 +50,43 @@ const P = (a) => (f("data-v-c82daa22"), a = a(), y(), a), U = { class: "mask" },
50
50
  const k = /* @__PURE__ */ A(N, [["__scopeId", "data-v-c82daa22"]]), O = "3ds_method_invocation_complete", q = "3ds_challenge_complete";
51
51
  class F {
52
52
  constructor(e, s, t) {
53
- r(this, "type", "default");
54
- r(this, "log");
55
- r(this, "container");
56
- r(this, "options");
57
- r(this, "threeDsProcessor", null);
58
- r(this, "threeDSDestroy", () => {
53
+ o(this, "log");
54
+ o(this, "container");
55
+ o(this, "options");
56
+ o(this, "threeDsProcessor", null);
57
+ o(this, "threeDSDestroy", () => {
59
58
  });
60
- r(this, "threeDSServerTransID", "");
61
- r(this, "threeDSAuthURL", "");
62
- r(this, "threeDSRequestorTransID", "");
63
- r(this, "threeDSMonitorURL", "");
64
- r(this, "internalMessageHandler", this.messageHandler.bind(this));
65
- r(this, "onError", (e, s) => {
66
- var t, o;
59
+ o(this, "threeDSServerTransID", "");
60
+ o(this, "threeDSAuthURL", "");
61
+ o(this, "threeDSRequestorTransID", "");
62
+ o(this, "threeDSMonitorURL", "");
63
+ o(this, "internalMessageHandler", this.messageHandler.bind(this));
64
+ o(this, "onError", (e, s) => {
65
+ var t, r;
67
66
  if (this.closeChallenge(), c(), e === 404) {
68
67
  (t = this.threeDsProcessor) == null || t.onError({ error: "This feature is only supported by ActiveServer v1.1.2+" });
69
68
  return;
70
69
  }
71
- (o = this.threeDsProcessor) == null || o.onError({ error: "3D Secure failed", body: s });
70
+ (r = this.threeDsProcessor) == null || r.onError({ error: "3D Secure failed", body: s });
72
71
  });
73
- r(this, "onSuccess", (e, s) => {
74
- var o, i;
72
+ o(this, "onSuccess", (e, s) => {
73
+ var r, i;
75
74
  this.closeChallenge(), c();
76
75
  const t = JSON.parse(s);
77
- ["Y", "A"].includes(t.transStatus) ? (o = this.threeDsProcessor) == null || o.onSuccess(t) : (this.log(`[${this.type}]: 3D Secure failed`, t), (i = this.threeDsProcessor) == null || i.onError({ error: "3D Secure failed" }));
76
+ ["Y", "A"].includes(t.transStatus) ? (r = this.threeDsProcessor) == null || r.onSuccess(t) : (this.log(`[${this.getType()}]: 3D Secure failed`, t), (i = this.threeDsProcessor) == null || i.onError({ error: "3D Secure failed" }));
78
77
  });
79
- r(this, "onInitAuthSuccess", (e, s) => {
78
+ o(this, "onInitAuthSuccess", (e, s) => {
80
79
  const t = JSON.parse(s);
81
- if (this.log(`[${this.type}][onInitAuthSuccess]`, t), this.threeDSRequestorTransID = t.threeDSRequestorTransID, this.threeDSServerTransID = t.threeDSServerTransID, this.threeDSMonitorURL = t.threeDSMonitorURL, this.threeDSAuthURL = t.threeDSAuthURL, t.threeDSMethodURL) {
80
+ if (this.log(`[${this.getType()}][onInitAuthSuccess]`, t), this.threeDSRequestorTransID = t.threeDSRequestorTransID, this.threeDSServerTransID = t.threeDSServerTransID, this.threeDSMonitorURL = t.threeDSMonitorURL, this.threeDSAuthURL = t.threeDSAuthURL, t.threeDSMethodURL) {
82
81
  this.threeDsMethodInvoke(t.threeDSServerTransID, t.threeDSMethodURL);
83
82
  return;
84
83
  }
85
84
  this.onAuth(!1, "");
86
85
  });
87
- r(this, "onDoAuthSuccess", (e, s) => {
88
- var o;
86
+ o(this, "onDoAuthSuccess", (e, s) => {
87
+ var r;
89
88
  const t = JSON.parse(s);
90
- if (this.log(`[${this.type}][onDoAuthSuccess]`, t), !t.transStatus) {
89
+ if (this.log(`[${this.getType()}][onDoAuthSuccess]`, t), !t.transStatus) {
91
90
  this.onError(e, "No transStatus specified");
92
91
  return;
93
92
  }
@@ -100,16 +99,16 @@ class F {
100
99
  this.doChallenge(t.acsURL, t.acsTransID);
101
100
  break;
102
101
  case "N":
103
- this.log(`[${this.type}][threeDsAuth], 3DS Verification failed, transaction denied`), this.onError(400, "3DS Verification failed, transaction denied");
102
+ this.log(`[${this.getType()}][threeDsAuth], 3DS Verification failed, transaction denied`), this.onError(400, "3DS Verification failed, transaction denied");
104
103
  break;
105
104
  case "U":
106
- this.log(`[${this.type}][threeDsAuth], Unable to perform 3DS verification`), this.onError(400, "Unable to perform 3DS verification");
105
+ this.log(`[${this.getType()}][threeDsAuth], Unable to perform 3DS verification`), this.onError(400, "Unable to perform 3DS verification");
107
106
  break;
108
107
  case "R":
109
- this.log(`[${this.type}][threeDsAuth], Unable to perform 3DS verification, rejected at issuer`), this.onError(400, "Unable to perform 3DS verification, rejected at issuer");
108
+ this.log(`[${this.getType()}][threeDsAuth], Unable to perform 3DS verification, rejected at issuer`), this.onError(400, "Unable to perform 3DS verification, rejected at issuer");
110
109
  break;
111
110
  default:
112
- this.log(`[${this.type}][threeDsAuth], 3DS challenge not required, tranStatus: ${t.transStatus}`), (o = this.threeDsProcessor) == null || o.onSuccess({
111
+ this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ${t.transStatus}`), (r = this.threeDsProcessor) == null || r.onSuccess({
113
112
  threeDSServerTransID: t.threeDSServerTransID,
114
113
  threeDSRequestorTransID: "",
115
114
  acsRenderingType: t.acsRenderingType,
@@ -132,12 +131,18 @@ class F {
132
131
  });
133
132
  this.log = e, this.container = s, this.options = t;
134
133
  }
134
+ getType() {
135
+ return "Default";
136
+ }
137
+ getDomain() {
138
+ return "";
139
+ }
135
140
  onPreAuth() {
136
- this.log(`[${this.type}][onPreAuth]`), this.threeDsProcessor && (v(), this.threeDsProcessor.onPreAuth(this.onInitAuthSuccess, this.onError), window.addEventListener("message", this.internalMessageHandler));
141
+ this.log(`[${this.getType()}][onPreAuth]`), this.threeDsProcessor && (v(), this.threeDsProcessor.onPreAuth(this.onInitAuthSuccess, this.onError), window.addEventListener("message", this.internalMessageHandler));
137
142
  }
138
143
  onAuth(e, s) {
139
144
  var t;
140
- this.log(`[${this.type}][onAuth]`, {
145
+ this.log(`[${this.getType()}][onAuth]`, {
141
146
  threeDSAuthURL: this.threeDSAuthURL,
142
147
  threeDSRequestorTransID: this.threeDSRequestorTransID,
143
148
  threeDSServerTransID: this.threeDSServerTransID,
@@ -146,14 +151,14 @@ class F {
146
151
  }
147
152
  onPostAuth() {
148
153
  var e;
149
- this.log(`[${this.type}][onPostAuth]`, {
154
+ this.log(`[${this.getType()}][onPostAuth]`, {
150
155
  threeDSServerTransID: this.threeDSServerTransID
151
156
  }), (e = this.threeDsProcessor) == null || e.onPostAuth({
152
157
  threeDSServerTransID: this.threeDSServerTransID
153
158
  }, this.onSuccess, this.onError);
154
159
  }
155
160
  setThreeDsProcessor(e) {
156
- this.log(`[${this.type}][setThreeDsProcessor]`), this.threeDsProcessor = e;
161
+ this.log(`[${this.getType()}][setThreeDsProcessor]`), this.threeDsProcessor = e;
157
162
  }
158
163
  messageHandler(e) {
159
164
  var s, t;
@@ -166,15 +171,15 @@ class F {
166
171
  }
167
172
  }
168
173
  invocationComplete(e) {
169
- this.log(`[${this.type}]: 3Ds Method invocation complete`), this.onAuth(!0, "");
174
+ this.log(`[${this.getType()}]: 3Ds Method invocation complete`), this.onAuth(!0, "");
170
175
  }
171
176
  challengeComplete(e) {
172
- this.log(`[${this.type}]: 3Ds Challenge complete`, e.data), this.closeChallenge();
177
+ this.log(`[${this.getType()}]: 3Ds Challenge complete`, e.data), this.closeChallenge();
173
178
  const s = JSON.parse(window.atob(e.data.cres));
174
- this.log(`[${this.type}]: cresData`, s), ["Y", "A"].includes(s.transStatus) ? this.onPostAuth() : ["N", "U", "R"].includes(s.transStatus) && (this.log(`[${this.type}]: Failed 3DS Challenge`, e.data), this.onError(400, "Failed 3DS Challenge"));
179
+ 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"));
175
180
  }
176
181
  doChallenge(e, s) {
177
- this.log(`[${this.type}][doChallenge]`), c();
182
+ this.log(`[${this.getType()}][doChallenge]`), c();
178
183
  const { destroy: t } = E({
179
184
  el: document.body,
180
185
  component: k,
@@ -185,9 +190,9 @@ class F {
185
190
  },
186
191
  on: {
187
192
  close: () => {
188
- var o;
193
+ var r;
189
194
  t(), this.threeDSDestroy = () => {
190
- }, (o = this.threeDsProcessor) == null || o.onError({ error: "Challenge cancelled" });
195
+ }, (r = this.threeDsProcessor) == null || r.onError({ error: "Challenge cancelled" });
191
196
  }
192
197
  }
193
198
  });
@@ -198,13 +203,13 @@ class F {
198
203
  (e = this.threeDSDestroy) == null || e.call(this), window.removeEventListener("message", this.internalMessageHandler);
199
204
  }
200
205
  threeDsMethodInvoke(e, s) {
201
- this.log(`[${this.type}][threeDsMethodInvoke]`, { threeDSServerTransID: e, threeDSMethodURL: s });
206
+ this.log(`[${this.getType()}][threeDsMethodInvoke]`, { threeDSServerTransID: e, threeDSMethodURL: s });
202
207
  const t = {
203
208
  threeDSServerTransID: e,
204
209
  threeDSMethodNotificationURL: this.options.apiUrl + "/3ds/method_invocation"
205
- }, o = encodeURI(window.btoa(JSON.stringify(t)).replace(/=*$/, ""));
210
+ }, r = encodeURI(window.btoa(JSON.stringify(t)).replace(/=*$/, ""));
206
211
  new R().invoke(s, "POST", {
207
- threeDSMethodData: o
212
+ threeDSMethodData: r
208
213
  });
209
214
  }
210
215
  }
@@ -0,0 +1,14 @@
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-7f36be7b.mjs";
2
+ import "./DefaultThreeDsProvider-e98c909f.mjs";
3
+ import "./main-eb4bb451.mjs";
4
+ class i extends e {
5
+ getType() {
6
+ return "EPNA";
7
+ }
8
+ getDomain() {
9
+ return "epna.transactiongateway.com";
10
+ }
11
+ }
12
+ export {
13
+ i as EpnaThreeDsProvider
14
+ };
@@ -0,0 +1,14 @@
1
+ import { MetricsGlobalThreeDsProvider as r } from "./MetricsGlobalThreeDsProvider-7f36be7b.mjs";
2
+ import "./DefaultThreeDsProvider-e98c909f.mjs";
3
+ import "./main-eb4bb451.mjs";
4
+ class s extends r {
5
+ getType() {
6
+ return "FlashBanc";
7
+ }
8
+ getDomain() {
9
+ return "flashbanc.transactiongateway.com";
10
+ }
11
+ }
12
+ export {
13
+ s as FlashBancThreeDsProvider
14
+ };
@@ -1,9 +1,9 @@
1
1
  var i = Object.defineProperty;
2
2
  var l = (n, r, e) => r in n ? i(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
3
  var o = (n, r, e) => (l(n, typeof r != "symbol" ? r + "" : r, e), e);
4
- import { DefaultThreeDsProvider as c } from "./DefaultThreeDsProvider-701637b0.mjs";
5
- import { d as u, a as d, c as p, b as a, n as h, _, g as m } from "./main-f2996bc2.mjs";
6
- const D = { class: "mask" }, S = { class: "wrapper" }, y = ["src"], g = /* @__PURE__ */ u({
4
+ import { DefaultThreeDsProvider as c } from "./DefaultThreeDsProvider-e98c909f.mjs";
5
+ import { d as u, a as d, c as p, b as a, n as h, _ as g, g as _ } from "./main-eb4bb451.mjs";
6
+ const m = { class: "mask" }, D = { class: "wrapper" }, S = ["src"], y = /* @__PURE__ */ u({
7
7
  __name: "GPayments",
8
8
  props: {
9
9
  url: null,
@@ -18,8 +18,8 @@ const D = { class: "mask" }, S = { class: "wrapper" }, y = ["src"], g = /* @__PU
18
18
  height: `${r.height || 400}px`
19
19
  };
20
20
  }
21
- return (s, t) => (d(), p("div", D, [
22
- a("div", S, [
21
+ return (s, t) => (d(), p("div", m, [
22
+ a("div", D, [
23
23
  a("div", {
24
24
  class: "container",
25
25
  style: h([e(), { padding: "0", margin: "0" }])
@@ -27,20 +27,19 @@ const D = { class: "mask" }, S = { class: "wrapper" }, y = ["src"], g = /* @__PU
27
27
  a("iframe", {
28
28
  src: r.url,
29
29
  style: h(e())
30
- }, null, 12, y)
30
+ }, null, 12, S)
31
31
  ], 4)
32
32
  ])
33
33
  ]));
34
34
  }
35
35
  });
36
- const f = /* @__PURE__ */ _(g, [["__scopeId", "data-v-9b0ef3a8"]]);
37
- class U extends c {
36
+ const f = /* @__PURE__ */ g(y, [["__scopeId", "data-v-9b0ef3a8"]]);
37
+ class A extends c {
38
38
  constructor() {
39
39
  super(...arguments);
40
- o(this, "type", "gpayments");
41
40
  o(this, "onDoAuthSuccess", (e, s) => {
42
41
  const t = JSON.parse(s);
43
- if (this.log(`[${this.type}][onDoAuthSuccess]`, t), !t.transStatus) {
42
+ if (this.log(`[${this.getType()}][onDoAuthSuccess]`, t), !t.transStatus) {
44
43
  this.onError(e, "No transStatus specified");
45
44
  return;
46
45
  }
@@ -53,13 +52,13 @@ class U extends c {
53
52
  this.doChallenge(t.acsURL);
54
53
  break;
55
54
  default:
56
- this.log(`[${this.type}][threeDsAuth], 3DS challenge not required, tranStatus: ${t.transStatus}`), this.onPostAuth();
55
+ this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ${t.transStatus}`), this.onPostAuth();
57
56
  break;
58
57
  }
59
58
  });
60
59
  o(this, "onInitAuthSuccess", (e, s) => {
61
60
  const t = JSON.parse(s);
62
- if (this.log(`[${this.type}][onInitAuthSuccess]`, t), !t.threeDSAuthURL) {
61
+ if (this.log(`[${this.getType()}][onInitAuthSuccess]`, t), !t.threeDSAuthURL) {
63
62
  this.onError(e, "No AuthUrl specified");
64
63
  return;
65
64
  }
@@ -70,9 +69,12 @@ class U extends c {
70
69
  this.onAuth(!1, "");
71
70
  });
72
71
  }
72
+ getType() {
73
+ return "GPayments";
74
+ }
73
75
  doChallenge(e) {
74
- this.log(`[${this.type}][doChallenge]`);
75
- const { destroy: s } = m({
76
+ this.log(`[${this.getType()}][doChallenge]`);
77
+ const { destroy: s } = _({
76
78
  el: document.body,
77
79
  component: f,
78
80
  props: {
@@ -90,14 +92,14 @@ class U extends c {
90
92
  this.threeDSDestroy = s;
91
93
  }
92
94
  challengeComplete(e) {
93
- this.log(`[${this.type}]: 3Ds Challenge complete`, e.data), this.closeChallenge(), this.onPostAuth();
95
+ this.log(`[${this.getType()}]: 3Ds Challenge complete`, e.data), this.closeChallenge(), this.onPostAuth();
94
96
  }
95
97
  initFrame(e) {
96
- this.log(`[${this.type}][init3DSFrame]`, e);
98
+ this.log(`[${this.getType()}][init3DSFrame]`, e);
97
99
  const s = document.createElement("iframe");
98
100
  s.src = e, s.style.width = "1px", s.style.height = "1px", s.style.border = "0", document.body.appendChild(s);
99
101
  }
100
102
  }
101
103
  export {
102
- U as GPaymentsThreeDsProvider
104
+ A as GPaymentsThreeDsProvider
103
105
  };
@@ -0,0 +1,147 @@
1
+ var w = Object.defineProperty;
2
+ var S = (s, o, t) => o in s ? w(s, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[o] = t;
3
+ var c = (s, o, t) => (S(s, typeof o != "symbol" ? o + "" : o, t), t);
4
+ import { DefaultThreeDsProvider as E } from "./DefaultThreeDsProvider-e98c909f.mjs";
5
+ import { d as f, r as v, o as A, h as b, w as P, v as T, a as x, c as G, b as m, e as I, C as L, p as N, f as M, _ as $, i as l, s as C, j as H, g as O } from "./main-eb4bb451.mjs";
6
+ const j = (s) => (N("data-v-8a0b6dcb"), s = s(), M(), s), k = { class: "mask" }, B = { class: "wrapper" }, F = { class: "container" }, W = /* @__PURE__ */ j(() => /* @__PURE__ */ m("div", { id: "ThreeDsChallengeIFrame" }, null, -1)), U = /* @__PURE__ */ f({
7
+ __name: "MetricsGlobalThreeDsChallenge",
8
+ emits: ["close", "submit"],
9
+ setup(s, { emit: o }) {
10
+ const t = v(!1);
11
+ function e(r) {
12
+ var n;
13
+ ["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes((n = r.data) == null ? void 0 : n.message) && (t.value = r.data.message === "3DS_CHALLENGE_SHOW");
14
+ }
15
+ return A(() => {
16
+ window.addEventListener("message", e);
17
+ }), b(() => {
18
+ window.removeEventListener("message", e);
19
+ }), (r, n) => P((x(), G("div", k, [
20
+ m("div", B, [
21
+ m("div", F, [
22
+ I(L, {
23
+ onClick: n[0] || (n[0] = (p) => o("close")),
24
+ id: "3ds-challenge-close"
25
+ }),
26
+ W
27
+ ])
28
+ ])
29
+ ], 512)), [
30
+ [T, t.value]
31
+ ]);
32
+ }
33
+ });
34
+ const V = /* @__PURE__ */ $(U, [["__scopeId", "data-v-8a0b6dcb"]]), g = 5;
35
+ class z extends E {
36
+ constructor(t, e, r) {
37
+ var n;
38
+ super(t, e, r);
39
+ c(this, "gateway");
40
+ c(this, "threeDS");
41
+ c(this, "numAttempts", 0);
42
+ this.initScript(((n = r.clientParameters) == null ? void 0 : n.PublicKey) || "");
43
+ }
44
+ getType() {
45
+ return "MetricsGlobal";
46
+ }
47
+ getDomain() {
48
+ return "secure.metricsglobalgateway.com";
49
+ }
50
+ onPreAuth() {
51
+ if (this.log(`[${this.getType()}]: onPreAuth`), !this.threeDS && this.numAttempts >= g) {
52
+ l(), C(this.container, "Error loading 3D Secure");
53
+ return;
54
+ }
55
+ if (!this.threeDS && this.numAttempts < g) {
56
+ this.numAttempts++, this.log(`[${this.getType()}]: 3DS not ready, retrying in 1s`), setTimeout(() => this.onPreAuth(), 1e3);
57
+ return;
58
+ }
59
+ this.startAuth();
60
+ }
61
+ onAuth(t, e) {
62
+ }
63
+ onPostAuth() {
64
+ }
65
+ startAuth() {
66
+ var u, D, y, _, d;
67
+ this.log(`[${this.getType()}]: startAuth`);
68
+ const t = (u = this.threeDsProcessor) == null ? void 0 : u.getPaymentInfo();
69
+ if (!t) {
70
+ l(), C(this.container, "Payment information is missing");
71
+ return;
72
+ }
73
+ H();
74
+ const e = (D = this.threeDsProcessor) == null ? void 0 : D.getAddressInfo(), r = t.expiryDate.length === 4 ? t.expiryDate[2] + t.expiryDate[3] : "", n = t.expiryDate.length === 4 ? t.expiryDate[0] + t.expiryDate[1] : "", p = {
75
+ cardNumber: t.cardNumber,
76
+ cardExpMonth: r,
77
+ cardExpYear: parseInt(n) + 2e3,
78
+ currency: (y = this.threeDsProcessor) == null ? void 0 : y.getCurrency(),
79
+ amount: (_ = this.threeDsProcessor) == null ? void 0 : _.getAmount(),
80
+ email: (d = this.threeDsProcessor) == null ? void 0 : d.getEmail(),
81
+ phone: e == null ? void 0 : e.phoneNumber,
82
+ city: e == null ? void 0 : e.city,
83
+ state: e == null ? void 0 : e.state,
84
+ address1: e == null ? void 0 : e.streetAddress,
85
+ country: e == null ? void 0 : e.country,
86
+ firstName: e == null ? void 0 : e.firstName,
87
+ lastName: e == null ? void 0 : e.lastName,
88
+ postalCode: e == null ? void 0 : e.postalCode
89
+ }, h = this.threeDS.createUI(p);
90
+ h.start("#ThreeDsChallengeIFrame"), h.on("challenge", (a) => {
91
+ this.log(`[${this.getType()}][onChallenge]`, a), l(), this.showChallenge();
92
+ }), h.on("complete", (a) => {
93
+ var i;
94
+ this.log(`[${this.getType()}][onComplete]`, a), this.removeChallenge(), (i = this.threeDsProcessor) == null || i.onSuccess({
95
+ externalThreeDsData: a
96
+ });
97
+ }), h.on("failure", (a) => {
98
+ var i;
99
+ this.log(`[${this.getType()}][onFailure]`, a), l(), this.closeChallenge(), (i = this.threeDsProcessor) == null || i.onError({ error: a.message });
100
+ }), h.on("error", (a) => {
101
+ var i;
102
+ this.log(`[${this.getType()}][error]`, a), l(), this.closeChallenge(), (i = this.threeDsProcessor) == null || i.onError({ error: a.message });
103
+ });
104
+ }
105
+ initScript(t) {
106
+ const e = document.createElement("script");
107
+ e.type = "text/javascript", e.src = `https://${this.getDomain()}/js/v1/Gateway.js`, e.onload = () => {
108
+ this.initGateway(t), this.initChallenge();
109
+ }, document.head.appendChild(e);
110
+ }
111
+ initGateway(t) {
112
+ this.gateway = window.Gateway.create(t), this.threeDS = this.gateway.get3DSecure(), this.gateway.on("error", (e) => {
113
+ var r;
114
+ this.log(`[${this.getType()}]: gateway error`, e), (r = this.threeDsProcessor) == null || r.onError({ error: e.message }), this.threeDS = null, this.numAttempts = g;
115
+ });
116
+ }
117
+ initChallenge() {
118
+ const { destroy: t } = O({
119
+ el: document.body,
120
+ component: V,
121
+ on: {
122
+ close: () => {
123
+ var e;
124
+ this.closeChallenge(), (e = this.threeDsProcessor) == null || e.onError({ error: "Challenge cancelled" });
125
+ }
126
+ }
127
+ });
128
+ this.threeDSDestroy = t;
129
+ }
130
+ showChallenge() {
131
+ window.postMessage({
132
+ message: "3DS_CHALLENGE_SHOW"
133
+ }, "*");
134
+ }
135
+ closeChallenge() {
136
+ window.postMessage({
137
+ message: "3DS_CHALLENGE_CLOSE"
138
+ }, "*");
139
+ }
140
+ removeChallenge() {
141
+ var t;
142
+ (t = this.threeDSDestroy) == null || t.call(this);
143
+ }
144
+ }
145
+ export {
146
+ z as MetricsGlobalThreeDsProvider
147
+ };
@@ -0,0 +1,14 @@
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-7f36be7b.mjs";
2
+ import "./DefaultThreeDsProvider-e98c909f.mjs";
3
+ import "./main-eb4bb451.mjs";
4
+ class m extends e {
5
+ getType() {
6
+ return "NMI";
7
+ }
8
+ getDomain() {
9
+ return "secure.nmi.com";
10
+ }
11
+ }
12
+ export {
13
+ m as NmiThreeDsProvider
14
+ };
@@ -0,0 +1,14 @@
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-7f36be7b.mjs";
2
+ import "./DefaultThreeDsProvider-e98c909f.mjs";
3
+ import "./main-eb4bb451.mjs";
4
+ class i extends e {
5
+ getType() {
6
+ return "Payabli";
7
+ }
8
+ getDomain() {
9
+ return "centavo.transactiongateway.com";
10
+ }
11
+ }
12
+ export {
13
+ i as PayabliThreeDsProvider
14
+ };
@@ -0,0 +1,14 @@
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-7f36be7b.mjs";
2
+ import "./DefaultThreeDsProvider-e98c909f.mjs";
3
+ import "./main-eb4bb451.mjs";
4
+ class s extends e {
5
+ getType() {
6
+ return "SkyBank";
7
+ }
8
+ getDomain() {
9
+ return "secure.skybankgateway.com";
10
+ }
11
+ }
12
+ export {
13
+ s as SkyBankThreeDsProvider
14
+ };
@@ -0,0 +1,10 @@
1
+ import { CxPayThreeDsProvider as e } from "./CxPayThreeDsProvider-068b25ce.mjs";
2
+ import "./MetricsGlobalThreeDsProvider-7f36be7b.mjs";
3
+ import "./DefaultThreeDsProvider-e98c909f.mjs";
4
+ import "./main-eb4bb451.mjs";
5
+ function n(r, o, t) {
6
+ return new e(r, o, t);
7
+ }
8
+ export {
9
+ n as default
10
+ };
@@ -1,5 +1,5 @@
1
- import { DefaultThreeDsProvider as o } from "./DefaultThreeDsProvider-701637b0.mjs";
2
- import "./main-f2996bc2.mjs";
1
+ import { DefaultThreeDsProvider as o } from "./DefaultThreeDsProvider-e98c909f.mjs";
2
+ import "./main-eb4bb451.mjs";
3
3
  function a(e, r, t) {
4
4
  return new o(e, r, t);
5
5
  }
@@ -1,4 +1,4 @@
1
- import { d as T, r as A, o as v, a as R, c as C, b as c, e as y, C as U, u as b, p as k, f as E, _ as V, F as w, T as L, g as N } from "./main-f2996bc2.mjs";
1
+ import { d as T, r as A, o as v, a as R, c as C, b as c, e as y, C as U, u as b, p as k, f as E, _ as V, F as w, T as L, g as N } from "./main-eb4bb451.mjs";
2
2
  const M = (t) => (k("data-v-82a75009"), t = t(), E(), t), F = { class: "mask" }, x = { class: "wrapper" }, O = { class: "container" }, q = /* @__PURE__ */ M(() => /* @__PURE__ */ c("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)), J = ["action"], B = ["value"], j = /* @__PURE__ */ T({
3
3
  __name: "ecentric",
4
4
  props: {
@@ -0,0 +1,10 @@
1
+ import { EpnaThreeDsProvider as t } from "./EpnaThreeDsProvider-189e652c.mjs";
2
+ import "./MetricsGlobalThreeDsProvider-7f36be7b.mjs";
3
+ import "./DefaultThreeDsProvider-e98c909f.mjs";
4
+ import "./main-eb4bb451.mjs";
5
+ function a(r, e, o) {
6
+ return new t(r, e, o);
7
+ }
8
+ export {
9
+ a as default
10
+ };
@@ -0,0 +1,10 @@
1
+ import { FlashBancThreeDsProvider as e } from "./FlashBancThreeDsProvider-36e453b8.mjs";
2
+ import "./MetricsGlobalThreeDsProvider-7f36be7b.mjs";
3
+ import "./DefaultThreeDsProvider-e98c909f.mjs";
4
+ import "./main-eb4bb451.mjs";
5
+ function p(r, o, t) {
6
+ return new e(r, o, t);
7
+ }
8
+ export {
9
+ p as default
10
+ };
@@ -1,6 +1,6 @@
1
- import { GPaymentsThreeDsProvider as o } from "./GPaymentsThreeDsProvider-740b4c21.mjs";
2
- import "./DefaultThreeDsProvider-701637b0.mjs";
3
- import "./main-f2996bc2.mjs";
1
+ import { GPaymentsThreeDsProvider as o } from "./GPaymentsThreeDsProvider-fe5a9704.mjs";
2
+ import "./DefaultThreeDsProvider-e98c909f.mjs";
3
+ import "./main-eb4bb451.mjs";
4
4
  function p(r, e, t) {
5
5
  return new o(r, e, t);
6
6
  }