@payfurl/client 4.6.2 → 4.6.3

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 (37) hide show
  1. package/dist/sdk/{CxPayThreeDsProvider-634589d1.mjs → CxPayThreeDsProvider-40d2c5fb.mjs} +3 -3
  2. package/dist/sdk/{DefaultThreeDsProvider-e92310c2.mjs → DefaultThreeDsProvider-5cb383f3.mjs} +4 -4
  3. package/dist/sdk/{EcentricThreeDsProvider-9bf4643c.mjs → EcentricThreeDsProvider-3dcd4237.mjs} +2 -2
  4. package/dist/sdk/{EpnaThreeDsProvider-f4ab5593.mjs → EpnaThreeDsProvider-a660b17d.mjs} +3 -3
  5. package/dist/sdk/{FlashBancThreeDsProvider-9a6d418c.mjs → FlashBancThreeDsProvider-b99fd0a8.mjs} +3 -3
  6. package/dist/sdk/{GPaymentsThreeDsProvider-992c1825.mjs → GPaymentsThreeDsProvider-5cf80737.mjs} +4 -4
  7. package/dist/sdk/{MetricsGlobalThreeDsProvider-fdada4dd.mjs → MetricsGlobalThreeDsProvider-d1b2c081.mjs} +2 -2
  8. package/dist/sdk/{NmiThreeDsProvider-8c8ab0f0.mjs → NmiThreeDsProvider-396a0ddd.mjs} +3 -3
  9. package/dist/sdk/{NuveiThreeDsProvider-cc515d25.mjs → NuveiThreeDsProvider-26959462.mjs} +53 -44
  10. package/dist/sdk/PayWayAppleButton-c8432bce.mjs +115 -0
  11. package/dist/sdk/{PayabliThreeDsProvider-19d2e62a.mjs → PayabliThreeDsProvider-a7d94b89.mjs} +3 -3
  12. package/dist/sdk/{SkyBankThreeDsProvider-44644ee8.mjs → SkyBankThreeDsProvider-20cd542d.mjs} +3 -3
  13. package/dist/sdk/{ThreeDsProvider.interface-da0ab2aa.mjs → ThreeDsProvider.interface-370c3a6b.mjs} +9 -3
  14. package/dist/sdk/cxpay-6d57641b.mjs +10 -0
  15. package/dist/sdk/{default-9ec42bc0.mjs → default-76303d08.mjs} +2 -2
  16. package/dist/sdk/{ecentric-fc332878.mjs → ecentric-81f3631c.mjs} +3 -3
  17. package/dist/sdk/epna-b6806a36.mjs +10 -0
  18. package/dist/sdk/flashbanc-a06cb783.mjs +10 -0
  19. package/dist/sdk/{gpayments-c0450b55.mjs → gpayments-49110aa8.mjs} +3 -3
  20. package/dist/sdk/main-55a85033.mjs +9835 -0
  21. package/dist/sdk/{metrics_global-3c9bd0de.mjs → metrics_global-ba0fb545.mjs} +3 -3
  22. package/dist/sdk/nmi-8ce29228.mjs +10 -0
  23. package/dist/sdk/{nuvei-3774bd45.mjs → nuvei-f2384e2a.mjs} +3 -3
  24. package/dist/sdk/payabli-1a296ee4.mjs +10 -0
  25. package/dist/sdk/payfurl.es.js +1 -1
  26. package/dist/sdk/payfurl.umd.js +12 -32
  27. package/dist/sdk/payway_rest-e2ce2046.mjs +8 -0
  28. package/dist/sdk/skybank-bc06021d.mjs +10 -0
  29. package/dist/sdk/style.css +1 -1
  30. package/package.json +2 -3
  31. package/dist/sdk/cxpay-a965ca2f.mjs +0 -10
  32. package/dist/sdk/epna-24e6dd6c.mjs +0 -10
  33. package/dist/sdk/flashbanc-49c4deb2.mjs +0 -10
  34. package/dist/sdk/main-6d84dc12.mjs +0 -14068
  35. package/dist/sdk/nmi-8aabbfd1.mjs +0 -10
  36. package/dist/sdk/payabli-d52e0c78.mjs +0 -10
  37. package/dist/sdk/skybank-f7d58ed5.mjs +0 -10
