@payfurl/react-plugin 1.2.5 → 1.2.7

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 (59) hide show
  1. package/dist/CxPayThreeDsProvider-DAAmw4ya-CDOUGiWG.js +12 -0
  2. package/dist/DefaultThreeDsProvider-JPe2W_JG-bH2sJs83.js +241 -0
  3. package/dist/EcentricThreeDsProvider-Ddy0Fn5h-BDuqXhye.js +78 -0
  4. package/dist/{EpnaThreeDsProvider-KyUTPiU6-Dup0wSLA.js → EpnaThreeDsProvider-Ng4Pmq0D-CwV4TNgl.js} +3 -3
  5. package/dist/FlashBancThreeDsProvider-DFZG4u44-6TmQipNC.js +12 -0
  6. package/dist/{GPaymentsThreeDsProvider-Bq63V0gC-JMmzXEZE.js → GPaymentsThreeDsProvider-BIku3bZP-DBcRTyGA.js} +34 -37
  7. package/dist/MetricsGlobalThreeDsProvider-BMeP5IWW-DAZlcVCc.js +135 -0
  8. package/dist/NmiThreeDsProvider-CzRH7vrp-O5u5frkm.js +12 -0
  9. package/dist/NuveiThreeDsProvider-DMO_bgOI-DV1Uqhrk.js +165 -0
  10. package/dist/PayGLocalThreeDsProvider-DDqJz4iC-DBo2F6p3.js +116 -0
  11. package/dist/PayWayAppleButton-DVoTz5Nn-1KU6o3AT.js +173 -0
  12. package/dist/{PayabliThreeDsProvider-DEvztVTU-D0Tu2kWm.js → PayabliThreeDsProvider-BWStZH6E-uKWOTuW-.js} +3 -3
  13. package/dist/SkyBankThreeDsProvider-U6pzbMJY-B9F5E7be.js +12 -0
  14. package/dist/cxpay-BnpH4Q1F-CqZusCD1.js +7 -0
  15. package/dist/default-B8ZcE4ja-Df8foed4.js +7 -0
  16. package/dist/ecentric-DwR-gEaW-D7EJixv8.js +7 -0
  17. package/dist/epna-BtQr8Mlq-CdoA1Foj.js +7 -0
  18. package/dist/{flashbanc-orqI9uWg-CGe2YAfS.js → flashbanc-BNEJGUff-DX-o_bsN.js} +1 -1
  19. package/dist/{forter-CfW26Mkn-CmVDxLR0.js → forter-D0-GGAlC-B2I1zsvz.js} +18 -23
  20. package/dist/fraudProvider.type-Bzd9orn2-D-DU7Fmr.js +7 -0
  21. package/dist/fraudStatus.type-BvRk9kiK-zQpibcxa.js +24 -0
  22. package/dist/gpayments-QZCq0_0y-CChyao60.js +7 -0
  23. package/dist/index-BIgCRujv.js +11642 -0
  24. package/dist/metrics_global--mOHedmQ-BSlYrRxx.js +7 -0
  25. package/dist/nmi-BtKpUtad-RbToUxAS.js +7 -0
  26. package/dist/{nuvei-C3bePsCN-DpiXoEhL.js → nuvei-BOfZN_Em-qgP8-fGC.js} +1 -1
  27. package/dist/{payabli-DP-dvidH-sE0vnJA8.js → payabli-BfZ7IhDq-DQWCjgwk.js} +1 -1
  28. package/dist/payfurl-react.es.js +1 -1
  29. package/dist/payfurl-react.umd.js +26 -38
  30. package/dist/payglocal-CpEbJSpn-mfs00hdI.js +7 -0
  31. package/dist/payway_rest-CIjvQwcK-BcZGibTP.js +7 -0
  32. package/dist/plugins/payfurl/react/src/components/PayfurlDropin.d.ts +1 -1
  33. package/dist/skybank-DWPrfoAb-nBPi7AXK.js +7 -0
  34. package/dist/src/sdk/types/DropInOptions.type.d.ts +2 -0
  35. package/dist/src/sdk/types/GooglePayButtonOptions.type.d.ts +10 -0
  36. package/package.json +2 -2
  37. package/dist/CxPayThreeDsProvider-BljTEbxB-BcFsrr6m.js +0 -12
  38. package/dist/DefaultThreeDsProvider-DbKbN6Le-D6biiNjg.js +0 -224
  39. package/dist/EcentricThreeDsProvider-DjBTwEnR-DfIzyswQ.js +0 -86
  40. package/dist/FlashBancThreeDsProvider-DLWmBAJq-BUtBKD3J.js +0 -12
  41. package/dist/MetricsGlobalThreeDsProvider-Ctsa_ZKe-RCNzcDjE.js +0 -146
  42. package/dist/NmiThreeDsProvider-Cc9uoPqm-FlIzSZZh.js +0 -12
  43. package/dist/NuveiThreeDsProvider-BdJW8InS-5pNw0ile.js +0 -176
  44. package/dist/PayGLocalThreeDsProvider-CiKRmfOe-0iKaaG67.js +0 -127
  45. package/dist/PayWayAppleButton-D6R2TDKl-BPn6O17s.js +0 -157
  46. package/dist/SkyBankThreeDsProvider-R4NN8r-j-CVC2P28l.js +0 -12
  47. package/dist/cxpay-C-GgzidJ-mt2MEXxQ.js +0 -7
  48. package/dist/default-BoeX8PJ8-BnVkuBg7.js +0 -7
  49. package/dist/ecentric-CyZDsJgo-CJbgSWcp.js +0 -7
  50. package/dist/epna-D57kaC8G-DJM_fO0J.js +0 -7
  51. package/dist/fraudProvider.type-ewIWghbD-ewIWghbD.js +0 -7
  52. package/dist/gpayments-ZSCifuNl-BexvVC9s.js +0 -7
  53. package/dist/index-C2RtVqup.js +0 -14175
  54. package/dist/metrics_global-CQH6PsUd-CZryqcGD.js +0 -7
  55. package/dist/nmi-BZF7ZLQM-DXxpTgks.js +0 -7
  56. package/dist/payglocal-3JSRI28a-CvSL6XZn.js +0 -7
  57. package/dist/payway_rest-rG6pY8D4-C_7f5Bac.js +0 -7
  58. package/dist/skybank-xXIyqCCk-dauOla0r.js +0 -7
  59. /package/dist/{ThreeDsPostAuthResponse.type-CaV_50Qh-CaV_50Qh.js → ThreeDsPostAuthResponse.type-BFN9wqum-CaV_50Qh.js} +0 -0
