@payfurl/client 4.11.1 → 4.11.3
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/CHANGELOG.md +23 -0
- package/README.md +23 -0
- package/dist/sdk/{CloseIcon-Ejad61tT.js → CloseIcon-Dkap5zUl.js} +15 -15
- package/dist/sdk/{DefaultThreeDsProvider-bLoDSnkd.js → DefaultThreeDsProvider-D0iYIu6R.js} +22 -19
- package/dist/sdk/{MetricsGlobalThreeDsProvider-C93ttqbB.js → MetricsGlobalThreeDsProvider-BiILkcHI.js} +14 -14
- package/dist/sdk/{PayWayAppleButton-B1Ttj4J_.js → PayWayAppleButton-DfgBdc_z.js} +16 -16
- package/dist/sdk/{alerts-1YSRy5iI.js → alerts-CWLXzX6j.js} +7 -7
- package/dist/sdk/{cxpay-DblHb5vN.js → cxpay-CYbHYLG3.js} +1 -1
- package/dist/sdk/{default-C7f86Fx-.js → default-zi2wr9FU.js} +1 -1
- package/dist/sdk/{ecentric-B3UohyO_.js → ecentric-BKZbgUUA.js} +12 -12
- package/dist/sdk/{epna-DwUg2IlB.js → epna-BM5bSJk1.js} +1 -1
- package/dist/sdk/{flashbanc-LXs8bahL.js → flashbanc-CF9FiNJl.js} +1 -1
- package/dist/sdk/{forter-CLFaJUYa.js → forter-DJAURi8-.js} +2 -2
- package/dist/sdk/{gpayments-DoZug3PV.js → gpayments-BI4ClQBQ.js} +13 -13
- package/dist/sdk/{metrics_global-BM-ooge-.js → metrics_global-DuXa4GNp.js} +1 -1
- package/dist/sdk/{nmi-BA3ZTdQa.js → nmi-BtGmIJu6.js} +1 -1
- package/dist/sdk/{nuvei-DIWsLlLz.js → nuvei-DV30sIgG.js} +33 -33
- package/dist/sdk/{payabli-DgrTI1Et.js → payabli-8yAmXU9j.js} +1 -1
- package/dist/sdk/payfurl.es.js +1491 -1528
- package/dist/sdk/payfurl.umd.js +9 -8
- package/dist/sdk/{payglocal-ezp0MsaZ.js → payglocal-4P2oZpaS.js} +17 -17
- package/dist/sdk/{payway_rest-4Pjb1c7k.js → payway_rest-Cmi8SOvm.js} +1 -1
- package/dist/sdk/{skybank-BgDLlFXX.js → skybank-Czn5pUK_.js} +1 -1
- package/dist/sdk/strings-yAlHZQqv.js +322 -0
- package/package.json +1 -1
- package/dist/sdk/strings-DyifLS9r.js +0 -175
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,29 @@ version 4.9.3.
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## 4.11.3 (2026-11-17)
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- The error reports the SDK sends to payFURL now include the page's address without its query string or fragment,
|
|
14
|
+
a random ID for the page visit, and the error's stack trace. Card details are still never included. Each error is
|
|
15
|
+
sent once per page, and an error thrown by your own `onSuccess`, `onFailure`, `onLoaded`, `onValidate` or
|
|
16
|
+
`onValidationStatusChange` handler is no longer reported as an SDK error. Your handler's error still reaches the
|
|
17
|
+
browser as before.
|
|
18
|
+
- The SDK now also reports payment failures you could see but payFURL could not: API requests that fail with no
|
|
19
|
+
response or a server error, the card form not loading, 3-D Secure failures, and Apple Pay, Google Pay or PayPal
|
|
20
|
+
failing to load.
|
|
21
|
+
|
|
22
|
+
## 4.11.2 (2026-11-12)
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- When the bank's 3-D Secure answer for a card is a failure, the card is still submitted to payFURL, so the failure
|
|
27
|
+
and its 3-D Secure result now show on the dashboard's Tokenise Failures page. The shopper sees the same message,
|
|
28
|
+
and `onFailure` gets the same `error` and `errorDetails.reason` as before.
|
|
29
|
+
- `isApplePayAvailable()` is now documented to work before `init()`, with no public key, as it already did:
|
|
30
|
+
you can decide whether to offer Apple Pay before you set up the SDK. No upgrade is needed for this.
|
|
31
|
+
|
|
9
32
|
## 4.11.1 (2026-11-11)
|
|
10
33
|
|
|
11
34
|
### Added
|
package/README.md
CHANGED
|
@@ -103,6 +103,29 @@ script on `assets.payfurl.com` share version numbers, so this covers both. The c
|
|
|
103
103
|
version 4.9.3.
|
|
104
104
|
|
|
105
105
|
|
|
106
|
+
### 4.11.3 (2026-11-17)
|
|
107
|
+
|
|
108
|
+
#### Changed
|
|
109
|
+
|
|
110
|
+
- The error reports the SDK sends to payFURL now include the page's address without its query string or fragment,
|
|
111
|
+
a random ID for the page visit, and the error's stack trace. Card details are still never included. Each error is
|
|
112
|
+
sent once per page, and an error thrown by your own `onSuccess`, `onFailure`, `onLoaded`, `onValidate` or
|
|
113
|
+
`onValidationStatusChange` handler is no longer reported as an SDK error. Your handler's error still reaches the
|
|
114
|
+
browser as before.
|
|
115
|
+
- The SDK now also reports payment failures you could see but payFURL could not: API requests that fail with no
|
|
116
|
+
response or a server error, the card form not loading, 3-D Secure failures, and Apple Pay, Google Pay or PayPal
|
|
117
|
+
failing to load.
|
|
118
|
+
|
|
119
|
+
### 4.11.2 (2026-11-12)
|
|
120
|
+
|
|
121
|
+
#### Changed
|
|
122
|
+
|
|
123
|
+
- When the bank's 3-D Secure answer for a card is a failure, the card is still submitted to payFURL, so the failure
|
|
124
|
+
and its 3-D Secure result now show on the dashboard's Tokenise Failures page. The shopper sees the same message,
|
|
125
|
+
and `onFailure` gets the same `error` and `errorDetails.reason` as before.
|
|
126
|
+
- `isApplePayAvailable()` is now documented to work before `init()`, with no public key, as it already did:
|
|
127
|
+
you can decide whether to offer Apple Pay before you set up the SDK. No upgrade is needed for this.
|
|
128
|
+
|
|
106
129
|
### 4.11.1 (2026-11-11)
|
|
107
130
|
|
|
108
131
|
#### Added
|
|
@@ -3460,32 +3460,32 @@ var ss = (e, t) => {
|
|
|
3460
3460
|
X("div")
|
|
3461
3461
|
], -1)]));
|
|
3462
3462
|
}
|
|
3463
|
-
}), [["__scopeId", "data-v-2b4dad6b"]]), fs = "compact", ps = "payfurl-init", ms = "payfurl-payment-method-unavailable", hs = "init-card-form", gs = "checkout-ready", _s = "submit-card-form", vs = "tokenise-card-form", ys = "request-card", bs = "card-details", xs = "secure-orchestrator-ready", Ss = "secure-orchestrator-submit", Cs = "secure-orchestrator-submit-secondary-3ds", ws = "secure-orchestrator-tokenise", Ts = "secure-orchestrator-failure", Es = "secure-orchestrator-update-state", Ds = "secure-orchestrator-click-to-pay-card", Os = "secure-orchestrator-click-to-pay-new-card", ks = "secure-orchestrator-show-challenge", As = "secure-orchestrator-hide-challenge", js = "secure-orchestrator-three-ds-progress", Ms = "iframe-has-changed", Ns = "show-spinner", Ps = "hide-spinner", Fs = "set-amount", Is = "set-currency", Ls = "set-email", Rs = "set-billing-address", zs = "set-customer-info", Bs = "set-order-info", Vs = "tokenise-card-success", Hs = "tokenise-card-failure", Us = "click2pay-cards", Ws = "click2pay-remember-me", Gs = "click2pay-show-learn-more", Ks = "show-card-form", qs = "start-loading-card-form", Js = "stop-loading-card-form", Ys = "pause-loading-card-form", Xs = "unpause-loading-card-form", Zs = "click2pay-change-user", Qs = "click2pay-stop-using", $s = "click2pay-update-available-card-brands", ec = "card-form-error", tc = "card-form-info-message", nc = "card-form-validation-error", rc = "card-form-validation-status-change", ic = "Payment Details Collected", ac = "3D Secure required", oc = "3D Secure failed", sc = "Your bank couldn't verify this card. Please try again or use a different card.", cc = "Unable to process payment details", $ = null;
|
|
3464
|
-
function
|
|
3465
|
-
window.self === window.top ? ($ ||
|
|
3463
|
+
}), [["__scopeId", "data-v-2b4dad6b"]]), fs = "compact", ps = "payfurl-init", ms = "payfurl-payment-method-unavailable", hs = "init-card-form", gs = "checkout-ready", _s = "submit-card-form", vs = "tokenise-card-form", ys = "request-card", bs = "card-details", xs = "secure-orchestrator-ready", Ss = "secure-orchestrator-submit", Cs = "secure-orchestrator-submit-secondary-3ds", ws = "secure-orchestrator-tokenise", Ts = "secure-orchestrator-failure", Es = "secure-orchestrator-update-state", Ds = "secure-orchestrator-click-to-pay-card", Os = "secure-orchestrator-click-to-pay-new-card", ks = "secure-orchestrator-show-challenge", As = "secure-orchestrator-hide-challenge", js = "secure-orchestrator-three-ds-progress", Ms = "iframe-has-changed", Ns = "show-spinner", Ps = "hide-spinner", Fs = "set-amount", Is = "set-currency", Ls = "set-email", Rs = "set-billing-address", zs = "set-customer-info", Bs = "set-order-info", Vs = "tokenise-card-success", Hs = "tokenise-card-failure", Us = "click2pay-cards", Ws = "click2pay-remember-me", Gs = "click2pay-show-learn-more", Ks = "show-card-form", qs = "start-loading-card-form", Js = "stop-loading-card-form", Ys = "pause-loading-card-form", Xs = "unpause-loading-card-form", Zs = "click2pay-change-user", Qs = "click2pay-stop-using", $s = "click2pay-update-available-card-brands", ec = "card-form-error", tc = "card-form-info-message", nc = "card-form-validation-error", rc = "card-form-validation-status-change", ic = "Payment Details Collected", ac = "3D Secure required", oc = "3D Secure failed", sc = "Your bank couldn't verify this card. Please try again or use a different card.", cc = "[shopper][3ds] failed", lc = "Unable to process payment details", uc = "Please use another card or use an alternative payment method", $ = null;
|
|
3464
|
+
function dc() {
|
|
3465
|
+
window.self === window.top ? ($ || pc(), $ && ($.style.display = "none")) : window.parent.postMessage({ status: Ps }, "*");
|
|
3466
3466
|
}
|
|
3467
|
-
function
|
|
3468
|
-
window.self === window.top ? ($ ||
|
|
3467
|
+
function fc() {
|
|
3468
|
+
window.self === window.top ? ($ || pc(), $ && ($.style.display = "block")) : window.parent.postMessage({ status: Ns }, "*");
|
|
3469
3469
|
}
|
|
3470
|
-
function
|
|
3470
|
+
function pc() {
|
|
3471
3471
|
$ = document.getElementById("payfurl-spinner"), !$ && document.body && ($ = document.createElement("div"), $.id = "payfurl-spinner", $.style.display = "none", document.body.appendChild($), Wo({
|
|
3472
3472
|
el: $,
|
|
3473
3473
|
component: ds
|
|
3474
3474
|
}));
|
|
3475
3475
|
}
|
|
3476
|
-
function
|
|
3477
|
-
return window.self === window.top &&
|
|
3478
|
-
showSpinner:
|
|
3479
|
-
hideSpinner:
|
|
3476
|
+
function mc() {
|
|
3477
|
+
return window.self === window.top && pc(), {
|
|
3478
|
+
showSpinner: fc,
|
|
3479
|
+
hideSpinner: dc
|
|
3480
3480
|
};
|
|
3481
3481
|
}
|
|
3482
3482
|
// src/components/CloseIcon.vue
|
|
3483
|
-
var
|
|
3483
|
+
var hc = {}, gc = {
|
|
3484
3484
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3485
3485
|
viewBox: "0 0 48 48"
|
|
3486
3486
|
};
|
|
3487
|
-
function
|
|
3488
|
-
return qi(), Qi("svg",
|
|
3487
|
+
function _c(e, t) {
|
|
3488
|
+
return qi(), Qi("svg", gc, [...t[0] ||= [X("polygon", { points: "39 10.44 37.56 9 24 22.56 10.44 9 9 10.44 22.56 24 9 37.56 10.44 39 24 25.44 37.56 39 39 37.56 25.44 24 39 10.44" }, null, -1)]]);
|
|
3489
3489
|
}
|
|
3490
|
-
var
|
|
3491
|
-
export {
|
|
3490
|
+
var vc = /*#__PURE__*/ ss(hc, [["render", _c], ["__scopeId", "data-v-d7e8386b"]]);
|
|
3491
|
+
export { lc as $, xs as A, Z as At, zs as B, Nn as Bt, ms as C, Ia as Ct, Os as D, Qi as Dt, Ds as E, la as Et, ws as F, Er as Ft, qs as G, _e as Gt, Bs as H, Zt as Ht, Es as I, Dr as It, cc as J, Js as K, Me as Kt, Fs as L, Cr as Lt, Ss as M, fr as Mt, Cs as N, gr as Nt, Ts as O, ca as Ot, js as P, qi as Pt, Vs as Q, Rs as R, Nr as Rt, ic as S, q as St, ac as T, $i as Tt, Ks as U, en as Ut, Ls as V, Pn as Vt, Ns as W, Se as Wt, Hs as X, sc as Y, vs as Z, Ms as _, Wo as _t, rc as a, ts as at, Ys as b, Xa as bt, Us as c, Qo as ct, Qs as d, Zo as dt, Xs as et, $s as f, Xo as ft, Ps as g, as as gt, oc as h, ns as ht, nc as i, rs as it, ks as j, Zn as jt, As as k, sa as kt, Ws as l, es as lt, ec as m, os as mt, mc as n, ds as nt, gs as o, Ko as ot, fs as p, is as pt, _s as q, bs as r, ss as rt, Zs as s, $o as st, vc as t, uc as tt, Gs as u, Jo as ut, tc as v, No as vt, ys as w, X as wt, ps as x, zo as xt, hs as y, Mo as yt, Is as z, Bn as zt };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { At as e,
|
|
1
|
+
import { At as e, Ct as t, Dt as n, Ht as r, Mt as i, Pt as a, Ut as o, _t as s, h as c, j as l, jt as u, k as d, mt as f, n as p, rt as m, t as h, wt as g } from "./CloseIcon-Dkap5zUl.js";
|
|
2
2
|
// src/sdk/3ds/ThreeDsChallenge.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = ["action"], x = ["value"], S = /*#__PURE__*/
|
|
3
|
+
var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = ["action"], x = ["value"], S = /*#__PURE__*/ m(/* @__PURE__ */ u({
|
|
4
4
|
__name: "ThreeDsChallenge",
|
|
5
5
|
props: {
|
|
6
6
|
threeDSServerTransID: {},
|
|
@@ -8,29 +8,29 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
|
|
|
8
8
|
formAction: {}
|
|
9
9
|
},
|
|
10
10
|
emits: ["close", "submit"],
|
|
11
|
-
setup(
|
|
12
|
-
let
|
|
13
|
-
threeDSServerTransID:
|
|
14
|
-
acsTransID:
|
|
11
|
+
setup(s, { emit: c }) {
|
|
12
|
+
let l = s, u = c, d = t(() => f(l.formAction) ? l.formAction : ""), p = r(null), m = JSON.stringify({
|
|
13
|
+
threeDSServerTransID: l.threeDSServerTransID,
|
|
14
|
+
acsTransID: l.acsTransID,
|
|
15
15
|
messageVersion: "2.2.0",
|
|
16
16
|
messageType: "CReq",
|
|
17
17
|
challengeWindowSize: "01"
|
|
18
|
-
}), S = encodeURI(window.btoa(
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
}), (
|
|
22
|
-
|
|
23
|
-
onClick:
|
|
18
|
+
}), S = encodeURI(window.btoa(m).replace(/=*$/, ""));
|
|
19
|
+
return i(() => {
|
|
20
|
+
d.value && p.value?.submit();
|
|
21
|
+
}), (t, r) => (a(), n("div", _, [g("div", v, [g("div", y, [
|
|
22
|
+
e(h, {
|
|
23
|
+
onClick: r[0] ||= (e) => u("close"),
|
|
24
24
|
id: "3ds-challenge-close"
|
|
25
25
|
}),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
action:
|
|
26
|
+
r[1] ||= g("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1),
|
|
27
|
+
g("form", {
|
|
28
|
+
action: d.value,
|
|
29
29
|
target: "ThreeDsChallengeIFrame",
|
|
30
30
|
method: "post",
|
|
31
31
|
ref_key: "form",
|
|
32
32
|
ref: p
|
|
33
|
-
}, [
|
|
33
|
+
}, [g("input", {
|
|
34
34
|
type: "hidden",
|
|
35
35
|
name: "creq",
|
|
36
36
|
value: o(S)
|
|
@@ -108,11 +108,11 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
|
|
|
108
108
|
].includes(t.transStatus) && (this.log(`[${this.getType()}]: Failed 3DS Challenge`, e.data), this.onError(400, "Failed 3DS Challenge"));
|
|
109
109
|
}
|
|
110
110
|
setChallengeFrameVisible(e) {
|
|
111
|
-
e && this.threeDsProcessor?.challengeShown(), window.self !== window.top && window.parent.postMessage({ status: e ?
|
|
111
|
+
e && this.threeDsProcessor?.challengeShown(), window.self !== window.top && window.parent.postMessage({ status: e ? l : d }, "*");
|
|
112
112
|
}
|
|
113
113
|
doChallenge(e, t, n) {
|
|
114
114
|
this.log(`[${this.getType()}][doChallenge]`), w(), this.setChallengeFrameVisible(!0);
|
|
115
|
-
let { destroy: r } =
|
|
115
|
+
let { destroy: r } = s({
|
|
116
116
|
el: document.body,
|
|
117
117
|
component: S,
|
|
118
118
|
props: {
|
|
@@ -139,7 +139,10 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
|
|
|
139
139
|
onSuccess = (e, t) => {
|
|
140
140
|
this.closeChallenge(), w();
|
|
141
141
|
let n = JSON.parse(t);
|
|
142
|
-
["Y", "A"].includes(n.transStatus) ? this.threeDsProcessor?.onSuccess(n) : (this.log(`[${this.getType()}]: ${c}`, n), this.threeDsProcessor?.onError({
|
|
142
|
+
["Y", "A"].includes(n.transStatus) ? this.threeDsProcessor?.onSuccess(n) : (this.log(`[${this.getType()}]: ${c}`, n), this.threeDsProcessor?.onError({
|
|
143
|
+
error: c,
|
|
144
|
+
threeDSServerTransID: n.threeDSServerTransID
|
|
145
|
+
}));
|
|
143
146
|
};
|
|
144
147
|
threeDsMethodInvoke(e, t) {
|
|
145
148
|
this.log(`[${this.getType()}][threeDsMethodInvoke]`, {
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { t as e } from "./DefaultThreeDsProvider-
|
|
2
|
-
import { At as t,
|
|
3
|
-
import { t as h } from "./alerts-
|
|
1
|
+
import { t as e } from "./DefaultThreeDsProvider-D0iYIu6R.js";
|
|
2
|
+
import { At as t, Dt as n, Ht as r, Mt as i, Nt as a, Pt as o, Vt as s, _t as c, bt as l, jt as u, n as d, rt as f, t as p, wt as m } from "./CloseIcon-Dkap5zUl.js";
|
|
3
|
+
import { t as h } from "./alerts-CWLXzX6j.js";
|
|
4
4
|
import { t as g } from "./screen-aNRlfrZR.js";
|
|
5
5
|
// src/sdk/3ds/MetricsGlobalThreeDsChallenge.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = /*#__PURE__*/ f(/* @__PURE__ */
|
|
6
|
+
var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" }, b = /*#__PURE__*/ f(/* @__PURE__ */ u({
|
|
7
7
|
__name: "MetricsGlobalThreeDsChallenge",
|
|
8
8
|
emits: ["close", "submit"],
|
|
9
|
-
setup(e, { emit:
|
|
10
|
-
let
|
|
9
|
+
setup(e, { emit: c }) {
|
|
10
|
+
let u = c, d = r(!1);
|
|
11
11
|
function f(e) {
|
|
12
|
-
["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes(e.data?.message) && (
|
|
12
|
+
["3DS_CHALLENGE_SHOW", "3DS_CHALLENGE_CLOSE"].includes(e.data?.message) && (d.value = e.data.message === "3DS_CHALLENGE_SHOW");
|
|
13
13
|
}
|
|
14
|
-
return
|
|
14
|
+
return i(() => {
|
|
15
15
|
window.addEventListener("message", f);
|
|
16
|
-
}),
|
|
16
|
+
}), a(() => {
|
|
17
17
|
window.removeEventListener("message", f);
|
|
18
|
-
}), (e,
|
|
19
|
-
onClick:
|
|
18
|
+
}), (e, r) => s((o(), n("div", _, [m("div", v, [m("div", y, [t(p, {
|
|
19
|
+
onClick: r[0] ||= (e) => u("close"),
|
|
20
20
|
id: "3ds-challenge-close"
|
|
21
|
-
}),
|
|
21
|
+
}), r[1] ||= m("div", { id: "ThreeDsChallengeIFrame" }, null, -1)])])], 512)), [[l, d.value]]);
|
|
22
22
|
}
|
|
23
|
-
}), [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: x, showSpinner: S } =
|
|
23
|
+
}), [["__scopeId", "data-v-8a0b6dcb"]]), { hideSpinner: x, showSpinner: S } = d(), C = 5, w = class extends e {
|
|
24
24
|
gateway;
|
|
25
25
|
threeDS;
|
|
26
26
|
numAttempts = 0;
|
|
@@ -103,7 +103,7 @@ var _ = { class: "mask" }, v = { class: "wrapper" }, y = { class: "container" },
|
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
initChallenge() {
|
|
106
|
-
let { destroy: e } =
|
|
106
|
+
let { destroy: e } = c({
|
|
107
107
|
el: document.body,
|
|
108
108
|
component: b,
|
|
109
109
|
on: { close: () => {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as e, o as t, r as n, s as r } from "./strings-yAlHZQqv.js";
|
|
2
2
|
// src/sdk/processors/applepay/PayWayAppleButton.ts
|
|
3
|
-
var
|
|
3
|
+
var i = {
|
|
4
4
|
CHECKOUT: "CHECKOUT",
|
|
5
5
|
CHARGE: "CHARGE"
|
|
6
|
-
},
|
|
7
|
-
[
|
|
6
|
+
}, a = (e) => ({
|
|
7
|
+
[i.CHECKOUT]: {
|
|
8
8
|
url: e + "/payment_method/checkout",
|
|
9
9
|
method: "POST"
|
|
10
10
|
},
|
|
11
|
-
[
|
|
11
|
+
[i.CHARGE]: {
|
|
12
12
|
url: e + "/charge/checkout",
|
|
13
13
|
method: "POST"
|
|
14
14
|
}
|
|
15
|
-
}),
|
|
15
|
+
}), o = class {
|
|
16
16
|
log;
|
|
17
17
|
container;
|
|
18
18
|
button = null;
|
|
@@ -33,10 +33,10 @@ var r = {
|
|
|
33
33
|
onFailure;
|
|
34
34
|
userOnValidate;
|
|
35
35
|
httpInvoker = null;
|
|
36
|
-
constructor(
|
|
37
|
-
this.log =
|
|
38
|
-
let l = new
|
|
39
|
-
this.httpInvoker = new
|
|
36
|
+
constructor(e, i, a, o, s, c) {
|
|
37
|
+
this.log = e, this.apiUrl = c.apiUrl, this.container = i || document.body, this.clientParameters = c.clientParameters, this.providerId = c.providerId, this.amount = Number(o), this.currency = s, this.providerId = a, this.onSuccess = c.onSuccess || null, this.onFailure = c.onFailure || null, this.userOnValidate = c.onValidate;
|
|
38
|
+
let l = new t(c.environment, n(c.publicKey));
|
|
39
|
+
this.httpInvoker = new r(c.publicKey, c.version, l), this.init(), setInterval(() => {
|
|
40
40
|
this.validator && (this.userOnValidate?.() === !1 ? this.validator.style.display = "block" : (this.validator.style.display = "none", this.validationError && (this.validationError.style.display = "none")));
|
|
41
41
|
}, 1e3);
|
|
42
42
|
}
|
|
@@ -72,10 +72,10 @@ var r = {
|
|
|
72
72
|
e.id = this.validatorId, e.style.width = "100%", e.style.height = "100%", e.style.position = "absolute", e.style.top = "0", e.style.left = "0", e.style.display = "none", this.button?.appendChild(e), this.validator = e;
|
|
73
73
|
}
|
|
74
74
|
initScript() {
|
|
75
|
-
let
|
|
76
|
-
|
|
75
|
+
let t = document.createElement("script");
|
|
76
|
+
t.src = "https://api.payway.com.au/rest/v1/payway.js", t.onerror = () => e("[shopper][applePay]", "PayWay script failed to load", []), t.onload = () => {
|
|
77
77
|
this.onLoad && this.onLoad();
|
|
78
|
-
}, document.head.appendChild(
|
|
78
|
+
}, document.head.appendChild(t);
|
|
79
79
|
}
|
|
80
80
|
checkout(e) {
|
|
81
81
|
let t = {
|
|
@@ -106,7 +106,7 @@ var r = {
|
|
|
106
106
|
amount: Number(e.unitPrice)
|
|
107
107
|
})) || []
|
|
108
108
|
};
|
|
109
|
-
this.log("[PayWayAppleButton][checkout]", t), this.httpInvoker?.invoke(
|
|
109
|
+
this.log("[PayWayAppleButton][checkout]", t), this.httpInvoker?.invoke(a(this.apiUrl)[i.CHECKOUT].url, a(this.apiUrl)[i.CHECKOUT].method, JSON.stringify(t), (e, t) => {
|
|
110
110
|
this.log("[PayWayAppleButton][checkout]: successCheckoutHandler", e, t);
|
|
111
111
|
let n = JSON.parse(t), r = JSON.parse(window.atob(n.checkoutData));
|
|
112
112
|
this.log("[PayWayAppleButton][checkout]: decodedData", r), this.charge(r.checkoutId);
|
|
@@ -117,7 +117,7 @@ var r = {
|
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
charge(e) {
|
|
120
|
-
this.log("[PayWayAppleButton][charge]", { checkoutId: e }), this.httpInvoker?.invoke(
|
|
120
|
+
this.log("[PayWayAppleButton][charge]", { checkoutId: e }), this.httpInvoker?.invoke(a(this.apiUrl)[i.CHARGE].url, a(this.apiUrl)[i.CHARGE].method, JSON.stringify({ checkoutId: e }), (e, t) => {
|
|
121
121
|
this.log("[PayWayAppleButton][charge]: successChargeHandler", e, t);
|
|
122
122
|
let n = JSON.parse(t);
|
|
123
123
|
this.onSuccess?.({ transactionId: n?.chargeId });
|
|
@@ -146,4 +146,4 @@ var r = {
|
|
|
146
146
|
this.log("[PayWayAppleButton][setOrderInfo]", e), this.order = { ...e };
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
|
-
export {
|
|
149
|
+
export { o as PayWayAppleButton };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dt as e, Et as t, Ht as n, Kt as r, Pt as i, St as a, _t as o, jt as s, rt as c, wt as l } from "./CloseIcon-Dkap5zUl.js";
|
|
2
2
|
// src/sdk/components/Error.vue?vue&type=script&setup=true&lang.ts
|
|
3
3
|
var u = { class: "message" }, d = /*#__PURE__*/ c(/* @__PURE__ */ s({
|
|
4
4
|
__name: "Error",
|
|
5
5
|
props: { error: {} },
|
|
6
|
-
setup(
|
|
7
|
-
let a =
|
|
8
|
-
return (
|
|
6
|
+
setup(t) {
|
|
7
|
+
let a = n(t.error);
|
|
8
|
+
return (t, n) => (i(), e("div", u, r(a.value), 1));
|
|
9
9
|
}
|
|
10
10
|
}), [["__scopeId", "data-v-ae4be0f9"]]), f = { class: "message" }, p = { key: 0 }, m = /*#__PURE__*/ c(/* @__PURE__ */ s({
|
|
11
11
|
__name: "Success",
|
|
@@ -14,9 +14,9 @@ var u = { class: "message" }, d = /*#__PURE__*/ c(/* @__PURE__ */ s({
|
|
|
14
14
|
token: {}
|
|
15
15
|
},
|
|
16
16
|
emits: ["close"],
|
|
17
|
-
setup(
|
|
18
|
-
let s =
|
|
19
|
-
return (
|
|
17
|
+
setup(n, { emit: o }) {
|
|
18
|
+
let s = n;
|
|
19
|
+
return (n, o) => (i(), e(a, null, [l("div", f, r(s.message), 1), s.token ? (i(), e("div", p, "TokenId = " + r(s.token), 1)) : t("", !0)], 64));
|
|
20
20
|
}
|
|
21
21
|
}), [["__scopeId", "data-v-6a4e1608"]]);
|
|
22
22
|
// src/sdk/utils/alerts.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "./DefaultThreeDsProvider-
|
|
2
|
-
import { At as t,
|
|
1
|
+
import { t as e } from "./DefaultThreeDsProvider-D0iYIu6R.js";
|
|
2
|
+
import { At as t, Ct as n, Dt as r, Ht as i, Mt as a, Pt as o, Ut as s, _t as c, jt as l, mt as u, rt as d, t as f, wt as p } from "./CloseIcon-Dkap5zUl.js";
|
|
3
3
|
// src/sdk/3ds/ecentric.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" }, _ = ["action"], v = ["value"], y = /*#__PURE__*/
|
|
4
|
+
var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" }, _ = ["action"], v = ["value"], y = /*#__PURE__*/ d(/* @__PURE__ */ l({
|
|
5
5
|
__name: "ecentric",
|
|
6
6
|
props: {
|
|
7
7
|
threeDSServerTransID: {},
|
|
@@ -10,20 +10,20 @@ var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" },
|
|
|
10
10
|
authenticationValue: {}
|
|
11
11
|
},
|
|
12
12
|
emits: ["close", "submit"],
|
|
13
|
-
setup(e, { emit:
|
|
14
|
-
let
|
|
15
|
-
return
|
|
13
|
+
setup(e, { emit: c }) {
|
|
14
|
+
let l = e, d = c, y = n(() => u(l.formAction) ? l.formAction : ""), b = i(null), x = l.authenticationValue;
|
|
15
|
+
return a(() => {
|
|
16
16
|
y.value && b.value?.submit();
|
|
17
|
-
}), (e,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
}), (e, n) => (o(), r("div", m, [p("div", h, [p("div", g, [
|
|
18
|
+
t(f, { onClick: n[0] ||= (e) => d("close") }),
|
|
19
|
+
n[1] ||= p("iframe", { name: "ThreeDsChallengeIFrame" }, null, -1),
|
|
20
|
+
p("form", {
|
|
21
21
|
action: y.value,
|
|
22
22
|
target: "ThreeDsChallengeIFrame",
|
|
23
23
|
method: "post",
|
|
24
24
|
ref_key: "form",
|
|
25
25
|
ref: b
|
|
26
|
-
}, [
|
|
26
|
+
}, [p("input", {
|
|
27
27
|
type: "hidden",
|
|
28
28
|
name: "PaReq",
|
|
29
29
|
value: s(x)
|
|
@@ -46,7 +46,7 @@ var m = { class: "mask" }, h = { class: "wrapper" }, g = { class: "container" },
|
|
|
46
46
|
}
|
|
47
47
|
doChallenge(e, t, n) {
|
|
48
48
|
this.log(`[${this.getType()}][doChallenge]`), this.setChallengeFrameVisible(!0);
|
|
49
|
-
let { destroy: r } =
|
|
49
|
+
let { destroy: r } = c({
|
|
50
50
|
el: document.body,
|
|
51
51
|
component: y,
|
|
52
52
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as e } from "./DefaultThreeDsProvider-
|
|
1
|
+
import { t as e } from "./DefaultThreeDsProvider-D0iYIu6R.js";
|
|
2
2
|
import { n as t, r as n, t as r } from "./managedOrders-ojoMZ0Ab.js";
|
|
3
|
-
import { n as i } from "./CloseIcon-
|
|
3
|
+
import { n as i } from "./CloseIcon-Dkap5zUl.js";
|
|
4
4
|
import { t as a } from "./whenRendered-jR4Jls4M.js";
|
|
5
5
|
// src/sdk/3ds/ForterThreeDsProvider.ts
|
|
6
6
|
var { hideSpinner: o } = i(), s = class extends e {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "./DefaultThreeDsProvider-
|
|
2
|
-
import {
|
|
1
|
+
import { t as e } from "./DefaultThreeDsProvider-D0iYIu6R.js";
|
|
2
|
+
import { Ct as t, Dt as n, Gt as r, Pt as i, _t as a, jt as o, mt as s, n as c, rt as l, wt as u } from "./CloseIcon-Dkap5zUl.js";
|
|
3
3
|
// src/sdk/3ds/GPayments.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var d = { class: "mask" }, f = { class: "wrapper" }, p = ["src"], m = /*#__PURE__*/ l(/* @__PURE__ */
|
|
4
|
+
var d = { class: "mask" }, f = { class: "wrapper" }, p = ["src"], m = /*#__PURE__*/ l(/* @__PURE__ */ o({
|
|
5
5
|
__name: "GPayments",
|
|
6
6
|
props: {
|
|
7
7
|
url: {},
|
|
@@ -9,22 +9,22 @@ var d = { class: "mask" }, f = { class: "wrapper" }, p = ["src"], m = /*#__PURE_
|
|
|
9
9
|
height: {}
|
|
10
10
|
},
|
|
11
11
|
setup(e) {
|
|
12
|
-
let
|
|
12
|
+
let a = e, o = t(() => s(a.url) ? a.url : "");
|
|
13
13
|
function c() {
|
|
14
14
|
return {
|
|
15
|
-
width: `${
|
|
16
|
-
height: `${
|
|
15
|
+
width: `${a.width || 650}px`,
|
|
16
|
+
height: `${a.height || 400}px`
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
return (e,
|
|
19
|
+
return (e, t) => (i(), n("div", d, [u("div", f, [u("div", {
|
|
20
20
|
class: "container",
|
|
21
|
-
style:
|
|
21
|
+
style: r([c(), {
|
|
22
22
|
padding: "0",
|
|
23
23
|
margin: "0"
|
|
24
24
|
}])
|
|
25
|
-
}, [
|
|
26
|
-
src:
|
|
27
|
-
style:
|
|
25
|
+
}, [u("iframe", {
|
|
26
|
+
src: o.value,
|
|
27
|
+
style: r(c())
|
|
28
28
|
}, null, 12, p)], 4)])]));
|
|
29
29
|
}
|
|
30
30
|
}), [["__scopeId", "data-v-cf5aa816"]]), { hideSpinner: h } = c(), g = class extends e {
|
|
@@ -33,7 +33,7 @@ var d = { class: "mask" }, f = { class: "wrapper" }, p = ["src"], m = /*#__PURE_
|
|
|
33
33
|
}
|
|
34
34
|
doChallenge(e) {
|
|
35
35
|
this.log(`[${this.getType()}][doChallenge]`), h(), this.setChallengeFrameVisible(!0);
|
|
36
|
-
let { destroy: t } =
|
|
36
|
+
let { destroy: t } = a({
|
|
37
37
|
el: document.body,
|
|
38
38
|
component: m,
|
|
39
39
|
props: {
|
|
@@ -69,7 +69,7 @@ var d = { class: "mask" }, f = { class: "wrapper" }, p = ["src"], m = /*#__PURE_
|
|
|
69
69
|
this.log(`[${this.getType()}][onInitAuthSuccess]`, n), n.threeDSAuthURL ? (this.threeDSRequestorTransID = n.threeDSRequestorTransID, this.threeDSServerTransID = n.threeDSServerTransID, this.threeDSMonitorURL = n.threeDSMonitorURL, this.threeDSAuthURL = n.threeDSAuthURL, n.threeDsServerCallbackUrl ? this.initFrame(n.threeDsServerCallbackUrl) : this.onAuth(!1, "")) : this.onError(e, "No AuthUrl specified");
|
|
70
70
|
};
|
|
71
71
|
initFrame(e) {
|
|
72
|
-
if (this.log(`[${this.getType()}][init3DSFrame]`, e), !
|
|
72
|
+
if (this.log(`[${this.getType()}][init3DSFrame]`, e), !s(e)) return;
|
|
73
73
|
let t = document.createElement("iframe");
|
|
74
74
|
t.src = e, t.style.width = "1px", t.style.height = "1px", t.style.border = "0", document.body.appendChild(t);
|
|
75
75
|
}
|