@fractalpay/fractalpay-next-dev 0.0.288 → 0.0.290

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.288",
42
+ version: "0.0.290",
43
43
  private: false,
44
44
  type: "module",
45
45
  scripts: {
@@ -2811,25 +2811,25 @@ import { IoArrowBack } from "react-icons/io5";
2811
2811
  import { useEffect as useEffect3 } from "react";
2812
2812
  function DataScript() {
2813
2813
  useEffect3(() => {
2814
- const src = datacapUrl;
2814
+ const src2 = datacapUrl;
2815
2815
  if (typeof window === "undefined") return;
2816
2816
  if (window.DatacapWebToken) {
2817
2817
  return;
2818
2818
  }
2819
- if (!document.querySelector(`script[src="${src}"]`)) {
2820
- const script = document.createElement("script");
2821
- script.src = src;
2822
- script.async = true;
2823
- script.onload = () => {
2819
+ if (!document.querySelector(`script[src="${src2}"]`)) {
2820
+ const script2 = document.createElement("script");
2821
+ script2.src = src2;
2822
+ script2.async = true;
2823
+ script2.onload = () => {
2824
2824
  if (window.DatacapWebToken) {
2825
2825
  } else {
2826
2826
  console.warn("\u26A0\uFE0F Script loaded, but DatacapWebToken not found");
2827
2827
  }
2828
2828
  };
2829
- script.onerror = (err) => {
2829
+ script2.onerror = (err) => {
2830
2830
  console.error("\u274C Failed to load Datacap script", err);
2831
2831
  };
2832
- document.head.appendChild(script);
2832
+ document.head.appendChild(script2);
2833
2833
  } else {
2834
2834
  }
2835
2835
  }, []);
@@ -3209,31 +3209,21 @@ var PaxList = ({ listHeading = "Readers", ListItems, selectedPax, setSlectedPax,
3209
3209
 
3210
3210
  // src/app/components/FractalTokenizer.tsx
3211
3211
  import { useEffect as useEffect4 } from "react";
3212
- function FractalTokenizerScript({ onLoad }) {
3212
+ function FractalTokenizerScript() {
3213
3213
  useEffect4(() => {
3214
3214
  const src = `${fractalGatewayUrl}tokenizer/static/js/fractal_tokenizer.js`;
3215
- if (window.FractalTokenizer) {
3216
- onLoad == null ? void 0 : onLoad();
3217
- return;
3218
- }
3219
- const existing = document.querySelector(`script[src="${src}"]`);
3220
- if (existing) {
3221
- existing.addEventListener("load", () => onLoad == null ? void 0 : onLoad());
3222
- return;
3223
- }
3215
+ if (document.querySelector(`script[src="${src}"]`)) return;
3224
3216
  const script = document.createElement("script");
3225
3217
  script.src = src;
3226
3218
  script.async = true;
3227
3219
  script.onload = () => {
3228
3220
  try {
3229
- if (typeof FractalTokenizer !== "undefined") {
3230
- window.FractalTokenizer = FractalTokenizer;
3231
- onLoad == null ? void 0 : onLoad();
3232
- } else {
3233
- console.error("FractalTokenizer not defined in global scope");
3221
+ const TokenizerClass = eval("FractalTokenizer");
3222
+ if (TokenizerClass) {
3223
+ window.FractalTokenizer = TokenizerClass;
3234
3224
  }
3235
3225
  } catch (err) {
3236
- console.error(err);
3226
+ console.error("FractalTokenizer not accessible:", err);
3237
3227
  }
3238
3228
  };
3239
3229
  document.head.appendChild(script);
@@ -3247,12 +3237,8 @@ import { Fragment as Fragment10, jsx as jsx17, jsxs as jsxs10 } from "react/jsx-
3247
3237
  var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = false }) => {
3248
3238
  const instanceRef = useRef(null);
3249
3239
  useEffect5(() => {
3250
- const Tokenizer = window.FractalTokenizer;
3251
- if (!Tokenizer) {
3252
- console.error("Tokenizer not available");
3253
- return;
3254
- }
3255
- const instance = new Tokenizer({
3240
+ if (!window.FractalTokenizer) return;
3241
+ const instance = new window.FractalTokenizer({
3256
3242
  styles: fractalStyles
3257
3243
  });
3258
3244
  instanceRef.current = instance;
@@ -3364,17 +3350,17 @@ var DataCapScriptLoader = () => {
3364
3350
  );
3365
3351
  console.log("\u{1F535} existingScript found:", !!existingScript);
3366
3352
  if (!existingScript) {
3367
- const script = document.createElement("script");
3368
- script.src = `${datacapUrl}/hosted`;
3369
- script.async = true;
3370
- script.onload = () => {
3353
+ const script2 = document.createElement("script");
3354
+ script2.src = `${datacapUrl}/hosted`;
3355
+ script2.async = true;
3356
+ script2.onload = () => {
3371
3357
  console.log("\u2705 DataCap script loaded successfully");
3372
3358
  scriptLoaded = true;
3373
3359
  };
3374
- script.onerror = (err) => {
3360
+ script2.onerror = (err) => {
3375
3361
  console.error("\u274C DataCap script failed to load", err);
3376
3362
  };
3377
- document.head.appendChild(script);
3363
+ document.head.appendChild(script2);
3378
3364
  } else {
3379
3365
  scriptLoaded = true;
3380
3366
  }
@@ -3604,7 +3590,6 @@ function GetPaymentPage(props) {
3604
3590
  const [errorBankConsent, setErrorBankConsent] = useState4("");
3605
3591
  const [saveACHConsent1, setSaveACHConsent1] = useState4(false);
3606
3592
  const [errorBankConsentOther, setErrorBankConsentOther] = useState4("");
3607
- const [isTokenizerReady, setTokenizerReady] = useState4(false);
3608
3593
  const fractalpayClientKey = props.merchantPublicKey;
3609
3594
  let mastercard2 = S3Url + "widget/mc-img.svg";
3610
3595
  let visa2 = S3Url + "widget/visa-img.svg";
@@ -3944,6 +3929,7 @@ function GetPaymentPage(props) {
3944
3929
  } catch (err) {
3945
3930
  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.");
3946
3931
  setLoading2(false);
3932
+ return;
3947
3933
  }
3948
3934
  console.log(tokenizeData, "tokenizeData");
3949
3935
  const reqData = JSON.stringify(__spreadProps(__spreadValues({}, tokenizeData), {
@@ -4308,7 +4294,7 @@ function GetPaymentPage(props) {
4308
4294
  }, []);
4309
4295
  return /* @__PURE__ */ jsxs11(Fragment11, { children: [
4310
4296
  /* @__PURE__ */ jsx19(DataScript, {}),
4311
- /* @__PURE__ */ jsx19(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
4297
+ /* @__PURE__ */ jsx19(FractalTokenizerScript, {}),
4312
4298
  /* @__PURE__ */ jsx19(DataCapScriptLoader, {}),
4313
4299
  /* @__PURE__ */ jsx19(Chargewidgetstyles, {}),
4314
4300
  /* @__PURE__ */ jsx19(CardBankRadioStyles, {}),
@@ -4513,7 +4499,7 @@ function GetPaymentPage(props) {
4513
4499
  ] }),
4514
4500
  /* @__PURE__ */ jsxs11("div", { className: "form-group", children: [
4515
4501
  /* @__PURE__ */ jsx19("label", { children: "CARD NUMBER" }),
4516
- /* @__PURE__ */ jsx19("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && isTokenizerReady && /* @__PURE__ */ jsx19(
4502
+ /* @__PURE__ */ jsx19("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx19(
4517
4503
  FractalFields_default,
4518
4504
  {
4519
4505
  fractalStyles,
@@ -4867,7 +4853,6 @@ function PreAuthPayment(_a) {
4867
4853
  const [activeinCard, setActiveinCard] = useState5("form");
4868
4854
  const fractalpayClientKey = props.merchantPublicKey;
4869
4855
  const [selectedReader, setSelectedReader] = useState5(void 0);
4870
- const [isTokenizerReady, setTokenizerReady] = useState5(false);
4871
4856
  const tokenizerRef = useRef4(null);
4872
4857
  const fractalStyles = {
4873
4858
  input: {
@@ -5404,7 +5389,7 @@ function PreAuthPayment(_a) {
5404
5389
  }, []);
5405
5390
  return /* @__PURE__ */ jsxs12(Fragment12, { children: [
5406
5391
  /* @__PURE__ */ jsx20(DataScript, {}),
5407
- /* @__PURE__ */ jsx20(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
5392
+ /* @__PURE__ */ jsx20(FractalTokenizerScript, {}),
5408
5393
  /* @__PURE__ */ jsx20(Chargewidgetstyles, {}),
5409
5394
  /* @__PURE__ */ jsx20(CardBankRadioStyles, {}),
5410
5395
  /* @__PURE__ */ jsx20(DataCapScriptLoader, {}),
@@ -5560,7 +5545,7 @@ function PreAuthPayment(_a) {
5560
5545
  ] }),
5561
5546
  /* @__PURE__ */ jsxs12("div", { className: "form-group", children: [
5562
5547
  /* @__PURE__ */ jsx20("label", { children: "CARD NUMBER" }),
5563
- /* @__PURE__ */ jsx20("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && isTokenizerReady && /* @__PURE__ */ jsx20(
5548
+ /* @__PURE__ */ jsx20("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx20(
5564
5549
  FractalFields_default,
5565
5550
  {
5566
5551
  fractalStyles,
@@ -6152,7 +6137,6 @@ function AddCardEasyPay(props) {
6152
6137
  const exp_year_ref = useRef5(null);
6153
6138
  const cvv_ref = useRef5(null);
6154
6139
  const name_ref = useRef5(null);
6155
- const [isTokenizerReady, setTokenizerReady] = useState6(false);
6156
6140
  const tokenizerRef = useRef5(null);
6157
6141
  const fractalStyles = {
6158
6142
  input: {
@@ -6425,7 +6409,7 @@ function AddCardEasyPay(props) {
6425
6409
  }, []);
6426
6410
  return /* @__PURE__ */ jsxs14(Fragment14, { children: [
6427
6411
  /* @__PURE__ */ jsx24(DataScript, {}),
6428
- /* @__PURE__ */ jsx24(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
6412
+ /* @__PURE__ */ jsx24(FractalTokenizerScript, {}),
6429
6413
  /* @__PURE__ */ jsx24(DataCapScriptLoader, {}),
6430
6414
  /* @__PURE__ */ jsx24(AddCardStyle, {}),
6431
6415
  /* @__PURE__ */ jsx24(Loader_default, { loading: loading || loadingIframe }),
@@ -6455,7 +6439,7 @@ function AddCardEasyPay(props) {
6455
6439
  /* @__PURE__ */ jsxs14("div", { style: { maxHeight: "350px", minHeight: "0" }, className: "card-scrl", children: [
6456
6440
  /* @__PURE__ */ jsxs14("div", { className: "form-group", style: { marginTop: "0", marginBottom: "10px" }, children: [
6457
6441
  /* @__PURE__ */ jsx24("label", { htmlFor: "cardNumber", children: "Card Number" }),
6458
- (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && isTokenizerReady && /* @__PURE__ */ jsx24(
6442
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx24(
6459
6443
  FractalFields_default,
6460
6444
  {
6461
6445
  fractalStyles,
@@ -6809,12 +6793,8 @@ import { Fragment as Fragment15, jsx as jsx26, jsxs as jsxs15 } from "react/jsx-
6809
6793
  var FractalFieldsAddCardSky = ({ fractalStyles, tokenizerRef, extraInputs }) => {
6810
6794
  const instanceRef = useRef6(null);
6811
6795
  useEffect11(() => {
6812
- const Tokenizer = window.FractalTokenizer;
6813
- if (!Tokenizer) {
6814
- console.error("Tokenizer not available");
6815
- return;
6816
- }
6817
- const instance = new Tokenizer({
6796
+ if (!window.FractalTokenizer) return;
6797
+ const instance = new window.FractalTokenizer({
6818
6798
  styles: fractalStyles
6819
6799
  });
6820
6800
  instanceRef.current = instance;
@@ -6914,7 +6894,6 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
6914
6894
  const [paymentGateway, setPaymentGateway] = useState7();
6915
6895
  const [dcToken, setDCToken] = useState7();
6916
6896
  const tokenizerRef = useRef7(null);
6917
- const [isTokenizerReady, setTokenizerReady] = useState7(false);
6918
6897
  const fractalStyles = {
6919
6898
  input: {
6920
6899
  "font-family": "'Inter', sans-serif",
@@ -7177,7 +7156,7 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
7177
7156
  }, []);
7178
7157
  return /* @__PURE__ */ jsxs16(Fragment16, { children: [
7179
7158
  /* @__PURE__ */ jsx27(DataScript, {}),
7180
- /* @__PURE__ */ jsx27(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
7159
+ /* @__PURE__ */ jsx27(FractalTokenizerScript, {}),
7181
7160
  /* @__PURE__ */ jsx27(DataCapScriptLoader, {}),
7182
7161
  /* @__PURE__ */ jsx27(AddCardSkyStyle, {}),
7183
7162
  /* @__PURE__ */ jsx27(Loader_default, { loading: loading || isloading || loadingIframe }),
@@ -7239,7 +7218,7 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
7239
7218
  (cardError == null ? void 0 : cardError.lastName) && /* @__PURE__ */ jsx27("small", { className: "error", children: cardError == null ? void 0 : cardError.lastName })
7240
7219
  ] })
7241
7220
  ] }),
7242
- isTokenizerReady && /* @__PURE__ */ jsx27(
7221
+ /* @__PURE__ */ jsx27(
7243
7222
  FractalFieldsAddCardSky_default,
7244
7223
  {
7245
7224
  fractalStyles,
@@ -7588,7 +7567,6 @@ function PartialPayment(props) {
7588
7567
  const [errorBankConsent, setErrorBankConsent] = useState8("");
7589
7568
  const [saveACHConsent1, setSaveACHConsent1] = useState8(false);
7590
7569
  const [errorBankConsentOther, setErrorBankConsentOther] = useState8("");
7591
- const [isTokenizerReady, setTokenizerReady] = useState8(false);
7592
7570
  const tokenizerRef = useRef8(null);
7593
7571
  const fractalStyles = {
7594
7572
  input: {
@@ -8302,7 +8280,7 @@ function PartialPayment(props) {
8302
8280
  /* @__PURE__ */ jsx28(DataScript, {}),
8303
8281
  /* @__PURE__ */ jsx28(Chargewidgetstyles, {}),
8304
8282
  /* @__PURE__ */ jsx28(CardBankRadioStyles, {}),
8305
- /* @__PURE__ */ jsx28(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
8283
+ /* @__PURE__ */ jsx28(FractalTokenizerScript, {}),
8306
8284
  /* @__PURE__ */ jsx28(DataCapScriptLoader, {}),
8307
8285
  /* @__PURE__ */ jsxs17(Fragment17, { children: [
8308
8286
  /* @__PURE__ */ jsx28("button", { ref: buttonRef, style: { display: "none" }, className: "paymentBtn", onClick: handleShow, children: "Pay" }),
@@ -8510,7 +8488,7 @@ function PartialPayment(props) {
8510
8488
  ] }),
8511
8489
  /* @__PURE__ */ jsxs17("div", { className: "form-group", children: [
8512
8490
  /* @__PURE__ */ jsx28("label", { children: "CARD NUMBER" }),
8513
- /* @__PURE__ */ jsx28("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && isTokenizerReady && /* @__PURE__ */ jsx28(
8491
+ /* @__PURE__ */ jsx28("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx28(
8514
8492
  FractalFields_default,
8515
8493
  {
8516
8494
  fractalStyles,
@@ -8818,7 +8796,7 @@ function PartialPayment(props) {
8818
8796
  }
8819
8797
 
8820
8798
  // src/app/components/Skysystemz/PayButtonWithForm.tsx
8821
- import { useEffect as useEffect19, useState as useState12, useMemo } from "react";
8799
+ import { useEffect as useEffect16, useState as useState11, useMemo } from "react";
8822
8800
 
8823
8801
  // src/app/components/Skysystemz/SkyChargewidgetstyles.tsx
8824
8802
  import { jsx as jsx29 } from "react/jsx-runtime";
@@ -9664,7 +9642,7 @@ padding:0px !important;
9664
9642
  }
9665
9643
 
9666
9644
  // src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
9667
- import { useCallback, useEffect as useEffect18, useRef as useRef12, useState as useState11 } from "react";
9645
+ import { useCallback, useEffect as useEffect15, useRef as useRef10, useState as useState10 } from "react";
9668
9646
  import axios9 from "axios";
9669
9647
  import Swal5 from "sweetalert2";
9670
9648
 
@@ -9950,385 +9928,56 @@ var ErrorCardOverlay = ({ onClose, error, autoTrigger = false }) => {
9950
9928
  };
9951
9929
  var ErrorCardOverlay_default = ErrorCardOverlay;
9952
9930
 
9953
- // src/app/components/Atoms/Googlepay/Googlepay.tsx
9954
- import { useRef as useRef10 } from "react";
9955
-
9956
- // src/app/components/Atoms/Googlepay/GooglePayScriptLoader.tsx
9957
- import { useEffect as useEffect15 } from "react";
9958
- var googlePayScriptLoaded = false;
9959
- var GooglePayScriptLoader = ({
9960
- onLoad
9961
- }) => {
9962
- useEffect15(() => {
9963
- if (googlePayScriptLoaded) {
9964
- onLoad == null ? void 0 : onLoad();
9965
- return;
9966
- }
9967
- const existingScript = document.querySelector(
9968
- `script[src="https://pay.google.com/gp/p/js/pay.js"]`
9969
- );
9970
- if (!existingScript) {
9971
- const script = document.createElement("script");
9972
- script.src = "https://pay.google.com/gp/p/js/pay.js";
9973
- script.async = true;
9974
- script.onload = () => {
9975
- console.log("\u2705 Google Pay script loaded");
9976
- googlePayScriptLoaded = true;
9977
- console.log("google:", window.google);
9978
- onLoad == null ? void 0 : onLoad();
9979
- };
9980
- script.onerror = (err) => {
9981
- console.error("\u274C Google Pay script failed", err);
9982
- };
9983
- document.head.appendChild(script);
9984
- } else {
9985
- googlePayScriptLoaded = true;
9986
- onLoad == null ? void 0 : onLoad();
9987
- }
9988
- }, []);
9989
- return null;
9990
- };
9991
-
9992
- // src/app/components/Atoms/Googlepay/Googlepay.tsx
9993
- import { Fragment as Fragment19, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
9994
- function GooglePayComponent({
9995
- amount,
9996
- googlePayEnvironment: googlePayEnvironment2,
9997
- googlePayGatewayMerchantId: googlePayGatewayMerchantId2,
9998
- googlePayMerchantId: googlePayMerchantId2,
9999
- googlePayMerchantName,
10000
- require3ds = false,
10001
- completeFractalFlow,
10002
- setLoading
10003
- }) {
10004
- const containerRef = useRef10(null);
10005
- const paymentsClientRef = useRef10(null);
10006
- const baseRequest = {
10007
- apiVersion: 2,
10008
- apiVersionMinor: 0
10009
- };
10010
- const allowedCardNetworks = ["AMEX", "DISCOVER", "MASTERCARD", "VISA"];
10011
- const allowedCardAuthMethods = require3ds ? ["CRYPTOGRAM_3DS"] : ["PAN_ONLY", "CRYPTOGRAM_3DS"];
10012
- const baseCardPaymentMethod = {
10013
- type: "CARD",
10014
- parameters: {
10015
- allowedAuthMethods: allowedCardAuthMethods,
10016
- allowedCardNetworks
10017
- }
10018
- };
10019
- const cardPaymentMethod = __spreadProps(__spreadValues({}, baseCardPaymentMethod), {
10020
- tokenizationSpecification: {
10021
- type: "PAYMENT_GATEWAY",
10022
- parameters: {
10023
- gateway: googlePayGatewayMerchantId2,
10024
- gatewayMerchantId: googlePayGatewayMerchantId2
10025
- }
10026
- }
10027
- });
10028
- const handlePaymentAuthorization = async (paymentData) => {
10029
- var _a, _b;
10030
- try {
10031
- const token = (_b = (_a = paymentData == null ? void 0 : paymentData.paymentMethodData) == null ? void 0 : _a.tokenizationData) == null ? void 0 : _b.token;
10032
- if (!token) throw new Error("Missing token");
10033
- const parsed = JSON.parse(token);
10034
- console.log(parsed, "parsed token");
10035
- setLoading(true);
10036
- completeFractalFlow(parsed, null, "google_pay");
10037
- return {
10038
- transactionState: "SUCCESS"
10039
- // ✅ CLOSES GOOGLE PAY POPUP
10040
- };
10041
- } catch (err) {
10042
- console.error("Payment failed:", err);
10043
- return {
10044
- transactionState: "ERROR",
10045
- // ❌ CLOSES WITH ERROR UI
10046
- error: {
10047
- intent: "PAYMENT_AUTHORIZATION",
10048
- message: "Payment failed",
10049
- reason: "PAYMENT_DATA_INVALID"
10050
- }
10051
- };
10052
- }
10053
- };
10054
- const getPaymentsClient = () => {
10055
- if (!paymentsClientRef.current && typeof window !== "undefined") {
10056
- const google = window.google;
10057
- if (!google) return null;
10058
- paymentsClientRef.current = new google.payments.api.PaymentsClient({
10059
- environment: googlePayEnvironment2,
10060
- // ✅ ADD THIS
10061
- paymentDataCallbacks: {
10062
- onPaymentAuthorized: handlePaymentAuthorization
10063
- }
10064
- });
10065
- }
10066
- return paymentsClientRef.current;
10067
- };
10068
- const getIsReadyToPayRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
10069
- allowedPaymentMethods: [baseCardPaymentMethod]
10070
- });
10071
- const getTransactionInfo = () => ({
10072
- countryCode: "US",
10073
- currencyCode: "USD",
10074
- totalPriceStatus: "FINAL",
10075
- totalPrice: amount,
10076
- checkoutOption: "COMPLETE_IMMEDIATE_PURCHASE"
10077
- });
10078
- const getPaymentDataRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
10079
- allowedPaymentMethods: [cardPaymentMethod],
10080
- transactionInfo: getTransactionInfo(),
10081
- merchantInfo: {
10082
- merchantId: googlePayMerchantId2,
10083
- merchantName: googlePayMerchantName
10084
- },
10085
- // ✅ ADD THIS
10086
- callbackIntents: ["PAYMENT_AUTHORIZATION"]
10087
- });
10088
- const initializeGooglePay = async () => {
10089
- try {
10090
- const client = getPaymentsClient();
10091
- if (!client) {
10092
- console.error("Google Pay client not ready");
10093
- return;
10094
- }
10095
- const response = await client.isReadyToPay(
10096
- getIsReadyToPayRequest()
10097
- );
10098
- if (response.result && containerRef.current) {
10099
- const button = client.createButton({
10100
- onClick: onGooglePayClick,
10101
- allowedPaymentMethods: [baseCardPaymentMethod],
10102
- buttonType: "pay",
10103
- buttonColor: "black",
10104
- buttonRadius: 8
10105
- });
10106
- if (containerRef.current) {
10107
- containerRef.current.innerHTML = "";
10108
- }
10109
- containerRef.current.appendChild(button);
10110
- }
10111
- } catch (err) {
10112
- console.error("Google Pay init error:", err);
10113
- }
10114
- };
10115
- const onGooglePayClick = async () => {
10116
- const client = getPaymentsClient();
10117
- if (!client) {
10118
- console.error("Google Pay client not ready");
10119
- return;
10120
- }
10121
- try {
10122
- await client.loadPaymentData(getPaymentDataRequest());
10123
- } catch (err) {
10124
- if ((err == null ? void 0 : err.statusCode) !== "CANCELED") {
10125
- console.error(err);
10126
- }
10127
- }
10128
- };
10129
- const onScriptLoad = () => {
10130
- if (!googlePayEnvironment2 || !googlePayGatewayMerchantId2 || !amount || !googlePayMerchantId2) {
10131
- console.error("Missing Google Pay config");
10132
- return;
10133
- }
10134
- setTimeout(() => {
10135
- initializeGooglePay();
10136
- }, 0);
10137
- };
10138
- return /* @__PURE__ */ jsxs20(Fragment19, { children: [
10139
- /* @__PURE__ */ jsx34("div", { ref: containerRef, className: "text-center" }),
10140
- /* @__PURE__ */ jsx34(GooglePayScriptLoader, { onLoad: onScriptLoad })
10141
- ] });
10142
- }
10143
-
10144
- // src/app/components/Atoms/Applepay/ApplePayButton.tsx
10145
- import { useEffect as useEffect17, useRef as useRef11 } from "react";
10146
- import { jsx as jsx35 } from "react/jsx-runtime";
10147
- function ApplePayButton({
10148
- applePayMerchantId: applePayMerchantId2,
10149
- applePayAmount,
10150
- applePayMerchantName,
10151
- showLoader,
10152
- completeFractalFlow
10153
- }) {
10154
- const applePayRef = useRef11(null);
10155
- const paymentRequestMethods = [
10156
- {
10157
- supportedMethods: "https://apple.com/apple-pay",
10158
- data: {
10159
- version: 3,
10160
- merchantIdentifier: applePayMerchantId2,
10161
- // ✅ FIXED
10162
- merchantCapabilities: ["supports3DS"],
10163
- supportedNetworks: ["amex", "discover", "mastercard", "visa"],
10164
- // ✅ FIXED
10165
- countryCode: "US"
10166
- }
10167
- }
10168
- ];
10169
- const paymentRequestOptions = {
10170
- requestPayerName: false,
10171
- requestPayerEmail: false,
10172
- requestPayerPhone: false,
10173
- requestShipping: false
10174
- };
10175
- function buildPaymentDetails() {
10176
- return {
10177
- total: {
10178
- label: applePayMerchantName,
10179
- amount: {
10180
- currency: "USD",
10181
- value: applePayAmount
10182
- }
10183
- }
10184
- };
10185
- }
10186
- async function validateMerchant(event) {
10187
- var _a;
10188
- console.log("\u{1F7E1} STEP 1: Merchant validation started");
10189
- try {
10190
- console.log("Validation URL:", event.validationURL);
10191
- console.log("Domain:", window.location.hostname);
10192
- const res = await fetch(
10193
- `${masterBaseUrl}api/v1/widget/generate-apple-pay-session`,
10194
- {
10195
- method: "POST",
10196
- headers: {
10197
- "Content-Type": "application/json"
10198
- },
10199
- body: JSON.stringify({
10200
- validationUrl: event.validationURL,
10201
- applePayMerchantId: applePayMerchantId2,
10202
- applepayDisplayName: applePayMerchantName,
10203
- requestDomain: window.location.hostname
10204
- // ✅ IMPORTANT
10205
- })
10206
- }
10207
- );
10208
- console.log("\u{1F7E1} STEP 2: Response status:", res.status);
10209
- const data = await res.json();
10210
- console.log("RAW session response:", JSON.stringify(data));
10211
- console.log("\u{1F7E2} STEP 3: Session response: data fetched");
10212
- const merchantSession = (_a = data == null ? void 0 : data.data) != null ? _a : data;
10213
- if (!merchantSession || typeof merchantSession !== "object") {
10214
- console.error("\u274C Bad session shape");
10215
- event.complete(null);
10216
- return;
10217
- }
10218
- console.log("\u{1F7E2} STEP 4.1: Completing merchant validation");
10219
- event.complete(merchantSession);
10220
- console.log("\u{1F7E2} STEP 4.2: Completed merchant validation");
10221
- } catch (err) {
10222
- console.log("\u274C Merchant validation failed:", err == null ? void 0 : err.message);
10223
- event.complete(null);
10224
- }
10225
- }
10226
- async function authorizePayment(paymentResponse) {
10227
- console.log("\u{1F7E1} STEP 5: Authorizing payment");
10228
- try {
10229
- const token = paymentResponse.details.token.paymentData;
10230
- console.log("\u{1F7E2} STEP 6: Got token");
10231
- await completeFractalFlow(token, null, "apple_pay");
10232
- await paymentResponse.complete("success");
10233
- console.log("\u2705 Payment completed successfully");
10234
- } catch (err) {
10235
- console.log("\u274C Authorization failed:", err == null ? void 0 : err.message);
10236
- await paymentResponse.complete("fail");
10237
- }
10238
- }
10239
- async function handleApplePayClick() {
10240
- console.log("\u{1F7E1} STEP A: Click detected");
10241
- try {
10242
- const request = new PaymentRequest(
10243
- paymentRequestMethods,
10244
- buildPaymentDetails(),
10245
- paymentRequestOptions
10246
- );
10247
- request.onmerchantvalidation = validateMerchant;
10248
- console.log("\u{1F7E1} STEP B: Calling show()");
10249
- const response = await request.show();
10250
- console.log("\u{1F7E2} STEP C: Payment sheet opened");
10251
- await authorizePayment(response);
10252
- } catch (err) {
10253
- console.log("\u274C Apple Pay flow failed:", err == null ? void 0 : err.message);
10254
- }
10255
- }
10256
- useEffect17(() => {
10257
- if (window.ApplePaySession && window.ApplePaySession.canMakePayments()) {
10258
- console.log("\u2705 Apple Pay is available");
10259
- } else {
10260
- console.log("\u274C Apple Pay NOT available");
10261
- }
10262
- }, []);
10263
- useEffect17(() => {
10264
- const btn = applePayRef.current;
10265
- if (!btn) return;
10266
- const handleClick = () => handleApplePayClick();
10267
- btn.addEventListener("click", handleClick);
10268
- return () => btn.removeEventListener("click", handleClick);
10269
- }, [applePayMerchantId2, applePayAmount, applePayMerchantName]);
10270
- return /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
10271
- "apple-pay-button",
10272
- {
10273
- ref: applePayRef,
10274
- buttonstyle: "black",
10275
- type: "pay",
10276
- locale: "en-US",
10277
- style: { width: "100%" }
10278
- }
10279
- ) });
10280
- }
10281
-
10282
9931
  // src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
10283
- import { Fragment as Fragment20, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
10284
- 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, isTokenizerReady }) => {
9932
+ import { Fragment as Fragment19, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
9933
+ 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 }) => {
10285
9934
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
10286
- const hasRunRef = useRef12(false);
10287
- const cardFormRef = useRef12(null);
10288
- const bankFormRef = useRef12(null);
10289
- const expiryYearRef = useRef12(null);
10290
- const expiryMonthRef = useRef12(null);
10291
- const cardListRunRef = useRef12(false);
10292
- const threeDSContainerRef = useRef12(null);
10293
- const [activetab, setActive] = useState11("card");
10294
- const [activeList, setActiveList] = useState11("card");
10295
- const [cardData, setCardData] = useState11();
10296
- const [cardError, setCardError] = useState11({});
10297
- const [achData, setAchData] = useState11();
10298
- const [achError, setAchError] = useState11({});
10299
- const [saveACHinfo, setSaveACHinfo] = useState11(false);
10300
- const [saveACHConsent1, setSaveACHConsent1] = useState11(false);
10301
- const [saveCardInfo, setSaveCardInfo] = useState11(false);
10302
- const [error, setError] = useState11("");
10303
- const [errorIframe, setErrorIframe] = useState11("");
10304
- const [success, setSuccess] = useState11(false);
10305
- let [tranId, setTranId] = useState11("");
10306
- const [loading, setLoading] = useState11(false);
10307
- const [loading2, setLoading2] = useState11(false);
10308
- const [loadingIframe, setLoadingIframe] = useState11(false);
10309
- const [cardList, setCardList] = useState11([]);
10310
- const [bankList, setBankList] = useState11([]);
10311
- const [selectedCard, setSelectedCard] = useState11();
10312
- const [cashDiscount, setCashDiscount] = useState11(Number(amount));
10313
- const [activeinCard, setActiveinCard] = useState11("form");
10314
- const [activeinBank, setActiveinBank] = useState11("form");
10315
- const [isBankActive, setIsBankActive] = useState11(false);
10316
- const [processingFee, setProcessingFee] = useState11(0);
10317
- const [clientSecret, setClientSecret] = useState11("");
10318
- const [errorMessage, setErrorMessage] = useState11(null);
10319
- const [initialLoader, setInitialLoader] = useState11(false);
10320
- const [is3DSEnable, setIs3DSEnable] = useState11(false);
10321
- const [stripeResponse, setStripeResponse] = useState11(null);
10322
- const [orderLoader, setOrderLoader] = useState11(false);
10323
- const [orderGuid, setOrderGuid] = useState11(ordGuid || null);
10324
- const [partialAmount, setPartialAmount] = useState11("");
10325
- const [partialError, setPartialError] = useState11("");
10326
- const [remainingAmount, setRemainingAmount] = useState11("");
10327
- const [paymentGateway, setPaymentGateway] = useState11();
10328
- const [dcToken, setDCToken] = useState11();
10329
- const [isBankConsentChecked, setIsBankConsentChecked] = useState11(false);
10330
- const [errorBankConsent, setErrorBankConsent] = useState11("");
10331
- const [errorBankConsentOther, setErrorBankConsentOther] = useState11("");
9935
+ const hasRunRef = useRef10(false);
9936
+ const cardFormRef = useRef10(null);
9937
+ const bankFormRef = useRef10(null);
9938
+ const expiryYearRef = useRef10(null);
9939
+ const expiryMonthRef = useRef10(null);
9940
+ const cardListRunRef = useRef10(false);
9941
+ const threeDSContainerRef = useRef10(null);
9942
+ const [activetab, setActive] = useState10("card");
9943
+ const [activeList, setActiveList] = useState10("card");
9944
+ const [cardData, setCardData] = useState10();
9945
+ const [cardError, setCardError] = useState10({});
9946
+ const [achData, setAchData] = useState10();
9947
+ const [achError, setAchError] = useState10({});
9948
+ const [saveACHinfo, setSaveACHinfo] = useState10(false);
9949
+ const [saveACHConsent1, setSaveACHConsent1] = useState10(false);
9950
+ const [saveCardInfo, setSaveCardInfo] = useState10(false);
9951
+ const [error, setError] = useState10("");
9952
+ const [errorIframe, setErrorIframe] = useState10("");
9953
+ const [success, setSuccess] = useState10(false);
9954
+ let [tranId, setTranId] = useState10("");
9955
+ const [loading, setLoading] = useState10(false);
9956
+ const [loading2, setLoading2] = useState10(false);
9957
+ const [loadingIframe, setLoadingIframe] = useState10(false);
9958
+ const [cardList, setCardList] = useState10([]);
9959
+ const [bankList, setBankList] = useState10([]);
9960
+ const [selectedCard, setSelectedCard] = useState10();
9961
+ const [cashDiscount, setCashDiscount] = useState10(Number(amount));
9962
+ const [activeinCard, setActiveinCard] = useState10("form");
9963
+ const [activeinBank, setActiveinBank] = useState10("form");
9964
+ const [isBankActive, setIsBankActive] = useState10(false);
9965
+ const [processingFee, setProcessingFee] = useState10(0);
9966
+ const [clientSecret, setClientSecret] = useState10("");
9967
+ const [errorMessage, setErrorMessage] = useState10(null);
9968
+ const [initialLoader, setInitialLoader] = useState10(false);
9969
+ const [is3DSEnable, setIs3DSEnable] = useState10(false);
9970
+ const [stripeResponse, setStripeResponse] = useState10(null);
9971
+ const [orderLoader, setOrderLoader] = useState10(false);
9972
+ const [orderGuid, setOrderGuid] = useState10(ordGuid || null);
9973
+ const [partialAmount, setPartialAmount] = useState10("");
9974
+ const [partialError, setPartialError] = useState10("");
9975
+ const [remainingAmount, setRemainingAmount] = useState10("");
9976
+ const [paymentGateway, setPaymentGateway] = useState10();
9977
+ const [dcToken, setDCToken] = useState10();
9978
+ const [isBankConsentChecked, setIsBankConsentChecked] = useState10(false);
9979
+ const [errorBankConsent, setErrorBankConsent] = useState10("");
9980
+ const [errorBankConsentOther, setErrorBankConsentOther] = useState10("");
10332
9981
  let mastercard2 = S3Url + "widget/mc-img.svg";
10333
9982
  let visa2 = S3Url + "widget/visa-img.svg";
10334
9983
  let americanexp2 = S3Url + "widget/ae-img.svg";
@@ -10356,7 +10005,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10356
10005
  const bankFeeAmount = Number(bankSurcharge || 0);
10357
10006
  const bankSavingsAmount = Math.max(bankFeeAmount > 0 ? cardFeeAmount - bankFeeAmount : cardFeeAmount, 0);
10358
10007
  const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
10359
- const tokenizerRef = useRef12(null);
10008
+ const tokenizerRef = useRef10(null);
10360
10009
  const fractalStyles = {
10361
10010
  input: {
10362
10011
  "font-family": "'Inter', sans-serif",
@@ -10429,7 +10078,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10429
10078
  let dataObj = __spreadValues({
10430
10079
  Token: data == null ? void 0 : data.Token,
10431
10080
  amount,
10432
- postal_code: data == null ? void 0 : data.postalCode
10081
+ postal_code: data == null ? void 0 : data.postalCode,
10082
+ require3ds
10433
10083
  }, saveCardInfo ? {
10434
10084
  card: {
10435
10085
  postal_code: cardData == null ? void 0 : cardData.zipCode,
@@ -10535,8 +10185,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10535
10185
  return Object.keys(errors).length > 0;
10536
10186
  };
10537
10187
  const completeFractalFlow = async (tokenizeData, intentid, typeoftoken) => {
10538
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
10188
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
10539
10189
  try {
10190
+ console.log({
10191
+ tokenizeData,
10192
+ intentid,
10193
+ typeoftoken
10194
+ });
10540
10195
  if (typeoftoken == "google_pay" || typeoftoken == "apple_pay") {
10541
10196
  handleCharge({
10542
10197
  Token: tokenizeData,
@@ -10544,39 +10199,28 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10544
10199
  typeoftoken
10545
10200
  });
10546
10201
  return;
10547
- }
10548
- let token = tokenizeData;
10549
- let verifyandsaveresp = await axios9.post(`${masterBaseUrl}api/v1/gateway/verify-and-save/${session_token}`, {
10550
- token,
10551
- require3ds,
10552
- pass_fee,
10553
- typeoftoken
10554
- });
10555
- if ((verifyandsaveresp == null ? void 0 : verifyandsaveresp.status) == 200) {
10556
- let responsetemp = (_a2 = verifyandsaveresp == null ? void 0 : verifyandsaveresp.data) == null ? void 0 : _a2.data;
10557
- let respData = {
10558
- Token: responsetemp.gateway_token,
10559
- Brand: responsetemp.card_data.brand,
10560
- ExpirationMonth: responsetemp.card_data.expire_mm,
10561
- ExpirationYear: responsetemp.card_data.expire_yy,
10562
- Last4: responsetemp.card_data.last4,
10563
- Bin: responsetemp.card_data.bin,
10564
- postalCode: cardData == null ? void 0 : cardData.zipCode,
10565
- stripe_3ds_auth_id: intentid
10566
- };
10202
+ } else {
10567
10203
  if (isPreAuth) {
10568
- handlePreAuth(respData);
10204
+ handlePreAuth({
10205
+ Token: tokenizeData,
10206
+ postalCode: cardData == null ? void 0 : cardData.zipCode,
10207
+ typeoftoken: "token"
10208
+ });
10569
10209
  } else {
10570
- handleCharge(respData);
10210
+ handleCharge(__spreadValues({
10211
+ Token: tokenizeData,
10212
+ postalCode: cardData == null ? void 0 : cardData.zipCode,
10213
+ typeoftoken: "token"
10214
+ }, intentid && { stripe_3ds_auth_id: intentid }));
10571
10215
  }
10572
10216
  }
10573
10217
  } catch (error2) {
10574
10218
  console.log(error2, "error");
10575
- setError(((_c2 = (_b2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _b2.data) == null ? void 0 : _c2.message) || "Something went wrong!");
10219
+ setError(((_b2 = (_a2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || "Something went wrong!");
10576
10220
  callback({
10577
- error: ((_e2 = (_d2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _d2.data) == null ? void 0 : _e2.message) || "Something went wrong!",
10578
- result: (_g2 = (_f2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _f2.data) == null ? void 0 : _g2.result,
10579
- statusCode: (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.status
10221
+ error: ((_d2 = (_c2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || "Something went wrong!",
10222
+ result: (_f2 = (_e2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _e2.data) == null ? void 0 : _f2.result,
10223
+ statusCode: (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.status
10580
10224
  });
10581
10225
  hideLoader();
10582
10226
  }
@@ -11221,13 +10865,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11221
10865
  setOrderLoader(false);
11222
10866
  }
11223
10867
  };
11224
- useEffect18(() => {
10868
+ useEffect15(() => {
11225
10869
  if (!show && !autoTrigger) {
11226
10870
  hasRunRef.current = false;
11227
10871
  cardListRunRef.current = false;
11228
10872
  }
11229
10873
  }, [show, autoTrigger]);
11230
- useEffect18(() => {
10874
+ useEffect15(() => {
11231
10875
  if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
11232
10876
  getPaymentDetails();
11233
10877
  if (isPartial && !partialRef) {
@@ -11235,7 +10879,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11235
10879
  }
11236
10880
  }
11237
10881
  }, [show, autoTrigger, isPartial, onLoad]);
11238
- useEffect18(() => {
10882
+ useEffect15(() => {
11239
10883
  if ((show || autoTrigger) && pass_fee_amount) {
11240
10884
  let cashdisc = Number(amount) - Number(pass_fee_amount);
11241
10885
  if (cashdisc && !isNaN(cashdisc)) {
@@ -11297,7 +10941,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11297
10941
  console.error("3DS Auth failed \u274C", status);
11298
10942
  setError(`3DS Authentication ${status}`);
11299
10943
  };
11300
- useEffect18(() => {
10944
+ useEffect15(() => {
11301
10945
  if (setHandleCloseRef) {
11302
10946
  setHandleCloseRef(() => handleClose);
11303
10947
  }
@@ -11315,18 +10959,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11315
10959
  setPartialError("");
11316
10960
  }
11317
10961
  };
11318
- useEffect18(() => {
10962
+ useEffect15(() => {
11319
10963
  if (typeof FractalTokenizer === "undefined") return;
11320
10964
  const tokenizer = new FractalTokenizer({
11321
10965
  styles: {}
11322
10966
  });
11323
10967
  }, []);
11324
- const stateRef = useRef12({
10968
+ const stateRef = useRef10({
11325
10969
  activeinBank,
11326
10970
  activeinCard,
11327
10971
  activetab
11328
10972
  });
11329
- useEffect18(() => {
10973
+ useEffect15(() => {
11330
10974
  stateRef.current = {
11331
10975
  activeinBank,
11332
10976
  activeinCard,
@@ -11350,7 +10994,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11350
10994
  }
11351
10995
  }
11352
10996
  }, []);
11353
- useEffect18(() => {
10997
+ useEffect15(() => {
11354
10998
  onSubmit == null ? void 0 : onSubmit(submit);
11355
10999
  }, [onSubmit, submit]);
11356
11000
  function detectCardType(cardinput) {
@@ -11376,34 +11020,34 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11376
11020
  const cardType = detectCardType(cardInput);
11377
11021
  switch (cardType) {
11378
11022
  case "visa":
11379
- return /* @__PURE__ */ jsx36("img", { src: visa2, alt: "visa", width: 33 });
11023
+ return /* @__PURE__ */ jsx34("img", { src: visa2, alt: "visa", width: 33 });
11380
11024
  case "mastercard":
11381
- return /* @__PURE__ */ jsx36("img", { src: mastercard2, width: 33, alt: "mastercard" });
11025
+ return /* @__PURE__ */ jsx34("img", { src: mastercard2, width: 33, alt: "mastercard" });
11382
11026
  case "amex":
11383
- return /* @__PURE__ */ jsx36("img", { src: americanexp2, alt: "amex", width: 33 });
11027
+ return /* @__PURE__ */ jsx34("img", { src: americanexp2, alt: "amex", width: 33 });
11384
11028
  case "discover":
11385
- return /* @__PURE__ */ jsx36("img", { src: discover2, width: 33, alt: "discover" });
11029
+ return /* @__PURE__ */ jsx34("img", { src: discover2, width: 33, alt: "discover" });
11386
11030
  case "diners":
11387
- return /* @__PURE__ */ jsx36("img", { src: dinersicon, alt: "Diners Club" });
11031
+ return /* @__PURE__ */ jsx34("img", { src: dinersicon, alt: "Diners Club" });
11388
11032
  case "jcb":
11389
- return /* @__PURE__ */ jsx36("img", { src: jcbicon, alt: "JCB" });
11033
+ return /* @__PURE__ */ jsx34("img", { src: jcbicon, alt: "JCB" });
11390
11034
  case "unionpay":
11391
- return /* @__PURE__ */ jsx36("img", { src: unionicon, alt: "UnionPay" });
11035
+ return /* @__PURE__ */ jsx34("img", { src: unionicon, alt: "UnionPay" });
11392
11036
  default:
11393
- return /* @__PURE__ */ jsx36("img", { src: defualtcardborder, alt: "card" });
11037
+ return /* @__PURE__ */ jsx34("img", { src: defualtcardborder, alt: "card" });
11394
11038
  }
11395
11039
  }
11396
- return /* @__PURE__ */ jsxs21(Fragment20, { children: [
11397
- (initialLoader || !onLoad) && /* @__PURE__ */ jsx36(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
11398
- error && /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
11399
- errorIframe && /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
11040
+ return /* @__PURE__ */ jsxs20(Fragment19, { children: [
11041
+ (initialLoader || !onLoad) && /* @__PURE__ */ jsx34(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
11042
+ error && /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
11043
+ errorIframe && /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
11400
11044
  setErrorIframe("");
11401
11045
  }, autoTrigger: onSubmit ? !onSubmit : autoTrigger }) }),
11402
- /* @__PURE__ */ jsxs21(Fragment20, { children: [
11403
- (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx36(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
11404
- /* @__PURE__ */ jsxs21("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
11405
- /* @__PURE__ */ jsx36("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
11406
- (stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx36(
11046
+ /* @__PURE__ */ jsxs20(Fragment19, { children: [
11047
+ (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx34(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
11048
+ /* @__PURE__ */ jsxs20("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
11049
+ /* @__PURE__ */ jsx34("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
11050
+ (stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx34(
11407
11051
  ThreeDSChallenge,
11408
11052
  {
11409
11053
  containerRef: threeDSContainerRef,
@@ -11413,33 +11057,33 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11413
11057
  onSuccess: handleSuccess,
11414
11058
  onError: handleError
11415
11059
  }
11416
- ) : /* @__PURE__ */ jsxs21("div", { className: "parent-pay-container", children: [
11417
- /* @__PURE__ */ jsx36("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs21("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
11418
- /* @__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" }) }),
11419
- /* @__PURE__ */ jsx36("defs", { children: /* @__PURE__ */ jsx36("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx36("rect", { width: "16", height: "16", fill: "white" }) }) })
11060
+ ) : /* @__PURE__ */ jsxs20("div", { className: "parent-pay-container", children: [
11061
+ /* @__PURE__ */ jsx34("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: [
11062
+ /* @__PURE__ */ jsx34("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx34("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" }) }),
11063
+ /* @__PURE__ */ jsx34("defs", { children: /* @__PURE__ */ jsx34("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx34("rect", { width: "16", height: "16", fill: "white" }) }) })
11420
11064
  ] }) }),
11421
- /* @__PURE__ */ jsx36("div", { className: "pay-main-logo-res" }),
11422
- /* @__PURE__ */ jsxs21("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
11423
- !onSubmit && /* @__PURE__ */ jsxs21("div", { className: "pay-header pay-conatiner-one", children: [
11424
- /* @__PURE__ */ jsxs21("div", { className: "pay-conatiner-one-first", children: [
11425
- /* @__PURE__ */ jsxs21("div", { className: "pay-logo-container", children: [
11426
- /* @__PURE__ */ jsx36("div", { className: "pay-main-logo" }),
11427
- /* @__PURE__ */ jsx36("h1", { className: "pay-heading", children: "Pay" }),
11428
- (cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs21("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
11065
+ /* @__PURE__ */ jsx34("div", { className: "pay-main-logo-res" }),
11066
+ /* @__PURE__ */ jsxs20("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
11067
+ !onSubmit && /* @__PURE__ */ jsxs20("div", { className: "pay-header pay-conatiner-one", children: [
11068
+ /* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-first", children: [
11069
+ /* @__PURE__ */ jsxs20("div", { className: "pay-logo-container", children: [
11070
+ /* @__PURE__ */ jsx34("div", { className: "pay-main-logo" }),
11071
+ /* @__PURE__ */ jsx34("h1", { className: "pay-heading", children: "Pay" }),
11072
+ (cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs20("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
11429
11073
  " ",
11430
- /* @__PURE__ */ jsx36(IoArrowBack4, {}),
11074
+ /* @__PURE__ */ jsx34(IoArrowBack4, {}),
11431
11075
  " Back"
11432
11076
  ] })
11433
11077
  ] }),
11434
- /* @__PURE__ */ jsx36("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs21("div", { className: "pay-amount-conatiner", children: [
11435
- /* @__PURE__ */ jsx36("small", { className: "pay-payment-amount", children: "Select payment type" }),
11436
- /* @__PURE__ */ jsxs21("div", { className: "frac-card-bank-radio-main", children: [
11437
- /* @__PURE__ */ jsx36(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
11438
- !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 })
11078
+ /* @__PURE__ */ jsx34("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
11079
+ /* @__PURE__ */ jsx34("small", { className: "pay-payment-amount", children: "Select payment type" }),
11080
+ /* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
11081
+ /* @__PURE__ */ jsx34(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
11082
+ !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx34(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
11439
11083
  ] }),
11440
- isPartial && /* @__PURE__ */ jsxs21("div", { className: "frac-partial-payment-input", children: [
11441
- /* @__PURE__ */ jsx36("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
11442
- /* @__PURE__ */ jsx36(
11084
+ isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
11085
+ /* @__PURE__ */ jsx34("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
11086
+ /* @__PURE__ */ jsx34(
11443
11087
  NumericFormat2,
11444
11088
  {
11445
11089
  prefix: "$",
@@ -11463,25 +11107,25 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11463
11107
  }
11464
11108
  }
11465
11109
  ),
11466
- partialError && /* @__PURE__ */ jsx36("span", { className: "error-span", children: partialError })
11110
+ partialError && /* @__PURE__ */ jsx34("span", { className: "error-span", children: partialError })
11467
11111
  ] })
11468
11112
  ] }) })
11469
11113
  ] }),
11470
- /* @__PURE__ */ jsxs21("div", { className: "pay-conatiner-one-last", children: [
11471
- /* @__PURE__ */ jsx36("img", { src: secure2, alt: "" }),
11472
- /* @__PURE__ */ jsx36("img", { src: pov2, alt: "" }),
11114
+ /* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-last", children: [
11115
+ /* @__PURE__ */ jsx34("img", { src: secure2, alt: "" }),
11116
+ /* @__PURE__ */ jsx34("img", { src: pov2, alt: "" }),
11473
11117
  "Secure payments powered by Fractal"
11474
11118
  ] })
11475
11119
  ] }),
11476
- /* @__PURE__ */ jsx36("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx36("div", { className: "col-md-12", children: /* @__PURE__ */ jsxs21("div", { id: "payment-form-div ", className: onSubmit ? "frac-payment-form-div" : "", children: [
11477
- onSubmit && /* @__PURE__ */ jsx36("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs21("div", { className: "pay-amount-conatiner", children: [
11478
- /* @__PURE__ */ jsxs21("div", { className: "frac-card-bank-radio-main", children: [
11479
- /* @__PURE__ */ jsx36(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
11480
- !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 })
11120
+ /* @__PURE__ */ jsx34("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx34("div", { className: "col-md-12", children: /* @__PURE__ */ jsxs20("div", { id: "payment-form-div ", className: onSubmit ? "frac-payment-form-div" : "", children: [
11121
+ onSubmit && /* @__PURE__ */ jsx34("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
11122
+ /* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
11123
+ /* @__PURE__ */ jsx34(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
11124
+ !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx34(CardBankRadio, { skydesign: true, label: "Bank", amount: (_d = Number(bankAmount)) == null ? void 0 : _d.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
11481
11125
  ] }),
11482
- isPartial && /* @__PURE__ */ jsxs21("div", { className: "frac-partial-payment-input", children: [
11483
- /* @__PURE__ */ jsx36("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
11484
- /* @__PURE__ */ jsx36(
11126
+ isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
11127
+ /* @__PURE__ */ jsx34("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
11128
+ /* @__PURE__ */ jsx34(
11485
11129
  NumericFormat2,
11486
11130
  {
11487
11131
  prefix: "$",
@@ -11498,77 +11142,53 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11498
11142
  fixedDecimalScale: true
11499
11143
  }
11500
11144
  ),
11501
- partialError && /* @__PURE__ */ jsx36("span", { className: "error-span", children: partialError })
11145
+ partialError && /* @__PURE__ */ jsx34("span", { className: "error-span", children: partialError })
11502
11146
  ] })
11503
11147
  ] }) }),
11504
- is3DSEnable ? clientSecret && /* @__PURE__ */ jsx36(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs21(Fragment20, { children: [
11505
- /* @__PURE__ */ jsxs21("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
11506
- !onSubmit && /* @__PURE__ */ jsxs21(Fragment20, { children: [
11507
- /* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
11508
- /* @__PURE__ */ jsx36("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs21("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
11148
+ is3DSEnable ? clientSecret && /* @__PURE__ */ jsx34(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs20(Fragment19, { children: [
11149
+ /* @__PURE__ */ jsxs20("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
11150
+ !onSubmit && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11151
+ /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
11152
+ /* @__PURE__ */ jsx34("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: [
11509
11153
  " ",
11510
- /* @__PURE__ */ jsx36(IoArrowBack4, {})
11154
+ /* @__PURE__ */ jsx34(IoArrowBack4, {})
11511
11155
  ] }) }),
11512
- /* @__PURE__ */ jsx36("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
11156
+ /* @__PURE__ */ jsx34("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
11513
11157
  ] }),
11514
- /* @__PURE__ */ jsxs21("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
11515
- /* @__PURE__ */ jsx36("img", { src: visa2, alt: "", width: 33 }),
11516
- /* @__PURE__ */ jsx36("img", { src: mastercard2, width: 33, alt: "" }),
11517
- /* @__PURE__ */ jsx36("img", { src: americanexp2, alt: "", width: 33 }),
11518
- /* @__PURE__ */ jsx36("img", { src: discover2, width: 33, alt: "" })
11158
+ /* @__PURE__ */ jsxs20("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
11159
+ /* @__PURE__ */ jsx34("img", { src: visa2, alt: "", width: 33 }),
11160
+ /* @__PURE__ */ jsx34("img", { src: mastercard2, width: 33, alt: "" }),
11161
+ /* @__PURE__ */ jsx34("img", { src: americanexp2, alt: "", width: 33 }),
11162
+ /* @__PURE__ */ jsx34("img", { src: discover2, width: 33, alt: "" })
11519
11163
  ] })
11520
11164
  ] }),
11521
- activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
11522
- /* @__PURE__ */ jsx36(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
11165
+ activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
11166
+ /* @__PURE__ */ jsx34(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
11523
11167
  setActiveinCard("form");
11524
11168
  } }),
11525
- /* @__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)) }) })
11526
- ] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
11527
- onSubmit && /* @__PURE__ */ jsxs21(Fragment20, { children: [
11528
- /* @__PURE__ */ jsx36(
11529
- ApplePayButton,
11530
- {
11531
- applePayAmount: partialAmount ? partialAmount : amount,
11532
- applePayMerchantId,
11533
- applePayMerchantName: merchantName,
11534
- completeFractalFlow,
11535
- showLoader
11536
- }
11537
- ),
11538
- /* @__PURE__ */ jsx36(
11539
- GooglePayComponent,
11540
- {
11541
- amount: partialAmount ? partialAmount : amount,
11542
- googlePayEnvironment,
11543
- googlePayGatewayMerchantId,
11544
- googlePayMerchantId,
11545
- googlePayMerchantName: merchantName,
11546
- completeFractalFlow,
11547
- setLoading
11548
- }
11549
- ),
11550
- /* @__PURE__ */ jsx36("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx36("span", { children: "or" }) })
11551
- ] }),
11552
- /* @__PURE__ */ jsxs21("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11169
+ /* @__PURE__ */ jsx34("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx34("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)) }) })
11170
+ ] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
11171
+ onSubmit && /* @__PURE__ */ jsx34(Fragment19, {}),
11172
+ /* @__PURE__ */ jsxs20("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11553
11173
  if (e.key === "Enter" && loading) {
11554
11174
  e.preventDefault();
11555
11175
  e.stopPropagation();
11556
11176
  }
11557
11177
  }, children: [
11558
- /* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11559
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11560
- /* @__PURE__ */ jsx36("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11561
- /* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11178
+ /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11179
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11180
+ /* @__PURE__ */ jsx34("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11181
+ /* @__PURE__ */ jsx34("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11562
11182
  const value = e.target.value;
11563
11183
  if (/^[a-zA-Z\s]*$/.test(value)) {
11564
11184
  handleCardChange("cardName", value);
11565
11185
  }
11566
11186
  } }),
11567
- (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11187
+ (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11568
11188
  ] }),
11569
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11570
- /* @__PURE__ */ jsx36("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
11571
- /* @__PURE__ */ jsx36("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && isTokenizerReady && /* @__PURE__ */ jsx36(
11189
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11190
+ /* @__PURE__ */ jsx34("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
11191
+ /* @__PURE__ */ jsx34("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx34(
11572
11192
  FractalFields_default,
11573
11193
  {
11574
11194
  fractalStyles,
@@ -11577,18 +11197,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11577
11197
  }
11578
11198
  ) })
11579
11199
  ] }),
11580
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11581
- /* @__PURE__ */ jsx36("label", { htmlFor: "zip", children: "ZIP" }),
11582
- /* @__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) }),
11583
- (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11584
- pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
11200
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11201
+ /* @__PURE__ */ jsx34("label", { htmlFor: "zip", children: "ZIP" }),
11202
+ /* @__PURE__ */ jsx34("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) }),
11203
+ (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11204
+ pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
11585
11205
  "Cards include a fee amount of ",
11586
- /* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11206
+ /* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11587
11207
  "."
11588
11208
  ] })
11589
11209
  ] }),
11590
- customerId && /* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11591
- /* @__PURE__ */ jsx36(
11210
+ customerId && /* @__PURE__ */ jsx34("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11211
+ /* @__PURE__ */ jsx34(
11592
11212
  "input",
11593
11213
  {
11594
11214
  type: "checkbox",
@@ -11598,10 +11218,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11598
11218
  onChange: (e) => setSaveCardInfo(e.target.checked)
11599
11219
  }
11600
11220
  ),
11601
- /* @__PURE__ */ jsx36("label", { htmlFor: "save_card", className: "toggle-label" }),
11602
- /* @__PURE__ */ jsx36("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11603
- /* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
11604
- /* @__PURE__ */ jsx36("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
11221
+ /* @__PURE__ */ jsx34("label", { htmlFor: "save_card", className: "toggle-label" }),
11222
+ /* @__PURE__ */ jsx34("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11223
+ /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
11224
+ /* @__PURE__ */ jsx34("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
11605
11225
  "svg",
11606
11226
  {
11607
11227
  xmlns: "http://www.w3.org/2000/svg",
@@ -11610,8 +11230,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11610
11230
  viewBox: "0 0 20 20",
11611
11231
  fill: "none",
11612
11232
  children: [
11613
- /* @__PURE__ */ jsx36("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11614
- /* @__PURE__ */ jsx36(
11233
+ /* @__PURE__ */ jsx34("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11234
+ /* @__PURE__ */ jsx34(
11615
11235
  "path",
11616
11236
  {
11617
11237
  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",
@@ -11621,34 +11241,34 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11621
11241
  ]
11622
11242
  }
11623
11243
  ) }),
11624
- /* @__PURE__ */ jsx36("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
11244
+ /* @__PURE__ */ jsx34("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
11625
11245
  "If checked, I agree to give the ",
11626
- /* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
11246
+ /* @__PURE__ */ jsx34("b", { children: merchantName || "merchant" }),
11627
11247
  " permission to charge this credit card for agreed-upon purchases in the future."
11628
11248
  ] }) })
11629
11249
  ] })
11630
11250
  ] }) })
11631
11251
  ] }),
11632
- /* @__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)) }) })
11252
+ /* @__PURE__ */ jsx34("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx34("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)) }) })
11633
11253
  ] })
11634
- ] }) : /* @__PURE__ */ jsxs21("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11254
+ ] }) : /* @__PURE__ */ jsxs20("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11635
11255
  if (e.key === "Enter" && loading) {
11636
11256
  e.preventDefault();
11637
11257
  e.stopPropagation();
11638
11258
  }
11639
11259
  }, children: [
11640
- /* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11641
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11642
- /* @__PURE__ */ jsx36("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11643
- /* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11260
+ /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11261
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11262
+ /* @__PURE__ */ jsx34("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11263
+ /* @__PURE__ */ jsx34("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11644
11264
  const value = e.target.value;
11645
11265
  if (/^[a-zA-Z\s]*$/.test(value)) {
11646
11266
  handleCardChange("cardName", value);
11647
11267
  }
11648
11268
  } }),
11649
- (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11269
+ (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11650
11270
  ] }),
11651
- /* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx36(
11271
+ /* @__PURE__ */ jsx34("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx34(
11652
11272
  DataCapFields,
11653
11273
  {
11654
11274
  isOpen: show || autoTrigger,
@@ -11658,18 +11278,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11658
11278
  customCSS: customCSS2
11659
11279
  }
11660
11280
  ) }),
11661
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11662
- /* @__PURE__ */ jsx36("label", { htmlFor: "zip", children: "ZIP" }),
11663
- /* @__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) }),
11664
- (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11665
- pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
11281
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11282
+ /* @__PURE__ */ jsx34("label", { htmlFor: "zip", children: "ZIP" }),
11283
+ /* @__PURE__ */ jsx34("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) }),
11284
+ (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11285
+ pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
11666
11286
  "Cards include a fee amount of ",
11667
- /* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11287
+ /* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11668
11288
  "."
11669
11289
  ] })
11670
11290
  ] }),
11671
- customerId && /* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11672
- /* @__PURE__ */ jsx36(
11291
+ customerId && /* @__PURE__ */ jsx34("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11292
+ /* @__PURE__ */ jsx34(
11673
11293
  "input",
11674
11294
  {
11675
11295
  type: "checkbox",
@@ -11679,10 +11299,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11679
11299
  onChange: (e) => setSaveCardInfo(e.target.checked)
11680
11300
  }
11681
11301
  ),
11682
- /* @__PURE__ */ jsx36("label", { htmlFor: "save_card", className: "toggle-label" }),
11683
- /* @__PURE__ */ jsx36("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11684
- /* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
11685
- /* @__PURE__ */ jsx36("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
11302
+ /* @__PURE__ */ jsx34("label", { htmlFor: "save_card", className: "toggle-label" }),
11303
+ /* @__PURE__ */ jsx34("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11304
+ /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
11305
+ /* @__PURE__ */ jsx34("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
11686
11306
  "svg",
11687
11307
  {
11688
11308
  xmlns: "http://www.w3.org/2000/svg",
@@ -11691,8 +11311,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11691
11311
  viewBox: "0 0 20 20",
11692
11312
  fill: "none",
11693
11313
  children: [
11694
- /* @__PURE__ */ jsx36("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11695
- /* @__PURE__ */ jsx36(
11314
+ /* @__PURE__ */ jsx34("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11315
+ /* @__PURE__ */ jsx34(
11696
11316
  "path",
11697
11317
  {
11698
11318
  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",
@@ -11702,48 +11322,48 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11702
11322
  ]
11703
11323
  }
11704
11324
  ) }),
11705
- /* @__PURE__ */ jsx36("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
11325
+ /* @__PURE__ */ jsx34("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
11706
11326
  "If checked, I agree to give the ",
11707
- /* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
11327
+ /* @__PURE__ */ jsx34("b", { children: merchantName || "merchant" }),
11708
11328
  " permission to charge this credit card for agreed-upon purchases in the future."
11709
11329
  ] }) })
11710
11330
  ] })
11711
11331
  ] }) })
11712
11332
  ] }),
11713
- /* @__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)) }) })
11333
+ /* @__PURE__ */ jsx34("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx34("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)) }) })
11714
11334
  ] })
11715
11335
  ] }),
11716
- /* @__PURE__ */ jsx36("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs21(Fragment20, { children: [
11717
- !onSubmit && /* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
11718
- /* @__PURE__ */ jsx36("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs21("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
11336
+ /* @__PURE__ */ jsx34("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs20(Fragment19, { children: [
11337
+ !onSubmit && /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
11338
+ /* @__PURE__ */ jsx34("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: [
11719
11339
  " ",
11720
- /* @__PURE__ */ jsx36(IoArrowBack4, {})
11340
+ /* @__PURE__ */ jsx34(IoArrowBack4, {})
11721
11341
  ] }) }),
11722
- /* @__PURE__ */ jsx36("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
11342
+ /* @__PURE__ */ jsx34("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
11723
11343
  ] }),
11724
- activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
11725
- /* @__PURE__ */ jsx36(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
11344
+ activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
11345
+ /* @__PURE__ */ jsx34(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
11726
11346
  setActiveinBank("form");
11727
11347
  } }),
11728
- /* @__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)) }) })
11729
- ] }) : /* @__PURE__ */ jsxs21("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
11348
+ /* @__PURE__ */ jsx34("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx34("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_m = Number(bankAmount)) == null ? void 0 : _m.toFixed(2)) }) })
11349
+ ] }) : /* @__PURE__ */ jsxs20("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
11730
11350
  if (e.key === "Enter" && loading) {
11731
11351
  e.preventDefault();
11732
11352
  e.stopPropagation();
11733
11353
  }
11734
11354
  }, children: [
11735
- /* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: {
11355
+ /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: {
11736
11356
  minHeight: "444px",
11737
11357
  maxHeight: "444px"
11738
11358
  }, children: [
11739
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11740
- /* @__PURE__ */ jsx36("label", { htmlFor: "nameonaccount", children: "Name on account" }),
11741
- /* @__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 }),
11742
- (achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
11359
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11360
+ /* @__PURE__ */ jsx34("label", { htmlFor: "nameonaccount", children: "Name on account" }),
11361
+ /* @__PURE__ */ jsx34("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 }),
11362
+ (achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
11743
11363
  ] }),
11744
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11745
- /* @__PURE__ */ jsx36("label", { htmlFor: "routingnumber", children: "Routing number" }),
11746
- /* @__PURE__ */ jsx36(
11364
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11365
+ /* @__PURE__ */ jsx34("label", { htmlFor: "routingnumber", children: "Routing number" }),
11366
+ /* @__PURE__ */ jsx34(
11747
11367
  "input",
11748
11368
  {
11749
11369
  type: "text",
@@ -11756,11 +11376,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11756
11376
  onChange: handleChangeAch
11757
11377
  }
11758
11378
  ),
11759
- (achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
11379
+ (achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
11760
11380
  ] }),
11761
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11762
- /* @__PURE__ */ jsx36("label", { htmlFor: "accountnumber", children: "Account number" }),
11763
- /* @__PURE__ */ jsx36(
11381
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11382
+ /* @__PURE__ */ jsx34("label", { htmlFor: "accountnumber", children: "Account number" }),
11383
+ /* @__PURE__ */ jsx34(
11764
11384
  "input",
11765
11385
  {
11766
11386
  type: "text",
@@ -11773,11 +11393,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11773
11393
  onChange: handleChangeAch
11774
11394
  }
11775
11395
  ),
11776
- (achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
11396
+ (achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
11777
11397
  ] }),
11778
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11779
- /* @__PURE__ */ jsx36("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
11780
- /* @__PURE__ */ jsx36(
11398
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11399
+ /* @__PURE__ */ jsx34("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
11400
+ /* @__PURE__ */ jsx34(
11781
11401
  "input",
11782
11402
  {
11783
11403
  type: "text",
@@ -11790,11 +11410,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11790
11410
  onChange: handleChangeAch
11791
11411
  }
11792
11412
  ),
11793
- (achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
11413
+ (achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
11794
11414
  ] }),
11795
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11796
- /* @__PURE__ */ jsx36("label", { htmlFor: "bankname", children: "Bank name" }),
11797
- /* @__PURE__ */ jsx36(
11415
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11416
+ /* @__PURE__ */ jsx34("label", { htmlFor: "bankname", children: "Bank name" }),
11417
+ /* @__PURE__ */ jsx34(
11798
11418
  "input",
11799
11419
  {
11800
11420
  type: "text",
@@ -11807,11 +11427,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11807
11427
  onChange: handleChangeAch
11808
11428
  }
11809
11429
  ),
11810
- (achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
11430
+ (achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
11811
11431
  ] }),
11812
- ((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11813
- /* @__PURE__ */ jsx36("label", { htmlFor: "companyName", children: "Company name" }),
11814
- /* @__PURE__ */ jsx36(
11432
+ ((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11433
+ /* @__PURE__ */ jsx34("label", { htmlFor: "companyName", children: "Company name" }),
11434
+ /* @__PURE__ */ jsx34(
11815
11435
  "input",
11816
11436
  {
11817
11437
  type: "text",
@@ -11824,60 +11444,60 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11824
11444
  onChange: handleChangeAch
11825
11445
  }
11826
11446
  ),
11827
- (achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
11447
+ (achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
11828
11448
  ] }),
11829
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11830
- /* @__PURE__ */ jsx36("label", { htmlFor: "accounttype", children: "Select account type" }),
11831
- /* @__PURE__ */ jsxs21("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
11832
- /* @__PURE__ */ jsx36("option", { value: "", children: "Select account" }),
11833
- accountTypes.map((type) => /* @__PURE__ */ jsx36("option", { value: type.value, children: type.label }, type.value))
11449
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11450
+ /* @__PURE__ */ jsx34("label", { htmlFor: "accounttype", children: "Select account type" }),
11451
+ /* @__PURE__ */ jsxs20("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
11452
+ /* @__PURE__ */ jsx34("option", { value: "", children: "Select account" }),
11453
+ accountTypes.map((type) => /* @__PURE__ */ jsx34("option", { value: type.value, children: type.label }, type.value))
11834
11454
  ] }),
11835
- bankFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
11455
+ bankFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
11836
11456
  "There is a processing fee of ",
11837
- /* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
11457
+ /* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
11838
11458
  "."
11839
11459
  ] }),
11840
- !saveACHinfo && /* @__PURE__ */ jsxs21(Fragment20, { children: [
11841
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11842
- /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
11460
+ !saveACHinfo && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11461
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11462
+ /* @__PURE__ */ jsx34("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
11843
11463
  setIsBankConsentChecked(e.target.checked);
11844
11464
  if (e.target.checked) {
11845
11465
  setErrorBankConsent("");
11846
11466
  }
11847
11467
  } }),
11848
- /* @__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.` })
11468
+ /* @__PURE__ */ jsx34("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.` })
11849
11469
  ] }),
11850
- errorBankConsent && /* @__PURE__ */ jsx36("span", { className: "error-span", children: errorBankConsent })
11470
+ errorBankConsent && /* @__PURE__ */ jsx34("span", { className: "error-span", children: errorBankConsent })
11851
11471
  ] }),
11852
- customerId && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11853
- /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
11472
+ customerId && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11473
+ /* @__PURE__ */ jsx34("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
11854
11474
  setSaveACHinfo(e.target.checked);
11855
11475
  if (!e.target.checked) {
11856
11476
  setSaveACHConsent1(false);
11857
11477
  setErrorBankConsentOther("");
11858
11478
  }
11859
11479
  } }),
11860
- /* @__PURE__ */ jsx36("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save for future use" })
11480
+ /* @__PURE__ */ jsx34("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save for future use" })
11861
11481
  ] }),
11862
- saveACHinfo && /* @__PURE__ */ jsxs21(Fragment20, { children: [
11863
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11864
- /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "saveACHConsent1", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHConsent1, onChange: (e) => {
11482
+ saveACHinfo && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11483
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11484
+ /* @__PURE__ */ jsx34("input", { type: "checkbox", id: "saveACHConsent1", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHConsent1, onChange: (e) => {
11865
11485
  setSaveACHConsent1(e.target.checked);
11866
11486
  if (e.target.checked) {
11867
11487
  setErrorBankConsentOther("");
11868
11488
  }
11869
11489
  } }),
11870
- /* @__PURE__ */ jsxs21("label", { className: "saveachlabel", htmlFor: "saveACHConsent1", children: [
11490
+ /* @__PURE__ */ jsxs20("label", { className: "saveachlabel", htmlFor: "saveACHConsent1", children: [
11871
11491
  "By providing my bank account information and selecting \u2018Save for future payments\u2019, I authorize ",
11872
11492
  merchantName || "merchant",
11873
11493
  " 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."
11874
11494
  ] })
11875
11495
  ] }),
11876
- errorBankConsentOther && /* @__PURE__ */ jsx36("span", { className: "error-span", children: errorBankConsentOther })
11496
+ errorBankConsentOther && /* @__PURE__ */ jsx34("span", { className: "error-span", children: errorBankConsentOther })
11877
11497
  ] })
11878
11498
  ] })
11879
11499
  ] }),
11880
- /* @__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)) }) })
11500
+ /* @__PURE__ */ jsx34("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx34("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)) }) })
11881
11501
  ] })
11882
11502
  ] }) })
11883
11503
  ] })
@@ -11892,7 +11512,7 @@ var ModelContentSky_default = ModelContentSky;
11892
11512
 
11893
11513
  // src/app/components/Skysystemz/PayButtonWithForm.tsx
11894
11514
  import axios10 from "axios";
11895
- import { Fragment as Fragment21, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
11515
+ import { Fragment as Fragment20, jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
11896
11516
  var PaymentWidget = ({
11897
11517
  amount,
11898
11518
  bankAmount,
@@ -11916,13 +11536,12 @@ var PaymentWidget = ({
11916
11536
  customCSS: customCSS2,
11917
11537
  disableSubmitBtn = false
11918
11538
  }) => {
11919
- const [show, setShow] = useState12(autoTrigger || false);
11920
- const [loading, setLoading] = useState12(false);
11921
- const [childHandleClose, setChildHandleClose] = useState12(() => () => {
11539
+ const [show, setShow] = useState11(autoTrigger || false);
11540
+ const [loading, setLoading] = useState11(false);
11541
+ const [childHandleClose, setChildHandleClose] = useState11(() => () => {
11922
11542
  });
11923
- const [orderGuid, setOrderGuid] = useState12(null);
11924
- const [remainingAmount, setRemainingAmount] = useState12(null);
11925
- const [isTokenizerReady, setTokenizerReady] = useState12(false);
11543
+ const [orderGuid, setOrderGuid] = useState11(null);
11544
+ const [remainingAmount, setRemainingAmount] = useState11(null);
11926
11545
  const initialCommonProps = useMemo(
11927
11546
  () => ({
11928
11547
  amount,
@@ -11972,8 +11591,8 @@ var PaymentWidget = ({
11972
11591
  disableSubmitBtn
11973
11592
  ]
11974
11593
  );
11975
- const [commonProps, setCommonProps] = useState12(initialCommonProps);
11976
- useEffect19(() => {
11594
+ const [commonProps, setCommonProps] = useState11(initialCommonProps);
11595
+ useEffect16(() => {
11977
11596
  if (show) {
11978
11597
  setCommonProps(initialCommonProps);
11979
11598
  }
@@ -12004,36 +11623,35 @@ var PaymentWidget = ({
12004
11623
  setLoading(false);
12005
11624
  }
12006
11625
  };
12007
- useEffect19(() => {
11626
+ useEffect16(() => {
12008
11627
  if (show && isPartial && partialRef) {
12009
11628
  getskyosOrderDetails();
12010
11629
  }
12011
11630
  }, [show, isPartial, partialRef]);
12012
- console.log("isTokenizerReady", isTokenizerReady);
12013
- return /* @__PURE__ */ jsxs22(Fragment21, { children: [
12014
- /* @__PURE__ */ jsx37("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
12015
- /* @__PURE__ */ jsx37(DataScript, {}),
12016
- /* @__PURE__ */ jsx37(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
12017
- /* @__PURE__ */ jsx37(SkyChargewidgetstyles, {}),
12018
- /* @__PURE__ */ jsx37(CardBankRadioStyles, {}),
12019
- /* @__PURE__ */ jsx37(CustomModal2styles_default, {}),
12020
- /* @__PURE__ */ jsx37(DataCapScriptLoader, {}),
12021
- !autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", disabled: disableSubmitBtn, onClick: () => setShow(true), children: [
11631
+ return /* @__PURE__ */ jsxs21(Fragment20, { children: [
11632
+ /* @__PURE__ */ jsx35("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
11633
+ /* @__PURE__ */ jsx35(DataScript, {}),
11634
+ /* @__PURE__ */ jsx35(FractalTokenizerScript, {}),
11635
+ /* @__PURE__ */ jsx35(SkyChargewidgetstyles, {}),
11636
+ /* @__PURE__ */ jsx35(CardBankRadioStyles, {}),
11637
+ /* @__PURE__ */ jsx35(CustomModal2styles_default, {}),
11638
+ /* @__PURE__ */ jsx35(DataCapScriptLoader, {}),
11639
+ !autoTrigger && /* @__PURE__ */ jsxs21("button", { className: submitBtnClass || "paymentBtn", disabled: disableSubmitBtn, onClick: () => setShow(true), children: [
12022
11640
  submitBtnText,
12023
11641
  submitBtnIcon
12024
11642
  ] }),
12025
- !autoTrigger ? /* @__PURE__ */ jsx37(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx37(ModelContentSky_default, __spreadProps(__spreadValues({ isTokenizerReady, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx37(ModelContentSky_default, __spreadProps(__spreadValues({ isTokenizerReady, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
11643
+ !autoTrigger ? /* @__PURE__ */ jsx35(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx35(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx35(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
12026
11644
  ] });
12027
11645
  };
12028
11646
 
12029
11647
  // src/app/components/Skysystemz/EmbeddedCheckout.tsx
12030
- import { useEffect as useEffect21, useState as useState13, useMemo as useMemo2 } from "react";
11648
+ import { useEffect as useEffect18, useState as useState12, useMemo as useMemo2 } from "react";
12031
11649
  import axios11 from "axios";
12032
11650
 
12033
11651
  // src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
12034
- import { jsx as jsx38 } from "react/jsx-runtime";
11652
+ import { jsx as jsx36 } from "react/jsx-runtime";
12035
11653
  function EmbeddedCheckoutStyles({ extraCustomCSS }) {
12036
- return /* @__PURE__ */ jsx38("style", { children: `
11654
+ return /* @__PURE__ */ jsx36("style", { children: `
12037
11655
 
12038
11656
  .pay-amount-conatiner{
12039
11657
  margin-top: 20px !important;
@@ -12379,27 +11997,27 @@ padding:0px !important;
12379
11997
  }
12380
11998
 
12381
11999
  // src/app/components/Atoms/Applepay/ApplePayScriptLoader.tsx
12382
- import { useEffect as useEffect20 } from "react";
12000
+ import { useEffect as useEffect17 } from "react";
12383
12001
  var applePayScriptLoaded = false;
12384
12002
  var ApplePayScriptLoader = () => {
12385
- useEffect20(() => {
12003
+ useEffect17(() => {
12386
12004
  if (applePayScriptLoaded) return;
12387
12005
  const existingScript = document.querySelector(
12388
12006
  `script[src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"]`
12389
12007
  );
12390
12008
  if (!existingScript) {
12391
- const script = document.createElement("script");
12392
- script.src = "https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js";
12393
- script.async = true;
12394
- script.onload = () => {
12009
+ const script2 = document.createElement("script");
12010
+ script2.src = "https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js";
12011
+ script2.async = true;
12012
+ script2.onload = () => {
12395
12013
  console.log("\u2705 Apple Pay script loaded");
12396
12014
  applePayScriptLoaded = true;
12397
12015
  console.log("ApplePaySession:", window.ApplePaySession);
12398
12016
  };
12399
- script.onerror = (err) => {
12017
+ script2.onerror = (err) => {
12400
12018
  console.error("\u274C Apple Pay script failed", err);
12401
12019
  };
12402
- document.head.appendChild(script);
12020
+ document.head.appendChild(script2);
12403
12021
  } else {
12404
12022
  applePayScriptLoaded = true;
12405
12023
  }
@@ -12408,7 +12026,7 @@ var ApplePayScriptLoader = () => {
12408
12026
  };
12409
12027
 
12410
12028
  // src/app/components/Skysystemz/EmbeddedCheckout.tsx
12411
- import { Fragment as Fragment22, jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
12029
+ import { Fragment as Fragment21, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
12412
12030
  var EmbeddedCheckout = ({
12413
12031
  amount,
12414
12032
  bankAmount,
@@ -12433,13 +12051,12 @@ var EmbeddedCheckout = ({
12433
12051
  onLoad,
12434
12052
  customCSS: customCSS2
12435
12053
  }) => {
12436
- const [show, setShow] = useState13(false);
12437
- const [loading, setLoading] = useState13(false);
12438
- const [childHandleClose, setChildHandleClose] = useState13(() => () => {
12054
+ const [show, setShow] = useState12(false);
12055
+ const [loading, setLoading] = useState12(false);
12056
+ const [childHandleClose, setChildHandleClose] = useState12(() => () => {
12439
12057
  });
12440
- const [orderGuid, setOrderGuid] = useState13(null);
12441
- const [remainingAmount, setRemainingAmount] = useState13(null);
12442
- const [isTokenizerReady, setTokenizerReady] = useState13(false);
12058
+ const [orderGuid, setOrderGuid] = useState12(null);
12059
+ const [remainingAmount, setRemainingAmount] = useState12(null);
12443
12060
  const initialCommonProps = useMemo2(
12444
12061
  () => ({
12445
12062
  amount,
@@ -12486,8 +12103,8 @@ var EmbeddedCheckout = ({
12486
12103
  partialRef
12487
12104
  ]
12488
12105
  );
12489
- const [commonProps, setCommonProps] = useState13(initialCommonProps);
12490
- useEffect21(() => {
12106
+ const [commonProps, setCommonProps] = useState12(initialCommonProps);
12107
+ useEffect18(() => {
12491
12108
  if (show) {
12492
12109
  setCommonProps(initialCommonProps);
12493
12110
  }
@@ -12518,13 +12135,13 @@ var EmbeddedCheckout = ({
12518
12135
  setLoading(false);
12519
12136
  }
12520
12137
  };
12521
- useEffect21(() => {
12138
+ useEffect18(() => {
12522
12139
  if (show && isPartial && partialRef) {
12523
12140
  getskyosOrderDetails();
12524
12141
  }
12525
12142
  }, [show, isPartial, partialRef]);
12526
12143
  console.log(onLoad, "onLoad");
12527
- useEffect21(() => {
12144
+ useEffect18(() => {
12528
12145
  const supported = !!window.ApplePaySession;
12529
12146
  let canPay = false;
12530
12147
  if (supported) {
@@ -12535,21 +12152,21 @@ var EmbeddedCheckout = ({
12535
12152
  }
12536
12153
  console.log(`ApplePaySession: ${supported}, canMakePayments: ${canPay}`);
12537
12154
  }, []);
12538
- return /* @__PURE__ */ jsxs23(Fragment22, { children: [
12539
- /* @__PURE__ */ jsx39("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
12540
- /* @__PURE__ */ jsx39(DataScript, {}),
12541
- /* @__PURE__ */ jsx39(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
12542
- /* @__PURE__ */ jsx39(SkyChargewidgetstyles, {}),
12543
- /* @__PURE__ */ jsx39(CardBankRadioStyles, {}),
12544
- /* @__PURE__ */ jsx39(CustomModal2styles_default, {}),
12545
- /* @__PURE__ */ jsx39(DataCapScriptLoader, {}),
12546
- /* @__PURE__ */ jsx39(ApplePayScriptLoader, {}),
12547
- /* @__PURE__ */ jsx39(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
12548
- !autoTrigger && /* @__PURE__ */ jsxs23("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
12155
+ return /* @__PURE__ */ jsxs22(Fragment21, { children: [
12156
+ /* @__PURE__ */ jsx37("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
12157
+ /* @__PURE__ */ jsx37(DataScript, {}),
12158
+ /* @__PURE__ */ jsx37(FractalTokenizerScript, {}),
12159
+ /* @__PURE__ */ jsx37(SkyChargewidgetstyles, {}),
12160
+ /* @__PURE__ */ jsx37(CardBankRadioStyles, {}),
12161
+ /* @__PURE__ */ jsx37(CustomModal2styles_default, {}),
12162
+ /* @__PURE__ */ jsx37(DataCapScriptLoader, {}),
12163
+ /* @__PURE__ */ jsx37(ApplePayScriptLoader, {}),
12164
+ /* @__PURE__ */ jsx37(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
12165
+ !autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
12549
12166
  submitBtnText,
12550
12167
  submitBtnIcon
12551
12168
  ] }),
12552
- !autoTrigger ? /* @__PURE__ */ jsx39(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx39(ModelContentSky_default, __spreadProps(__spreadValues({ isTokenizerReady, onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx39(ModelContentSky_default, __spreadProps(__spreadValues({ isTokenizerReady, onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
12169
+ !autoTrigger ? /* @__PURE__ */ jsx37(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx37(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx37(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
12553
12170
  ] });
12554
12171
  };
12555
12172
  export {