@@ -0,0 +1,7 @@
1
+ import { PayGLocalThreeDsProvider as t } from "./PayGLocalThreeDsProvider-DDqJz4iC-DBo2F6p3.js";
2
+ function n(r, e, o) {
3
+ return new t(r, e, o);
4
+ }
5
+ export {
6
+ n as default
7
+ };
@@ -0,0 +1,7 @@
1
+ import { PayWayAppleButton as p } from "./PayWayAppleButton-DVoTz5Nn-1KU6o3AT.js";
2
+ function f(t, a, e, n, o, r) {
3
+ return new p(t, a, e, n, o, r);
4
+ }
5
+ export {
6
+ f as default
7
+ };
@@ -12,5 +12,5 @@ interface PayfurlDropinProps {
12
12
  onValidationStatusChange: (status: boolean, message: string) => void;
13
13
  onValidate?: () => boolean;
14
14
  }
15
- declare const PayfurlDropin: (props: PayfurlDropinProps) => import("react/jsx-runtime").JSX.Element;
15
+ declare const PayfurlDropin: (props: PayfurlDropinProps) => import("react").JSX.Element;
16
16
  export default PayfurlDropin;
@@ -0,0 +1,7 @@
1
+ import { SkyBankThreeDsProvider as n } from "./SkyBankThreeDsProvider-U6pzbMJY-B9F5E7be.js";
2
+ function a(r, e, t) {
3
+ return new n(r, e, t);
4
+ }
5
+ export {
6
+ a as default
7
+ };
@@ -4,6 +4,7 @@ import { UpiOptionsType } from "./UpiOptions.type";
4
4
  import { ClickToPayOptionsType } from "@/click2pay/ClickToPayOptions.type";
