@payfurl/react-plugin 1.2.6 → 1.3.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.
- package/dist/CxPayThreeDsProvider-lD7RyyaH-CZzCobVO.js +12 -0
- package/dist/DefaultThreeDsProvider-aIZr-d29-34xFFHE7.js +243 -0
- package/dist/EcentricThreeDsProvider-B7Hq90Yp-BLFmnpX_.js +78 -0
- package/dist/{EpnaThreeDsProvider-C_tojNLc-DIM-7nJx.js → EpnaThreeDsProvider-BAO2GROY-DrXyG7m7.js} +3 -3
- package/dist/FlashBancThreeDsProvider-CIZpoTAj-mm8iTQlK.js +12 -0
- package/dist/{GPaymentsThreeDsProvider-DSa9kCKg-BtB3DjwH.js → GPaymentsThreeDsProvider-COuZ_3w6-LSN7UEC9.js} +35 -39
- package/dist/MetricsGlobalThreeDsProvider-D3x5hiTk-Otm4rjjf.js +149 -0
- package/dist/NmiThreeDsProvider-fLTB46dM-CF2ixVZj.js +12 -0
- package/dist/NuveiThreeDsProvider-BpWi_OJA-DpNk-jUR.js +164 -0
- package/dist/PayGLocalThreeDsProvider-DvA8Ng4u-CaEbpX2R.js +117 -0
- package/dist/PayWayAppleButton-DESHrVB--dAz40mnI.js +173 -0
- package/dist/{PayabliThreeDsProvider-COchAXx2-BQuz_Irn.js → PayabliThreeDsProvider-B34Ah8DW-B9F4JRAO.js} +3 -3
- package/dist/SkyBankThreeDsProvider-0S5UKz-C-BkciCrGp.js +12 -0
- package/dist/cxpay-2tlxyzUF-CXU4oVZi.js +7 -0
- package/dist/default-Sih0fC9J-l6oXyAYh.js +7 -0
- package/dist/ecentric-CN_DxZw6-CDBzRGVY.js +7 -0
- package/dist/epna-CuWMBne4-Co8ZvTur.js +7 -0
- package/dist/{flashbanc-DrIG4m7r-BV1X_PsF.js → flashbanc-YdmE24o7-CYnxMwr_.js} +1 -1
- package/dist/forter-CcQiwntl-Cc86pyZN.js +61 -0
- package/dist/forterDeviceIntelScript-DdHZ7KLR-Bj5SDir_.js +4 -0
- package/dist/fraudProvider.type-Bzd9orn2-D-DU7Fmr.js +7 -0
- package/dist/fraudStatus.type-BvRk9kiK-zQpibcxa.js +24 -0
- package/dist/gpayments-DVhgcMCp-D1cODCJ9.js +7 -0
- package/dist/index-BuqGcTyx.js +11741 -0
- package/dist/metrics_global-DshQOuaW-T-FOilvV.js +7 -0
- package/dist/nmi-Qo4scfgJ-DVhwpAno.js +7 -0
- package/dist/{nuvei-HtM7MLjQ-CTrF1cka.js → nuvei-BFllJ45f-B-JXn8ur.js} +1 -1
- package/dist/{payabli-BgNx9N_g-DQ6euiaK.js → payabli-eGPashQz-Bx0aWlgU.js} +1 -1
- package/dist/payfurl-react.es.js +1 -1
- package/dist/payfurl-react.umd.js +26 -38
- package/dist/payglocal-WvM5v5cn-CsqWoNS0.js +7 -0
- package/dist/payway_rest-m9k6k7M0-DRpVLFXx.js +7 -0
- package/dist/plugins/payfurl/react/src/components/PayfurlDropin.d.ts +1 -1
- package/dist/skybank-174OmYCW-CxTyN679.js +7 -0
- package/dist/src/sdk/types/DropInOptions.type.d.ts +2 -0
- package/dist/src/sdk/types/GooglePayButtonOptions.type.d.ts +10 -0
- package/package.json +2 -2
- package/dist/CxPayThreeDsProvider-Bz7O7f0F-Ci3Y5QD-.js +0 -12
- package/dist/DefaultThreeDsProvider-VHq5xoNU-B98X5dUD.js +0 -224
- package/dist/EcentricThreeDsProvider-CWRQYa9Y-DBUNYhEB.js +0 -86
- package/dist/FlashBancThreeDsProvider-DvD_hlHn-BKR8ONrR.js +0 -12
- package/dist/MetricsGlobalThreeDsProvider-C1KPszqD-gukfr7oc.js +0 -146
- package/dist/NmiThreeDsProvider-CK1dan0G-vAf4JSbF.js +0 -12
- package/dist/NuveiThreeDsProvider-Cu2fB7rt-_VGkkIJi.js +0 -176
- package/dist/PayGLocalThreeDsProvider-Dsi0JOu8-C_RNLPw_.js +0 -127
- package/dist/PayWayAppleButton-DNeVogl8-C709mdwc.js +0 -157
- package/dist/SkyBankThreeDsProvider-BETsDyuS-DGje6s-d.js +0 -12
- package/dist/cxpay-CWoG5bR0-B5bioTOY.js +0 -7
- package/dist/default-CKovzYoW-BLSkXae5.js +0 -7
- package/dist/ecentric-RPlS3J2Q-CqmD9CJb.js +0 -7
- package/dist/epna-DIkbQdLV-D_8db8q0.js +0 -7
- package/dist/forter-CfW26Mkn-CmVDxLR0.js +0 -46
- package/dist/fraudProvider.type-ewIWghbD-ewIWghbD.js +0 -7
- package/dist/gpayments-DbPzgcxs-BWVhzASN.js +0 -7
- package/dist/index-B2hO1TjZ.js +0 -14112
- package/dist/metrics_global-CEnYLnX--CtPjo6_4.js +0 -7
- package/dist/nmi-DcUbphxD-CeDAyW0M.js +0 -7
- package/dist/payglocal-DvdtjOZ3-DYC6sOpu.js +0 -7
- package/dist/payway_rest-eM0Wk9-Y-Cw2A9cOC.js +0 -7
- package/dist/skybank-BFv-efpg-CwR7mlx2.js +0 -7
- /package/dist/{ThreeDsPostAuthResponse.type-CaV_50Qh-CaV_50Qh.js → ThreeDsPostAuthResponse.type-BFN9wqum-CaV_50Qh.js} +0 -0
|
@@ -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
|
|
15
|
+
declare const PayfurlDropin: (props: PayfurlDropinProps) => import("react").JSX.Element;
|
|
16
16
|
export default PayfurlDropin;
|
|
@@ -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.
|
|
4
|
+
"version": "1.3.0",
|
|
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.
|
|
28
|
+
"@payfurl/client": "^4.9.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": "^18.3.1",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-C1KPszqD-gukfr7oc.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, F as m, O as T, e as v, a as f, b as u, c as I, d as y, D as A, i as C, j as E, z as R } from "./index-B2hO1TjZ.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" }, L = { class: "wrapper" }, $ = { class: "container" }, M = ["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(() => E(s.formAction) ? s.formAction : ""), i = C(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) => (R(), f("div", U, [
|
|
23
|
-
u("div", L, [
|
|
24
|
-
u("div", $, [
|
|
25
|
-
I(y, {
|
|
26
|
-
onClick: c[0] || (c[0] = (F) => 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, M)
|
|
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 J {
|
|
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
|
-
J 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-VHq5xoNU-B98X5dUD.js";
|
|
2
|
-
import { P as h, J as c, F as u, O as D, e as d, z as p, a as m, b as s, c as v, d as g, D as S, i as T, j as y } from "./index-B2hO1TjZ.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" }, F = { class: "container" }, b = ["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", F, [
|
|
20
|
-
v(g, {
|
|
21
|
-
onClick: l[0] || (l[0] = (R) => 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, b)
|
|
37
|
-
])
|
|
38
|
-
])
|
|
39
|
-
]));
|
|
40
|
-
}
|
|
41
|
-
}), V = /* @__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: V,
|
|
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-C1KPszqD-gukfr7oc.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-VHq5xoNU-B98X5dUD.js";
|
|
2
|
-
import { y as g, P as E, u as A, J as f, F as b, e as T, h as L, S as _, l as x, z as G, a as N, b as m, c as I, d as $, i as F } from "./index-B2hO1TjZ.js";
|
|
3
|
-
var H = Object.defineProperty, O = (h, e, t) => e in h ? H(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 M = { class: "mask" }, j = { class: "wrapper" }, U = { class: "container" }, k = /* @__PURE__ */ b({
|
|
5
|
-
__name: "MetricsGlobalThreeDsChallenge",
|
|
6
|
-
emits: ["close", "submit"],
|
|
7
|
-
setup(h, { emit: e }) {
|
|
8
|
-
const t = e, r = F(!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", M, [
|
|
18
|
-
m("div", j, [
|
|
19
|
-
m("div", U, [
|
|
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
|
-
}), W = /* @__PURE__ */ f(k, [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: d, showSpinner: J } = 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
|
-
J();
|
|
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: W,
|
|
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
|
-
};
|