@paynext/sdk 0.0.18 → 0.0.19
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/index.es.js +33 -33
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2429,8 +2429,8 @@ const Br = "ab-ev-google-pay-container", Dl = ({ onSubmit: e, onCancel: t, onErr
|
|
|
2429
2429
|
}, Nl = "_applePay_gn91n_1", Ol = "_hidden_gn91n_21", Fr = {
|
|
2430
2430
|
applePay: Nl,
|
|
2431
2431
|
hidden: Ol
|
|
2432
|
-
}, _l =
|
|
2433
|
-
if (e.unmount(), _l
|
|
2432
|
+
}, _l = typeof window < "u" && typeof document < "u", An = "ab-ev-apple-pay-container", Bl = (e) => {
|
|
2433
|
+
if (console.log("APPLE PAY REMOUNT"), e.unmount(), _l) {
|
|
2434
2434
|
const t = document.getElementById(An);
|
|
2435
2435
|
t && (t.innerHTML = "");
|
|
2436
2436
|
}
|
|
@@ -2449,39 +2449,39 @@ const Br = "ab-ev-google-pay-container", Dl = ({ onSubmit: e, onCancel: t, onErr
|
|
|
2449
2449
|
return te(() => {
|
|
2450
2450
|
f && (t && f.on("cancel", t), n && f.on("error", (g = "") => n(g)), r && f.on("success", r));
|
|
2451
2451
|
}, [f, t, n, r]), te(() => {
|
|
2452
|
-
(
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
}
|
|
2452
|
+
if (!l || u) return;
|
|
2453
|
+
console.log("APPLE PAY INIT"), (async () => {
|
|
2454
|
+
try {
|
|
2455
|
+
const v = l.transactions.create(a), y = l.ui.applePay(v, {
|
|
2456
|
+
locale: s,
|
|
2457
|
+
borderRadius: 12,
|
|
2458
|
+
size: {
|
|
2459
|
+
width: "100%",
|
|
2460
|
+
height: "40px"
|
|
2461
|
+
},
|
|
2462
|
+
allowedCardNetworks: o,
|
|
2463
|
+
requestBillingAddress: !0,
|
|
2464
|
+
requestPayerDetails: ["name", "email", "phone"],
|
|
2465
|
+
process: async (b, { fail: k }) => {
|
|
2466
|
+
try {
|
|
2467
|
+
e(b);
|
|
2468
|
+
} catch (C) {
|
|
2469
|
+
console.error(C), k({
|
|
2470
|
+
message: "Cannot pay with payment credentials"
|
|
2471
|
+
});
|
|
2473
2472
|
}
|
|
2474
|
-
});
|
|
2475
|
-
if (await y.availability() !== "available") {
|
|
2476
|
-
p(!1);
|
|
2477
|
-
return;
|
|
2478
2473
|
}
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
c(!1), i?.();
|
|
2474
|
+
});
|
|
2475
|
+
if (await y.availability() !== "available") {
|
|
2476
|
+
p(!1);
|
|
2477
|
+
return;
|
|
2484
2478
|
}
|
|
2479
|
+
m(y), Bl(y), p(!0);
|
|
2480
|
+
} catch (v) {
|
|
2481
|
+
console.error(v), p(!1);
|
|
2482
|
+
} finally {
|
|
2483
|
+
c(!1), i?.();
|
|
2484
|
+
}
|
|
2485
2485
|
})();
|
|
2486
2486
|
}, [l, a, o, s, u, e, i]), /* @__PURE__ */ h.jsx("div", { id: An, className: ve(Fr.applePay, d ? void 0 : Fr.hidden) });
|
|
2487
2487
|
}, ql = ({ children: e, clientToken: t }) => {
|
|
@@ -9031,7 +9031,7 @@ const Sp = "_paypalBtn_2m8yd_1", Ep = {
|
|
|
9031
9031
|
te(() => {
|
|
9032
9032
|
const R = setTimeout(() => {
|
|
9033
9033
|
g(!0);
|
|
9034
|
-
}, Io ?
|
|
9034
|
+
}, Io ? 3e3 : 2e3);
|
|
9035
9035
|
return () => clearTimeout(R);
|
|
9036
9036
|
}, []);
|
|
9037
9037
|
const b = D(
|