5
5
  import { NetworkTokenOptionsType } from "./NetworkTokenOptions.type";
6
6
  import { PaymentType } from "@/sdk/types/PaymentType.type";
7
+ import { GooglePayButtonOptionsType } from "@/sdk/types/GooglePayButtonOptions.type";
7
8
  export type DropInCheckoutProviderType = {
8
9
  providerType: CheckoutProviderType;
9
10
  providerId: string;
@@ -33,6 +34,7 @@ export type DropInGooglePayOptionsType = {
33
34
  googlePayGatewayMerchantId: string;
34
35
  googlePayMerchantId: string;
35
36
  googlePayMerchantName: string;
37
+ buttonOptions?: GooglePayButtonOptionsType;
36
38
  };
37
39
  export type DropInApplePayOptionsType = {
38
40
  providerId: string;
@@ -0,0 +1,10 @@
1
+ export type GooglePayButtonType = "book" | "buy" | "checkout" | "donate" | "order" | "pay" | "plain" | "subscribe";
2
+ export type GooglePayButtonColor = "default" | "black" | "white";
3
+ export type GooglePayButtonSizeMode = "static" | "fill";
4
+ export type GooglePayButtonOptionsType = {
5
+ buttonColor?: GooglePayButtonColor;
6
+ buttonType?: GooglePayButtonType;
7
+ buttonRadius?: number;
8
+ buttonSizeMode?: GooglePayButtonSizeMode;
9
+ buttonLocale?: string;
10
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@payfurl/react-plugin",
3
3
  "private": false,
4
- "version": "1.2.5",
4
+ "version": "1.2.7",
5
5
  "description": "PayFURL React Plugin",
6
6
  "type": "module",
7
7
  "files": [
@@ -25,7 +25,7 @@
25
25
  "preview": "vite preview"
26
26
  },
27
27
  "dependencies": {
28
- "@payfurl/client": "^4.8.5"
28
+ "@payfurl/client": "^4.8.7"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": "^18.3.1",
@@ -1,12 +0,0 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-Ctsa_ZKe-RCNzcDjE.js";
2
- class t extends e {
3
- getType() {
4
- return "CxPay";
5
- }
6
- getDomain() {
7
- return "cxpay.transactiongateway.com";
8
- }
9
- }
10
- export {
11
- t as CxPayThreeDsProvider
12
- };
@@ -1,224 +0,0 @@
1
- import { g as d, P as S, u as g, J as p, R as m, O as T, e as v, a as f, F as u, b as I, M as y, c as A, i as R, j as C, z as E } from "./index-C2RtVqup.js";
2
- var P = Object.defineProperty, b = (l, e, s) => e in l ? P(l, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : l[e] = s, a = (l, e, s) => b(l, typeof e != "symbol" ? e + "" : e, s);
3
- const U = { class: "mask" }, M = { class: "wrapper" }, L = { class: "container" }, $ = ["action"], _ = ["value"], w = /* @__PURE__ */ m({
4
- __name: "ThreeDsChallenge",
5
- props: {
6
- threeDSServerTransID: {},
7
- acsTransID: {},
8
- formAction: {}
9
- },
10
- emits: ["close", "submit"],
11
- setup(l, { emit: e }) {
12
- const s = l, n = e, o = T(() => C(s.formAction) ? s.formAction : ""), i = R(null), r = JSON.stringify({
13
- threeDSServerTransID: s.threeDSServerTransID,
14
- acsTransID: s.acsTransID,
15
- messageVersion: "2.2.0",
16
- messageType: "CReq",
17
- challengeWindowSize: "01"
18
- }), t = encodeURI(window.btoa(r).replace(/=*$/, ""));
19
- return v(() => {
20
- var h;
21
- o.value && ((h = i.value) == null || h.submit());
22
- }), (h, c) => (E(), f("div", U, [
23
- u("div", M, [
24
- u("div", L, [
25
- I(y, {
26
- onClick: c[0] || (c[0] = (H) => n("close")),
27
- id: "3ds-challenge-close"
28
- }),
29
- c[1] || (c[1] = u("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
30
- u("form", {
31
- action: o.value,
32
- target: "ThreeDsChallengeIFrame",
33
- method: "post",
34
- ref_key: "form",
35
- ref: i
36
- }, [
37
- u("input", {
38
- type: "hidden",
39
- name: "creq",
40
- value: A(t)
41
- }, null, 8, _)
42
- ], 8, $)
43
- ])
44
- ])
45
- ]));
46
- }
47
- }), O = /* @__PURE__ */ p(w, [["__scopeId", "data-v-07081e85"]]);
48
- class k {
49
- constructor() {
50
- a(this, "iframeId", "threeDsIframeMethod"), a(this, "containerId", "payfurlContainerFormInvoker"), a(this, "iframe", null), a(this, "container", null);
51
- }
52
- createIFrame() {
53
- this.iframe || (this.container = document.createElement("div"), this.container.id = this.containerId, document.body.appendChild(this.container), this.iframe = document.createElement("iframe"), this.iframe.name = this.iframeId, this.iframe.style.display = "none", this.container.appendChild(this.iframe));
54
- }
55
- invoke(e, s, n, o, i) {
56
- var r;
57
- this.createIFrame();
58
- const t = document.createElement("form");
59
- t.action = e, t.target = this.iframeId, t.method = "post", (r = this.container) == null || r.appendChild(t);
60
- for (let h in n) {
61
- const c = document.createElement("input");
62
- c.type = "hidden", c.name = h, c.value = n[h], t.appendChild(c);
63
- }
64
- t.submit();
65
- }
66
- }
67
- const { hideSpinner: D, showSpinner: N } = g(), q = "3ds_method_invocation_complete", V = "3ds_challenge_complete";
68
- class F {
69
- constructor(e, s, n) {
70
- a(this, "log"), a(this, "container"), a(this, "options"), a(this, "threeDsProcessor", null), a(this, "threeDSDestroy", () => {
71
- }), a(this, "threeDSServerTransID", ""), a(this, "threeDSAuthURL", ""), a(this, "threeDSRequestorTransID", ""), a(this, "threeDSMonitorURL", ""), a(this, "internalMessageHandler", this.messageHandler.bind(this)), a(this, "onError", (o, i) => {
72
- var r, t;
73
- if (this.closeChallenge(), D(), o === 404) {
74
- (r = this.threeDsProcessor) == null || r.onError({ error: "This feature is only supported by ActiveServer v1.1.2+" });
75
- return;
76
- }
77
- (t = this.threeDsProcessor) == null || t.onError({ error: "3D Secure failed", body: i });
78
- }), a(this, "onSuccess", (o, i) => {
79
- var r, t;
80
- this.closeChallenge(), D();
81
- const h = JSON.parse(i);
82
- ["Y", "A"].includes(h.transStatus) ? (r = this.threeDsProcessor) == null || r.onSuccess(h) : (this.log(`[${this.getType()}]: 3D Secure failed`, h), (t = this.threeDsProcessor) == null || t.onError({ error: "3D Secure failed" }));
83
- }), a(this, "onInitAuthSuccess", (o, i) => {
84
- const r = JSON.parse(i);
85
- if (this.log(`[${this.getType()}][onInitAuthSuccess]`, r), this.threeDSRequestorTransID = r.threeDSRequestorTransID, this.threeDSServerTransID = r.threeDSServerTransID, this.threeDSMonitorURL = r.threeDSMonitorURL, this.threeDSAuthURL = r.threeDSAuthURL, r.threeDSMethodURL) {
86
- this.threeDsMethodInvoke(r.threeDSServerTransID, r.threeDSMethodURL);
87
- return;
88
- }
89
- this.onAuth(!1, "");
90
- }), a(this, "onDoAuthSuccess", (o, i) => {
91
- var r;
92
- const t = JSON.parse(i);
93
- if (this.log(`[${this.getType()}][onDoAuthSuccess]`, t), !t.transStatus) {
94
- this.onError(o, "No transStatus specified");
95
- return;
96
- }
97
- switch (t.transStatus) {
98
- case "C":
99
- if (!t.acsURL) {
100
- this.onError(o, "Invalid Challenge Url");
101
- return;
102
- }
103
- this.doChallenge(t.acsURL, t.acsTransID, t.authenticationValue);
104
- break;
105
- case "N":
106
- this.log(`[${this.getType()}][threeDsAuth], 3DS Verification failed, transaction denied`), this.onError(400, "3DS Verification failed, transaction denied");
107
- break;
108
- case "U":
109
- this.log(`[${this.getType()}][threeDsAuth], Unable to perform 3DS verification`), this.onError(400, "Unable to perform 3DS verification");
110
- break;
111
- case "R":
112
- this.log(`[${this.getType()}][threeDsAuth], Unable to perform 3DS verification, rejected at issuer`), this.onError(400, "Unable to perform 3DS verification, rejected at issuer");
113
- break;
114
- default:
115
- this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ${t.transStatus}`), (r = this.threeDsProcessor) == null || r.onSuccess({
116
- threeDSServerTransID: t.threeDSServerTransID,
117
- threeDSRequestorTransID: "",
118
- acsRenderingType: t.acsRenderingType,
119
- acsTransID: t.acsTransID,
120
- authenticationType: t.authenticationType,
121
- authenticationValue: t.authenticationValue,
122
- challengeCancel: "",
123
- dsTransID: t.dsTransID,
124
- eci: t.eci,
125
- interactionCounter: "",
126
- messageCategory: "",
127
- messageExtension: t.messageExtension,
128
- messageType: t.messageType,
129
- messageVersion: t.messageVersion,
130
- transStatus: t.transStatus,
131
- transStatusReason: t.transStatusReason
132
- });
133
- break;
134
- }
135
- }), this.log = e, this.container = s, this.options = n;
136
- }
137
- getType() {
138
- return "Default";
139
- }
140
- getDomain() {
141
- return "";
142
- }
143
- onPreAuth() {
144
- this.log(`[${this.getType()}][onPreAuth]`), this.threeDsProcessor && (N(), this.threeDsProcessor.onPreAuth(this.onInitAuthSuccess, this.onError), window.addEventListener("message", this.internalMessageHandler));
145
- }
146
- onAuth(e, s) {
147
- var n;
148
- this.log(`[${this.getType()}][onAuth]`, {
149
- threeDSAuthURL: this.threeDSAuthURL,
150
- threeDSRequestorTransID: this.threeDSRequestorTransID,
151
- threeDSServerTransID: this.threeDSServerTransID,
152
- isMethodPerformed: e
153
- }), (n = this.threeDsProcessor) == null || n.onAuth(this.threeDSAuthURL, this.threeDSRequestorTransID, this.threeDSServerTransID, e, s, this.onDoAuthSuccess, this.onError);
154
- }
155
- onPostAuth() {
156
- var e;
157
- this.log(`[${this.getType()}][onPostAuth]`, {
158
- threeDSServerTransID: this.threeDSServerTransID
159
- }), (e = this.threeDsProcessor) == null || e.onPostAuth({
160
- threeDSServerTransID: this.threeDSServerTransID
161
- }, this.onSuccess, this.onError);
162
- }
163
- setThreeDsProcessor(e) {
164
- this.log(`[${this.getType()}][setThreeDsProcessor]`), this.threeDsProcessor = e;
165
- }
166
- messageHandler(e) {
167
- var s, n;
168
- if (!(!((s = e == null ? void 0 : e.data) != null && s.status) || ((n = e == null ? void 0 : e.data) == null ? void 0 : n.status) === d)) {
169
- if (e.data.status === q) {
170
- e.stopPropagation(), this.invocationComplete(e);
171
- return;
172
- }
173
- e.data.status === V && (e.stopPropagation(), this.challengeComplete(e));
174
- }
175
- }
176
- invocationComplete(e) {
177
- this.log(`[${this.getType()}]: 3Ds Method invocation complete`), this.onAuth(!0, "");
178
- }
179
- challengeComplete(e) {
180
- this.log(`[${this.getType()}]: 3Ds Challenge complete`, e.data), this.closeChallenge();
181
- const s = JSON.parse(window.atob(e.data.cres));
182
- 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"));
183
- }
184
- doChallenge(e, s, n) {
185
- this.log(`[${this.getType()}][doChallenge]`), D();
186
- const { destroy: o } = S({
187
- el: document.body,
188
- component: O,
189
- props: {
190
- threeDSServerTransID: this.threeDSServerTransID,
191
- acsTransID: s,
192
- formAction: e,
193
- authenticationValue: n
194
- },
195
- on: {
196
- close: () => {
197
- var i;
198
- o(), this.threeDSDestroy = () => {
199
- }, (i = this.threeDsProcessor) == null || i.onError({ error: "Challenge cancelled" });
200
- }
201
- }
202
- });
203
- this.threeDSDestroy = o;
204
- }
205
- closeChallenge() {
206
- var e;
207
- (e = this.threeDSDestroy) == null || e.call(this), window.removeEventListener("message", this.internalMessageHandler);
208
- }
209
- threeDsMethodInvoke(e, s) {
210
- this.log(`[${this.getType()}][threeDsMethodInvoke]`, { threeDSServerTransID: e, threeDSMethodURL: s });
211
- const n = {
212
- threeDSServerTransID: e,
213
- threeDSMethodNotificationURL: this.options.apiUrl + "/3ds/method_invocation"
214
- }, o = encodeURI(window.btoa(JSON.stringify(n)).replace(/=*$/, ""));
215
- new k().invoke(s, "POST", {
216
- threeDSMethodData: o
217
- });
218
- }
219
- }
220
- export {
221
- F as DefaultThreeDsProvider,
222
- V as THREE_DS_CHALLENGE_COMPLETE,
223
- q as THREE_DS_METHOD_INVOCATION_COMPLETE
224
- };
@@ -1,86 +0,0 @@
1
- import { DefaultThreeDsProvider as i } from "./DefaultThreeDsProvider-DbKbN6Le-D6biiNjg.js";
2
- import { P as h, J as c, R as u, O as D, e as d, z as p, a as m, F as s, b as v, M as g, c as S, i as T, j as y } from "./index-C2RtVqup.js";
3
- var P = Object.defineProperty, f = (a, e, t) => e in a ? P(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, I = (a, e, t) => f(a, e + "", t);
4
- const C = { class: "mask" }, A = { class: "wrapper" }, b = { class: "container" }, R = ["action"], $ = ["value"], E = /* @__PURE__ */ u({
5
- __name: "ecentric",
6
- props: {
7
- threeDSServerTransID: {},
8
- acsTransID: {},
9
- formAction: {},
10
- authenticationValue: {}
11
- },
12
- setup(a) {
13
- const e = a, t = D(() => y(e.formAction) ? e.formAction : ""), o = T(null), n = e.authenticationValue;
14
- return d(() => {
15
- var r;
16
- t.value && ((r = o.value) == null || r.submit());
17
- }), (r, l) => (p(), m("div", C, [
18
- s("div", A, [
19
- s("div", b, [
20
- v(g, {
21
- onClick: l[0] || (l[0] = (V) => r.emit("close"))
22
- }),
23
- l[1] || (l[1] = s("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)),
24
- s("form", {
25
- action: t.value,
26
- target: "ThreeDsChallengeIFrame",
27
- method: "post",
28
- ref_key: "form",
29
- ref: o
30
- }, [
31
- s("input", {
32
- type: "hidden",
33
- name: "PaReq",
34
- value: S(n)
35
- }, null, 8, $)
36
- ], 8, R)
37
- ])
38
- ])
39
- ]));
40
- }
41
- }), F = /* @__PURE__ */ c(E, [["__scopeId", "data-v-d0f7984c"]]);
42
- class O extends i {
43
- constructor() {
44
- super(...arguments), I(this, "paResPayload", "");
45
- }
46
- getType() {
47
- return "Ecentric";
48
- }
49
- onPostAuth() {
50
- var e;
51
- this.log(`[${this.getType()}][onPostAuth]`, {
52
- threeDSServerTransID: this.threeDSServerTransID,
53
- authenticationValue: this.paResPayload
54
- }), (e = this.threeDsProcessor) == null || e.onPostAuth({
55
- threeDSServerTransID: this.threeDSServerTransID,
56
- authenticationValue: this.paResPayload
57
- }, this.onSuccess, this.onError);
58
- }
59
- doChallenge(e, t, o) {
60
- this.log(`[${this.getType()}][doChallenge]`);
61
- const { destroy: n } = h({
62
- el: document.body,
63
- component: F,
64
- props: {
65
- threeDSServerTransID: this.threeDSServerTransID,
66
- acsTransID: t,
67
- formAction: e,
68
- authenticationValue: o
69
- },
70
- on: {
71
- close: () => {
72
- var r;
73
- n(), this.threeDSDestroy = () => {
74
- }, (r = this.threeDsProcessor) == null || r.onError({ error: "Challenge cancelled" });
75
- }
76
- }
77
- });
78
- this.threeDSDestroy = n;
79
- }
80
- challengeComplete(e) {
81
- this.log(`[${this.getType()}]: 3Ds Challenge complete`, e.data), this.closeChallenge(), this.log(`[${this.getType()}]: cresData`, e.data.cres), e.data.cres ? (this.paResPayload = e.data.cres, this.onPostAuth()) : (this.log(`[${this.getType()}]: Failed 3DS Challenge`, e.data), this.onError(400, "Failed 3DS Challenge"));
82
- }
83
- }
84
- export {
85
- O as EcentricThreeDsProvider
86
- };
@@ -1,12 +0,0 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-Ctsa_ZKe-RCNzcDjE.js";
2
- class s extends e {
3
- getType() {
4
- return "FlashBanc";
5
- }
6
- getDomain() {
7
- return "flashbanc.transactiongateway.com";
8
- }
9
- }
10
- export {
11
- s as FlashBancThreeDsProvider
12
- };
@@ -1,146 +0,0 @@
1
- import { DefaultThreeDsProvider as w } from "./DefaultThreeDsProvider-DbKbN6Le-D6biiNjg.js";
2
- import { y as g, P as E, u as A, J as f, R as b, e as T, h as L, S as _, f as x, z as G, a as N, F as m, b as I, M as $, i as H } from "./index-C2RtVqup.js";
3
- var M = Object.defineProperty, O = (h, e, t) => e in h ? M(h, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[e] = t, p = (h, e, t) => O(h, typeof e != "symbol" ? e + "" : e, t);
4
- const F = { class: "mask" }, j = { class: "wrapper" }, R = { class: "container" }, U = /* @__PURE__ */ b({
5
- __name: "MetricsGlobalThreeDsChallenge",
6
- emits: ["close", "submit"],
7
- setup(h, { emit: e }) {
8
- const t = e, r = H(!1);
9
- function a(c) {
10
- var o;
11
- ["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes((o = c.data) == null ? void 0 : o.message) && (r.value = c.data.message === "3DS_CHALLENGE_SHOW");
12
- }
13
- return T(() => {
14
- window.addEventListener("message", a);
15
- }), L(() => {
16
- window.removeEventListener("message", a);
17
- }), (c, o) => _((G(), N("div", F, [
18
- m("div", j, [
19
- m("div", R, [
20
- I($, {
21
- onClick: o[0] || (o[0] = (i) => t("close")),
22
- id: "3ds-challenge-close"
23
- }),
24
- o[1] || (o[1] = m("div", { id: "ThreeDsChallengeIFrame" }, null, -1))
25
- ])
26
- ])
27
- ], 512)), [
28
- [x, r.value]
29
- ]);
30
- }
31
- }), k = /* @__PURE__ */ f(U, [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: d, showSpinner: W } = A(), D = 5;
32
- class z extends w {
33
- constructor(e, t, r) {
34
- var a;
35
- super(e, t, r), p(this, "gateway"), p(this, "threeDS"), p(this, "numAttempts", 0), this.initScript(((a = r.clientParameters) == null ? void 0 : a.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 >= D) {
46
- d(), g(this.container, "Error loading 3D Secure");
47
- return;
48
- }
49
- if (!this.threeDS && this.numAttempts < D) {
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(), (r) => {
54
- var a;
55
- (a = this.threeDsProcessor) == null || a.setPaymentInfo(r), this.startAuth();
56
- }, () => {
57
- g(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, r, a, c, o;
66
- this.log(`[${this.getType()}]: startAuth`);
67
- const i = (e = this.threeDsProcessor) == null ? void 0 : e.getPaymentInfo();
68
- if (!i) {
69
- d(), g(this.container, "Payment information is missing");
70
- return;
71
- }
72
- W();
73
- const s = (t = this.threeDsProcessor) == null ? void 0 : t.getAddressInfo(), y = i.expiryDate.length === 4 ? i.expiryDate[2] + i.expiryDate[3] : "", v = i.expiryDate.length === 4 ? i.expiryDate[0] + i.expiryDate[1] : "", [P = "", C = ""] = ((r = i.cardholder) == null ? void 0 : r.split(/\s+/)) || [], S = {
74
- cardNumber: i.cardNumber,
75
- cardExpMonth: y,
76
- cardExpYear: parseInt(v) + 2e3,
77
- currency: (a = this.threeDsProcessor) == null ? void 0 : a.getCurrency(),
78
- amount: (c = this.threeDsProcessor) == null ? void 0 : c.getAmount(),
79
- email: (o = this.threeDsProcessor) == null ? void 0 : o.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) || P || "payFURL",
86
- lastName: (s == null ? void 0 : s.lastName) || C || "payFURL",
87
- postalCode: s == null ? void 0 : s.postalCode
88
- }, u = this.threeDS.createUI(S);
89
- u.start("#ThreeDsChallengeIFrame"), u.on("challenge", (n) => {
90
- this.log(`[${this.getType()}][onChallenge]`, n), d(), this.showChallenge();
91
- }), u.on("complete", (n) => {
92
- var l;
93
- this.log(`[${this.getType()}][onComplete]`, n), this.removeChallenge(), (l = this.threeDsProcessor) == null || l.onSuccess({
94
- externalThreeDsData: n
95
- });
96
- }), u.on("failure", (n) => {
97
- var l;
98
- this.log(`[${this.getType()}][onFailure]`, n), d(), this.closeChallenge(), (l = this.threeDsProcessor) == null || l.onError({ error: n.message });
99
- }), u.on("error", (n) => {
100
- var l;
101
- this.log(`[${this.getType()}][error]`, n), d(), this.closeChallenge(), (l = this.threeDsProcessor) == null || l.onError({ error: n.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 r;
113
- this.log(`[${this.getType()}]: gateway error`, t), (r = this.threeDsProcessor) == null || r.onError({ error: t.message }), this.threeDS = null, this.numAttempts = D;
114
- });
115
- }
116
- initChallenge() {
117
- const { destroy: e } = E({
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
- z as MetricsGlobalThreeDsProvider
146
- };
@@ -1,12 +0,0 @@
1
- import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-Ctsa_ZKe-RCNzcDjE.js";
2
- class t extends e {
3
- getType() {
4
- return "NMI";
5
- }
6
- getDomain() {
7
- return "secure.nmi.com";
8
- }
9
- }
10
- export {
11
- t as NmiThreeDsProvider
12
- };