@payfurl/react-plugin 1.5.0 → 1.6.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 (27) hide show
  1. package/README.md +11 -0
  2. package/dist/DefaultThreeDsProvider-BS9pznAi-fDl8jKzq.js +248 -0
  3. package/dist/{MetricsGlobalThreeDsProvider-C93ttqbB-SRsVMed4.js → MetricsGlobalThreeDsProvider-C2mH6Z-m-BTiFsRgv.js} +27 -27
  4. package/dist/PayWayAppleButton-BcXMphiU-BwJKfUAJ.js +184 -0
  5. package/dist/{cxpay-DblHb5vN-C-l0lncv.js → cxpay-Bdz9DX5E-9-_yu7t4.js} +1 -1
  6. package/dist/{default-C7f86Fx--2njdEIN4.js → default-CmqRUII8-B6Im_IPh.js} +1 -1
  7. package/dist/{ecentric-B3UohyO_-XSxfe46h.js → ecentric-CZzDL4aQ-BRg09Y8f.js} +26 -23
  8. package/dist/{epna-DwUg2IlB-60mxqUE4.js → epna-A5WIS8Rv-DhjWr-Wx.js} +1 -1
  9. package/dist/{flashbanc-LXs8bahL-z2X9avF_.js → flashbanc-BnKR75SO-BStfAWAb.js} +1 -1
  10. package/dist/{forter-CLFaJUYa-0_gstIhb.js → forter-DtCvNxaz-D5SEPByD.js} +7 -7
  11. package/dist/{gpayments-DoZug3PV-r91JBiIn.js → gpayments-C98_oxi_-D02_MfHY.js} +20 -20
  12. package/dist/index-CqIxTjar.js +12169 -0
  13. package/dist/metrics_global-c4lRSySk-WxebdZ3j.js +7 -0
  14. package/dist/{nmi-BA3ZTdQa-DHWaU-52.js → nmi-CrPg94-y-Bco-VeX9.js} +1 -1
  15. package/dist/{nuvei-DIWsLlLz-Dnx1Hmez.js → nuvei-8V5Z1Bqi-7VHagYOe.js} +31 -32
  16. package/dist/{payabli-DgrTI1Et-aNWdpC9M.js → payabli-CAvI6xn--Nz5dJc0q.js} +1 -1
  17. package/dist/payfurl-react.es.js +1 -1
  18. package/dist/payfurl-react.umd.js +24 -22
  19. package/dist/payglocal-BcbX7wj--Dd68qYZO.js +114 -0
  20. package/dist/{payway_rest-D8-T-ULx-Dt-XGc-v.js → payway_rest-Det6oVYM-BzfFo5sS.js} +1 -1
  21. package/dist/{skybank-BgDLlFXX-BnauHbzw.js → skybank-CldRW65N-BFprFe0k.js} +1 -1
  22. package/package.json +2 -2
  23. package/dist/DefaultThreeDsProvider-bLoDSnkd-CuWxvLku.js +0 -220
  24. package/dist/PayWayAppleButton-BzAwlGS--DB5BVl1o.js +0 -163
  25. package/dist/index-DxOlzt-Z.js +0 -11576
  26. package/dist/metrics_global-BM-ooge--CapUrY7a.js +0 -7
  27. package/dist/payglocal-ezp0MsaZ-CA7TeuKm.js +0 -109
