@payfurl/client 4.8.7 → 4.9.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 (38) hide show
  1. package/dist/sdk/{CloseIcon-_3X2kvPG.js → CloseIcon-BJgZxU_4.js} +41 -38
  2. package/dist/sdk/{CxPayThreeDsProvider-DAAmw4ya.js → CxPayThreeDsProvider-lD7RyyaH.js} +1 -1
  3. package/dist/sdk/{DefaultThreeDsProvider-JPe2W_JG.js → DefaultThreeDsProvider-aIZr-d29.js} +56 -55
  4. package/dist/sdk/{EcentricThreeDsProvider-Ddy0Fn5h.js → EcentricThreeDsProvider-B7Hq90Yp.js} +17 -17
  5. package/dist/sdk/{EpnaThreeDsProvider-Ng4Pmq0D.js → EpnaThreeDsProvider-BAO2GROY.js} +1 -1
  6. package/dist/sdk/{FlashBancThreeDsProvider-DFZG4u44.js → FlashBancThreeDsProvider-CIZpoTAj.js} +1 -1
  7. package/dist/sdk/{GPaymentsThreeDsProvider-BIku3bZP.js → GPaymentsThreeDsProvider-COuZ_3w6.js} +21 -23
  8. package/dist/sdk/MetricsGlobalThreeDsProvider-D3x5hiTk.js +133 -0
  9. package/dist/sdk/{NmiThreeDsProvider-CzRH7vrp.js → NmiThreeDsProvider-fLTB46dM.js} +1 -1
  10. package/dist/sdk/{NuveiThreeDsProvider-DMO_bgOI.js → NuveiThreeDsProvider-BpWi_OJA.js} +50 -52
  11. package/dist/sdk/{PayGLocalThreeDsProvider-DDqJz4iC.js → PayGLocalThreeDsProvider-DvA8Ng4u.js} +31 -30
  12. package/dist/sdk/{PayWayAppleButton-DVoTz5Nn.js → PayWayAppleButton-DESHrVB-.js} +1 -1
  13. package/dist/sdk/{PayabliThreeDsProvider-BWStZH6E.js → PayabliThreeDsProvider-B34Ah8DW.js} +1 -1
  14. package/dist/sdk/{SkyBankThreeDsProvider-U6pzbMJY.js → SkyBankThreeDsProvider-0S5UKz-C.js} +1 -1
  15. package/dist/sdk/{alerts-D474JL4D.js → alerts-Bad_5Z62.js} +9 -9
  16. package/dist/sdk/{cxpay-BnpH4Q1F.js → cxpay-2tlxyzUF.js} +1 -1
  17. package/dist/sdk/{default-B8ZcE4ja.js → default-Sih0fC9J.js} +1 -1
  18. package/dist/sdk/{ecentric-DwR-gEaW.js → ecentric-CN_DxZw6.js} +1 -1
  19. package/dist/sdk/{epna-BtQr8Mlq.js → epna-CuWMBne4.js} +1 -1
  20. package/dist/sdk/favicon.ico +0 -0
  21. package/dist/sdk/{flashbanc-BNEJGUff.js → flashbanc-YdmE24o7.js} +1 -1
  22. package/dist/sdk/forter-CcQiwntl.js +60 -0
  23. package/dist/sdk/forterDeviceIntelScript-DdHZ7KLR.js +4 -0
  24. package/dist/sdk/{gpayments-QZCq0_0y.js → gpayments-DVhgcMCp.js} +1 -1
  25. package/dist/sdk/{metrics_global--mOHedmQ.js → metrics_global-DshQOuaW.js} +1 -1
  26. package/dist/sdk/{nmi-BtKpUtad.js → nmi-Qo4scfgJ.js} +1 -1
  27. package/dist/sdk/{nuvei-BOfZN_Em.js → nuvei-BFllJ45f.js} +1 -1
  28. package/dist/sdk/{payabli-BfZ7IhDq.js → payabli-eGPashQz.js} +1 -1
  29. package/dist/sdk/payfurl.es.js +1441 -1371
  30. package/dist/sdk/payfurl.umd.js +7 -7
  31. package/dist/sdk/{payglocal-CpEbJSpn.js → payglocal-WvM5v5cn.js} +1 -1
  32. package/dist/sdk/{payway_rest-CIjvQwcK.js → payway_rest-m9k6k7M0.js} +1 -1
  33. package/dist/sdk/screen-D7xBu0cj.js +24 -0
  34. package/dist/sdk/{skybank-DWPrfoAb.js → skybank-174OmYCW.js} +1 -1
  35. package/dist/sdk/{strings-JNmtxeev.js → strings-C1wc79_e.js} +12 -12
  36. package/package.json +1 -1
  37. package/dist/sdk/MetricsGlobalThreeDsProvider-BMeP5IWW.js +0 -118
  38. package/dist/sdk/forter-D0-GGAlC.js +0 -41
