@fractalpay/fractalpay-next-test 0.0.39 → 0.0.40
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 +172 -320
- package/dist/index.js.map +1 -1
- package/next-env.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39,7 +39,7 @@ var require_package = __commonJS({
|
|
|
39
39
|
"package.json"(exports, module) {
|
|
40
40
|
module.exports = {
|
|
41
41
|
name: "@fractalpay/fractalpay-next-test",
|
|
42
|
-
version: "0.0.
|
|
42
|
+
version: "0.0.40",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -8800,7 +8800,7 @@ function PartialPayment(props) {
|
|
|
8800
8800
|
}
|
|
8801
8801
|
|
|
8802
8802
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
8803
|
-
import { useEffect as
|
|
8803
|
+
import { useEffect as useEffect18, useState as useState12, useMemo } from "react";
|
|
8804
8804
|
|
|
8805
8805
|
// src/app/components/Skysystemz/SkyChargewidgetstyles.tsx
|
|
8806
8806
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -9646,7 +9646,7 @@ padding:0px !important;
|
|
|
9646
9646
|
}
|
|
9647
9647
|
|
|
9648
9648
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9649
|
-
import { useCallback, useEffect as
|
|
9649
|
+
import { useCallback, useEffect as useEffect17, useRef as useRef11, useState as useState11 } from "react";
|
|
9650
9650
|
import axios9 from "axios";
|
|
9651
9651
|
import Swal5 from "sweetalert2";
|
|
9652
9652
|
|
|
@@ -10125,155 +10125,17 @@ function GooglePayComponent({
|
|
|
10125
10125
|
] });
|
|
10126
10126
|
}
|
|
10127
10127
|
|
|
10128
|
-
// src/app/components/Atoms/Applepay/ApplePayButton.tsx
|
|
10129
|
-
import { useEffect as useEffect17, useRef as useRef11 } from "react";
|
|
10130
|
-
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
10131
|
-
function ApplePayButton({
|
|
10132
|
-
applePayMerchantId: applePayMerchantId2,
|
|
10133
|
-
applePayAmount,
|
|
10134
|
-
applePayMerchantName,
|
|
10135
|
-
showLoader,
|
|
10136
|
-
completeFractalFlow
|
|
10137
|
-
}) {
|
|
10138
|
-
const applePayRef = useRef11(null);
|
|
10139
|
-
const paymentRequestMethods = [
|
|
10140
|
-
{
|
|
10141
|
-
supportedMethods: "https://apple.com/apple-pay",
|
|
10142
|
-
data: {
|
|
10143
|
-
version: 3,
|
|
10144
|
-
merchantIdentifier: applePayMerchantId2,
|
|
10145
|
-
// ✅ FIXED
|
|
10146
|
-
merchantCapabilities: ["supports3DS"],
|
|
10147
|
-
supportedNetworks: ["amex", "discover", "mastercard", "visa"],
|
|
10148
|
-
// ✅ FIXED
|
|
10149
|
-
countryCode: "US"
|
|
10150
|
-
}
|
|
10151
|
-
}
|
|
10152
|
-
];
|
|
10153
|
-
const paymentRequestOptions = {
|
|
10154
|
-
requestPayerName: false,
|
|
10155
|
-
requestPayerEmail: false,
|
|
10156
|
-
requestPayerPhone: false,
|
|
10157
|
-
requestShipping: false
|
|
10158
|
-
};
|
|
10159
|
-
function buildPaymentDetails() {
|
|
10160
|
-
return {
|
|
10161
|
-
total: {
|
|
10162
|
-
label: applePayMerchantName,
|
|
10163
|
-
amount: {
|
|
10164
|
-
currency: "USD",
|
|
10165
|
-
value: applePayAmount
|
|
10166
|
-
}
|
|
10167
|
-
}
|
|
10168
|
-
};
|
|
10169
|
-
}
|
|
10170
|
-
async function validateMerchant(event) {
|
|
10171
|
-
var _a;
|
|
10172
|
-
console.log("\u{1F7E1} STEP 1: Merchant validation started");
|
|
10173
|
-
try {
|
|
10174
|
-
console.log("Validation URL:", event.validationURL);
|
|
10175
|
-
console.log("Domain:", window.location.hostname);
|
|
10176
|
-
const res = await fetch(
|
|
10177
|
-
`${masterBaseUrl}api/v1/widget/generate-apple-pay-session`,
|
|
10178
|
-
{
|
|
10179
|
-
method: "POST",
|
|
10180
|
-
headers: {
|
|
10181
|
-
"Content-Type": "application/json"
|
|
10182
|
-
},
|
|
10183
|
-
body: JSON.stringify({
|
|
10184
|
-
validationUrl: event.validationURL,
|
|
10185
|
-
applePayMerchantId: applePayMerchantId2,
|
|
10186
|
-
applepayDisplayName: applePayMerchantName,
|
|
10187
|
-
requestDomain: window.location.hostname
|
|
10188
|
-
// ✅ IMPORTANT
|
|
10189
|
-
})
|
|
10190
|
-
}
|
|
10191
|
-
);
|
|
10192
|
-
console.log("\u{1F7E1} STEP 2: Response status:", res.status);
|
|
10193
|
-
const data = await res.json();
|
|
10194
|
-
console.log("RAW session response:", JSON.stringify(data));
|
|
10195
|
-
console.log("\u{1F7E2} STEP 3: Session response: data fetched");
|
|
10196
|
-
const merchantSession = (_a = data == null ? void 0 : data.data) != null ? _a : data;
|
|
10197
|
-
if (!merchantSession || typeof merchantSession !== "object") {
|
|
10198
|
-
console.error("\u274C Bad session shape");
|
|
10199
|
-
event.complete(null);
|
|
10200
|
-
return;
|
|
10201
|
-
}
|
|
10202
|
-
console.log("\u{1F7E2} STEP 4.1: Completing merchant validation");
|
|
10203
|
-
event.complete(merchantSession);
|
|
10204
|
-
console.log("\u{1F7E2} STEP 4.2: Completed merchant validation");
|
|
10205
|
-
} catch (err) {
|
|
10206
|
-
console.log("\u274C Merchant validation failed:", err == null ? void 0 : err.message);
|
|
10207
|
-
event.complete(null);
|
|
10208
|
-
}
|
|
10209
|
-
}
|
|
10210
|
-
async function authorizePayment(paymentResponse) {
|
|
10211
|
-
console.log("\u{1F7E1} STEP 5: Authorizing payment");
|
|
10212
|
-
try {
|
|
10213
|
-
const token = paymentResponse.details.token.paymentData;
|
|
10214
|
-
console.log("\u{1F7E2} STEP 6: Got token");
|
|
10215
|
-
await completeFractalFlow(token, null, "apple_pay");
|
|
10216
|
-
await paymentResponse.complete("success");
|
|
10217
|
-
console.log("\u2705 Payment completed successfully");
|
|
10218
|
-
} catch (err) {
|
|
10219
|
-
console.log("\u274C Authorization failed:", err == null ? void 0 : err.message);
|
|
10220
|
-
await paymentResponse.complete("fail");
|
|
10221
|
-
}
|
|
10222
|
-
}
|
|
10223
|
-
async function handleApplePayClick() {
|
|
10224
|
-
console.log("\u{1F7E1} STEP A: Click detected");
|
|
10225
|
-
try {
|
|
10226
|
-
const request = new PaymentRequest(
|
|
10227
|
-
paymentRequestMethods,
|
|
10228
|
-
buildPaymentDetails(),
|
|
10229
|
-
paymentRequestOptions
|
|
10230
|
-
);
|
|
10231
|
-
request.onmerchantvalidation = validateMerchant;
|
|
10232
|
-
console.log("\u{1F7E1} STEP B: Calling show()");
|
|
10233
|
-
const response = await request.show();
|
|
10234
|
-
console.log("\u{1F7E2} STEP C: Payment sheet opened");
|
|
10235
|
-
await authorizePayment(response);
|
|
10236
|
-
} catch (err) {
|
|
10237
|
-
console.log("\u274C Apple Pay flow failed:", err == null ? void 0 : err.message);
|
|
10238
|
-
}
|
|
10239
|
-
}
|
|
10240
|
-
useEffect17(() => {
|
|
10241
|
-
if (window.ApplePaySession && window.ApplePaySession.canMakePayments()) {
|
|
10242
|
-
console.log("\u2705 Apple Pay is available");
|
|
10243
|
-
} else {
|
|
10244
|
-
console.log("\u274C Apple Pay NOT available");
|
|
10245
|
-
}
|
|
10246
|
-
}, []);
|
|
10247
|
-
useEffect17(() => {
|
|
10248
|
-
const btn = applePayRef.current;
|
|
10249
|
-
if (!btn) return;
|
|
10250
|
-
const handleClick = () => handleApplePayClick();
|
|
10251
|
-
btn.addEventListener("click", handleClick);
|
|
10252
|
-
return () => btn.removeEventListener("click", handleClick);
|
|
10253
|
-
}, [applePayMerchantId2, applePayAmount, applePayMerchantName]);
|
|
10254
|
-
return /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
|
|
10255
|
-
"apple-pay-button",
|
|
10256
|
-
{
|
|
10257
|
-
ref: applePayRef,
|
|
10258
|
-
buttonstyle: "black",
|
|
10259
|
-
type: "pay",
|
|
10260
|
-
locale: "en-US",
|
|
10261
|
-
style: { width: "100%" }
|
|
10262
|
-
}
|
|
10263
|
-
) });
|
|
10264
|
-
}
|
|
10265
|
-
|
|
10266
10128
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
10267
|
-
import { Fragment as Fragment20, jsx as
|
|
10129
|
+
import { Fragment as Fragment20, jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
10268
10130
|
var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_token, customerId, callback, merchantName = "merchant", isPreAuth, surcharge = "0", submitBtnClass, submitBtnIcon, isRequest, pass_fee, pass_fee_amount, require3ds = false, autoTrigger = false, show, setShow, setHandleCloseRef, isPartial, bankSurcharge, partialRef, loadingPrev = false, orderGuid: ordGuid, remainingAmount: remAmount, onSubmit, onLoad = true, customCSS: customCSS2 }) => {
|
|
10269
10131
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
10270
|
-
const hasRunRef =
|
|
10271
|
-
const cardFormRef =
|
|
10272
|
-
const bankFormRef =
|
|
10273
|
-
const expiryYearRef =
|
|
10274
|
-
const expiryMonthRef =
|
|
10275
|
-
const cardListRunRef =
|
|
10276
|
-
const threeDSContainerRef =
|
|
10132
|
+
const hasRunRef = useRef11(false);
|
|
10133
|
+
const cardFormRef = useRef11(null);
|
|
10134
|
+
const bankFormRef = useRef11(null);
|
|
10135
|
+
const expiryYearRef = useRef11(null);
|
|
10136
|
+
const expiryMonthRef = useRef11(null);
|
|
10137
|
+
const cardListRunRef = useRef11(false);
|
|
10138
|
+
const threeDSContainerRef = useRef11(null);
|
|
10277
10139
|
const [activetab, setActive] = useState11("card");
|
|
10278
10140
|
const [activeList, setActiveList] = useState11("card");
|
|
10279
10141
|
const [cardData, setCardData] = useState11();
|
|
@@ -10340,7 +10202,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10340
10202
|
const bankFeeAmount = Number(bankSurcharge || 0);
|
|
10341
10203
|
const bankSavingsAmount = Math.max(bankFeeAmount > 0 ? cardFeeAmount - bankFeeAmount : cardFeeAmount, 0);
|
|
10342
10204
|
const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
|
|
10343
|
-
const tokenizerRef =
|
|
10205
|
+
const tokenizerRef = useRef11(null);
|
|
10344
10206
|
const fractalStyles = {
|
|
10345
10207
|
input: {
|
|
10346
10208
|
"font-family": "'Inter', sans-serif",
|
|
@@ -11202,13 +11064,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11202
11064
|
setOrderLoader(false);
|
|
11203
11065
|
}
|
|
11204
11066
|
};
|
|
11205
|
-
|
|
11067
|
+
useEffect17(() => {
|
|
11206
11068
|
if (!show && !autoTrigger) {
|
|
11207
11069
|
hasRunRef.current = false;
|
|
11208
11070
|
cardListRunRef.current = false;
|
|
11209
11071
|
}
|
|
11210
11072
|
}, [show, autoTrigger]);
|
|
11211
|
-
|
|
11073
|
+
useEffect17(() => {
|
|
11212
11074
|
if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
|
|
11213
11075
|
getPaymentDetails();
|
|
11214
11076
|
if (isPartial && !partialRef) {
|
|
@@ -11216,7 +11078,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11216
11078
|
}
|
|
11217
11079
|
}
|
|
11218
11080
|
}, [show, autoTrigger, isPartial, onLoad]);
|
|
11219
|
-
|
|
11081
|
+
useEffect17(() => {
|
|
11220
11082
|
if ((show || autoTrigger) && pass_fee_amount) {
|
|
11221
11083
|
let cashdisc = Number(amount) - Number(pass_fee_amount);
|
|
11222
11084
|
if (cashdisc && !isNaN(cashdisc)) {
|
|
@@ -11278,7 +11140,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11278
11140
|
console.error("3DS Auth failed \u274C", status);
|
|
11279
11141
|
setError(`3DS Authentication ${status}`);
|
|
11280
11142
|
};
|
|
11281
|
-
|
|
11143
|
+
useEffect17(() => {
|
|
11282
11144
|
if (setHandleCloseRef) {
|
|
11283
11145
|
setHandleCloseRef(() => handleClose);
|
|
11284
11146
|
}
|
|
@@ -11296,18 +11158,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11296
11158
|
setPartialError("");
|
|
11297
11159
|
}
|
|
11298
11160
|
};
|
|
11299
|
-
|
|
11161
|
+
useEffect17(() => {
|
|
11300
11162
|
if (typeof FractalTokenizer === "undefined") return;
|
|
11301
11163
|
const tokenizer = new FractalTokenizer({
|
|
11302
11164
|
styles: {}
|
|
11303
11165
|
});
|
|
11304
11166
|
}, []);
|
|
11305
|
-
const stateRef =
|
|
11167
|
+
const stateRef = useRef11({
|
|
11306
11168
|
activeinBank,
|
|
11307
11169
|
activeinCard,
|
|
11308
11170
|
activetab
|
|
11309
11171
|
});
|
|
11310
|
-
|
|
11172
|
+
useEffect17(() => {
|
|
11311
11173
|
stateRef.current = {
|
|
11312
11174
|
activeinBank,
|
|
11313
11175
|
activeinCard,
|
|
@@ -11331,7 +11193,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11331
11193
|
}
|
|
11332
11194
|
}
|
|
11333
11195
|
}, []);
|
|
11334
|
-
|
|
11196
|
+
useEffect17(() => {
|
|
11335
11197
|
onSubmit == null ? void 0 : onSubmit(submit);
|
|
11336
11198
|
}, [onSubmit, submit]);
|
|
11337
11199
|
function detectCardType(cardinput) {
|
|
@@ -11357,34 +11219,34 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11357
11219
|
const cardType = detectCardType(cardInput);
|
|
11358
11220
|
switch (cardType) {
|
|
11359
11221
|
case "visa":
|
|
11360
|
-
return /* @__PURE__ */
|
|
11222
|
+
return /* @__PURE__ */ jsx35("img", { src: visa2, alt: "visa", width: 33 });
|
|
11361
11223
|
case "mastercard":
|
|
11362
|
-
return /* @__PURE__ */
|
|
11224
|
+
return /* @__PURE__ */ jsx35("img", { src: mastercard2, width: 33, alt: "mastercard" });
|
|
11363
11225
|
case "amex":
|
|
11364
|
-
return /* @__PURE__ */
|
|
11226
|
+
return /* @__PURE__ */ jsx35("img", { src: americanexp2, alt: "amex", width: 33 });
|
|
11365
11227
|
case "discover":
|
|
11366
|
-
return /* @__PURE__ */
|
|
11228
|
+
return /* @__PURE__ */ jsx35("img", { src: discover2, width: 33, alt: "discover" });
|
|
11367
11229
|
case "diners":
|
|
11368
|
-
return /* @__PURE__ */
|
|
11230
|
+
return /* @__PURE__ */ jsx35("img", { src: dinersicon, alt: "Diners Club" });
|
|
11369
11231
|
case "jcb":
|
|
11370
|
-
return /* @__PURE__ */
|
|
11232
|
+
return /* @__PURE__ */ jsx35("img", { src: jcbicon, alt: "JCB" });
|
|
11371
11233
|
case "unionpay":
|
|
11372
|
-
return /* @__PURE__ */
|
|
11234
|
+
return /* @__PURE__ */ jsx35("img", { src: unionicon, alt: "UnionPay" });
|
|
11373
11235
|
default:
|
|
11374
|
-
return /* @__PURE__ */
|
|
11236
|
+
return /* @__PURE__ */ jsx35("img", { src: defualtcardborder, alt: "card" });
|
|
11375
11237
|
}
|
|
11376
11238
|
}
|
|
11377
11239
|
return /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11378
|
-
(initialLoader || !onLoad) && /* @__PURE__ */
|
|
11379
|
-
error && /* @__PURE__ */
|
|
11380
|
-
errorIframe && /* @__PURE__ */
|
|
11240
|
+
(initialLoader || !onLoad) && /* @__PURE__ */ jsx35(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
|
|
11241
|
+
error && /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
|
|
11242
|
+
errorIframe && /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
|
|
11381
11243
|
setErrorIframe("");
|
|
11382
11244
|
}, autoTrigger: onSubmit ? !onSubmit : autoTrigger }) }),
|
|
11383
11245
|
/* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11384
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */
|
|
11246
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx35(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
|
|
11385
11247
|
/* @__PURE__ */ jsxs21("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
|
|
11386
|
-
/* @__PURE__ */
|
|
11387
|
-
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */
|
|
11248
|
+
/* @__PURE__ */ jsx35("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
|
|
11249
|
+
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx35(
|
|
11388
11250
|
ThreeDSChallenge,
|
|
11389
11251
|
{
|
|
11390
11252
|
containerRef: threeDSContainerRef,
|
|
@@ -11395,32 +11257,32 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11395
11257
|
onError: handleError
|
|
11396
11258
|
}
|
|
11397
11259
|
) : /* @__PURE__ */ jsxs21("div", { className: "parent-pay-container", children: [
|
|
11398
|
-
/* @__PURE__ */
|
|
11399
|
-
/* @__PURE__ */
|
|
11400
|
-
/* @__PURE__ */
|
|
11260
|
+
/* @__PURE__ */ jsx35("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs21("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
11261
|
+
/* @__PURE__ */ jsx35("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx35("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" }) }),
|
|
11262
|
+
/* @__PURE__ */ jsx35("defs", { children: /* @__PURE__ */ jsx35("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx35("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
11401
11263
|
] }) }),
|
|
11402
|
-
/* @__PURE__ */
|
|
11264
|
+
/* @__PURE__ */ jsx35("div", { className: "pay-main-logo-res" }),
|
|
11403
11265
|
/* @__PURE__ */ jsxs21("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
|
|
11404
11266
|
!onSubmit && /* @__PURE__ */ jsxs21("div", { className: "pay-header pay-conatiner-one", children: [
|
|
11405
11267
|
/* @__PURE__ */ jsxs21("div", { className: "pay-conatiner-one-first", children: [
|
|
11406
11268
|
/* @__PURE__ */ jsxs21("div", { className: "pay-logo-container", children: [
|
|
11407
|
-
/* @__PURE__ */
|
|
11408
|
-
/* @__PURE__ */
|
|
11269
|
+
/* @__PURE__ */ jsx35("div", { className: "pay-main-logo" }),
|
|
11270
|
+
/* @__PURE__ */ jsx35("h1", { className: "pay-heading", children: "Pay" }),
|
|
11409
11271
|
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs21("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
|
|
11410
11272
|
" ",
|
|
11411
|
-
/* @__PURE__ */
|
|
11273
|
+
/* @__PURE__ */ jsx35(IoArrowBack4, {}),
|
|
11412
11274
|
" Back"
|
|
11413
11275
|
] })
|
|
11414
11276
|
] }),
|
|
11415
|
-
/* @__PURE__ */
|
|
11416
|
-
/* @__PURE__ */
|
|
11277
|
+
/* @__PURE__ */ jsx35("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs21("div", { className: "pay-amount-conatiner", children: [
|
|
11278
|
+
/* @__PURE__ */ jsx35("small", { className: "pay-payment-amount", children: "Select payment type" }),
|
|
11417
11279
|
/* @__PURE__ */ jsxs21("div", { className: "frac-card-bank-radio-main", children: [
|
|
11418
|
-
/* @__PURE__ */
|
|
11419
|
-
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */
|
|
11280
|
+
/* @__PURE__ */ jsx35(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
11281
|
+
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx35(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
|
|
11420
11282
|
] }),
|
|
11421
11283
|
isPartial && /* @__PURE__ */ jsxs21("div", { className: "frac-partial-payment-input", children: [
|
|
11422
|
-
/* @__PURE__ */
|
|
11423
|
-
/* @__PURE__ */
|
|
11284
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11285
|
+
/* @__PURE__ */ jsx35(
|
|
11424
11286
|
NumericFormat2,
|
|
11425
11287
|
{
|
|
11426
11288
|
prefix: "$",
|
|
@@ -11444,25 +11306,25 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11444
11306
|
}
|
|
11445
11307
|
}
|
|
11446
11308
|
),
|
|
11447
|
-
partialError && /* @__PURE__ */
|
|
11309
|
+
partialError && /* @__PURE__ */ jsx35("span", { className: "error-span", children: partialError })
|
|
11448
11310
|
] })
|
|
11449
11311
|
] }) })
|
|
11450
11312
|
] }),
|
|
11451
11313
|
/* @__PURE__ */ jsxs21("div", { className: "pay-conatiner-one-last", children: [
|
|
11452
|
-
/* @__PURE__ */
|
|
11453
|
-
/* @__PURE__ */
|
|
11314
|
+
/* @__PURE__ */ jsx35("img", { src: secure2, alt: "" }),
|
|
11315
|
+
/* @__PURE__ */ jsx35("img", { src: pov2, alt: "" }),
|
|
11454
11316
|
"Secure payments powered by Fractal"
|
|
11455
11317
|
] })
|
|
11456
11318
|
] }),
|
|
11457
|
-
/* @__PURE__ */
|
|
11458
|
-
onSubmit && /* @__PURE__ */
|
|
11319
|
+
/* @__PURE__ */ jsx35("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx35("div", { className: "col-md-12", children: /* @__PURE__ */ jsxs21("div", { id: "payment-form-div ", className: onSubmit ? "frac-payment-form-div" : "", children: [
|
|
11320
|
+
onSubmit && /* @__PURE__ */ jsx35("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs21("div", { className: "pay-amount-conatiner", children: [
|
|
11459
11321
|
/* @__PURE__ */ jsxs21("div", { className: "frac-card-bank-radio-main", children: [
|
|
11460
|
-
/* @__PURE__ */
|
|
11461
|
-
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */
|
|
11322
|
+
/* @__PURE__ */ jsx35(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
11323
|
+
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx35(CardBankRadio, { skydesign: true, label: "Bank", amount: (_d = Number(bankAmount)) == null ? void 0 : _d.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
|
|
11462
11324
|
] }),
|
|
11463
11325
|
isPartial && /* @__PURE__ */ jsxs21("div", { className: "frac-partial-payment-input", children: [
|
|
11464
|
-
/* @__PURE__ */
|
|
11465
|
-
/* @__PURE__ */
|
|
11326
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11327
|
+
/* @__PURE__ */ jsx35(
|
|
11466
11328
|
NumericFormat2,
|
|
11467
11329
|
{
|
|
11468
11330
|
prefix: "$",
|
|
@@ -11479,44 +11341,34 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11479
11341
|
fixedDecimalScale: true
|
|
11480
11342
|
}
|
|
11481
11343
|
),
|
|
11482
|
-
partialError && /* @__PURE__ */
|
|
11344
|
+
partialError && /* @__PURE__ */ jsx35("span", { className: "error-span", children: partialError })
|
|
11483
11345
|
] })
|
|
11484
11346
|
] }) }),
|
|
11485
|
-
is3DSEnable ? clientSecret && /* @__PURE__ */
|
|
11347
|
+
is3DSEnable ? clientSecret && /* @__PURE__ */ jsx35(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11486
11348
|
/* @__PURE__ */ jsxs21("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
|
|
11487
11349
|
!onSubmit && /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11488
11350
|
/* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
|
|
11489
|
-
/* @__PURE__ */
|
|
11351
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs21("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
|
|
11490
11352
|
" ",
|
|
11491
|
-
/* @__PURE__ */
|
|
11353
|
+
/* @__PURE__ */ jsx35(IoArrowBack4, {})
|
|
11492
11354
|
] }) }),
|
|
11493
|
-
/* @__PURE__ */
|
|
11355
|
+
/* @__PURE__ */ jsx35("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
11494
11356
|
] }),
|
|
11495
11357
|
/* @__PURE__ */ jsxs21("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
|
|
11496
|
-
/* @__PURE__ */
|
|
11497
|
-
/* @__PURE__ */
|
|
11498
|
-
/* @__PURE__ */
|
|
11499
|
-
/* @__PURE__ */
|
|
11358
|
+
/* @__PURE__ */ jsx35("img", { src: visa2, alt: "", width: 33 }),
|
|
11359
|
+
/* @__PURE__ */ jsx35("img", { src: mastercard2, width: 33, alt: "" }),
|
|
11360
|
+
/* @__PURE__ */ jsx35("img", { src: americanexp2, alt: "", width: 33 }),
|
|
11361
|
+
/* @__PURE__ */ jsx35("img", { src: discover2, width: 33, alt: "" })
|
|
11500
11362
|
] })
|
|
11501
11363
|
] }),
|
|
11502
11364
|
activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11503
|
-
/* @__PURE__ */
|
|
11365
|
+
/* @__PURE__ */ jsx35(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
|
|
11504
11366
|
setActiveinCard("form");
|
|
11505
11367
|
} }),
|
|
11506
|
-
/* @__PURE__ */
|
|
11368
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx35("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: partialAmount ? formatUSD((_e = Number(partialAmount)) == null ? void 0 : _e.toFixed(2)) : formatUSD((_f = Number(amount)) == null ? void 0 : _f.toFixed(2)) }) })
|
|
11507
11369
|
] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11508
11370
|
onSubmit && /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11509
|
-
/* @__PURE__ */
|
|
11510
|
-
ApplePayButton,
|
|
11511
|
-
{
|
|
11512
|
-
applePayAmount: partialAmount ? partialAmount : amount,
|
|
11513
|
-
applePayMerchantId,
|
|
11514
|
-
applePayMerchantName: merchantName,
|
|
11515
|
-
completeFractalFlow,
|
|
11516
|
-
showLoader
|
|
11517
|
-
}
|
|
11518
|
-
),
|
|
11519
|
-
/* @__PURE__ */ jsx36(
|
|
11371
|
+
/* @__PURE__ */ jsx35(
|
|
11520
11372
|
GooglePayComponent,
|
|
11521
11373
|
{
|
|
11522
11374
|
amount: partialAmount ? partialAmount : amount,
|
|
@@ -11528,7 +11380,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11528
11380
|
setLoading
|
|
11529
11381
|
}
|
|
11530
11382
|
),
|
|
11531
|
-
/* @__PURE__ */
|
|
11383
|
+
/* @__PURE__ */ jsx35("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx35("span", { children: "or" }) })
|
|
11532
11384
|
] }),
|
|
11533
11385
|
/* @__PURE__ */ jsxs21("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11534
11386
|
if (e.key === "Enter" && loading) {
|
|
@@ -11538,18 +11390,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11538
11390
|
}, children: [
|
|
11539
11391
|
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11540
11392
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11541
|
-
/* @__PURE__ */
|
|
11542
|
-
/* @__PURE__ */
|
|
11393
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11394
|
+
/* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11543
11395
|
const value = e.target.value;
|
|
11544
11396
|
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11545
11397
|
handleCardChange("cardName", value);
|
|
11546
11398
|
}
|
|
11547
11399
|
} }),
|
|
11548
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */
|
|
11400
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11549
11401
|
] }),
|
|
11550
11402
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11551
|
-
/* @__PURE__ */
|
|
11552
|
-
/* @__PURE__ */
|
|
11403
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
|
|
11404
|
+
/* @__PURE__ */ jsx35("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx35(
|
|
11553
11405
|
FractalFields_default,
|
|
11554
11406
|
{
|
|
11555
11407
|
fractalStyles,
|
|
@@ -11559,17 +11411,17 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11559
11411
|
) })
|
|
11560
11412
|
] }),
|
|
11561
11413
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11562
|
-
/* @__PURE__ */
|
|
11563
|
-
/* @__PURE__ */
|
|
11564
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */
|
|
11414
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11415
|
+
/* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_g = cardData == null ? void 0 : cardData.zipCode) != null ? _g : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
|
|
11416
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11565
11417
|
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11566
11418
|
"Cards include a fee amount of ",
|
|
11567
|
-
/* @__PURE__ */
|
|
11419
|
+
/* @__PURE__ */ jsx35("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11568
11420
|
"."
|
|
11569
11421
|
] })
|
|
11570
11422
|
] }),
|
|
11571
|
-
customerId && /* @__PURE__ */
|
|
11572
|
-
/* @__PURE__ */
|
|
11423
|
+
customerId && /* @__PURE__ */ jsx35("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
11424
|
+
/* @__PURE__ */ jsx35(
|
|
11573
11425
|
"input",
|
|
11574
11426
|
{
|
|
11575
11427
|
type: "checkbox",
|
|
@@ -11579,10 +11431,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11579
11431
|
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11580
11432
|
}
|
|
11581
11433
|
),
|
|
11582
|
-
/* @__PURE__ */
|
|
11583
|
-
/* @__PURE__ */
|
|
11434
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11435
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11584
11436
|
/* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
|
|
11585
|
-
/* @__PURE__ */
|
|
11437
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
|
|
11586
11438
|
"svg",
|
|
11587
11439
|
{
|
|
11588
11440
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11591,8 +11443,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11591
11443
|
viewBox: "0 0 20 20",
|
|
11592
11444
|
fill: "none",
|
|
11593
11445
|
children: [
|
|
11594
|
-
/* @__PURE__ */
|
|
11595
|
-
/* @__PURE__ */
|
|
11446
|
+
/* @__PURE__ */ jsx35("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11447
|
+
/* @__PURE__ */ jsx35(
|
|
11596
11448
|
"path",
|
|
11597
11449
|
{
|
|
11598
11450
|
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",
|
|
@@ -11602,15 +11454,15 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11602
11454
|
]
|
|
11603
11455
|
}
|
|
11604
11456
|
) }),
|
|
11605
|
-
/* @__PURE__ */
|
|
11457
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11606
11458
|
"If checked, I agree to give the ",
|
|
11607
|
-
/* @__PURE__ */
|
|
11459
|
+
/* @__PURE__ */ jsx35("b", { children: merchantName || "merchant" }),
|
|
11608
11460
|
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11609
11461
|
] }) })
|
|
11610
11462
|
] })
|
|
11611
11463
|
] }) })
|
|
11612
11464
|
] }),
|
|
11613
|
-
/* @__PURE__ */
|
|
11465
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx35("button", { type: "submit", style: { margin: 0, display: onSubmit ? "none" : "block" }, className: "pay-button", children: partialAmount ? formatUSD((_h = Number(partialAmount)) == null ? void 0 : _h.toFixed(2)) : formatUSD((_i = Number(amount)) == null ? void 0 : _i.toFixed(2)) }) })
|
|
11614
11466
|
] })
|
|
11615
11467
|
] }) : /* @__PURE__ */ jsxs21("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11616
11468
|
if (e.key === "Enter" && loading) {
|
|
@@ -11620,16 +11472,16 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11620
11472
|
}, children: [
|
|
11621
11473
|
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11622
11474
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11623
|
-
/* @__PURE__ */
|
|
11624
|
-
/* @__PURE__ */
|
|
11475
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11476
|
+
/* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11625
11477
|
const value = e.target.value;
|
|
11626
11478
|
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11627
11479
|
handleCardChange("cardName", value);
|
|
11628
11480
|
}
|
|
11629
11481
|
} }),
|
|
11630
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */
|
|
11482
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11631
11483
|
] }),
|
|
11632
|
-
/* @__PURE__ */
|
|
11484
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx35(
|
|
11633
11485
|
DataCapFields,
|
|
11634
11486
|
{
|
|
11635
11487
|
isOpen: show || autoTrigger,
|
|
@@ -11640,17 +11492,17 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11640
11492
|
}
|
|
11641
11493
|
) }),
|
|
11642
11494
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11643
|
-
/* @__PURE__ */
|
|
11644
|
-
/* @__PURE__ */
|
|
11645
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */
|
|
11495
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11496
|
+
/* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_j = cardData == null ? void 0 : cardData.zipCode) != null ? _j : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
|
|
11497
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11646
11498
|
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11647
11499
|
"Cards include a fee amount of ",
|
|
11648
|
-
/* @__PURE__ */
|
|
11500
|
+
/* @__PURE__ */ jsx35("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11649
11501
|
"."
|
|
11650
11502
|
] })
|
|
11651
11503
|
] }),
|
|
11652
|
-
customerId && /* @__PURE__ */
|
|
11653
|
-
/* @__PURE__ */
|
|
11504
|
+
customerId && /* @__PURE__ */ jsx35("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
11505
|
+
/* @__PURE__ */ jsx35(
|
|
11654
11506
|
"input",
|
|
11655
11507
|
{
|
|
11656
11508
|
type: "checkbox",
|
|
@@ -11660,10 +11512,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11660
11512
|
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11661
11513
|
}
|
|
11662
11514
|
),
|
|
11663
|
-
/* @__PURE__ */
|
|
11664
|
-
/* @__PURE__ */
|
|
11515
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11516
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11665
11517
|
/* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
|
|
11666
|
-
/* @__PURE__ */
|
|
11518
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
|
|
11667
11519
|
"svg",
|
|
11668
11520
|
{
|
|
11669
11521
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11672,8 +11524,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11672
11524
|
viewBox: "0 0 20 20",
|
|
11673
11525
|
fill: "none",
|
|
11674
11526
|
children: [
|
|
11675
|
-
/* @__PURE__ */
|
|
11676
|
-
/* @__PURE__ */
|
|
11527
|
+
/* @__PURE__ */ jsx35("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11528
|
+
/* @__PURE__ */ jsx35(
|
|
11677
11529
|
"path",
|
|
11678
11530
|
{
|
|
11679
11531
|
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",
|
|
@@ -11683,30 +11535,30 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11683
11535
|
]
|
|
11684
11536
|
}
|
|
11685
11537
|
) }),
|
|
11686
|
-
/* @__PURE__ */
|
|
11538
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11687
11539
|
"If checked, I agree to give the ",
|
|
11688
|
-
/* @__PURE__ */
|
|
11540
|
+
/* @__PURE__ */ jsx35("b", { children: merchantName || "merchant" }),
|
|
11689
11541
|
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11690
11542
|
] }) })
|
|
11691
11543
|
] })
|
|
11692
11544
|
] }) })
|
|
11693
11545
|
] }),
|
|
11694
|
-
/* @__PURE__ */
|
|
11546
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx35("button", { type: "submit", style: { margin: 0, display: onSubmit ? "none" : "block" }, className: "pay-button", children: partialAmount ? formatUSD((_k = Number(partialAmount)) == null ? void 0 : _k.toFixed(2)) : formatUSD((_l = Number(amount)) == null ? void 0 : _l.toFixed(2)) }) })
|
|
11695
11547
|
] })
|
|
11696
11548
|
] }),
|
|
11697
|
-
/* @__PURE__ */
|
|
11549
|
+
/* @__PURE__ */ jsx35("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11698
11550
|
!onSubmit && /* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
|
|
11699
|
-
/* @__PURE__ */
|
|
11551
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs21("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
|
|
11700
11552
|
" ",
|
|
11701
|
-
/* @__PURE__ */
|
|
11553
|
+
/* @__PURE__ */ jsx35(IoArrowBack4, {})
|
|
11702
11554
|
] }) }),
|
|
11703
|
-
/* @__PURE__ */
|
|
11555
|
+
/* @__PURE__ */ jsx35("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
|
|
11704
11556
|
] }),
|
|
11705
11557
|
activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11706
|
-
/* @__PURE__ */
|
|
11558
|
+
/* @__PURE__ */ jsx35(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
|
|
11707
11559
|
setActiveinBank("form");
|
|
11708
11560
|
} }),
|
|
11709
|
-
/* @__PURE__ */
|
|
11561
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx35("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_m = Number(bankAmount)) == null ? void 0 : _m.toFixed(2)) }) })
|
|
11710
11562
|
] }) : /* @__PURE__ */ jsxs21("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
|
|
11711
11563
|
if (e.key === "Enter" && loading) {
|
|
11712
11564
|
e.preventDefault();
|
|
@@ -11718,13 +11570,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11718
11570
|
maxHeight: "444px"
|
|
11719
11571
|
}, children: [
|
|
11720
11572
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11721
|
-
/* @__PURE__ */
|
|
11722
|
-
/* @__PURE__ */
|
|
11723
|
-
(achError == null ? void 0 : achError.name) && /* @__PURE__ */
|
|
11573
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
11574
|
+
/* @__PURE__ */ jsx35("input", { type: "text", id: "nameonaccount", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", name: "name", value: (_n = achData == null ? void 0 : achData.name) != null ? _n : "", onChange: handleChangeAch }),
|
|
11575
|
+
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
11724
11576
|
] }),
|
|
11725
11577
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11726
|
-
/* @__PURE__ */
|
|
11727
|
-
/* @__PURE__ */
|
|
11578
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "routingnumber", children: "Routing number" }),
|
|
11579
|
+
/* @__PURE__ */ jsx35(
|
|
11728
11580
|
"input",
|
|
11729
11581
|
{
|
|
11730
11582
|
type: "text",
|
|
@@ -11737,11 +11589,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11737
11589
|
onChange: handleChangeAch
|
|
11738
11590
|
}
|
|
11739
11591
|
),
|
|
11740
|
-
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */
|
|
11592
|
+
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
|
|
11741
11593
|
] }),
|
|
11742
11594
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11743
|
-
/* @__PURE__ */
|
|
11744
|
-
/* @__PURE__ */
|
|
11595
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "accountnumber", children: "Account number" }),
|
|
11596
|
+
/* @__PURE__ */ jsx35(
|
|
11745
11597
|
"input",
|
|
11746
11598
|
{
|
|
11747
11599
|
type: "text",
|
|
@@ -11754,11 +11606,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11754
11606
|
onChange: handleChangeAch
|
|
11755
11607
|
}
|
|
11756
11608
|
),
|
|
11757
|
-
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */
|
|
11609
|
+
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
|
|
11758
11610
|
] }),
|
|
11759
11611
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11760
|
-
/* @__PURE__ */
|
|
11761
|
-
/* @__PURE__ */
|
|
11612
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
|
|
11613
|
+
/* @__PURE__ */ jsx35(
|
|
11762
11614
|
"input",
|
|
11763
11615
|
{
|
|
11764
11616
|
type: "text",
|
|
@@ -11771,11 +11623,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11771
11623
|
onChange: handleChangeAch
|
|
11772
11624
|
}
|
|
11773
11625
|
),
|
|
11774
|
-
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */
|
|
11626
|
+
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
|
|
11775
11627
|
] }),
|
|
11776
11628
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11777
|
-
/* @__PURE__ */
|
|
11778
|
-
/* @__PURE__ */
|
|
11629
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "bankname", children: "Bank name" }),
|
|
11630
|
+
/* @__PURE__ */ jsx35(
|
|
11779
11631
|
"input",
|
|
11780
11632
|
{
|
|
11781
11633
|
type: "text",
|
|
@@ -11788,11 +11640,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11788
11640
|
onChange: handleChangeAch
|
|
11789
11641
|
}
|
|
11790
11642
|
),
|
|
11791
|
-
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */
|
|
11643
|
+
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
|
|
11792
11644
|
] }),
|
|
11793
11645
|
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11794
|
-
/* @__PURE__ */
|
|
11795
|
-
/* @__PURE__ */
|
|
11646
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "companyName", children: "Company name" }),
|
|
11647
|
+
/* @__PURE__ */ jsx35(
|
|
11796
11648
|
"input",
|
|
11797
11649
|
{
|
|
11798
11650
|
type: "text",
|
|
@@ -11805,44 +11657,44 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11805
11657
|
onChange: handleChangeAch
|
|
11806
11658
|
}
|
|
11807
11659
|
),
|
|
11808
|
-
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */
|
|
11660
|
+
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
|
|
11809
11661
|
] }),
|
|
11810
11662
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11811
|
-
/* @__PURE__ */
|
|
11663
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "accounttype", children: "Select account type" }),
|
|
11812
11664
|
/* @__PURE__ */ jsxs21("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
|
|
11813
|
-
/* @__PURE__ */
|
|
11814
|
-
accountTypes.map((type) => /* @__PURE__ */
|
|
11665
|
+
/* @__PURE__ */ jsx35("option", { value: "", children: "Select account" }),
|
|
11666
|
+
accountTypes.map((type) => /* @__PURE__ */ jsx35("option", { value: type.value, children: type.label }, type.value))
|
|
11815
11667
|
] }),
|
|
11816
11668
|
bankFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11817
11669
|
"There is a processing fee of ",
|
|
11818
|
-
/* @__PURE__ */
|
|
11670
|
+
/* @__PURE__ */ jsx35("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
|
|
11819
11671
|
"."
|
|
11820
11672
|
] }),
|
|
11821
11673
|
!saveACHinfo && /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11822
11674
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11823
|
-
/* @__PURE__ */
|
|
11675
|
+
/* @__PURE__ */ jsx35("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
|
|
11824
11676
|
setIsBankConsentChecked(e.target.checked);
|
|
11825
11677
|
if (e.target.checked) {
|
|
11826
11678
|
setErrorBankConsent("");
|
|
11827
11679
|
}
|
|
11828
11680
|
} }),
|
|
11829
|
-
/* @__PURE__ */
|
|
11681
|
+
/* @__PURE__ */ jsx35("label", { className: "saveachlabel", htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${merchantName || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
|
|
11830
11682
|
] }),
|
|
11831
|
-
errorBankConsent && /* @__PURE__ */
|
|
11683
|
+
errorBankConsent && /* @__PURE__ */ jsx35("span", { className: "error-span", children: errorBankConsent })
|
|
11832
11684
|
] }),
|
|
11833
11685
|
customerId && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11834
|
-
/* @__PURE__ */
|
|
11686
|
+
/* @__PURE__ */ jsx35("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
|
|
11835
11687
|
setSaveACHinfo(e.target.checked);
|
|
11836
11688
|
if (!e.target.checked) {
|
|
11837
11689
|
setSaveACHConsent1(false);
|
|
11838
11690
|
setErrorBankConsentOther("");
|
|
11839
11691
|
}
|
|
11840
11692
|
} }),
|
|
11841
|
-
/* @__PURE__ */
|
|
11693
|
+
/* @__PURE__ */ jsx35("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save for future use" })
|
|
11842
11694
|
] }),
|
|
11843
11695
|
saveACHinfo && /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11844
11696
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11845
|
-
/* @__PURE__ */
|
|
11697
|
+
/* @__PURE__ */ jsx35("input", { type: "checkbox", id: "saveACHConsent1", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHConsent1, onChange: (e) => {
|
|
11846
11698
|
setSaveACHConsent1(e.target.checked);
|
|
11847
11699
|
if (e.target.checked) {
|
|
11848
11700
|
setErrorBankConsentOther("");
|
|
@@ -11854,11 +11706,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11854
11706
|
" to store my bank account details for future ACH payments. I understand that future payments may be initiated using this saved account in accordance with my instructions. I confirm I am authorized to use this bank account."
|
|
11855
11707
|
] })
|
|
11856
11708
|
] }),
|
|
11857
|
-
errorBankConsentOther && /* @__PURE__ */
|
|
11709
|
+
errorBankConsentOther && /* @__PURE__ */ jsx35("span", { className: "error-span", children: errorBankConsentOther })
|
|
11858
11710
|
] })
|
|
11859
11711
|
] })
|
|
11860
11712
|
] }),
|
|
11861
|
-
/* @__PURE__ */
|
|
11713
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx35("button", { className: "pay-button", style: { margin: "20px 0 0", display: onSubmit ? "none" : "block" }, type: "submit", children: formatUSD((_u = Number(bankAmount)) == null ? void 0 : _u.toFixed(2)) }) })
|
|
11862
11714
|
] })
|
|
11863
11715
|
] }) })
|
|
11864
11716
|
] })
|
|
@@ -11873,7 +11725,7 @@ var ModelContentSky_default = ModelContentSky;
|
|
|
11873
11725
|
|
|
11874
11726
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
11875
11727
|
import axios10 from "axios";
|
|
11876
|
-
import { Fragment as Fragment21, jsx as
|
|
11728
|
+
import { Fragment as Fragment21, jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
11877
11729
|
var PaymentWidget = ({
|
|
11878
11730
|
amount,
|
|
11879
11731
|
bankAmount,
|
|
@@ -11953,7 +11805,7 @@ var PaymentWidget = ({
|
|
|
11953
11805
|
]
|
|
11954
11806
|
);
|
|
11955
11807
|
const [commonProps, setCommonProps] = useState12(initialCommonProps);
|
|
11956
|
-
|
|
11808
|
+
useEffect18(() => {
|
|
11957
11809
|
if (show) {
|
|
11958
11810
|
setCommonProps(initialCommonProps);
|
|
11959
11811
|
}
|
|
@@ -11984,35 +11836,35 @@ var PaymentWidget = ({
|
|
|
11984
11836
|
setLoading(false);
|
|
11985
11837
|
}
|
|
11986
11838
|
};
|
|
11987
|
-
|
|
11839
|
+
useEffect18(() => {
|
|
11988
11840
|
if (show && isPartial && partialRef) {
|
|
11989
11841
|
getskyosOrderDetails();
|
|
11990
11842
|
}
|
|
11991
11843
|
}, [show, isPartial, partialRef]);
|
|
11992
11844
|
return /* @__PURE__ */ jsxs22(Fragment21, { children: [
|
|
11993
|
-
/* @__PURE__ */
|
|
11994
|
-
/* @__PURE__ */
|
|
11995
|
-
/* @__PURE__ */
|
|
11996
|
-
/* @__PURE__ */
|
|
11997
|
-
/* @__PURE__ */
|
|
11998
|
-
/* @__PURE__ */
|
|
11999
|
-
/* @__PURE__ */
|
|
11845
|
+
/* @__PURE__ */ jsx36("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
11846
|
+
/* @__PURE__ */ jsx36(DataScript, {}),
|
|
11847
|
+
/* @__PURE__ */ jsx36(FractalTokenizerScript, {}),
|
|
11848
|
+
/* @__PURE__ */ jsx36(SkyChargewidgetstyles, {}),
|
|
11849
|
+
/* @__PURE__ */ jsx36(CardBankRadioStyles, {}),
|
|
11850
|
+
/* @__PURE__ */ jsx36(CustomModal2styles_default, {}),
|
|
11851
|
+
/* @__PURE__ */ jsx36(DataCapScriptLoader, {}),
|
|
12000
11852
|
!autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", disabled: disableSubmitBtn, onClick: () => setShow(true), children: [
|
|
12001
11853
|
submitBtnText,
|
|
12002
11854
|
submitBtnIcon
|
|
12003
11855
|
] }),
|
|
12004
|
-
!autoTrigger ? /* @__PURE__ */
|
|
11856
|
+
!autoTrigger ? /* @__PURE__ */ jsx36(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx36(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx36(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
|
|
12005
11857
|
] });
|
|
12006
11858
|
};
|
|
12007
11859
|
|
|
12008
11860
|
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
12009
|
-
import { useEffect as
|
|
11861
|
+
import { useEffect as useEffect20, useState as useState13, useMemo as useMemo2 } from "react";
|
|
12010
11862
|
import axios11 from "axios";
|
|
12011
11863
|
|
|
12012
11864
|
// src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
|
|
12013
|
-
import { jsx as
|
|
11865
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
12014
11866
|
function EmbeddedCheckoutStyles({ extraCustomCSS }) {
|
|
12015
|
-
return /* @__PURE__ */
|
|
11867
|
+
return /* @__PURE__ */ jsx37("style", { children: `
|
|
12016
11868
|
|
|
12017
11869
|
.pay-amount-conatiner{
|
|
12018
11870
|
margin-top: 20px !important;
|
|
@@ -12358,10 +12210,10 @@ padding:0px !important;
|
|
|
12358
12210
|
}
|
|
12359
12211
|
|
|
12360
12212
|
// src/app/components/Atoms/Applepay/ApplePayScriptLoader.tsx
|
|
12361
|
-
import { useEffect as
|
|
12213
|
+
import { useEffect as useEffect19 } from "react";
|
|
12362
12214
|
var applePayScriptLoaded = false;
|
|
12363
12215
|
var ApplePayScriptLoader = () => {
|
|
12364
|
-
|
|
12216
|
+
useEffect19(() => {
|
|
12365
12217
|
if (applePayScriptLoaded) return;
|
|
12366
12218
|
const existingScript = document.querySelector(
|
|
12367
12219
|
`script[src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"]`
|
|
@@ -12387,7 +12239,7 @@ var ApplePayScriptLoader = () => {
|
|
|
12387
12239
|
};
|
|
12388
12240
|
|
|
12389
12241
|
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
12390
|
-
import { Fragment as Fragment22, jsx as
|
|
12242
|
+
import { Fragment as Fragment22, jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
12391
12243
|
var EmbeddedCheckout = ({
|
|
12392
12244
|
amount,
|
|
12393
12245
|
bankAmount,
|
|
@@ -12465,7 +12317,7 @@ var EmbeddedCheckout = ({
|
|
|
12465
12317
|
]
|
|
12466
12318
|
);
|
|
12467
12319
|
const [commonProps, setCommonProps] = useState13(initialCommonProps);
|
|
12468
|
-
|
|
12320
|
+
useEffect20(() => {
|
|
12469
12321
|
if (show) {
|
|
12470
12322
|
setCommonProps(initialCommonProps);
|
|
12471
12323
|
}
|
|
@@ -12496,13 +12348,13 @@ var EmbeddedCheckout = ({
|
|
|
12496
12348
|
setLoading(false);
|
|
12497
12349
|
}
|
|
12498
12350
|
};
|
|
12499
|
-
|
|
12351
|
+
useEffect20(() => {
|
|
12500
12352
|
if (show && isPartial && partialRef) {
|
|
12501
12353
|
getskyosOrderDetails();
|
|
12502
12354
|
}
|
|
12503
12355
|
}, [show, isPartial, partialRef]);
|
|
12504
12356
|
console.log(onLoad, "onLoad");
|
|
12505
|
-
|
|
12357
|
+
useEffect20(() => {
|
|
12506
12358
|
const supported = !!window.ApplePaySession;
|
|
12507
12359
|
let canPay = false;
|
|
12508
12360
|
if (supported) {
|
|
@@ -12514,20 +12366,20 @@ var EmbeddedCheckout = ({
|
|
|
12514
12366
|
console.log(`ApplePaySession: ${supported}, canMakePayments: ${canPay}`);
|
|
12515
12367
|
}, []);
|
|
12516
12368
|
return /* @__PURE__ */ jsxs23(Fragment22, { children: [
|
|
12517
|
-
/* @__PURE__ */
|
|
12518
|
-
/* @__PURE__ */
|
|
12519
|
-
/* @__PURE__ */
|
|
12520
|
-
/* @__PURE__ */
|
|
12521
|
-
/* @__PURE__ */
|
|
12522
|
-
/* @__PURE__ */
|
|
12523
|
-
/* @__PURE__ */
|
|
12524
|
-
/* @__PURE__ */
|
|
12525
|
-
/* @__PURE__ */
|
|
12369
|
+
/* @__PURE__ */ jsx38("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
12370
|
+
/* @__PURE__ */ jsx38(DataScript, {}),
|
|
12371
|
+
/* @__PURE__ */ jsx38(FractalTokenizerScript, {}),
|
|
12372
|
+
/* @__PURE__ */ jsx38(SkyChargewidgetstyles, {}),
|
|
12373
|
+
/* @__PURE__ */ jsx38(CardBankRadioStyles, {}),
|
|
12374
|
+
/* @__PURE__ */ jsx38(CustomModal2styles_default, {}),
|
|
12375
|
+
/* @__PURE__ */ jsx38(DataCapScriptLoader, {}),
|
|
12376
|
+
/* @__PURE__ */ jsx38(ApplePayScriptLoader, {}),
|
|
12377
|
+
/* @__PURE__ */ jsx38(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
|
|
12526
12378
|
!autoTrigger && /* @__PURE__ */ jsxs23("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
12527
12379
|
submitBtnText,
|
|
12528
12380
|
submitBtnIcon
|
|
12529
12381
|
] }),
|
|
12530
|
-
!autoTrigger ? /* @__PURE__ */
|
|
12382
|
+
!autoTrigger ? /* @__PURE__ */ jsx38(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx38(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx38(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
|
|
12531
12383
|
] });
|
|
12532
12384
|
};
|
|
12533
12385
|
export {
|