@payfurl/react-plugin 1.0.10 → 1.0.11

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 (32) hide show
  1. package/dist/{CxPayThreeDsProvider-DfJyYDV8-BtwTH6Vv.js → CxPayThreeDsProvider-DHyY0SJN-mkHWDkHg.js} +1 -1
  2. package/dist/{DefaultThreeDsProvider-DvV6zVzO-DDYac6nh.js → DefaultThreeDsProvider-BbyoW5gI-Bm2Tl1xC.js} +5 -5
  3. package/dist/{EcentricThreeDsProvider-DC4tQCJ4-43cDaJIh.js → EcentricThreeDsProvider-CJkAKhCm-4a0z3e8l.js} +13 -13
  4. package/dist/{EpnaThreeDsProvider-D9tTUWnr-EX6HQmg0.js → EpnaThreeDsProvider-CbuCAz8E-8AT3NiUZ.js} +1 -1
  5. package/dist/{FlashBancThreeDsProvider-Dc_WgWyQ-D2rZd6ti.js → FlashBancThreeDsProvider-yEpICp2s-B-fAmFIe.js} +1 -1
  6. package/dist/{GPaymentsThreeDsProvider-BAJmTSdj-BmLQFvQr.js → GPaymentsThreeDsProvider-ZzFlXQYx-DxEfT4MU.js} +4 -4
  7. package/dist/MetricsGlobalThreeDsProvider-COVvDD_A-BpwZGUJd.js +146 -0
  8. package/dist/{NmiThreeDsProvider-X5Wb78Qq-D6zRtIK-.js → NmiThreeDsProvider-CyQ9ToCv-C5qjGxEE.js} +1 -1
  9. package/dist/{NuveiThreeDsProvider-C7kP4S9V-CKRUbO6O.js → NuveiThreeDsProvider-wpWbdDVQ-Df-izyuz.js} +42 -42
  10. package/dist/{PayGLocalThreeDsProvider-pa38V_3c-BYX0XJ0I.js → PayGLocalThreeDsProvider-piT2VTln-BSZsat2V.js} +9 -9
  11. package/dist/{PayWayAppleButton-DGBgHxM1--mVa2z-I.js → PayWayAppleButton-lOpUyVhK-C3sG34i0.js} +1 -1
  12. package/dist/{PayabliThreeDsProvider-CMCehiRL-Dsv7XOl0.js → PayabliThreeDsProvider-chEmLOO6-DsAXAJs1.js} +1 -1
  13. package/dist/{SkyBankThreeDsProvider-BJXZbNSS-DjLydBX-.js → SkyBankThreeDsProvider-B1KB-MBu-BvB-_qyj.js} +1 -1
  14. package/dist/{cxpay-CmCXB_3H-CFTLoWfG.js → cxpay-CkpinAwr-ChgTpH3-.js} +1 -1
  15. package/dist/{default-DwmL369u-CFn9gU9h.js → default-CCjRF2gJ-CD4CwffS.js} +1 -1
  16. package/dist/{ecentric-CkX8jlMS-CIF3TL3n.js → ecentric-C7aOx_5y-CEzn5wge.js} +1 -1
  17. package/dist/{epna-CQuWi-kj-Bp3oLoVZ.js → epna-C3FB2xZQ-DH6OQlXc.js} +1 -1
  18. package/dist/{flashbanc-ROJhNrEr-CkfPZX3E.js → flashbanc-tBq9tJrU-YpLBHiBR.js} +1 -1
  19. package/dist/{gpayments-CMf-VGx8-woOHZ2Uf.js → gpayments-utHsl2Sf-CVGRwoei.js} +1 -1
  20. package/dist/{index-DjmLClKy.js → index-BK7gCCkz.js} +4914 -4852
  21. package/dist/{metrics_global-DCnzJ8W3-owheVXbs.js → metrics_global-CP2_hsNY-PAbKkq2a.js} +1 -1
  22. package/dist/nmi-Crex5ZZF-Cq6YYDcI.js +7 -0
  23. package/dist/{nuvei-DY1eIaaI-CH37Pkov.js → nuvei-DFcv1FC6-Do0hVbvU.js} +1 -1
  24. package/dist/{payabli-DD1ZuFv1-GPn71phq.js → payabli-C_GFUDE_-B3AKtHbR.js} +1 -1
  25. package/dist/payfurl-react.es.js +1 -1
  26. package/dist/payfurl-react.umd.js +25 -25
  27. package/dist/{payglocal-CC7Mmvkg-B93wBeJX.js → payglocal-CfnXIS4O-DFlDGlnE.js} +1 -1
  28. package/dist/{payway_rest-C2bgT2mt-DZYerbzI.js → payway_rest-Bl-RqdsM-DtXvxCWL.js} +1 -1
  29. package/dist/{skybank-DLUEQlDI-CALhFzpW.js → skybank-ChiLuKWf-CtXaMyvJ.js} +1 -1
  30. package/package.json +1 -1
  31. package/dist/MetricsGlobalThreeDsProvider-DiPpCK4e-CRZ470ug.js +0 -146
  32. package/dist/nmi-BAQHxhKe-DtWC05bC.js +0 -7
