@pinerohit11/testwidget 0.2.114 → 0.2.116
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 +341 -226
- package/dist/index.mjs +300 -185
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -133,8 +133,8 @@ var Loader = (props) => {
|
|
133
133
|
var Loader_default = Loader;
|
134
134
|
|
135
135
|
// src/app/components/baseurl.ts
|
136
|
-
var
|
137
|
-
var
|
136
|
+
var masterBaseUrl = "https://dev-sky-node.fractalpay.com/";
|
137
|
+
var baseUrl = "https://dev-widget.fractalpay.com/";
|
138
138
|
|
139
139
|
// src/app/components/Errortext.ts
|
140
140
|
var ErrorText = {
|
@@ -1159,7 +1159,7 @@ function RequestPreAuthPayment(props) {
|
|
1159
1159
|
}
|
1160
1160
|
|
1161
1161
|
// src/app/components/Charge/GetPaymentPage.tsx
|
1162
|
-
import
|
1162
|
+
import React13, { useEffect as useEffect4, useState as useState3 } from "react";
|
1163
1163
|
|
1164
1164
|
// src/app/components/Charge/Chargewidgetstyles.tsx
|
1165
1165
|
import React8 from "react";
|
@@ -1605,14 +1605,14 @@ function Chargewidgetstyles() {
|
|
1605
1605
|
display:flex;
|
1606
1606
|
gap:12px;
|
1607
1607
|
}
|
1608
|
-
.card-number-last-four{
|
1609
|
-
color:#161616;
|
1610
|
-
font-family:Inter;
|
1611
|
-
font-size:14px;
|
1612
|
-
font-weight:500;
|
1613
|
-
font-style
|
1614
|
-
line-height : 18px;
|
1615
|
-
latter-spacing:-0.18px
|
1608
|
+
.card-number-radio .card-number-last-four{
|
1609
|
+
color:#161616 !important;
|
1610
|
+
font-family:Inter !important;
|
1611
|
+
font-size:14px !important;
|
1612
|
+
font-weight:500 !important;
|
1613
|
+
font-style:normal !important;
|
1614
|
+
line-height : 18px !important;
|
1615
|
+
latter-spacing:-0.18px !important
|
1616
1616
|
}
|
1617
1617
|
.card-expiry-date{
|
1618
1618
|
margin:0;
|
@@ -2113,10 +2113,132 @@ function DataScript() {
|
|
2113
2113
|
return null;
|
2114
2114
|
}
|
2115
2115
|
|
2116
|
+
// src/app/components/ErrorCardMessage/ErrorCardMessage.tsx
|
2117
|
+
import React12 from "react";
|
2118
|
+
|
2119
|
+
// src/app/components/ErrorCardMessage/ErrorCardMessageStyle.tsx
|
2120
|
+
import React11 from "react";
|
2121
|
+
function ErrorCardMszStyle() {
|
2122
|
+
return /* @__PURE__ */ React11.createElement("style", null, `
|
2123
|
+
.card-error .logo-container {
|
2124
|
+
display: flex;
|
2125
|
+
justify-content: center;
|
2126
|
+
align-items: center;
|
2127
|
+
margin-bottom: -50px; /* Adjust this to overlap the content */
|
2128
|
+
z-index: 10;
|
2129
|
+
}
|
2130
|
+
|
2131
|
+
.card-error .client-logo {
|
2132
|
+
max-width: 100px;
|
2133
|
+
height: auto;
|
2134
|
+
object-fit: contain;
|
2135
|
+
display: block;
|
2136
|
+
}
|
2137
|
+
|
2138
|
+
.card-error .payment-error-container {
|
2139
|
+
display: flex;
|
2140
|
+
flex-direction: column;
|
2141
|
+
align-items: center;
|
2142
|
+
padding: 18px 20px 24px;
|
2143
|
+
// width: 335px;
|
2144
|
+
min-height: 250px; /* Fixed height */
|
2145
|
+
background: #FFFFFF;
|
2146
|
+
border-radius: 12px;
|
2147
|
+
position: relative;
|
2148
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
2149
|
+
border: 1px solid #e3e3e3;
|
2150
|
+
justify-content: center;
|
2151
|
+
text-align: center;
|
2152
|
+
// margin-top: 50px; /* Adjust this to move the content down */
|
2153
|
+
margin: 50px auto 0 auto !important;
|
2154
|
+
}
|
2155
|
+
|
2156
|
+
.card-error .error-icon {
|
2157
|
+
display: flex;
|
2158
|
+
flex-direction: column;
|
2159
|
+
align-items: center;
|
2160
|
+
gap: 12px;
|
2161
|
+
min-height: 116px;
|
2162
|
+
z-index: 2;
|
2163
|
+
}
|
2164
|
+
|
2165
|
+
.card-error .circle {
|
2166
|
+
width: 50px;
|
2167
|
+
height: 50px;
|
2168
|
+
border: 1px solid red;
|
2169
|
+
border-radius: 50%;
|
2170
|
+
display: flex;
|
2171
|
+
justify-content: center;
|
2172
|
+
align-items: center;
|
2173
|
+
margin-bottom:20px
|
2174
|
+
}
|
2175
|
+
|
2176
|
+
.card-error .circle .fa-times {
|
2177
|
+
font-size: 30px;
|
2178
|
+
color: red;
|
2179
|
+
}
|
2180
|
+
|
2181
|
+
.card-error .error-text {
|
2182
|
+
display: flex;
|
2183
|
+
flex-direction: column;
|
2184
|
+
justify-content: center;
|
2185
|
+
align-items: center;
|
2186
|
+
gap: 4px;
|
2187
|
+
// width: 227px;
|
2188
|
+
}
|
2189
|
+
|
2190
|
+
.card-error .payment-error-text {
|
2191
|
+
font-family: 'Inter', sans-serif;
|
2192
|
+
font-weight: 500;
|
2193
|
+
font-size: 18px;
|
2194
|
+
line-height: 21px;
|
2195
|
+
text-align: center;
|
2196
|
+
letter-spacing: -0.02em;
|
2197
|
+
color: #161616;
|
2198
|
+
}
|
2199
|
+
|
2200
|
+
.card-error .thank-you-text {
|
2201
|
+
font-family: 'Inter', sans-serif;
|
2202
|
+
font-weight: 500;
|
2203
|
+
font-size: 16px;
|
2204
|
+
line-height: 18px;
|
2205
|
+
text-align: center;
|
2206
|
+
letter-spacing: -0.02em;
|
2207
|
+
color: #161616 !important;
|
2208
|
+
opacity: 0.5;
|
2209
|
+
padding-top:10px
|
2210
|
+
}
|
2211
|
+
|
2212
|
+
.card-error .error-btn-div{
|
2213
|
+
padding-top:30px;
|
2214
|
+
|
2215
|
+
}
|
2216
|
+
.card-error .error-btn-div button{
|
2217
|
+
border-radius: 0.25em;
|
2218
|
+
border:none;
|
2219
|
+
background: initial;
|
2220
|
+
background-color: #7066e0;
|
2221
|
+
box-shadow: var(--swal2-confirm-button-box-shadow);
|
2222
|
+
color: white;
|
2223
|
+
font-size: 1em;
|
2224
|
+
padding:10px 17px;
|
2225
|
+
cursor:pointer;
|
2226
|
+
}
|
2227
|
+
`);
|
2228
|
+
}
|
2229
|
+
|
2230
|
+
// src/app/components/ErrorCardMessage/ErrorCardMessage.tsx
|
2231
|
+
var ErrorCardMessage = ({ onClose, error }) => {
|
2232
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(ErrorCardMszStyle, null), /* @__PURE__ */ React12.createElement("div", { className: "card-error" }, /* @__PURE__ */ React12.createElement("div", { className: "payment-error-container" }, /* @__PURE__ */ React12.createElement("div", { className: "error-icon" }, /* @__PURE__ */ React12.createElement("div", { className: "circle" }, /* @__PURE__ */ React12.createElement("i", { className: "fa fa-times", "aria-hidden": "true" })), /* @__PURE__ */ React12.createElement("div", { className: "error-text" }, /* @__PURE__ */ React12.createElement("div", { className: "payment-error-text" }, error), /* @__PURE__ */ React12.createElement("div", { className: "thank-you-text" }, "Try again later ")), /* @__PURE__ */ React12.createElement("div", { className: "error-btn-div" }, /* @__PURE__ */ React12.createElement("button", { onClick: onClose }, "OK"))))));
|
2233
|
+
};
|
2234
|
+
var ErrorCardMessage_default = ErrorCardMessage;
|
2235
|
+
|
2116
2236
|
// src/app/components/Charge/GetPaymentPage.tsx
|
2117
2237
|
function GetPaymentPage(props) {
|
2118
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
2238
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
2119
2239
|
const [loading, setLoading] = useState3(false);
|
2240
|
+
const [loading2, setLoading2] = useState3(false);
|
2241
|
+
const [error, setError] = useState3("");
|
2120
2242
|
const [success, setSuccess] = useState3(false);
|
2121
2243
|
const [show, setShow] = useState3(false);
|
2122
2244
|
const [activetab, setActive] = useState3("card");
|
@@ -2133,15 +2255,10 @@ function GetPaymentPage(props) {
|
|
2133
2255
|
let [tranId, setTranId] = useState3("");
|
2134
2256
|
const showLoader = () => setLoading(true);
|
2135
2257
|
const hideLoader = () => setLoading(false);
|
2136
|
-
const showError = (msz) => {
|
2137
|
-
Swal.fire({
|
2138
|
-
icon: "error",
|
2139
|
-
text: msz
|
2140
|
-
});
|
2141
|
-
};
|
2142
2258
|
const handleClose = () => {
|
2143
2259
|
setShow(false);
|
2144
2260
|
setActive("card");
|
2261
|
+
setError("");
|
2145
2262
|
setSuccess(false);
|
2146
2263
|
setTranId("");
|
2147
2264
|
setAchData({
|
@@ -2325,7 +2442,7 @@ function GetPaymentPage(props) {
|
|
2325
2442
|
return Object.keys(errors).length > 0;
|
2326
2443
|
};
|
2327
2444
|
const submitFunc = async (e) => {
|
2328
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2,
|
2445
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
2329
2446
|
e.preventDefault();
|
2330
2447
|
if (activetab !== "ach") {
|
2331
2448
|
const hasError = validateCardData();
|
@@ -2340,7 +2457,7 @@ function GetPaymentPage(props) {
|
|
2340
2457
|
if (!validCVV) errors.cvv = "Invalid CVV";
|
2341
2458
|
setCardError(errors);
|
2342
2459
|
if (validCard && validCVV && validExpirationDate) {
|
2343
|
-
|
2460
|
+
setLoading2(true);
|
2344
2461
|
try {
|
2345
2462
|
const formData = __spreadProps(__spreadValues({}, cardData), {
|
2346
2463
|
amount: `${props.amount || 0}`,
|
@@ -2355,8 +2472,8 @@ function GetPaymentPage(props) {
|
|
2355
2472
|
let tokenCallback = async function(response) {
|
2356
2473
|
var _a3, _b3, _c3;
|
2357
2474
|
if (response.Error) {
|
2358
|
-
|
2359
|
-
|
2475
|
+
setError(response.Error);
|
2476
|
+
setLoading2(false);
|
2360
2477
|
} else {
|
2361
2478
|
let name = cardData == null ? void 0 : cardData.cardName;
|
2362
2479
|
let postal_code = cardData == null ? void 0 : cardData.zipCode;
|
@@ -2377,10 +2494,10 @@ function GetPaymentPage(props) {
|
|
2377
2494
|
setSaveCardInfo(false);
|
2378
2495
|
setTranId((_a3 = apiResponse == null ? void 0 : apiResponse.data) == null ? void 0 : _a3.transactionId);
|
2379
2496
|
setSuccess(true);
|
2380
|
-
|
2497
|
+
setLoading2(false);
|
2381
2498
|
} catch (err) {
|
2382
|
-
|
2383
|
-
|
2499
|
+
setLoading2(false);
|
2500
|
+
setError(((_c3 = (_b3 = err == null ? void 0 : err.response) == null ? void 0 : _b3.data) == null ? void 0 : _c3.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
2384
2501
|
}
|
2385
2502
|
}
|
2386
2503
|
};
|
@@ -2439,22 +2556,22 @@ function GetPaymentPage(props) {
|
|
2439
2556
|
headers: myHeaders2
|
2440
2557
|
}
|
2441
2558
|
);
|
2442
|
-
if ((
|
2443
|
-
setTranId((
|
2559
|
+
if ((_k2 = paymentRes == null ? void 0 : paymentRes.data) == null ? void 0 : _k2.result) {
|
2560
|
+
setTranId((_m2 = (_l2 = paymentRes == null ? void 0 : paymentRes.data) == null ? void 0 : _l2.data) == null ? void 0 : _m2.transactionId);
|
2444
2561
|
setSuccess(true);
|
2445
|
-
|
2562
|
+
setLoading2(false);
|
2446
2563
|
}
|
2447
2564
|
} catch (err) {
|
2448
|
-
|
2449
|
-
|
2565
|
+
setLoading2(false);
|
2566
|
+
setError(((_o2 = (_n2 = err == null ? void 0 : err.response) == null ? void 0 : _n2.data) == null ? void 0 : _o2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
2450
2567
|
}
|
2451
2568
|
} catch (err) {
|
2452
|
-
|
2453
|
-
|
2569
|
+
setLoading2(false);
|
2570
|
+
setError(((_q = (_p2 = err == null ? void 0 : err.response) == null ? void 0 : _p2.data) == null ? void 0 : _q.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
2454
2571
|
}
|
2455
2572
|
} catch (err) {
|
2456
|
-
|
2457
|
-
|
2573
|
+
setLoading2(false);
|
2574
|
+
setError(((_s = (_r = err == null ? void 0 : err.response) == null ? void 0 : _r.data) == null ? void 0 : _s.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
2458
2575
|
}
|
2459
2576
|
} else {
|
2460
2577
|
if (typeof DatacapWebToken !== "undefined") {
|
@@ -2462,8 +2579,8 @@ function GetPaymentPage(props) {
|
|
2462
2579
|
}
|
2463
2580
|
}
|
2464
2581
|
} catch (err) {
|
2465
|
-
|
2466
|
-
|
2582
|
+
setLoading2(false);
|
2583
|
+
setError(((_u = (_t = err == null ? void 0 : err.response) == null ? void 0 : _t.data) == null ? void 0 : _u.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
2467
2584
|
}
|
2468
2585
|
}
|
2469
2586
|
}
|
@@ -2486,10 +2603,9 @@ function GetPaymentPage(props) {
|
|
2486
2603
|
discount: props == null ? void 0 : props.discount,
|
2487
2604
|
surcharge: props == null ? void 0 : props.surcharge
|
2488
2605
|
};
|
2489
|
-
showLoader();
|
2490
2606
|
try {
|
2491
2607
|
let result = await axios3.post(`${baseUrl}ach-incoming`, dataForm);
|
2492
|
-
|
2608
|
+
setLoading2(false);
|
2493
2609
|
Swal.fire({
|
2494
2610
|
icon: "success",
|
2495
2611
|
title: "Congrats...",
|
@@ -2499,19 +2615,19 @@ function GetPaymentPage(props) {
|
|
2499
2615
|
handleClose();
|
2500
2616
|
}
|
2501
2617
|
});
|
2502
|
-
} catch (
|
2503
|
-
if (axios3.isAxiosError(
|
2504
|
-
|
2505
|
-
|
2618
|
+
} catch (error2) {
|
2619
|
+
if (axios3.isAxiosError(error2)) {
|
2620
|
+
setLoading2(false);
|
2621
|
+
setError((_z = (_y = (_x = (_w = error2.response) == null ? void 0 : _w.data) == null ? void 0 : _x.message) == null ? void 0 : _y.error) != null ? _z : "Something went wrong");
|
2506
2622
|
} else {
|
2507
|
-
console.error("Unexpected error",
|
2623
|
+
console.error("Unexpected error", error2);
|
2508
2624
|
}
|
2509
2625
|
}
|
2510
2626
|
}
|
2511
2627
|
}
|
2512
2628
|
};
|
2513
2629
|
const getPaymentDetails = async () => {
|
2514
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2,
|
2630
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2;
|
2515
2631
|
showLoader();
|
2516
2632
|
try {
|
2517
2633
|
const data = {
|
@@ -2522,12 +2638,12 @@ function GetPaymentPage(props) {
|
|
2522
2638
|
setPaymentData((_a2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _a2.data);
|
2523
2639
|
if (!((_c2 = (_b2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _b2.data) == null ? void 0 : _c2.paymentGateway)) {
|
2524
2640
|
handleClose();
|
2525
|
-
|
2641
|
+
setError("Something went wrong.");
|
2526
2642
|
}
|
2527
2643
|
if (((_e2 = (_d2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _d2.data) == null ? void 0 : _e2.card_list) && ((_h2 = (_g2 = (_f2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _f2.data) == null ? void 0 : _g2.card_list) == null ? void 0 : _h2.length) > 0) {
|
2528
2644
|
setCardList((_j2 = (_i2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _i2.data) == null ? void 0 : _j2.card_list);
|
2529
2645
|
setActive("cardList");
|
2530
|
-
let primary_card = (
|
2646
|
+
let primary_card = (_m2 = (_l2 = (_k2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _k2.data) == null ? void 0 : _l2.card_list) == null ? void 0 : _m2.filter((card) => (card == null ? void 0 : card.primary_card) == 1);
|
2531
2647
|
if (primary_card == null ? void 0 : primary_card[0]) {
|
2532
2648
|
setSelectedCard(primary_card[0]);
|
2533
2649
|
}
|
@@ -2536,10 +2652,9 @@ function GetPaymentPage(props) {
|
|
2536
2652
|
}
|
2537
2653
|
hideLoader();
|
2538
2654
|
} catch (err) {
|
2539
|
-
|
2655
|
+
console.log(err);
|
2540
2656
|
hideLoader();
|
2541
|
-
|
2542
|
-
showError("Something went wrong , Try again later");
|
2657
|
+
setError(((_o2 = (_n2 = err == null ? void 0 : err.response) == null ? void 0 : _n2.data) == null ? void 0 : _o2.message) || (err == null ? void 0 : err.message) || "Something went wrong");
|
2543
2658
|
}
|
2544
2659
|
};
|
2545
2660
|
const handlechargeCustomer = async () => {
|
@@ -2573,26 +2688,26 @@ function GetPaymentPage(props) {
|
|
2573
2688
|
const headers = {
|
2574
2689
|
"Content-Type": "application/json"
|
2575
2690
|
};
|
2576
|
-
|
2691
|
+
setLoading2(true);
|
2577
2692
|
try {
|
2578
2693
|
let result = await axios3.post(chargeurl, card_type == "Bank" ? rest : chargeobj, { headers });
|
2579
2694
|
if ((_b2 = result == null ? void 0 : result.data) == null ? void 0 : _b2.result) {
|
2580
2695
|
setTranId((_d2 = (_c2 = result == null ? void 0 : result.data) == null ? void 0 : _c2.data) == null ? void 0 : _d2.transaction_id);
|
2581
2696
|
setSuccess(true);
|
2582
|
-
|
2697
|
+
setLoading2(false);
|
2583
2698
|
}
|
2584
2699
|
} catch (err) {
|
2585
|
-
|
2586
|
-
|
2700
|
+
setLoading2(false);
|
2701
|
+
setError(((_f2 = (_e2 = err == null ? void 0 : err.response) == null ? void 0 : _e2.data) == null ? void 0 : _f2.message) || ((_h2 = (_g2 = err == null ? void 0 : err.response) == null ? void 0 : _g2.data) == null ? void 0 : _h2.status) || "Something went erong");
|
2587
2702
|
}
|
2588
2703
|
} else {
|
2589
|
-
|
2704
|
+
setError("Please Select A Card/ACH");
|
2590
2705
|
}
|
2591
2706
|
} else {
|
2592
|
-
|
2707
|
+
setError("Please Select Customer");
|
2593
2708
|
}
|
2594
2709
|
} else {
|
2595
|
-
|
2710
|
+
setError("Something went wrong.");
|
2596
2711
|
}
|
2597
2712
|
};
|
2598
2713
|
useEffect4(() => {
|
@@ -2617,7 +2732,7 @@ function GetPaymentPage(props) {
|
|
2617
2732
|
}
|
2618
2733
|
}).then(async (result) => {
|
2619
2734
|
if (result.isConfirmed) {
|
2620
|
-
|
2735
|
+
setLoading2(true);
|
2621
2736
|
try {
|
2622
2737
|
let obj = {
|
2623
2738
|
card_id: cardId,
|
@@ -2625,7 +2740,7 @@ function GetPaymentPage(props) {
|
|
2625
2740
|
fractalpayPublicKey: props == null ? void 0 : props.fractalpayClientKey
|
2626
2741
|
};
|
2627
2742
|
const res = await axios3.post(`${baseUrl}delete-customer-card`, obj);
|
2628
|
-
|
2743
|
+
setLoading2(false);
|
2629
2744
|
getPaymentDetails();
|
2630
2745
|
Swal.fire({
|
2631
2746
|
icon: "success",
|
@@ -2641,7 +2756,7 @@ function GetPaymentPage(props) {
|
|
2641
2756
|
}
|
2642
2757
|
});
|
2643
2758
|
} catch (err) {
|
2644
|
-
|
2759
|
+
setLoading2(false);
|
2645
2760
|
Swal.fire({
|
2646
2761
|
icon: "error",
|
2647
2762
|
title: "Error!",
|
@@ -2666,25 +2781,27 @@ function GetPaymentPage(props) {
|
|
2666
2781
|
}
|
2667
2782
|
});
|
2668
2783
|
};
|
2669
|
-
|
2784
|
+
console.log(loading, loading2);
|
2785
|
+
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(DataScript, null), /* @__PURE__ */ React13.createElement(Chargewidgetstyles, null), /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
|
2670
2786
|
"button",
|
2671
2787
|
{
|
2672
2788
|
className: "paymentBtn",
|
2673
2789
|
onClick: handleShow
|
2674
2790
|
},
|
2675
2791
|
"Pay"
|
2676
|
-
), /* @__PURE__ */
|
2792
|
+
), /* @__PURE__ */ React13.createElement(
|
2677
2793
|
CustomModal2_default,
|
2678
2794
|
{
|
2679
2795
|
open: show,
|
2680
2796
|
onClose: handleClose
|
2681
2797
|
},
|
2682
|
-
/* @__PURE__ */
|
2683
|
-
success
|
2798
|
+
error && /* @__PURE__ */ React13.createElement("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" } }, /* @__PURE__ */ React13.createElement(ErrorCardMessage_default, { error, onClose: handleClose })),
|
2799
|
+
success && /* @__PURE__ */ React13.createElement(SuccessMsz, { onClose: handleClose, tranId }),
|
2800
|
+
!error && !success && /* @__PURE__ */ React13.createElement(React13.Fragment, null, (loading || loading2) && /* @__PURE__ */ React13.createElement(Loader_default, { loading: loading || loading2 }), /* @__PURE__ */ React13.createElement("div", { className: "frac-card-payment-page frac-form" }, /* @__PURE__ */ React13.createElement("div", { className: "parent-pay-container" }, /* @__PURE__ */ React13.createElement("span", { className: "request-payment-close-popup", onClick: handleClose }, /* @__PURE__ */ React13.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React13.createElement("g", { clipPath: "url(#clip0_12425_52336)" }, /* @__PURE__ */ React13.createElement("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" })), /* @__PURE__ */ React13.createElement("defs", null, /* @__PURE__ */ React13.createElement("clipPath", { id: "clip0_12425_52336" }, /* @__PURE__ */ React13.createElement("rect", { width: "16", height: "16", fill: "white" }))))), /* @__PURE__ */ React13.createElement("div", { className: "pay-main-logo-res" }, /* @__PURE__ */ React13.createElement("img", { src: "https://fractal-userdata-upload.s3.us-east-1.amazonaws.com/uploaded/merchant_logo/20250311131124_merchant_logo.png", id: "pay-logos" })), /* @__PURE__ */ React13.createElement("div", { className: "pay-container" }, /* @__PURE__ */ React13.createElement("div", { className: "pay-header pay-conatiner-one" }, /* @__PURE__ */ React13.createElement("div", { className: "pay-conatiner-one-first" }, /* @__PURE__ */ React13.createElement("div", { className: "pay-logo-container" }, /* @__PURE__ */ React13.createElement("div", { className: "pay-main-logo" }, /* @__PURE__ */ React13.createElement("img", { src: "https://fractal-userdata-upload.s3.us-east-1.amazonaws.com/uploaded/merchant_logo/20250311131124_merchant_logo.png", id: "pay-logos" })), /* @__PURE__ */ React13.createElement("h1", { className: "pay-heading" }, "Pay"), (cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ React13.createElement("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList") }, " ", /* @__PURE__ */ React13.createElement(IoArrowBack, null), " Back")), /* @__PURE__ */ React13.createElement("div", { className: "amt-pay-con" }, /* @__PURE__ */ React13.createElement("div", { className: "pay-amount-conatiner" }, /* @__PURE__ */ React13.createElement("small", { className: "pay-payment-amount" }, "Payment Amount"), /* @__PURE__ */ React13.createElement("strong", { className: "pay-amount" }, "$", (_a = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _a.toFixed(2))), activetab != "ach" && /* @__PURE__ */ React13.createElement("div", { style: { display: "flex", gap: "8px", margin: "8px 0" } }, /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/visa-img.svg", alt: "", width: 33 }), /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/mc-img.svg", width: 33, alt: "" }), /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/ae-img.svg", alt: "", width: 33 }), /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/discover-img.svg", width: 33, alt: "" })))), /* @__PURE__ */ React13.createElement("div", { className: "pay-conatiner-one-last" }, /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/secure-img.png", alt: "" }), /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/pov-by.png", alt: "" }), "Secure payments powered by Fractal"), /* @__PURE__ */ React13.createElement("div", null)), /* @__PURE__ */ React13.createElement("div", { className: "pay-tab pay-conatiner-two" }, !loading && /* @__PURE__ */ React13.createElement("div", { className: "col-md-12" }, /* @__PURE__ */ React13.createElement("div", { id: "payment-form-div" }, activetab !== "cardList" ? /* @__PURE__ */ React13.createElement("div", null, (cardList == null ? void 0 : cardList.length) > 0 && /* @__PURE__ */ React13.createElement("button", { className: "charge-payment-back-btn ", onClick: () => setActive("cardList") }, " ", /* @__PURE__ */ React13.createElement(IoArrowBack, null), " Back"), (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && /* @__PURE__ */ React13.createElement("div", { className: "tab" }, /* @__PURE__ */ React13.createElement("button", { className: "tablinks", onClick: (e) => {
|
2684
2801
|
handletabchange("card");
|
2685
|
-
}, style: { border: activetab === "card" ? "1px solid" : "" } }, /* @__PURE__ */
|
2802
|
+
}, style: { border: activetab === "card" ? "1px solid" : "" } }, /* @__PURE__ */ React13.createElement("i", { className: "fas fa-credit-card me-2", style: { marginRight: "8px", fontSize: "15px" } }), "Card"), /* @__PURE__ */ React13.createElement("button", { className: "tablinks", onClick: (e) => {
|
2686
2803
|
handletabchange("ach");
|
2687
|
-
}, style: { border: activetab === "ach" ? "1px solid" : "" } }, /* @__PURE__ */
|
2804
|
+
}, style: { border: activetab === "ach" ? "1px solid" : "" } }, /* @__PURE__ */ React13.createElement("i", { className: "fas fa-university me-2", style: { marginRight: "8px", fontSize: "15px" } }), "Bank")), /* @__PURE__ */ React13.createElement("div", { className: "res-pay-con" }, /* @__PURE__ */ React13.createElement("div", { className: "pay-amount-conatiner", style: { margin: 0 } }, /* @__PURE__ */ React13.createElement("small", { className: "pay-payment-amount" }, "Payment Amount"), /* @__PURE__ */ React13.createElement("strong", { className: "pay-amount" }, "$", (_b = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _b.toFixed(2))), activetab != "ach" && /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/visa-img.svg", alt: "", width: 35, style: { paddingRight: "5px" } }), /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/mc-img.svg", width: 35, alt: "" })), /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/ae-img.svg", alt: "", width: 35, style: { paddingRight: "5px" } }), /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/discover-img.svg", width: 35, alt: "" }))))) : /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement("h6", { className: "charge-customer-name", style: { marginBottom: "16px !important" } }, " Charge ", paymentData == null ? void 0 : paymentData.customer_name), /* @__PURE__ */ React13.createElement("h6", { className: "card-ach-heading", style: { marginBottom: "10px !important" } }, " Cards/ACH"), /* @__PURE__ */ React13.createElement("div", { className: "res-pay-con" }, /* @__PURE__ */ React13.createElement("div", { className: "pay-amount-conatiner", style: { margin: 0 } }, /* @__PURE__ */ React13.createElement("small", { className: "pay-payment-amount" }, "Payment Amount"), /* @__PURE__ */ React13.createElement("strong", { className: "pay-amount" }, "$", (_c = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _c.toFixed(2))), /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/visa-img.svg", alt: "", width: 35, style: { paddingRight: "5px" } }), /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/mc-img.svg", width: 35, alt: "" })), /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/ae-img.svg", alt: "", width: 35, style: { paddingRight: "5px" } }), /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/discover-img.svg", width: 35, alt: "" }))))), /* @__PURE__ */ React13.createElement("div", { id: "ach", style: { display: activetab === "cardList" ? "block" : "none" }, className: "tabcontent" }, /* @__PURE__ */ React13.createElement("div", { className: "card-lint-div-in" }, /* @__PURE__ */ React13.createElement("div", { className: "card-list-div" }, (paymentData == null ? void 0 : paymentData.card_list) && ((_d = paymentData == null ? void 0 : paymentData.card_list) == null ? void 0 : _d.length) > 0 && ((_e = paymentData == null ? void 0 : paymentData.card_list) == null ? void 0 : _e.map((card, index) => /* @__PURE__ */ React13.createElement("div", { className: "card-list-single-div", key: index }, /* @__PURE__ */ React13.createElement("div", { className: "card-number-radio" }, /* @__PURE__ */ React13.createElement(
|
2688
2805
|
"input",
|
2689
2806
|
{
|
2690
2807
|
type: "radio",
|
@@ -2694,12 +2811,12 @@ function GetPaymentPage(props) {
|
|
2694
2811
|
checked: selectedCard === card,
|
2695
2812
|
onChange: (e) => setSelectedCard(card)
|
2696
2813
|
}
|
2697
|
-
), /* @__PURE__ */
|
2814
|
+
), /* @__PURE__ */ React13.createElement("label", { htmlFor: "", className: "card-number-last-four" }, "**** ", card == null ? void 0 : card.cardlastfourdigit), /* @__PURE__ */ React13.createElement("h6", { className: "card-expiry-date" }, card == null ? void 0 : card.expmonth, "/", card == null ? void 0 : card.expyear)), /* @__PURE__ */ React13.createElement("div", { className: "card-number-radio" }, /* @__PURE__ */ React13.createElement("span", { className: "visa-card" }, /* @__PURE__ */ React13.createElement("img", { src: (card == null ? void 0 : card.card_type) != "Bank" ? "https://dev-widget.fractalpay.com/images/visa-img.svg" : "https://dev-widget.fractalpay.com/images/bank.svg", alt: "" })), /* @__PURE__ */ React13.createElement("span", { className: "visa-card", style: { cursor: "pointer" }, onClick: () => handleDeleteCard(card == null ? void 0 : card.id) }, /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/Trash.svg", alt: "" }))))))), /* @__PURE__ */ React13.createElement("div", { className: "pay-with-other-card ", onClick: () => setActive("card") }, "Pay With Other Card", /* @__PURE__ */ React13.createElement("img", { src: "https://dev-widget.fractalpay.com/images/card.svg", alt: "" }))), /* @__PURE__ */ React13.createElement("div", { className: "form-group", style: { padding: "0" } }, /* @__PURE__ */ React13.createElement("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer }, "$", (_f = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _f.toFixed(2)))), /* @__PURE__ */ React13.createElement("div", { id: "card", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent" }, /* @__PURE__ */ React13.createElement("form", { id: "PaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc }, /* @__PURE__ */ React13.createElement("div", { className: "ach-scrl", style: { minHeight: (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && (cardList == null ? void 0 : cardList.length) > 0 ? "398px" : (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && (cardList == null ? void 0 : cardList.length) == 0 ? "456px" : (cardList == null ? void 0 : cardList.length) > 0 ? "462px" : "520px", overflow: "auto", marginRight: "5px" } }, /* @__PURE__ */ React13.createElement("div", { className: "form-group" }, /* @__PURE__ */ React13.createElement("label", { htmlFor: "cardHolderName" }, "NAME ON CARD "), /* @__PURE__ */ React13.createElement("input", { type: "text", className: "form-control", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
2698
2815
|
const value = e.target.value;
|
2699
2816
|
if (/^[a-zA-Z\s]*$/.test(value)) {
|
2700
2817
|
handleCardChange("cardName", value);
|
2701
2818
|
}
|
2702
|
-
} }), (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */
|
2819
|
+
} }), (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ React13.createElement("span", { className: "error-span" }, cardError == null ? void 0 : cardError.cardName)), /* @__PURE__ */ React13.createElement("div", { className: "form-group" }, /* @__PURE__ */ React13.createElement("label", { htmlFor: "cardNumber" }, "CARD NUMBER"), /* @__PURE__ */ React13.createElement("div", { className: "toggle-num-wrapper" }, /* @__PURE__ */ React13.createElement(
|
2703
2820
|
"input",
|
2704
2821
|
{
|
2705
2822
|
className: "form-control card-number-new",
|
@@ -2711,7 +2828,7 @@ function GetPaymentPage(props) {
|
|
2711
2828
|
onChange: (e) => handleCardNumberChange(e),
|
2712
2829
|
"data-token": "card_number"
|
2713
2830
|
}
|
2714
|
-
), /* @__PURE__ */
|
2831
|
+
), /* @__PURE__ */ React13.createElement("div", { className: "card-crdi card-expiry-new" }, /* @__PURE__ */ React13.createElement("div", { className: "exp-date-year-container" }, /* @__PURE__ */ React13.createElement("div", { className: "exp-date form-group" }, /* @__PURE__ */ React13.createElement(
|
2715
2832
|
"input",
|
2716
2833
|
{
|
2717
2834
|
"data-token": "exp_month",
|
@@ -2723,7 +2840,7 @@ function GetPaymentPage(props) {
|
|
2723
2840
|
value: (cardData == null ? void 0 : cardData.expiryMonth) || "",
|
2724
2841
|
onChange: (e) => handleCardChange("expiryMonth", e.target.value)
|
2725
2842
|
}
|
2726
|
-
)), /* @__PURE__ */
|
2843
|
+
)), /* @__PURE__ */ React13.createElement("div", { className: "exp-year form-group" }, /* @__PURE__ */ React13.createElement(
|
2727
2844
|
"input",
|
2728
2845
|
{
|
2729
2846
|
"data-token": "exp_year",
|
@@ -2735,7 +2852,7 @@ function GetPaymentPage(props) {
|
|
2735
2852
|
value: (cardData == null ? void 0 : cardData.expiryYear) || "",
|
2736
2853
|
onChange: (e) => handleCardChange("expiryYear", e.target.value)
|
2737
2854
|
}
|
2738
|
-
)), /* @__PURE__ */
|
2855
|
+
)), /* @__PURE__ */ React13.createElement("div", { className: "security-digit form-group" }, /* @__PURE__ */ React13.createElement(
|
2739
2856
|
"input",
|
2740
2857
|
{
|
2741
2858
|
"data-token": "cvv",
|
@@ -2747,7 +2864,7 @@ function GetPaymentPage(props) {
|
|
2747
2864
|
value: (cardData == null ? void 0 : cardData.cvv) || "",
|
2748
2865
|
onChange: (e) => handleCardChange("cvv", e.target.value)
|
2749
2866
|
}
|
2750
|
-
)))), (cardError == null ? void 0 : cardError.cardNumber) && /* @__PURE__ */
|
2867
|
+
)))), (cardError == null ? void 0 : cardError.cardNumber) && /* @__PURE__ */ React13.createElement("span", { className: "error-span" }, cardError == null ? void 0 : cardError.cardNumber), /* @__PURE__ */ React13.createElement("p", { style: { margin: "0" } }, (cardError == null ? void 0 : cardError.expiryMonth) || (cardError == null ? void 0 : cardError.expiryYear) ? /* @__PURE__ */ React13.createElement("span", { className: "error-span", style: { paddingRight: "4px" } }, cardError == null ? void 0 : cardError.expiryMonth) : "", (cardError == null ? void 0 : cardError.cvv) && /* @__PURE__ */ React13.createElement("span", { className: "error-span" }, cardError == null ? void 0 : cardError.cvv)))), /* @__PURE__ */ React13.createElement("div", { className: "form-group" }, /* @__PURE__ */ React13.createElement("label", { htmlFor: "OrderId" }, "Order ID / Description"), /* @__PURE__ */ React13.createElement(
|
2751
2868
|
"input",
|
2752
2869
|
{
|
2753
2870
|
type: "text",
|
@@ -2755,10 +2872,10 @@ function GetPaymentPage(props) {
|
|
2755
2872
|
maxLength: 100,
|
2756
2873
|
placeholder: "OID123456",
|
2757
2874
|
disabled: true,
|
2758
|
-
value: (
|
2875
|
+
value: (_g = props == null ? void 0 : props.orderID) != null ? _g : "",
|
2759
2876
|
style: { background: "#F6F6F7", color: "#727272" }
|
2760
2877
|
}
|
2761
|
-
)), /* @__PURE__ */
|
2878
|
+
)), /* @__PURE__ */ React13.createElement("div", { className: "form-group" }, /* @__PURE__ */ React13.createElement("label", { htmlFor: "zip" }, "ZIP"), /* @__PURE__ */ React13.createElement("input", { type: "text", className: "form-control", maxLength: 100, placeholder: "000000", value: (_h = cardData == null ? void 0 : cardData.zipCode) != null ? _h : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }), (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ React13.createElement("span", { className: "error-span" }, cardError == null ? void 0 : cardError.zipCode)), (props == null ? void 0 : props.customerId) && /* @__PURE__ */ React13.createElement("div", { className: "form-group" }, /* @__PURE__ */ React13.createElement("div", { style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" } }, /* @__PURE__ */ React13.createElement(
|
2762
2879
|
"input",
|
2763
2880
|
{
|
2764
2881
|
type: "checkbox",
|
@@ -2767,10 +2884,10 @@ function GetPaymentPage(props) {
|
|
2767
2884
|
checked: saveCardInfo,
|
2768
2885
|
onChange: (e) => setSaveCardInfo(e.target.checked)
|
2769
2886
|
}
|
2770
|
-
), /* @__PURE__ */
|
2887
|
+
), /* @__PURE__ */ React13.createElement("label", { htmlFor: "save_card", className: "toggle-label" }), /* @__PURE__ */ React13.createElement("label", { htmlFor: "save_card" }, "Save card for future payments "), /* @__PURE__ */ React13.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, /* @__PURE__ */ React13.createElement("g", { clipPath: "url(#clip0_12420_50192)" }, /* @__PURE__ */ React13.createElement("rect", { width: "20", height: "20", fill: "white" }), /* @__PURE__ */ React13.createElement("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }), /* @__PURE__ */ React13.createElement("path", { 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", fill: "#161616" })), /* @__PURE__ */ React13.createElement("defs", null, /* @__PURE__ */ React13.createElement("clipPath", { id: "clip0_12420_50192" }, /* @__PURE__ */ React13.createElement("rect", { width: "20", height: "20", fill: "white" }))))))), /* @__PURE__ */ React13.createElement("div", { className: "form-group", style: { marginTop: "20px", padding: "0" } }, /* @__PURE__ */ React13.createElement("button", { type: "submit", style: { margin: 0 }, className: "pay-button" }, "$", (_i = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _i.toFixed(2))))), /* @__PURE__ */ React13.createElement("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent" }, /* @__PURE__ */ React13.createElement("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc }, /* @__PURE__ */ React13.createElement("div", { className: "ach-scrl", style: {
|
2771
2888
|
minHeight: (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && (cardList == null ? void 0 : cardList.length) > 0 ? "378px" : (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && (cardList == null ? void 0 : cardList.length) == 0 ? "436px" : (cardList == null ? void 0 : cardList.length) > 0 ? "462px" : "520px",
|
2772
2889
|
maxHeight: (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && (cardList == null ? void 0 : cardList.length) > 0 ? "358px" : (cardList == null ? void 0 : cardList.length) > 0 ? "380px" : "380px"
|
2773
|
-
} }, /* @__PURE__ */
|
2890
|
+
} }, /* @__PURE__ */ React13.createElement("div", { className: "form-group mb-4" }, /* @__PURE__ */ React13.createElement("label", { htmlFor: "nameonaccount" }, "Name on account"), /* @__PURE__ */ React13.createElement("input", { type: "text", id: "nameonaccount", className: "form-control", maxLength: 100, placeholder: "John Doe", name: "name", value: (_j = achData == null ? void 0 : achData.name) != null ? _j : "", onChange: handleChangeAch }), (achError == null ? void 0 : achError.name) && /* @__PURE__ */ React13.createElement("span", { className: "error-span" }, achError == null ? void 0 : achError.name)), /* @__PURE__ */ React13.createElement("div", { className: "form-group mb-4" }, /* @__PURE__ */ React13.createElement("label", { htmlFor: "routingnumber" }, "Routing number"), /* @__PURE__ */ React13.createElement(
|
2774
2891
|
"input",
|
2775
2892
|
{
|
2776
2893
|
type: "text",
|
@@ -2779,10 +2896,10 @@ function GetPaymentPage(props) {
|
|
2779
2896
|
maxLength: 9,
|
2780
2897
|
placeholder: "000000000",
|
2781
2898
|
name: "routingNumber",
|
2782
|
-
value: (
|
2899
|
+
value: (_k = achData == null ? void 0 : achData.routingNumber) != null ? _k : "",
|
2783
2900
|
onChange: handleChangeAch
|
2784
2901
|
}
|
2785
|
-
), (achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */
|
2902
|
+
), (achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ React13.createElement("span", { className: "error-span" }, achError == null ? void 0 : achError.routingNumber)), /* @__PURE__ */ React13.createElement("div", { className: "form-group mb-4" }, /* @__PURE__ */ React13.createElement("label", { htmlFor: "accountnumber" }, "Account number"), /* @__PURE__ */ React13.createElement(
|
2786
2903
|
"input",
|
2787
2904
|
{
|
2788
2905
|
type: "text",
|
@@ -2791,10 +2908,10 @@ function GetPaymentPage(props) {
|
|
2791
2908
|
maxLength: 16,
|
2792
2909
|
placeholder: "0000000000",
|
2793
2910
|
name: "accountNumber",
|
2794
|
-
value: (
|
2911
|
+
value: (_l = achData == null ? void 0 : achData.accountNumber) != null ? _l : "",
|
2795
2912
|
onChange: handleChangeAch
|
2796
2913
|
}
|
2797
|
-
), (achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */
|
2914
|
+
), (achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ React13.createElement("span", { className: "error-span" }, achError == null ? void 0 : achError.accountNumber)), /* @__PURE__ */ React13.createElement("div", { className: "form-group mb-4" }, /* @__PURE__ */ React13.createElement("label", { htmlFor: "confirmaccountnumber" }, "Confirm account number"), /* @__PURE__ */ React13.createElement(
|
2798
2915
|
"input",
|
2799
2916
|
{
|
2800
2917
|
type: "text",
|
@@ -2803,10 +2920,10 @@ function GetPaymentPage(props) {
|
|
2803
2920
|
maxLength: 16,
|
2804
2921
|
placeholder: "0000000000",
|
2805
2922
|
name: "confirmAccountNumber",
|
2806
|
-
value: (
|
2923
|
+
value: (_m = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _m : "",
|
2807
2924
|
onChange: handleChangeAch
|
2808
2925
|
}
|
2809
|
-
), (achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */
|
2926
|
+
), (achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ React13.createElement("span", { className: "error-span" }, achError == null ? void 0 : achError.confirmAccountNumber)), /* @__PURE__ */ React13.createElement("div", { className: "form-group mb-4" }, /* @__PURE__ */ React13.createElement("label", { htmlFor: "bankname" }, "Bank name"), /* @__PURE__ */ React13.createElement(
|
2810
2927
|
"input",
|
2811
2928
|
{
|
2812
2929
|
type: "text",
|
@@ -2815,21 +2932,23 @@ function GetPaymentPage(props) {
|
|
2815
2932
|
maxLength: 100,
|
2816
2933
|
placeholder: "My Bank",
|
2817
2934
|
name: "bankName",
|
2818
|
-
value: (
|
2935
|
+
value: (_n = achData == null ? void 0 : achData.bankName) != null ? _n : "",
|
2819
2936
|
onChange: handleChangeAch
|
2820
2937
|
}
|
2821
|
-
), (achError == null ? void 0 : achError.bankName) && /* @__PURE__ */
|
2938
|
+
), (achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ React13.createElement("span", { className: "error-span" }, achError == null ? void 0 : achError.bankName)), /* @__PURE__ */ React13.createElement("div", { className: "form-group mb-4" }, /* @__PURE__ */ React13.createElement("label", { htmlFor: "accounttype" }, "Select account type"), /* @__PURE__ */ React13.createElement("select", { name: "accountType", id: "accounttype", className: "form-control", value: (_o = achData == null ? void 0 : achData.accountType) != null ? _o : "", onChange: handleChangeAch }, /* @__PURE__ */ React13.createElement("option", { value: "" }, "Select account"), /* @__PURE__ */ React13.createElement("option", { value: "Personal Saving" }, "Personal Saving"), /* @__PURE__ */ React13.createElement("option", { value: "Business Saving" }, "Business Saving"), /* @__PURE__ */ React13.createElement("option", { value: "Personal Checking" }, "Personal Checking"), /* @__PURE__ */ React13.createElement("option", { value: "Business Checking" }, "Business Checking"))), /* @__PURE__ */ React13.createElement("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" } }, /* @__PURE__ */ React13.createElement("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }), /* @__PURE__ */ React13.createElement("label", { htmlFor: "saveACH" }, "Save ACH")), saveACHinfo && /* @__PURE__ */ React13.createElement("div", { className: "form-group mb-4", style: { fontSize: "12px", color: "#727272" } }, /* @__PURE__ */ React13.createElement("p", null, "If checked, I agree for ", /* @__PURE__ */ React13.createElement("b", null, "ecommerce"), " to have my permission to charge this credit card for agreed upon purchases in the future."))), /* @__PURE__ */ React13.createElement("div", { className: "form-group " }, /* @__PURE__ */ React13.createElement("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit" }, "$", (_p = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _p.toFixed(2))))))))))))
|
2822
2939
|
)));
|
2823
2940
|
}
|
2824
2941
|
|
2825
2942
|
// src/app/components/PreAuthCharge/PreAuthPaymentPage.tsx
|
2826
|
-
import
|
2943
|
+
import React14, { useEffect as useEffect5, useState as useState4 } from "react";
|
2827
2944
|
import axios4 from "axios";
|
2828
2945
|
import Swal2 from "sweetalert2";
|
2829
2946
|
import { IoArrowBack as IoArrowBack2 } from "react-icons/io5";
|
2830
2947
|
function PreAuthPayment(props) {
|
2831
|
-
var _a, _b, _c, _d;
|
2948
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
2832
2949
|
const [loading, setLoading] = useState4(false);
|
2950
|
+
const [loading2, setLoading2] = useState4(false);
|
2951
|
+
const [error, setError] = useState4("");
|
2833
2952
|
const [success, setSuccess] = useState4(false);
|
2834
2953
|
const [show, setShow] = useState4(false);
|
2835
2954
|
const [activetab, setActive] = useState4("card");
|
@@ -2843,16 +2962,11 @@ function PreAuthPayment(props) {
|
|
2843
2962
|
let [tranId, setTranId] = useState4("");
|
2844
2963
|
const showLoader = () => setLoading(true);
|
2845
2964
|
const hideLoader = () => setLoading(false);
|
2846
|
-
const showError = (msz) => {
|
2847
|
-
Swal2.fire({
|
2848
|
-
icon: "error",
|
2849
|
-
title: "Oops...",
|
2850
|
-
text: msz
|
2851
|
-
});
|
2852
|
-
};
|
2853
2965
|
const handleClose = () => {
|
2854
2966
|
setShow(false);
|
2855
2967
|
setActive("card");
|
2968
|
+
setLoading2(false);
|
2969
|
+
setError("");
|
2856
2970
|
setSuccess(false);
|
2857
2971
|
setTranId("");
|
2858
2972
|
setCardData({
|
@@ -2932,7 +3046,7 @@ function PreAuthPayment(props) {
|
|
2932
3046
|
}));
|
2933
3047
|
};
|
2934
3048
|
const validateCardData = () => {
|
2935
|
-
var _a2, _b2, _c2, _d2,
|
3049
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
2936
3050
|
const errors = {};
|
2937
3051
|
const data = cardData;
|
2938
3052
|
const month = parseInt((data == null ? void 0 : data.expiryMonth) || "", 10);
|
@@ -2944,8 +3058,8 @@ function PreAuthPayment(props) {
|
|
2944
3058
|
} else if (isNaN(month) || month < 1 || month > 12 || year.length !== 4) {
|
2945
3059
|
errors.expiryMonth = "Invalid Expiration Date.";
|
2946
3060
|
}
|
2947
|
-
if (!((
|
2948
|
-
if (!((
|
3061
|
+
if (!((_e2 = data == null ? void 0 : data.cvv) == null ? void 0 : _e2.trim())) errors.cvv = "CVV is required";
|
3062
|
+
if (!((_f2 = data == null ? void 0 : data.zipCode) == null ? void 0 : _f2.trim())) errors.zipCode = "ZIP code is required";
|
2949
3063
|
if ((data == null ? void 0 : data.expiryMonth) && (data == null ? void 0 : data.expiryYear) && data.expiryMonth.length <= 2 && data.expiryYear.length === 4) {
|
2950
3064
|
const month2 = parseInt(data.expiryMonth, 10);
|
2951
3065
|
const year2 = parseInt(data.expiryYear, 10);
|
@@ -2960,7 +3074,7 @@ function PreAuthPayment(props) {
|
|
2960
3074
|
return Object.keys(errors).length > 0;
|
2961
3075
|
};
|
2962
3076
|
const submitFunc = async (e) => {
|
2963
|
-
var _a2, _b2, _c2, _d2,
|
3077
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
2964
3078
|
e.preventDefault();
|
2965
3079
|
if (activetab == "card") {
|
2966
3080
|
const hasError = validateCardData();
|
@@ -2975,13 +3089,13 @@ function PreAuthPayment(props) {
|
|
2975
3089
|
if (!validCVV) errors.cvv = "Invalid CVV";
|
2976
3090
|
setCardError(errors);
|
2977
3091
|
if (validCard && validCVV && validExpirationDate) {
|
2978
|
-
|
3092
|
+
setLoading2(true);
|
2979
3093
|
try {
|
2980
3094
|
let tokenCallback = async function(response) {
|
2981
3095
|
var _a3, _b3, _c3, _d3;
|
2982
3096
|
if (response.Error) {
|
2983
|
-
|
2984
|
-
|
3097
|
+
setError(response.Error);
|
3098
|
+
setLoading2(false);
|
2985
3099
|
} else {
|
2986
3100
|
let name = cardData == null ? void 0 : cardData.cardName;
|
2987
3101
|
let postal_code = cardData == null ? void 0 : cardData.zipCode;
|
@@ -3009,11 +3123,11 @@ function PreAuthPayment(props) {
|
|
3009
3123
|
console.log(apiResponse, "+++++++++++++++");
|
3010
3124
|
setSuccess(true);
|
3011
3125
|
setTranId((_b3 = (_a3 = apiResponse == null ? void 0 : apiResponse.data) == null ? void 0 : _a3.data) == null ? void 0 : _b3.transaction_id);
|
3012
|
-
|
3126
|
+
setLoading2(false);
|
3013
3127
|
} catch (err) {
|
3014
3128
|
console.log(err);
|
3015
|
-
|
3016
|
-
|
3129
|
+
setLoading2(false);
|
3130
|
+
setError(((_d3 = (_c3 = err == null ? void 0 : err.response) == null ? void 0 : _c3.data) == null ? void 0 : _d3.message) || (err == null ? void 0 : err.message) || "Something went wrong..");
|
3017
3131
|
}
|
3018
3132
|
}
|
3019
3133
|
};
|
@@ -3043,17 +3157,17 @@ function PreAuthPayment(props) {
|
|
3043
3157
|
const raw = JSON.stringify({
|
3044
3158
|
"enc_track2_data": `${encryptedBase64}`,
|
3045
3159
|
"algorithm": "RSAES_OAEP_SHA_1",
|
3046
|
-
session_key: `${(
|
3160
|
+
session_key: `${(_f2 = (_e2 = sesionResult == null ? void 0 : sesionResult.data) == null ? void 0 : _e2.data) == null ? void 0 : _f2.session_key}`
|
3047
3161
|
});
|
3048
3162
|
try {
|
3049
3163
|
const tokenizeData = await axios4.post("https://api-dev.merchant-trends.com/tokenizer/tokenize", raw, { headers: myHeaders });
|
3050
|
-
const reqData = JSON.stringify(__spreadProps(__spreadValues({}, (
|
3164
|
+
const reqData = JSON.stringify(__spreadProps(__spreadValues({}, (_g2 = tokenizeData == null ? void 0 : tokenizeData.data) == null ? void 0 : _g2.data), {
|
3051
3165
|
// isSaveCardChecked: saveCardInfo,
|
3052
3166
|
name: cardData == null ? void 0 : cardData.cardName,
|
3053
3167
|
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
3054
3168
|
customer_id: props == null ? void 0 : props.customerId,
|
3055
3169
|
"amount": props == null ? void 0 : props.amount,
|
3056
|
-
"Token": `${(
|
3170
|
+
"Token": `${(_i2 = (_h2 = tokenizeData == null ? void 0 : tokenizeData.data) == null ? void 0 : _h2.data) == null ? void 0 : _i2.token}`,
|
3057
3171
|
"fractalpayPublicKey": fractalpayClientKey,
|
3058
3172
|
"order_id": props == null ? void 0 : props.orderID,
|
3059
3173
|
"preAuth_id": "",
|
@@ -3084,34 +3198,34 @@ function PreAuthPayment(props) {
|
|
3084
3198
|
if ((_n = paymentRes == null ? void 0 : paymentRes.data) == null ? void 0 : _n.result) {
|
3085
3199
|
setTranId((_p = (_o = paymentRes == null ? void 0 : paymentRes.data) == null ? void 0 : _o.data) == null ? void 0 : _p.transaction_id);
|
3086
3200
|
setSuccess(true);
|
3087
|
-
|
3201
|
+
setLoading2(false);
|
3088
3202
|
}
|
3089
3203
|
} catch (err) {
|
3090
|
-
|
3091
|
-
|
3204
|
+
setLoading2(false);
|
3205
|
+
setError(((_r = (_q = err == null ? void 0 : err.response) == null ? void 0 : _q.data) == null ? void 0 : _r.message) || (err == null ? void 0 : err.message) || "Something went wrong , Try again later");
|
3092
3206
|
}
|
3093
3207
|
} catch (err) {
|
3094
3208
|
console.log(err);
|
3095
|
-
|
3096
|
-
|
3209
|
+
setLoading2(false);
|
3210
|
+
setError(((_t = (_s = err == null ? void 0 : err.response) == null ? void 0 : _s.data) == null ? void 0 : _t.message) || (err == null ? void 0 : err.message) || "Something went wrong , Try again later");
|
3097
3211
|
}
|
3098
3212
|
} catch (err) {
|
3099
|
-
|
3100
|
-
|
3213
|
+
setLoading2(false);
|
3214
|
+
setError(((_v = (_u = err == null ? void 0 : err.response) == null ? void 0 : _u.data) == null ? void 0 : _v.message) || (err == null ? void 0 : err.message) || "Something went wrong , Try again later");
|
3101
3215
|
}
|
3102
3216
|
} else {
|
3103
3217
|
DatacapWebToken.requestToken(paymentData == null ? void 0 : paymentData.dctoken, "PaymentForm", tokenCallback);
|
3104
3218
|
}
|
3105
3219
|
} catch (err) {
|
3106
|
-
|
3107
|
-
|
3220
|
+
setLoading2(false);
|
3221
|
+
setError(((_x = (_w = err == null ? void 0 : err.response) == null ? void 0 : _w.data) == null ? void 0 : _x.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
3108
3222
|
}
|
3109
3223
|
}
|
3110
3224
|
}
|
3111
3225
|
}
|
3112
3226
|
};
|
3113
3227
|
const getPaymentDetails = async () => {
|
3114
|
-
var _a2, _b2, _c2, _d2,
|
3228
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j, _k, _l, _m, _n, _o;
|
3115
3229
|
showLoader();
|
3116
3230
|
try {
|
3117
3231
|
const data = {
|
@@ -3123,10 +3237,10 @@ function PreAuthPayment(props) {
|
|
3123
3237
|
setPaymentData((_a2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _a2.data);
|
3124
3238
|
if (!((_c2 = (_b2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _b2.data) == null ? void 0 : _c2.paymentGateway)) {
|
3125
3239
|
handleClose();
|
3126
|
-
|
3240
|
+
setError("Something went wrong.");
|
3127
3241
|
}
|
3128
|
-
if (((
|
3129
|
-
setCardList((_j = (
|
3242
|
+
if (((_e2 = (_d2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _d2.data) == null ? void 0 : _e2.card_list) && ((_h2 = (_g2 = (_f2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _f2.data) == null ? void 0 : _g2.card_list) == null ? void 0 : _h2.length) > 0) {
|
3243
|
+
setCardList((_j = (_i2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _i2.data) == null ? void 0 : _j.card_list);
|
3130
3244
|
setActive("cardList");
|
3131
3245
|
let primary_card = (_m = (_l = (_k = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _k.data) == null ? void 0 : _l.card_list) == null ? void 0 : _m.filter((card) => (card == null ? void 0 : card.primary_card) == 1);
|
3132
3246
|
if (primary_card == null ? void 0 : primary_card[0]) {
|
@@ -3138,14 +3252,12 @@ function PreAuthPayment(props) {
|
|
3138
3252
|
hideLoader();
|
3139
3253
|
} catch (err) {
|
3140
3254
|
console.log(err);
|
3141
|
-
setActive("card");
|
3142
3255
|
hideLoader();
|
3143
|
-
|
3144
|
-
showError("Something went wrong , Try again later");
|
3256
|
+
setError(((_o = (_n = err == null ? void 0 : err.response) == null ? void 0 : _n.data) == null ? void 0 : _o.message) || (err == null ? void 0 : err.message) || "Something went wrong");
|
3145
3257
|
}
|
3146
3258
|
};
|
3147
3259
|
const handlechargeCustomer = async () => {
|
3148
|
-
var _b2, _c2, _d2,
|
3260
|
+
var _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
3149
3261
|
let customer_id = props == null ? void 0 : props.customerId;
|
3150
3262
|
let discount = props == null ? void 0 : props.discount;
|
3151
3263
|
let surcharge = props == null ? void 0 : props.surcharge;
|
@@ -3175,27 +3287,27 @@ function PreAuthPayment(props) {
|
|
3175
3287
|
const headers = {
|
3176
3288
|
"Content-Type": "application/json"
|
3177
3289
|
};
|
3178
|
-
|
3290
|
+
setLoading2(true);
|
3179
3291
|
try {
|
3180
3292
|
let result = await axios4.post(chargeurl, card_type == "Bank" ? rest : chargeobj, { headers });
|
3181
3293
|
if ((_b2 = result == null ? void 0 : result.data) == null ? void 0 : _b2.result) {
|
3182
3294
|
setTranId((_d2 = (_c2 = result == null ? void 0 : result.data) == null ? void 0 : _c2.data) == null ? void 0 : _d2.transaction_id);
|
3183
3295
|
setSuccess(true);
|
3184
|
-
|
3296
|
+
setLoading2(false);
|
3185
3297
|
}
|
3186
3298
|
} catch (err) {
|
3187
|
-
|
3299
|
+
setLoading2(false);
|
3188
3300
|
console.log(err);
|
3189
|
-
|
3301
|
+
setError(((_f2 = (_e2 = err == null ? void 0 : err.response) == null ? void 0 : _e2.data) == null ? void 0 : _f2.message) || ((_h2 = (_g2 = err == null ? void 0 : err.response) == null ? void 0 : _g2.data) == null ? void 0 : _h2.status) || "Something went erong");
|
3190
3302
|
}
|
3191
3303
|
} else {
|
3192
|
-
|
3304
|
+
setError("Please Select A Card/ACH");
|
3193
3305
|
}
|
3194
3306
|
} else {
|
3195
|
-
|
3307
|
+
setError("Please Select Customer");
|
3196
3308
|
}
|
3197
3309
|
} else {
|
3198
|
-
|
3310
|
+
setError("Something went wrong.");
|
3199
3311
|
}
|
3200
3312
|
};
|
3201
3313
|
useEffect5(() => {
|
@@ -3220,7 +3332,7 @@ function PreAuthPayment(props) {
|
|
3220
3332
|
}
|
3221
3333
|
}).then(async (result) => {
|
3222
3334
|
if (result.isConfirmed) {
|
3223
|
-
|
3335
|
+
setLoading2(true);
|
3224
3336
|
try {
|
3225
3337
|
let obj = {
|
3226
3338
|
card_id: cardId,
|
@@ -3228,7 +3340,7 @@ function PreAuthPayment(props) {
|
|
3228
3340
|
fractalpayPublicKey: props == null ? void 0 : props.fractalpayClientKey
|
3229
3341
|
};
|
3230
3342
|
const res = await axios4.post(`${baseUrl}delete-customer-card`, obj);
|
3231
|
-
|
3343
|
+
setLoading2(false);
|
3232
3344
|
getPaymentDetails();
|
3233
3345
|
Swal2.fire({
|
3234
3346
|
icon: "success",
|
@@ -3240,7 +3352,7 @@ function PreAuthPayment(props) {
|
|
3240
3352
|
}
|
3241
3353
|
});
|
3242
3354
|
} catch (err) {
|
3243
|
-
|
3355
|
+
setLoading2(false);
|
3244
3356
|
Swal2.fire({
|
3245
3357
|
icon: "error",
|
3246
3358
|
title: "Error!",
|
@@ -3254,21 +3366,22 @@ function PreAuthPayment(props) {
|
|
3254
3366
|
}
|
3255
3367
|
});
|
3256
3368
|
};
|
3257
|
-
return /* @__PURE__ */
|
3369
|
+
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(DataScript, null), /* @__PURE__ */ React14.createElement(Chargewidgetstyles, null), /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(
|
3258
3370
|
"button",
|
3259
3371
|
{
|
3260
3372
|
className: "paymentBtn",
|
3261
3373
|
onClick: handleShow
|
3262
3374
|
},
|
3263
3375
|
"Pre Auth Pay"
|
3264
|
-
), /* @__PURE__ */
|
3376
|
+
), /* @__PURE__ */ React14.createElement(
|
3265
3377
|
CustomModal2_default,
|
3266
3378
|
{
|
3267
3379
|
open: show,
|
3268
3380
|
onClose: handleClose
|
3269
3381
|
},
|
3270
|
-
/* @__PURE__ */
|
3271
|
-
success
|
3382
|
+
error && /* @__PURE__ */ React14.createElement("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" } }, /* @__PURE__ */ React14.createElement(ErrorCardMessage_default, { error, onClose: handleClose })),
|
3383
|
+
success && /* @__PURE__ */ React14.createElement(SuccessMsz, { onClose: handleClose, tranId }),
|
3384
|
+
!error && !success && /* @__PURE__ */ React14.createElement(React14.Fragment, null, (loading || loading2) && /* @__PURE__ */ React14.createElement(Loader_default, { loading: loading || loading2 }), /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("div", { className: "frac-card-payment-page frac-form" }, /* @__PURE__ */ React14.createElement("div", { className: "parent-pay-container" }, /* @__PURE__ */ React14.createElement("span", { className: "request-payment-close-popup", onClick: handleClose }, /* @__PURE__ */ React14.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React14.createElement("g", { clipPath: "url(#clip0_12425_52336)" }, /* @__PURE__ */ React14.createElement("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" })), /* @__PURE__ */ React14.createElement("defs", null, /* @__PURE__ */ React14.createElement("clipPath", { id: "clip0_12425_52336" }, /* @__PURE__ */ React14.createElement("rect", { width: "16", height: "16", fill: "white" }))))), /* @__PURE__ */ React14.createElement("div", { className: "pay-container" }, /* @__PURE__ */ React14.createElement("div", { className: "pay-header pay-conatiner-one" }, /* @__PURE__ */ React14.createElement("div", { className: "pay-conatiner-one-first" }, /* @__PURE__ */ React14.createElement("div", { className: "pay-logo-container" }, /* @__PURE__ */ React14.createElement("div", { className: "pay-main-logo" }, /* @__PURE__ */ React14.createElement("img", { src: "https://fractal-userdata-upload.s3.us-east-1.amazonaws.com/uploaded/merchant_logo/20250311131124_merchant_logo.png", id: "pay-logos" })), /* @__PURE__ */ React14.createElement("h1", { className: "pay-heading" }, "Pay"), (cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ React14.createElement("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList") }, " ", /* @__PURE__ */ React14.createElement(IoArrowBack2, null), " Back")), /* @__PURE__ */ React14.createElement("div", { className: "amt-pay-con" }, /* @__PURE__ */ React14.createElement("div", { className: "pay-amount-conatiner" }, /* @__PURE__ */ React14.createElement("small", { className: "pay-payment-amount" }, "Payment Amount"), /* @__PURE__ */ React14.createElement("strong", { className: "pay-amount" }, "$", (_a = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _a.toFixed(2))), activetab != "ach" && /* @__PURE__ */ React14.createElement("div", { style: { display: "flex", gap: "8px", margin: "8px 0" } }, /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/visa-img.svg", alt: "", width: 33 }), /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/mc-img.svg", width: 33, alt: "" }), /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/ae-img.svg", alt: "", width: 33 }), /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/discover-img.svg", width: 33, alt: "" })))), /* @__PURE__ */ React14.createElement("div", { className: "pay-conatiner-one-last" }, /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/secure-img.png", alt: "" }), /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/pov-by.png", alt: "" }), "Secure payments powered by Fractal"), /* @__PURE__ */ React14.createElement("div", null)), !loading && /* @__PURE__ */ React14.createElement("div", { className: "pay-tab pay-conatiner-two" }, /* @__PURE__ */ React14.createElement("div", { className: "col-md-12" }, /* @__PURE__ */ React14.createElement("div", { id: "payment-form-div" }, activetab !== "cardList" ? /* @__PURE__ */ React14.createElement("div", null, (cardList == null ? void 0 : cardList.length) > 0 && /* @__PURE__ */ React14.createElement("button", { className: "charge-payment-back-btn ", onClick: () => setActive("cardList") }, " ", /* @__PURE__ */ React14.createElement(IoArrowBack2, null), " Back"), /* @__PURE__ */ React14.createElement("div", { className: "" }, /* @__PURE__ */ React14.createElement("div", { className: "res-pay-con" }, /* @__PURE__ */ React14.createElement("div", { className: "pay-amount-conatiner", style: { margin: 0 } }, /* @__PURE__ */ React14.createElement("small", { className: "pay-payment-amount" }, "Payment Amount"), /* @__PURE__ */ React14.createElement("strong", { className: "pay-amount" }, "$", (_b = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _b.toFixed(2))), /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/visa-img.svg", alt: "", width: 35, style: { paddingRight: "5px" } }), /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/mc-img.svg", width: 35, alt: "" })), /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/ae-img.svg", alt: "", width: 35, style: { paddingRight: "5px" } }), /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/discover-img.svg", width: 35, alt: "" })))))) : /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("h6", { className: "charge-customer-name", style: { marginBottom: "16px !important" } }, " Charge ", paymentData == null ? void 0 : paymentData.customer_name), /* @__PURE__ */ React14.createElement("div", { className: "res-pay-con" }, /* @__PURE__ */ React14.createElement("div", { className: "pay-amount-conatiner", style: { margin: 0 } }, /* @__PURE__ */ React14.createElement("small", { className: "pay-payment-amount" }, "Payment Amount"), /* @__PURE__ */ React14.createElement("strong", { className: "pay-amount" }, "$", (_c = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _c.toFixed(2))), /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/visa-img.svg", alt: "", width: 35, style: { paddingRight: "5px" } }), /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/mc-img.svg", width: 35, alt: "" })), /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/ae-img.svg", alt: "", width: 35, style: { paddingRight: "5px" } }), /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/discover-img.svg", width: 35, alt: "" })))), /* @__PURE__ */ React14.createElement("h6", { className: "card-ach-heading", style: { marginBottom: "10px !important" } }, " Cards")), /* @__PURE__ */ React14.createElement("div", { style: { display: activetab === "cardList" ? "block" : "none" }, className: "tabcontent" }, /* @__PURE__ */ React14.createElement("div", { className: "card-lint-div-in" }, /* @__PURE__ */ React14.createElement("div", { className: "card-list-div" }, (paymentData == null ? void 0 : paymentData.card_list) && ((_d = paymentData == null ? void 0 : paymentData.card_list) == null ? void 0 : _d.length) > 0 && ((_e = paymentData == null ? void 0 : paymentData.card_list) == null ? void 0 : _e.map((card, index) => /* @__PURE__ */ React14.createElement("div", { className: "card-list-single-div", key: index }, /* @__PURE__ */ React14.createElement("div", { className: "card-number-radio" }, /* @__PURE__ */ React14.createElement(
|
3272
3385
|
"input",
|
3273
3386
|
{
|
3274
3387
|
type: "radio",
|
@@ -3278,7 +3391,7 @@ function PreAuthPayment(props) {
|
|
3278
3391
|
checked: selectedCard === card,
|
3279
3392
|
onChange: (e) => setSelectedCard(card)
|
3280
3393
|
}
|
3281
|
-
), /* @__PURE__ */
|
3394
|
+
), /* @__PURE__ */ React14.createElement("label", { htmlFor: "", className: "card-number-last-four" }, "**** ", card == null ? void 0 : card.cardlastfourdigit), /* @__PURE__ */ React14.createElement("h6", { className: "card-expiry-date" }, card == null ? void 0 : card.expmonth, "/", card == null ? void 0 : card.expyear)), /* @__PURE__ */ React14.createElement("div", { className: "card-number-radio" }, /* @__PURE__ */ React14.createElement("span", { className: "visa-card" }, /* @__PURE__ */ React14.createElement("img", { src: (card == null ? void 0 : card.card_type) != "Bank" ? "https://dev-widget.fractalpay.com/images/visa-img.svg" : "https://dev-widget.fractalpay.com/images/bank.svg", alt: "" })), /* @__PURE__ */ React14.createElement("span", { className: "visa-card", style: { cursor: "pointer" }, onClick: () => handleDeleteCard(card == null ? void 0 : card.id) }, /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/Trash.svg", alt: "" }))))))), /* @__PURE__ */ React14.createElement("div", { className: "pay-with-other-card ", onClick: () => setActive("card") }, "Authorize With Other Card", /* @__PURE__ */ React14.createElement("img", { src: "https://dev-widget.fractalpay.com/images/card.svg", alt: "" }))), /* @__PURE__ */ React14.createElement("div", { className: "form-group" }, /* @__PURE__ */ React14.createElement("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer }, "$", (_f = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _f.toFixed(2)))), /* @__PURE__ */ React14.createElement("div", { id: "card", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent" }, /* @__PURE__ */ React14.createElement("form", { id: "PaymentForm", onSubmit: submitFunc }, /* @__PURE__ */ React14.createElement("div", { className: "ach-scrl", style: { minHeight: (cardList == null ? void 0 : cardList.length) > 0 ? "462px" : "520px", overflow: "auto", marginRight: "5px" } }, /* @__PURE__ */ React14.createElement("div", { className: "form-group" }, /* @__PURE__ */ React14.createElement("label", { htmlFor: "cardHolderName" }, "Name on Card"), /* @__PURE__ */ React14.createElement(
|
3282
3395
|
"input",
|
3283
3396
|
{
|
3284
3397
|
type: "text",
|
@@ -3292,7 +3405,7 @@ function PreAuthPayment(props) {
|
|
3292
3405
|
}
|
3293
3406
|
}
|
3294
3407
|
}
|
3295
|
-
), (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */
|
3408
|
+
), (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ React14.createElement("span", { className: "error-span" }, cardError == null ? void 0 : cardError.cardName)), /* @__PURE__ */ React14.createElement("div", { className: "form-group" }, /* @__PURE__ */ React14.createElement("label", { htmlFor: "cardNumber" }, "Card Number"), /* @__PURE__ */ React14.createElement("div", { className: "toggle-num-wrapper" }, /* @__PURE__ */ React14.createElement(
|
3296
3409
|
"input",
|
3297
3410
|
{
|
3298
3411
|
className: "form-control card-number-new",
|
@@ -3304,7 +3417,7 @@ function PreAuthPayment(props) {
|
|
3304
3417
|
onChange: (e) => handleCardNumberChange(e),
|
3305
3418
|
"data-token": "card_number"
|
3306
3419
|
}
|
3307
|
-
), /* @__PURE__ */
|
3420
|
+
), /* @__PURE__ */ React14.createElement("div", { className: "card-crdi card-expiry-new" }, /* @__PURE__ */ React14.createElement("div", { className: "exp-date-year-container" }, /* @__PURE__ */ React14.createElement("div", { className: "exp-date form-group" }, /* @__PURE__ */ React14.createElement(
|
3308
3421
|
"input",
|
3309
3422
|
{
|
3310
3423
|
"data-token": "exp_month",
|
@@ -3316,7 +3429,7 @@ function PreAuthPayment(props) {
|
|
3316
3429
|
value: (cardData == null ? void 0 : cardData.expiryMonth) || "",
|
3317
3430
|
onChange: (e) => handleCardChange("expiryMonth", e.target.value)
|
3318
3431
|
}
|
3319
|
-
)), /* @__PURE__ */
|
3432
|
+
)), /* @__PURE__ */ React14.createElement("div", { className: "exp-year form-group" }, /* @__PURE__ */ React14.createElement(
|
3320
3433
|
"input",
|
3321
3434
|
{
|
3322
3435
|
"data-token": "exp_year",
|
@@ -3328,7 +3441,7 @@ function PreAuthPayment(props) {
|
|
3328
3441
|
value: (cardData == null ? void 0 : cardData.expiryYear) || "",
|
3329
3442
|
onChange: (e) => handleCardChange("expiryYear", e.target.value)
|
3330
3443
|
}
|
3331
|
-
)), /* @__PURE__ */
|
3444
|
+
)), /* @__PURE__ */ React14.createElement("div", { className: "security-digit form-group" }, /* @__PURE__ */ React14.createElement(
|
3332
3445
|
"input",
|
3333
3446
|
{
|
3334
3447
|
"data-token": "cvv",
|
@@ -3340,7 +3453,7 @@ function PreAuthPayment(props) {
|
|
3340
3453
|
value: (cardData == null ? void 0 : cardData.cvv) || "",
|
3341
3454
|
onChange: (e) => handleCardChange("cvv", e.target.value)
|
3342
3455
|
}
|
3343
|
-
)))), (cardError == null ? void 0 : cardError.cardNumber) && /* @__PURE__ */
|
3456
|
+
)))), (cardError == null ? void 0 : cardError.cardNumber) && /* @__PURE__ */ React14.createElement("span", { className: "error-span" }, cardError == null ? void 0 : cardError.cardNumber), /* @__PURE__ */ React14.createElement("p", { style: { margin: "0" } }, (cardError == null ? void 0 : cardError.expiryMonth) || (cardError == null ? void 0 : cardError.expiryYear) ? /* @__PURE__ */ React14.createElement("span", { className: "error-span", style: { paddingRight: "4px" } }, cardError == null ? void 0 : cardError.expiryMonth) : "", (cardError == null ? void 0 : cardError.cvv) && /* @__PURE__ */ React14.createElement("span", { className: "error-span" }, cardError == null ? void 0 : cardError.cvv)))), /* @__PURE__ */ React14.createElement("div", { className: "form-group" }, /* @__PURE__ */ React14.createElement("label", { htmlFor: "OrderId" }, "Order ID / Description"), /* @__PURE__ */ React14.createElement(
|
3344
3457
|
"input",
|
3345
3458
|
{
|
3346
3459
|
type: "text",
|
@@ -3348,11 +3461,11 @@ function PreAuthPayment(props) {
|
|
3348
3461
|
maxLength: 100,
|
3349
3462
|
placeholder: "OID123456",
|
3350
3463
|
disabled: true,
|
3351
|
-
value: (
|
3464
|
+
value: (_g = cardData == null ? void 0 : cardData.orderId) != null ? _g : "OID123456",
|
3352
3465
|
onChange: (e) => handleCardChange("orderId", e.target.value),
|
3353
3466
|
style: { background: "#F6F6F7", color: "#727272" }
|
3354
3467
|
}
|
3355
|
-
)), /* @__PURE__ */
|
3468
|
+
)), /* @__PURE__ */ React14.createElement("div", { className: "form-group" }, /* @__PURE__ */ React14.createElement("label", { htmlFor: "zip" }, "ZIP"), /* @__PURE__ */ React14.createElement("input", { type: "text", className: "form-control", maxLength: 100, placeholder: "000000", value: (_h = cardData == null ? void 0 : cardData.zipCode) != null ? _h : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }), (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ React14.createElement("span", { className: "error-span" }, cardError == null ? void 0 : cardError.zipCode)), (props == null ? void 0 : props.customerId) && /* @__PURE__ */ React14.createElement("div", { className: "form-group" }, /* @__PURE__ */ React14.createElement("div", { style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" } }, /* @__PURE__ */ React14.createElement(
|
3356
3469
|
"input",
|
3357
3470
|
{
|
3358
3471
|
type: "checkbox",
|
@@ -3361,23 +3474,23 @@ function PreAuthPayment(props) {
|
|
3361
3474
|
checked: saveCardInfo,
|
3362
3475
|
onChange: (e) => setSaveCardInfo(e.target.checked)
|
3363
3476
|
}
|
3364
|
-
), /* @__PURE__ */
|
3477
|
+
), /* @__PURE__ */ React14.createElement("label", { htmlFor: "save_card", className: "toggle-label" }), /* @__PURE__ */ React14.createElement("label", { htmlFor: "save_card" }, "Save card for future payments "), /* @__PURE__ */ React14.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, /* @__PURE__ */ React14.createElement("g", { clipPath: "url(#clip0_12420_50192)" }, /* @__PURE__ */ React14.createElement("rect", { width: "20", height: "20", fill: "white" }), /* @__PURE__ */ React14.createElement("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }), /* @__PURE__ */ React14.createElement("path", { 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", fill: "#161616" })), /* @__PURE__ */ React14.createElement("defs", null, /* @__PURE__ */ React14.createElement("clipPath", { id: "clip0_12420_50192" }, /* @__PURE__ */ React14.createElement("rect", { width: "20", height: "20", fill: "white" }))))))), /* @__PURE__ */ React14.createElement("div", { className: "form-group", style: { marginTop: "20px", padding: 0 } }, /* @__PURE__ */ React14.createElement("button", { type: "submit", style: { margin: 0 }, className: "pay-button" }, "$", (_i = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _i.toFixed(2)))))))))))))
|
3365
3478
|
)));
|
3366
3479
|
}
|
3367
3480
|
|
3368
3481
|
// src/app/components/AddCard/AddCard.tsx
|
3369
|
-
import
|
3482
|
+
import React19, { useEffect as useEffect6, useState as useState5 } from "react";
|
3370
3483
|
import Swal3 from "sweetalert2";
|
3371
3484
|
import axios5 from "axios";
|
3372
3485
|
|
3373
3486
|
// src/app/components/AddCard/AddCardStyles.tsx
|
3374
|
-
import
|
3487
|
+
import React15 from "react";
|
3375
3488
|
function AddCardStyle() {
|
3376
3489
|
const primarycolor = "#000";
|
3377
3490
|
const primarybgcolor = "#fff";
|
3378
3491
|
const primarybodycolor = "#212529";
|
3379
3492
|
const primarybordercolor = "#dee2e6";
|
3380
|
-
return /* @__PURE__ */
|
3493
|
+
return /* @__PURE__ */ React15.createElement("style", null, `
|
3381
3494
|
.add-card {
|
3382
3495
|
max-width:380px;
|
3383
3496
|
padding: 0 20px
|
@@ -3640,14 +3753,14 @@ function AddCardStyle() {
|
|
3640
3753
|
}
|
3641
3754
|
|
3642
3755
|
// src/app/components/CustomModal/CustomModal.tsx
|
3643
|
-
import
|
3756
|
+
import React16 from "react";
|
3644
3757
|
var CustomModal = ({
|
3645
3758
|
open,
|
3646
3759
|
onClose,
|
3647
3760
|
children
|
3648
3761
|
}) => {
|
3649
3762
|
if (!open) return null;
|
3650
|
-
return /* @__PURE__ */
|
3763
|
+
return /* @__PURE__ */ React16.createElement("div", { style: {
|
3651
3764
|
position: "fixed",
|
3652
3765
|
top: 0,
|
3653
3766
|
left: 0,
|
@@ -3658,17 +3771,17 @@ var CustomModal = ({
|
|
3658
3771
|
display: "flex",
|
3659
3772
|
justifyContent: "center",
|
3660
3773
|
alignItems: "center"
|
3661
|
-
} }, /* @__PURE__ */
|
3774
|
+
} }, /* @__PURE__ */ React16.createElement("div", { style: { background: "white", padding: "20px", borderRadius: "8px", minWidth: "300px" } }, /* @__PURE__ */ React16.createElement("div", { className: "", style: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React16.createElement("button", { onClick: onClose, style: { border: "none", background: "transparent", color: "black" } }, "X")), /* @__PURE__ */ React16.createElement("div", null, children)));
|
3662
3775
|
};
|
3663
3776
|
var CustomModal_default = CustomModal;
|
3664
3777
|
|
3665
3778
|
// src/app/components/SuccessCardMessage/SuccessCardMsz.tsx
|
3666
|
-
import
|
3779
|
+
import React18 from "react";
|
3667
3780
|
|
3668
3781
|
// src/app/components/SuccessCardMessage/SuccessCardMszStyle.tsx
|
3669
|
-
import
|
3782
|
+
import React17 from "react";
|
3670
3783
|
function SuccessCardMszStyle() {
|
3671
|
-
return /* @__PURE__ */
|
3784
|
+
return /* @__PURE__ */ React17.createElement("style", null, `
|
3672
3785
|
.card-success .logo-container {
|
3673
3786
|
display: flex;
|
3674
3787
|
justify-content: center;
|
@@ -3761,7 +3874,7 @@ function SuccessCardMszStyle() {
|
|
3761
3874
|
|
3762
3875
|
// src/app/components/SuccessCardMessage/SuccessCardMsz.tsx
|
3763
3876
|
var SuccessCardMsz = ({ onClose }) => {
|
3764
|
-
return /* @__PURE__ */
|
3877
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(SuccessCardMszStyle, null), /* @__PURE__ */ React18.createElement("div", { className: "card-success" }, /* @__PURE__ */ React18.createElement("div", { className: "payment-success-container" }, /* @__PURE__ */ React18.createElement("div", { className: "success-icon" }, /* @__PURE__ */ React18.createElement("div", { className: "circle" }, /* @__PURE__ */ React18.createElement("i", { className: "fa fa-check-circle", "aria-hidden": "true" })), /* @__PURE__ */ React18.createElement("div", { className: "success-text" }, /* @__PURE__ */ React18.createElement("div", { className: "payment-success-text" }, "Your card was added successfully."), /* @__PURE__ */ React18.createElement("div", { className: "thank-you-text" }, "Thank you "))))));
|
3765
3878
|
};
|
3766
3879
|
var SuccessCardMsz_default = SuccessCardMsz;
|
3767
3880
|
|
@@ -4048,27 +4161,27 @@ function AddCard(props) {
|
|
4048
4161
|
}
|
4049
4162
|
}
|
4050
4163
|
};
|
4051
|
-
return /* @__PURE__ */
|
4164
|
+
return /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(DataScript, null), /* @__PURE__ */ React19.createElement(AddCardStyle, null), /* @__PURE__ */ React19.createElement(
|
4052
4165
|
"button",
|
4053
4166
|
{
|
4054
4167
|
className: "paymentBtn",
|
4055
4168
|
onClick: handleShow
|
4056
4169
|
},
|
4057
4170
|
"Add Card"
|
4058
|
-
), /* @__PURE__ */
|
4171
|
+
), /* @__PURE__ */ React19.createElement(
|
4059
4172
|
CustomModal_default,
|
4060
4173
|
{
|
4061
4174
|
open: show,
|
4062
4175
|
onClose: handleClose
|
4063
4176
|
},
|
4064
|
-
/* @__PURE__ */
|
4065
|
-
success ? /* @__PURE__ */
|
4177
|
+
/* @__PURE__ */ React19.createElement(Loader_default, { loading }),
|
4178
|
+
success ? /* @__PURE__ */ React19.createElement(SuccessCardMsz_default, { onClose: handleClose }) : /* @__PURE__ */ React19.createElement(
|
4066
4179
|
"div",
|
4067
4180
|
{
|
4068
4181
|
className: "container-creditcard add-card modal-content frac-form",
|
4069
4182
|
id: "add-credit-card-panel"
|
4070
4183
|
},
|
4071
|
-
/* @__PURE__ */
|
4184
|
+
/* @__PURE__ */ React19.createElement("form", { id: "creditCardForm", onSubmit: addCardFunc }, /* @__PURE__ */ React19.createElement("div", { className: "form-group", style: { marginTop: "0", marginBottom: "10px" } }, /* @__PURE__ */ React19.createElement("label", { htmlFor: "cardNumber" }, "Card Number"), /* @__PURE__ */ React19.createElement(
|
4072
4185
|
"input",
|
4073
4186
|
{
|
4074
4187
|
type: "text",
|
@@ -4079,7 +4192,7 @@ function AddCard(props) {
|
|
4079
4192
|
value: (cardData == null ? void 0 : cardData.cardNumber) || "",
|
4080
4193
|
onChange: (e) => handleCardNumberChange(e)
|
4081
4194
|
}
|
4082
|
-
), (cardError == null ? void 0 : cardError.cardNumber) && /* @__PURE__ */
|
4195
|
+
), (cardError == null ? void 0 : cardError.cardNumber) && /* @__PURE__ */ React19.createElement("span", { className: "error-span" }, cardError == null ? void 0 : cardError.cardNumber)), /* @__PURE__ */ React19.createElement("div", { className: "card-dtl" }, /* @__PURE__ */ React19.createElement("div", { className: "exp-cvc-container" }, /* @__PURE__ */ React19.createElement("div", { className: "form-group", style: { marginTop: "0", marginBottom: "10px" } }, /* @__PURE__ */ React19.createElement("label", { htmlFor: "expMonth" }, "MM"), /* @__PURE__ */ React19.createElement(
|
4083
4196
|
"input",
|
4084
4197
|
{
|
4085
4198
|
"data-token": "exp_month",
|
@@ -4090,7 +4203,7 @@ function AddCard(props) {
|
|
4090
4203
|
value: (cardData == null ? void 0 : cardData.expiryMonth) || "",
|
4091
4204
|
onChange: (e) => handleCardChange("expiryMonth", e.target.value)
|
4092
4205
|
}
|
4093
|
-
), (cardError == null ? void 0 : cardError.expiryMonth) && /* @__PURE__ */
|
4206
|
+
), (cardError == null ? void 0 : cardError.expiryMonth) && /* @__PURE__ */ React19.createElement("span", { className: "error-span" }, cardError == null ? void 0 : cardError.expiryMonth)), /* @__PURE__ */ React19.createElement("div", { className: "form-group", style: { marginTop: "0", marginBottom: "10px" } }, /* @__PURE__ */ React19.createElement("label", { htmlFor: "expYear" }, "YYYY"), /* @__PURE__ */ React19.createElement(
|
4094
4207
|
"input",
|
4095
4208
|
{
|
4096
4209
|
"data-token": "exp_year",
|
@@ -4101,7 +4214,7 @@ function AddCard(props) {
|
|
4101
4214
|
value: (cardData == null ? void 0 : cardData.expiryYear) || "",
|
4102
4215
|
onChange: (e) => handleCardChange("expiryYear", e.target.value)
|
4103
4216
|
}
|
4104
|
-
), (cardError == null ? void 0 : cardError.expiryYear) && /* @__PURE__ */
|
4217
|
+
), (cardError == null ? void 0 : cardError.expiryYear) && /* @__PURE__ */ React19.createElement("span", { className: "error-span" }, cardError == null ? void 0 : cardError.expiryYear)), /* @__PURE__ */ React19.createElement("div", { className: "form-group", style: { marginTop: "0", marginBottom: "10px" } }, /* @__PURE__ */ React19.createElement("label", { htmlFor: "cvc" }, "CVC"), /* @__PURE__ */ React19.createElement(
|
4105
4218
|
"input",
|
4106
4219
|
{
|
4107
4220
|
"data-token": "cvv",
|
@@ -4112,7 +4225,7 @@ function AddCard(props) {
|
|
4112
4225
|
value: (cardData == null ? void 0 : cardData.cvv) || "",
|
4113
4226
|
onChange: (e) => handleCardChange("cvv", e.target.value)
|
4114
4227
|
}
|
4115
|
-
), (cardError == null ? void 0 : cardError.cvv) && /* @__PURE__ */
|
4228
|
+
), (cardError == null ? void 0 : cardError.cvv) && /* @__PURE__ */ React19.createElement("span", { className: "error-span" }, cardError == null ? void 0 : cardError.cvv)))), /* @__PURE__ */ React19.createElement("div", { className: "form-group", style: { marginTop: "0", marginBottom: "10px" } }, /* @__PURE__ */ React19.createElement("label", { htmlFor: "cardholderName" }, "Name on card"), /* @__PURE__ */ React19.createElement(
|
4116
4229
|
"input",
|
4117
4230
|
{
|
4118
4231
|
type: "text",
|
@@ -4127,7 +4240,7 @@ function AddCard(props) {
|
|
4127
4240
|
}
|
4128
4241
|
}
|
4129
4242
|
}
|
4130
|
-
), (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */
|
4243
|
+
), (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ React19.createElement("span", { className: "error-span" }, cardError == null ? void 0 : cardError.cardName)), /* @__PURE__ */ React19.createElement("div", { className: "form-group", style: { marginBottom: "20px" } }, /* @__PURE__ */ React19.createElement("label", { htmlFor: "zipcode" }, "Zip"), /* @__PURE__ */ React19.createElement(
|
4131
4244
|
"input",
|
4132
4245
|
{
|
4133
4246
|
type: "text",
|
@@ -4137,7 +4250,7 @@ function AddCard(props) {
|
|
4137
4250
|
value: (_a = cardData == null ? void 0 : cardData.zipCode) != null ? _a : "",
|
4138
4251
|
onChange: (e) => handleCardChange("zipCode", e.target.value)
|
4139
4252
|
}
|
4140
|
-
), (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */
|
4253
|
+
), (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ React19.createElement("span", { className: "error-span" }, cardError == null ? void 0 : cardError.zipCode)), /* @__PURE__ */ React19.createElement(
|
4141
4254
|
"input",
|
4142
4255
|
{
|
4143
4256
|
type: "submit",
|
@@ -4150,13 +4263,14 @@ function AddCard(props) {
|
|
4150
4263
|
}
|
4151
4264
|
|
4152
4265
|
// src/app/components/AddCard/AddCardEasyPay.tsx
|
4153
|
-
import
|
4266
|
+
import React20, { useEffect as useEffect7, useState as useState6 } from "react";
|
4154
4267
|
import Swal4 from "sweetalert2";
|
4155
4268
|
import axios6 from "axios";
|
4156
4269
|
function AddCardEasyPay(props) {
|
4157
4270
|
var _a;
|
4158
4271
|
const [loading, setLoading] = useState6(false);
|
4159
4272
|
const [success, setSuccess] = useState6(false);
|
4273
|
+
const [error, setError] = useState6("");
|
4160
4274
|
const [show, setShow] = useState6(false);
|
4161
4275
|
const [cardData, setCardData] = useState6();
|
4162
4276
|
const [cardError, setCardError] = useState6({});
|
@@ -4175,6 +4289,7 @@ function AddCardEasyPay(props) {
|
|
4175
4289
|
const handleClose = () => {
|
4176
4290
|
setShow(false);
|
4177
4291
|
setSuccess(false);
|
4292
|
+
setError("");
|
4178
4293
|
setCardData({
|
4179
4294
|
cardName: "",
|
4180
4295
|
cardNumber: "",
|
@@ -4284,14 +4399,14 @@ function AddCardEasyPay(props) {
|
|
4284
4399
|
setPaymentData((_a2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _a2.data);
|
4285
4400
|
if (!((_c = (_b = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _b.data) == null ? void 0 : _c.paymentGateway)) {
|
4286
4401
|
handleClose();
|
4287
|
-
|
4402
|
+
setError("Something went wrong.");
|
4288
4403
|
}
|
4289
4404
|
hideLoader();
|
4290
4405
|
} catch (err) {
|
4291
4406
|
console.log(err);
|
4292
4407
|
hideLoader();
|
4293
4408
|
handleClose();
|
4294
|
-
|
4409
|
+
setError("Something went wrong.");
|
4295
4410
|
}
|
4296
4411
|
};
|
4297
4412
|
useEffect7(() => {
|
@@ -4323,7 +4438,7 @@ function AddCardEasyPay(props) {
|
|
4323
4438
|
console.log(token);
|
4324
4439
|
if (token.Error) {
|
4325
4440
|
console.log(token == null ? void 0 : token.Error);
|
4326
|
-
|
4441
|
+
setError(token.Error);
|
4327
4442
|
hideLoader();
|
4328
4443
|
} else {
|
4329
4444
|
const reqData = {
|
@@ -4362,12 +4477,12 @@ function AddCardEasyPay(props) {
|
|
4362
4477
|
} catch (err) {
|
4363
4478
|
console.log(err);
|
4364
4479
|
hideLoader();
|
4365
|
-
|
4480
|
+
setError(((_c2 = (_b2 = err == null ? void 0 : err.response) == null ? void 0 : _b2.data) == null ? void 0 : _c2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
4366
4481
|
}
|
4367
4482
|
} catch (err) {
|
4368
4483
|
console.log(err);
|
4369
4484
|
hideLoader();
|
4370
|
-
|
4485
|
+
setError(((_e2 = (_d2 = err == null ? void 0 : err.response) == null ? void 0 : _d2.data) == null ? void 0 : _e2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
4371
4486
|
}
|
4372
4487
|
}
|
4373
4488
|
};
|
@@ -4427,15 +4542,15 @@ function AddCardEasyPay(props) {
|
|
4427
4542
|
}
|
4428
4543
|
} catch (err) {
|
4429
4544
|
hideLoader();
|
4430
|
-
|
4545
|
+
setError(((_j = (_i = err == null ? void 0 : err.response) == null ? void 0 : _i.data) == null ? void 0 : _j.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
4431
4546
|
}
|
4432
4547
|
} catch (err) {
|
4433
4548
|
hideLoader();
|
4434
|
-
|
4549
|
+
setError(((_l = (_k = err == null ? void 0 : err.response) == null ? void 0 : _k.data) == null ? void 0 : _l.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
4435
4550
|
}
|
4436
4551
|
} catch (err) {
|
4437
4552
|
hideLoader();
|
4438
|
-
|
4553
|
+
setError(((_n = (_m = err == null ? void 0 : err.response) == null ? void 0 : _m.data) == null ? void 0 : _n.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
4439
4554
|
}
|
4440
4555
|
} else {
|
4441
4556
|
if (typeof DatacapWebToken !== "undefined") {
|
@@ -4444,19 +4559,19 @@ function AddCardEasyPay(props) {
|
|
4444
4559
|
}
|
4445
4560
|
} catch (err) {
|
4446
4561
|
hideLoader();
|
4447
|
-
|
4562
|
+
setError(((_p = (_o = err == null ? void 0 : err.response) == null ? void 0 : _o.data) == null ? void 0 : _p.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
4448
4563
|
}
|
4449
4564
|
}
|
4450
4565
|
}
|
4451
4566
|
};
|
4452
|
-
return /* @__PURE__ */
|
4567
|
+
return /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(DataScript, null), /* @__PURE__ */ React20.createElement(AddCardStyle, null), /* @__PURE__ */ React20.createElement(Loader_default, { loading }), error && /* @__PURE__ */ React20.createElement("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" } }, /* @__PURE__ */ React20.createElement(ErrorCardMessage_default, { error, onClose: handleClose })), !error && !success && /* @__PURE__ */ React20.createElement(React20.Fragment, null, success ? /* @__PURE__ */ React20.createElement(SuccessCardMsz_default, { onClose: handleCloseSeccess }) : /* @__PURE__ */ React20.createElement(
|
4453
4568
|
"div",
|
4454
4569
|
{
|
4455
4570
|
className: "container-creditcard add-card modal-content",
|
4456
4571
|
id: "add-credit-card-panel",
|
4457
4572
|
style: { margin: "auto" }
|
4458
4573
|
},
|
4459
|
-
/* @__PURE__ */
|
4574
|
+
/* @__PURE__ */ React20.createElement("form", { id: "creditCardForm", onSubmit: addCardFunc, style: { padding: "0 10px" } }, /* @__PURE__ */ React20.createElement("div", { style: { maxHeight: "350px", minHeight: "0" }, className: "card-scrl" }, /* @__PURE__ */ React20.createElement("div", { className: "form-group", style: { marginTop: "0", marginBottom: "10px" } }, /* @__PURE__ */ React20.createElement("label", { htmlFor: "cardNumber" }, "Card Number"), /* @__PURE__ */ React20.createElement(
|
4460
4575
|
"input",
|
4461
4576
|
{
|
4462
4577
|
type: "text",
|
@@ -4467,7 +4582,7 @@ function AddCardEasyPay(props) {
|
|
4467
4582
|
value: (cardData == null ? void 0 : cardData.cardNumber) || "",
|
4468
4583
|
onChange: (e) => handleCardNumberChange(e)
|
4469
4584
|
}
|
4470
|
-
), (cardError == null ? void 0 : cardError.cardNumber) && /* @__PURE__ */
|
4585
|
+
), (cardError == null ? void 0 : cardError.cardNumber) && /* @__PURE__ */ React20.createElement("span", { className: "error-span", style: { color: "red", fontSize: "12px" } }, cardError == null ? void 0 : cardError.cardNumber), /* @__PURE__ */ React20.createElement("br", null)), /* @__PURE__ */ React20.createElement("div", { className: "card-dtl" }, /* @__PURE__ */ React20.createElement("div", { className: "exp-cvc-container", style: { margin: "0" } }, /* @__PURE__ */ React20.createElement("div", { className: "form-group", style: { marginTop: "0" } }, /* @__PURE__ */ React20.createElement("label", { htmlFor: "expMonth" }, "MM"), /* @__PURE__ */ React20.createElement(
|
4471
4586
|
"input",
|
4472
4587
|
{
|
4473
4588
|
"data-token": "exp_month",
|
@@ -4478,7 +4593,7 @@ function AddCardEasyPay(props) {
|
|
4478
4593
|
value: (cardData == null ? void 0 : cardData.expiryMonth) || "",
|
4479
4594
|
onChange: (e) => handleCardChange("expiryMonth", e.target.value)
|
4480
4595
|
}
|
4481
|
-
), (cardError == null ? void 0 : cardError.expiryMonth) && /* @__PURE__ */
|
4596
|
+
), (cardError == null ? void 0 : cardError.expiryMonth) && /* @__PURE__ */ React20.createElement("span", { className: "error-span", style: { color: "red", fontSize: "12px" } }, cardError == null ? void 0 : cardError.expiryMonth)), /* @__PURE__ */ React20.createElement("div", { className: "form-group", style: { marginTop: "0" } }, /* @__PURE__ */ React20.createElement("label", { htmlFor: "expYear" }, "YYYY"), /* @__PURE__ */ React20.createElement(
|
4482
4597
|
"input",
|
4483
4598
|
{
|
4484
4599
|
"data-token": "exp_year",
|
@@ -4489,7 +4604,7 @@ function AddCardEasyPay(props) {
|
|
4489
4604
|
value: (cardData == null ? void 0 : cardData.expiryYear) || "",
|
4490
4605
|
onChange: (e) => handleCardChange("expiryYear", e.target.value)
|
4491
4606
|
}
|
4492
|
-
), (cardError == null ? void 0 : cardError.expiryYear) && /* @__PURE__ */
|
4607
|
+
), (cardError == null ? void 0 : cardError.expiryYear) && /* @__PURE__ */ React20.createElement("span", { className: "error-span", style: { color: "red", fontSize: "12px" } }, cardError == null ? void 0 : cardError.expiryYear)), /* @__PURE__ */ React20.createElement("div", { className: "form-group", style: { marginTop: "0" } }, /* @__PURE__ */ React20.createElement("label", { htmlFor: "cvc" }, "CVC"), /* @__PURE__ */ React20.createElement(
|
4493
4608
|
"input",
|
4494
4609
|
{
|
4495
4610
|
"data-token": "cvv",
|
@@ -4500,7 +4615,7 @@ function AddCardEasyPay(props) {
|
|
4500
4615
|
value: (cardData == null ? void 0 : cardData.cvv) || "",
|
4501
4616
|
onChange: (e) => handleCardChange("cvv", e.target.value)
|
4502
4617
|
}
|
4503
|
-
), (cardError == null ? void 0 : cardError.cvv) && /* @__PURE__ */
|
4618
|
+
), (cardError == null ? void 0 : cardError.cvv) && /* @__PURE__ */ React20.createElement("span", { className: "error-span", style: { color: "red", fontSize: "12px" } }, cardError == null ? void 0 : cardError.cvv)))), /* @__PURE__ */ React20.createElement("div", { className: "form-group", style: { marginTop: "0" } }, /* @__PURE__ */ React20.createElement("label", { htmlFor: "cardholderName" }, "Name on card"), /* @__PURE__ */ React20.createElement(
|
4504
4619
|
"input",
|
4505
4620
|
{
|
4506
4621
|
type: "text",
|
@@ -4515,7 +4630,7 @@ function AddCardEasyPay(props) {
|
|
4515
4630
|
}
|
4516
4631
|
}
|
4517
4632
|
}
|
4518
|
-
), (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */
|
4633
|
+
), (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ React20.createElement("span", { className: "error-span", style: { color: "red", fontSize: "12px" } }, cardError == null ? void 0 : cardError.cardName)), /* @__PURE__ */ React20.createElement("div", { className: "form-group", style: { marginTop: "0" } }, /* @__PURE__ */ React20.createElement("label", { htmlFor: "zipcode" }, "Zip"), /* @__PURE__ */ React20.createElement(
|
4519
4634
|
"input",
|
4520
4635
|
{
|
4521
4636
|
type: "text",
|
@@ -4525,7 +4640,7 @@ function AddCardEasyPay(props) {
|
|
4525
4640
|
value: (_a = cardData == null ? void 0 : cardData.zipCode) != null ? _a : "",
|
4526
4641
|
onChange: (e) => handleCardChange("zipCode", e.target.value)
|
4527
4642
|
}
|
4528
|
-
), (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */
|
4643
|
+
), (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ React20.createElement("span", { className: "error-span", style: { color: "red", fontSize: "12px" } }, cardError == null ? void 0 : cardError.zipCode))), /* @__PURE__ */ React20.createElement(
|
4529
4644
|
"input",
|
4530
4645
|
{
|
4531
4646
|
type: "submit",
|
@@ -4533,7 +4648,7 @@ function AddCardEasyPay(props) {
|
|
4533
4648
|
defaultValue: "Submit"
|
4534
4649
|
}
|
4535
4650
|
))
|
4536
|
-
));
|
4651
|
+
)));
|
4537
4652
|
}
|
4538
4653
|
export {
|
4539
4654
|
AddCard,
|