@@ -1,6 +1,6 @@
1
- import { MetricsGlobalThreeDsProvider as r } from "./MetricsGlobalThreeDsProvider-fdada4dd.mjs";
2
- import "./DefaultThreeDsProvider-e92310c2.mjs";
3
- import "./main-6d84dc12.mjs";
1
+ import { MetricsGlobalThreeDsProvider as r } from "./MetricsGlobalThreeDsProvider-d1b2c081.mjs";
2
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
3
+ import "./main-55a85033.mjs";
4
4
  class i extends r {
5
5
  getType() {
6
6
  return "CxPay";
@@ -1,8 +1,8 @@
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
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 i, e as _, C as m, u as I, p as f, f as y, _ as A, s as v, T as C, h as c, g as E, F as R } from "./main-6d84dc12.mjs";
5
- const P = (a) => (f("data-v-c82daa22"), a = a(), y(), a), U = { class: "mask" }, $ = { class: "wrapper" }, L = { class: "container" }, b = /* @__PURE__ */ P(() => /* @__PURE__ */ i("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)), M = ["action"], w = ["value"], N = /* @__PURE__ */ S({
4
+ import { d as S, r as d, o as g, a as p, c as T, b as i, e as _, C as m, u as I, p as f, f as y, _ as A, k as v, T as C, j as c, h as E, F as R } from "./main-55a85033.mjs";
5
+ const P = (a) => (f("data-v-c82daa22"), a = a(), y(), a), U = { class: "mask" }, $ = { class: "wrapper" }, L = { class: "container" }, b = /* @__PURE__ */ P(() => /* @__PURE__ */ i("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)), M = ["action"], w = ["value"], k = /* @__PURE__ */ S({
6
6
  __name: "ThreeDsChallenge",
7
7
  props: {
8
8
  threeDSServerTransID: null,
@@ -47,7 +47,7 @@ const P = (a) => (f("data-v-c82daa22"), a = a(), y(), a), U = { class: "mask" },
47
47
  ]));
48
48
  }
49
49
  });