@@ -1,4 +1,4 @@
1
- import { PayGLocalThreeDsProvider as a } from "./PayGLocalThreeDsProvider-pa38V_3c-BYX0XJ0I.js";
1
+ import { PayGLocalThreeDsProvider as a } from "./PayGLocalThreeDsProvider-piT2VTln-BSZsat2V.js";
2
2
  function n(r, e, o) {
3
3
  return new a(r, e, o);
4
4
  }
@@ -1,4 +1,4 @@
1
- import { PayWayAppleButton as f } from "./PayWayAppleButton-DGBgHxM1--mVa2z-I.js";
1
+ import { PayWayAppleButton as f } from "./PayWayAppleButton-lOpUyVhK-C3sG34i0.js";
2
2
  function u(t, a, e, n, o, r) {
3
3
  return new f(t, a, e, n, o, r);
4
4
  }
@@ -1,4 +1,4 @@
1
- import { SkyBankThreeDsProvider as n } from "./SkyBankThreeDsProvider-BJXZbNSS-DjLydBX-.js";
1
+ import { SkyBankThreeDsProvider as n } from "./SkyBankThreeDsProvider-B1KB-MBu-BvB-_qyj.js";
2
2
  function t(r, e, a) {
3
3
  return new n(r, e, a);
4
4
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@payfurl/react-plugin",
3
3
  "private": false,
4
- "version": "1.0.10",
4
+ "version": "1.0.11",
5
5
  "description": "PayFURL React Plugin",
6
6
  "type": "module",
7
7
  "files": [
@@ -1,146 +0,0 @@
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
- __name: "MetricsGlobalThreeDsChallenge",
6
- emits: ["close", "submit"],
7
- setup(l, { emit: e }) {
8
- const t = e, a = A(!1);
9
- function o(h) {
10
- var r;
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
- }
13
- return f(() => {
14
- window.addEventListener("message", o);
15
- }), T(() => {
16
- window.removeEventListener("message", o);
17
- }), (h, r) => b((_(), x("div", M, [
18
- g("div", H, [
19
- g("div", O, [
20
- G(N, {
21
- onClick: r[0] || (r[0] = (s) => t("close")),
22
- id: "3ds-challenge-close"
23
- }),
24
- r[1] || (r[1] = g("div", { id: "ThreeDsChallengeIFrame" }, null, -1))
25
- ])
26
- ])
27
- ], 512)), [
28
- [L, a.value]
29
- ]);
30
- }
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
- }
37
- getType() {
38
- return "MetricsGlobal";
39
- }
40
- getDomain() {
41
- return "secure.metricsglobalgateway.com";
42
- }
43
- onPreAuth() {
44
- var e, t;
45
- if (this.log(`[${this.getType()}]: onPreAuth`), !this.threeDS && this.numAttempts >= p) {
46
- u(), d(this.container, "Error loading 3D Secure");
47
- return;
48
- }
49
- if (!this.threeDS && this.numAttempts < p) {
50
- this.numAttempts++, this.log(`[${this.getType()}]: 3DS not ready, retrying in 1s`), setTimeout(() => this.onPreAuth(), 1e3);
51
- return;
52
- }
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
- }, () => {
57
- d(this.container, "Unable to get card information");
58
- }) : this.startAuth();
59
- }
60
- onAuth(e, t) {
61
- }
62
- onPostAuth() {
63
- }
64
- startAuth() {
65
- var e, t, a, o, h;
66
- this.log(`[${this.getType()}]: startAuth`);
67
- const r = (e = this.threeDsProcessor) == null ? void 0 : e.getPaymentInfo();
68
- if (!r) {
69
- u(), d(this.container, "Payment information is missing");
70
- return;
71
- }
72
- F();
73
- const s = (t = this.threeDsProcessor) == null ? void 0 : t.getAddressInfo(), D = r.expiryDate.length === 4 ? r.expiryDate[2] + r.expiryDate[3] : "", v = r.expiryDate.length === 4 ? r.expiryDate[0] + r.expiryDate[1] : "", y = {
74
- cardNumber: r.cardNumber,
75
- cardExpMonth: D,
76
- cardExpYear: parseInt(v) + 2e3,
77
- currency: (a = this.threeDsProcessor) == null ? void 0 : a.getCurrency(),
78
- amount: (o = this.threeDsProcessor) == null ? void 0 : o.getAmount(),
79
- email: (h = this.threeDsProcessor) == null ? void 0 : h.getEmail(),
80
- phone: s == null ? void 0 : s.phoneNumber,
81
- city: s == null ? void 0 : s.city,
82
- state: s == null ? void 0 : s.state,
83
- address1: s == null ? void 0 : s.streetAddress,
84
- country: s == null ? void 0 : s.country,
85
- firstName: s == null ? void 0 : s.firstName,
86
- lastName: s == null ? void 0 : s.lastName,
87
- postalCode: s == null ? void 0 : s.postalCode
88
- }, c = this.threeDS.createUI(y);
89
- c.start("#ThreeDsChallengeIFrame"), c.on("challenge", (i) => {
90
- this.log(`[${this.getType()}][onChallenge]`, i), u(), this.showChallenge();
91
- }), c.on("complete", (i) => {
92
- var n;
93
- this.log(`[${this.getType()}][onComplete]`, i), this.removeChallenge(), (n = this.threeDsProcessor) == null || n.onSuccess({
94
- externalThreeDsData: i
95
- });
96
- }), c.on("failure", (i) => {
97
- var n;
98
- this.log(`[${this.getType()}][onFailure]`, i), u(), this.closeChallenge(), (n = this.threeDsProcessor) == null || n.onError({ error: i.message });
99
- }), c.on("error", (i) => {
100
- var n;
101
- this.log(`[${this.getType()}][error]`, i), u(), this.closeChallenge(), (n = this.threeDsProcessor) == null || n.onError({ error: i.message });
102
- });
103
- }
104
- initScript(e) {
105
- const t = document.createElement("script");
106
- t.type = "text/javascript", t.src = `https://${this.getDomain()}/js/v1/Gateway.js`, t.onload = () => {
107
- this.initGateway(e), this.initChallenge();
108
- }, document.head.appendChild(t);
109
- }
110
- initGateway(e) {
111
- this.gateway = window.Gateway.create(e), this.threeDS = this.gateway.get3DSecure(), this.gateway.on("error", (t) => {
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
- });
115
- }
116
- initChallenge() {
117
- const { destroy: e } = S({
118
- el: document.body,
119
- component: k,
120
- on: {
121
- close: () => {
122
- var t;
123
- this.closeChallenge(), (t = this.threeDsProcessor) == null || t.onError({ error: "Challenge cancelled" });
124
- }
125
- }
126
- });
127
- this.threeDSDestroy = e;
128
- }
129
- showChallenge() {
130
- window.postMessage({
131
- message: "3DS_CHALLENGE_SHOW"
132
- }, "*");
133
- }
134
- closeChallenge() {
135
- window.postMessage({
136
- message: "3DS_CHALLENGE_CLOSE"
137
- }, "*");
138
- }
139
- removeChallenge() {
140
- var e;
141
- (e = this.threeDSDestroy) == null || e.call(this);
142
- }
143
- }
144
- export {
145
- W as MetricsGlobalThreeDsProvider
146
- };
@@ -1,7 +0,0 @@
1
- import { NmiThreeDsProvider as o } from "./NmiThreeDsProvider-X5Wb78Qq-D6zRtIK-.js";
2
- function n(r, e, t) {
3
- return new o(r, e, t);
4
- }
5
- export {
6
- n as default
7
- };