@payfurl/client 4.6.2 → 4.6.4
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/sdk/{CxPayThreeDsProvider-634589d1.mjs → CxPayThreeDsProvider-8d60524d.mjs} +3 -3
- package/dist/sdk/{DefaultThreeDsProvider-e92310c2.mjs → DefaultThreeDsProvider-35a3d264.mjs} +10 -10
- package/dist/sdk/{EcentricThreeDsProvider-9bf4643c.mjs → EcentricThreeDsProvider-74eed133.mjs} +2 -2
- package/dist/sdk/{EpnaThreeDsProvider-f4ab5593.mjs → EpnaThreeDsProvider-b6df78c5.mjs} +3 -3
- package/dist/sdk/{FlashBancThreeDsProvider-9a6d418c.mjs → FlashBancThreeDsProvider-3df034a9.mjs} +3 -3
- package/dist/sdk/{GPaymentsThreeDsProvider-992c1825.mjs → GPaymentsThreeDsProvider-76b5b155.mjs} +4 -4
- package/dist/sdk/{MetricsGlobalThreeDsProvider-fdada4dd.mjs → MetricsGlobalThreeDsProvider-0759c126.mjs} +9 -9
- package/dist/sdk/{NmiThreeDsProvider-8c8ab0f0.mjs → NmiThreeDsProvider-d7c2fa40.mjs} +3 -3
- package/dist/sdk/NuveiThreeDsProvider-98880e2a.mjs +182 -0
- package/dist/sdk/PayWayAppleButton-2cf0cfa8.mjs +115 -0
- package/dist/sdk/{PayabliThreeDsProvider-19d2e62a.mjs → PayabliThreeDsProvider-52cad496.mjs} +3 -3
- package/dist/sdk/{SkyBankThreeDsProvider-44644ee8.mjs → SkyBankThreeDsProvider-660cc141.mjs} +3 -3
- package/dist/sdk/{ThreeDsProvider.interface-da0ab2aa.mjs → ThreeDsProvider.interface-370c3a6b.mjs} +9 -3
- package/dist/sdk/cxpay-1176e55c.mjs +10 -0
- package/dist/sdk/{default-9ec42bc0.mjs → default-b65ba74a.mjs} +2 -2
- package/dist/sdk/{ecentric-fc332878.mjs → ecentric-4584ca5b.mjs} +3 -3
- package/dist/sdk/epna-10b7a0df.mjs +10 -0
- package/dist/sdk/flashbanc-fefb2593.mjs +10 -0
- package/dist/sdk/{gpayments-c0450b55.mjs → gpayments-67e01ddb.mjs} +3 -3
- package/dist/sdk/main-b24ebaf5.mjs +10164 -0
- package/dist/sdk/{metrics_global-3c9bd0de.mjs → metrics_global-7b40770c.mjs} +3 -3
- package/dist/sdk/nmi-de006b65.mjs +10 -0
- package/dist/sdk/{nuvei-3774bd45.mjs → nuvei-c6dc482d.mjs} +3 -3
- package/dist/sdk/payabli-8b3e26b9.mjs +10 -0
- package/dist/sdk/payfurl.es.js +1 -1
- package/dist/sdk/payfurl.umd.js +132 -33
- package/dist/sdk/payway_rest-e05888c3.mjs +8 -0
- package/dist/sdk/skybank-9335efb6.mjs +10 -0
- package/dist/sdk/style.css +1 -1
- package/package.json +2 -3
- package/dist/sdk/NuveiThreeDsProvider-cc515d25.mjs +0 -173
- package/dist/sdk/cxpay-a965ca2f.mjs +0 -10
- package/dist/sdk/epna-24e6dd6c.mjs +0 -10
- package/dist/sdk/flashbanc-49c4deb2.mjs +0 -10
- package/dist/sdk/main-6d84dc12.mjs +0 -14068
- package/dist/sdk/nmi-8aabbfd1.mjs +0 -10
- package/dist/sdk/payabli-d52e0c78.mjs +0 -10
- package/dist/sdk/skybank-f7d58ed5.mjs +0 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MetricsGlobalThreeDsProvider as r } from "./MetricsGlobalThreeDsProvider-
|
|
2
|
-
import "./DefaultThreeDsProvider-
|
|
3
|
-
import "./main-
|
|
1
|
+
import { MetricsGlobalThreeDsProvider as r } from "./MetricsGlobalThreeDsProvider-0759c126.mjs";
|
|
2
|
+
import "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
3
|
+
import "./main-b24ebaf5.mjs";
|
|
4
4
|
class i extends r {
|
|
5
5
|
getType() {
|
|
6
6
|
return "CxPay";
|
package/dist/sdk/{DefaultThreeDsProvider-e92310c2.mjs → DefaultThreeDsProvider-35a3d264.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var D = Object.defineProperty;
|
|
2
2
|
var u = (a, e, s) => e in a ? D(a, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[e] = s;
|
|
3
3
|
var o = (a, e, s) => (u(a, typeof e != "symbol" ? e + "" : e, s), s);
|
|
4
|
-
import { d as S, r as d, o as g, a as p, c as T, b as i, e as _, C as m, u as I, p as f, f as y, _ as A,
|
|
4
|
+
import { d as S, r as d, o as g, a as p, c as T, b as i, e as _, C as m, u as I, p as f, f as y, _ as A, j as v, T as C, h as E, F as R } from "./main-b24ebaf5.mjs";
|
|
5
5
|
const P = (a) => (f("data-v-c82daa22"), a = a(), y(), a), U = { class: "mask" }, $ = { class: "wrapper" }, L = { class: "container" }, b = /* @__PURE__ */ P(() => /* @__PURE__ */ i("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)), M = ["action"], w = ["value"], N = /* @__PURE__ */ S({
|
|
6
6
|
__name: "ThreeDsChallenge",
|
|
7
7
|
props: {
|
|
@@ -25,7 +25,7 @@ const P = (a) => (f("data-v-c82daa22"), a = a(), y(), a), U = { class: "mask" },
|
|
|
25
25
|
i("div", $, [
|
|
26
26
|
i("div", L, [
|
|
27
27
|
_(m, {
|
|
28
|
-
onClick: l[0] || (l[0] = (
|
|
28
|
+
onClick: l[0] || (l[0] = (H) => e("close")),
|
|
29
29
|
id: "3ds-challenge-close"
|
|
30
30
|
}),
|
|
31
31
|
b,
|
|
@@ -47,8 +47,8 @@ const P = (a) => (f("data-v-c82daa22"), a = a(), y(), a), U = { class: "mask" },
|
|
|
47
47
|
]));
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
const k = /* @__PURE__ */ A(N, [["__scopeId", "data-v-c82daa22"]]), O = "3ds_method_invocation_complete",
|
|
51
|
-
class
|
|
50
|
+
const k = /* @__PURE__ */ A(N, [["__scopeId", "data-v-c82daa22"]]), { hideSpinner: c, showSpinner: O } = v(), q = "3ds_method_invocation_complete", V = "3ds_challenge_complete";
|
|
51
|
+
class J {
|
|
52
52
|
constructor(e, s, t) {
|
|
53
53
|
o(this, "log");
|
|
54
54
|
o(this, "container");
|
|
@@ -138,7 +138,7 @@ class F {
|
|
|
138
138
|
return "";
|
|
139
139
|
}
|
|
140
140
|
onPreAuth() {
|
|
141
|
-
this.log(`[${this.getType()}][onPreAuth]`), this.threeDsProcessor && (
|
|
141
|
+
this.log(`[${this.getType()}][onPreAuth]`), this.threeDsProcessor && (O(), this.threeDsProcessor.onPreAuth(this.onInitAuthSuccess, this.onError), window.addEventListener("message", this.internalMessageHandler));
|
|
142
142
|
}
|
|
143
143
|
onAuth(e, s) {
|
|
144
144
|
var t;
|
|
@@ -163,11 +163,11 @@ class F {
|
|
|
163
163
|
messageHandler(e) {
|
|
164
164
|
var s, t;
|
|
165
165
|
if (!(!((s = e == null ? void 0 : e.data) != null && s.status) || ((t = e == null ? void 0 : e.data) == null ? void 0 : t.status) === C)) {
|
|
166
|
-
if (e.data.status ===
|
|
166
|
+
if (e.data.status === q) {
|
|
167
167
|
e.stopPropagation(), this.invocationComplete(e);
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
170
|
-
e.data.status ===
|
|
170
|
+
e.data.status === V && (e.stopPropagation(), this.challengeComplete(e));
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
invocationComplete(e) {
|
|
@@ -215,7 +215,7 @@ class F {
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
export {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
218
|
+
J as DefaultThreeDsProvider,
|
|
219
|
+
V as THREE_DS_CHALLENGE_COMPLETE,
|
|
220
|
+
q as THREE_DS_METHOD_INVOCATION_COMPLETE
|
|
221
221
|
};
|
package/dist/sdk/{EcentricThreeDsProvider-9bf4643c.mjs → EcentricThreeDsProvider-74eed133.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var c = Object.defineProperty;
|
|
2
2
|
var h = (t, s, e) => s in t ? c(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
|
|
3
3
|
var i = (t, s, e) => (h(t, typeof s != "symbol" ? s + "" : s, e), e);
|
|
4
|
-
import { DefaultThreeDsProvider as d } from "./DefaultThreeDsProvider-
|
|
5
|
-
import { d as p, r as u, o as _, a as D, c as m, b as r, e as g, C as S, u as y, p as f, f as T, _ as v,
|
|
4
|
+
import { DefaultThreeDsProvider as d } from "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
5
|
+
import { d as p, r as u, o as _, a as D, c as m, b as r, e as g, C as S, u as y, p as f, f as T, _ as v, h as C } from "./main-b24ebaf5.mjs";
|
|
6
6
|
const I = (t) => (f("data-v-82a75009"), t = t(), T(), t), P = { class: "mask" }, A = { class: "wrapper" }, V = { class: "container" }, E = /* @__PURE__ */ I(() => /* @__PURE__ */ r("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1)), $ = ["action"], k = ["value"], x = /* @__PURE__ */ p({
|
|
7
7
|
__name: "ecentric",
|
|
8
8
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-
|
|
2
|
-
import "./DefaultThreeDsProvider-
|
|
3
|
-
import "./main-
|
|
1
|
+
import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-0759c126.mjs";
|
|
2
|
+
import "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
3
|
+
import "./main-b24ebaf5.mjs";
|
|
4
4
|
class i extends e {
|
|
5
5
|
getType() {
|
|
6
6
|
return "EPNA";
|
package/dist/sdk/{FlashBancThreeDsProvider-9a6d418c.mjs → FlashBancThreeDsProvider-3df034a9.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MetricsGlobalThreeDsProvider as r } from "./MetricsGlobalThreeDsProvider-
|
|
2
|
-
import "./DefaultThreeDsProvider-
|
|
3
|
-
import "./main-
|
|
1
|
+
import { MetricsGlobalThreeDsProvider as r } from "./MetricsGlobalThreeDsProvider-0759c126.mjs";
|
|
2
|
+
import "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
3
|
+
import "./main-b24ebaf5.mjs";
|
|
4
4
|
class s extends r {
|
|
5
5
|
getType() {
|
|
6
6
|
return "FlashBanc";
|
package/dist/sdk/{GPaymentsThreeDsProvider-992c1825.mjs → GPaymentsThreeDsProvider-76b5b155.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var i = Object.defineProperty;
|
|
2
2
|
var l = (n, r, e) => r in n ? i(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var o = (n, r, e) => (l(n, typeof r != "symbol" ? r + "" : r, e), e);
|
|
4
|
-
import { DefaultThreeDsProvider as c } from "./DefaultThreeDsProvider-
|
|
5
|
-
import { d as u, a as d, c as p, b as a, n as h, _
|
|
4
|
+
import { DefaultThreeDsProvider as c } from "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
5
|
+
import { d as u, a as d, c as p, b as a, n as h, _, h as g } from "./main-b24ebaf5.mjs";
|
|
6
6
|
const m = { class: "mask" }, D = { class: "wrapper" }, S = ["src"], y = /* @__PURE__ */ u({
|
|
7
7
|
__name: "GPayments",
|
|
8
8
|
props: {
|
|
@@ -33,7 +33,7 @@ const m = { class: "mask" }, D = { class: "wrapper" }, S = ["src"], y = /* @__PU
|
|
|
33
33
|
]));
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
const f = /* @__PURE__ */
|
|
36
|
+
const f = /* @__PURE__ */ _(y, [["__scopeId", "data-v-9b0ef3a8"]]);
|
|
37
37
|
class A extends c {
|
|
38
38
|
constructor() {
|
|
39
39
|
super(...arguments);
|
|
@@ -74,7 +74,7 @@ class A extends c {
|
|
|
74
74
|
}
|
|
75
75
|
doChallenge(e) {
|
|
76
76
|
this.log(`[${this.getType()}][doChallenge]`);
|
|
77
|
-
const { destroy: s } =
|
|
77
|
+
const { destroy: s } = g({
|
|
78
78
|
el: document.body,
|
|
79
79
|
component: f,
|
|
80
80
|
props: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var l = (o, n, t) => (
|
|
4
|
-
import { DefaultThreeDsProvider as P } from "./DefaultThreeDsProvider-
|
|
5
|
-
import { d as f, r as v, o as E, i as A, w as b, v as T, a as I, c as x, b as p, e as G, C as L, p as N, f as M, _ as $,
|
|
1
|
+
var S = Object.defineProperty;
|
|
2
|
+
var w = (o, n, t) => n in o ? S(o, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[n] = t;
|
|
3
|
+
var l = (o, n, t) => (w(o, typeof n != "symbol" ? n + "" : n, t), t);
|
|
4
|
+
import { DefaultThreeDsProvider as P } from "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
5
|
+
import { d as f, r as v, o as E, i as A, w as b, v as T, a as I, c as x, b as p, e as G, C as L, p as N, f as M, _ as $, j as H, s as g, h as k } from "./main-b24ebaf5.mjs";
|
|
6
6
|
const O = (o) => (N("data-v-8a0b6dcb"), o = o(), M(), o), j = { class: "mask" }, B = { class: "wrapper" }, F = { class: "container" }, U = /* @__PURE__ */ O(() => /* @__PURE__ */ p("div", { id: "ThreeDsChallengeIFrame" }, null, -1)), W = /* @__PURE__ */ f({
|
|
7
7
|
__name: "MetricsGlobalThreeDsChallenge",
|
|
8
8
|
emits: ["close", "submit"],
|
|
@@ -31,8 +31,8 @@ const O = (o) => (N("data-v-8a0b6dcb"), o = o(), M(), o), j = { class: "mask" },
|
|
|
31
31
|
]);
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
const V = /* @__PURE__ */ $(W, [["__scopeId", "data-v-8a0b6dcb"]]), m = 5;
|
|
35
|
-
class
|
|
34
|
+
const V = /* @__PURE__ */ $(W, [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: c, showSpinner: K } = H(), m = 5;
|
|
35
|
+
class J extends P {
|
|
36
36
|
constructor(t, e, s) {
|
|
37
37
|
var r;
|
|
38
38
|
super(t, e, s);
|
|
@@ -76,7 +76,7 @@ class z extends P {
|
|
|
76
76
|
c(), g(this.container, "Payment information is missing");
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
K();
|
|
80
80
|
const e = (y = this.threeDsProcessor) == null ? void 0 : y.getAddressInfo(), s = t.expiryDate.length === 4 ? t.expiryDate[2] + t.expiryDate[3] : "", r = t.expiryDate.length === 4 ? t.expiryDate[0] + t.expiryDate[1] : "", u = {
|
|
81
81
|
cardNumber: t.cardNumber,
|
|
82
82
|
cardExpMonth: s,
|
|
@@ -149,5 +149,5 @@ class z extends P {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
export {
|
|
152
|
-
|
|
152
|
+
J as MetricsGlobalThreeDsProvider
|
|
153
153
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-
|
|
2
|
-
import "./DefaultThreeDsProvider-
|
|
3
|
-
import "./main-
|
|
1
|
+
import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-0759c126.mjs";
|
|
2
|
+
import "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
3
|
+
import "./main-b24ebaf5.mjs";
|
|
4
4
|
class m extends e {
|
|
5
5
|
getType() {
|
|
6
6
|
return "NMI";
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var p = (n, r, t) => r in n ? d(n, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[r] = t;
|
|
3
|
+
var l = (n, r, t) => (p(n, typeof r != "symbol" ? r + "" : r, t), t);
|
|
4
|
+
import { d as m, j as u, o as g, a as D, c as S, p as _, f, b as h, _ as y, s as P, h as T } from "./main-b24ebaf5.mjs";
|
|
5
|
+
import { DefaultThreeDsProvider as I, THREE_DS_METHOD_INVOCATION_COMPLETE as N, THREE_DS_CHALLENGE_COMPLETE as C } from "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
6
|
+
const b = (n) => (_("data-v-3b52be97"), n = n(), f(), n), v = { class: "mask" }, E = /* @__PURE__ */ b(() => /* @__PURE__ */ h("div", { class: "wrapper" }, [
|
|
7
|
+
/* @__PURE__ */ h("div", { class: "container" })
|
|
8
|
+
], -1)), x = [
|
|
9
|
+
E
|
|
10
|
+
], V = /* @__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 r = n, { hideSpinner: t, showSpinner: a } = u();
|
|
30
|
+
g(() => {
|
|
31
|
+
a();
|
|
32
|
+
const s = document.createElement("script");
|
|
33
|
+
s.type = "text/javascript", s.src = "https://cdn.safecharge.com/safecharge_resources/v1/websdk/safecharge.js", s.onload = () => {
|
|
34
|
+
const o = new MutationObserver(function() {
|
|
35
|
+
document.getElementsByClassName("sfcModal-dialog")[0] && (t(), o.disconnect());
|
|
36
|
+
}), i = { childList: !0 }, c = document.querySelector("body");
|
|
37
|
+
o.observe(c, i), e();
|
|
38
|
+
}, document.head.appendChild(s);
|
|
39
|
+
});
|
|
40
|
+
function e() {
|
|
41
|
+
var s = SafeCharge({
|
|
42
|
+
env: r.env,
|
|
43
|
+
// Nuvei API environment - 'int' (integration) or 'prod' (production - default if omitted)
|
|
44
|
+
merchantId: r.merchantId,
|
|
45
|
+
//as assigned by Nuvei
|
|
46
|
+
merchantSiteId: r.merchantSiteId
|
|
47
|
+
// your Merchant Site ID provided by Nuvei
|
|
48
|
+
});
|
|
49
|
+
s.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
|
+
}), s.authenticate3d({
|
|
59
|
+
sessionToken: r.sessionToken,
|
|
60
|
+
// received from openOrder API
|
|
61
|
+
paymentOption: {
|
|
62
|
+
card: {
|
|
63
|
+
cardNumber: r.cardNumber,
|
|
64
|
+
cardHolderName: r.cardHolderName,
|
|
65
|
+
expirationMonth: r.expirationMonth,
|
|
66
|
+
expirationYear: r.expirationYear,
|
|
67
|
+
CVV: r.CVV
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
billingAddress: {
|
|
71
|
+
firstName: r.firstName,
|
|
72
|
+
lastName: r.lastName,
|
|
73
|
+
email: r.email,
|
|
74
|
+
country: r.country
|
|
75
|
+
}
|
|
76
|
+
}, function(o) {
|
|
77
|
+
window.postMessage({ status: "3ds_challenge_complete", cres: o }, "*");
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return (s, o) => (D(), S("div", v, x));
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
const A = /* @__PURE__ */ y(V, [["__scopeId", "data-v-3b52be97"]]), { hideSpinner: R } = u();
|
|
84
|
+
class O extends I {
|
|
85
|
+
constructor() {
|
|
86
|
+
super(...arguments);
|
|
87
|
+
l(this, "_paResPayload", null);
|
|
88
|
+
l(this, "onSuccess", (t, a) => {
|
|
89
|
+
var s, o;
|
|
90
|
+
this.closeChallenge(), R();
|
|
91
|
+
const e = JSON.parse(a);
|
|
92
|
+
e.authenticationValue ? (s = this.threeDsProcessor) == null || s.onSuccess(e) : (this.log(`[${this.getType()}][_onSuccess] 3D Secure failed`, e), (o = this.threeDsProcessor) == null || o.onError({ error: "3D Secure failed" }));
|
|
93
|
+
});
|
|
94
|
+
l(this, "onDoAuthSuccess", (t, a) => {
|
|
95
|
+
var s, o, i;
|
|
96
|
+
const e = JSON.parse(a);
|
|
97
|
+
if (this.log(`[${this.getType()}][onDoAuthSuccess]`, e), !e.transStatus || !e.authenticationValue) {
|
|
98
|
+
this.onError(t, "No transStatus specified");
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
switch (e.transStatus) {
|
|
102
|
+
case "C":
|
|
103
|
+
this.doNuveiChallenge(e.authenticationValue, (s = this.threeDsProcessor) == null ? void 0 : s.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
|
+
onPreAuth() {
|
|
132
|
+
var t, a;
|
|
133
|
+
this.log(`[${this.getType()}]: onPreAuth`), (t = this.threeDsProcessor) != null && t.getTokenId() ? (a = this.threeDsProcessor) == null || a.getCardDetails(this.threeDsProcessor.getProviderId(), this.threeDsProcessor.getTokenId(), (e) => {
|
|
134
|
+
var s;
|
|
135
|
+
(s = this.threeDsProcessor) == null || s.setPaymentInfo(e), super.onPreAuth();
|
|
136
|
+
}, () => {
|
|
137
|
+
P(this.container, "Unable to get card information");
|
|
138
|
+
}) : super.onPreAuth();
|
|
139
|
+
}
|
|
140
|
+
onPostAuth() {
|
|
141
|
+
var t;
|
|
142
|
+
this.log(`[${this.getType()}][onAuth] Do Post Authentication for transId`, this.threeDSServerTransID, this._paResPayload), (t = this.threeDsProcessor) == null || t.onPostAuth({
|
|
143
|
+
threeDSServerTransID: this.threeDSServerTransID,
|
|
144
|
+
authenticationValue: this._paResPayload.cavv,
|
|
145
|
+
eci: this._paResPayload.eci,
|
|
146
|
+
dsTransID: this._paResPayload.dsTransID,
|
|
147
|
+
threeDsVersion: this._paResPayload.threeDVersion,
|
|
148
|
+
xid: this._paResPayload.xid
|
|
149
|
+
}, this.onSuccess, this.onError);
|
|
150
|
+
}
|
|
151
|
+
doNuveiChallenge(t, a, e) {
|
|
152
|
+
var i;
|
|
153
|
+
const s = JSON.parse(t);
|
|
154
|
+
(s === null || !s.merchantId || !s.merchantSiteId) && ((i = this.threeDsProcessor) == null || i.onError({ error: "3D Secure failed" })), a && (s.firstName = a.firstName, s.lastName = a.lastName, s.email = a.email, s.country = a.country), e && (s.cardNumber = e.cardNumber, s.cardHolderName = e.cardholder, s.expirationMonth = e.expiryDate.substring(2, 4), s.expirationYear = e.expiryDate.substring(0, 2), s.CVV = e.ccv);
|
|
155
|
+
const { destroy: o } = T({
|
|
156
|
+
el: document.body,
|
|
157
|
+
component: A,
|
|
158
|
+
props: s,
|
|
159
|
+
on: {
|
|
160
|
+
close: () => {
|
|
161
|
+
var c;
|
|
162
|
+
o(), this.threeDSDestroy = () => {
|
|
163
|
+
}, (c = this.threeDsProcessor) == null || c.onError({ error: "Challenge cancelled" });
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
this.threeDSDestroy = o;
|
|
168
|
+
}
|
|
169
|
+
messageHandler(t) {
|
|
170
|
+
var a, e, s;
|
|
171
|
+
if ((a = t == null ? void 0 : t.data) != null && a.status) {
|
|
172
|
+
if (t.data.status === N) {
|
|
173
|
+
this.log(`[${this.getType()}][messageHandler] 3Ds Method invocation complete`), t.stopPropagation(), this.onAuth(!0, "");
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
t.data.status === C && (this.log(`[${this.getType()}][messageHandler] 3Ds Challenge complete`, t.data), t.stopPropagation(), this.closeChallenge(), t.data.cres && ((e = t.data.cres) == null ? void 0 : e.result) === "APPROVED" && ((s = t.data.cres) == null ? void 0 : s.errCode) === "0" ? (this._paResPayload = t.data.cres, this.onPostAuth()) : (this.log(`[${this.getType()}][messageHandler] Failed 3DS Challenge`, t.data), this.onError(400, "Failed 3DS Challenge")));
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
export {
|
|
181
|
+
O as NuveiThreeDsProvider
|
|
182
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var p = (r, t, o) => t in r ? l(r, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[t] = o;
|
|
3
|
+
var n = (r, t, o) => (p(r, typeof t != "symbol" ? t + "" : t, o), o);
|
|
4
|
+
import { R as d, g as y, H as m } from "./main-b24ebaf5.mjs";
|
|
5
|
+
const h = {
|
|
6
|
+
CHECKOUT: "CHECKOUT",
|
|
7
|
+
CHARGE: "CHARGE"
|
|
8
|
+
}, u = (r) => ({
|
|
9
|
+
[h.CHECKOUT]: {
|
|
10
|
+
url: r + "/payment_method/checkout",
|
|
11
|
+
method: "POST"
|
|
12
|
+
},
|
|
13
|
+
[h.CHARGE]: {
|
|
14
|
+
url: r + "/charge/checkout",
|
|
15
|
+
method: "POST"
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
class C {
|
|
19
|
+
constructor(t, o, s, i, a, e) {
|
|
20
|
+
n(this, "log");
|
|
21
|
+
n(this, "container");
|
|
22
|
+
n(this, "button", null);
|
|
23
|
+
n(this, "providerId");
|
|
24
|
+
n(this, "apiUrl");
|
|
25
|
+
n(this, "amount");
|
|
26
|
+
n(this, "currency");
|
|
27
|
+
n(this, "options");
|
|
28
|
+
n(this, "clientParameters");
|
|
29
|
+
n(this, "buttonId", "apple-pay-payway-button");
|
|
30
|
+
n(this, "onLoad", () => {
|
|
31
|
+
});
|
|
32
|
+
n(this, "onSuccess");
|
|
33
|
+
n(this, "onFailure");
|
|
34
|
+
n(this, "httpInvoker", null);
|
|
35
|
+
this.log = t, this.apiUrl = e.apiUrl, this.container = o || document.body, this.options = e.options, this.clientParameters = e.clientParameters, this.providerId = e.providerId, this.amount = Number(i), this.currency = a, this.providerId = s, this.onSuccess = e.onSuccess || null, this.onFailure = e.onFailure || null;
|
|
36
|
+
const c = new d(e.environment, y(e.publicKey));
|
|
37
|
+
this.httpInvoker = new m(e.publicKey, e.version, c), this.init();
|
|
38
|
+
}
|
|
39
|
+
draw() {
|
|
40
|
+
const t = () => {
|
|
41
|
+
this.onLoad = () => {
|
|
42
|
+
};
|
|
43
|
+
const o = {
|
|
44
|
+
container: this.buttonId,
|
|
45
|
+
publishableApiKey: this.clientParameters.PublishableApiKey,
|
|
46
|
+
principalAmount: this.amount,
|
|
47
|
+
currency: String(this.currency).toLowerCase(),
|
|
48
|
+
buttonMode: "callback"
|
|
49
|
+
};
|
|
50
|
+
this.log("[createPaymentRequestButton]", o), window.payway.createPaymentRequestButton(o, (s, i) => {
|
|
51
|
+
var a;
|
|
52
|
+
if (this.log("[createPaymentRequestButton]", s, i), s) {
|
|
53
|
+
(a = this.onFailure) == null || a.call(this, s);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
this.checkout(i.singleUseTokenId);
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
window.payway ? t() : this.onLoad = t;
|
|
60
|
+
}
|
|
61
|
+
show() {
|
|
62
|
+
this.button && (this.button.style.display = "block");
|
|
63
|
+
}
|
|
64
|
+
hide() {
|
|
65
|
+
this.button && (this.button.style.display = "none");
|
|
66
|
+
}
|
|
67
|
+
init() {
|
|
68
|
+
const t = document.createElement("div");
|
|
69
|
+
t.id = this.buttonId, this.container.appendChild(t), this.button = t, this.initScript();
|
|
70
|
+
}
|
|
71
|
+
initScript() {
|
|
72
|
+
const t = document.createElement("script");
|
|
73
|
+
t.src = "https://api.payway.com.au/rest/v1/payway.js", t.onload = () => {
|
|
74
|
+
this.onLoad && this.onLoad();
|
|
75
|
+
}, document.head.appendChild(t);
|
|
76
|
+
}
|
|
77
|
+
checkout(t) {
|
|
78
|
+
var s;
|
|
79
|
+
const o = {
|
|
80
|
+
providerId: this.providerId,
|
|
81
|
+
amount: this.amount,
|
|
82
|
+
currency: this.currency,
|
|
83
|
+
options: {
|
|
84
|
+
ProviderToken: t
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
this.log("[PayWayAppleButton][checkout]", o), (s = this.httpInvoker) == null || s.invoke(u(this.apiUrl)[h.CHECKOUT].url, u(this.apiUrl)[h.CHECKOUT].method, JSON.stringify(o), (i, a) => {
|
|
88
|
+
this.log("[PayWayAppleButton][checkout]: successCheckoutHandler", i, a);
|
|
89
|
+
const e = JSON.parse(a), c = JSON.parse(window.atob(e.checkoutData));
|
|
90
|
+
this.log("[PayWayAppleButton][checkout]: decodedData", c), this.charge(c.checkoutId);
|
|
91
|
+
}, (i, a) => {
|
|
92
|
+
var c;
|
|
93
|
+
this.log("[PayWayAppleButton][checkout]: failureCheckoutHandler", i, a);
|
|
94
|
+
const e = JSON.parse(a);
|
|
95
|
+
(c = this.onFailure) == null || c.call(this, { error: e.message });
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
charge(t) {
|
|
99
|
+
var o;
|
|
100
|
+
this.log("[PayWayAppleButton][charge]", { checkoutId: t }), (o = this.httpInvoker) == null || o.invoke(u(this.apiUrl)[h.CHARGE].url, u(this.apiUrl)[h.CHARGE].method, JSON.stringify({ checkoutId: t }), (s, i) => {
|
|
101
|
+
var e;
|
|
102
|
+
this.log("[PayWayAppleButton][charge]: successChargeHandler", s, i);
|
|
103
|
+
const a = JSON.parse(i);
|
|
104
|
+
(e = this.onSuccess) == null || e.call(this, a || i);
|
|
105
|
+
}, (s, i) => {
|
|
106
|
+
var e;
|
|
107
|
+
this.log("[PayWayAppleButton][charge]: failureChargeHandler", s, i);
|
|
108
|
+
const a = JSON.parse(i);
|
|
109
|
+
(e = this.onFailure) == null || e.call(this, { error: a.message });
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
C as PayWayAppleButton
|
|
115
|
+
};
|
package/dist/sdk/{PayabliThreeDsProvider-19d2e62a.mjs → PayabliThreeDsProvider-52cad496.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-
|
|
2
|
-
import "./DefaultThreeDsProvider-
|
|
3
|
-
import "./main-
|
|
1
|
+
import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-0759c126.mjs";
|
|
2
|
+
import "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
3
|
+
import "./main-b24ebaf5.mjs";
|
|
4
4
|
class i extends e {
|
|
5
5
|
getType() {
|
|
6
6
|
return "Payabli";
|
package/dist/sdk/{SkyBankThreeDsProvider-44644ee8.mjs → SkyBankThreeDsProvider-660cc141.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-
|
|
2
|
-
import "./DefaultThreeDsProvider-
|
|
3
|
-
import "./main-
|
|
1
|
+
import { MetricsGlobalThreeDsProvider as e } from "./MetricsGlobalThreeDsProvider-0759c126.mjs";
|
|
2
|
+
import "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
3
|
+
import "./main-b24ebaf5.mjs";
|
|
4
4
|
class s extends e {
|
|
5
5
|
getType() {
|
|
6
6
|
return "SkyBank";
|
package/dist/sdk/{ThreeDsProvider.interface-da0ab2aa.mjs → ThreeDsProvider.interface-370c3a6b.mjs}
RENAMED
|
@@ -8,11 +8,17 @@ const e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8
8
|
__proto__: null
|
|
9
9
|
}, Symbol.toStringTag, { value: "Module" })), l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10
10
|
__proto__: null
|
|
11
|
+
}, Symbol.toStringTag, { value: "Module" })), n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12
|
+
__proto__: null
|
|
13
|
+
}, Symbol.toStringTag, { value: "Module" })), _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14
|
+
__proto__: null
|
|
11
15
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
12
16
|
export {
|
|
13
|
-
|
|
17
|
+
e as A,
|
|
18
|
+
l as T,
|
|
14
19
|
t as a,
|
|
15
20
|
r as b,
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
n as c,
|
|
22
|
+
_ as d,
|
|
23
|
+
o as f
|
|
18
24
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CxPayThreeDsProvider as e } from "./CxPayThreeDsProvider-8d60524d.mjs";
|
|
2
|
+
import "./MetricsGlobalThreeDsProvider-0759c126.mjs";
|
|
3
|
+
import "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
4
|
+
import "./main-b24ebaf5.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-35a3d264.mjs";
|
|
2
|
+
import "./main-b24ebaf5.mjs";
|
|
3
3
|
function a(e, r, t) {
|
|
4
4
|
return new o(e, r, t);
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EcentricThreeDsProvider as i } from "./EcentricThreeDsProvider-
|
|
2
|
-
import "./DefaultThreeDsProvider-
|
|
3
|
-
import "./main-
|
|
1
|
+
import { EcentricThreeDsProvider as i } from "./EcentricThreeDsProvider-74eed133.mjs";
|
|
2
|
+
import "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
3
|
+
import "./main-b24ebaf5.mjs";
|
|
4
4
|
function m(r, e, t) {
|
|
5
5
|
return new i(r, e, t);
|
|
6
6
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EpnaThreeDsProvider as t } from "./EpnaThreeDsProvider-b6df78c5.mjs";
|
|
2
|
+
import "./MetricsGlobalThreeDsProvider-0759c126.mjs";
|
|
3
|
+
import "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
4
|
+
import "./main-b24ebaf5.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-3df034a9.mjs";
|
|
2
|
+
import "./MetricsGlobalThreeDsProvider-0759c126.mjs";
|
|
3
|
+
import "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
4
|
+
import "./main-b24ebaf5.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-76b5b155.mjs";
|
|
2
|
+
import "./DefaultThreeDsProvider-35a3d264.mjs";
|
|
3
|
+
import "./main-b24ebaf5.mjs";
|
|
4
4
|
function p(r, e, t) {
|
|
5
5
|
return new o(r, e, t);
|
|
6
6
|
}
|