@@ -0,0 +1,133 @@
1
+ import { Dt as e, Et as t, Ft as n, Ht as r, It as i, Ot as a, Tt as o, Z as s, dt as c, mt as l, n as u, t as d, vt as f, wt as p, xt as m } from "./CloseIcon-BJgZxU_4.js";
2
+ import { t as h } from "./screen-D7xBu0cj.js";
3
+ import { t as g } from "./alerts-Bad_5Z62.js";
4
+ import { t as _ } from "./DefaultThreeDsProvider-aIZr-d29.js";
5
+ //#region src/sdk/3ds/MetricsGlobalThreeDsChallenge.vue?vue&type=script&setup=true&lang.ts
6
+ var v = { class: "mask" }, y = { class: "wrapper" }, b = { class: "container" }, x = /*#__PURE__*/ s(/* @__PURE__ */ o({
7
+ __name: "MetricsGlobalThreeDsChallenge",
8
+ emits: ["close", "submit"],
9
+ setup(r, { emit: o }) {
10
+ let s = o, c = i(!1);
11
+ function u(e) {
12
+ ["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes(e.data?.message) && (c.value = e.data.message === "3DS_CHALLENGE_SHOW");
13
+ }
14
+ return t(() => {
15
+ window.addEventListener("message", u);
16
+ }), e(() => {
17
+ window.removeEventListener("message", u);
18
+ }), (e, t) => n((a(), m("div", v, [f("div", y, [f("div", b, [p(d, {
19
+ onClick: t[0] ||= (e) => s("close"),
20
+ id: "3ds-challenge-close"
21
+ }), t[1] ||= f("div", { id: "ThreeDsChallengeIFrame" }, null, -1)])])], 512)), [[l, c.value]]);
22
+ }
23
+ }), [["__scopeId", "data-v-8a0b6dcb"]]), S = /* @__PURE__ */ r({ MetricsGlobalThreeDsProvider: () => E }), { hideSpinner: C, showSpinner: w } = u(), T = 5, E = class extends _ {
24
+ gateway;
25
+ threeDS;
26
+ numAttempts = 0;
27
+ constructor(e, t, n) {
28
+ super(e, t, n), this.initScript(n.clientParameters?.PublicKey || "");
29
+ }
30
+ getType() {
31
+ return "MetricsGlobal";
32
+ }
33
+ getDomain() {
34
+ return "secure.metricsglobalgateway.com";
35
+ }
36
+ onPreAuth() {
37
+ if (this.log(`[${this.getType()}]: onPreAuth`), !this.threeDS && this.numAttempts >= T) {
38
+ C(), g(this.container, "Error loading 3D Secure");
39
+ return;
40
+ }
41
+ if (!this.threeDS && this.numAttempts < T) {
42
+ this.numAttempts++, this.log(`[${this.getType()}]: 3DS not ready, retrying in 1s`), setTimeout(() => this.onPreAuth(), 1e3);
43
+ return;
44
+ }
45
+ this.threeDsProcessor?.getTokenId() ? this.threeDsProcessor?.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (e) => {
46
+ this.threeDsProcessor?.setPaymentInfo(e), this.startAuth();
47
+ }, () => {
48
+ g(this.container, "Unable to get card information");
49
+ }) : this.startAuth();
50
+ }
51
+ onAuth(e, t) {}
52
+ onPostAuth() {}
53
+ startAuth() {
54
+ this.log(`[${this.getType()}]: startAuth`);
55
+ let e = this.threeDsProcessor?.getPaymentInfo();
56
+ if (!e) {
57
+ C(), g(this.container, "Payment information is missing");
58
+ return;
59
+ }
60
+ w();
61
+ let t = this.threeDsProcessor?.getAddressInfo(), n = e.expiryDate.length === 4 ? e.expiryDate.slice(2, 4) : "", r = e.expiryDate.length === 4 ? e.expiryDate.slice(0, 2) : "", [i = "", a = ""] = e.cardholder?.split(/\s+/) || [], o = this.threeDsProcessor?.getCurrency() || "", s = this.threeDsProcessor?.getAmount() || 0;
62
+ if (!n || !r) {
63
+ C(), g(this.container, "Card expiry date is invalid"), this.threeDsProcessor?.onError({ error: "Card expiry date is invalid" });
64
+ return;
65
+ }
66
+ let c = {
67
+ cardNumber: e.cardNumber,
68
+ cardExpMonth: n,
69
+ cardExpYear: String(parseInt(r, 10) + 2e3),
70
+ currency: o,
71
+ amount: s.toFixed(2),
72
+ email: this.threeDsProcessor?.getEmail(),
73
+ phone: t?.phoneNumber,
74
+ city: t?.city,
75
+ state: t?.state,
76
+ address1: t?.streetAddress,
77
+ country: t?.country,
78
+ firstName: t?.firstName || i || "payFURL",
79
+ lastName: t?.lastName || a || "payFURL",
80
+ postalCode: t?.postalCode,
81
+ deviceChannel: "02",
82
+ browserJavascriptEnabled: !0,
83
+ browserJavaEnabled: !1,
84
+ browserLanguage: window.navigator.language,
85
+ browserColorDepth: String(h()),
86
+ browserScreenHeight: String(screen.height),
87
+ browserScreenWidth: String(screen.width),
88
+ browserTimeZone: String(Math.round((/* @__PURE__ */ new Date()).getTimezoneOffset() / 60)),
89
+ userAgent: navigator.userAgent
90
+ }, l = this.threeDS.createUI(c);
91
+ l.start("#ThreeDsChallengeIFrame"), l.on("challenge", (e) => {
92
+ this.log(`[${this.getType()}][onChallenge]`, e), C(), this.showChallenge();
93
+ }), l.on("complete", (e) => {
94
+ this.log(`[${this.getType()}][onComplete]`, e), this.removeChallenge(), this.threeDsProcessor?.onSuccess({ externalThreeDsData: e });
95
+ }), l.on("failure", (e) => {
96
+ this.log(`[${this.getType()}][onFailure]`, e), C(), this.closeChallenge(), this.threeDsProcessor?.onError({ error: e.message });
97
+ }), l.on("error", (e) => {
98
+ this.log(`[${this.getType()}][error]`, e), C(), this.closeChallenge(), this.threeDsProcessor?.onError({ error: e.message });
99
+ });
100
+ }
101
+ initScript(e) {
102
+ let t = document.createElement("script");
103
+ t.type = "text/javascript", t.src = `https://${this.getDomain()}/js/v1/Gateway.js`, t.onload = () => {
104
+ this.initGateway(e), this.initChallenge();
105
+ }, document.head.appendChild(t);
106
+ }
107
+ initGateway(e) {
108
+ this.gateway = window.Gateway.create(e), this.threeDS = this.gateway.get3DSecure(), this.gateway.on("error", (e) => {
109
+ this.log(`[${this.getType()}]: gateway error`, e), this.threeDsProcessor?.onError({ error: e.message }), this.threeDS = null, this.numAttempts = T;
110
+ });
111
+ }
112
+ initChallenge() {
113
+ let { destroy: e } = c({
114
+ el: document.body,
115
+ component: x,
116
+ on: { close: () => {
117
+ this.closeChallenge(), this.threeDsProcessor?.onError({ error: "Challenge cancelled" });
118
+ } }
119
+ });
120
+ this.threeDSDestroy = e;
121
+ }
122
+ showChallenge() {
123
+ this.setChallengeFrameVisible(!0), window.postMessage({ message: "3DS_CHALLENGE_SHOW" }, "*");
124
+ }
125
+ closeChallenge() {
126
+ this.setChallengeFrameVisible(!1), window.postMessage({ message: "3DS_CHALLENGE_CLOSE" }, "*");
127
+ }
128
+ removeChallenge() {
129
+ this.threeDSDestroy?.();
130
+ }
131
+ };
132
+ //#endregion
133
+ export { S as n, E as t };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./MetricsGlobalThreeDsProvider-BMeP5IWW.js";
1
+ import { t as e } from "./MetricsGlobalThreeDsProvider-D3x5hiTk.js";
2
2
  //#region src/sdk/3ds/NmiThreeDsProvider.ts
