@fractalpay/fractalpay-next-dev 0.0.294 → 0.0.295
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.js +330 -313
- package/dist/index.js.map +1 -1
- package/package.json +8 -3
package/dist/index.js
CHANGED
|
@@ -39,7 +39,7 @@ var require_package = __commonJS({
|
|
|
39
39
|
"package.json"(exports, module) {
|
|
40
40
|
module.exports = {
|
|
41
41
|
name: "@fractalpay/fractalpay-next-dev",
|
|
42
|
-
version: "0.0.
|
|
42
|
+
version: "0.0.295",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -97,7 +97,12 @@ var require_package = __commonJS({
|
|
|
97
97
|
},
|
|
98
98
|
author: "Mukul",
|
|
99
99
|
license: "MIT",
|
|
100
|
-
keywords: [
|
|
100
|
+
keywords: [
|
|
101
|
+
"nextjs",
|
|
102
|
+
"next",
|
|
103
|
+
"typescript",
|
|
104
|
+
"tailwindcss"
|
|
105
|
+
],
|
|
101
106
|
publishConfig: {
|
|
102
107
|
access: "public"
|
|
103
108
|
}
|
|
@@ -236,8 +241,8 @@ var Loader_default = Loader;
|
|
|
236
241
|
var { name } = require_package();
|
|
237
242
|
var S3Url = "https://fractal-userdata-upload.s3.us-east-1.amazonaws.com/";
|
|
238
243
|
if (name === "@fractalpay/fractalpay-next-dev") {
|
|
239
|
-
masterBaseUrl = "https://api.dev.fractalpay.com/";
|
|
240
244
|
baseUrl = "https://widget.dev.fractalpay.com/";
|
|
245
|
+
masterBaseUrl = "http://localhost:50501/";
|
|
241
246
|
fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
|
|
242
247
|
datacapUrl = "https://token-cert.dcap.com/v1/client";
|
|
243
248
|
threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
|
|
@@ -774,16 +779,6 @@ var RequestPaymentstyles = (props) => {
|
|
|
774
779
|
align-items: center;
|
|
775
780
|
}
|
|
776
781
|
|
|
777
|
-
.request-payment-error-tick {
|
|
778
|
-
border-radius: 1000px;
|
|
779
|
-
background: #f1000024;
|
|
780
|
-
display: flex;
|
|
781
|
-
width: 60px;
|
|
782
|
-
height: 60px;
|
|
783
|
-
justify-content: center;
|
|
784
|
-
align-items: center;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
782
|
.request-payment-success-text {
|
|
788
783
|
color: #161616;
|
|
789
784
|
text-align: center;
|
|
@@ -1053,8 +1048,6 @@ function RequestPayment(props) {
|
|
|
1053
1048
|
const [cashDiscount, setCashDiscount] = useState(void 0);
|
|
1054
1049
|
const [amount, setAmount] = useState("");
|
|
1055
1050
|
const [showConfirmationModal, setShowConfirmationModal] = useState(false);
|
|
1056
|
-
const [showErrorModal, setShowErrorModal] = useState(false);
|
|
1057
|
-
const [apiError, setApiError] = useState("");
|
|
1058
1051
|
const [apiResponse, setApiResponse] = useState(null);
|
|
1059
1052
|
const phoneNumberRegex = (value) => /^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/.test(value);
|
|
1060
1053
|
const amoutRegex = /[+-]?([0-9]*[.])?[0-9]+/;
|
|
@@ -1082,11 +1075,6 @@ function RequestPayment(props) {
|
|
|
1082
1075
|
handleSubmit(apiResponse);
|
|
1083
1076
|
setShowConfirmationModal(false);
|
|
1084
1077
|
};
|
|
1085
|
-
const handleCloseErrorModal = () => {
|
|
1086
|
-
console.log(apiResponse, "apiresponse");
|
|
1087
|
-
handleSubmit(apiResponse);
|
|
1088
|
-
setShowErrorModal(false);
|
|
1089
|
-
};
|
|
1090
1078
|
function emptyFields() {
|
|
1091
1079
|
setRequestDetails({
|
|
1092
1080
|
email: "",
|
|
@@ -1105,7 +1093,6 @@ function RequestPayment(props) {
|
|
|
1105
1093
|
window.parent.postMessage(message, "*");
|
|
1106
1094
|
}
|
|
1107
1095
|
const sendRequestPayment = async (e) => {
|
|
1108
|
-
var _a, _b;
|
|
1109
1096
|
e.currentTarget.blur();
|
|
1110
1097
|
if (loading) return;
|
|
1111
1098
|
if (Object.keys(errors).length > 0) {
|
|
@@ -1142,19 +1129,13 @@ function RequestPayment(props) {
|
|
|
1142
1129
|
let response = await axios.post(`${baseUrl}create-widget-order`, formData, {
|
|
1143
1130
|
headers: __spreadValues({}, (props == null ? void 0 : props.sessionToken) && { "X-Session-Token": props.sessionToken })
|
|
1144
1131
|
});
|
|
1145
|
-
if ((response == null ? void 0 : response.status) === 200
|
|
1132
|
+
if ((response == null ? void 0 : response.status) === 200) {
|
|
1146
1133
|
setShowConfirmationModal(true);
|
|
1147
1134
|
setShow(false);
|
|
1148
1135
|
emptyFields();
|
|
1149
1136
|
setApiResponse(response == null ? void 0 : response.data);
|
|
1150
|
-
setLoading(false);
|
|
1151
|
-
} else {
|
|
1152
|
-
console.log(response);
|
|
1153
|
-
setShowErrorModal(true);
|
|
1154
|
-
setShow(false);
|
|
1155
|
-
setApiError(((_b = response == null ? void 0 : response.data) == null ? void 0 : _b.message) || "Something went wrong!");
|
|
1156
|
-
setLoading(false);
|
|
1157
1137
|
}
|
|
1138
|
+
setLoading(false);
|
|
1158
1139
|
} catch (error) {
|
|
1159
1140
|
console.log(error);
|
|
1160
1141
|
setLoading(false);
|
|
@@ -1266,7 +1247,7 @@ function RequestPayment(props) {
|
|
|
1266
1247
|
/* @__PURE__ */ jsx6("p", { className: "request-payment-amount", children: formatAmount(props == null ? void 0 : props.amount) }),
|
|
1267
1248
|
cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs3("div", { className: "frac-req-cash-discount", children: [
|
|
1268
1249
|
/* @__PURE__ */ jsxs3("div", { className: "frac-cashlabel", children: [
|
|
1269
|
-
(props == null ? void 0 : props.showSurcharge)
|
|
1250
|
+
numberToBoolean(props == null ? void 0 : props.showSurcharge) ? "Surcharge" : "Cash Discount",
|
|
1270
1251
|
" :"
|
|
1271
1252
|
] }),
|
|
1272
1253
|
/* @__PURE__ */ jsx6("div", { children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) })
|
|
@@ -1407,56 +1388,6 @@ function RequestPayment(props) {
|
|
|
1407
1388
|
/* @__PURE__ */ jsx6("div", { className: "request-payment-success-btn-div", children: /* @__PURE__ */ jsx6("button", { onClick: handleCloseConfirmationModal, className: "request-payment-success-btn2", children: "Close" }) })
|
|
1408
1389
|
] }) })
|
|
1409
1390
|
}
|
|
1410
|
-
),
|
|
1411
|
-
/* @__PURE__ */ jsx6(
|
|
1412
|
-
CustomModal2_default,
|
|
1413
|
-
{
|
|
1414
|
-
open: showErrorModal,
|
|
1415
|
-
onClose: handleCloseErrorModal,
|
|
1416
|
-
maxWidth: "500px",
|
|
1417
|
-
children: /* @__PURE__ */ jsx6("div", { className: "fractal-popup-content", style: { padding: "0px", maxWidth: "500px" }, children: /* @__PURE__ */ jsxs3("div", { className: "request-payment-success-container", children: [
|
|
1418
|
-
/* @__PURE__ */ jsx6("span", { className: "request-payment-close-popup", onClick: handleCloseErrorModal, children: /* @__PURE__ */ jsxs3("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
1419
|
-
/* @__PURE__ */ jsx6("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx6("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" }) }),
|
|
1420
|
-
/* @__PURE__ */ jsx6("defs", { children: /* @__PURE__ */ jsx6("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx6("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
1421
|
-
] }) }),
|
|
1422
|
-
/* @__PURE__ */ jsx6("div", { className: "request-payment-success-tick-div", children: /* @__PURE__ */ jsx6("div", { className: "request-payment-error-tick", children: /* @__PURE__ */ jsx6(
|
|
1423
|
-
"svg",
|
|
1424
|
-
{
|
|
1425
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1426
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1427
|
-
width: 16,
|
|
1428
|
-
height: 16,
|
|
1429
|
-
x: 0,
|
|
1430
|
-
y: 0,
|
|
1431
|
-
viewBox: "0 0 21 21",
|
|
1432
|
-
xmlSpace: "preserve",
|
|
1433
|
-
fillRule: "evenodd",
|
|
1434
|
-
className: "",
|
|
1435
|
-
children: /* @__PURE__ */ jsx6("g", { children: /* @__PURE__ */ jsxs3("g", { fill: "red", children: [
|
|
1436
|
-
/* @__PURE__ */ jsx6(
|
|
1437
|
-
"path",
|
|
1438
|
-
{
|
|
1439
|
-
d: "m3.486 16.029 12.41-12.41a.183.183 0 0 1 .258 0l.326.326.004.004.702.702.003.004.327.326a.183.183 0 0 1 0 .258L5.106 17.65a.183.183 0 0 1-.258 0l-.326-.327-.004-.003-.702-.702-.004-.004-.326-.326a.183.183 0 0 1 0-.258z",
|
|
1440
|
-
fill: "",
|
|
1441
|
-
opacity: 1
|
|
1442
|
-
}
|
|
1443
|
-
),
|
|
1444
|
-
/* @__PURE__ */ jsx6(
|
|
1445
|
-
"path",
|
|
1446
|
-
{
|
|
1447
|
-
d: "M15.896 17.649 3.486 5.239a.183.183 0 0 1 0-.258l.327-.326.003-.004.702-.702.004-.004.326-.326a.183.183 0 0 1 .258 0l12.41 12.41a.183.183 0 0 1 0 .258l-.326.326-.004.004-.702.702-.004.003-.326.327a.183.183 0 0 1-.258 0z",
|
|
1448
|
-
fill: "",
|
|
1449
|
-
opacity: 1
|
|
1450
|
-
}
|
|
1451
|
-
)
|
|
1452
|
-
] }) })
|
|
1453
|
-
}
|
|
1454
|
-
) }) }),
|
|
1455
|
-
/* @__PURE__ */ jsx6("h6", { className: "request-payment-success-text", children: apiError }),
|
|
1456
|
-
/* @__PURE__ */ jsx6("h6", { className: "request-payment-success-subtext", children: "Please try again later" }),
|
|
1457
|
-
/* @__PURE__ */ jsx6("div", { className: "request-payment-success-btn-div", children: /* @__PURE__ */ jsx6("button", { onClick: handleCloseErrorModal, className: "request-payment-success-btn2", children: "Close" }) })
|
|
1458
|
-
] }) })
|
|
1459
|
-
}
|
|
1460
1391
|
)
|
|
1461
1392
|
] })
|
|
1462
1393
|
] });
|
|
@@ -1487,8 +1418,6 @@ function RequestPreAuthPayment(props) {
|
|
|
1487
1418
|
const [amount, setAmount] = useState2("");
|
|
1488
1419
|
const [showConfirmationModal, setShowConfirmationModal] = useState2(false);
|
|
1489
1420
|
const [apiResponse, setApiResponse] = useState2(null);
|
|
1490
|
-
const [showErrorModal, setShowErrorModal] = useState2(false);
|
|
1491
|
-
const [apiError, setApiError] = useState2("");
|
|
1492
1421
|
const phoneNumberRegex = (value) => /^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/.test(value);
|
|
1493
1422
|
const amoutRegex = /[+-]?([0-9]*[.])?[0-9]+/;
|
|
1494
1423
|
const isValidEmail = (value) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value);
|
|
@@ -1520,7 +1449,6 @@ function RequestPreAuthPayment(props) {
|
|
|
1520
1449
|
window.parent.postMessage(message, "*");
|
|
1521
1450
|
}
|
|
1522
1451
|
const sendRequestPayment = async (e) => {
|
|
1523
|
-
var _a, _b;
|
|
1524
1452
|
e.currentTarget.blur();
|
|
1525
1453
|
if (loading) return;
|
|
1526
1454
|
if (Object.keys(errors).length > 0) {
|
|
@@ -1555,17 +1483,11 @@ function RequestPreAuthPayment(props) {
|
|
|
1555
1483
|
let response = await axios2.post(`${baseUrl}send-request-pre-auth-payment`, formData, {
|
|
1556
1484
|
headers: __spreadValues({}, (props == null ? void 0 : props.sessionToken) && { "X-Session-Token": props.sessionToken })
|
|
1557
1485
|
});
|
|
1558
|
-
if ((response == null ? void 0 : response.status) === 200
|
|
1486
|
+
if ((response == null ? void 0 : response.status) === 200) {
|
|
1559
1487
|
setShowConfirmationModal(true);
|
|
1560
1488
|
setShow(false);
|
|
1561
1489
|
emptyFields();
|
|
1562
1490
|
setApiResponse(response == null ? void 0 : response.data);
|
|
1563
|
-
setLoading(false);
|
|
1564
|
-
} else {
|
|
1565
|
-
setShowErrorModal(true);
|
|
1566
|
-
setShow(false);
|
|
1567
|
-
setApiError(((_b = response == null ? void 0 : response.data) == null ? void 0 : _b.message) || "Something went wrong!");
|
|
1568
|
-
setLoading(false);
|
|
1569
1491
|
}
|
|
1570
1492
|
setLoading(false);
|
|
1571
1493
|
} catch (error) {
|
|
@@ -1655,11 +1577,6 @@ function RequestPreAuthPayment(props) {
|
|
|
1655
1577
|
maximumFractionDigits: 2
|
|
1656
1578
|
}).format(Number(amount2));
|
|
1657
1579
|
}
|
|
1658
|
-
const handleCloseErrorModal = () => {
|
|
1659
|
-
console.log(apiResponse, "apiresponse");
|
|
1660
|
-
handleSubmit(apiResponse);
|
|
1661
|
-
setShowErrorModal(false);
|
|
1662
|
-
};
|
|
1663
1580
|
return /* @__PURE__ */ jsxs4(Fragment4, { children: [
|
|
1664
1581
|
/* @__PURE__ */ jsx7(RequestPaymentstyles_default, {}),
|
|
1665
1582
|
/* @__PURE__ */ jsx7(Loader_default, { loading }),
|
|
@@ -1793,56 +1710,6 @@ function RequestPreAuthPayment(props) {
|
|
|
1793
1710
|
/* @__PURE__ */ jsx7("div", { className: "request-payment-success-btn-div", children: /* @__PURE__ */ jsx7("button", { onClick: handleCloseConfirmationModal, className: "request-payment-success-btn2", children: "Close" }) })
|
|
1794
1711
|
] }) })
|
|
1795
1712
|
}
|
|
1796
|
-
),
|
|
1797
|
-
/* @__PURE__ */ jsx7(
|
|
1798
|
-
CustomModal2_default,
|
|
1799
|
-
{
|
|
1800
|
-
open: showErrorModal,
|
|
1801
|
-
onClose: handleCloseErrorModal,
|
|
1802
|
-
maxWidth: "500px",
|
|
1803
|
-
children: /* @__PURE__ */ jsx7("div", { className: "fractal-popup-content", style: { padding: "0px", maxWidth: "500px" }, children: /* @__PURE__ */ jsxs4("div", { className: "request-payment-success-container", children: [
|
|
1804
|
-
/* @__PURE__ */ jsx7("span", { className: "request-payment-close-popup", onClick: handleCloseErrorModal, children: /* @__PURE__ */ jsxs4("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
1805
|
-
/* @__PURE__ */ jsx7("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx7("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" }) }),
|
|
1806
|
-
/* @__PURE__ */ jsx7("defs", { children: /* @__PURE__ */ jsx7("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx7("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
1807
|
-
] }) }),
|
|
1808
|
-
/* @__PURE__ */ jsx7("div", { className: "request-payment-success-tick-div", children: /* @__PURE__ */ jsx7("div", { className: "request-payment-error-tick", children: /* @__PURE__ */ jsx7(
|
|
1809
|
-
"svg",
|
|
1810
|
-
{
|
|
1811
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1812
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1813
|
-
width: 16,
|
|
1814
|
-
height: 16,
|
|
1815
|
-
x: 0,
|
|
1816
|
-
y: 0,
|
|
1817
|
-
viewBox: "0 0 21 21",
|
|
1818
|
-
xmlSpace: "preserve",
|
|
1819
|
-
fillRule: "evenodd",
|
|
1820
|
-
className: "",
|
|
1821
|
-
children: /* @__PURE__ */ jsx7("g", { children: /* @__PURE__ */ jsxs4("g", { fill: "red", children: [
|
|
1822
|
-
/* @__PURE__ */ jsx7(
|
|
1823
|
-
"path",
|
|
1824
|
-
{
|
|
1825
|
-
d: "m3.486 16.029 12.41-12.41a.183.183 0 0 1 .258 0l.326.326.004.004.702.702.003.004.327.326a.183.183 0 0 1 0 .258L5.106 17.65a.183.183 0 0 1-.258 0l-.326-.327-.004-.003-.702-.702-.004-.004-.326-.326a.183.183 0 0 1 0-.258z",
|
|
1826
|
-
fill: "",
|
|
1827
|
-
opacity: 1
|
|
1828
|
-
}
|
|
1829
|
-
),
|
|
1830
|
-
/* @__PURE__ */ jsx7(
|
|
1831
|
-
"path",
|
|
1832
|
-
{
|
|
1833
|
-
d: "M15.896 17.649 3.486 5.239a.183.183 0 0 1 0-.258l.327-.326.003-.004.702-.702.004-.004.326-.326a.183.183 0 0 1 .258 0l12.41 12.41a.183.183 0 0 1 0 .258l-.326.326-.004.004-.702.702-.004.003-.326.327a.183.183 0 0 1-.258 0z",
|
|
1834
|
-
fill: "",
|
|
1835
|
-
opacity: 1
|
|
1836
|
-
}
|
|
1837
|
-
)
|
|
1838
|
-
] }) })
|
|
1839
|
-
}
|
|
1840
|
-
) }) }),
|
|
1841
|
-
/* @__PURE__ */ jsx7("h6", { className: "request-payment-success-text", children: apiError }),
|
|
1842
|
-
/* @__PURE__ */ jsx7("h6", { className: "request-payment-success-subtext", children: "Please try again later" }),
|
|
1843
|
-
/* @__PURE__ */ jsx7("div", { className: "request-payment-success-btn-div", children: /* @__PURE__ */ jsx7("button", { onClick: handleCloseErrorModal, className: "request-payment-success-btn2", children: "Close" }) })
|
|
1844
|
-
] }) })
|
|
1845
|
-
}
|
|
1846
1713
|
)
|
|
1847
1714
|
] })
|
|
1848
1715
|
] })
|
|
@@ -9116,7 +8983,7 @@ function PartialPayment(props) {
|
|
|
9116
8983
|
}
|
|
9117
8984
|
|
|
9118
8985
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
9119
|
-
import { useEffect as
|
|
8986
|
+
import { useEffect as useEffect17, useState as useState11, useMemo } from "react";
|
|
9120
8987
|
|
|
9121
8988
|
// src/app/components/Skysystemz/SkyChargewidgetstyles.tsx
|
|
9122
8989
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -9962,7 +9829,7 @@ padding:0px !important;
|
|
|
9962
9829
|
}
|
|
9963
9830
|
|
|
9964
9831
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9965
|
-
import { useCallback, useEffect as
|
|
9832
|
+
import { useCallback, useEffect as useEffect16, useRef as useRef11, useState as useState10 } from "react";
|
|
9966
9833
|
import axios9 from "axios";
|
|
9967
9834
|
import Swal5 from "sweetalert2";
|
|
9968
9835
|
|
|
@@ -10248,17 +10115,155 @@ var ErrorCardOverlay = ({ onClose, error, autoTrigger = false }) => {
|
|
|
10248
10115
|
};
|
|
10249
10116
|
var ErrorCardOverlay_default = ErrorCardOverlay;
|
|
10250
10117
|
|
|
10118
|
+
// src/app/components/Atoms/Applepay/ApplePayButton.tsx
|
|
10119
|
+
import { useEffect as useEffect15, useRef as useRef10 } from "react";
|
|
10120
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
10121
|
+
function ApplePayButton({
|
|
10122
|
+
applePayMerchantId: applePayMerchantId2,
|
|
10123
|
+
applePayAmount,
|
|
10124
|
+
applePayMerchantName,
|
|
10125
|
+
showLoader,
|
|
10126
|
+
completeFractalFlow
|
|
10127
|
+
}) {
|
|
10128
|
+
const applePayRef = useRef10(null);
|
|
10129
|
+
const paymentRequestMethods = [
|
|
10130
|
+
{
|
|
10131
|
+
supportedMethods: "https://apple.com/apple-pay",
|
|
10132
|
+
data: {
|
|
10133
|
+
version: 3,
|
|
10134
|
+
merchantIdentifier: applePayMerchantId2,
|
|
10135
|
+
// ✅ FIXED
|
|
10136
|
+
merchantCapabilities: ["supports3DS"],
|
|
10137
|
+
supportedNetworks: ["amex", "discover", "mastercard", "visa"],
|
|
10138
|
+
// ✅ FIXED
|
|
10139
|
+
countryCode: "US"
|
|
10140
|
+
}
|
|
10141
|
+
}
|
|
10142
|
+
];
|
|
10143
|
+
const paymentRequestOptions = {
|
|
10144
|
+
requestPayerName: false,
|
|
10145
|
+
requestPayerEmail: false,
|
|
10146
|
+
requestPayerPhone: false,
|
|
10147
|
+
requestShipping: false
|
|
10148
|
+
};
|
|
10149
|
+
function buildPaymentDetails() {
|
|
10150
|
+
return {
|
|
10151
|
+
total: {
|
|
10152
|
+
label: applePayMerchantName,
|
|
10153
|
+
amount: {
|
|
10154
|
+
currency: "USD",
|
|
10155
|
+
value: applePayAmount
|
|
10156
|
+
}
|
|
10157
|
+
}
|
|
10158
|
+
};
|
|
10159
|
+
}
|
|
10160
|
+
async function validateMerchant(event) {
|
|
10161
|
+
var _a;
|
|
10162
|
+
console.log("\u{1F7E1} STEP 1: Merchant validation started");
|
|
10163
|
+
try {
|
|
10164
|
+
console.log("Validation URL:", event.validationURL);
|
|
10165
|
+
console.log("Domain:", window.location.hostname);
|
|
10166
|
+
const res = await fetch(
|
|
10167
|
+
`${masterBaseUrl}api/v1/widget/generate-apple-pay-session`,
|
|
10168
|
+
{
|
|
10169
|
+
method: "POST",
|
|
10170
|
+
headers: {
|
|
10171
|
+
"Content-Type": "application/json"
|
|
10172
|
+
},
|
|
10173
|
+
body: JSON.stringify({
|
|
10174
|
+
validationUrl: event.validationURL,
|
|
10175
|
+
applePayMerchantId: applePayMerchantId2,
|
|
10176
|
+
applepayDisplayName: applePayMerchantName,
|
|
10177
|
+
requestDomain: window.location.hostname
|
|
10178
|
+
// ✅ IMPORTANT
|
|
10179
|
+
})
|
|
10180
|
+
}
|
|
10181
|
+
);
|
|
10182
|
+
console.log("\u{1F7E1} STEP 2: Response status:", res.status);
|
|
10183
|
+
const data = await res.json();
|
|
10184
|
+
console.log("RAW session response:", JSON.stringify(data));
|
|
10185
|
+
console.log("\u{1F7E2} STEP 3: Session response: data fetched");
|
|
10186
|
+
const merchantSession = (_a = data == null ? void 0 : data.data) != null ? _a : data;
|
|
10187
|
+
if (!merchantSession || typeof merchantSession !== "object") {
|
|
10188
|
+
console.error("\u274C Bad session shape");
|
|
10189
|
+
event.complete(null);
|
|
10190
|
+
return;
|
|
10191
|
+
}
|
|
10192
|
+
console.log("\u{1F7E2} STEP 4.1: Completing merchant validation");
|
|
10193
|
+
event.complete(merchantSession);
|
|
10194
|
+
console.log("\u{1F7E2} STEP 4.2: Completed merchant validation");
|
|
10195
|
+
} catch (err) {
|
|
10196
|
+
console.log("\u274C Merchant validation failed:", err == null ? void 0 : err.message);
|
|
10197
|
+
event.complete(null);
|
|
10198
|
+
}
|
|
10199
|
+
}
|
|
10200
|
+
async function authorizePayment(paymentResponse) {
|
|
10201
|
+
console.log("\u{1F7E1} STEP 5: Authorizing payment");
|
|
10202
|
+
try {
|
|
10203
|
+
const token = paymentResponse.details.token.paymentData;
|
|
10204
|
+
console.log("\u{1F7E2} STEP 6: Got token");
|
|
10205
|
+
await completeFractalFlow(token, null, "apple_pay");
|
|
10206
|
+
await paymentResponse.complete("success");
|
|
10207
|
+
console.log("\u2705 Payment completed successfully");
|
|
10208
|
+
} catch (err) {
|
|
10209
|
+
console.log("\u274C Authorization failed:", err == null ? void 0 : err.message);
|
|
10210
|
+
await paymentResponse.complete("fail");
|
|
10211
|
+
}
|
|
10212
|
+
}
|
|
10213
|
+
async function handleApplePayClick() {
|
|
10214
|
+
console.log("\u{1F7E1} STEP A: Click detected");
|
|
10215
|
+
try {
|
|
10216
|
+
const request = new PaymentRequest(
|
|
10217
|
+
paymentRequestMethods,
|
|
10218
|
+
buildPaymentDetails(),
|
|
10219
|
+
paymentRequestOptions
|
|
10220
|
+
);
|
|
10221
|
+
request.onmerchantvalidation = validateMerchant;
|
|
10222
|
+
console.log("\u{1F7E1} STEP B: Calling show()");
|
|
10223
|
+
const response = await request.show();
|
|
10224
|
+
console.log("\u{1F7E2} STEP C: Payment sheet opened");
|
|
10225
|
+
await authorizePayment(response);
|
|
10226
|
+
} catch (err) {
|
|
10227
|
+
console.log("\u274C Apple Pay flow failed:", err == null ? void 0 : err.message);
|
|
10228
|
+
}
|
|
10229
|
+
}
|
|
10230
|
+
useEffect15(() => {
|
|
10231
|
+
if (window.ApplePaySession && window.ApplePaySession.canMakePayments()) {
|
|
10232
|
+
console.log("\u2705 Apple Pay is available");
|
|
10233
|
+
} else {
|
|
10234
|
+
console.log("\u274C Apple Pay NOT available");
|
|
10235
|
+
}
|
|
10236
|
+
}, []);
|
|
10237
|
+
useEffect15(() => {
|
|
10238
|
+
const btn = applePayRef.current;
|
|
10239
|
+
if (!btn) return;
|
|
10240
|
+
const handleClick = () => handleApplePayClick();
|
|
10241
|
+
btn.addEventListener("click", handleClick);
|
|
10242
|
+
return () => btn.removeEventListener("click", handleClick);
|
|
10243
|
+
}, [applePayMerchantId2, applePayAmount, applePayMerchantName]);
|
|
10244
|
+
return /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(
|
|
10245
|
+
"apple-pay-button",
|
|
10246
|
+
{
|
|
10247
|
+
ref: applePayRef,
|
|
10248
|
+
buttonstyle: "black",
|
|
10249
|
+
type: "pay",
|
|
10250
|
+
locale: "en-US",
|
|
10251
|
+
style: { width: "100%" }
|
|
10252
|
+
}
|
|
10253
|
+
) });
|
|
10254
|
+
}
|
|
10255
|
+
|
|
10251
10256
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
10252
|
-
import { Fragment as Fragment19, jsx as
|
|
10257
|
+
import { Fragment as Fragment19, jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
10253
10258
|
var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_token, customerId, callback, merchantName = "merchant", isPreAuth, surcharge = "0", submitBtnClass, submitBtnIcon, isRequest, pass_fee, pass_fee_amount, require3ds = false, autoTrigger = false, show, setShow, setHandleCloseRef, isPartial, bankSurcharge, partialRef, loadingPrev = false, orderGuid: ordGuid, remainingAmount: remAmount, onSubmit, onLoad = true, customCSS }) => {
|
|
10254
10259
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
10255
|
-
const hasRunRef =
|
|
10256
|
-
const cardFormRef =
|
|
10257
|
-
const bankFormRef =
|
|
10258
|
-
const expiryYearRef =
|
|
10259
|
-
const expiryMonthRef =
|
|
10260
|
-
const cardListRunRef =
|
|
10261
|
-
const threeDSContainerRef =
|
|
10260
|
+
const hasRunRef = useRef11(false);
|
|
10261
|
+
const cardFormRef = useRef11(null);
|
|
10262
|
+
const bankFormRef = useRef11(null);
|
|
10263
|
+
const expiryYearRef = useRef11(null);
|
|
10264
|
+
const expiryMonthRef = useRef11(null);
|
|
10265
|
+
const cardListRunRef = useRef11(false);
|
|
10266
|
+
const threeDSContainerRef = useRef11(null);
|
|
10262
10267
|
const [activetab, setActive] = useState10("card");
|
|
10263
10268
|
const [activeList, setActiveList] = useState10("card");
|
|
10264
10269
|
const [cardData, setCardData] = useState10();
|
|
@@ -10326,7 +10331,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10326
10331
|
const bankFeeAmount = Number(bankSurcharge || 0);
|
|
10327
10332
|
const bankSavingsAmount = Math.max(bankFeeAmount > 0 ? cardFeeAmount - bankFeeAmount : cardFeeAmount, 0);
|
|
10328
10333
|
const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
|
|
10329
|
-
const tokenizerRef =
|
|
10334
|
+
const tokenizerRef = useRef11(null);
|
|
10330
10335
|
const fractalStyles = {
|
|
10331
10336
|
input: {
|
|
10332
10337
|
"font-family": "'Inter', sans-serif",
|
|
@@ -11186,13 +11191,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11186
11191
|
setOrderLoader(false);
|
|
11187
11192
|
}
|
|
11188
11193
|
};
|
|
11189
|
-
|
|
11194
|
+
useEffect16(() => {
|
|
11190
11195
|
if (!show && !autoTrigger) {
|
|
11191
11196
|
hasRunRef.current = false;
|
|
11192
11197
|
cardListRunRef.current = false;
|
|
11193
11198
|
}
|
|
11194
11199
|
}, [show, autoTrigger]);
|
|
11195
|
-
|
|
11200
|
+
useEffect16(() => {
|
|
11196
11201
|
if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
|
|
11197
11202
|
getPaymentDetails();
|
|
11198
11203
|
if (isPartial && !partialRef) {
|
|
@@ -11200,7 +11205,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11200
11205
|
}
|
|
11201
11206
|
}
|
|
11202
11207
|
}, [show, autoTrigger, isPartial, onLoad]);
|
|
11203
|
-
|
|
11208
|
+
useEffect16(() => {
|
|
11204
11209
|
if ((show || autoTrigger) && pass_fee_amount) {
|
|
11205
11210
|
let cashdisc = Number(amount) - Number(pass_fee_amount);
|
|
11206
11211
|
if (cashdisc && !isNaN(cashdisc)) {
|
|
@@ -11262,7 +11267,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11262
11267
|
console.error("3DS Auth failed \u274C", status);
|
|
11263
11268
|
setError(`3DS Authentication ${status}`);
|
|
11264
11269
|
};
|
|
11265
|
-
|
|
11270
|
+
useEffect16(() => {
|
|
11266
11271
|
if (setHandleCloseRef) {
|
|
11267
11272
|
setHandleCloseRef(() => handleClose);
|
|
11268
11273
|
}
|
|
@@ -11280,18 +11285,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11280
11285
|
setPartialError("");
|
|
11281
11286
|
}
|
|
11282
11287
|
};
|
|
11283
|
-
|
|
11288
|
+
useEffect16(() => {
|
|
11284
11289
|
if (typeof FractalTokenizer === "undefined") return;
|
|
11285
11290
|
const tokenizer = new FractalTokenizer({
|
|
11286
11291
|
styles: {}
|
|
11287
11292
|
});
|
|
11288
11293
|
}, []);
|
|
11289
|
-
const stateRef =
|
|
11294
|
+
const stateRef = useRef11({
|
|
11290
11295
|
activeinBank,
|
|
11291
11296
|
activeinCard,
|
|
11292
11297
|
activetab
|
|
11293
11298
|
});
|
|
11294
|
-
|
|
11299
|
+
useEffect16(() => {
|
|
11295
11300
|
stateRef.current = {
|
|
11296
11301
|
activeinBank,
|
|
11297
11302
|
activeinCard,
|
|
@@ -11315,7 +11320,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11315
11320
|
}
|
|
11316
11321
|
}
|
|
11317
11322
|
}, []);
|
|
11318
|
-
|
|
11323
|
+
useEffect16(() => {
|
|
11319
11324
|
onSubmit == null ? void 0 : onSubmit(submit);
|
|
11320
11325
|
}, [onSubmit, submit]);
|
|
11321
11326
|
function detectCardType(cardinput) {
|
|
@@ -11341,27 +11346,27 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11341
11346
|
const cardType = detectCardType(cardInput);
|
|
11342
11347
|
switch (cardType) {
|
|
11343
11348
|
case "visa":
|
|
11344
|
-
return /* @__PURE__ */
|
|
11349
|
+
return /* @__PURE__ */ jsx35("img", { src: visa2, alt: "visa", width: 33 });
|
|
11345
11350
|
case "mastercard":
|
|
11346
|
-
return /* @__PURE__ */
|
|
11351
|
+
return /* @__PURE__ */ jsx35("img", { src: mastercard2, width: 33, alt: "mastercard" });
|
|
11347
11352
|
case "amex":
|
|
11348
|
-
return /* @__PURE__ */
|
|
11353
|
+
return /* @__PURE__ */ jsx35("img", { src: americanexp2, alt: "amex", width: 33 });
|
|
11349
11354
|
case "discover":
|
|
11350
|
-
return /* @__PURE__ */
|
|
11355
|
+
return /* @__PURE__ */ jsx35("img", { src: discover2, width: 33, alt: "discover" });
|
|
11351
11356
|
case "diners":
|
|
11352
|
-
return /* @__PURE__ */
|
|
11357
|
+
return /* @__PURE__ */ jsx35("img", { src: dinersicon, alt: "Diners Club" });
|
|
11353
11358
|
case "jcb":
|
|
11354
|
-
return /* @__PURE__ */
|
|
11359
|
+
return /* @__PURE__ */ jsx35("img", { src: jcbicon, alt: "JCB" });
|
|
11355
11360
|
case "unionpay":
|
|
11356
|
-
return /* @__PURE__ */
|
|
11361
|
+
return /* @__PURE__ */ jsx35("img", { src: unionicon, alt: "UnionPay" });
|
|
11357
11362
|
default:
|
|
11358
|
-
return /* @__PURE__ */
|
|
11363
|
+
return /* @__PURE__ */ jsx35("img", { src: defualtcardborder, alt: "card" });
|
|
11359
11364
|
}
|
|
11360
11365
|
}
|
|
11361
11366
|
return /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11362
|
-
(initialLoader || !onLoad) && /* @__PURE__ */
|
|
11363
|
-
paymentGateway == 32 && /* @__PURE__ */
|
|
11364
|
-
paymentGateway == 31 && /* @__PURE__ */
|
|
11367
|
+
(initialLoader || !onLoad) && /* @__PURE__ */ jsx35(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
|
|
11368
|
+
paymentGateway == 32 && /* @__PURE__ */ jsx35(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
|
|
11369
|
+
paymentGateway == 31 && /* @__PURE__ */ jsx35(
|
|
11365
11370
|
DataCapScriptLoader,
|
|
11366
11371
|
{
|
|
11367
11372
|
onReady: () => {
|
|
@@ -11374,15 +11379,15 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11374
11379
|
}
|
|
11375
11380
|
}
|
|
11376
11381
|
),
|
|
11377
|
-
error && /* @__PURE__ */
|
|
11378
|
-
errorIframe && /* @__PURE__ */
|
|
11382
|
+
error && /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
|
|
11383
|
+
errorIframe && /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
|
|
11379
11384
|
setErrorIframe("");
|
|
11380
11385
|
}, autoTrigger: onSubmit ? !onSubmit : autoTrigger }) }),
|
|
11381
11386
|
/* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11382
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */
|
|
11387
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx35(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
|
|
11383
11388
|
/* @__PURE__ */ jsxs20("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
|
|
11384
|
-
/* @__PURE__ */
|
|
11385
|
-
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */
|
|
11389
|
+
/* @__PURE__ */ jsx35("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
|
|
11390
|
+
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx35(
|
|
11386
11391
|
ThreeDSChallenge,
|
|
11387
11392
|
{
|
|
11388
11393
|
containerRef: threeDSContainerRef,
|
|
@@ -11393,32 +11398,32 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11393
11398
|
onError: handleError
|
|
11394
11399
|
}
|
|
11395
11400
|
) : /* @__PURE__ */ jsxs20("div", { className: "parent-pay-container", children: [
|
|
11396
|
-
/* @__PURE__ */
|
|
11397
|
-
/* @__PURE__ */
|
|
11398
|
-
/* @__PURE__ */
|
|
11401
|
+
/* @__PURE__ */ jsx35("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs20("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
11402
|
+
/* @__PURE__ */ jsx35("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx35("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" }) }),
|
|
11403
|
+
/* @__PURE__ */ jsx35("defs", { children: /* @__PURE__ */ jsx35("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx35("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
11399
11404
|
] }) }),
|
|
11400
|
-
/* @__PURE__ */
|
|
11405
|
+
/* @__PURE__ */ jsx35("div", { className: "pay-main-logo-res" }),
|
|
11401
11406
|
/* @__PURE__ */ jsxs20("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
|
|
11402
11407
|
!onSubmit && /* @__PURE__ */ jsxs20("div", { className: "pay-header pay-conatiner-one", children: [
|
|
11403
11408
|
/* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-first", children: [
|
|
11404
11409
|
/* @__PURE__ */ jsxs20("div", { className: "pay-logo-container", children: [
|
|
11405
|
-
/* @__PURE__ */
|
|
11406
|
-
/* @__PURE__ */
|
|
11410
|
+
/* @__PURE__ */ jsx35("div", { className: "pay-main-logo" }),
|
|
11411
|
+
/* @__PURE__ */ jsx35("h1", { className: "pay-heading", children: "Pay" }),
|
|
11407
11412
|
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs20("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
|
|
11408
11413
|
" ",
|
|
11409
|
-
/* @__PURE__ */
|
|
11414
|
+
/* @__PURE__ */ jsx35(IoArrowBack4, {}),
|
|
11410
11415
|
" Back"
|
|
11411
11416
|
] })
|
|
11412
11417
|
] }),
|
|
11413
|
-
/* @__PURE__ */
|
|
11414
|
-
/* @__PURE__ */
|
|
11418
|
+
/* @__PURE__ */ jsx35("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
|
|
11419
|
+
/* @__PURE__ */ jsx35("small", { className: "pay-payment-amount", children: "Select payment type" }),
|
|
11415
11420
|
/* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
|
|
11416
|
-
/* @__PURE__ */
|
|
11417
|
-
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */
|
|
11421
|
+
/* @__PURE__ */ jsx35(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
11422
|
+
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx35(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
|
|
11418
11423
|
] }),
|
|
11419
11424
|
isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
|
|
11420
|
-
/* @__PURE__ */
|
|
11421
|
-
/* @__PURE__ */
|
|
11425
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11426
|
+
/* @__PURE__ */ jsx35(
|
|
11422
11427
|
NumericFormat2,
|
|
11423
11428
|
{
|
|
11424
11429
|
prefix: "$",
|
|
@@ -11442,25 +11447,25 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11442
11447
|
}
|
|
11443
11448
|
}
|
|
11444
11449
|
),
|
|
11445
|
-
partialError && /* @__PURE__ */
|
|
11450
|
+
partialError && /* @__PURE__ */ jsx35("span", { className: "error-span", children: partialError })
|
|
11446
11451
|
] })
|
|
11447
11452
|
] }) })
|
|
11448
11453
|
] }),
|
|
11449
11454
|
/* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-last", children: [
|
|
11450
|
-
/* @__PURE__ */
|
|
11451
|
-
/* @__PURE__ */
|
|
11455
|
+
/* @__PURE__ */ jsx35("img", { src: secure2, alt: "" }),
|
|
11456
|
+
/* @__PURE__ */ jsx35("img", { src: pov2, alt: "" }),
|
|
11452
11457
|
"Secure payments powered by Fractal"
|
|
11453
11458
|
] })
|
|
11454
11459
|
] }),
|
|
11455
|
-
/* @__PURE__ */
|
|
11456
|
-
onSubmit && /* @__PURE__ */
|
|
11460
|
+
/* @__PURE__ */ jsx35("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx35("div", { className: "col-md-12", children: /* @__PURE__ */ jsxs20("div", { id: "payment-form-div ", className: onSubmit ? "frac-payment-form-div" : "", children: [
|
|
11461
|
+
onSubmit && /* @__PURE__ */ jsx35("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
|
|
11457
11462
|
/* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
|
|
11458
|
-
/* @__PURE__ */
|
|
11459
|
-
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */
|
|
11463
|
+
/* @__PURE__ */ jsx35(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
11464
|
+
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx35(CardBankRadio, { skydesign: true, label: "Bank", amount: (_d = Number(bankAmount)) == null ? void 0 : _d.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
|
|
11460
11465
|
] }),
|
|
11461
11466
|
isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
|
|
11462
|
-
/* @__PURE__ */
|
|
11463
|
-
/* @__PURE__ */
|
|
11467
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11468
|
+
/* @__PURE__ */ jsx35(
|
|
11464
11469
|
NumericFormat2,
|
|
11465
11470
|
{
|
|
11466
11471
|
prefix: "$",
|
|
@@ -11477,33 +11482,45 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11477
11482
|
fixedDecimalScale: true
|
|
11478
11483
|
}
|
|
11479
11484
|
),
|
|
11480
|
-
partialError && /* @__PURE__ */
|
|
11485
|
+
partialError && /* @__PURE__ */ jsx35("span", { className: "error-span", children: partialError })
|
|
11481
11486
|
] })
|
|
11482
11487
|
] }) }),
|
|
11483
|
-
is3DSEnable ? clientSecret && /* @__PURE__ */
|
|
11488
|
+
is3DSEnable ? clientSecret && /* @__PURE__ */ jsx35(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11484
11489
|
/* @__PURE__ */ jsxs20("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
|
|
11485
11490
|
!onSubmit && /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11486
11491
|
/* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
|
|
11487
|
-
/* @__PURE__ */
|
|
11492
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs20("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
|
|
11488
11493
|
" ",
|
|
11489
|
-
/* @__PURE__ */
|
|
11494
|
+
/* @__PURE__ */ jsx35(IoArrowBack4, {})
|
|
11490
11495
|
] }) }),
|
|
11491
|
-
/* @__PURE__ */
|
|
11496
|
+
/* @__PURE__ */ jsx35("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
11492
11497
|
] }),
|
|
11493
11498
|
/* @__PURE__ */ jsxs20("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
|
|
11494
|
-
/* @__PURE__ */
|
|
11495
|
-
/* @__PURE__ */
|
|
11496
|
-
/* @__PURE__ */
|
|
11497
|
-
/* @__PURE__ */
|
|
11499
|
+
/* @__PURE__ */ jsx35("img", { src: visa2, alt: "", width: 33 }),
|
|
11500
|
+
/* @__PURE__ */ jsx35("img", { src: mastercard2, width: 33, alt: "" }),
|
|
11501
|
+
/* @__PURE__ */ jsx35("img", { src: americanexp2, alt: "", width: 33 }),
|
|
11502
|
+
/* @__PURE__ */ jsx35("img", { src: discover2, width: 33, alt: "" })
|
|
11498
11503
|
] })
|
|
11499
11504
|
] }),
|
|
11500
11505
|
activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11501
|
-
/* @__PURE__ */
|
|
11506
|
+
/* @__PURE__ */ jsx35(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
|
|
11502
11507
|
setActiveinCard("form");
|
|
11503
11508
|
} }),
|
|
11504
|
-
/* @__PURE__ */
|
|
11509
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx35("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: partialAmount ? formatUSD((_e = Number(partialAmount)) == null ? void 0 : _e.toFixed(2)) : formatUSD((_f = Number(amount)) == null ? void 0 : _f.toFixed(2)) }) })
|
|
11505
11510
|
] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11506
|
-
onSubmit && /* @__PURE__ */
|
|
11511
|
+
onSubmit && /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11512
|
+
/* @__PURE__ */ jsx35(
|
|
11513
|
+
ApplePayButton,
|
|
11514
|
+
{
|
|
11515
|
+
applePayAmount: partialAmount ? partialAmount : amount,
|
|
11516
|
+
applePayMerchantId,
|
|
11517
|
+
applePayMerchantName: merchantName,
|
|
11518
|
+
completeFractalFlow,
|
|
11519
|
+
showLoader
|
|
11520
|
+
}
|
|
11521
|
+
),
|
|
11522
|
+
/* @__PURE__ */ jsx35("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx35("span", { children: "or" }) })
|
|
11523
|
+
] }),
|
|
11507
11524
|
/* @__PURE__ */ jsxs20("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11508
11525
|
if (e.key === "Enter" && loading) {
|
|
11509
11526
|
e.preventDefault();
|
|
@@ -11512,18 +11529,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11512
11529
|
}, children: [
|
|
11513
11530
|
/* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11514
11531
|
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11515
|
-
/* @__PURE__ */
|
|
11516
|
-
/* @__PURE__ */
|
|
11532
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11533
|
+
/* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11517
11534
|
const value = e.target.value;
|
|
11518
11535
|
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11519
11536
|
handleCardChange("cardName", value);
|
|
11520
11537
|
}
|
|
11521
11538
|
} }),
|
|
11522
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */
|
|
11539
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11523
11540
|
] }),
|
|
11524
11541
|
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11525
|
-
/* @__PURE__ */
|
|
11526
|
-
/* @__PURE__ */
|
|
11542
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
|
|
11543
|
+
/* @__PURE__ */ jsx35("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && isTokenizerReady && /* @__PURE__ */ jsx35(
|
|
11527
11544
|
FractalFields_default,
|
|
11528
11545
|
{
|
|
11529
11546
|
fractalStyles,
|
|
@@ -11533,17 +11550,17 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11533
11550
|
) })
|
|
11534
11551
|
] }),
|
|
11535
11552
|
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11536
|
-
/* @__PURE__ */
|
|
11537
|
-
/* @__PURE__ */
|
|
11538
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */
|
|
11553
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11554
|
+
/* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_g = cardData == null ? void 0 : cardData.zipCode) != null ? _g : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
|
|
11555
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11539
11556
|
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
|
|
11540
11557
|
"Cards include a fee amount of ",
|
|
11541
|
-
/* @__PURE__ */
|
|
11558
|
+
/* @__PURE__ */ jsx35("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11542
11559
|
"."
|
|
11543
11560
|
] })
|
|
11544
11561
|
] }),
|
|
11545
|
-
customerId && /* @__PURE__ */
|
|
11546
|
-
/* @__PURE__ */
|
|
11562
|
+
customerId && /* @__PURE__ */ jsx35("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
11563
|
+
/* @__PURE__ */ jsx35(
|
|
11547
11564
|
"input",
|
|
11548
11565
|
{
|
|
11549
11566
|
type: "checkbox",
|
|
@@ -11553,10 +11570,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11553
11570
|
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11554
11571
|
}
|
|
11555
11572
|
),
|
|
11556
|
-
/* @__PURE__ */
|
|
11557
|
-
/* @__PURE__ */
|
|
11573
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11574
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11558
11575
|
/* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
|
|
11559
|
-
/* @__PURE__ */
|
|
11576
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
|
|
11560
11577
|
"svg",
|
|
11561
11578
|
{
|
|
11562
11579
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11565,8 +11582,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11565
11582
|
viewBox: "0 0 20 20",
|
|
11566
11583
|
fill: "none",
|
|
11567
11584
|
children: [
|
|
11568
|
-
/* @__PURE__ */
|
|
11569
|
-
/* @__PURE__ */
|
|
11585
|
+
/* @__PURE__ */ jsx35("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11586
|
+
/* @__PURE__ */ jsx35(
|
|
11570
11587
|
"path",
|
|
11571
11588
|
{
|
|
11572
11589
|
d: "M9.03406 12.0979V12.0072C9.04055 11.4153 9.10057 10.9443 9.21411 10.5943C9.3309 10.2442 9.49635 9.96102 9.71046 9.74463C9.92457 9.52824 10.1825 9.33095 10.4842 9.15274C10.6788 9.03182 10.854 8.89658 11.0097 8.74702C11.1655 8.59745 11.2887 8.42562 11.3796 8.2315C11.4704 8.03739 11.5158 7.82259 11.5158 7.58711C11.5158 7.3039 11.4477 7.05887 11.3114 6.85203C11.1752 6.64519 10.9935 6.48608 10.7664 6.3747C10.5426 6.26014 10.2928 6.20286 10.017 6.20286C9.76723 6.20286 9.52879 6.25378 9.3017 6.35561C9.07461 6.45744 8.88646 6.61655 8.73723 6.83294C8.588 7.04614 8.50203 7.3214 8.47932 7.65871H7C7.02271 7.08592 7.17032 6.60223 7.44282 6.20764C7.71533 5.80986 8.07543 5.50915 8.52311 5.30549C8.97405 5.10183 9.47202 5 10.017 5C10.6139 5 11.1363 5.10979 11.5839 5.32936C12.0316 5.54574 12.3788 5.84964 12.6253 6.24105C12.8751 6.62928 13 7.08274 13 7.60143C13 7.95784 12.9432 8.27924 12.8297 8.56563C12.7161 8.84885 12.5539 9.10183 12.3431 9.32458C12.1354 9.54733 11.8856 9.74463 11.5937 9.91647C11.3179 10.0851 11.0941 10.2601 10.9221 10.4415C10.7534 10.6229 10.6302 10.8377 10.5523 11.0859C10.4745 11.3341 10.4323 11.6412 10.4258 12.0072V12.0979H9.03406ZM9.76886 15C9.50284 15 9.27413 14.9077 9.08273 14.7232C8.89132 14.5354 8.79562 14.3095 8.79562 14.0453C8.79562 13.7844 8.89132 13.5617 9.08273 13.3771C9.27413 13.1893 9.50284 13.0955 9.76886 13.0955C10.0316 13.0955 10.2587 13.1893 10.4501 13.3771C10.6448 13.5617 10.7421 13.7844 10.7421 14.0453C10.7421 14.2204 10.6967 14.3811 10.6058 14.5274C10.5182 14.6706 10.4015 14.7852 10.2555 14.8711C10.1095 14.957 9.94728 15 9.76886 15Z",
|
|
@@ -11576,15 +11593,15 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11576
11593
|
]
|
|
11577
11594
|
}
|
|
11578
11595
|
) }),
|
|
11579
|
-
/* @__PURE__ */
|
|
11596
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
|
|
11580
11597
|
"If checked, I agree to give the ",
|
|
11581
|
-
/* @__PURE__ */
|
|
11598
|
+
/* @__PURE__ */ jsx35("b", { children: merchantName || "merchant" }),
|
|
11582
11599
|
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11583
11600
|
] }) })
|
|
11584
11601
|
] })
|
|
11585
11602
|
] }) })
|
|
11586
11603
|
] }),
|
|
11587
|
-
/* @__PURE__ */
|
|
11604
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx35("button", { type: "submit", style: { margin: 0, display: onSubmit ? "none" : "block" }, className: "pay-button", children: partialAmount ? formatUSD((_h = Number(partialAmount)) == null ? void 0 : _h.toFixed(2)) : formatUSD((_i = Number(amount)) == null ? void 0 : _i.toFixed(2)) }) })
|
|
11588
11605
|
] })
|
|
11589
11606
|
] }) : /* @__PURE__ */ jsxs20("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11590
11607
|
if (e.key === "Enter" && loading) {
|
|
@@ -11594,16 +11611,16 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11594
11611
|
}, children: [
|
|
11595
11612
|
/* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11596
11613
|
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11597
|
-
/* @__PURE__ */
|
|
11598
|
-
/* @__PURE__ */
|
|
11614
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11615
|
+
/* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11599
11616
|
const value = e.target.value;
|
|
11600
11617
|
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11601
11618
|
handleCardChange("cardName", value);
|
|
11602
11619
|
}
|
|
11603
11620
|
} }),
|
|
11604
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */
|
|
11621
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11605
11622
|
] }),
|
|
11606
|
-
/* @__PURE__ */
|
|
11623
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx35(
|
|
11607
11624
|
DataCapFields,
|
|
11608
11625
|
{
|
|
11609
11626
|
isOpen: show || autoTrigger,
|
|
@@ -11614,17 +11631,17 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11614
11631
|
}
|
|
11615
11632
|
) }),
|
|
11616
11633
|
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11617
|
-
/* @__PURE__ */
|
|
11618
|
-
/* @__PURE__ */
|
|
11619
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */
|
|
11634
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11635
|
+
/* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_j = cardData == null ? void 0 : cardData.zipCode) != null ? _j : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
|
|
11636
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11620
11637
|
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
|
|
11621
11638
|
"Cards include a fee amount of ",
|
|
11622
|
-
/* @__PURE__ */
|
|
11639
|
+
/* @__PURE__ */ jsx35("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11623
11640
|
"."
|
|
11624
11641
|
] })
|
|
11625
11642
|
] }),
|
|
11626
|
-
customerId && /* @__PURE__ */
|
|
11627
|
-
/* @__PURE__ */
|
|
11643
|
+
customerId && /* @__PURE__ */ jsx35("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
11644
|
+
/* @__PURE__ */ jsx35(
|
|
11628
11645
|
"input",
|
|
11629
11646
|
{
|
|
11630
11647
|
type: "checkbox",
|
|
@@ -11634,10 +11651,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11634
11651
|
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11635
11652
|
}
|
|
11636
11653
|
),
|
|
11637
|
-
/* @__PURE__ */
|
|
11638
|
-
/* @__PURE__ */
|
|
11654
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11655
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11639
11656
|
/* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
|
|
11640
|
-
/* @__PURE__ */
|
|
11657
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
|
|
11641
11658
|
"svg",
|
|
11642
11659
|
{
|
|
11643
11660
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11646,8 +11663,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11646
11663
|
viewBox: "0 0 20 20",
|
|
11647
11664
|
fill: "none",
|
|
11648
11665
|
children: [
|
|
11649
|
-
/* @__PURE__ */
|
|
11650
|
-
/* @__PURE__ */
|
|
11666
|
+
/* @__PURE__ */ jsx35("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11667
|
+
/* @__PURE__ */ jsx35(
|
|
11651
11668
|
"path",
|
|
11652
11669
|
{
|
|
11653
11670
|
d: "M9.03406 12.0979V12.0072C9.04055 11.4153 9.10057 10.9443 9.21411 10.5943C9.3309 10.2442 9.49635 9.96102 9.71046 9.74463C9.92457 9.52824 10.1825 9.33095 10.4842 9.15274C10.6788 9.03182 10.854 8.89658 11.0097 8.74702C11.1655 8.59745 11.2887 8.42562 11.3796 8.2315C11.4704 8.03739 11.5158 7.82259 11.5158 7.58711C11.5158 7.3039 11.4477 7.05887 11.3114 6.85203C11.1752 6.64519 10.9935 6.48608 10.7664 6.3747C10.5426 6.26014 10.2928 6.20286 10.017 6.20286C9.76723 6.20286 9.52879 6.25378 9.3017 6.35561C9.07461 6.45744 8.88646 6.61655 8.73723 6.83294C8.588 7.04614 8.50203 7.3214 8.47932 7.65871H7C7.02271 7.08592 7.17032 6.60223 7.44282 6.20764C7.71533 5.80986 8.07543 5.50915 8.52311 5.30549C8.97405 5.10183 9.47202 5 10.017 5C10.6139 5 11.1363 5.10979 11.5839 5.32936C12.0316 5.54574 12.3788 5.84964 12.6253 6.24105C12.8751 6.62928 13 7.08274 13 7.60143C13 7.95784 12.9432 8.27924 12.8297 8.56563C12.7161 8.84885 12.5539 9.10183 12.3431 9.32458C12.1354 9.54733 11.8856 9.74463 11.5937 9.91647C11.3179 10.0851 11.0941 10.2601 10.9221 10.4415C10.7534 10.6229 10.6302 10.8377 10.5523 11.0859C10.4745 11.3341 10.4323 11.6412 10.4258 12.0072V12.0979H9.03406ZM9.76886 15C9.50284 15 9.27413 14.9077 9.08273 14.7232C8.89132 14.5354 8.79562 14.3095 8.79562 14.0453C8.79562 13.7844 8.89132 13.5617 9.08273 13.3771C9.27413 13.1893 9.50284 13.0955 9.76886 13.0955C10.0316 13.0955 10.2587 13.1893 10.4501 13.3771C10.6448 13.5617 10.7421 13.7844 10.7421 14.0453C10.7421 14.2204 10.6967 14.3811 10.6058 14.5274C10.5182 14.6706 10.4015 14.7852 10.2555 14.8711C10.1095 14.957 9.94728 15 9.76886 15Z",
|
|
@@ -11657,30 +11674,30 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11657
11674
|
]
|
|
11658
11675
|
}
|
|
11659
11676
|
) }),
|
|
11660
|
-
/* @__PURE__ */
|
|
11677
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
|
|
11661
11678
|
"If checked, I agree to give the ",
|
|
11662
|
-
/* @__PURE__ */
|
|
11679
|
+
/* @__PURE__ */ jsx35("b", { children: merchantName || "merchant" }),
|
|
11663
11680
|
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11664
11681
|
] }) })
|
|
11665
11682
|
] })
|
|
11666
11683
|
] }) })
|
|
11667
11684
|
] }),
|
|
11668
|
-
/* @__PURE__ */
|
|
11685
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx35("button", { type: "submit", style: { margin: 0, display: onSubmit ? "none" : "block" }, className: "pay-button", children: partialAmount ? formatUSD((_k = Number(partialAmount)) == null ? void 0 : _k.toFixed(2)) : formatUSD((_l = Number(amount)) == null ? void 0 : _l.toFixed(2)) }) })
|
|
11669
11686
|
] })
|
|
11670
11687
|
] }),
|
|
11671
|
-
/* @__PURE__ */
|
|
11688
|
+
/* @__PURE__ */ jsx35("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11672
11689
|
!onSubmit && /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
|
|
11673
|
-
/* @__PURE__ */
|
|
11690
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs20("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
|
|
11674
11691
|
" ",
|
|
11675
|
-
/* @__PURE__ */
|
|
11692
|
+
/* @__PURE__ */ jsx35(IoArrowBack4, {})
|
|
11676
11693
|
] }) }),
|
|
11677
|
-
/* @__PURE__ */
|
|
11694
|
+
/* @__PURE__ */ jsx35("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
|
|
11678
11695
|
] }),
|
|
11679
11696
|
activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11680
|
-
/* @__PURE__ */
|
|
11697
|
+
/* @__PURE__ */ jsx35(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
|
|
11681
11698
|
setActiveinBank("form");
|
|
11682
11699
|
} }),
|
|
11683
|
-
/* @__PURE__ */
|
|
11700
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx35("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_m = Number(bankAmount)) == null ? void 0 : _m.toFixed(2)) }) })
|
|
11684
11701
|
] }) : /* @__PURE__ */ jsxs20("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
|
|
11685
11702
|
if (e.key === "Enter" && loading) {
|
|
11686
11703
|
e.preventDefault();
|
|
@@ -11692,13 +11709,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11692
11709
|
maxHeight: "444px"
|
|
11693
11710
|
}, children: [
|
|
11694
11711
|
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11695
|
-
/* @__PURE__ */
|
|
11696
|
-
/* @__PURE__ */
|
|
11697
|
-
(achError == null ? void 0 : achError.name) && /* @__PURE__ */
|
|
11712
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
11713
|
+
/* @__PURE__ */ jsx35("input", { type: "text", id: "nameonaccount", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", name: "name", value: (_n = achData == null ? void 0 : achData.name) != null ? _n : "", onChange: handleChangeAch }),
|
|
11714
|
+
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
11698
11715
|
] }),
|
|
11699
11716
|
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11700
|
-
/* @__PURE__ */
|
|
11701
|
-
/* @__PURE__ */
|
|
11717
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "routingnumber", children: "Routing number" }),
|
|
11718
|
+
/* @__PURE__ */ jsx35(
|
|
11702
11719
|
"input",
|
|
11703
11720
|
{
|
|
11704
11721
|
type: "text",
|
|
@@ -11711,11 +11728,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11711
11728
|
onChange: handleChangeAch
|
|
11712
11729
|
}
|
|
11713
11730
|
),
|
|
11714
|
-
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */
|
|
11731
|
+
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
|
|
11715
11732
|
] }),
|
|
11716
11733
|
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11717
|
-
/* @__PURE__ */
|
|
11718
|
-
/* @__PURE__ */
|
|
11734
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "accountnumber", children: "Account number" }),
|
|
11735
|
+
/* @__PURE__ */ jsx35(
|
|
11719
11736
|
"input",
|
|
11720
11737
|
{
|
|
11721
11738
|
type: "text",
|
|
@@ -11728,11 +11745,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11728
11745
|
onChange: handleChangeAch
|
|
11729
11746
|
}
|
|
11730
11747
|
),
|
|
11731
|
-
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */
|
|
11748
|
+
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
|
|
11732
11749
|
] }),
|
|
11733
11750
|
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11734
|
-
/* @__PURE__ */
|
|
11735
|
-
/* @__PURE__ */
|
|
11751
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
|
|
11752
|
+
/* @__PURE__ */ jsx35(
|
|
11736
11753
|
"input",
|
|
11737
11754
|
{
|
|
11738
11755
|
type: "text",
|
|
@@ -11745,11 +11762,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11745
11762
|
onChange: handleChangeAch
|
|
11746
11763
|
}
|
|
11747
11764
|
),
|
|
11748
|
-
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */
|
|
11765
|
+
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
|
|
11749
11766
|
] }),
|
|
11750
11767
|
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11751
|
-
/* @__PURE__ */
|
|
11752
|
-
/* @__PURE__ */
|
|
11768
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "bankname", children: "Bank name" }),
|
|
11769
|
+
/* @__PURE__ */ jsx35(
|
|
11753
11770
|
"input",
|
|
11754
11771
|
{
|
|
11755
11772
|
type: "text",
|
|
@@ -11762,11 +11779,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11762
11779
|
onChange: handleChangeAch
|
|
11763
11780
|
}
|
|
11764
11781
|
),
|
|
11765
|
-
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */
|
|
11782
|
+
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
|
|
11766
11783
|
] }),
|
|
11767
11784
|
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11768
|
-
/* @__PURE__ */
|
|
11769
|
-
/* @__PURE__ */
|
|
11785
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "companyName", children: "Company name" }),
|
|
11786
|
+
/* @__PURE__ */ jsx35(
|
|
11770
11787
|
"input",
|
|
11771
11788
|
{
|
|
11772
11789
|
type: "text",
|
|
@@ -11779,44 +11796,44 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11779
11796
|
onChange: handleChangeAch
|
|
11780
11797
|
}
|
|
11781
11798
|
),
|
|
11782
|
-
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */
|
|
11799
|
+
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
|
|
11783
11800
|
] }),
|
|
11784
11801
|
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11785
|
-
/* @__PURE__ */
|
|
11802
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "accounttype", children: "Select account type" }),
|
|
11786
11803
|
/* @__PURE__ */ jsxs20("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
|
|
11787
|
-
/* @__PURE__ */
|
|
11788
|
-
accountTypes.map((type) => /* @__PURE__ */
|
|
11804
|
+
/* @__PURE__ */ jsx35("option", { value: "", children: "Select account" }),
|
|
11805
|
+
accountTypes.map((type) => /* @__PURE__ */ jsx35("option", { value: type.value, children: type.label }, type.value))
|
|
11789
11806
|
] }),
|
|
11790
11807
|
bankFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
|
|
11791
11808
|
"There is a processing fee of ",
|
|
11792
|
-
/* @__PURE__ */
|
|
11809
|
+
/* @__PURE__ */ jsx35("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
|
|
11793
11810
|
"."
|
|
11794
11811
|
] }),
|
|
11795
11812
|
!saveACHinfo && /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11796
11813
|
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11797
|
-
/* @__PURE__ */
|
|
11814
|
+
/* @__PURE__ */ jsx35("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
|
|
11798
11815
|
setIsBankConsentChecked(e.target.checked);
|
|
11799
11816
|
if (e.target.checked) {
|
|
11800
11817
|
setErrorBankConsent("");
|
|
11801
11818
|
}
|
|
11802
11819
|
} }),
|
|
11803
|
-
/* @__PURE__ */
|
|
11820
|
+
/* @__PURE__ */ jsx35("label", { className: "saveachlabel", htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${merchantName || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
|
|
11804
11821
|
] }),
|
|
11805
|
-
errorBankConsent && /* @__PURE__ */
|
|
11822
|
+
errorBankConsent && /* @__PURE__ */ jsx35("span", { className: "error-span", children: errorBankConsent })
|
|
11806
11823
|
] }),
|
|
11807
11824
|
customerId && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11808
|
-
/* @__PURE__ */
|
|
11825
|
+
/* @__PURE__ */ jsx35("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
|
|
11809
11826
|
setSaveACHinfo(e.target.checked);
|
|
11810
11827
|
if (!e.target.checked) {
|
|
11811
11828
|
setSaveACHConsent1(false);
|
|
11812
11829
|
setErrorBankConsentOther("");
|
|
11813
11830
|
}
|
|
11814
11831
|
} }),
|
|
11815
|
-
/* @__PURE__ */
|
|
11832
|
+
/* @__PURE__ */ jsx35("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save for future use" })
|
|
11816
11833
|
] }),
|
|
11817
11834
|
saveACHinfo && /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11818
11835
|
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11819
|
-
/* @__PURE__ */
|
|
11836
|
+
/* @__PURE__ */ jsx35("input", { type: "checkbox", id: "saveACHConsent1", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHConsent1, onChange: (e) => {
|
|
11820
11837
|
setSaveACHConsent1(e.target.checked);
|
|
11821
11838
|
if (e.target.checked) {
|
|
11822
11839
|
setErrorBankConsentOther("");
|
|
@@ -11828,11 +11845,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11828
11845
|
" to store my bank account details for future ACH payments. I understand that future payments may be initiated using this saved account in accordance with my instructions. I confirm I am authorized to use this bank account."
|
|
11829
11846
|
] })
|
|
11830
11847
|
] }),
|
|
11831
|
-
errorBankConsentOther && /* @__PURE__ */
|
|
11848
|
+
errorBankConsentOther && /* @__PURE__ */ jsx35("span", { className: "error-span", children: errorBankConsentOther })
|
|
11832
11849
|
] })
|
|
11833
11850
|
] })
|
|
11834
11851
|
] }),
|
|
11835
|
-
/* @__PURE__ */
|
|
11852
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx35("button", { className: "pay-button", style: { margin: "20px 0 0", display: onSubmit ? "none" : "block" }, type: "submit", children: formatUSD((_u = Number(bankAmount)) == null ? void 0 : _u.toFixed(2)) }) })
|
|
11836
11853
|
] })
|
|
11837
11854
|
] }) })
|
|
11838
11855
|
] })
|
|
@@ -11847,7 +11864,7 @@ var ModelContentSky_default = ModelContentSky;
|
|
|
11847
11864
|
|
|
11848
11865
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
11849
11866
|
import axios10 from "axios";
|
|
11850
|
-
import { Fragment as Fragment20, jsx as
|
|
11867
|
+
import { Fragment as Fragment20, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
11851
11868
|
var PaymentWidget = ({
|
|
11852
11869
|
amount,
|
|
11853
11870
|
bankAmount,
|
|
@@ -11927,7 +11944,7 @@ var PaymentWidget = ({
|
|
|
11927
11944
|
]
|
|
11928
11945
|
);
|
|
11929
11946
|
const [commonProps, setCommonProps] = useState11(initialCommonProps);
|
|
11930
|
-
|
|
11947
|
+
useEffect17(() => {
|
|
11931
11948
|
if (show) {
|
|
11932
11949
|
setCommonProps(initialCommonProps);
|
|
11933
11950
|
}
|
|
@@ -11958,33 +11975,33 @@ var PaymentWidget = ({
|
|
|
11958
11975
|
setLoading(false);
|
|
11959
11976
|
}
|
|
11960
11977
|
};
|
|
11961
|
-
|
|
11978
|
+
useEffect17(() => {
|
|
11962
11979
|
if (show && isPartial && partialRef) {
|
|
11963
11980
|
getskyosOrderDetails();
|
|
11964
11981
|
}
|
|
11965
11982
|
}, [show, isPartial, partialRef]);
|
|
11966
11983
|
return /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11967
|
-
/* @__PURE__ */
|
|
11968
|
-
/* @__PURE__ */
|
|
11969
|
-
/* @__PURE__ */
|
|
11970
|
-
/* @__PURE__ */
|
|
11971
|
-
/* @__PURE__ */
|
|
11984
|
+
/* @__PURE__ */ jsx36("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
11985
|
+
/* @__PURE__ */ jsx36(DataScript, {}),
|
|
11986
|
+
/* @__PURE__ */ jsx36(SkyChargewidgetstyles, {}),
|
|
11987
|
+
/* @__PURE__ */ jsx36(CardBankRadioStyles, {}),
|
|
11988
|
+
/* @__PURE__ */ jsx36(CustomModal2styles_default, {}),
|
|
11972
11989
|
!autoTrigger && /* @__PURE__ */ jsxs21("button", { className: submitBtnClass || "paymentBtn", disabled: disableSubmitBtn, onClick: () => setShow(true), children: [
|
|
11973
11990
|
submitBtnText,
|
|
11974
11991
|
submitBtnIcon
|
|
11975
11992
|
] }),
|
|
11976
|
-
!autoTrigger ? /* @__PURE__ */
|
|
11993
|
+
!autoTrigger ? /* @__PURE__ */ jsx36(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx36(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx36(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
|
|
11977
11994
|
] });
|
|
11978
11995
|
};
|
|
11979
11996
|
|
|
11980
11997
|
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
11981
|
-
import { useEffect as
|
|
11998
|
+
import { useEffect as useEffect19, useState as useState12, useMemo as useMemo2 } from "react";
|
|
11982
11999
|
import axios11 from "axios";
|
|
11983
12000
|
|
|
11984
12001
|
// src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
|
|
11985
|
-
import { jsx as
|
|
12002
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
11986
12003
|
function EmbeddedCheckoutStyles({ extraCustomCSS }) {
|
|
11987
|
-
return /* @__PURE__ */
|
|
12004
|
+
return /* @__PURE__ */ jsx37("style", { children: `
|
|
11988
12005
|
|
|
11989
12006
|
.pay-amount-conatiner{
|
|
11990
12007
|
margin-top: 20px !important;
|
|
@@ -12330,10 +12347,10 @@ padding:0px !important;
|
|
|
12330
12347
|
}
|
|
12331
12348
|
|
|
12332
12349
|
// src/app/components/Atoms/Applepay/ApplePayScriptLoader.tsx
|
|
12333
|
-
import { useEffect as
|
|
12350
|
+
import { useEffect as useEffect18 } from "react";
|
|
12334
12351
|
var applePayScriptLoaded = false;
|
|
12335
12352
|
var ApplePayScriptLoader = () => {
|
|
12336
|
-
|
|
12353
|
+
useEffect18(() => {
|
|
12337
12354
|
if (applePayScriptLoaded) return;
|
|
12338
12355
|
const existingScript = document.querySelector(
|
|
12339
12356
|
`script[src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"]`
|
|
@@ -12359,7 +12376,7 @@ var ApplePayScriptLoader = () => {
|
|
|
12359
12376
|
};
|
|
12360
12377
|
|
|
12361
12378
|
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
12362
|
-
import { Fragment as Fragment21, jsx as
|
|
12379
|
+
import { Fragment as Fragment21, jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
12363
12380
|
var EmbeddedCheckout = ({
|
|
12364
12381
|
amount,
|
|
12365
12382
|
bankAmount,
|
|
@@ -12438,7 +12455,7 @@ var EmbeddedCheckout = ({
|
|
|
12438
12455
|
]
|
|
12439
12456
|
);
|
|
12440
12457
|
const [commonProps, setCommonProps] = useState12(initialCommonProps);
|
|
12441
|
-
|
|
12458
|
+
useEffect19(() => {
|
|
12442
12459
|
if (show) {
|
|
12443
12460
|
setCommonProps(initialCommonProps);
|
|
12444
12461
|
}
|
|
@@ -12469,13 +12486,13 @@ var EmbeddedCheckout = ({
|
|
|
12469
12486
|
setLoading(false);
|
|
12470
12487
|
}
|
|
12471
12488
|
};
|
|
12472
|
-
|
|
12489
|
+
useEffect19(() => {
|
|
12473
12490
|
if (autoTrigger && isPartial && partialRef) {
|
|
12474
12491
|
getskyosOrderDetails();
|
|
12475
12492
|
}
|
|
12476
12493
|
}, [autoTrigger, isPartial, partialRef]);
|
|
12477
12494
|
console.log(onLoad, "onLoad");
|
|
12478
|
-
|
|
12495
|
+
useEffect19(() => {
|
|
12479
12496
|
const supported = !!window.ApplePaySession;
|
|
12480
12497
|
let canPay = false;
|
|
12481
12498
|
if (supported) {
|
|
@@ -12487,18 +12504,18 @@ var EmbeddedCheckout = ({
|
|
|
12487
12504
|
console.log(`ApplePaySession: ${supported}, canMakePayments: ${canPay}`);
|
|
12488
12505
|
}, []);
|
|
12489
12506
|
return /* @__PURE__ */ jsxs22(Fragment21, { children: [
|
|
12490
|
-
/* @__PURE__ */
|
|
12491
|
-
/* @__PURE__ */
|
|
12492
|
-
/* @__PURE__ */
|
|
12493
|
-
/* @__PURE__ */
|
|
12494
|
-
/* @__PURE__ */
|
|
12495
|
-
/* @__PURE__ */
|
|
12496
|
-
/* @__PURE__ */
|
|
12507
|
+
/* @__PURE__ */ jsx38("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
12508
|
+
/* @__PURE__ */ jsx38(DataScript, {}),
|
|
12509
|
+
/* @__PURE__ */ jsx38(SkyChargewidgetstyles, {}),
|
|
12510
|
+
/* @__PURE__ */ jsx38(CardBankRadioStyles, {}),
|
|
12511
|
+
/* @__PURE__ */ jsx38(CustomModal2styles_default, {}),
|
|
12512
|
+
/* @__PURE__ */ jsx38(ApplePayScriptLoader, {}),
|
|
12513
|
+
/* @__PURE__ */ jsx38(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS }),
|
|
12497
12514
|
!autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
12498
12515
|
submitBtnText,
|
|
12499
12516
|
submitBtnIcon
|
|
12500
12517
|
] }),
|
|
12501
|
-
!autoTrigger ? /* @__PURE__ */
|
|
12518
|
+
!autoTrigger ? /* @__PURE__ */ jsx38(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx38(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx38(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
|
|
12502
12519
|
] });
|
|
12503
12520
|
};
|
|
12504
12521
|
export {
|