@fractalpay/fractalpay-next-dev 0.0.299 → 0.0.301

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 CHANGED
@@ -39,7 +39,7 @@ var require_package = __commonJS({
39
39
  "package.json"(exports, module) {
40
40
  module.exports = {
41
41
  name: "@fractalpay/fractalpay-next-dev",
42
- version: "0.0.299",
42
+ version: "0.0.301",
43
43
  private: false,
44
44
  type: "module",
45
45
  scripts: {
@@ -97,7 +97,12 @@ var require_package = __commonJS({
97
97
  },
98
98
  author: "Mukul",
99
99
  license: "MIT",
100
- keywords: ["nextjs", "next", "typescript", "tailwindcss"],
100
+ keywords: [
101
+ "nextjs",
102
+ "next",
103
+ "typescript",
104
+ "tailwindcss"
105
+ ],
101
106
  publishConfig: {
102
107
  access: "public"
103
108
  }
@@ -254,8 +259,8 @@ var Loader_default = Loader;
254
259
  var { name } = require_package();
255
260
  var S3Url = "https://fractal-userdata-upload.s3.us-east-1.amazonaws.com/";
256
261
  if (name === "@fractalpay/fractalpay-next-dev") {
257
- baseUrl = "http://localhost:8082/";
258
- masterBaseUrl = "http://localhost:8081/";
262
+ masterBaseUrl = "https://api.dev.fractalpay.com/";
263
+ baseUrl = "https://widget.dev.fractalpay.com/";
259
264
  fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
260
265
  datacapUrl = "https://token-cert.dcap.com/v1/client";
261
266
  threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
@@ -2867,25 +2872,25 @@ import Swal from "sweetalert2";
2867
2872
  import { useEffect as useEffect3 } from "react";
2868
2873
  function DataScript() {
2869
2874
  useEffect3(() => {
2870
- const src2 = datacapUrl;
2875
+ const src = datacapUrl;
2871
2876
  if (typeof window === "undefined") return;
2872
2877
  if (window.DatacapWebToken) {
2873
2878
  return;
2874
2879
  }
2875
- if (!document.querySelector(`script[src="${src2}"]`)) {
2876
- const script2 = document.createElement("script");
2877
- script2.src = src2;
2878
- script2.async = true;
2879
- script2.onload = () => {
2880
+ if (!document.querySelector(`script[src="${src}"]`)) {
2881
+ const script = document.createElement("script");
2882
+ script.src = src;
2883
+ script.async = true;
2884
+ script.onload = () => {
2880
2885
  if (window.DatacapWebToken) {
2881
2886
  } else {
2882
2887
  console.warn("\u26A0\uFE0F Script loaded, but DatacapWebToken not found");
2883
2888
  }
2884
2889
  };
2885
- script2.onerror = (err) => {
2890
+ script.onerror = (err) => {
2886
2891
  console.error("\u274C Failed to load Datacap script", err);
2887
2892
  };
2888
- document.head.appendChild(script2);
2893
+ document.head.appendChild(script);
2889
2894
  } else {
2890
2895
  }
2891
2896
  }, []);
@@ -3150,21 +3155,31 @@ function CardBankRadioStyles({}) {
3150
3155
 
3151
3156
  // src/app/components/FractalTokenizer.tsx
3152
3157
  import { useEffect as useEffect4 } from "react";
3153
- function FractalTokenizerScript() {
3158
+ function FractalTokenizerScript({ onLoad }) {
3154
3159
  useEffect4(() => {
3155
3160
  const src = `${fractalGatewayUrl}tokenizer/static/js/fractal_tokenizer.js`;
3156
- if (document.querySelector(`script[src="${src}"]`)) return;
3161
+ if (window.FractalTokenizer) {
3162
+ onLoad == null ? void 0 : onLoad();
3163
+ return;
3164
+ }
3165
+ const existing = document.querySelector(`script[src="${src}"]`);
3166
+ if (existing) {
3167
+ existing.addEventListener("load", () => onLoad == null ? void 0 : onLoad());
3168
+ return;
3169
+ }
3157
3170
  const script = document.createElement("script");
3158
3171
  script.src = src;
3159
3172
  script.async = true;
3160
3173
  script.onload = () => {
3161
3174
  try {
3162
- const TokenizerClass = eval("FractalTokenizer");
3163
- if (TokenizerClass) {
3164
- window.FractalTokenizer = TokenizerClass;
3175
+ if (typeof FractalTokenizer !== "undefined") {
3176
+ window.FractalTokenizer = FractalTokenizer;
3177
+ onLoad == null ? void 0 : onLoad();
3178
+ } else {
3179
+ console.error("FractalTokenizer not defined in global scope");
3165
3180
  }
3166
3181
  } catch (err) {
3167
- console.error("FractalTokenizer not accessible:", err);
3182
+ console.error(err);
3168
3183
  }
3169
3184
  };
3170
3185
  document.head.appendChild(script);
@@ -3323,30 +3338,62 @@ var FractalFields_default = FractalFields;
3323
3338
 
3324
3339
  // src/app/components/Datacap-Payment/DataCapScriptLoader.tsx
3325
3340
  import { useEffect as useEffect6 } from "react";
3326
- var scriptLoaded = false;
3327
- var DataCapScriptLoader = () => {
3341
+ var DataCapScriptLoader = ({
3342
+ onReady,
3343
+ onError
3344
+ }) => {
3328
3345
  useEffect6(() => {
3329
- if (scriptLoaded) {
3346
+ const src = `${datacapUrl}/hosted`;
3347
+ if (window.__DATACAP_SCRIPT_LOADED__ && window.DatacapHostedWebToken) {
3348
+ onReady == null ? void 0 : onReady();
3330
3349
  return;
3331
3350
  }
3351
+ if (window.__DATACAP_SCRIPT_LOADING__) {
3352
+ const interval = setInterval(() => {
3353
+ if (window.DatacapHostedWebToken) {
3354
+ clearInterval(interval);
3355
+ onReady == null ? void 0 : onReady();
3356
+ }
3357
+ }, 100);
3358
+ return () => clearInterval(interval);
3359
+ }
3360
+ window.__DATACAP_SCRIPT_LOADING__ = true;
3332
3361
  const existingScript = document.querySelector(
3333
- `script[src="${datacapUrl}/hosted"]`
3362
+ `script[src="${src}"]`
3334
3363
  );
3335
- console.log("\u{1F535} existingScript found:", !!existingScript);
3336
- if (!existingScript) {
3337
- const script2 = document.createElement("script");
3338
- script2.src = `${datacapUrl}/hosted`;
3339
- script2.async = true;
3340
- script2.onload = () => {
3341
- console.log("\u2705 DataCap script loaded successfully");
3342
- scriptLoaded = true;
3343
- };
3344
- script2.onerror = (err) => {
3345
- console.error("\u274C DataCap script failed to load", err);
3346
- };
3347
- document.head.appendChild(script2);
3348
- } else {
3349
- scriptLoaded = true;
3364
+ if (existingScript) {
3365
+ waitForSDK();
3366
+ return;
3367
+ }
3368
+ const script = document.createElement("script");
3369
+ script.src = src;
3370
+ script.async = true;
3371
+ script.onload = () => {
3372
+ waitForSDK();
3373
+ };
3374
+ script.onerror = (err) => {
3375
+ console.error("Datacap script failed");
3376
+ window.__DATACAP_SCRIPT_LOADING__ = false;
3377
+ onError == null ? void 0 : onError(err);
3378
+ };
3379
+ document.head.appendChild(script);
3380
+ function waitForSDK() {
3381
+ let attempts = 0;
3382
+ const interval = setInterval(() => {
3383
+ attempts++;
3384
+ if (window.DatacapHostedWebToken) {
3385
+ clearInterval(interval);
3386
+ window.__DATACAP_SCRIPT_LOADING__ = false;
3387
+ window.__DATACAP_SCRIPT_LOADED__ = true;
3388
+ console.log("\u2705 Datacap SDK Ready");
3389
+ onReady == null ? void 0 : onReady();
3390
+ }
3391
+ if (attempts > 100) {
3392
+ clearInterval(interval);
3393
+ window.__DATACAP_SCRIPT_LOADING__ = false;
3394
+ onError == null ? void 0 : onError("SDK bootstrap timeout");
3395
+ }
3396
+ }, 100);
3350
3397
  }
3351
3398
  }, []);
3352
3399
  return null;
@@ -3355,7 +3402,7 @@ var DataCapScriptLoader = () => {
3355
3402
  // src/app/components/Datacap-Payment/DataCapFields.tsx
3356
3403
  import { useEffect as useEffect7, useRef as useRef2, useState as useState3 } from "react";
3357
3404
  import { jsx as jsx15 } from "react/jsx-runtime";
3358
- var customCSS = `
3405
+ var baseCSS = `
3359
3406
  body {
3360
3407
  margin: 0;
3361
3408
  font-family: 'IBM Plex Mono', monospace !important;
@@ -3434,6 +3481,8 @@ var customCSS = `
3434
3481
  }
3435
3482
 
3436
3483
  `;
3484
+ var datacapInitializing = false;
3485
+ var datacapInitialized = false;
3437
3486
  var DataCapFields = ({
3438
3487
  isOpen,
3439
3488
  tokenKey,
@@ -3446,6 +3495,7 @@ var DataCapFields = ({
3446
3495
  const iframeId = "datacap-iframe";
3447
3496
  const resolverRef = useRef2(null);
3448
3497
  const [iframeReady, setIframeReady] = useState3(false);
3498
+ let customCSS = baseCSS;
3449
3499
  useEffect7(() => {
3450
3500
  if (!isOpen || !tokenKey) return;
3451
3501
  if (isAddCard) {
@@ -3490,11 +3540,13 @@ var DataCapFields = ({
3490
3540
  const waitForSDK = () => new Promise((resolve, reject) => {
3491
3541
  let attempts = 0;
3492
3542
  const interval = setInterval(() => {
3543
+ attempts++;
3493
3544
  if (window.DatacapHostedWebToken) {
3494
3545
  clearInterval(interval);
3546
+ console.log("\u2705 Datacap SDK Ready");
3495
3547
  resolve();
3496
3548
  }
3497
- if (attempts++ > 50) {
3549
+ if (attempts > 100) {
3498
3550
  clearInterval(interval);
3499
3551
  reject("Datacap SDK not loaded");
3500
3552
  }
@@ -3502,10 +3554,28 @@ var DataCapFields = ({
3502
3554
  });
3503
3555
  await waitForSDK();
3504
3556
  const sdk = window.DatacapHostedWebToken;
3557
+ if (datacapInitializing || datacapInitialized) {
3558
+ console.log("\u{1F7E1} Datacap already initializing/initialized");
3559
+ return;
3560
+ }
3561
+ datacapInitializing = true;
3562
+ const initTimeout = setTimeout(() => {
3563
+ var _a, _b;
3564
+ console.error("\u274C Datacap iframe load timeout");
3565
+ datacapInitializing = false;
3566
+ setLoader == null ? void 0 : setLoader(false);
3567
+ (_b = (_a = resolverRef.current) == null ? void 0 : _a.reject) == null ? void 0 : _b.call(
3568
+ _a,
3569
+ "Unable to load payment form"
3570
+ );
3571
+ }, 15e3);
3505
3572
  sdk.init(
3506
3573
  tokenKey,
3507
3574
  iframeId,
3508
3575
  (response) => {
3576
+ clearTimeout(initTimeout);
3577
+ datacapInitializing = false;
3578
+ datacapInitialized = true;
3509
3579
  setLoader == null ? void 0 : setLoader(false);
3510
3580
  if (!resolverRef.current) return;
3511
3581
  if ((response == null ? void 0 : response.Error) || (response == null ? void 0 : response.Errors)) {
@@ -3519,6 +3589,9 @@ var DataCapFields = ({
3519
3589
  );
3520
3590
  };
3521
3591
  initialize();
3592
+ return () => {
3593
+ resolverRef.current = null;
3594
+ };
3522
3595
  }, [isOpen, tokenKey]);
3523
3596
  useEffect7(() => {
3524
3597
  const uniqueId = Math.random();
@@ -3526,7 +3599,15 @@ var DataCapFields = ({
3526
3599
  return new Promise((resolve, reject) => {
3527
3600
  setLoader == null ? void 0 : setLoader(true);
3528
3601
  resolverRef.current = { resolve, reject };
3529
- window.DatacapHostedWebToken.requestToken();
3602
+ if (!window.DatacapHostedWebToken) {
3603
+ reject("Datacap SDK unavailable");
3604
+ return;
3605
+ }
3606
+ try {
3607
+ window.DatacapHostedWebToken.requestToken();
3608
+ } catch (err) {
3609
+ reject(err);
3610
+ }
3530
3611
  });
3531
3612
  };
3532
3613
  window.requestDcToken = fn;
@@ -3534,23 +3615,55 @@ var DataCapFields = ({
3534
3615
  delete window.requestDcToken;
3535
3616
  };
3536
3617
  }, []);
3537
- return /* @__PURE__ */ jsx15(
3538
- "iframe",
3539
- {
3540
- id: iframeId,
3541
- onLoad: () => {
3542
- console.log("\u{1F7E2} Iframe visually loaded");
3543
- setIframeReady(true);
3544
- setLoader == null ? void 0 : setLoader(false);
3545
- },
3546
- style: {
3547
- width: "100%",
3548
- height: `${height || "250px"}`,
3549
- border: "none",
3550
- opacity: iframeReady ? 1 : 0,
3551
- transition: "opacity 0.3s ease"
3618
+ useEffect7(() => {
3619
+ if (!isOpen) {
3620
+ datacapInitializing = false;
3621
+ datacapInitialized = false;
3622
+ }
3623
+ }, [isOpen]);
3624
+ return (
3625
+ // <iframe
3626
+ // id={iframeId}
3627
+ // onLoad={() => {
3628
+ // console.log("🟢 Iframe visually loaded");
3629
+ // setIframeReady(true);
3630
+ // setLoader?.(false);
3631
+ // }}
3632
+ // style={{
3633
+ // width: "100%",
3634
+ // height: `${height || "250px"}`,
3635
+ // border: "none",
3636
+ // opacity: iframeReady ? 1 : 0,
3637
+ // transition: "opacity 0.3s ease",
3638
+ // }}
3639
+ // />
3640
+ /* @__PURE__ */ jsx15(
3641
+ "iframe",
3642
+ {
3643
+ id: iframeId,
3644
+ onLoad: () => {
3645
+ console.log("\u{1F7E2} Iframe visually loaded");
3646
+ setIframeReady(true);
3647
+ setLoader == null ? void 0 : setLoader(false);
3648
+ },
3649
+ onError: () => {
3650
+ var _a, _b;
3651
+ console.error("\u274C iframe failed");
3652
+ setLoader == null ? void 0 : setLoader(false);
3653
+ (_b = (_a = resolverRef.current) == null ? void 0 : _a.reject) == null ? void 0 : _b.call(
3654
+ _a,
3655
+ "Payment form failed to load"
3656
+ );
3657
+ },
3658
+ style: {
3659
+ width: "100%",
3660
+ height: `${height || "250px"}`,
3661
+ border: "none",
3662
+ opacity: iframeReady ? 1 : 0,
3663
+ transition: "opacity 0.3s ease"
3664
+ }
3552
3665
  }
3553
- }
3666
+ )
3554
3667
  );
3555
3668
  };
3556
3669
 
@@ -4124,6 +4237,19 @@ function FractalCheckbox({ id, checked, onChange, children }) {
4124
4237
  ] });
4125
4238
  }
4126
4239
 
4240
+ // src/app/utils/Constant.js
4241
+ var PaymentMethodKeys = {
4242
+ PROPAYKEY: "25",
4243
+ PAYARCKEY: "26",
4244
+ STRIPEKEYCC: "27",
4245
+ PAYRIXKEY: "28",
4246
+ SKYFIACHKEY: "29",
4247
+ JUSTIFIKEY: "30",
4248
+ INFINICEPTKEY: "31",
4249
+ FRACTALKEY: "32"
4250
+ };
4251
+ var DcLoadingError = "Something went wrong while loading the payment form. Please try again after some time.";
4252
+
4127
4253
  // src/app/components/Charge/GetPaymentPage.tsx
4128
4254
  import { Fragment as Fragment9, jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
4129
4255
  function GetPaymentPage(props) {
@@ -4147,6 +4273,7 @@ function GetPaymentPage(props) {
4147
4273
  const [saveACHConsent1, setSaveACHConsent1] = useState4(false);
4148
4274
  const [errorBankConsentOther, setErrorBankConsentOther] = useState4("");
4149
4275
  const [loaderText, setLoderText] = useState4("");
4276
+ const [isTokenizerReady, setTokenizerReady] = useState4(false);
4150
4277
  const fractalpayClientKey = props.merchantPublicKey;
4151
4278
  const isPreAuth = !!props.isPreAuth;
4152
4279
  const showButton = props.showButton !== false;
@@ -4627,7 +4754,8 @@ function GetPaymentPage(props) {
4627
4754
  setLoading2(true);
4628
4755
  try {
4629
4756
  const formData = {
4630
- amount: `${props.amount || 0}`,
4757
+ // amount: `${props.amount || 0}`,
4758
+ amount: `${leftTotal}`,
4631
4759
  fractalpayPublicKey: fractalpayClientKey,
4632
4760
  orderId: props == null ? void 0 : props.orderID,
4633
4761
  customer_id: props == null ? void 0 : props.customerId,
@@ -4697,6 +4825,7 @@ function GetPaymentPage(props) {
4697
4825
  } catch (err) {
4698
4826
  setErrorIframe(((_h2 = (_g2 = err == null ? void 0 : err.response) == null ? void 0 : _g2.data) == null ? void 0 : _h2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
4699
4827
  setLoading2(false);
4828
+ return;
4700
4829
  }
4701
4830
  const card_issue_type = ((_i2 = tokenizeData == null ? void 0 : tokenizeData.bin_lookup_result) == null ? void 0 : _i2.card_issue_type) || null;
4702
4831
  const feeExempt = ["debit", "prepaid"].includes(String(card_issue_type || "").toLowerCase());
@@ -4887,7 +5016,8 @@ function GetPaymentPage(props) {
4887
5016
  let resultofOrderCreate;
4888
5017
  if (!(card_type === "Bank")) {
4889
5018
  const formData = {
4890
- amount: `${props.amount || 0}`,
5019
+ // amount: `${props.amount || 0}`,
5020
+ amount: `${leftTotal}`,
4891
5021
  fractalpayPublicKey: fractalpayClientKey,
4892
5022
  orderId: props == null ? void 0 : props.orderID,
4893
5023
  customer_id: props == null ? void 0 : props.customerId,
@@ -5091,7 +5221,7 @@ function GetPaymentPage(props) {
5091
5221
  const invoiceLabel = invoiceNo ? `Invoice #${invoiceNo}` : "Invoice";
5092
5222
  const baseAmount = Number((_a = cashDiscount != null ? cashDiscount : props == null ? void 0 : props.amount) != null ? _a : 0);
5093
5223
  const fundingType = (_b = surchargeResult == null ? void 0 : surchargeResult.card_issue_type) == null ? void 0 : _b.toLowerCase();
5094
- const surchargeBlocked = !!surchargeResult && (surchargeResult.surcharge_allowed === false || !(Number(surchargeResult.max_surcharge_percent) > 0) || fundingType === "debit" || fundingType === "prepaid");
5224
+ const surchargeBlocked = !!surchargeResult && (fundingType === "debit" || fundingType === "prepaid" || fundingType !== "unknown" && (surchargeResult.surcharge_allowed === false || !(Number(surchargeResult.max_surcharge_percent) > 0)));
5095
5225
  const cardTotal = surchargeBlocked ? baseAmount : Number((props == null ? void 0 : props.amount) || 0);
5096
5226
  const surchargeFee = Math.max(cardTotal - baseAmount, 0);
5097
5227
  const isBankView = activetab === "ach";
@@ -5191,8 +5321,20 @@ function GetPaymentPage(props) {
5191
5321
  ] });
5192
5322
  return /* @__PURE__ */ jsxs9(Fragment9, { children: [
5193
5323
  /* @__PURE__ */ jsx18(DataScript, {}),
5194
- /* @__PURE__ */ jsx18(FractalTokenizerScript, {}),
5195
- /* @__PURE__ */ jsx18(DataCapScriptLoader, {}),
5324
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx18(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
5325
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 31 && /* @__PURE__ */ jsx18(
5326
+ DataCapScriptLoader,
5327
+ {
5328
+ onReady: () => {
5329
+ console.log("SDK Ready");
5330
+ },
5331
+ onError: (err) => {
5332
+ setLoading(false);
5333
+ setLoadingIframe(false);
5334
+ setError(DcLoadingError);
5335
+ }
5336
+ }
5337
+ ),
5196
5338
  /* @__PURE__ */ jsx18(Chargewidgetstyles, {}),
5197
5339
  /* @__PURE__ */ jsx18(CardBankRadioStyles, {}),
5198
5340
  /* @__PURE__ */ jsx18(FractalWidgetStyles, {}),
@@ -5385,7 +5527,7 @@ function GetPaymentPage(props) {
5385
5527
  }
5386
5528
  }
5387
5529
  ) }),
5388
- /* @__PURE__ */ jsx18(FractalField, { label: (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 ? "Card number" : "", error: cardError == null ? void 0 : cardError.cardNumber, children: /* @__PURE__ */ jsx18("div", { className: `fps-tokenizer ${(paymentData == null ? void 0 : paymentData.paymentGateway) !== 32 ? "dc-tokenizer" : ""}`, children: (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 ? show && /* @__PURE__ */ jsx18(
5530
+ /* @__PURE__ */ jsx18(FractalField, { label: (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 ? "Card number" : "", error: cardError == null ? void 0 : cardError.cardNumber, children: /* @__PURE__ */ jsx18("div", { className: `fps-tokenizer ${(paymentData == null ? void 0 : paymentData.paymentGateway) !== 32 ? "dc-tokenizer" : ""}`, children: (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 ? show && isTokenizerReady && /* @__PURE__ */ jsx18(
5389
5531
  FractalFields_default,
5390
5532
  {
5391
5533
  fractalStyles,
@@ -5851,6 +5993,7 @@ function AddCardEasyPay(props) {
5851
5993
  const exp_year_ref = useRef4(null);
5852
5994
  const cvv_ref = useRef4(null);
5853
5995
  const name_ref = useRef4(null);
5996
+ const [isTokenizerReady, setTokenizerReady] = useState5(false);
5854
5997
  const tokenizerRef = useRef4(null);
5855
5998
  const fractalStyles = {
5856
5999
  input: {
@@ -6123,8 +6266,20 @@ function AddCardEasyPay(props) {
6123
6266
  }, []);
6124
6267
  return /* @__PURE__ */ jsxs11(Fragment11, { children: [
6125
6268
  /* @__PURE__ */ jsx23(DataScript, {}),
6126
- /* @__PURE__ */ jsx23(FractalTokenizerScript, {}),
6127
- /* @__PURE__ */ jsx23(DataCapScriptLoader, {}),
6269
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx23(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
6270
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 31 && /* @__PURE__ */ jsx23(
6271
+ DataCapScriptLoader,
6272
+ {
6273
+ onReady: () => {
6274
+ console.log("SDK Ready");
6275
+ },
6276
+ onError: (err) => {
6277
+ setLoading(false);
6278
+ setLoadingIframe(false);
6279
+ setError(DcLoadingError);
6280
+ }
6281
+ }
6282
+ ),
6128
6283
  /* @__PURE__ */ jsx23(AddCardStyle, {}),
6129
6284
  /* @__PURE__ */ jsx23(Loader_default, { loading: loading || loadingIframe }),
6130
6285
  error && /* @__PURE__ */ jsx23("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx23(ErrorCardMessage_default, { error, onClose: handleClose }) }),
@@ -6153,7 +6308,7 @@ function AddCardEasyPay(props) {
6153
6308
  /* @__PURE__ */ jsxs11("div", { style: { maxHeight: "350px", minHeight: "0" }, className: "card-scrl", children: [
6154
6309
  /* @__PURE__ */ jsxs11("div", { className: "form-group", style: { marginTop: "0", marginBottom: "10px" }, children: [
6155
6310
  /* @__PURE__ */ jsx23("label", { htmlFor: "cardNumber", children: "Card Number" }),
6156
- (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx23(
6311
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && isTokenizerReady && /* @__PURE__ */ jsx23(
6157
6312
  FractalFields_default,
6158
6313
  {
6159
6314
  fractalStyles,
@@ -6288,18 +6443,6 @@ function AddCardEasyPay(props) {
6288
6443
  import { useEffect as useEffect11, useRef as useRef6, useState as useState6 } from "react";
6289
6444
  import axios5 from "axios";
6290
6445
 
6291
- // src/app/utils/Constant.js
6292
- var PaymentMethodKeys = {
6293
- PROPAYKEY: "25",
6294
- PAYARCKEY: "26",
6295
- STRIPEKEYCC: "27",
6296
- PAYRIXKEY: "28",
6297
- SKYFIACHKEY: "29",
6298
- JUSTIFIKEY: "30",
6299
- INFINICEPTKEY: "31",
6300
- FRACTALKEY: "32"
6301
- };
6302
-
6303
6446
  // src/app/components/AddCard/AddCardSkyStyle.tsx
6304
6447
  import { jsx as jsx24 } from "react/jsx-runtime";
6305
6448
  function AddCardSkyStyle({}) {
@@ -6507,8 +6650,12 @@ import { Fragment as Fragment12, jsx as jsx25, jsxs as jsxs12 } from "react/jsx-
6507
6650
  var FractalFieldsAddCardSky = ({ fractalStyles, tokenizerRef, extraInputs }) => {
6508
6651
  const instanceRef = useRef5(null);
6509
6652
  useEffect10(() => {
6510
- if (!window.FractalTokenizer) return;
6511
- const instance = new window.FractalTokenizer({
6653
+ const Tokenizer = window.FractalTokenizer;
6654
+ if (!Tokenizer) {
6655
+ console.error("Tokenizer not available");
6656
+ return;
6657
+ }
6658
+ const instance = new Tokenizer({
6512
6659
  styles: fractalStyles
6513
6660
  });
6514
6661
  instanceRef.current = instance;
@@ -6593,7 +6740,7 @@ var FractalFieldsAddCardSky_default = FractalFieldsAddCardSky;
6593
6740
 
6594
6741
  // src/app/components/AddCard/AddCardSky.tsx
6595
6742
  import { Fragment as Fragment13, jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
6596
- function CardOnFile({ session_token, callback, isloading, onCancel, showChecks, merchantName, signCheckbox, checkedSignCheckbox, onCheckSign, cancelbtnClass, savebtnClass, inputClass, isDual, customCSS: customCSS2, height }) {
6743
+ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks, merchantName, signCheckbox, checkedSignCheckbox, onCheckSign, cancelbtnClass, savebtnClass, inputClass, isDual, customCSS, height }) {
6597
6744
  var _a, _b;
6598
6745
  const [loading, setLoading] = useState6(false);
6599
6746
  const [errorIframe, setErrorIframe] = useState6("");
@@ -6604,10 +6751,11 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
6604
6751
  const [error, setError] = useState6("");
6605
6752
  const showLoader = () => setLoading(true);
6606
6753
  const hideLoader = () => setLoading(false);
6607
- const [passFee, setPassFee] = useState6(false);
6754
+ const [passFee, setPassFee] = useState6(null);
6608
6755
  const [paymentGateway, setPaymentGateway] = useState6();
6609
6756
  const [dcToken, setDCToken] = useState6();
6610
6757
  const tokenizerRef = useRef6(null);
6758
+ const [isTokenizerReady, setTokenizerReady] = useState6(false);
6611
6759
  const fractalStyles = {
6612
6760
  input: {
6613
6761
  "font-family": "'Inter', sans-serif",
@@ -6870,8 +7018,20 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
6870
7018
  }, []);
6871
7019
  return /* @__PURE__ */ jsxs13(Fragment13, { children: [
6872
7020
  /* @__PURE__ */ jsx26(DataScript, {}),
6873
- /* @__PURE__ */ jsx26(FractalTokenizerScript, {}),
6874
- /* @__PURE__ */ jsx26(DataCapScriptLoader, {}),
7021
+ paymentGateway == 32 && /* @__PURE__ */ jsx26(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
7022
+ paymentGateway == 31 && /* @__PURE__ */ jsx26(
7023
+ DataCapScriptLoader,
7024
+ {
7025
+ onReady: () => {
7026
+ console.log("SDK Ready");
7027
+ },
7028
+ onError: (err) => {
7029
+ setLoading(false);
7030
+ setLoadingIframe(false);
7031
+ setError(DcLoadingError);
7032
+ }
7033
+ }
7034
+ ),
6875
7035
  /* @__PURE__ */ jsx26(AddCardSkyStyle, {}),
6876
7036
  /* @__PURE__ */ jsx26(Loader_default, { loading: loading || isloading || loadingIframe }),
6877
7037
  error && /* @__PURE__ */ jsx26("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx26(ErrorCardMessage_default, { error, onClose: handleClose }) }),
@@ -6932,7 +7092,7 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
6932
7092
  (cardError == null ? void 0 : cardError.lastName) && /* @__PURE__ */ jsx26("small", { className: "error", children: cardError == null ? void 0 : cardError.lastName })
6933
7093
  ] })
6934
7094
  ] }),
6935
- /* @__PURE__ */ jsx26(
7095
+ isTokenizerReady && /* @__PURE__ */ jsx26(
6936
7096
  FractalFieldsAddCardSky_default,
6937
7097
  {
6938
7098
  fractalStyles,
@@ -6964,7 +7124,7 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
6964
7124
  type: "checkbox",
6965
7125
  id: "pass_fee",
6966
7126
  className: "toggle-checkbox",
6967
- checked: passFee,
7127
+ checked: passFee != null ? passFee : false,
6968
7128
  onChange: (e) => {
6969
7129
  setPassFee(e.target.checked);
6970
7130
  }
@@ -7107,7 +7267,7 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
7107
7267
  isOpen: true,
7108
7268
  tokenKey: dcToken,
7109
7269
  setLoader: setLoadingIframe,
7110
- customCSS: customCSS2,
7270
+ customCSS,
7111
7271
  height
7112
7272
  }
7113
7273
  ) }),
@@ -7136,7 +7296,7 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
7136
7296
  type: "checkbox",
7137
7297
  id: "pass_fee",
7138
7298
  className: "toggle-checkbox",
7139
- checked: passFee,
7299
+ checked: passFee != null ? passFee : false,
7140
7300
  onChange: (e) => {
7141
7301
  setPassFee(e.target.checked);
7142
7302
  }
@@ -7375,6 +7535,7 @@ function PartialPayment(props) {
7375
7535
  const [errorBankConsentOther, setErrorBankConsentOther] = useState7("");
7376
7536
  const [loaderText, setLoderText] = useState7("");
7377
7537
  let [isDebitAdjusted, setIsDebitAdjusted] = useState7(false);
7538
+ const [isTokenizerReady, setTokenizerReady] = useState7(false);
7378
7539
  const tokenizerRef = useRef7(null);
7379
7540
  const fractalStyles = {
7380
7541
  input: {
@@ -8099,8 +8260,20 @@ function PartialPayment(props) {
8099
8260
  /* @__PURE__ */ jsx29(DataScript, {}),
8100
8261
  /* @__PURE__ */ jsx29(Chargewidgetstyles, {}),
8101
8262
  /* @__PURE__ */ jsx29(CardBankRadioStyles, {}),
8102
- /* @__PURE__ */ jsx29(FractalTokenizerScript, {}),
8103
- /* @__PURE__ */ jsx29(DataCapScriptLoader, {}),
8263
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx29(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
8264
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 31 && /* @__PURE__ */ jsx29(
8265
+ DataCapScriptLoader,
8266
+ {
8267
+ onReady: () => {
8268
+ console.log("SDK Ready");
8269
+ },
8270
+ onError: (err) => {
8271
+ setLoading(false);
8272
+ setLoadingIframe(false);
8273
+ setError(DcLoadingError);
8274
+ }
8275
+ }
8276
+ ),
8104
8277
  /* @__PURE__ */ jsxs16(Fragment16, { children: [
8105
8278
  /* @__PURE__ */ jsx29("button", { ref: buttonRef, style: { display: "none" }, className: "paymentBtn", onClick: handleShow, children: "Pay" }),
8106
8279
  /* @__PURE__ */ jsxs16(
@@ -8316,7 +8489,7 @@ function PartialPayment(props) {
8316
8489
  ] }),
8317
8490
  /* @__PURE__ */ jsxs16("div", { className: "form-group", children: [
8318
8491
  /* @__PURE__ */ jsx29("label", { children: "CARD NUMBER" }),
8319
- /* @__PURE__ */ jsx29("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx29(
8492
+ /* @__PURE__ */ jsx29("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && isTokenizerReady && /* @__PURE__ */ jsx29(
8320
8493
  FractalFields_default,
8321
8494
  {
8322
8495
  fractalStyles,
@@ -8624,7 +8797,7 @@ function PartialPayment(props) {
8624
8797
  }
8625
8798
 
8626
8799
  // src/app/components/Skysystemz/PayButtonWithForm.tsx
8627
- import { useEffect as useEffect18, useState as useState11, useMemo } from "react";
8800
+ import { useEffect as useEffect16, useState as useState10, useMemo } from "react";
8628
8801
 
8629
8802
  // src/app/components/Skysystemz/SkyChargewidgetstyles.tsx
8630
8803
  import { jsx as jsx30 } from "react/jsx-runtime";
@@ -9470,7 +9643,7 @@ padding:0px !important;
9470
9643
  }
9471
9644
 
9472
9645
  // src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
9473
- import { useCallback, useEffect as useEffect17, useRef as useRef11, useState as useState10 } from "react";
9646
+ import { useCallback, useEffect as useEffect15, useRef as useRef10, useState as useState9 } from "react";
9474
9647
  import axios8 from "axios";
9475
9648
  import Swal4 from "sweetalert2";
9476
9649
 
@@ -9756,200 +9929,9 @@ var ErrorCardOverlay = ({ onClose, error, autoTrigger = false }) => {
9756
9929
  };
9757
9930
  var ErrorCardOverlay_default = ErrorCardOverlay;
9758
9931
 
9759
- // src/app/components/Atoms/Googlepay/Googlepay.tsx
9760
- import { useRef as useRef9 } from "react";
9761
-
9762
- // src/app/components/Atoms/Googlepay/GooglePayScriptLoader.tsx
9763
- import { useEffect as useEffect14 } from "react";
9764
- var googlePayScriptLoaded = false;
9765
- var GooglePayScriptLoader = ({
9766
- onLoad
9767
- }) => {
9768
- useEffect14(() => {
9769
- if (googlePayScriptLoaded) {
9770
- onLoad == null ? void 0 : onLoad();
9771
- return;
9772
- }
9773
- const existingScript = document.querySelector(
9774
- `script[src="https://pay.google.com/gp/p/js/pay.js"]`
9775
- );
9776
- if (!existingScript) {
9777
- const script2 = document.createElement("script");
9778
- script2.src = "https://pay.google.com/gp/p/js/pay.js";
9779
- script2.async = true;
9780
- script2.onload = () => {
9781
- console.log("\u2705 Google Pay script loaded");
9782
- googlePayScriptLoaded = true;
9783
- console.log("google:", window.google);
9784
- onLoad == null ? void 0 : onLoad();
9785
- };
9786
- script2.onerror = (err) => {
9787
- console.error("\u274C Google Pay script failed", err);
9788
- };
9789
- document.head.appendChild(script2);
9790
- } else {
9791
- googlePayScriptLoaded = true;
9792
- onLoad == null ? void 0 : onLoad();
9793
- }
9794
- }, []);
9795
- return null;
9796
- };
9797
-
9798
- // src/app/components/Atoms/Googlepay/Googlepay.tsx
9799
- import { Fragment as Fragment18, jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
9800
- function GooglePayComponent({
9801
- amount,
9802
- googlePayEnvironment: googlePayEnvironment2,
9803
- googlePayGatewayMerchantId: googlePayGatewayMerchantId2,
9804
- googlePayMerchantId: googlePayMerchantId2,
9805
- googlePayMerchantName,
9806
- require3ds = false,
9807
- completeFractalFlow,
9808
- setLoading
9809
- }) {
9810
- const containerRef = useRef9(null);
9811
- const paymentsClientRef = useRef9(null);
9812
- const baseRequest = {
9813
- apiVersion: 2,
9814
- apiVersionMinor: 0
9815
- };
9816
- const allowedCardNetworks = ["AMEX", "DISCOVER", "MASTERCARD", "VISA"];
9817
- const allowedCardAuthMethods = require3ds ? ["CRYPTOGRAM_3DS"] : ["PAN_ONLY", "CRYPTOGRAM_3DS"];
9818
- const baseCardPaymentMethod = {
9819
- type: "CARD",
9820
- parameters: {
9821
- allowedAuthMethods: allowedCardAuthMethods,
9822
- allowedCardNetworks
9823
- }
9824
- };
9825
- const cardPaymentMethod = __spreadProps(__spreadValues({}, baseCardPaymentMethod), {
9826
- tokenizationSpecification: {
9827
- type: "PAYMENT_GATEWAY",
9828
- parameters: {
9829
- gateway: googlePayGatewayMerchantId2,
9830
- gatewayMerchantId: googlePayGatewayMerchantId2
9831
- }
9832
- }
9833
- });
9834
- const handlePaymentAuthorization = async (paymentData) => {
9835
- var _a, _b;
9836
- try {
9837
- const token = (_b = (_a = paymentData == null ? void 0 : paymentData.paymentMethodData) == null ? void 0 : _a.tokenizationData) == null ? void 0 : _b.token;
9838
- if (!token) throw new Error("Missing token");
9839
- const parsed = JSON.parse(token);
9840
- console.log(parsed, "parsed token");
9841
- setLoading(true);
9842
- completeFractalFlow(parsed, null, "google_pay");
9843
- return {
9844
- transactionState: "SUCCESS"
9845
- // ✅ CLOSES GOOGLE PAY POPUP
9846
- };
9847
- } catch (err) {
9848
- console.error("Payment failed:", err);
9849
- return {
9850
- transactionState: "ERROR",
9851
- // ❌ CLOSES WITH ERROR UI
9852
- error: {
9853
- intent: "PAYMENT_AUTHORIZATION",
9854
- message: "Payment failed",
9855
- reason: "PAYMENT_DATA_INVALID"
9856
- }
9857
- };
9858
- }
9859
- };
9860
- const getPaymentsClient = () => {
9861
- if (!paymentsClientRef.current && typeof window !== "undefined") {
9862
- const google = window.google;
9863
- if (!google) return null;
9864
- paymentsClientRef.current = new google.payments.api.PaymentsClient({
9865
- environment: googlePayEnvironment2,
9866
- // ✅ ADD THIS
9867
- paymentDataCallbacks: {
9868
- onPaymentAuthorized: handlePaymentAuthorization
9869
- }
9870
- });
9871
- }
9872
- return paymentsClientRef.current;
9873
- };
9874
- const getIsReadyToPayRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
9875
- allowedPaymentMethods: [baseCardPaymentMethod]
9876
- });
9877
- const getTransactionInfo = () => ({
9878
- countryCode: "US",
9879
- currencyCode: "USD",
9880
- totalPriceStatus: "FINAL",
9881
- totalPrice: amount,
9882
- checkoutOption: "COMPLETE_IMMEDIATE_PURCHASE"
9883
- });
9884
- const getPaymentDataRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
9885
- allowedPaymentMethods: [cardPaymentMethod],
9886
- transactionInfo: getTransactionInfo(),
9887
- merchantInfo: {
9888
- merchantId: googlePayMerchantId2,
9889
- merchantName: googlePayMerchantName
9890
- },
9891
- // ✅ ADD THIS
9892
- callbackIntents: ["PAYMENT_AUTHORIZATION"]
9893
- });
9894
- const initializeGooglePay = async () => {
9895
- try {
9896
- const client = getPaymentsClient();
9897
- if (!client) {
9898
- console.error("Google Pay client not ready");
9899
- return;
9900
- }
9901
- const response = await client.isReadyToPay(
9902
- getIsReadyToPayRequest()
9903
- );
9904
- if (response.result && containerRef.current) {
9905
- const button = client.createButton({
9906
- onClick: onGooglePayClick,
9907
- allowedPaymentMethods: [baseCardPaymentMethod],
9908
- buttonType: "pay",
9909
- buttonColor: "black",
9910
- buttonRadius: 8
9911
- });
9912
- if (containerRef.current) {
9913
- containerRef.current.innerHTML = "";
9914
- }
9915
- containerRef.current.appendChild(button);
9916
- }
9917
- } catch (err) {
9918
- console.error("Google Pay init error:", err);
9919
- }
9920
- };
9921
- const onGooglePayClick = async () => {
9922
- const client = getPaymentsClient();
9923
- if (!client) {
9924
- console.error("Google Pay client not ready");
9925
- return;
9926
- }
9927
- try {
9928
- await client.loadPaymentData(getPaymentDataRequest());
9929
- } catch (err) {
9930
- if ((err == null ? void 0 : err.statusCode) !== "CANCELED") {
9931
- console.error(err);
9932
- }
9933
- }
9934
- };
9935
- const onScriptLoad = () => {
9936
- if (!googlePayEnvironment2 || !googlePayGatewayMerchantId2 || !amount || !googlePayMerchantId2) {
9937
- console.error("Missing Google Pay config");
9938
- return;
9939
- }
9940
- setTimeout(() => {
9941
- initializeGooglePay();
9942
- }, 0);
9943
- };
9944
- return /* @__PURE__ */ jsxs19(Fragment18, { children: [
9945
- /* @__PURE__ */ jsx35("div", { ref: containerRef, className: "text-center" }),
9946
- /* @__PURE__ */ jsx35(GooglePayScriptLoader, { onLoad: onScriptLoad })
9947
- ] });
9948
- }
9949
-
9950
9932
  // src/app/components/Atoms/Applepay/ApplePayButton.tsx
9951
- import { useEffect as useEffect16, useRef as useRef10 } from "react";
9952
- import { jsx as jsx36 } from "react/jsx-runtime";
9933
+ import { useEffect as useEffect14, useRef as useRef9 } from "react";
9934
+ import { jsx as jsx35 } from "react/jsx-runtime";
9953
9935
  function ApplePayButton({
9954
9936
  applePayMerchantId: applePayMerchantId2,
9955
9937
  applePayAmount,
@@ -9957,7 +9939,7 @@ function ApplePayButton({
9957
9939
  showLoader,
9958
9940
  completeFractalFlow
9959
9941
  }) {
9960
- const applePayRef = useRef10(null);
9942
+ const applePayRef = useRef9(null);
9961
9943
  const paymentRequestMethods = [
9962
9944
  {
9963
9945
  supportedMethods: "https://apple.com/apple-pay",
@@ -10059,21 +10041,21 @@ function ApplePayButton({
10059
10041
  console.log("\u274C Apple Pay flow failed:", err == null ? void 0 : err.message);
10060
10042
  }
10061
10043
  }
10062
- useEffect16(() => {
10044
+ useEffect14(() => {
10063
10045
  if (window.ApplePaySession && window.ApplePaySession.canMakePayments()) {
10064
10046
  console.log("\u2705 Apple Pay is available");
10065
10047
  } else {
10066
10048
  console.log("\u274C Apple Pay NOT available");
10067
10049
  }
10068
10050
  }, []);
10069
- useEffect16(() => {
10051
+ useEffect14(() => {
10070
10052
  const btn = applePayRef.current;
10071
10053
  if (!btn) return;
10072
10054
  const handleClick = () => handleApplePayClick();
10073
10055
  btn.addEventListener("click", handleClick);
10074
10056
  return () => btn.removeEventListener("click", handleClick);
10075
10057
  }, [applePayMerchantId2, applePayAmount, applePayMerchantName]);
10076
- return /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(
10058
+ return /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
10077
10059
  "apple-pay-button",
10078
10060
  {
10079
10061
  ref: applePayRef,
@@ -10086,55 +10068,56 @@ function ApplePayButton({
10086
10068
  }
10087
10069
 
10088
10070
  // src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
10089
- import { Fragment as Fragment19, jsx as jsx37, jsxs as jsxs20 } from "react/jsx-runtime";
10090
- 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 }) => {
10071
+ import { Fragment as Fragment18, jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
10072
+ 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 }) => {
10091
10073
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
10092
- const hasRunRef = useRef11(false);
10093
- const cardFormRef = useRef11(null);
10094
- const bankFormRef = useRef11(null);
10095
- const expiryYearRef = useRef11(null);
10096
- const expiryMonthRef = useRef11(null);
10097
- const cardListRunRef = useRef11(false);
10098
- const threeDSContainerRef = useRef11(null);
10099
- const [activetab, setActive] = useState10("card");
10100
- const [activeList, setActiveList] = useState10("card");
10101
- const [cardData, setCardData] = useState10();
10102
- const [cardError, setCardError] = useState10({});
10103
- const [achData, setAchData] = useState10();
10104
- const [achError, setAchError] = useState10({});
10105
- const [saveACHinfo, setSaveACHinfo] = useState10(false);
10106
- const [saveACHConsent1, setSaveACHConsent1] = useState10(false);
10107
- const [saveCardInfo, setSaveCardInfo] = useState10(false);
10108
- const [error, setError] = useState10("");
10109
- const [errorIframe, setErrorIframe] = useState10("");
10110
- const [success, setSuccess] = useState10(false);
10111
- let [tranId, setTranId] = useState10("");
10112
- const [loading, setLoading] = useState10(false);
10113
- const [loading2, setLoading2] = useState10(false);
10114
- const [loadingIframe, setLoadingIframe] = useState10(false);
10115
- const [cardList, setCardList] = useState10([]);
10116
- const [bankList, setBankList] = useState10([]);
10117
- const [selectedCard, setSelectedCard] = useState10();
10118
- const [cashDiscount, setCashDiscount] = useState10(Number(amount));
10119
- const [activeinCard, setActiveinCard] = useState10("form");
10120
- const [activeinBank, setActiveinBank] = useState10("form");
10121
- const [isBankActive, setIsBankActive] = useState10(false);
10122
- const [processingFee, setProcessingFee] = useState10(0);
10123
- const [clientSecret, setClientSecret] = useState10("");
10124
- const [errorMessage, setErrorMessage] = useState10(null);
10125
- const [initialLoader, setInitialLoader] = useState10(false);
10126
- const [is3DSEnable, setIs3DSEnable] = useState10(false);
10127
- const [stripeResponse, setStripeResponse] = useState10(null);
10128
- const [orderLoader, setOrderLoader] = useState10(false);
10129
- const [orderGuid, setOrderGuid] = useState10(ordGuid || null);
10130
- const [partialAmount, setPartialAmount] = useState10("");
10131
- const [partialError, setPartialError] = useState10("");
10132
- const [remainingAmount, setRemainingAmount] = useState10("");
10133
- const [paymentGateway, setPaymentGateway] = useState10();
10134
- const [dcToken, setDCToken] = useState10();
10135
- const [isBankConsentChecked, setIsBankConsentChecked] = useState10(false);
10136
- const [errorBankConsent, setErrorBankConsent] = useState10("");
10137
- const [errorBankConsentOther, setErrorBankConsentOther] = useState10("");
10074
+ const hasRunRef = useRef10(false);
10075
+ const cardFormRef = useRef10(null);
10076
+ const bankFormRef = useRef10(null);
10077
+ const expiryYearRef = useRef10(null);
10078
+ const expiryMonthRef = useRef10(null);
10079
+ const cardListRunRef = useRef10(false);
10080
+ const threeDSContainerRef = useRef10(null);
10081
+ const [activetab, setActive] = useState9("card");
10082
+ const [activeList, setActiveList] = useState9("card");
10083
+ const [cardData, setCardData] = useState9();
10084
+ const [cardError, setCardError] = useState9({});
10085
+ const [achData, setAchData] = useState9();
10086
+ const [achError, setAchError] = useState9({});
10087
+ const [saveACHinfo, setSaveACHinfo] = useState9(false);
10088
+ const [saveACHConsent1, setSaveACHConsent1] = useState9(false);
10089
+ const [saveCardInfo, setSaveCardInfo] = useState9(false);
10090
+ const [error, setError] = useState9("");
10091
+ const [errorIframe, setErrorIframe] = useState9("");
10092
+ const [success, setSuccess] = useState9(false);
10093
+ let [tranId, setTranId] = useState9("");
10094
+ const [loading, setLoading] = useState9(false);
10095
+ const [loading2, setLoading2] = useState9(false);
10096
+ const [loadingIframe, setLoadingIframe] = useState9(false);
10097
+ const [cardList, setCardList] = useState9([]);
10098
+ const [bankList, setBankList] = useState9([]);
10099
+ const [selectedCard, setSelectedCard] = useState9();
10100
+ const [cashDiscount, setCashDiscount] = useState9(Number(amount));
10101
+ const [activeinCard, setActiveinCard] = useState9("form");
10102
+ const [activeinBank, setActiveinBank] = useState9("form");
10103
+ const [isBankActive, setIsBankActive] = useState9(false);
10104
+ const [processingFee, setProcessingFee] = useState9(0);
10105
+ const [clientSecret, setClientSecret] = useState9("");
10106
+ const [errorMessage, setErrorMessage] = useState9(null);
10107
+ const [initialLoader, setInitialLoader] = useState9(false);
10108
+ const [is3DSEnable, setIs3DSEnable] = useState9(false);
10109
+ const [stripeResponse, setStripeResponse] = useState9(null);
10110
+ const [orderLoader, setOrderLoader] = useState9(false);
10111
+ const [orderGuid, setOrderGuid] = useState9(ordGuid || null);
10112
+ const [partialAmount, setPartialAmount] = useState9("");
10113
+ const [partialError, setPartialError] = useState9("");
10114
+ const [remainingAmount, setRemainingAmount] = useState9("");
10115
+ const [paymentGateway, setPaymentGateway] = useState9();
10116
+ const [dcToken, setDCToken] = useState9();
10117
+ const [isBankConsentChecked, setIsBankConsentChecked] = useState9(false);
10118
+ const [errorBankConsent, setErrorBankConsent] = useState9("");
10119
+ const [errorBankConsentOther, setErrorBankConsentOther] = useState9("");
10120
+ const [isTokenizerReady, setTokenizerReady] = useState9(false);
10138
10121
  let mastercard2 = S3Url + "widget/mc-img.svg";
10139
10122
  let visa2 = S3Url + "widget/visa-img.svg";
10140
10123
  let americanexp2 = S3Url + "widget/ae-img.svg";
@@ -10162,7 +10145,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10162
10145
  const bankFeeAmount = Number(bankSurcharge || 0);
10163
10146
  const bankSavingsAmount = Math.max(bankFeeAmount > 0 ? cardFeeAmount - bankFeeAmount : cardFeeAmount, 0);
10164
10147
  const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
10165
- const tokenizerRef = useRef11(null);
10148
+ const tokenizerRef = useRef10(null);
10166
10149
  const fractalStyles = {
10167
10150
  input: {
10168
10151
  "font-family": "'Inter', sans-serif",
@@ -10235,7 +10218,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10235
10218
  let dataObj = __spreadValues({
10236
10219
  Token: data == null ? void 0 : data.Token,
10237
10220
  amount,
10238
- postal_code: data == null ? void 0 : data.postalCode
10221
+ postal_code: data == null ? void 0 : data.postalCode,
10222
+ require3ds
10239
10223
  }, saveCardInfo ? {
10240
10224
  card: {
10241
10225
  postal_code: cardData == null ? void 0 : cardData.zipCode,
@@ -10341,8 +10325,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10341
10325
  return Object.keys(errors).length > 0;
10342
10326
  };
10343
10327
  const completeFractalFlow = async (tokenizeData, intentid, typeoftoken) => {
10344
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
10328
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
10345
10329
  try {
10330
+ console.log({
10331
+ tokenizeData,
10332
+ intentid,
10333
+ typeoftoken
10334
+ });
10346
10335
  if (typeoftoken == "google_pay" || typeoftoken == "apple_pay") {
10347
10336
  handleCharge({
10348
10337
  Token: tokenizeData,
@@ -10350,39 +10339,28 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10350
10339
  typeoftoken
10351
10340
  });
10352
10341
  return;
10353
- }
10354
- let token = tokenizeData;
10355
- let verifyandsaveresp = await axios8.post(`${masterBaseUrl}api/v1/gateway/verify-and-save/${session_token}`, {
10356
- token,
10357
- require3ds,
10358
- pass_fee,
10359
- typeoftoken
10360
- });
10361
- if ((verifyandsaveresp == null ? void 0 : verifyandsaveresp.status) == 200) {
10362
- let responsetemp = (_a2 = verifyandsaveresp == null ? void 0 : verifyandsaveresp.data) == null ? void 0 : _a2.data;
10363
- let respData = {
10364
- Token: responsetemp.gateway_token,
10365
- Brand: responsetemp.card_data.brand,
10366
- ExpirationMonth: responsetemp.card_data.expire_mm,
10367
- ExpirationYear: responsetemp.card_data.expire_yy,
10368
- Last4: responsetemp.card_data.last4,
10369
- Bin: responsetemp.card_data.bin,
10370
- postalCode: cardData == null ? void 0 : cardData.zipCode,
10371
- stripe_3ds_auth_id: intentid
10372
- };
10342
+ } else {
10373
10343
  if (isPreAuth) {
10374
- handlePreAuth(respData);
10344
+ handlePreAuth(__spreadValues({
10345
+ Token: tokenizeData,
10346
+ postalCode: cardData == null ? void 0 : cardData.zipCode,
10347
+ typeoftoken: "token"
10348
+ }, intentid && { stripe_3ds_auth_id: intentid }));
10375
10349
  } else {
10376
- handleCharge(respData);
10350
+ handleCharge(__spreadValues({
10351
+ Token: tokenizeData,
10352
+ postalCode: cardData == null ? void 0 : cardData.zipCode,
10353
+ typeoftoken: "token"
10354
+ }, intentid && { stripe_3ds_auth_id: intentid }));
10377
10355
  }
10378
10356
  }
10379
10357
  } catch (error2) {
10380
10358
  console.log(error2, "error");
10381
- setError(((_c2 = (_b2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _b2.data) == null ? void 0 : _c2.message) || "Something went wrong!");
10359
+ setError(((_b2 = (_a2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || "Something went wrong!");
10382
10360
  callback({
10383
- error: ((_e2 = (_d2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _d2.data) == null ? void 0 : _e2.message) || "Something went wrong!",
10384
- result: (_g2 = (_f2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _f2.data) == null ? void 0 : _g2.result,
10385
- statusCode: (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.status
10361
+ error: ((_d2 = (_c2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || "Something went wrong!",
10362
+ result: (_f2 = (_e2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _e2.data) == null ? void 0 : _f2.result,
10363
+ statusCode: (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.status
10386
10364
  });
10387
10365
  hideLoader();
10388
10366
  }
@@ -10954,7 +10932,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10954
10932
  hideLoader();
10955
10933
  }
10956
10934
  } else {
10957
- setError("Please Select A Card/Bank");
10935
+ setErrorIframe("Please Select A Card/Bank");
10958
10936
  callback({
10959
10937
  error: "Please Select A Card/Bank"
10960
10938
  });
@@ -11027,13 +11005,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11027
11005
  setOrderLoader(false);
11028
11006
  }
11029
11007
  };
11030
- useEffect17(() => {
11008
+ useEffect15(() => {
11031
11009
  if (!show && !autoTrigger) {
11032
11010
  hasRunRef.current = false;
11033
11011
  cardListRunRef.current = false;
11034
11012
  }
11035
11013
  }, [show, autoTrigger]);
11036
- useEffect17(() => {
11014
+ useEffect15(() => {
11037
11015
  if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
11038
11016
  getPaymentDetails();
11039
11017
  if (isPartial && !partialRef) {
@@ -11041,7 +11019,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11041
11019
  }
11042
11020
  }
11043
11021
  }, [show, autoTrigger, isPartial, onLoad]);
11044
- useEffect17(() => {
11022
+ useEffect15(() => {
11045
11023
  if ((show || autoTrigger) && pass_fee_amount) {
11046
11024
  let cashdisc = Number(amount) - Number(pass_fee_amount);
11047
11025
  if (cashdisc && !isNaN(cashdisc)) {
@@ -11103,7 +11081,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11103
11081
  console.error("3DS Auth failed \u274C", status);
11104
11082
  setError(`3DS Authentication ${status}`);
11105
11083
  };
11106
- useEffect17(() => {
11084
+ useEffect15(() => {
11107
11085
  if (setHandleCloseRef) {
11108
11086
  setHandleCloseRef(() => handleClose);
11109
11087
  }
@@ -11121,18 +11099,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11121
11099
  setPartialError("");
11122
11100
  }
11123
11101
  };
11124
- useEffect17(() => {
11102
+ useEffect15(() => {
11125
11103
  if (typeof FractalTokenizer === "undefined") return;
11126
11104
  const tokenizer = new FractalTokenizer({
11127
11105
  styles: {}
11128
11106
  });
11129
11107
  }, []);
11130
- const stateRef = useRef11({
11108
+ const stateRef = useRef10({
11131
11109
  activeinBank,
11132
11110
  activeinCard,
11133
11111
  activetab
11134
11112
  });
11135
- useEffect17(() => {
11113
+ useEffect15(() => {
11136
11114
  stateRef.current = {
11137
11115
  activeinBank,
11138
11116
  activeinCard,
@@ -11156,7 +11134,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11156
11134
  }
11157
11135
  }
11158
11136
  }, []);
11159
- useEffect17(() => {
11137
+ useEffect15(() => {
11160
11138
  onSubmit == null ? void 0 : onSubmit(submit);
11161
11139
  }, [onSubmit, submit]);
11162
11140
  function detectCardType(cardinput) {
@@ -11182,34 +11160,48 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11182
11160
  const cardType = detectCardType(cardInput);
11183
11161
  switch (cardType) {
11184
11162
  case "visa":
11185
- return /* @__PURE__ */ jsx37("img", { src: visa2, alt: "visa", width: 33 });
11163
+ return /* @__PURE__ */ jsx36("img", { src: visa2, alt: "visa", width: 33 });
11186
11164
  case "mastercard":
11187
- return /* @__PURE__ */ jsx37("img", { src: mastercard2, width: 33, alt: "mastercard" });
11165
+ return /* @__PURE__ */ jsx36("img", { src: mastercard2, width: 33, alt: "mastercard" });
11188
11166
  case "amex":
11189
- return /* @__PURE__ */ jsx37("img", { src: americanexp2, alt: "amex", width: 33 });
11167
+ return /* @__PURE__ */ jsx36("img", { src: americanexp2, alt: "amex", width: 33 });
11190
11168
  case "discover":
11191
- return /* @__PURE__ */ jsx37("img", { src: discover2, width: 33, alt: "discover" });
11169
+ return /* @__PURE__ */ jsx36("img", { src: discover2, width: 33, alt: "discover" });
11192
11170
  case "diners":
11193
- return /* @__PURE__ */ jsx37("img", { src: dinersicon, alt: "Diners Club" });
11171
+ return /* @__PURE__ */ jsx36("img", { src: dinersicon, alt: "Diners Club" });
11194
11172
  case "jcb":
11195
- return /* @__PURE__ */ jsx37("img", { src: jcbicon, alt: "JCB" });
11173
+ return /* @__PURE__ */ jsx36("img", { src: jcbicon, alt: "JCB" });
11196
11174
  case "unionpay":
11197
- return /* @__PURE__ */ jsx37("img", { src: unionicon, alt: "UnionPay" });
11175
+ return /* @__PURE__ */ jsx36("img", { src: unionicon, alt: "UnionPay" });
11198
11176
  default:
11199
- return /* @__PURE__ */ jsx37("img", { src: defualtcardborder, alt: "card" });
11177
+ return /* @__PURE__ */ jsx36("img", { src: defualtcardborder, alt: "card" });
11200
11178
  }
11201
11179
  }
11202
- return /* @__PURE__ */ jsxs20(Fragment19, { children: [
11203
- (initialLoader || !onLoad) && /* @__PURE__ */ jsx37(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
11204
- error && /* @__PURE__ */ jsx37("div", { children: /* @__PURE__ */ jsx37(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
11205
- errorIframe && /* @__PURE__ */ jsx37("div", { children: /* @__PURE__ */ jsx37(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
11180
+ return /* @__PURE__ */ jsxs19(Fragment18, { children: [
11181
+ (initialLoader || !onLoad) && /* @__PURE__ */ jsx36(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
11182
+ paymentGateway == 32 && /* @__PURE__ */ jsx36(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
11183
+ paymentGateway == 31 && /* @__PURE__ */ jsx36(
11184
+ DataCapScriptLoader,
11185
+ {
11186
+ onReady: () => {
11187
+ console.log("SDK Ready");
11188
+ },
11189
+ onError: (err) => {
11190
+ setLoading(false);
11191
+ setLoadingIframe(false);
11192
+ setError(DcLoadingError);
11193
+ }
11194
+ }
11195
+ ),
11196
+ error && /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
11197
+ errorIframe && /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
11206
11198
  setErrorIframe("");
11207
11199
  }, autoTrigger: onSubmit ? !onSubmit : autoTrigger }) }),
11208
- /* @__PURE__ */ jsxs20(Fragment19, { children: [
11209
- (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx37(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
11210
- /* @__PURE__ */ jsxs20("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
11211
- /* @__PURE__ */ jsx37("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
11212
- (stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx37(
11200
+ /* @__PURE__ */ jsxs19(Fragment18, { children: [
11201
+ (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx36(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
11202
+ /* @__PURE__ */ jsxs19("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
11203
+ /* @__PURE__ */ jsx36("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
11204
+ (stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx36(
11213
11205
  ThreeDSChallenge,
11214
11206
  {
11215
11207
  containerRef: threeDSContainerRef,
@@ -11219,33 +11211,33 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11219
11211
  onSuccess: handleSuccess,
11220
11212
  onError: handleError
11221
11213
  }
11222
- ) : /* @__PURE__ */ jsxs20("div", { className: "parent-pay-container", children: [
11223
- /* @__PURE__ */ jsx37("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs20("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
11224
- /* @__PURE__ */ jsx37("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx37("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" }) }),
11225
- /* @__PURE__ */ jsx37("defs", { children: /* @__PURE__ */ jsx37("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx37("rect", { width: "16", height: "16", fill: "white" }) }) })
11214
+ ) : /* @__PURE__ */ jsxs19("div", { className: "parent-pay-container", children: [
11215
+ /* @__PURE__ */ jsx36("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs19("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
11216
+ /* @__PURE__ */ jsx36("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx36("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" }) }),
11217
+ /* @__PURE__ */ jsx36("defs", { children: /* @__PURE__ */ jsx36("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx36("rect", { width: "16", height: "16", fill: "white" }) }) })
11226
11218
  ] }) }),
11227
- /* @__PURE__ */ jsx37("div", { className: "pay-main-logo-res" }),
11228
- /* @__PURE__ */ jsxs20("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
11229
- !onSubmit && /* @__PURE__ */ jsxs20("div", { className: "pay-header pay-conatiner-one", children: [
11230
- /* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-first", children: [
11231
- /* @__PURE__ */ jsxs20("div", { className: "pay-logo-container", children: [
11232
- /* @__PURE__ */ jsx37("div", { className: "pay-main-logo" }),
11233
- /* @__PURE__ */ jsx37("h1", { className: "pay-heading", children: "Pay" }),
11234
- (cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs20("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
11219
+ /* @__PURE__ */ jsx36("div", { className: "pay-main-logo-res" }),
11220
+ /* @__PURE__ */ jsxs19("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
11221
+ !onSubmit && /* @__PURE__ */ jsxs19("div", { className: "pay-header pay-conatiner-one", children: [
11222
+ /* @__PURE__ */ jsxs19("div", { className: "pay-conatiner-one-first", children: [
11223
+ /* @__PURE__ */ jsxs19("div", { className: "pay-logo-container", children: [
11224
+ /* @__PURE__ */ jsx36("div", { className: "pay-main-logo" }),
11225
+ /* @__PURE__ */ jsx36("h1", { className: "pay-heading", children: "Pay" }),
11226
+ (cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs19("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
11235
11227
  " ",
11236
- /* @__PURE__ */ jsx37(IoArrowBack2, {}),
11228
+ /* @__PURE__ */ jsx36(IoArrowBack2, {}),
11237
11229
  " Back"
11238
11230
  ] })
11239
11231
  ] }),
11240
- /* @__PURE__ */ jsx37("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
11241
- /* @__PURE__ */ jsx37("small", { className: "pay-payment-amount", children: "Select payment type" }),
11242
- /* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
11243
- /* @__PURE__ */ jsx37(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
11244
- !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx37(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
11232
+ /* @__PURE__ */ jsx36("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs19("div", { className: "pay-amount-conatiner", children: [
11233
+ /* @__PURE__ */ jsx36("small", { className: "pay-payment-amount", children: "Select payment type" }),
11234
+ /* @__PURE__ */ jsxs19("div", { className: "frac-card-bank-radio-main", children: [
11235
+ /* @__PURE__ */ jsx36(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
11236
+ !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx36(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
11245
11237
  ] }),
11246
- isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
11247
- /* @__PURE__ */ jsx37("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
11248
- /* @__PURE__ */ jsx37(
11238
+ isPartial && /* @__PURE__ */ jsxs19("div", { className: "frac-partial-payment-input", children: [
11239
+ /* @__PURE__ */ jsx36("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
11240
+ /* @__PURE__ */ jsx36(
11249
11241
  NumericFormat2,
11250
11242
  {
11251
11243
  prefix: "$",
@@ -11269,25 +11261,25 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11269
11261
  }
11270
11262
  }
11271
11263
  ),
11272
- partialError && /* @__PURE__ */ jsx37("span", { className: "error-span", children: partialError })
11264
+ partialError && /* @__PURE__ */ jsx36("span", { className: "error-span", children: partialError })
11273
11265
  ] })
11274
11266
  ] }) })
11275
11267
  ] }),
11276
- /* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-last", children: [
11277
- /* @__PURE__ */ jsx37("img", { src: secure2, alt: "" }),
11278
- /* @__PURE__ */ jsx37("img", { src: pov2, alt: "" }),
11268
+ /* @__PURE__ */ jsxs19("div", { className: "pay-conatiner-one-last", children: [
11269
+ /* @__PURE__ */ jsx36("img", { src: secure2, alt: "" }),
11270
+ /* @__PURE__ */ jsx36("img", { src: pov2, alt: "" }),
11279
11271
  "Secure payments powered by Fractal"
11280
11272
  ] })
11281
11273
  ] }),
11282
- /* @__PURE__ */ jsx37("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx37("div", { className: "col-md-12", children: /* @__PURE__ */ jsxs20("div", { id: "payment-form-div ", className: onSubmit ? "frac-payment-form-div" : "", children: [
11283
- onSubmit && /* @__PURE__ */ jsx37("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
11284
- /* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
11285
- /* @__PURE__ */ jsx37(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
11286
- !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx37(CardBankRadio, { skydesign: true, label: "Bank", amount: (_d = Number(bankAmount)) == null ? void 0 : _d.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
11274
+ /* @__PURE__ */ jsx36("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx36("div", { className: "col-md-12", children: /* @__PURE__ */ jsxs19("div", { id: "payment-form-div ", className: onSubmit ? "frac-payment-form-div" : "", children: [
11275
+ onSubmit && /* @__PURE__ */ jsx36("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs19("div", { className: "pay-amount-conatiner", children: [
11276
+ /* @__PURE__ */ jsxs19("div", { className: "frac-card-bank-radio-main", children: [
11277
+ /* @__PURE__ */ jsx36(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
11278
+ !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx36(CardBankRadio, { skydesign: true, label: "Bank", amount: (_d = Number(bankAmount)) == null ? void 0 : _d.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
11287
11279
  ] }),
11288
- isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
11289
- /* @__PURE__ */ jsx37("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
11290
- /* @__PURE__ */ jsx37(
11280
+ isPartial && /* @__PURE__ */ jsxs19("div", { className: "frac-partial-payment-input", children: [
11281
+ /* @__PURE__ */ jsx36("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
11282
+ /* @__PURE__ */ jsx36(
11291
11283
  NumericFormat2,
11292
11284
  {
11293
11285
  prefix: "$",
@@ -11304,34 +11296,34 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11304
11296
  fixedDecimalScale: true
11305
11297
  }
11306
11298
  ),
11307
- partialError && /* @__PURE__ */ jsx37("span", { className: "error-span", children: partialError })
11299
+ partialError && /* @__PURE__ */ jsx36("span", { className: "error-span", children: partialError })
11308
11300
  ] })
11309
11301
  ] }) }),
11310
- is3DSEnable ? clientSecret && /* @__PURE__ */ jsx37(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs20(Fragment19, { children: [
11311
- /* @__PURE__ */ jsxs20("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
11312
- !onSubmit && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11313
- /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
11314
- /* @__PURE__ */ jsx37("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs20("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
11302
+ is3DSEnable ? clientSecret && /* @__PURE__ */ jsx36(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs19(Fragment18, { children: [
11303
+ /* @__PURE__ */ jsxs19("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
11304
+ !onSubmit && /* @__PURE__ */ jsxs19(Fragment18, { children: [
11305
+ /* @__PURE__ */ jsxs19("div", { className: "frac-heading-card-wrap", children: [
11306
+ /* @__PURE__ */ jsx36("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs19("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
11315
11307
  " ",
11316
- /* @__PURE__ */ jsx37(IoArrowBack2, {})
11308
+ /* @__PURE__ */ jsx36(IoArrowBack2, {})
11317
11309
  ] }) }),
11318
- /* @__PURE__ */ jsx37("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
11310
+ /* @__PURE__ */ jsx36("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
11319
11311
  ] }),
11320
- /* @__PURE__ */ jsxs20("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
11321
- /* @__PURE__ */ jsx37("img", { src: visa2, alt: "", width: 33 }),
11322
- /* @__PURE__ */ jsx37("img", { src: mastercard2, width: 33, alt: "" }),
11323
- /* @__PURE__ */ jsx37("img", { src: americanexp2, alt: "", width: 33 }),
11324
- /* @__PURE__ */ jsx37("img", { src: discover2, width: 33, alt: "" })
11312
+ /* @__PURE__ */ jsxs19("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
11313
+ /* @__PURE__ */ jsx36("img", { src: visa2, alt: "", width: 33 }),
11314
+ /* @__PURE__ */ jsx36("img", { src: mastercard2, width: 33, alt: "" }),
11315
+ /* @__PURE__ */ jsx36("img", { src: americanexp2, alt: "", width: 33 }),
11316
+ /* @__PURE__ */ jsx36("img", { src: discover2, width: 33, alt: "" })
11325
11317
  ] })
11326
11318
  ] }),
11327
- activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
11328
- /* @__PURE__ */ jsx37(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
11319
+ activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
11320
+ /* @__PURE__ */ jsx36(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
11329
11321
  setActiveinCard("form");
11330
11322
  } }),
11331
- /* @__PURE__ */ jsx37("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx37("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)) }) })
11332
- ] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
11333
- onSubmit && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11334
- /* @__PURE__ */ jsx37(
11323
+ /* @__PURE__ */ jsx36("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx36("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)) }) })
11324
+ ] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
11325
+ onSubmit && /* @__PURE__ */ jsxs19(Fragment18, { children: [
11326
+ /* @__PURE__ */ jsx36(
11335
11327
  ApplePayButton,
11336
11328
  {
11337
11329
  applePayAmount: partialAmount ? partialAmount : amount,
@@ -11341,40 +11333,28 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11341
11333
  showLoader
11342
11334
  }
11343
11335
  ),
11344
- /* @__PURE__ */ jsx37(
11345
- GooglePayComponent,
11346
- {
11347
- amount: partialAmount ? partialAmount : amount,
11348
- googlePayEnvironment,
11349
- googlePayGatewayMerchantId,
11350
- googlePayMerchantId,
11351
- googlePayMerchantName: merchantName,
11352
- completeFractalFlow,
11353
- setLoading
11354
- }
11355
- ),
11356
- /* @__PURE__ */ jsx37("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx37("span", { children: "or" }) })
11336
+ /* @__PURE__ */ jsx36("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx36("span", { children: "or" }) })
11357
11337
  ] }),
11358
- /* @__PURE__ */ jsxs20("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11338
+ /* @__PURE__ */ jsxs19("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11359
11339
  if (e.key === "Enter" && loading) {
11360
11340
  e.preventDefault();
11361
11341
  e.stopPropagation();
11362
11342
  }
11363
11343
  }, children: [
11364
- /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11365
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11366
- /* @__PURE__ */ jsx37("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11367
- /* @__PURE__ */ jsx37("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11344
+ /* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11345
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11346
+ /* @__PURE__ */ jsx36("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11347
+ /* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11368
11348
  const value = e.target.value;
11369
11349
  if (/^[a-zA-Z\s]*$/.test(value)) {
11370
11350
  handleCardChange("cardName", value);
11371
11351
  }
11372
11352
  } }),
11373
- (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11353
+ (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11374
11354
  ] }),
11375
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11376
- /* @__PURE__ */ jsx37("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
11377
- /* @__PURE__ */ jsx37("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx37(
11355
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11356
+ /* @__PURE__ */ jsx36("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
11357
+ /* @__PURE__ */ jsx36("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && isTokenizerReady && /* @__PURE__ */ jsx36(
11378
11358
  FractalFields_default,
11379
11359
  {
11380
11360
  fractalStyles,
@@ -11383,18 +11363,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11383
11363
  }
11384
11364
  ) })
11385
11365
  ] }),
11386
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11387
- /* @__PURE__ */ jsx37("label", { htmlFor: "zip", children: "ZIP" }),
11388
- /* @__PURE__ */ jsx37("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) }),
11389
- (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11390
- pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
11366
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11367
+ /* @__PURE__ */ jsx36("label", { htmlFor: "zip", children: "ZIP" }),
11368
+ /* @__PURE__ */ jsx36("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) }),
11369
+ (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11370
+ pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs19("small", { className: "frac-fee-text", children: [
11391
11371
  "Cards include a fee amount of ",
11392
- /* @__PURE__ */ jsx37("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11372
+ /* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11393
11373
  "."
11394
11374
  ] })
11395
11375
  ] }),
11396
- customerId && /* @__PURE__ */ jsx37("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11397
- /* @__PURE__ */ jsx37(
11376
+ customerId && /* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11377
+ /* @__PURE__ */ jsx36(
11398
11378
  "input",
11399
11379
  {
11400
11380
  type: "checkbox",
@@ -11404,10 +11384,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11404
11384
  onChange: (e) => setSaveCardInfo(e.target.checked)
11405
11385
  }
11406
11386
  ),
11407
- /* @__PURE__ */ jsx37("label", { htmlFor: "save_card", className: "toggle-label" }),
11408
- /* @__PURE__ */ jsx37("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11409
- /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
11410
- /* @__PURE__ */ jsx37("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
11387
+ /* @__PURE__ */ jsx36("label", { htmlFor: "save_card", className: "toggle-label" }),
11388
+ /* @__PURE__ */ jsx36("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11389
+ /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
11390
+ /* @__PURE__ */ jsx36("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
11411
11391
  "svg",
11412
11392
  {
11413
11393
  xmlns: "http://www.w3.org/2000/svg",
@@ -11416,8 +11396,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11416
11396
  viewBox: "0 0 20 20",
11417
11397
  fill: "none",
11418
11398
  children: [
11419
- /* @__PURE__ */ jsx37("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11420
- /* @__PURE__ */ jsx37(
11399
+ /* @__PURE__ */ jsx36("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11400
+ /* @__PURE__ */ jsx36(
11421
11401
  "path",
11422
11402
  {
11423
11403
  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",
@@ -11427,55 +11407,55 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11427
11407
  ]
11428
11408
  }
11429
11409
  ) }),
11430
- /* @__PURE__ */ jsx37("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
11410
+ /* @__PURE__ */ jsx36("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
11431
11411
  "If checked, I agree to give the ",
11432
- /* @__PURE__ */ jsx37("b", { children: merchantName || "merchant" }),
11412
+ /* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
11433
11413
  " permission to charge this credit card for agreed-upon purchases in the future."
11434
11414
  ] }) })
11435
11415
  ] })
11436
11416
  ] }) })
11437
11417
  ] }),
11438
- /* @__PURE__ */ jsx37("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx37("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)) }) })
11418
+ /* @__PURE__ */ jsx36("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx36("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)) }) })
11439
11419
  ] })
11440
- ] }) : /* @__PURE__ */ jsxs20("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11420
+ ] }) : /* @__PURE__ */ jsxs19("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11441
11421
  if (e.key === "Enter" && loading) {
11442
11422
  e.preventDefault();
11443
11423
  e.stopPropagation();
11444
11424
  }
11445
11425
  }, children: [
11446
- /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11447
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11448
- /* @__PURE__ */ jsx37("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11449
- /* @__PURE__ */ jsx37("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11426
+ /* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11427
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11428
+ /* @__PURE__ */ jsx36("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11429
+ /* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11450
11430
  const value = e.target.value;
11451
11431
  if (/^[a-zA-Z\s]*$/.test(value)) {
11452
11432
  handleCardChange("cardName", value);
11453
11433
  }
11454
11434
  } }),
11455
- (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11435
+ (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11456
11436
  ] }),
11457
- /* @__PURE__ */ jsx37("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx37(
11437
+ /* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx36(
11458
11438
  DataCapFields,
11459
11439
  {
11460
11440
  isOpen: show || autoTrigger,
11461
11441
  tokenKey: dcToken,
11462
11442
  setLoader: activeinCard === "form" ? setLoadingIframe : null,
11463
11443
  isEmbedded: onSubmit ? true : false,
11464
- customCSS: customCSS2
11444
+ customCSS
11465
11445
  }
11466
11446
  ) }),
11467
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11468
- /* @__PURE__ */ jsx37("label", { htmlFor: "zip", children: "ZIP" }),
11469
- /* @__PURE__ */ jsx37("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) }),
11470
- (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11471
- pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
11447
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11448
+ /* @__PURE__ */ jsx36("label", { htmlFor: "zip", children: "ZIP" }),
11449
+ /* @__PURE__ */ jsx36("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) }),
11450
+ (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11451
+ pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs19("small", { className: "frac-fee-text", children: [
11472
11452
  "Cards include a fee amount of ",
11473
- /* @__PURE__ */ jsx37("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11453
+ /* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11474
11454
  "."
11475
11455
  ] })
11476
11456
  ] }),
11477
- customerId && /* @__PURE__ */ jsx37("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11478
- /* @__PURE__ */ jsx37(
11457
+ customerId && /* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11458
+ /* @__PURE__ */ jsx36(
11479
11459
  "input",
11480
11460
  {
11481
11461
  type: "checkbox",
@@ -11485,10 +11465,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11485
11465
  onChange: (e) => setSaveCardInfo(e.target.checked)
11486
11466
  }
11487
11467
  ),
11488
- /* @__PURE__ */ jsx37("label", { htmlFor: "save_card", className: "toggle-label" }),
11489
- /* @__PURE__ */ jsx37("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11490
- /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
11491
- /* @__PURE__ */ jsx37("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
11468
+ /* @__PURE__ */ jsx36("label", { htmlFor: "save_card", className: "toggle-label" }),
11469
+ /* @__PURE__ */ jsx36("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11470
+ /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
11471
+ /* @__PURE__ */ jsx36("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
11492
11472
  "svg",
11493
11473
  {
11494
11474
  xmlns: "http://www.w3.org/2000/svg",
@@ -11497,8 +11477,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11497
11477
  viewBox: "0 0 20 20",
11498
11478
  fill: "none",
11499
11479
  children: [
11500
- /* @__PURE__ */ jsx37("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11501
- /* @__PURE__ */ jsx37(
11480
+ /* @__PURE__ */ jsx36("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11481
+ /* @__PURE__ */ jsx36(
11502
11482
  "path",
11503
11483
  {
11504
11484
  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",
@@ -11508,48 +11488,48 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11508
11488
  ]
11509
11489
  }
11510
11490
  ) }),
11511
- /* @__PURE__ */ jsx37("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
11491
+ /* @__PURE__ */ jsx36("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
11512
11492
  "If checked, I agree to give the ",
11513
- /* @__PURE__ */ jsx37("b", { children: merchantName || "merchant" }),
11493
+ /* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
11514
11494
  " permission to charge this credit card for agreed-upon purchases in the future."
11515
11495
  ] }) })
11516
11496
  ] })
11517
11497
  ] }) })
11518
11498
  ] }),
11519
- /* @__PURE__ */ jsx37("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx37("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)) }) })
11499
+ /* @__PURE__ */ jsx36("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx36("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)) }) })
11520
11500
  ] })
11521
11501
  ] }),
11522
- /* @__PURE__ */ jsx37("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs20(Fragment19, { children: [
11523
- !onSubmit && /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
11524
- /* @__PURE__ */ jsx37("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs20("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
11502
+ /* @__PURE__ */ jsx36("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs19(Fragment18, { children: [
11503
+ !onSubmit && /* @__PURE__ */ jsxs19("div", { className: "frac-heading-card-wrap", children: [
11504
+ /* @__PURE__ */ jsx36("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs19("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
11525
11505
  " ",
11526
- /* @__PURE__ */ jsx37(IoArrowBack2, {})
11506
+ /* @__PURE__ */ jsx36(IoArrowBack2, {})
11527
11507
  ] }) }),
11528
- /* @__PURE__ */ jsx37("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
11508
+ /* @__PURE__ */ jsx36("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
11529
11509
  ] }),
11530
- activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
11531
- /* @__PURE__ */ jsx37(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
11510
+ activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
11511
+ /* @__PURE__ */ jsx36(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
11532
11512
  setActiveinBank("form");
11533
11513
  } }),
11534
- /* @__PURE__ */ jsx37("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx37("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_m = Number(bankAmount)) == null ? void 0 : _m.toFixed(2)) }) })
11535
- ] }) : /* @__PURE__ */ jsxs20("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
11514
+ /* @__PURE__ */ jsx36("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx36("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_m = Number(bankAmount)) == null ? void 0 : _m.toFixed(2)) }) })
11515
+ ] }) : /* @__PURE__ */ jsxs19("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
11536
11516
  if (e.key === "Enter" && loading) {
11537
11517
  e.preventDefault();
11538
11518
  e.stopPropagation();
11539
11519
  }
11540
11520
  }, children: [
11541
- /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: {
11521
+ /* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: {
11542
11522
  minHeight: "444px",
11543
11523
  maxHeight: "444px"
11544
11524
  }, children: [
11545
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11546
- /* @__PURE__ */ jsx37("label", { htmlFor: "nameonaccount", children: "Name on account" }),
11547
- /* @__PURE__ */ jsx37("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 }),
11548
- (achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
11525
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11526
+ /* @__PURE__ */ jsx36("label", { htmlFor: "nameonaccount", children: "Name on account" }),
11527
+ /* @__PURE__ */ jsx36("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 }),
11528
+ (achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
11549
11529
  ] }),
11550
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11551
- /* @__PURE__ */ jsx37("label", { htmlFor: "routingnumber", children: "Routing number" }),
11552
- /* @__PURE__ */ jsx37(
11530
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11531
+ /* @__PURE__ */ jsx36("label", { htmlFor: "routingnumber", children: "Routing number" }),
11532
+ /* @__PURE__ */ jsx36(
11553
11533
  "input",
11554
11534
  {
11555
11535
  type: "text",
@@ -11562,11 +11542,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11562
11542
  onChange: handleChangeAch
11563
11543
  }
11564
11544
  ),
11565
- (achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
11545
+ (achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
11566
11546
  ] }),
11567
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11568
- /* @__PURE__ */ jsx37("label", { htmlFor: "accountnumber", children: "Account number" }),
11569
- /* @__PURE__ */ jsx37(
11547
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11548
+ /* @__PURE__ */ jsx36("label", { htmlFor: "accountnumber", children: "Account number" }),
11549
+ /* @__PURE__ */ jsx36(
11570
11550
  "input",
11571
11551
  {
11572
11552
  type: "text",
@@ -11579,11 +11559,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11579
11559
  onChange: handleChangeAch
11580
11560
  }
11581
11561
  ),
11582
- (achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
11562
+ (achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
11583
11563
  ] }),
11584
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11585
- /* @__PURE__ */ jsx37("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
11586
- /* @__PURE__ */ jsx37(
11564
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11565
+ /* @__PURE__ */ jsx36("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
11566
+ /* @__PURE__ */ jsx36(
11587
11567
  "input",
11588
11568
  {
11589
11569
  type: "text",
@@ -11596,11 +11576,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11596
11576
  onChange: handleChangeAch
11597
11577
  }
11598
11578
  ),
11599
- (achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
11579
+ (achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
11600
11580
  ] }),
11601
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11602
- /* @__PURE__ */ jsx37("label", { htmlFor: "bankname", children: "Bank name" }),
11603
- /* @__PURE__ */ jsx37(
11581
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11582
+ /* @__PURE__ */ jsx36("label", { htmlFor: "bankname", children: "Bank name" }),
11583
+ /* @__PURE__ */ jsx36(
11604
11584
  "input",
11605
11585
  {
11606
11586
  type: "text",
@@ -11613,11 +11593,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11613
11593
  onChange: handleChangeAch
11614
11594
  }
11615
11595
  ),
11616
- (achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
11596
+ (achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
11617
11597
  ] }),
11618
- ((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11619
- /* @__PURE__ */ jsx37("label", { htmlFor: "companyName", children: "Company name" }),
11620
- /* @__PURE__ */ jsx37(
11598
+ ((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11599
+ /* @__PURE__ */ jsx36("label", { htmlFor: "companyName", children: "Company name" }),
11600
+ /* @__PURE__ */ jsx36(
11621
11601
  "input",
11622
11602
  {
11623
11603
  type: "text",
@@ -11630,60 +11610,60 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11630
11610
  onChange: handleChangeAch
11631
11611
  }
11632
11612
  ),
11633
- (achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
11613
+ (achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
11634
11614
  ] }),
11635
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11636
- /* @__PURE__ */ jsx37("label", { htmlFor: "accounttype", children: "Select account type" }),
11637
- /* @__PURE__ */ jsxs20("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
11638
- /* @__PURE__ */ jsx37("option", { value: "", children: "Select account" }),
11639
- accountTypes.map((type) => /* @__PURE__ */ jsx37("option", { value: type.value, children: type.label }, type.value))
11615
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11616
+ /* @__PURE__ */ jsx36("label", { htmlFor: "accounttype", children: "Select account type" }),
11617
+ /* @__PURE__ */ jsxs19("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
11618
+ /* @__PURE__ */ jsx36("option", { value: "", children: "Select account" }),
11619
+ accountTypes.map((type) => /* @__PURE__ */ jsx36("option", { value: type.value, children: type.label }, type.value))
11640
11620
  ] }),
11641
- bankFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
11621
+ bankFeeAmount > 0 && /* @__PURE__ */ jsxs19("small", { className: "frac-fee-text", children: [
11642
11622
  "There is a processing fee of ",
11643
- /* @__PURE__ */ jsx37("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
11623
+ /* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
11644
11624
  "."
11645
11625
  ] }),
11646
- !saveACHinfo && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11647
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11648
- /* @__PURE__ */ jsx37("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
11626
+ !saveACHinfo && /* @__PURE__ */ jsxs19(Fragment18, { children: [
11627
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11628
+ /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
11649
11629
  setIsBankConsentChecked(e.target.checked);
11650
11630
  if (e.target.checked) {
11651
11631
  setErrorBankConsent("");
11652
11632
  }
11653
11633
  } }),
11654
- /* @__PURE__ */ jsx37("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.` })
11634
+ /* @__PURE__ */ jsx36("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.` })
11655
11635
  ] }),
11656
- errorBankConsent && /* @__PURE__ */ jsx37("span", { className: "error-span", children: errorBankConsent })
11636
+ errorBankConsent && /* @__PURE__ */ jsx36("span", { className: "error-span", children: errorBankConsent })
11657
11637
  ] }),
11658
- customerId && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11659
- /* @__PURE__ */ jsx37("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
11638
+ customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11639
+ /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
11660
11640
  setSaveACHinfo(e.target.checked);
11661
11641
  if (!e.target.checked) {
11662
11642
  setSaveACHConsent1(false);
11663
11643
  setErrorBankConsentOther("");
11664
11644
  }
11665
11645
  } }),
11666
- /* @__PURE__ */ jsx37("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save for future use" })
11646
+ /* @__PURE__ */ jsx36("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save for future use" })
11667
11647
  ] }),
11668
- saveACHinfo && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11669
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11670
- /* @__PURE__ */ jsx37("input", { type: "checkbox", id: "saveACHConsent1", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHConsent1, onChange: (e) => {
11648
+ saveACHinfo && /* @__PURE__ */ jsxs19(Fragment18, { children: [
11649
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11650
+ /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "saveACHConsent1", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHConsent1, onChange: (e) => {
11671
11651
  setSaveACHConsent1(e.target.checked);
11672
11652
  if (e.target.checked) {
11673
11653
  setErrorBankConsentOther("");
11674
11654
  }
11675
11655
  } }),
11676
- /* @__PURE__ */ jsxs20("label", { className: "saveachlabel", htmlFor: "saveACHConsent1", children: [
11656
+ /* @__PURE__ */ jsxs19("label", { className: "saveachlabel", htmlFor: "saveACHConsent1", children: [
11677
11657
  "By providing my bank account information and selecting \u2018Save for future payments\u2019, I authorize ",
11678
11658
  merchantName || "merchant",
11679
11659
  " 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."
11680
11660
  ] })
11681
11661
  ] }),
11682
- errorBankConsentOther && /* @__PURE__ */ jsx37("span", { className: "error-span", children: errorBankConsentOther })
11662
+ errorBankConsentOther && /* @__PURE__ */ jsx36("span", { className: "error-span", children: errorBankConsentOther })
11683
11663
  ] })
11684
11664
  ] })
11685
11665
  ] }),
11686
- /* @__PURE__ */ jsx37("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx37("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)) }) })
11666
+ /* @__PURE__ */ jsx36("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx36("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)) }) })
11687
11667
  ] })
11688
11668
  ] }) })
11689
11669
  ] })
@@ -11698,7 +11678,7 @@ var ModelContentSky_default = ModelContentSky;
11698
11678
 
11699
11679
  // src/app/components/Skysystemz/PayButtonWithForm.tsx
11700
11680
  import axios9 from "axios";
11701
- import { Fragment as Fragment20, jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
11681
+ import { Fragment as Fragment19, jsx as jsx37, jsxs as jsxs20 } from "react/jsx-runtime";
11702
11682
  var PaymentWidget = ({
11703
11683
  amount,
11704
11684
  bankAmount,
@@ -11719,15 +11699,15 @@ var PaymentWidget = ({
11719
11699
  isPartial,
11720
11700
  bankSurcharge,
11721
11701
  partialRef,
11722
- customCSS: customCSS2,
11702
+ customCSS,
11723
11703
  disableSubmitBtn = false
11724
11704
  }) => {
11725
- const [show, setShow] = useState11(autoTrigger || false);
11726
- const [loading, setLoading] = useState11(false);
11727
- const [childHandleClose, setChildHandleClose] = useState11(() => () => {
11705
+ const [show, setShow] = useState10(autoTrigger || false);
11706
+ const [loading, setLoading] = useState10(false);
11707
+ const [childHandleClose, setChildHandleClose] = useState10(() => () => {
11728
11708
  });
11729
- const [orderGuid, setOrderGuid] = useState11(null);
11730
- const [remainingAmount, setRemainingAmount] = useState11(null);
11709
+ const [orderGuid, setOrderGuid] = useState10(null);
11710
+ const [remainingAmount, setRemainingAmount] = useState10(null);
11731
11711
  const initialCommonProps = useMemo(
11732
11712
  () => ({
11733
11713
  amount,
@@ -11751,7 +11731,7 @@ var PaymentWidget = ({
11751
11731
  isPartial,
11752
11732
  bankSurcharge,
11753
11733
  partialRef,
11754
- customCSS: customCSS2,
11734
+ customCSS,
11755
11735
  disableSubmitBtn
11756
11736
  }),
11757
11737
  [
@@ -11777,8 +11757,8 @@ var PaymentWidget = ({
11777
11757
  disableSubmitBtn
11778
11758
  ]
11779
11759
  );
11780
- const [commonProps, setCommonProps] = useState11(initialCommonProps);
11781
- useEffect18(() => {
11760
+ const [commonProps, setCommonProps] = useState10(initialCommonProps);
11761
+ useEffect16(() => {
11782
11762
  if (show) {
11783
11763
  setCommonProps(initialCommonProps);
11784
11764
  }
@@ -11809,35 +11789,33 @@ var PaymentWidget = ({
11809
11789
  setLoading(false);
11810
11790
  }
11811
11791
  };
11812
- useEffect18(() => {
11792
+ useEffect16(() => {
11813
11793
  if (show && isPartial && partialRef) {
11814
11794
  getskyosOrderDetails();
11815
11795
  }
11816
11796
  }, [show, isPartial, partialRef]);
11817
- return /* @__PURE__ */ jsxs21(Fragment20, { children: [
11818
- /* @__PURE__ */ jsx38("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
11819
- /* @__PURE__ */ jsx38(DataScript, {}),
11820
- /* @__PURE__ */ jsx38(FractalTokenizerScript, {}),
11821
- /* @__PURE__ */ jsx38(SkyChargewidgetstyles, {}),
11822
- /* @__PURE__ */ jsx38(CardBankRadioStyles, {}),
11823
- /* @__PURE__ */ jsx38(CustomModal2styles_default, {}),
11824
- /* @__PURE__ */ jsx38(DataCapScriptLoader, {}),
11825
- !autoTrigger && /* @__PURE__ */ jsxs21("button", { className: submitBtnClass || "paymentBtn", disabled: disableSubmitBtn, onClick: () => setShow(true), children: [
11797
+ return /* @__PURE__ */ jsxs20(Fragment19, { children: [
11798
+ /* @__PURE__ */ jsx37("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
11799
+ /* @__PURE__ */ jsx37(DataScript, {}),
11800
+ /* @__PURE__ */ jsx37(SkyChargewidgetstyles, {}),
11801
+ /* @__PURE__ */ jsx37(CardBankRadioStyles, {}),
11802
+ /* @__PURE__ */ jsx37(CustomModal2styles_default, {}),
11803
+ !autoTrigger && /* @__PURE__ */ jsxs20("button", { className: submitBtnClass || "paymentBtn", disabled: disableSubmitBtn, onClick: () => setShow(true), children: [
11826
11804
  submitBtnText,
11827
11805
  submitBtnIcon
11828
11806
  ] }),
11829
- !autoTrigger ? /* @__PURE__ */ jsx38(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx38(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx38(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
11807
+ !autoTrigger ? /* @__PURE__ */ jsx37(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx37(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx37(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
11830
11808
  ] });
11831
11809
  };
11832
11810
 
11833
11811
  // src/app/components/Skysystemz/EmbeddedCheckout.tsx
11834
- import { useEffect as useEffect20, useState as useState12, useMemo as useMemo2 } from "react";
11812
+ import { useEffect as useEffect18, useState as useState11, useMemo as useMemo2 } from "react";
11835
11813
  import axios10 from "axios";
11836
11814
 
11837
11815
  // src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
11838
- import { jsx as jsx39 } from "react/jsx-runtime";
11816
+ import { jsx as jsx38 } from "react/jsx-runtime";
11839
11817
  function EmbeddedCheckoutStyles({ extraCustomCSS }) {
11840
- return /* @__PURE__ */ jsx39("style", { children: `
11818
+ return /* @__PURE__ */ jsx38("style", { children: `
11841
11819
 
11842
11820
  .pay-amount-conatiner{
11843
11821
  margin-top: 20px !important;
@@ -12183,27 +12161,27 @@ padding:0px !important;
12183
12161
  }
12184
12162
 
12185
12163
  // src/app/components/Atoms/Applepay/ApplePayScriptLoader.tsx
12186
- import { useEffect as useEffect19 } from "react";
12164
+ import { useEffect as useEffect17 } from "react";
12187
12165
  var applePayScriptLoaded = false;
12188
12166
  var ApplePayScriptLoader = () => {
12189
- useEffect19(() => {
12167
+ useEffect17(() => {
12190
12168
  if (applePayScriptLoaded) return;
12191
12169
  const existingScript = document.querySelector(
12192
12170
  `script[src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"]`
12193
12171
  );
12194
12172
  if (!existingScript) {
12195
- const script2 = document.createElement("script");
12196
- script2.src = "https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js";
12197
- script2.async = true;
12198
- script2.onload = () => {
12173
+ const script = document.createElement("script");
12174
+ script.src = "https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js";
12175
+ script.async = true;
12176
+ script.onload = () => {
12199
12177
  console.log("\u2705 Apple Pay script loaded");
12200
12178
  applePayScriptLoaded = true;
12201
12179
  console.log("ApplePaySession:", window.ApplePaySession);
12202
12180
  };
12203
- script2.onerror = (err) => {
12181
+ script.onerror = (err) => {
12204
12182
  console.error("\u274C Apple Pay script failed", err);
12205
12183
  };
12206
- document.head.appendChild(script2);
12184
+ document.head.appendChild(script);
12207
12185
  } else {
12208
12186
  applePayScriptLoaded = true;
12209
12187
  }
@@ -12212,7 +12190,7 @@ var ApplePayScriptLoader = () => {
12212
12190
  };
12213
12191
 
12214
12192
  // src/app/components/Skysystemz/EmbeddedCheckout.tsx
12215
- import { Fragment as Fragment21, jsx as jsx40, jsxs as jsxs22 } from "react/jsx-runtime";
12193
+ import { Fragment as Fragment20, jsx as jsx39, jsxs as jsxs21 } from "react/jsx-runtime";
12216
12194
  var EmbeddedCheckout = ({
12217
12195
  amount,
12218
12196
  bankAmount,
@@ -12235,14 +12213,15 @@ var EmbeddedCheckout = ({
12235
12213
  partialRef,
12236
12214
  onSubmit,
12237
12215
  onLoad,
12238
- customCSS: customCSS2
12216
+ customCSS
12239
12217
  }) => {
12240
- const [show, setShow] = useState12(false);
12241
- const [loading, setLoading] = useState12(false);
12242
- const [childHandleClose, setChildHandleClose] = useState12(() => () => {
12218
+ const [show, setShow] = useState11(false);
12219
+ const [loading, setLoading] = useState11(false);
12220
+ const [childHandleClose, setChildHandleClose] = useState11(() => () => {
12243
12221
  });
12244
- const [orderGuid, setOrderGuid] = useState12(null);
12245
- const [remainingAmount, setRemainingAmount] = useState12(null);
12222
+ const [orderGuid, setOrderGuid] = useState11(null);
12223
+ const [remainingAmount, setRemainingAmount] = useState11(null);
12224
+ const [isTokenizerReady, setTokenizerReady] = useState11(false);
12246
12225
  const initialCommonProps = useMemo2(
12247
12226
  () => ({
12248
12227
  amount,
@@ -12289,8 +12268,8 @@ var EmbeddedCheckout = ({
12289
12268
  partialRef
12290
12269
  ]
12291
12270
  );
12292
- const [commonProps, setCommonProps] = useState12(initialCommonProps);
12293
- useEffect20(() => {
12271
+ const [commonProps, setCommonProps] = useState11(initialCommonProps);
12272
+ useEffect18(() => {
12294
12273
  if (show) {
12295
12274
  setCommonProps(initialCommonProps);
12296
12275
  }
@@ -12321,13 +12300,13 @@ var EmbeddedCheckout = ({
12321
12300
  setLoading(false);
12322
12301
  }
12323
12302
  };
12324
- useEffect20(() => {
12325
- if (show && isPartial && partialRef) {
12303
+ useEffect18(() => {
12304
+ if (autoTrigger && isPartial && partialRef) {
12326
12305
  getskyosOrderDetails();
12327
12306
  }
12328
- }, [show, isPartial, partialRef]);
12307
+ }, [autoTrigger, isPartial, partialRef]);
12329
12308
  console.log(onLoad, "onLoad");
12330
- useEffect20(() => {
12309
+ useEffect18(() => {
12331
12310
  const supported = !!window.ApplePaySession;
12332
12311
  let canPay = false;
12333
12312
  if (supported) {
@@ -12338,21 +12317,19 @@ var EmbeddedCheckout = ({
12338
12317
  }
12339
12318
  console.log(`ApplePaySession: ${supported}, canMakePayments: ${canPay}`);
12340
12319
  }, []);
12341
- return /* @__PURE__ */ jsxs22(Fragment21, { children: [
12342
- /* @__PURE__ */ jsx40("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
12343
- /* @__PURE__ */ jsx40(DataScript, {}),
12344
- /* @__PURE__ */ jsx40(FractalTokenizerScript, {}),
12345
- /* @__PURE__ */ jsx40(SkyChargewidgetstyles, {}),
12346
- /* @__PURE__ */ jsx40(CardBankRadioStyles, {}),
12347
- /* @__PURE__ */ jsx40(CustomModal2styles_default, {}),
12348
- /* @__PURE__ */ jsx40(DataCapScriptLoader, {}),
12349
- /* @__PURE__ */ jsx40(ApplePayScriptLoader, {}),
12350
- /* @__PURE__ */ jsx40(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
12351
- !autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
12320
+ return /* @__PURE__ */ jsxs21(Fragment20, { children: [
12321
+ /* @__PURE__ */ jsx39("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
12322
+ /* @__PURE__ */ jsx39(DataScript, {}),
12323
+ /* @__PURE__ */ jsx39(SkyChargewidgetstyles, {}),
12324
+ /* @__PURE__ */ jsx39(CardBankRadioStyles, {}),
12325
+ /* @__PURE__ */ jsx39(CustomModal2styles_default, {}),
12326
+ /* @__PURE__ */ jsx39(ApplePayScriptLoader, {}),
12327
+ /* @__PURE__ */ jsx39(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS }),
12328
+ !autoTrigger && /* @__PURE__ */ jsxs21("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
12352
12329
  submitBtnText,
12353
12330
  submitBtnIcon
12354
12331
  ] }),
12355
- !autoTrigger ? /* @__PURE__ */ jsx40(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx40(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx40(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
12332
+ !autoTrigger ? /* @__PURE__ */ jsx39(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx39(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx39(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
12356
12333
  ] });
12357
12334
  };
12358
12335
  export {