@payfurl/client 4.6.0 → 4.6.2
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/README.md +4 -0
- package/dist/sdk/CxPayThreeDsProvider-634589d1.mjs +14 -0
- package/dist/sdk/{DefaultThreeDsProvider-701637b0.mjs → DefaultThreeDsProvider-e92310c2.mjs} +64 -58
- package/dist/sdk/EcentricThreeDsProvider-9bf4643c.mjs +90 -0
- package/dist/sdk/EpnaThreeDsProvider-f4ab5593.mjs +14 -0
- package/dist/sdk/FlashBancThreeDsProvider-9a6d418c.mjs +14 -0
- package/dist/sdk/{GPaymentsThreeDsProvider-740b4c21.mjs → GPaymentsThreeDsProvider-992c1825.mjs} +19 -17
- package/dist/sdk/MetricsGlobalThreeDsProvider-fdada4dd.mjs +153 -0
- package/dist/sdk/NmiThreeDsProvider-8c8ab0f0.mjs +14 -0
- package/dist/sdk/NuveiThreeDsProvider-cc515d25.mjs +173 -0
- package/dist/sdk/PayabliThreeDsProvider-19d2e62a.mjs +14 -0
- package/dist/sdk/SkyBankThreeDsProvider-44644ee8.mjs +14 -0
- package/dist/sdk/cxpay-a965ca2f.mjs +10 -0
- package/dist/sdk/{default-6f6c8e7c.mjs → default-9ec42bc0.mjs} +2 -2
- package/dist/sdk/ecentric-fc332878.mjs +9 -0
- package/dist/sdk/epna-24e6dd6c.mjs +10 -0
- package/dist/sdk/flashbanc-49c4deb2.mjs +10 -0
- package/dist/sdk/{gpayments-455eb705.mjs → gpayments-c0450b55.mjs} +3 -3
- package/dist/sdk/main-6d84dc12.mjs +14068 -0
- package/dist/sdk/metrics_global-3c9bd0de.mjs +9 -0
- package/dist/sdk/nmi-8aabbfd1.mjs +10 -0
- package/dist/sdk/nuvei-3774bd45.mjs +9 -0
- package/dist/sdk/payabli-d52e0c78.mjs +10 -0
- package/dist/sdk/payfurl.es.js +1 -1
- package/dist/sdk/payfurl.umd.js +25 -43
- package/dist/sdk/skybank-f7d58ed5.mjs +10 -0
- package/dist/sdk/style.css +1 -1
- package/package.json +4 -2
- package/dist/sdk/NmiThreeDsProvider-51bf6fff.mjs +0 -135
- package/dist/sdk/ecentric-45331775.mjs +0 -165
- package/dist/sdk/main-f2996bc2.mjs +0 -18729
- package/dist/sdk/nmi-dbb88036.mjs +0 -9
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var p = (n, a, s) => a in n ? d(n, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[a] = s;
|
|
3
|
+
var c = (n, a, s) => (p(n, typeof a != "symbol" ? a + "" : a, s), s);
|
|
4
|
+
import { d as m, o as g, s as S, h as u, a as D, c as _, p as f, f as y, b as h, _ as T, g as N, T as I } from "./main-6d84dc12.mjs";
|
|
5
|
+
import { DefaultThreeDsProvider as P, THREE_DS_METHOD_INVOCATION_COMPLETE as C, THREE_DS_CHALLENGE_COMPLETE as E } from "./DefaultThreeDsProvider-e92310c2.mjs";
|
|
6
|
+
const x = (n) => (f("data-v-e3afa988"), n = n(), y(), n), V = { class: "mask" }, v = /* @__PURE__ */ x(() => /* @__PURE__ */ h("div", { class: "wrapper" }, [
|
|
7
|
+
/* @__PURE__ */ h("div", { class: "container" })
|
|
8
|
+
], -1)), R = [
|
|
9
|
+
v
|
|
10
|
+
], b = /* @__PURE__ */ m({
|
|
11
|
+
__name: "nuvei",
|
|
12
|
+
props: {
|
|
13
|
+
threeDSServerTransID: null,
|
|
14
|
+
sessionToken: null,
|
|
15
|
+
env: null,
|
|
16
|
+
merchantId: null,
|
|
17
|
+
merchantSiteId: null,
|
|
18
|
+
cardNumber: null,
|
|
19
|
+
cardHolderName: null,
|
|
20
|
+
expirationMonth: null,
|
|
21
|
+
expirationYear: null,
|
|
22
|
+
CVV: null,
|
|
23
|
+
firstName: null,
|
|
24
|
+
lastName: null,
|
|
25
|
+
email: null,
|
|
26
|
+
country: null
|
|
27
|
+
},
|
|
28
|
+
setup(n) {
|
|
29
|
+
const a = n;
|
|
30
|
+
g(() => {
|
|
31
|
+
S();
|
|
32
|
+
const r = document.createElement("script");
|
|
33
|
+
r.type = "text/javascript", r.src = "https://cdn.safecharge.com/safecharge_resources/v1/websdk/safecharge.js", r.onload = () => {
|
|
34
|
+
const e = new MutationObserver(function() {
|
|
35
|
+
document.getElementsByClassName("sfcModal-dialog")[0] && (u(), e.disconnect());
|
|
36
|
+
}), t = { childList: !0 }, o = document.querySelector("body");
|
|
37
|
+
e.observe(o, t), s();
|
|
38
|
+
}, document.head.appendChild(r);
|
|
39
|
+
});
|
|
40
|
+
function s() {
|
|
41
|
+
var r = SafeCharge({
|
|
42
|
+
env: a.env,
|
|
43
|
+
// Nuvei API environment - 'int' (integration) or 'prod' (production - default if omitted)
|
|
44
|
+
merchantId: a.merchantId,
|
|
45
|
+
//as assigned by Nuvei
|
|
46
|
+
merchantSiteId: a.merchantSiteId
|
|
47
|
+
// your Merchant Site ID provided by Nuvei
|
|
48
|
+
});
|
|
49
|
+
r.fields({
|
|
50
|
+
fonts: [
|
|
51
|
+
{
|
|
52
|
+
cssUrl: "https://fonts.googleapis.com/css?family=Source+Code+Pro"
|
|
53
|
+
}
|
|
54
|
+
// include your custom fonts
|
|
55
|
+
],
|
|
56
|
+
locale: "en"
|
|
57
|
+
// You can set your users preferred locale. If not provided, we try to auto-detect.
|
|
58
|
+
}), r.authenticate3d({
|
|
59
|
+
sessionToken: a.sessionToken,
|
|
60
|
+
// received from openOrder API
|
|
61
|
+
paymentOption: {
|
|
62
|
+
card: {
|
|
63
|
+
cardNumber: a.cardNumber,
|
|
64
|
+
cardHolderName: a.cardHolderName,
|
|
65
|
+
expirationMonth: a.expirationMonth,
|
|
66
|
+
expirationYear: a.expirationYear,
|
|
67
|
+
CVV: a.CVV
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
billingAddress: {
|
|
71
|
+
firstName: a.firstName,
|
|
72
|
+
lastName: a.lastName,
|
|
73
|
+
email: a.email,
|
|
74
|
+
country: a.country
|
|
75
|
+
}
|
|
76
|
+
}, function(e) {
|
|
77
|
+
window.postMessage({ status: "3ds_challenge_complete", cres: e }, "*");
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return (r, e) => (D(), _("div", V, R));
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
const A = /* @__PURE__ */ T(b, [["__scopeId", "data-v-e3afa988"]]);
|
|
84
|
+
class k extends P {
|
|
85
|
+
constructor() {
|
|
86
|
+
super(...arguments);
|
|
87
|
+
c(this, "_paResPayload", null);
|
|
88
|
+
c(this, "onSuccess", (s, r) => {
|
|
89
|
+
var t, o;
|
|
90
|
+
this.closeChallenge(), u();
|
|
91
|
+
const e = JSON.parse(r);
|
|
92
|
+
e.authenticationValue ? (t = this.threeDsProcessor) == null || t.onSuccess(e) : (this.log(`[${this.getType()}][_onSuccess] 3D Secure failed`, e), (o = this.threeDsProcessor) == null || o.onError({ error: "3D Secure failed" }));
|
|
93
|
+
});
|
|
94
|
+
c(this, "onDoAuthSuccess", (s, r) => {
|
|
95
|
+
var t, o, i;
|
|
96
|
+
const e = JSON.parse(r);
|
|
97
|
+
if (this.log(`[${this.getType()}][onDoAuthSuccess]`, e), !e.transStatus || !e.authenticationValue) {
|
|
98
|
+
this.onError(s, "No transStatus specified");
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
switch (e.transStatus) {
|
|
102
|
+
case "C":
|
|
103
|
+
this.doNuveiChallenge(e.authenticationValue, (t = this.threeDsProcessor) == null ? void 0 : t.getAddressInfo(), (o = this.threeDsProcessor) == null ? void 0 : o.getPaymentInfo());
|
|
104
|
+
break;
|
|
105
|
+
default:
|
|
106
|
+
this.log(`[${this.getType()}][threeDsAuth], 3DS challenge not required, tranStatus: ` + e.transStatus), (i = this.threeDsProcessor) == null || i.onSuccess({
|
|
107
|
+
threeDSServerTransID: e.threeDSServerTransID,
|
|
108
|
+
threeDSRequestorTransID: "",
|
|
109
|
+
acsRenderingType: e.acsRenderingType,
|
|
110
|
+
acsTransID: e.acsTransID,
|
|
111
|
+
authenticationType: e.authenticationType,
|
|
112
|
+
authenticationValue: e.authenticationValue,
|
|
113
|
+
challengeCancel: "",
|
|
114
|
+
dsTransID: e.dsTransID,
|
|
115
|
+
eci: e.eci,
|
|
116
|
+
interactionCounter: "",
|
|
117
|
+
messageCategory: "",
|
|
118
|
+
messageExtension: e.messageExtension,
|
|
119
|
+
messageType: e.messageType,
|
|
120
|
+
messageVersion: e.messageVersion,
|
|
121
|
+
transStatus: e.transStatus,
|
|
122
|
+
transStatusReason: e.transStatusReason
|
|
123
|
+
});
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
getType() {
|
|
129
|
+
return "Nuvei";
|
|
130
|
+
}
|
|
131
|
+
onPostAuth() {
|
|
132
|
+
var s;
|
|
133
|
+
this.log(`[${this.getType()}][onAuth] Do Post Authentication for transId`, this.threeDSServerTransID, this._paResPayload), (s = this.threeDsProcessor) == null || s.onPostAuth({
|
|
134
|
+
threeDSServerTransID: this.threeDSServerTransID,
|
|
135
|
+
authenticationValue: this._paResPayload.cavv,
|
|
136
|
+
eci: this._paResPayload.eci,
|
|
137
|
+
dsTransID: this._paResPayload.dsTransID,
|
|
138
|
+
threeDsVersion: this._paResPayload.threeDVersion,
|
|
139
|
+
xid: this._paResPayload.xid
|
|
140
|
+
}, this.onSuccess, this.onError);
|
|
141
|
+
}
|
|
142
|
+
doNuveiChallenge(s, r, e) {
|
|
143
|
+
var i;
|
|
144
|
+
const t = JSON.parse(s);
|
|
145
|
+
(t === null || !t.merchantId || !t.merchantSiteId) && ((i = this.threeDsProcessor) == null || i.onError({ error: "3D Secure failed" })), r && (t.firstName = r.firstName, t.lastName = r.lastName, t.email = r.email, t.country = r.country), e && (t.cardNumber = e.cardNumber, t.cardHolderName = e.cardholder, t.expirationMonth = e.expiryDate.substring(2, 4), t.expirationYear = e.expiryDate.substring(0, 2), t.CVV = e.ccv);
|
|
146
|
+
const { destroy: o } = N({
|
|
147
|
+
el: document.body,
|
|
148
|
+
component: A,
|
|
149
|
+
props: t,
|
|
150
|
+
on: {
|
|
151
|
+
close: () => {
|
|
152
|
+
var l;
|
|
153
|
+
o(), this.threeDSDestroy = () => {
|
|
154
|
+
}, (l = this.threeDsProcessor) == null || l.onError({ error: "Challenge cancelled" });
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
this.threeDSDestroy = o;
|
|
159
|
+
}
|
|
160
|
+
messageHandler(s) {
|
|
161
|
+
var r, e, t, o;
|
|
162
|
+
if (!(!((r = s == null ? void 0 : s.data) != null && r.status) || ((e = s == null ? void 0 : s.data) == null ? void 0 : e.status) === I)) {
|
|
163
|
+
if (s.data.status === C) {
|
|
164
|
+
this.log(`[${this.getType()}][messageHandler] 3Ds Method invocation complete`), s.stopPropagation(), this.onAuth(!0, "");
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
s.data.status === E && (this.log(`[${this.getType()}][messageHandler] 3Ds Challenge complete`, s.data), s.stopPropagation(), this.closeChallenge(), s.data.cres && ((t = s.data.cres) == null ? void 0 : t.result) === "APPROVED" && ((o = s.data.cres) == null ? void 0 : o.errCode) === "0" ? (this._paResPayload = s.data.cres, this.onPostAuth()) : (this.log(`[${this.getType()}][messageHandler] Failed 3DS Challenge`, s.data), this.onError(400, "Failed 3DS Challenge")));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
export {
|
|
172
|
+
k as NuveiThreeDsProvider
|
|
173
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-fdada4dd.mjs";
|
|
2
|
+
import "./DefaultThreeDsProvider-e92310c2.mjs";
|
|
3
|
+
import "./main-6d84dc12.mjs";
|
|
4
|
+
class i extends e {
|
|
5
|
+
getType() {
|
|
6
|
+
return "Payabli";
|
|
7
|
+
}
|
|
8
|
+
getDomain() {
|
|
9
|
+
return "centavo.transactiongateway.com";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
i as PayabliThreeDsProvider
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-fdada4dd.mjs";
|
|
2
|
+
import "./DefaultThreeDsProvider-e92310c2.mjs";
|
|
3
|
+
import "./main-6d84dc12.mjs";
|
|
4
|
+
class s extends e {
|
|
5
|
+
getType() {
|
|
6
|
+
return "SkyBank";
|
|
7
|
+
}
|
|
8
|
+
getDomain() {
|
|
9
|
+
return "secure.skybankgateway.com";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
s as SkyBankThreeDsProvider
|
|
14
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CxPayThreeDsProvider as e } from "./CxPayThreeDsProvider-634589d1.mjs";
|
|
2
|
+
import "./MetricsGlobalThreeDsProvider-fdada4dd.mjs";
|
|
3
|
+
import "./DefaultThreeDsProvider-e92310c2.mjs";
|
|
4
|
+
import "./main-6d84dc12.mjs";
|
|
5
|
+
function n(r, o, t) {
|
|
6
|
+
return new e(r, o, t);
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
n as default
|
|
10
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DefaultThreeDsProvider as o } from "./DefaultThreeDsProvider-
|
|
2
|
-
import "./main-
|
|
1
|
+
import { DefaultThreeDsProvider as o } from "./DefaultThreeDsProvider-e92310c2.mjs";
|
|
2
|
+
import "./main-6d84dc12.mjs";
|
|
3
3
|
function a(e, r, t) {
|
|
4
4
|
return new o(e, r, t);
|
|
5
5
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EpnaThreeDsProvider as t } from "./EpnaThreeDsProvider-f4ab5593.mjs";
|
|
2
|
+
import "./MetricsGlobalThreeDsProvider-fdada4dd.mjs";
|
|
3
|
+
import "./DefaultThreeDsProvider-e92310c2.mjs";
|
|
4
|
+
import "./main-6d84dc12.mjs";
|
|
5
|
+
function a(r, e, o) {
|
|
6
|
+
return new t(r, e, o);
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
a as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FlashBancThreeDsProvider as e } from "./FlashBancThreeDsProvider-9a6d418c.mjs";
|
|
2
|
+
import "./MetricsGlobalThreeDsProvider-fdada4dd.mjs";
|
|
3
|
+
import "./DefaultThreeDsProvider-e92310c2.mjs";
|
|
4
|
+
import "./main-6d84dc12.mjs";
|
|
5
|
+
function p(r, o, t) {
|
|
6
|
+
return new e(r, o, t);
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
p as default
|
|
10
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GPaymentsThreeDsProvider as o } from "./GPaymentsThreeDsProvider-
|
|
2
|
-
import "./DefaultThreeDsProvider-
|
|
3
|
-
import "./main-
|
|
1
|
+
import { GPaymentsThreeDsProvider as o } from "./GPaymentsThreeDsProvider-992c1825.mjs";
|
|
2
|
+
import "./DefaultThreeDsProvider-e92310c2.mjs";
|
|
3
|
+
import "./main-6d84dc12.mjs";
|
|
4
4
|
function p(r, e, t) {
|
|
5
5
|
return new o(r, e, t);
|
|
6
6
|
}
|