50
- const k = /* @__PURE__ */ A(N, [["__scopeId", "data-v-c82daa22"]]), O = "3ds_method_invocation_complete", q = "3ds_challenge_complete";
50
+ const N = /* @__PURE__ */ A(k, [["__scopeId", "data-v-c82daa22"]]), O = "3ds_method_invocation_complete", q = "3ds_challenge_complete";
51
51
  class F {
52
52
  constructor(e, s, t) {
53
53
  o(this, "log");
@@ -182,7 +182,7 @@ class F {
182
182
  this.log(`[${this.getType()}][doChallenge]`), c();
183
183
  const { destroy: r } = E({
184
184
  el: document.body,
185
- component: k,
185
+ component: N,
186
186
  props: {
187
187
  threeDSServerTransID: this.threeDSServerTransID,
188
188
  acsTransID: s,
@@ -1,8 +1,8 @@
1
1
  var c = Object.defineProperty;
2
2
  var h = (t, s, e) => s in t ? c(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
3
3
  var i = (t, s, e) => (h(t, typeof s != "symbol" ? s + "" : s, e), e);
4
- import { DefaultThreeDsProvider as d } from "./DefaultThreeDsProvider-e92310c2.mjs";
5
- import { d as p, r as u, o as _, a as D, c as m, b as r, e as g, C as S, u as y, p as f, f as T, _ as v, g as C } from "./main-6d84dc12.mjs";
4
+ import { DefaultThreeDsProvider as d } from "./DefaultThreeDsProvider-5cb383f3.mjs";
5
+ import { d as p, r as u, o as _, a as D, c as m, b as r, e as g, C as S, u as y, p as f, f as T, _ as v, h as C } from "./main-55a85033.mjs";
6
6
  const I = (t) => (f("data-v-82a75009"), t = t(), T(), t), P = { class: "mask" }, A = { class: "wrapper" }, V = { class: "container" }, E = /* @__PURE__ */ I(() => /* @__PURE__ */ r("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)), $ = ["action"], k = ["value"], x = /* @__PURE__ */ p({
7
7
  __name: "ecentric",
8
8
  props: {
@@ -1,6 +1,6 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-fdada4dd.mjs";
2
- import "./DefaultThreeDsProvider-e92310c2.mjs";
3
- import "./main-6d84dc12.mjs";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-d1b2c081.mjs";
2
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
3
+ import "./main-55a85033.mjs";
4
4
  class i extends e {
5
5
  getType() {
6
6
  return "EPNA";
@@ -1,6 +1,6 @@
1
- import { MetricsGlobalThreeDsProvider as r } from "./MetricsGlobalThreeDsProvider-fdada4dd.mjs";
2
- import "./DefaultThreeDsProvider-e92310c2.mjs";
3
- import "./main-6d84dc12.mjs";
1
+ import { MetricsGlobalThreeDsProvider as r } from "./MetricsGlobalThreeDsProvider-d1b2c081.mjs";
2
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
3
+ import "./main-55a85033.mjs";
4
4
  class s extends r {
5
5
  getType() {
6
6
  return "FlashBanc";
@@ -1,8 +1,8 @@
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-e92310c2.mjs";
5
- import { d as u, a as d, c as p, b as a, n as h, _ as g, g as _ } from "./main-6d84dc12.mjs";
4
+ import { DefaultThreeDsProvider as c } from "./DefaultThreeDsProvider-5cb383f3.mjs";
5
+ import { d as u, a as d, c as p, b as a, n as h, _, h as g } from "./main-55a85033.mjs";
6
6
  const m = { class: "mask" }, D = { class: "wrapper" }, S = ["src"], y = /* @__PURE__ */ u({
7
7
  __name: "GPayments",
8
8
  props: {
@@ -33,7 +33,7 @@ const m = { class: "mask" }, D = { class: "wrapper" }, S = ["src"], y = /* @__PU
33
33
  ]));
34
34
  }
35
35
  });
36
- const f = /* @__PURE__ */ g(y, [["__scopeId", "data-v-9b0ef3a8"]]);
36
+ const f = /* @__PURE__ */ _(y, [["__scopeId", "data-v-9b0ef3a8"]]);
37
37
  class A extends c {
38
38
  constructor() {
39
39
  super(...arguments);
@@ -74,7 +74,7 @@ class A extends c {
74
74
  }
75
75
  doChallenge(e) {
76
76
  this.log(`[${this.getType()}][doChallenge]`);
77
- const { destroy: s } = _({
77
+ const { destroy: s } = g({
78
78
  el: document.body,
79
79
  component: f,
80
80
  props: {
@@ -1,8 +1,8 @@
1
1
  var w = Object.defineProperty;
2
2
  var S = (o, n, t) => n in o ? w(o, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[n] = t;
3
3
  var l = (o, n, t) => (S(o, typeof n != "symbol" ? n + "" : n, t), t);
4
- import { DefaultThreeDsProvider as P } from "./DefaultThreeDsProvider-e92310c2.mjs";
5
- import { d as f, r as v, o as E, i as A, w as b, v as T, a as I, c as x, b as p, e as G, C as L, p as N, f as M, _ as $, h as c, j as g, s as H, g as k } from "./main-6d84dc12.mjs";
4
+ import { DefaultThreeDsProvider as P } from "./DefaultThreeDsProvider-5cb383f3.mjs";
5
+ import { d as f, r as v, o as E, i as A, w as b, v as T, a as I, c as x, b as p, e as G, C as L, p as N, f as M, _ as $, j as c, s as g, k as H, h as k } from "./main-55a85033.mjs";
6
6
  const O = (o) => (N("data-v-8a0b6dcb"), o = o(), M(), o), j = { class: "mask" }, B = { class: "wrapper" }, F = { class: "container" }, U = /* @__PURE__ */ O(() => /* @__PURE__ */ p("div", { id: "ThreeDsChallengeIFrame" }, null, -1)), W = /* @__PURE__ */ f({
7
7
  __name: "MetricsGlobalThreeDsChallenge",
8
8
  emits: ["close", "submit"],
@@ -1,6 +1,6 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-fdada4dd.mjs";
2
- import "./DefaultThreeDsProvider-e92310c2.mjs";
3
- import "./main-6d84dc12.mjs";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-d1b2c081.mjs";
2
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
3
+ import "./main-55a85033.mjs";
4
4
  class m extends e {
5
5
  getType() {
6
6
  return "NMI";
@@ -1,13 +1,13 @@
1
1
  var d = Object.defineProperty;
2
- var p = (n, a, s) => a in n ? d(n, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[a] = s;
3
- var c = (n, a, s) => (p(n, typeof a != "symbol" ? a + "" : a, s), s);
4
- import { d as m, o as g, s as S, h as u, a as D, c as _, p as f, f as y, b as h, _ as T, g as N, T as I } from "./main-6d84dc12.mjs";
5
- import { DefaultThreeDsProvider as P, THREE_DS_METHOD_INVOCATION_COMPLETE as C, THREE_DS_CHALLENGE_COMPLETE as E } from "./DefaultThreeDsProvider-e92310c2.mjs";
6
- const x = (n) => (f("data-v-e3afa988"), n = n(), y(), n), V = { class: "mask" }, v = /* @__PURE__ */ x(() => /* @__PURE__ */ h("div", { class: "wrapper" }, [
2
+ var p = (n, r, s) => r in n ? d(n, r, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[r] = s;
3
+ var c = (n, r, s) => (p(n, typeof r != "symbol" ? r + "" : r, s), s);
4
+ import { d as m, o as g, k as D, j as u, a as S, c as _, p as f, f as y, b as h, _ as T, s as P, h as I, T as N } from "./main-55a85033.mjs";
5
+ import { DefaultThreeDsProvider as C, THREE_DS_METHOD_INVOCATION_COMPLETE as E, THREE_DS_CHALLENGE_COMPLETE as x } from "./DefaultThreeDsProvider-5cb383f3.mjs";
6
+ const A = (n) => (f("data-v-e3afa988"), n = n(), y(), n), V = { class: "mask" }, v = /* @__PURE__ */ A(() => /* @__PURE__ */ h("div", { class: "wrapper" }, [
7
7
  /* @__PURE__ */ h("div", { class: "container" })
8
- ], -1)), R = [
8
+ ], -1)), b = [
9
9
  v
10
- ], b = /* @__PURE__ */ m({
10
+ ], R = /* @__PURE__ */ m({
11
11
  __name: "nuvei",
12
12
  props: {
13
13
  threeDSServerTransID: null,
@@ -26,27 +26,27 @@ const x = (n) => (f("data-v-e3afa988"), n = n(), y(), n), V = { class: "mask" },
26
26
  country: null
27
27
  },
28
28
  setup(n) {
29
- const a = n;
29
+ const r = n;
30
30
  g(() => {
31
- S();
32
- const r = document.createElement("script");
33
- r.type = "text/javascript", r.src = "https://cdn.safecharge.com/safecharge_resources/v1/websdk/safecharge.js", r.onload = () => {
31
+ D();
32
+ const a = document.createElement("script");
33
+ a.type = "text/javascript", a.src = "https://cdn.safecharge.com/safecharge_resources/v1/websdk/safecharge.js", a.onload = () => {
34
34
  const e = new MutationObserver(function() {
35
35
  document.getElementsByClassName("sfcModal-dialog")[0] && (u(), e.disconnect());
36
36
  }), t = { childList: !0 }, o = document.querySelector("body");
37
37
  e.observe(o, t), s();
38
- }, document.head.appendChild(r);
38
+ }, document.head.appendChild(a);
39
39
  });
40
40
  function s() {
41
- var r = SafeCharge({
42
- env: a.env,
41
+ var a = SafeCharge({
42
+ env: r.env,
43
43
  // Nuvei API environment - 'int' (integration) or 'prod' (production - default if omitted)
44
- merchantId: a.merchantId,
44
+ merchantId: r.merchantId,
45
45
  //as assigned by Nuvei
46
- merchantSiteId: a.merchantSiteId
46
+ merchantSiteId: r.merchantSiteId
47
47
  // your Merchant Site ID provided by Nuvei
48
48
  });
49
- r.fields({
49
+ a.fields({
50
50
  fonts: [
51
51
  {
52
52
  cssUrl: "https://fonts.googleapis.com/css?family=Source+Code+Pro"
@@ -55,45 +55,45 @@ const x = (n) => (f("data-v-e3afa988"), n = n(), y(), n), V = { class: "mask" },
55
55
  ],
56
56
  locale: "en"
57
57
  // You can set your users preferred locale. If not provided, we try to auto-detect.
58
- }), r.authenticate3d({
59
- sessionToken: a.sessionToken,
58
+ }), a.authenticate3d({
59
+ sessionToken: r.sessionToken,
60
60
  // received from openOrder API
61
61
  paymentOption: {
62
62
  card: {
63
- cardNumber: a.cardNumber,
64
- cardHolderName: a.cardHolderName,
65
- expirationMonth: a.expirationMonth,
66
- expirationYear: a.expirationYear,
67
- CVV: a.CVV
63
+ cardNumber: r.cardNumber,
64
+ cardHolderName: r.cardHolderName,
65
+ expirationMonth: r.expirationMonth,
66
+ expirationYear: r.expirationYear,
67
+ CVV: r.CVV
68
68
  }
69
69
  },
70
70
  billingAddress: {
71
- firstName: a.firstName,
72
- lastName: a.lastName,
73
- email: a.email,
74
- country: a.country
71
+ firstName: r.firstName,
72
+ lastName: r.lastName,
73
+ email: r.email,
74
+ country: r.country
75
75
  }
76
76
  }, function(e) {
77
77
  window.postMessage({ status: "3ds_challenge_complete", cres: e }, "*");
78
78
  });
79
79
  }
80
- return (r, e) => (D(), _("div", V, R));
80
+ return (a, e) => (S(), _("div", V, b));
81
81
  }
82
82
  });
83
- const A = /* @__PURE__ */ T(b, [["__scopeId", "data-v-e3afa988"]]);
84
- class k extends P {
83
+ const M = /* @__PURE__ */ T(R, [["__scopeId", "data-v-e3afa988"]]);
84
+ class w extends C {
85
85
  constructor() {
86
86
  super(...arguments);
87
87
  c(this, "_paResPayload", null);
88
- c(this, "onSuccess", (s, r) => {
88
+ c(this, "onSuccess", (s, a) => {
89
89
  var t, o;
90
90
  this.closeChallenge(), u();
91
- const e = JSON.parse(r);
91
+ const e = JSON.parse(a);
92
92
  e.authenticationValue ? (t = this.threeDsProcessor) == null || t.onSuccess(e) : (this.log(`[${this.getType()}][_onSuccess] 3D Secure failed`, e), (o = this.threeDsProcessor) == null || o.onError({ error: "3D Secure failed" }));
93
93
  });
94
- c(this, "onDoAuthSuccess", (s, r) => {
94
+ c(this, "onDoAuthSuccess", (s, a) => {
95
95
  var t, o, i;
96
- const e = JSON.parse(r);
96
+ const e = JSON.parse(a);
97
97
  if (this.log(`[${this.getType()}][onDoAuthSuccess]`, e), !e.transStatus || !e.authenticationValue) {
98
98
  this.onError(s, "No transStatus specified");
99
99
  return;
@@ -128,6 +128,15 @@ class k extends P {
128
128
  getType() {
129
129
  return "Nuvei";
130
130
  }
131
+ onPreAuth() {
132
+ var s, a;
133
+ this.log(`[${this.getType()}]: onPreAuth`), (s = this.threeDsProcessor) != null && s.getTokenId() ? (a = this.threeDsProcessor) == null || a.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (e) => {
134
+ var t;
135
+ (t = this.threeDsProcessor) == null || t.setPaymentInfo(e), super.onPreAuth();
136
+ }, () => {
137
+ P(this.container, "Unable to get card information");
138
+ }) : super.onPreAuth();
139
+ }
131
140
  onPostAuth() {
132
141
  var s;
133
142
  this.log(`[${this.getType()}][onAuth] Do Post Authentication for transId`, this.threeDSServerTransID, this._paResPayload), (s = this.threeDsProcessor) == null || s.onPostAuth({
@@ -139,13 +148,13 @@ class k extends P {
139
148
  xid: this._paResPayload.xid
140
149
  }, this.onSuccess, this.onError);
141
150
  }
142
- doNuveiChallenge(s, r, e) {
151
+ doNuveiChallenge(s, a, e) {
143
152
  var i;
144
153
  const t = JSON.parse(s);
145
- (t === null || !t.merchantId || !t.merchantSiteId) && ((i = this.threeDsProcessor) == null || i.onError({ error: "3D Secure failed" })), r && (t.firstName = r.firstName, t.lastName = r.lastName, t.email = r.email, t.country = r.country), e && (t.cardNumber = e.cardNumber, t.cardHolderName = e.cardholder, t.expirationMonth = e.expiryDate.substring(2, 4), t.expirationYear = e.expiryDate.substring(0, 2), t.CVV = e.ccv);
146
- const { destroy: o } = N({
154
+ (t === null || !t.merchantId || !t.merchantSiteId) && ((i = this.threeDsProcessor) == null || i.onError({ error: "3D Secure failed" })), a && (t.firstName = a.firstName, t.lastName = a.lastName, t.email = a.email, t.country = a.country), e && (t.cardNumber = e.cardNumber, t.cardHolderName = e.cardholder, t.expirationMonth = e.expiryDate.substring(2, 4), t.expirationYear = e.expiryDate.substring(0, 2), t.CVV = e.ccv);
155
+ const { destroy: o } = I({
147
156
  el: document.body,
148
- component: A,
157
+ component: M,
149
158
  props: t,
150
159
  on: {
151
160
  close: () => {
@@ -158,16 +167,16 @@ class k extends P {
158
167
  this.threeDSDestroy = o;
159
168
  }
160
169
  messageHandler(s) {
161
- var r, e, t, o;
162
- if (!(!((r = s == null ? void 0 : s.data) != null && r.status) || ((e = s == null ? void 0 : s.data) == null ? void 0 : e.status) === I)) {
163
- if (s.data.status === C) {
170
+ var a, e, t, o;
171
+ if (!(!((a = s == null ? void 0 : s.data) != null && a.status) || ((e = s == null ? void 0 : s.data) == null ? void 0 : e.status) === N)) {
172
+ if (s.data.status === E) {
164
173
  this.log(`[${this.getType()}][messageHandler] 3Ds Method invocation complete`), s.stopPropagation(), this.onAuth(!0, "");
165
174
  return;
166
175
  }
167
- s.data.status === E && (this.log(`[${this.getType()}][messageHandler] 3Ds Challenge complete`, s.data), s.stopPropagation(), this.closeChallenge(), s.data.cres && ((t = s.data.cres) == null ? void 0 : t.result) === "APPROVED" && ((o = s.data.cres) == null ? void 0 : o.errCode) === "0" ? (this._paResPayload = s.data.cres, this.onPostAuth()) : (this.log(`[${this.getType()}][messageHandler] Failed 3DS Challenge`, s.data), this.onError(400, "Failed 3DS Challenge")));
176
+ s.data.status === x && (this.log(`[${this.getType()}][messageHandler] 3Ds Challenge complete`, s.data), s.stopPropagation(), this.closeChallenge(), s.data.cres && ((t = s.data.cres) == null ? void 0 : t.result) === "APPROVED" && ((o = s.data.cres) == null ? void 0 : o.errCode) === "0" ? (this._paResPayload = s.data.cres, this.onPostAuth()) : (this.log(`[${this.getType()}][messageHandler] Failed 3DS Challenge`, s.data), this.onError(400, "Failed 3DS Challenge")));
168
177
  }
169
178
  }
170
179
  }
171
180
  export {
172
- k as NuveiThreeDsProvider
181
+ w as NuveiThreeDsProvider
173
182
  };
@@ -0,0 +1,115 @@
1
+ var l = Object.defineProperty;
2
+ var p = (r, t, o) => t in r ? l(r, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[t] = o;
3
+ var n = (r, t, o) => (p(r, typeof t != "symbol" ? t + "" : t, o), o);
4
+ import { R as d, g as y, H as m } from "./main-55a85033.mjs";
5
+ const h = {
6
+ CHECKOUT: "CHECKOUT",
7
+ CHARGE: "CHARGE"
8
+ }, u = (r) => ({
9
+ [h.CHECKOUT]: {
10
+ url: r + "/payment_method/checkout",
11
+ method: "POST"
12
+ },
13
+ [h.CHARGE]: {
14
+ url: r + "/charge/checkout",
15
+ method: "POST"
16
+ }
17
+ });
18
+ class C {
19
+ constructor(t, o, s, i, a, e) {
20
+ n(this, "log");
21
+ n(this, "container");
22
+ n(this, "button", null);
23
+ n(this, "providerId");
24
+ n(this, "apiUrl");
25
+ n(this, "amount");
26
+ n(this, "currency");
27
+ n(this, "options");
28
+ n(this, "clientParameters");
29
+ n(this, "buttonId", "apple-pay-payway-button");
30
+ n(this, "onLoad", () => {
31
+ });
32
+ n(this, "onSuccess");
33
+ n(this, "onFailure");
34
+ n(this, "httpInvoker", null);
35
+ this.log = t, this.apiUrl = e.apiUrl, this.container = o || document.body, this.options = e.options, this.clientParameters = e.clientParameters, this.providerId = e.providerId, this.amount = Number(i), this.currency = a, this.providerId = s, this.onSuccess = e.onSuccess || null, this.onFailure = e.onFailure || null;
36
+ const c = new d(e.environment, y(e.publicKey));
37
+ this.httpInvoker = new m(e.publicKey, e.version, c), this.init();
38
+ }
39
+ draw() {
40
+ const t = () => {
41
+ this.onLoad = () => {
42
+ };
43
+ const o = {
44
+ container: this.buttonId,
45
+ publishableApiKey: this.clientParameters.PublishableApiKey,
46
+ principalAmount: this.amount,
47
+ currency: String(this.currency).toLowerCase(),
48
+ buttonMode: "callback"
49
+ };
50
+ this.log("[createPaymentRequestButton]", o), window.payway.createPaymentRequestButton(o, (s, i) => {
51
+ var a;
52
+ if (this.log("[createPaymentRequestButton]", s, i), s) {
53
+ (a = this.onFailure) == null || a.call(this, s);
54
+ return;
55
+ }
56
+ this.checkout(i.singleUseTokenId);
57
+ });
58
+ };
59
+ window.payway ? t() : this.onLoad = t;
60
+ }
61
+ show() {
62
+ this.button && (this.button.style.display = "block");
63
+ }
64
+ hide() {
65
+ this.button && (this.button.style.display = "none");
66
+ }
67
+ init() {
68
+ const t = document.createElement("div");
69
+ t.id = this.buttonId, this.container.appendChild(t), this.button = t, this.initScript();
70
+ }
71
+ initScript() {
72
+ const t = document.createElement("script");
73
+ t.src = "https://api.payway.com.au/rest/v1/payway.js", t.onload = () => {
74
+ this.onLoad && this.onLoad();
75
+ }, document.head.appendChild(t);
76
+ }
77
+ checkout(t) {
78
+ var s;
79
+ const o = {
80
+ providerId: this.providerId,
81
+ amount: this.amount,
82
+ currency: this.currency,
83
+ options: {
84
+ ProviderToken: t
85
+ }
86
+ };
87
+ this.log("[PayWayAppleButton][checkout]", o), (s = this.httpInvoker) == null || s.invoke(u(this.apiUrl)[h.CHECKOUT].url, u(this.apiUrl)[h.CHECKOUT].method, JSON.stringify(o), (i, a) => {
88
+ this.log("[PayWayAppleButton][checkout]: successCheckoutHandler", i, a);
89
+ const e = JSON.parse(a), c = JSON.parse(window.atob(e.checkoutData));
90
+ this.log("[PayWayAppleButton][checkout]: decodedData", c), this.charge(c.checkoutId);
91
+ }, (i, a) => {
92
+ var c;
93
+ this.log("[PayWayAppleButton][checkout]: failureCheckoutHandler", i, a);
94
+ const e = JSON.parse(a);
95
+ (c = this.onFailure) == null || c.call(this, { error: e.message });
96
+ });
97
+ }
98
+ charge(t) {
99
+ var o;
100
+ this.log("[PayWayAppleButton][charge]", { checkoutId: t }), (o = this.httpInvoker) == null || o.invoke(u(this.apiUrl)[h.CHARGE].url, u(this.apiUrl)[h.CHARGE].method, JSON.stringify({ checkoutId: t }), (s, i) => {
101
+ var e;
102
+ this.log("[PayWayAppleButton][charge]: successChargeHandler", s, i);
103
+ const a = JSON.parse(i);
104
+ (e = this.onSuccess) == null || e.call(this, a || i);
105
+ }, (s, i) => {
106
+ var e;
107
+ this.log("[PayWayAppleButton][charge]: failureChargeHandler", s, i);
108
+ const a = JSON.parse(i);
109
+ (e = this.onFailure) == null || e.call(this, { error: a.message });
110
+ });
111
+ }
112
+ }
113
+ export {
114
+ C as PayWayAppleButton
115
+ };
@@ -1,6 +1,6 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-fdada4dd.mjs";
2
- import "./DefaultThreeDsProvider-e92310c2.mjs";
3
- import "./main-6d84dc12.mjs";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-d1b2c081.mjs";
2
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
3
+ import "./main-55a85033.mjs";
4
4
  class i extends e {
5
5
  getType() {
6
6
  return "Payabli";
@@ -1,6 +1,6 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-fdada4dd.mjs";
2
- import "./DefaultThreeDsProvider-e92310c2.mjs";
3
- import "./main-6d84dc12.mjs";
1
+ import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-d1b2c081.mjs";
2
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
3
+ import "./main-55a85033.mjs";
4
4
  class s extends e {
5
5
  getType() {
6
6
  return "SkyBank";
@@ -8,11 +8,17 @@ const e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8
8
  __proto__: null
9
9
  }, Symbol.toStringTag, { value: "Module" })), l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10
10
  __proto__: null
11
+ }, Symbol.toStringTag, { value: "Module" })), n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12
+ __proto__: null
13
+ }, Symbol.toStringTag, { value: "Module" })), _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14
+ __proto__: null
11
15
  }, Symbol.toStringTag, { value: "Module" }));
12
16
  export {
13
- o as T,
17
+ e as A,
18
+ l as T,
14
19
  t as a,
15
20
  r as b,
16
- l as c,
17
- e as f
21
+ n as c,
22
+ _ as d,
23
+ o as f
18
24
  };
@@ -0,0 +1,10 @@
1
+ import { CxPayThreeDsProvider as e } from "./CxPayThreeDsProvider-40d2c5fb.mjs";
2
+ import "./MetricsGlobalThreeDsProvider-d1b2c081.mjs";
3
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
4
+ import "./main-55a85033.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-e92310c2.mjs";
2
- import "./main-6d84dc12.mjs";
1
+ import { DefaultThreeDsProvider as o } from "./DefaultThreeDsProvider-5cb383f3.mjs";
2
+ import "./main-55a85033.mjs";
3
3
  function a(e, r, t) {
4
4
  return new o(e, r, t);
5
5
  }
@@ -1,6 +1,6 @@
1
- import { EcentricThreeDsProvider as i } from "./EcentricThreeDsProvider-9bf4643c.mjs";
2
- import "./DefaultThreeDsProvider-e92310c2.mjs";
3
- import "./main-6d84dc12.mjs";
1
+ import { EcentricThreeDsProvider as i } from "./EcentricThreeDsProvider-3dcd4237.mjs";
2
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
3
+ import "./main-55a85033.mjs";
4
4
  function m(r, e, t) {
5
5
  return new i(r, e, t);
6
6
  }
@@ -0,0 +1,10 @@
1
+ import { EpnaThreeDsProvider as t } from "./EpnaThreeDsProvider-a660b17d.mjs";
2
+ import "./MetricsGlobalThreeDsProvider-d1b2c081.mjs";
3
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
4
+ import "./main-55a85033.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-b99fd0a8.mjs";
2
+ import "./MetricsGlobalThreeDsProvider-d1b2c081.mjs";
3
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
4
+ import "./main-55a85033.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-992c1825.mjs";
2
- import "./DefaultThreeDsProvider-e92310c2.mjs";
3
- import "./main-6d84dc12.mjs";
1
+ import { GPaymentsThreeDsProvider as o } from "./GPaymentsThreeDsProvider-5cf80737.mjs";
2
+ import "./DefaultThreeDsProvider-5cb383f3.mjs";
3
+ import "./main-55a85033.mjs";
4
4
  function p(r, e, t) {
5
5
  return new o(r, e, t);
6
6
  }