@@ -1,7 +0,0 @@
1
- import { w as n } from "./MetricsGlobalThreeDsProvider-C93ttqbB-SRsVMed4.js";
2
- function f(t, r, e) {
3
- return new n(t, r, e);
4
- }
5
- export {
6
- f as default
7
- };
@@ -1,109 +0,0 @@
1
- import { O as f } from "./DefaultThreeDsProvider-bLoDSnkd-CuWxvLku.js";
2
- import { j as g, W as P, i as E, s as I, Z as S, c as p, B as k, a as D, k as v, Q as L, X as d, I as R, n as u, q as b, o as A } from "./index-DxOlzt-Z.js";
3
- var l = p(!1);
4
- function U(e, ...t) {
5
- l.value && console.log(u(e), u(t));
6
- }
7
- function m(e) {
8
- var t, s;
9
- (t = e == null ? void 0 : e.data) != null && t.status && e.data.status === "init-card-form" && (l.value = !!((s = e == null ? void 0 : e.data) != null && s.debug));
10
- }
11
- function _() {
12
- return D(() => {
13
- window.addEventListener("message", m);
14
- }), v(() => {
15
- window.removeEventListener("message", m);
16
- }), {
17
- debug: l,
18
- logMessage: U
19
- };
20
- }
21
- var x = { class: "modal-mask" }, M = { class: "modal-wrapper" }, G = ["src"], O = /* @__PURE__ */ I(/* @__PURE__ */ S({
22
- __name: "PayGLocalThreeDsChallenge",
23
- props: { url: {} },
24
- emits: ["close"],
25
- setup(e, { emit: t }) {
26
- let { logMessage: s } = _(), a = e, n = t, o = p(a.url), y = R(() => A(o.value) ? o.value : "");
27
- k(() => a.url, (r) => {
28
- o.value = r;
29
- }), D(() => {
30
- window.addEventListener("message", h);
31
- }), v(() => {
32
- window.removeEventListener("message", h);
33
- });
34
- function h(r) {
35
- var c;
36
- if (s("PayGLocalThreeDsChallenge: Message received", r.data), !((c = r == null ? void 0 : r.data) != null && c["payglocal-token"])) return;
37
- let i = r.data["payglocal-token"];
38
- s("Token received", i);
39
- let T = i.split(".")[1], w = window.atob(T), C = JSON.parse(w);
40
- n("close", C);
41
- }
42
- return (r, i) => (b(), L("div", x, [d("div", M, [d("iframe", {
43
- src: y.value,
44
- sandbox: "allow-same-origin allow-scripts allow-popups allow-forms"
45
- }, null, 8, G)])]));
46
- }
47
- }), [["__scopeId", "data-v-9fa1282d"]]), Z = class extends f {
48
- getType() {
49
- return "PayGLocal";
50
- }
51
- onPreAuth() {
52
- var e, t;
53
- this.log(`[${this.getType()}]: onPreAuth`), (e = this.threeDsProcessor) != null && e.getTokenId() ? this.threeDsProcessor.getGatewayData(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (s) => {
54
- var a;
55
- return this.initChallenge(((a = s.gatewayMetadata) == null ? void 0 : a.RedirectUrl) || "");
56
- }, () => {
57
- var s;
58
- return (s = this.threeDsProcessor) == null ? void 0 : s.onError({ error: "Unable to get card information" });
59
- }) : (t = this.threeDsProcessor) == null || t.tokeniseCard(this.threeDsProcessor.getProviderId(), (s) => {
60
- this.log(`[${this.getType()}]: tokeniseCard`, s), this.initChallenge(s.gatewayTokenData.RedirectUrl);
61
- }, (s) => {
62
- g(this.container, s);
63
- });
64
- }
65
- onAuth(e, t) {
66
- }
67
- onPostAuth() {
68
- }
69
- initChallenge(e) {
70
- if (this.log(`[${this.getType()}]: initChallenge`, e), !e) {
71
- g(this.container, "3D Secure URL is missing");
72
- return;
73
- }
74
- this.setChallengeFrameVisible(!0);
75
- let { destroy: t } = P({
76
- el: document.body,
77
- component: O,
78
- props: { url: e },
79
- on: { close: (s) => {
80
- var a, n, o;
81
- this.closeChallenge(), this.log(`[${this.getType()}]: Challenge Results`, s), s.status === "AUTHORIZED" ? (a = this.threeDsProcessor) == null || a.onSuccess({
82
- acsRenderingType: {},
83
- acsTransID: "",
84
- authenticationType: "",
85
- authenticationValue: "",
86
- challengeCancel: "",
87
- dsTransID: "",
88
- eci: "",
89
- interactionCounter: "",
90
- messageCategory: "",
91
- messageExtension: [],
92
- messageType: "",
93
- messageVersion: "",
94
- threeDSRequestorTransID: "",
95
- threeDSServerTransID: "",
96
- transStatusReason: "",
97
- transStatus: "Y"
98
- }) : s.status === "CUSTOMER_CANCELLED" ? (n = this.threeDsProcessor) == null || n.onError({ error: "Challenge cancelled" }) : (o = this.threeDsProcessor) == null || o.onError({ error: E });
99
- } }
100
- });
101
- this.threeDSDestroy = t;
102
- }
103
- };
104
- function V(e, t, s) {
105
- return new Z(e, t, s);
106
- }
107
- export {
108
- V as default
109
- };