3
3
  var t = class extends e {
4
4
  getType() {
@@ -1,8 +1,8 @@
1
- import { St as e, _t as t, mt as n, n as r, q as i, st as a, wt as o, xt as s } from "./CloseIcon-_3X2kvPG.js";
2
- import { t as c } from "./alerts-D474JL4D.js";
3
- import { t as l } from "./DefaultThreeDsProvider-JPe2W_JG.js";
1
+ import { Et as e, Ot as t, Tt as n, Z as r, dt as i, h as a, n as o, vt as s, xt as c } from "./CloseIcon-BJgZxU_4.js";
2
+ import { t as l } from "./alerts-Bad_5Z62.js";
3
+ import { t as u } from "./DefaultThreeDsProvider-aIZr-d29.js";
4
4
  //#region src/sdk/3ds/nuvei.vue?vue&type=script&setup=true&lang.ts
5
- var u = { class: "mask" }, d = /*#__PURE__*/ i(/* @__PURE__ */ s({
5
+ var d = { class: "mask" }, f = /*#__PURE__*/ r(/* @__PURE__ */ n({
6
6
  __name: "nuvei",
7
7
  props: {
8
8
  threeDSServerTransID: {},
@@ -20,41 +20,41 @@ var u = { class: "mask" }, d = /*#__PURE__*/ i(/* @__PURE__ */ s({
20
20
  email: {},
21
21
  country: {}
22
22
  },
23
- setup(i) {
24
- let { hideSpinner: a, showSpinner: s } = r(), c = i;
23
+ setup(n) {
24
+ let { hideSpinner: r, showSpinner: i } = o(), a = n;
25
25
  e(() => {
26
- s();
26
+ i();
27
27
  let e = document.createElement("script");
28
28
  e.type = "text/javascript", e.src = "https://cdn.safecharge.com/safecharge_resources/v1/websdk/safecharge.js", e.onload = () => {
29
29
  let e = new MutationObserver(function() {
30
- document.getElementsByClassName("sfcModal-dialog")[0] && (a(), e.disconnect());
30
+ document.getElementsByClassName("sfcModal-dialog")[0] && (r(), e.disconnect());
31
31
  }), t = { childList: !0 }, n = document.querySelector("body");
32
32
  e.observe(n, t), l();
33
33
  }, document.head.appendChild(e);
34
34
  });
35
35
  function l() {
36
36
  var e = SafeCharge({
37
- env: c.env,
38
- merchantId: c.merchantId,
39
- merchantSiteId: c.merchantSiteId
37
+ env: a.env,
38
+ merchantId: a.merchantId,
39
+ merchantSiteId: a.merchantSiteId
40
40
  });
41
41
  e.fields({
42
42
  fonts: [{ cssUrl: "https://fonts.googleapis.com/css?family=Source+Code+Pro" }],
43
43
  locale: "en"
44
44
  }), e.authenticate3d({
45
- sessionToken: c.sessionToken,
45
+ sessionToken: a.sessionToken,
46
46
  paymentOption: { card: {
47
- cardNumber: c.cardNumber,
48
- cardHolderName: c.cardHolderName,
49
- expirationMonth: c.expirationMonth,
50
- expirationYear: c.expirationYear,
51
- CVV: c.CVV
47
+ cardNumber: a.cardNumber,
48
+ cardHolderName: a.cardHolderName,
49
+ expirationMonth: a.expirationMonth,
50
+ expirationYear: a.expirationYear,
51
+ CVV: a.CVV
52
52
  } },
53
53
  billingAddress: {
54
- firstName: c.firstName,
55
- lastName: c.lastName,
56
- email: c.email,
57
- country: c.country
54
+ firstName: a.firstName,
55
+ lastName: a.lastName,
56
+ email: a.email,
57
+ country: a.country
58
58
  }
59
59
  }, function(e) {
60
60
  window.postMessage({
@@ -63,9 +63,9 @@ var u = { class: "mask" }, d = /*#__PURE__*/ i(/* @__PURE__ */ s({
63
63
  }, "*");
64
64
  });
65
65
  }
66
- return (e, r) => (o(), t("div", u, [...r[0] ||= [n("div", { class: "wrapper" }, [n("div", { class: "container" })], -1)]]));
66
+ return (e, n) => (t(), c("div", d, [...n[0] ||= [s("div", { class: "wrapper" }, [s("div", { class: "container" })], -1)]]));
67
67
  }
68
- }), [["__scopeId", "data-v-3b52be97"]]), { hideSpinner: f } = r(), p = class extends l {
68
+ }), [["__scopeId", "data-v-3b52be97"]]), { hideSpinner: p } = o(), m = class extends u {
69
69
  _paResPayload = null;
70
70
  getType() {
71
71
  return "Nuvei";
@@ -74,7 +74,7 @@ var u = { class: "mask" }, d = /*#__PURE__*/ i(/* @__PURE__ */ s({
74
74
  this.log(`[${this.getType()}]: onPreAuth`), this.threeDsProcessor?.getTokenId() ? this.threeDsProcessor?.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (e) => {
75
75
  this.threeDsProcessor?.setPaymentInfo(e), super.onPreAuth();
76
76
  }, () => {
77
- c(this.container, "Unable to get card information");
77
+ l(this.container, "Unable to get card information");
78
78
  }) : super.onPreAuth();
79
79
  }
80
80
  onPostAuth() {
@@ -89,21 +89,21 @@ var u = { class: "mask" }, d = /*#__PURE__*/ i(/* @__PURE__ */ s({
89
89
  }
90
90
  doNuveiChallenge(e, t, n) {
91
91
  let r = JSON.parse(e);
92
- (r === null || !r.merchantId || !r.merchantSiteId) && this.threeDsProcessor?.onError({ error: "3D Secure failed" }), t && (r.firstName = t.firstName, r.lastName = t.lastName, r.email = t.email, r.country = t.country), n && (r.cardNumber = n.cardNumber, r.cardHolderName = n.cardholder || "", r.expirationMonth = n.expiryDate.substring(2, 4), r.expirationYear = n.expiryDate.substring(0, 2), r.CVV = n.ccv);
93
- let { destroy: i } = a({
92
+ (r === null || !r.merchantId || !r.merchantSiteId) && this.threeDsProcessor?.onError({ error: a }), t && (r.firstName = t.firstName, r.lastName = t.lastName, r.email = t.email, r.country = t.country), n && (r.cardNumber = n.cardNumber, r.cardHolderName = n.cardholder || "", r.expirationMonth = n.expiryDate.substring(2, 4), r.expirationYear = n.expiryDate.substring(0, 2), r.CVV = n.ccv), this.setChallengeFrameVisible(!0);
93
+ let { destroy: o } = i({
94
94
  el: document.body,
95
- component: d,
95
+ component: f,
96
96
  props: r,
97
97
  on: { close: () => {
98
- i(), this.threeDSDestroy = () => {}, this.threeDsProcessor?.onError({ error: "Challenge cancelled" });
98
+ o(), this.setChallengeFrameVisible(!1), this.threeDSDestroy = () => {}, this.threeDsProcessor?.onError({ error: "Challenge cancelled" });
99
99
  } }
100
100
  });
101
- this.threeDSDestroy = i;
101
+ this.threeDSDestroy = o;
102
102
  }
103
103
  onSuccess = (e, t) => {
104
- this.closeChallenge(), f();
104
+ this.closeChallenge(), p();
105
105
  let n = JSON.parse(t);
106
- n.authenticationValue ? this.threeDsProcessor?.onSuccess(n) : (this.log(`[${this.getType()}][_onSuccess] 3D Secure failed`, n), this.threeDsProcessor?.onError({ error: "3D Secure failed" }));
106
+ n.authenticationValue ? this.threeDsProcessor?.onSuccess(n) : (this.log(`[${this.getType()}][_onSuccess] ${a}`, n), this.threeDsProcessor?.onError({ error: a }));
107
107
  };
108
108
  onDoAuthSuccess = (e, t) => {
109
109
  let n = JSON.parse(t);
@@ -115,26 +115,24 @@ var u = { class: "mask" }, d = /*#__PURE__*/ i(/* @__PURE__ */ s({
115
115
  case "C":
116
116
  this.doNuveiChallenge(n.authenticationValue, this.threeDsProcessor?.getAddressInfo(), this.threeDsProcessor?.getPaymentInfo());
117
117
  break;
118
- default:
119
- this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ` + n.transStatus), this.threeDsProcessor?.onSuccess({
120
- threeDSServerTransID: n.threeDSServerTransID,
121
- threeDSRequestorTransID: "",
122
- acsRenderingType: n.acsRenderingType,
123
- acsTransID: n.acsTransID,
124
- authenticationType: n.authenticationType,
125
- authenticationValue: n.authenticationValue,
126
- challengeCancel: "",
127
- dsTransID: n.dsTransID,
128
- eci: n.eci,
129
- interactionCounter: "",
130
- messageCategory: "",
131
- messageExtension: n.messageExtension,
132
- messageType: n.messageType,
133
- messageVersion: n.messageVersion,
134
- transStatus: n.transStatus,
135
- transStatusReason: n.transStatusReason
136
- });
137
- break;
118
+ default: this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ` + n.transStatus), this.threeDsProcessor?.onSuccess({
119
+ threeDSServerTransID: n.threeDSServerTransID,
120
+ threeDSRequestorTransID: "",
121
+ acsRenderingType: n.acsRenderingType,
122
+ acsTransID: n.acsTransID,
123
+ authenticationType: n.authenticationType,
124
+ authenticationValue: n.authenticationValue,
125
+ challengeCancel: "",
126
+ dsTransID: n.dsTransID,
127
+ eci: n.eci,
128
+ interactionCounter: "",
129
+ messageCategory: "",
130
+ messageExtension: n.messageExtension,
131
+ messageType: n.messageType,
132
+ messageVersion: n.messageVersion,
133
+ transStatus: n.transStatus,
134
+ transStatusReason: n.transStatusReason
135
+ });
138
136
  }
139
137
  };
140
138
  messageHandler(e) {
@@ -148,4 +146,4 @@ var u = { class: "mask" }, d = /*#__PURE__*/ i(/* @__PURE__ */ s({
148
146
  }
149
147
  };
150
148
  //#endregion
151
- export { p as NuveiThreeDsProvider };
149
+ export { m as NuveiThreeDsProvider };
@@ -1,52 +1,52 @@
1
- import { Ct as e, Mt as t, St as n, _t as r, it as i, kt as a, mt as o, pt as s, q as c, st as l, wt as u, xt as d } from "./CloseIcon-_3X2kvPG.js";
2
- import { t as f } from "./alerts-D474JL4D.js";
3
- import { t as p } from "./DefaultThreeDsProvider-JPe2W_JG.js";
1
+ import { Dt as e, Et as t, It as n, Nt as r, Ot as i, Tt as a, Z as o, _t as s, ct as c, dt as l, h as u, vt as d, xt as f } from "./CloseIcon-BJgZxU_4.js";
2
+ import { t as p } from "./alerts-Bad_5Z62.js";
3
+ import { t as m } from "./DefaultThreeDsProvider-aIZr-d29.js";
4
4
  //#region src/iframe/setup/log.ts
5
- var m = t(!1);
6
- function h(e, ...t) {
7
- m.value && console.log(e, t);
5
+ var h = n(!1);
6
+ function g(e, ...t) {
7
+ h.value && console.log(e, t);
8
8
  }
9
- function g(e) {
10
- e?.data?.status && e.data.status === "init-card-form" && (m.value = !!e?.data?.debug);
9
+ function _(e) {
10
+ e?.data?.status && e.data.status === "init-card-form" && (h.value = !!e?.data?.debug);
11
11
  }
12
- function _() {
13
- return n(() => {
14
- window.addEventListener("message", g);
12
+ function v() {
13
+ return t(() => {
14
+ window.addEventListener("message", _);
15
15
  }), e(() => {
16
- window.removeEventListener("message", g);
16
+ window.removeEventListener("message", _);
17
17
  }), {
18
- debug: m,
19
- logMessage: h
18
+ debug: h,
19
+ logMessage: g
20
20
  };
21
21
  }
22
22
  //#endregion
23
23
  //#region src/sdk/3ds/PayGLocalThreeDsChallenge.vue?vue&type=script&setup=true&lang.ts
24
- var v = { class: "modal-mask" }, y = { class: "modal-wrapper" }, b = ["src"], x = /*#__PURE__*/ c(/* @__PURE__ */ d({
24
+ var y = { class: "modal-mask" }, b = { class: "modal-wrapper" }, x = ["src"], S = /*#__PURE__*/ o(/* @__PURE__ */ a({
25
25
  __name: "PayGLocalThreeDsChallenge",
26
26
  props: { url: {} },
27
27
  emits: ["close"],
28
- setup(c, { emit: l }) {
29
- let { logMessage: d } = _(), f = c, p = l, m = t(f.url), h = s(() => i(m.value) ? m.value : "");
30
- t(null), a(() => f.url, (e) => {
28
+ setup(a, { emit: o }) {
29
+ let { logMessage: l } = v(), u = a, p = o, m = n(u.url), h = s(() => c(m.value) ? m.value : "");
30
+ n(null), r(() => u.url, (e) => {
31
31
  m.value = e;
32
- }), n(() => {
32
+ }), t(() => {
33
33
  window.addEventListener("message", g);
34
34
  }), e(() => {
35
35
  window.removeEventListener("message", g);
36
36
  });
37
37
  function g(e) {
38
- if (d("PayGLocalThreeDsChallenge: Message received", e.data), !e?.data?.["payglocal-token"]) return;
38
+ if (l("PayGLocalThreeDsChallenge: Message received", e.data), !e?.data?.["payglocal-token"]) return;
39
39
  let t = e.data["payglocal-token"];
40
- d("Token received", t);
40
+ l("Token received", t);
41
41
  let n = t.split(".")[1], r = window.atob(n), i = JSON.parse(r);
42
42
  p("close", i);
43
43
  }
44
- return (e, t) => (u(), r("div", v, [o("div", y, [o("iframe", {
44
+ return (e, t) => (i(), f("div", y, [d("div", b, [d("iframe", {
45
45
  src: h.value,
46
46
  sandbox: "allow-same-origin allow-scripts allow-popups allow-forms"
47
- }, null, 8, b)])]));
47
+ }, null, 8, x)])]));
48
48
  }
49
- }), [["__scopeId", "data-v-0699f67d"]]), S = class extends p {
49
+ }), [["__scopeId", "data-v-0699f67d"]]), C = class extends m {
50
50
  getType() {
51
51
  return "PayGLocal";
52
52
  }
@@ -55,26 +55,27 @@ var v = { class: "modal-mask" }, y = { class: "modal-wrapper" }, b = ["src"], x
55
55
  this.threeDsProcessor?.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (e, t) => {
56
56
  this.log(`[${this.getType()}]: getCardDetails`, e, t), this.threeDsProcessor?.setPaymentInfo(e), this.initChallenge(t.RedirectUrl);
57
57
  }, () => {
58
- f(this.container, "Unable to get card information");
58
+ p(this.container, "Unable to get card information");
59
59
  });
60
60
  return;
61
61
  }
62
62
  this.threeDsProcessor?.tokeniseCard(this.threeDsProcessor.getProviderId(), (e) => {
63
63
  this.log(`[${this.getType()}]: tokeniseCard`, e), this.initChallenge(e.gatewayTokenData.RedirectUrl);
64
64
  }, (e) => {
65
- f(this.container, e);
65
+ p(this.container, e);
66
66
  });
67
67
  }
68
68
  onAuth(e, t) {}
69
69
  onPostAuth() {}
70
70
  initChallenge(e) {
71
71
  if (this.log(`[${this.getType()}]: initChallenge`, e), !e) {
72
- f(this.container, "3D Secure URL is missing");
72
+ p(this.container, "3D Secure URL is missing");
73
73
  return;
74
74
  }
75
+ this.setChallengeFrameVisible(!0);
75
76
  let { destroy: t } = l({
76
77
  el: document.body,
77
- component: x,
78
+ component: S,
78
79
  props: { url: e },
79
80
  on: { close: (e) => {
80
81
  if (this.closeChallenge(), this.log(`[${this.getType()}]: Challenge Results`, e), e.status === "AUTHORIZED") {
@@ -102,11 +103,11 @@ var v = { class: "modal-mask" }, y = { class: "modal-wrapper" }, b = ["src"], x
102
103
  this.threeDsProcessor?.onError({ error: "Challenge cancelled" });
103
104
  return;
104
105
  }
105
- this.threeDsProcessor?.onError({ error: "3D Secure failed" });
106
+ this.threeDsProcessor?.onError({ error: u });
106
107
  } }
107
108
  });
108
109
  this.threeDSDestroy = t;
109
110
  }
110
111
  };
111
112
  //#endregion
112
- export { S as PayGLocalThreeDsProvider };
113
+ export { C as PayGLocalThreeDsProvider };
@@ -1,4 +1,4 @@
1
- import { o as e, r as t, s as n } from "./strings-JNmtxeev.js";
1
+ import { o as e, r as t, s as n } from "./strings-C1wc79_e.js";
2
2
  //#region src/sdk/processors/applepay/PayWayAppleButton.ts
3
3
  var r = {
4
4
  CHECKOUT: "CHECKOUT",
@@ -1,4 +1,4 @@
1
- import { t as e } from "./MetricsGlobalThreeDsProvider-BMeP5IWW.js";
1
+ import { t as e } from "./MetricsGlobalThreeDsProvider-D3x5hiTk.js";
2
2
  //#region src/sdk/3ds/PayabliThreeDsProvider.ts
3
3
  var t = class extends e {
4
4
  getType() {
@@ -1,4 +1,4 @@
1
- import { t as e } from "./MetricsGlobalThreeDsProvider-BMeP5IWW.js";
1
+ import { t as e } from "./MetricsGlobalThreeDsProvider-D3x5hiTk.js";
2
2
  //#region src/sdk/3ds/SkyBankThreeDsProvider.ts
3
3
  var t = class extends e {
4
4
  getType() {
@@ -1,35 +1,35 @@
1
- import { It as e, Mt as t, _t as n, ft as r, gt as i, mt as a, q as o, st as s, wt as c, xt as l } from "./CloseIcon-_3X2kvPG.js";
1
+ import { Bt as e, It as t, Ot as n, Tt as r, Z as i, bt as a, dt as o, gt as s, vt as c, xt as l } from "./CloseIcon-BJgZxU_4.js";
2
2
  //#region src/sdk/components/Error.vue?vue&type=script&setup=true&lang.ts
3
- var u = { class: "message" }, d = /*#__PURE__*/ o(/* @__PURE__ */ l({
3
+ var u = { class: "message" }, d = /*#__PURE__*/ i(/* @__PURE__ */ r({
4
4
  __name: "Error",
5
5
  props: { error: {} },
6
6
  setup(r) {
7
7
  let i = t(r.error);
8
- return (t, r) => (c(), n("div", u, e(i.value), 1));
8
+ return (t, r) => (n(), l("div", u, e(i.value), 1));
9
9
  }
10
- }), [["__scopeId", "data-v-ae4be0f9"]]), f = { class: "message" }, p = { key: 0 }, m = /*#__PURE__*/ o(/* @__PURE__ */ l({
10
+ }), [["__scopeId", "data-v-ae4be0f9"]]), f = { class: "message" }, p = { key: 0 }, m = /*#__PURE__*/ i(/* @__PURE__ */ r({
11
11
  __name: "Success",
12
12
  props: {
13
13
  message: {},
14
14
  token: {}
15
15
  },
16
16
  emits: ["close"],
17
- setup(t, { emit: o }) {
18
- let s = t;
19
- return (t, o) => (c(), n(r, null, [a("div", f, e(s.message), 1), s.token ? (c(), n("div", p, "TokenId = " + e(s.token), 1)) : i("", !0)], 64));
17
+ setup(t, { emit: r }) {
18
+ let i = t;
19
+ return (t, r) => (n(), l(s, null, [c("div", f, e(i.message), 1), i.token ? (n(), l("div", p, "TokenId = " + e(i.token), 1)) : a("", !0)], 64));
20
20
  }
21
21
  }), [["__scopeId", "data-v-6a4e1608"]]);
22
22
  //#endregion
23
23
  //#region src/sdk/utils/alerts.ts
24
24
  function h(e, t) {
25
- e && s({
25
+ e && o({
26
26
  el: e,
27
27
  component: d,
28
28
  props: { error: t }
29
29
  });
30
30
  }
31
31
  function g(e, t, n) {
32
- e && s({
32
+ e && o({
33
33
  el: e,
34
34
  component: m,
35
35
  props: {
@@ -1,4 +1,4 @@
1
- import { CxPayThreeDsProvider as e } from "./CxPayThreeDsProvider-DAAmw4ya.js";
1
+ import { CxPayThreeDsProvider as e } from "./CxPayThreeDsProvider-lD7RyyaH.js";
2
2
  //#region src/sdk/3ds/cxpay.ts
3
3
  function t(t, n, r) {
4
4
  return new e(t, n, r);
@@ -1,4 +1,4 @@
1
- import { t as e } from "./DefaultThreeDsProvider-JPe2W_JG.js";
1
+ import { t as e } from "./DefaultThreeDsProvider-aIZr-d29.js";
2
2
  //#region src/sdk/3ds/default.ts
3
3
  function t(t, n, r) {
4
4
  return new e(t, n, r);
@@ -1,4 +1,4 @@
1
- import { EcentricThreeDsProvider as e } from "./EcentricThreeDsProvider-Ddy0Fn5h.js";
1
+ import { EcentricThreeDsProvider as e } from "./EcentricThreeDsProvider-B7Hq90Yp.js";
2
2
  //#region src/sdk/3ds/ecentric.ts
3
3
  function t(t, n, r) {
4
4
  return new e(t, n, r);
@@ -1,4 +1,4 @@
1
- import { EpnaThreeDsProvider as e } from "./EpnaThreeDsProvider-Ng4Pmq0D.js";
1
+ import { EpnaThreeDsProvider as e } from "./EpnaThreeDsProvider-BAO2GROY.js";
2
2
  //#region src/sdk/3ds/epna.ts
3
3
  function t(t, n, r) {
4
4
  return new e(t, n, r);
Binary file
@@ -1,4 +1,4 @@
1
- import { FlashBancThreeDsProvider as e } from "./FlashBancThreeDsProvider-DFZG4u44.js";
1
+ import { FlashBancThreeDsProvider as e } from "./FlashBancThreeDsProvider-CIZpoTAj.js";
2
2
  //#region src/sdk/3ds/flashbanc.ts
3
3
  function t(t, n, r) {
4
4
  return new e(t, n, r);
@@ -0,0 +1,60 @@
1
+ import { FORTER_DEVICE_INTEL_SCRIPT_B64 as e } from "./forterDeviceIntelScript-DdHZ7KLR.js";
2
+ //#region src/sdk/fraud/forter.ts
3
+ var t = "", n = "2e6515aa0b8e", r = "v1.2", i = "checkoutTools__script", a = `https://sdk.checkouttools.com/${r}/managedOrders.js`, o = (e, n, r, i, a, o, s, c, l) => JSON.stringify({
4
+ siteId: l.SiteId,
5
+ providerId: e,
6
+ amount: n,
7
+ currency: r,
8
+ paymentInformation: i,
9
+ paypalInformation: a,
10
+ customerInfo: {
11
+ firstName: o.firstName,
12
+ lastName: o.lastName,
13
+ email: o.email,
14
+ phone: o.phoneNumber
15
+ },
16
+ address: {
17
+ line1: s.streetAddress,
18
+ line2: s.streetAddress2,
19
+ city: s.city,
20
+ country: s.country,
21
+ postalCode: s.postalCode,
22
+ state: s.state
23
+ },
24
+ order: { items: c.orderItems.map((e) => ({
25
+ productCode: e.sku,
26
+ quantity: Number(e.quantity),
27
+ amount: Number(e.unitPrice)
28
+ })) },
29
+ connectionInformation: {
30
+ userAgent: navigator.userAgent,
31
+ cookie: t,
32
+ checkoutTime: Date.now()
33
+ }
34
+ });
35
+ function s(e, t, n) {
36
+ let r = window.checkoutTools?.managedOrders;
37
+ if (!r || typeof r.manageOrder != "function") {
38
+ n(/* @__PURE__ */ Error("Forter managedOrders script is not loaded"));
39
+ return;
40
+ }
41
+ r.manageOrder(e, { challengeContainer: t ?? null }, n);
42
+ }
43
+ function c() {
44
+ if (document.addEventListener("ftr:tokenReady", function(e) {
45
+ t = e.detail;
46
+ }), !document.getElementById(n)) {
47
+ let t = document.createElement("script");
48
+ t.type = "text/javascript", t.id = n, t.innerHTML = window.atob(e), document.getElementsByTagName("body")[0].appendChild(t);
49
+ }
50
+ if (!document.getElementById(i)) {
51
+ let e = document.createElement("script");
52
+ e.type = "text/javascript", e.id = i, e.setAttribute("data-site-id", n), e.src = a, document.getElementsByTagName("body")[0].appendChild(e);
53
+ }
54
+ return {
55
+ getFraudCheckData: o,
56
+ manageOrder: s
57
+ };
58
+ }
59
+ //#endregion
60
+ export { c as default };