@fractalpay/fractalpay-next 0.0.41 → 0.0.43

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",
42
- version: "0.0.41",
42
+ version: "0.0.43",
43
43
  private: false,
44
44
  type: "module",
45
45
  scripts: {
@@ -8800,7 +8800,7 @@ function PartialPayment(props) {
8800
8800
  }
8801
8801
 
8802
8802
  // src/app/components/Skysystemz/PayButtonWithForm.tsx
8803
- import { useEffect as useEffect18, useState as useState12, useMemo } from "react";
8803
+ import { useEffect as useEffect17, useState as useState11, useMemo } from "react";
8804
8804
 
8805
8805
  // src/app/components/Skysystemz/SkyChargewidgetstyles.tsx
8806
8806
  import { jsx as jsx29 } from "react/jsx-runtime";
@@ -9646,7 +9646,7 @@ padding:0px !important;
9646
9646
  }
9647
9647
 
9648
9648
  // src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
9649
- import { useCallback, useEffect as useEffect17, useRef as useRef11, useState as useState11 } from "react";
9649
+ import { useCallback, useEffect as useEffect16, useRef as useRef11, useState as useState10 } from "react";
9650
9650
  import axios9 from "axios";
9651
9651
  import Swal5 from "sweetalert2";
9652
9652
 
@@ -9932,199 +9932,146 @@ var ErrorCardOverlay = ({ onClose, error, autoTrigger = false }) => {
9932
9932
  };
9933
9933
  var ErrorCardOverlay_default = ErrorCardOverlay;
9934
9934
 
9935
- // src/app/components/Atoms/Googlepay/Googlepay.tsx
9936
- import { useRef as useRef10 } from "react";
9937
-
9938
- // src/app/components/Atoms/Googlepay/GooglePayScriptLoader.tsx
9939
- import { useEffect as useEffect15 } from "react";
9940
- var googlePayScriptLoaded = false;
9941
- var GooglePayScriptLoader = ({
9942
- onLoad
9943
- }) => {
9944
- useEffect15(() => {
9945
- if (googlePayScriptLoaded) {
9946
- onLoad == null ? void 0 : onLoad();
9947
- return;
9948
- }
9949
- const existingScript = document.querySelector(
9950
- `script[src="https://pay.google.com/gp/p/js/pay.js"]`
9951
- );
9952
- if (!existingScript) {
9953
- const script2 = document.createElement("script");
9954
- script2.src = "https://pay.google.com/gp/p/js/pay.js";
9955
- script2.async = true;
9956
- script2.onload = () => {
9957
- console.log("\u2705 Google Pay script loaded");
9958
- googlePayScriptLoaded = true;
9959
- console.log("google:", window.google);
9960
- onLoad == null ? void 0 : onLoad();
9961
- };
9962
- script2.onerror = (err) => {
9963
- console.error("\u274C Google Pay script failed", err);
9964
- };
9965
- document.head.appendChild(script2);
9966
- } else {
9967
- googlePayScriptLoaded = true;
9968
- onLoad == null ? void 0 : onLoad();
9969
- }
9970
- }, []);
9971
- return null;
9972
- };
9973
-
9974
- // src/app/components/Atoms/Googlepay/Googlepay.tsx
9975
- import { Fragment as Fragment19, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
9976
- function GooglePayComponent({
9977
- amount,
9978
- googlePayEnvironment: googlePayEnvironment2,
9979
- googlePayGatewayMerchantId: googlePayGatewayMerchantId2,
9980
- googlePayMerchantId: googlePayMerchantId2,
9981
- googlePayMerchantName,
9982
- require3ds = false,
9983
- completeFractalFlow,
9984
- setLoading
9935
+ // src/app/components/Atoms/Applepay/ApplePayButton.tsx
9936
+ import { useEffect as useEffect15, useRef as useRef10 } from "react";
9937
+ import { jsx as jsx34 } from "react/jsx-runtime";
9938
+ function ApplePayButton({
9939
+ applePayMerchantId: applePayMerchantId2,
9940
+ applePayAmount,
9941
+ applePayMerchantName,
9942
+ showLoader,
9943
+ completeFractalFlow
9985
9944
  }) {
9986
- const containerRef = useRef10(null);
9987
- const paymentsClientRef = useRef10(null);
9988
- const baseRequest = {
9989
- apiVersion: 2,
9990
- apiVersionMinor: 0
9991
- };
9992
- const allowedCardNetworks = ["AMEX", "DISCOVER", "MASTERCARD", "VISA"];
9993
- const allowedCardAuthMethods = require3ds ? ["CRYPTOGRAM_3DS"] : ["PAN_ONLY", "CRYPTOGRAM_3DS"];
9994
- const baseCardPaymentMethod = {
9995
- type: "CARD",
9996
- parameters: {
9997
- allowedAuthMethods: allowedCardAuthMethods,
9998
- allowedCardNetworks
9999
- }
9945
+ const applePayRef = useRef10(null);
9946
+ const paymentRequestMethods = [
9947
+ {
9948
+ supportedMethods: "https://apple.com/apple-pay",
9949
+ data: {
9950
+ version: 3,
9951
+ merchantIdentifier: applePayMerchantId2,
9952
+ // FIXED
9953
+ merchantCapabilities: ["supports3DS"],
9954
+ supportedNetworks: ["amex", "discover", "mastercard", "visa"],
9955
+ // ✅ FIXED
9956
+ countryCode: "US"
9957
+ }
9958
+ }
9959
+ ];
9960
+ const paymentRequestOptions = {
9961
+ requestPayerName: false,
9962
+ requestPayerEmail: false,
9963
+ requestPayerPhone: false,
9964
+ requestShipping: false
10000
9965
  };
10001
- const cardPaymentMethod = __spreadProps(__spreadValues({}, baseCardPaymentMethod), {
10002
- tokenizationSpecification: {
10003
- type: "PAYMENT_GATEWAY",
10004
- parameters: {
10005
- gateway: googlePayGatewayMerchantId2,
10006
- gatewayMerchantId: googlePayGatewayMerchantId2
9966
+ function buildPaymentDetails() {
9967
+ return {
9968
+ total: {
9969
+ label: applePayMerchantName,
9970
+ amount: {
9971
+ currency: "USD",
9972
+ value: applePayAmount
9973
+ }
10007
9974
  }
10008
- }
10009
- });
10010
- const handlePaymentAuthorization = async (paymentData) => {
10011
- var _a, _b;
9975
+ };
9976
+ }
9977
+ async function validateMerchant(event) {
9978
+ var _a;
9979
+ console.log("\u{1F7E1} STEP 1: Merchant validation started");
10012
9980
  try {
10013
- const token = (_b = (_a = paymentData == null ? void 0 : paymentData.paymentMethodData) == null ? void 0 : _a.tokenizationData) == null ? void 0 : _b.token;
10014
- if (!token) throw new Error("Missing token");
10015
- const parsed = JSON.parse(token);
10016
- console.log(parsed, "parsed token");
10017
- setLoading(true);
10018
- completeFractalFlow(parsed, null, "google_pay");
10019
- return {
10020
- transactionState: "SUCCESS"
10021
- // ✅ CLOSES GOOGLE PAY POPUP
10022
- };
10023
- } catch (err) {
10024
- console.error("Payment failed:", err);
10025
- return {
10026
- transactionState: "ERROR",
10027
- // CLOSES WITH ERROR UI
10028
- error: {
10029
- intent: "PAYMENT_AUTHORIZATION",
10030
- message: "Payment failed",
10031
- reason: "PAYMENT_DATA_INVALID"
10032
- }
10033
- };
10034
- }
10035
- };
10036
- const getPaymentsClient = () => {
10037
- if (!paymentsClientRef.current && typeof window !== "undefined") {
10038
- const google = window.google;
10039
- if (!google) return null;
10040
- paymentsClientRef.current = new google.payments.api.PaymentsClient({
10041
- environment: googlePayEnvironment2,
10042
- // ✅ ADD THIS
10043
- paymentDataCallbacks: {
10044
- onPaymentAuthorized: handlePaymentAuthorization
9981
+ console.log("Validation URL:", event.validationURL);
9982
+ console.log("Domain:", window.location.hostname);
9983
+ const res = await fetch(
9984
+ `${masterBaseUrl}api/v1/widget/generate-apple-pay-session`,
9985
+ {
9986
+ method: "POST",
9987
+ headers: {
9988
+ "Content-Type": "application/json"
9989
+ },
9990
+ body: JSON.stringify({
9991
+ validationUrl: event.validationURL,
9992
+ applePayMerchantId: applePayMerchantId2,
9993
+ applepayDisplayName: applePayMerchantName,
9994
+ requestDomain: window.location.hostname
9995
+ // IMPORTANT
9996
+ })
10045
9997
  }
10046
- });
10047
- }
10048
- return paymentsClientRef.current;
10049
- };
10050
- const getIsReadyToPayRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
10051
- allowedPaymentMethods: [baseCardPaymentMethod]
10052
- });
10053
- const getTransactionInfo = () => ({
10054
- countryCode: "US",
10055
- currencyCode: "USD",
10056
- totalPriceStatus: "FINAL",
10057
- totalPrice: amount,
10058
- checkoutOption: "COMPLETE_IMMEDIATE_PURCHASE"
10059
- });
10060
- const getPaymentDataRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
10061
- allowedPaymentMethods: [cardPaymentMethod],
10062
- transactionInfo: getTransactionInfo(),
10063
- merchantInfo: {
10064
- merchantId: googlePayMerchantId2,
10065
- merchantName: googlePayMerchantName
10066
- },
10067
- // ✅ ADD THIS
10068
- callbackIntents: ["PAYMENT_AUTHORIZATION"]
10069
- });
10070
- const initializeGooglePay = async () => {
10071
- try {
10072
- const client = getPaymentsClient();
10073
- if (!client) {
10074
- console.error("Google Pay client not ready");
10075
- return;
10076
- }
10077
- const response = await client.isReadyToPay(
10078
- getIsReadyToPayRequest()
10079
9998
  );
10080
- if (response.result && containerRef.current) {
10081
- const button = client.createButton({
10082
- onClick: onGooglePayClick,
10083
- allowedPaymentMethods: [baseCardPaymentMethod],
10084
- buttonType: "pay",
10085
- buttonColor: "black",
10086
- buttonRadius: 8
10087
- });
10088
- if (containerRef.current) {
10089
- containerRef.current.innerHTML = "";
10090
- }
10091
- containerRef.current.appendChild(button);
9999
+ console.log("\u{1F7E1} STEP 2: Response status:", res.status);
10000
+ const data = await res.json();
10001
+ console.log("RAW session response:", JSON.stringify(data));
10002
+ console.log("\u{1F7E2} STEP 3: Session response: data fetched");
10003
+ const merchantSession = (_a = data == null ? void 0 : data.data) != null ? _a : data;
10004
+ if (!merchantSession || typeof merchantSession !== "object") {
10005
+ console.error("\u274C Bad session shape");
10006
+ event.complete(null);
10007
+ return;
10092
10008
  }
10009
+ console.log("\u{1F7E2} STEP 4.1: Completing merchant validation");
10010
+ event.complete(merchantSession);
10011
+ console.log("\u{1F7E2} STEP 4.2: Completed merchant validation");
10093
10012
  } catch (err) {
10094
- console.error("Google Pay init error:", err);
10013
+ console.log("\u274C Merchant validation failed:", err == null ? void 0 : err.message);
10014
+ event.complete(null);
10095
10015
  }
10096
- };
10097
- const onGooglePayClick = async () => {
10098
- const client = getPaymentsClient();
10099
- if (!client) {
10100
- console.error("Google Pay client not ready");
10101
- return;
10016
+ }
10017
+ async function authorizePayment(paymentResponse) {
10018
+ console.log("\u{1F7E1} STEP 5: Authorizing payment");
10019
+ try {
10020
+ const token = paymentResponse.details.token.paymentData;
10021
+ console.log("\u{1F7E2} STEP 6: Got token");
10022
+ await completeFractalFlow(token, null, "apple_pay");
10023
+ await paymentResponse.complete("success");
10024
+ console.log("\u2705 Payment completed successfully");
10025
+ } catch (err) {
10026
+ console.log("\u274C Authorization failed:", err == null ? void 0 : err.message);
10027
+ await paymentResponse.complete("fail");
10102
10028
  }
10029
+ }
10030
+ async function handleApplePayClick() {
10031
+ console.log("\u{1F7E1} STEP A: Click detected");
10103
10032
  try {
10104
- await client.loadPaymentData(getPaymentDataRequest());
10033
+ const request = new PaymentRequest(
10034
+ paymentRequestMethods,
10035
+ buildPaymentDetails(),
10036
+ paymentRequestOptions
10037
+ );
10038
+ request.onmerchantvalidation = validateMerchant;
10039
+ console.log("\u{1F7E1} STEP B: Calling show()");
10040
+ const response = await request.show();
10041
+ console.log("\u{1F7E2} STEP C: Payment sheet opened");
10042
+ await authorizePayment(response);
10105
10043
  } catch (err) {
10106
- if ((err == null ? void 0 : err.statusCode) !== "CANCELED") {
10107
- console.error(err);
10108
- }
10044
+ console.log("\u274C Apple Pay flow failed:", err == null ? void 0 : err.message);
10109
10045
  }
10110
- };
10111
- const onScriptLoad = () => {
10112
- if (!googlePayEnvironment2 || !googlePayGatewayMerchantId2 || !amount || !googlePayMerchantId2) {
10113
- console.error("Missing Google Pay config");
10114
- return;
10046
+ }
10047
+ useEffect15(() => {
10048
+ if (window.ApplePaySession && window.ApplePaySession.canMakePayments()) {
10049
+ console.log("\u2705 Apple Pay is available");
10050
+ } else {
10051
+ console.log("\u274C Apple Pay NOT available");
10115
10052
  }
10116
- setTimeout(() => {
10117
- initializeGooglePay();
10118
- }, 0);
10119
- };
10120
- return /* @__PURE__ */ jsxs20(Fragment19, { children: [
10121
- /* @__PURE__ */ jsx34("div", { ref: containerRef, className: "text-center" }),
10122
- /* @__PURE__ */ jsx34(GooglePayScriptLoader, { onLoad: onScriptLoad })
10123
- ] });
10053
+ }, []);
10054
+ useEffect15(() => {
10055
+ const btn = applePayRef.current;
10056
+ if (!btn) return;
10057
+ const handleClick = () => handleApplePayClick();
10058
+ btn.addEventListener("click", handleClick);
10059
+ return () => btn.removeEventListener("click", handleClick);
10060
+ }, [applePayMerchantId2, applePayAmount, applePayMerchantName]);
10061
+ return /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(
10062
+ "apple-pay-button",
10063
+ {
10064
+ ref: applePayRef,
10065
+ buttonstyle: "black",
10066
+ type: "pay",
10067
+ locale: "en-US",
10068
+ style: { width: "100%" }
10069
+ }
10070
+ ) });
10124
10071
  }
10125
10072
 
10126
10073
  // src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
10127
- import { Fragment as Fragment20, jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
10074
+ import { Fragment as Fragment19, jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
10128
10075
  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 }) => {
10129
10076
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
10130
10077
  const hasRunRef = useRef11(false);
@@ -10134,45 +10081,45 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10134
10081
  const expiryMonthRef = useRef11(null);
10135
10082
  const cardListRunRef = useRef11(false);
10136
10083
  const threeDSContainerRef = useRef11(null);
10137
- const [activetab, setActive] = useState11("card");
10138
- const [activeList, setActiveList] = useState11("card");
10139
- const [cardData, setCardData] = useState11();
10140
- const [cardError, setCardError] = useState11({});
10141
- const [achData, setAchData] = useState11();
10142
- const [achError, setAchError] = useState11({});
10143
- const [saveACHinfo, setSaveACHinfo] = useState11(false);
10144
- const [saveACHConsent1, setSaveACHConsent1] = useState11(false);
10145
- const [saveCardInfo, setSaveCardInfo] = useState11(false);
10146
- const [error, setError] = useState11("");
10147
- const [errorIframe, setErrorIframe] = useState11("");
10148
- const [success, setSuccess] = useState11(false);
10149
- let [tranId, setTranId] = useState11("");
10150
- const [loading, setLoading] = useState11(false);
10151
- const [loading2, setLoading2] = useState11(false);
10152
- const [loadingIframe, setLoadingIframe] = useState11(false);
10153
- const [cardList, setCardList] = useState11([]);
10154
- const [bankList, setBankList] = useState11([]);
10155
- const [selectedCard, setSelectedCard] = useState11();
10156
- const [cashDiscount, setCashDiscount] = useState11(Number(amount));
10157
- const [activeinCard, setActiveinCard] = useState11("form");
10158
- const [activeinBank, setActiveinBank] = useState11("form");
10159
- const [isBankActive, setIsBankActive] = useState11(false);
10160
- const [processingFee, setProcessingFee] = useState11(0);
10161
- const [clientSecret, setClientSecret] = useState11("");
10162
- const [errorMessage, setErrorMessage] = useState11(null);
10163
- const [initialLoader, setInitialLoader] = useState11(false);
10164
- const [is3DSEnable, setIs3DSEnable] = useState11(false);
10165
- const [stripeResponse, setStripeResponse] = useState11(null);
10166
- const [orderLoader, setOrderLoader] = useState11(false);
10167
- const [orderGuid, setOrderGuid] = useState11(ordGuid || null);
10168
- const [partialAmount, setPartialAmount] = useState11("");
10169
- const [partialError, setPartialError] = useState11("");
10170
- const [remainingAmount, setRemainingAmount] = useState11("");
10171
- const [paymentGateway, setPaymentGateway] = useState11();
10172
- const [dcToken, setDCToken] = useState11();
10173
- const [isBankConsentChecked, setIsBankConsentChecked] = useState11(false);
10174
- const [errorBankConsent, setErrorBankConsent] = useState11("");
10175
- const [errorBankConsentOther, setErrorBankConsentOther] = useState11("");
10084
+ const [activetab, setActive] = useState10("card");
10085
+ const [activeList, setActiveList] = useState10("card");
10086
+ const [cardData, setCardData] = useState10();
10087
+ const [cardError, setCardError] = useState10({});
10088
+ const [achData, setAchData] = useState10();
10089
+ const [achError, setAchError] = useState10({});
10090
+ const [saveACHinfo, setSaveACHinfo] = useState10(false);
10091
+ const [saveACHConsent1, setSaveACHConsent1] = useState10(false);
10092
+ const [saveCardInfo, setSaveCardInfo] = useState10(false);
10093
+ const [error, setError] = useState10("");
10094
+ const [errorIframe, setErrorIframe] = useState10("");
10095
+ const [success, setSuccess] = useState10(false);
10096
+ let [tranId, setTranId] = useState10("");
10097
+ const [loading, setLoading] = useState10(false);
10098
+ const [loading2, setLoading2] = useState10(false);
10099
+ const [loadingIframe, setLoadingIframe] = useState10(false);
10100
+ const [cardList, setCardList] = useState10([]);
10101
+ const [bankList, setBankList] = useState10([]);
10102
+ const [selectedCard, setSelectedCard] = useState10();
10103
+ const [cashDiscount, setCashDiscount] = useState10(Number(amount));
10104
+ const [activeinCard, setActiveinCard] = useState10("form");
10105
+ const [activeinBank, setActiveinBank] = useState10("form");
10106
+ const [isBankActive, setIsBankActive] = useState10(false);
10107
+ const [processingFee, setProcessingFee] = useState10(0);
10108
+ const [clientSecret, setClientSecret] = useState10("");
10109
+ const [errorMessage, setErrorMessage] = useState10(null);
10110
+ const [initialLoader, setInitialLoader] = useState10(false);
10111
+ const [is3DSEnable, setIs3DSEnable] = useState10(false);
10112
+ const [stripeResponse, setStripeResponse] = useState10(null);
10113
+ const [orderLoader, setOrderLoader] = useState10(false);
10114
+ const [orderGuid, setOrderGuid] = useState10(ordGuid || null);
10115
+ const [partialAmount, setPartialAmount] = useState10("");
10116
+ const [partialError, setPartialError] = useState10("");
10117
+ const [remainingAmount, setRemainingAmount] = useState10("");
10118
+ const [paymentGateway, setPaymentGateway] = useState10();
10119
+ const [dcToken, setDCToken] = useState10();
10120
+ const [isBankConsentChecked, setIsBankConsentChecked] = useState10(false);
10121
+ const [errorBankConsent, setErrorBankConsent] = useState10("");
10122
+ const [errorBankConsentOther, setErrorBankConsentOther] = useState10("");
10176
10123
  let mastercard2 = S3Url + "widget/mc-img.svg";
10177
10124
  let visa2 = S3Url + "widget/visa-img.svg";
10178
10125
  let americanexp2 = S3Url + "widget/ae-img.svg";
@@ -11066,13 +11013,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11066
11013
  setOrderLoader(false);
11067
11014
  }
11068
11015
  };
11069
- useEffect17(() => {
11016
+ useEffect16(() => {
11070
11017
  if (!show && !autoTrigger) {
11071
11018
  hasRunRef.current = false;
11072
11019
  cardListRunRef.current = false;
11073
11020
  }
11074
11021
  }, [show, autoTrigger]);
11075
- useEffect17(() => {
11022
+ useEffect16(() => {
11076
11023
  if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
11077
11024
  getPaymentDetails();
11078
11025
  if (isPartial && !partialRef) {
@@ -11080,7 +11027,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11080
11027
  }
11081
11028
  }
11082
11029
  }, [show, autoTrigger, isPartial, onLoad]);
11083
- useEffect17(() => {
11030
+ useEffect16(() => {
11084
11031
  if ((show || autoTrigger) && pass_fee_amount) {
11085
11032
  let cashdisc = Number(amount) - Number(pass_fee_amount);
11086
11033
  if (cashdisc && !isNaN(cashdisc)) {
@@ -11142,7 +11089,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11142
11089
  console.error("3DS Auth failed \u274C", status);
11143
11090
  setError(`3DS Authentication ${status}`);
11144
11091
  };
11145
- useEffect17(() => {
11092
+ useEffect16(() => {
11146
11093
  if (setHandleCloseRef) {
11147
11094
  setHandleCloseRef(() => handleClose);
11148
11095
  }
@@ -11160,7 +11107,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11160
11107
  setPartialError("");
11161
11108
  }
11162
11109
  };
11163
- useEffect17(() => {
11110
+ useEffect16(() => {
11164
11111
  if (typeof FractalTokenizer === "undefined") return;
11165
11112
  const tokenizer = new FractalTokenizer({
11166
11113
  styles: {}
@@ -11171,7 +11118,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11171
11118
  activeinCard,
11172
11119
  activetab
11173
11120
  });
11174
- useEffect17(() => {
11121
+ useEffect16(() => {
11175
11122
  stateRef.current = {
11176
11123
  activeinBank,
11177
11124
  activeinCard,
@@ -11195,7 +11142,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11195
11142
  }
11196
11143
  }
11197
11144
  }, []);
11198
- useEffect17(() => {
11145
+ useEffect16(() => {
11199
11146
  onSubmit == null ? void 0 : onSubmit(submit);
11200
11147
  }, [onSubmit, submit]);
11201
11148
  function detectCardType(cardinput) {
@@ -11238,15 +11185,15 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11238
11185
  return /* @__PURE__ */ jsx35("img", { src: defualtcardborder, alt: "card" });
11239
11186
  }
11240
11187
  }
11241
- return /* @__PURE__ */ jsxs21(Fragment20, { children: [
11188
+ return /* @__PURE__ */ jsxs20(Fragment19, { children: [
11242
11189
  (initialLoader || !onLoad) && /* @__PURE__ */ jsx35(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
11243
11190
  error && /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
11244
11191
  errorIframe && /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
11245
11192
  setErrorIframe("");
11246
11193
  }, autoTrigger: onSubmit ? !onSubmit : autoTrigger }) }),
11247
- /* @__PURE__ */ jsxs21(Fragment20, { children: [
11194
+ /* @__PURE__ */ jsxs20(Fragment19, { children: [
11248
11195
  (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx35(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
11249
- /* @__PURE__ */ jsxs21("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
11196
+ /* @__PURE__ */ jsxs20("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
11250
11197
  /* @__PURE__ */ jsx35("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
11251
11198
  (stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx35(
11252
11199
  ThreeDSChallenge,
@@ -11258,31 +11205,31 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11258
11205
  onSuccess: handleSuccess,
11259
11206
  onError: handleError
11260
11207
  }
11261
- ) : /* @__PURE__ */ jsxs21("div", { className: "parent-pay-container", children: [
11262
- /* @__PURE__ */ jsx35("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs21("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
11208
+ ) : /* @__PURE__ */ jsxs20("div", { className: "parent-pay-container", children: [
11209
+ /* @__PURE__ */ jsx35("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs20("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
11263
11210
  /* @__PURE__ */ jsx35("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx35("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" }) }),
11264
11211
  /* @__PURE__ */ jsx35("defs", { children: /* @__PURE__ */ jsx35("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx35("rect", { width: "16", height: "16", fill: "white" }) }) })
11265
11212
  ] }) }),
11266
11213
  /* @__PURE__ */ jsx35("div", { className: "pay-main-logo-res" }),
11267
- /* @__PURE__ */ jsxs21("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
11268
- !onSubmit && /* @__PURE__ */ jsxs21("div", { className: "pay-header pay-conatiner-one", children: [
11269
- /* @__PURE__ */ jsxs21("div", { className: "pay-conatiner-one-first", children: [
11270
- /* @__PURE__ */ jsxs21("div", { className: "pay-logo-container", children: [
11214
+ /* @__PURE__ */ jsxs20("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
11215
+ !onSubmit && /* @__PURE__ */ jsxs20("div", { className: "pay-header pay-conatiner-one", children: [
11216
+ /* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-first", children: [
11217
+ /* @__PURE__ */ jsxs20("div", { className: "pay-logo-container", children: [
11271
11218
  /* @__PURE__ */ jsx35("div", { className: "pay-main-logo" }),
11272
11219
  /* @__PURE__ */ jsx35("h1", { className: "pay-heading", children: "Pay" }),
11273
- (cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs21("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
11220
+ (cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs20("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
11274
11221
  " ",
11275
11222
  /* @__PURE__ */ jsx35(IoArrowBack4, {}),
11276
11223
  " Back"
11277
11224
  ] })
11278
11225
  ] }),
11279
- /* @__PURE__ */ jsx35("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs21("div", { className: "pay-amount-conatiner", children: [
11226
+ /* @__PURE__ */ jsx35("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
11280
11227
  /* @__PURE__ */ jsx35("small", { className: "pay-payment-amount", children: "Select payment type" }),
11281
- /* @__PURE__ */ jsxs21("div", { className: "frac-card-bank-radio-main", children: [
11228
+ /* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
11282
11229
  /* @__PURE__ */ jsx35(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
11283
11230
  !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx35(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
11284
11231
  ] }),
11285
- isPartial && /* @__PURE__ */ jsxs21("div", { className: "frac-partial-payment-input", children: [
11232
+ isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
11286
11233
  /* @__PURE__ */ jsx35("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
11287
11234
  /* @__PURE__ */ jsx35(
11288
11235
  NumericFormat2,
@@ -11312,19 +11259,19 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11312
11259
  ] })
11313
11260
  ] }) })
11314
11261
  ] }),
11315
- /* @__PURE__ */ jsxs21("div", { className: "pay-conatiner-one-last", children: [
11262
+ /* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-last", children: [
11316
11263
  /* @__PURE__ */ jsx35("img", { src: secure2, alt: "" }),
11317
11264
  /* @__PURE__ */ jsx35("img", { src: pov2, alt: "" }),
11318
11265
  "Secure payments powered by Fractal"
11319
11266
  ] })
11320
11267
  ] }),
11321
- /* @__PURE__ */ jsx35("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx35("div", { className: "col-md-12", children: /* @__PURE__ */ jsxs21("div", { id: "payment-form-div ", className: onSubmit ? "frac-payment-form-div" : "", children: [
11322
- onSubmit && /* @__PURE__ */ jsx35("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs21("div", { className: "pay-amount-conatiner", children: [
11323
- /* @__PURE__ */ jsxs21("div", { className: "frac-card-bank-radio-main", children: [
11268
+ /* @__PURE__ */ jsx35("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx35("div", { className: "col-md-12", children: /* @__PURE__ */ jsxs20("div", { id: "payment-form-div ", className: onSubmit ? "frac-payment-form-div" : "", children: [
11269
+ onSubmit && /* @__PURE__ */ jsx35("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
11270
+ /* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
11324
11271
  /* @__PURE__ */ jsx35(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
11325
11272
  !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx35(CardBankRadio, { skydesign: true, label: "Bank", amount: (_d = Number(bankAmount)) == null ? void 0 : _d.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
11326
11273
  ] }),
11327
- isPartial && /* @__PURE__ */ jsxs21("div", { className: "frac-partial-payment-input", children: [
11274
+ isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
11328
11275
  /* @__PURE__ */ jsx35("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
11329
11276
  /* @__PURE__ */ jsx35(
11330
11277
  NumericFormat2,
@@ -11346,52 +11293,50 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11346
11293
  partialError && /* @__PURE__ */ jsx35("span", { className: "error-span", children: partialError })
11347
11294
  ] })
11348
11295
  ] }) }),
11349
- is3DSEnable ? clientSecret && /* @__PURE__ */ jsx35(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs21(Fragment20, { children: [
11350
- /* @__PURE__ */ jsxs21("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
11351
- !onSubmit && /* @__PURE__ */ jsxs21(Fragment20, { children: [
11352
- /* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
11353
- /* @__PURE__ */ jsx35("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs21("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
11296
+ is3DSEnable ? clientSecret && /* @__PURE__ */ jsx35(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs20(Fragment19, { children: [
11297
+ /* @__PURE__ */ jsxs20("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
11298
+ !onSubmit && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11299
+ /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
11300
+ /* @__PURE__ */ jsx35("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs20("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
11354
11301
  " ",
11355
11302
  /* @__PURE__ */ jsx35(IoArrowBack4, {})
11356
11303
  ] }) }),
11357
11304
  /* @__PURE__ */ jsx35("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
11358
11305
  ] }),
11359
- /* @__PURE__ */ jsxs21("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
11306
+ /* @__PURE__ */ jsxs20("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
11360
11307
  /* @__PURE__ */ jsx35("img", { src: visa2, alt: "", width: 33 }),
11361
11308
  /* @__PURE__ */ jsx35("img", { src: mastercard2, width: 33, alt: "" }),
11362
11309
  /* @__PURE__ */ jsx35("img", { src: americanexp2, alt: "", width: 33 }),
11363
11310
  /* @__PURE__ */ jsx35("img", { src: discover2, width: 33, alt: "" })
11364
11311
  ] })
11365
11312
  ] }),
11366
- activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
11313
+ activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
11367
11314
  /* @__PURE__ */ jsx35(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
11368
11315
  setActiveinCard("form");
11369
11316
  } }),
11370
11317
  /* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx35("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: partialAmount ? formatUSD((_e = Number(partialAmount)) == null ? void 0 : _e.toFixed(2)) : formatUSD((_f = Number(amount)) == null ? void 0 : _f.toFixed(2)) }) })
11371
- ] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
11372
- onSubmit && /* @__PURE__ */ jsxs21(Fragment20, { children: [
11318
+ ] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
11319
+ onSubmit && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11373
11320
  /* @__PURE__ */ jsx35(
11374
- GooglePayComponent,
11321
+ ApplePayButton,
11375
11322
  {
11376
- amount: partialAmount ? partialAmount : amount,
11377
- googlePayEnvironment,
11378
- googlePayGatewayMerchantId,
11379
- googlePayMerchantId,
11380
- googlePayMerchantName: merchantName,
11323
+ applePayAmount: partialAmount ? partialAmount : amount,
11324
+ applePayMerchantId,
11325
+ applePayMerchantName: merchantName,
11381
11326
  completeFractalFlow,
11382
- setLoading
11327
+ showLoader
11383
11328
  }
11384
11329
  ),
11385
11330
  /* @__PURE__ */ jsx35("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx35("span", { children: "or" }) })
11386
11331
  ] }),
11387
- /* @__PURE__ */ jsxs21("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11332
+ /* @__PURE__ */ jsxs20("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11388
11333
  if (e.key === "Enter" && loading) {
11389
11334
  e.preventDefault();
11390
11335
  e.stopPropagation();
11391
11336
  }
11392
11337
  }, children: [
11393
- /* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11394
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11338
+ /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11339
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11395
11340
  /* @__PURE__ */ jsx35("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11396
11341
  /* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11397
11342
  const value = e.target.value;
@@ -11401,7 +11346,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11401
11346
  } }),
11402
11347
  (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11403
11348
  ] }),
11404
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11349
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11405
11350
  /* @__PURE__ */ jsx35("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
11406
11351
  /* @__PURE__ */ jsx35("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx35(
11407
11352
  FractalFields_default,
@@ -11412,17 +11357,17 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11412
11357
  }
11413
11358
  ) })
11414
11359
  ] }),
11415
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11360
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11416
11361
  /* @__PURE__ */ jsx35("label", { htmlFor: "zip", children: "ZIP" }),
11417
11362
  /* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_g = cardData == null ? void 0 : cardData.zipCode) != null ? _g : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
11418
11363
  (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11419
- pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
11364
+ pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
11420
11365
  "Cards include a fee amount of ",
11421
11366
  /* @__PURE__ */ jsx35("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11422
11367
  "."
11423
11368
  ] })
11424
11369
  ] }),
11425
- customerId && /* @__PURE__ */ jsx35("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11370
+ customerId && /* @__PURE__ */ jsx35("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11426
11371
  /* @__PURE__ */ jsx35(
11427
11372
  "input",
11428
11373
  {
@@ -11435,8 +11380,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11435
11380
  ),
11436
11381
  /* @__PURE__ */ jsx35("label", { htmlFor: "save_card", className: "toggle-label" }),
11437
11382
  /* @__PURE__ */ jsx35("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11438
- /* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
11439
- /* @__PURE__ */ jsx35("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
11383
+ /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
11384
+ /* @__PURE__ */ jsx35("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
11440
11385
  "svg",
11441
11386
  {
11442
11387
  xmlns: "http://www.w3.org/2000/svg",
@@ -11456,7 +11401,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11456
11401
  ]
11457
11402
  }
11458
11403
  ) }),
11459
- /* @__PURE__ */ jsx35("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
11404
+ /* @__PURE__ */ jsx35("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
11460
11405
  "If checked, I agree to give the ",
11461
11406
  /* @__PURE__ */ jsx35("b", { children: merchantName || "merchant" }),
11462
11407
  " permission to charge this credit card for agreed-upon purchases in the future."
@@ -11466,14 +11411,14 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11466
11411
  ] }),
11467
11412
  /* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx35("button", { type: "submit", style: { margin: 0, display: onSubmit ? "none" : "block" }, className: "pay-button", children: partialAmount ? formatUSD((_h = Number(partialAmount)) == null ? void 0 : _h.toFixed(2)) : formatUSD((_i = Number(amount)) == null ? void 0 : _i.toFixed(2)) }) })
11468
11413
  ] })
11469
- ] }) : /* @__PURE__ */ jsxs21("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11414
+ ] }) : /* @__PURE__ */ jsxs20("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11470
11415
  if (e.key === "Enter" && loading) {
11471
11416
  e.preventDefault();
11472
11417
  e.stopPropagation();
11473
11418
  }
11474
11419
  }, children: [
11475
- /* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11476
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11420
+ /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11421
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11477
11422
  /* @__PURE__ */ jsx35("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11478
11423
  /* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11479
11424
  const value = e.target.value;
@@ -11493,17 +11438,17 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11493
11438
  customCSS: customCSS2
11494
11439
  }
11495
11440
  ) }),
11496
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11441
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11497
11442
  /* @__PURE__ */ jsx35("label", { htmlFor: "zip", children: "ZIP" }),
11498
11443
  /* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_j = cardData == null ? void 0 : cardData.zipCode) != null ? _j : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
11499
11444
  (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11500
- pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
11445
+ pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
11501
11446
  "Cards include a fee amount of ",
11502
11447
  /* @__PURE__ */ jsx35("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11503
11448
  "."
11504
11449
  ] })
11505
11450
  ] }),
11506
- customerId && /* @__PURE__ */ jsx35("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11451
+ customerId && /* @__PURE__ */ jsx35("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11507
11452
  /* @__PURE__ */ jsx35(
11508
11453
  "input",
11509
11454
  {
@@ -11516,8 +11461,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11516
11461
  ),
11517
11462
  /* @__PURE__ */ jsx35("label", { htmlFor: "save_card", className: "toggle-label" }),
11518
11463
  /* @__PURE__ */ jsx35("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11519
- /* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
11520
- /* @__PURE__ */ jsx35("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
11464
+ /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
11465
+ /* @__PURE__ */ jsx35("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
11521
11466
  "svg",
11522
11467
  {
11523
11468
  xmlns: "http://www.w3.org/2000/svg",
@@ -11537,7 +11482,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11537
11482
  ]
11538
11483
  }
11539
11484
  ) }),
11540
- /* @__PURE__ */ jsx35("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
11485
+ /* @__PURE__ */ jsx35("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
11541
11486
  "If checked, I agree to give the ",
11542
11487
  /* @__PURE__ */ jsx35("b", { children: merchantName || "merchant" }),
11543
11488
  " permission to charge this credit card for agreed-upon purchases in the future."
@@ -11548,35 +11493,35 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11548
11493
  /* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx35("button", { type: "submit", style: { margin: 0, display: onSubmit ? "none" : "block" }, className: "pay-button", children: partialAmount ? formatUSD((_k = Number(partialAmount)) == null ? void 0 : _k.toFixed(2)) : formatUSD((_l = Number(amount)) == null ? void 0 : _l.toFixed(2)) }) })
11549
11494
  ] })
11550
11495
  ] }),
11551
- /* @__PURE__ */ jsx35("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs21(Fragment20, { children: [
11552
- !onSubmit && /* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
11553
- /* @__PURE__ */ jsx35("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs21("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
11496
+ /* @__PURE__ */ jsx35("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs20(Fragment19, { children: [
11497
+ !onSubmit && /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
11498
+ /* @__PURE__ */ jsx35("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs20("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
11554
11499
  " ",
11555
11500
  /* @__PURE__ */ jsx35(IoArrowBack4, {})
11556
11501
  ] }) }),
11557
11502
  /* @__PURE__ */ jsx35("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
11558
11503
  ] }),
11559
- activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
11504
+ activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
11560
11505
  /* @__PURE__ */ jsx35(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
11561
11506
  setActiveinBank("form");
11562
11507
  } }),
11563
11508
  /* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx35("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_m = Number(bankAmount)) == null ? void 0 : _m.toFixed(2)) }) })
11564
- ] }) : /* @__PURE__ */ jsxs21("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
11509
+ ] }) : /* @__PURE__ */ jsxs20("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
11565
11510
  if (e.key === "Enter" && loading) {
11566
11511
  e.preventDefault();
11567
11512
  e.stopPropagation();
11568
11513
  }
11569
11514
  }, children: [
11570
- /* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: {
11515
+ /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: {
11571
11516
  minHeight: "444px",
11572
11517
  maxHeight: "444px"
11573
11518
  }, children: [
11574
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11519
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11575
11520
  /* @__PURE__ */ jsx35("label", { htmlFor: "nameonaccount", children: "Name on account" }),
11576
11521
  /* @__PURE__ */ jsx35("input", { type: "text", id: "nameonaccount", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", name: "name", value: (_n = achData == null ? void 0 : achData.name) != null ? _n : "", onChange: handleChangeAch }),
11577
11522
  (achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
11578
11523
  ] }),
11579
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11524
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11580
11525
  /* @__PURE__ */ jsx35("label", { htmlFor: "routingnumber", children: "Routing number" }),
11581
11526
  /* @__PURE__ */ jsx35(
11582
11527
  "input",
@@ -11593,7 +11538,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11593
11538
  ),
11594
11539
  (achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
11595
11540
  ] }),
11596
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11541
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11597
11542
  /* @__PURE__ */ jsx35("label", { htmlFor: "accountnumber", children: "Account number" }),
11598
11543
  /* @__PURE__ */ jsx35(
11599
11544
  "input",
@@ -11610,7 +11555,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11610
11555
  ),
11611
11556
  (achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
11612
11557
  ] }),
11613
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11558
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11614
11559
  /* @__PURE__ */ jsx35("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
11615
11560
  /* @__PURE__ */ jsx35(
11616
11561
  "input",
@@ -11627,7 +11572,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11627
11572
  ),
11628
11573
  (achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
11629
11574
  ] }),
11630
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11575
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11631
11576
  /* @__PURE__ */ jsx35("label", { htmlFor: "bankname", children: "Bank name" }),
11632
11577
  /* @__PURE__ */ jsx35(
11633
11578
  "input",
@@ -11644,7 +11589,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11644
11589
  ),
11645
11590
  (achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
11646
11591
  ] }),
11647
- ((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11592
+ ((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11648
11593
  /* @__PURE__ */ jsx35("label", { htmlFor: "companyName", children: "Company name" }),
11649
11594
  /* @__PURE__ */ jsx35(
11650
11595
  "input",
@@ -11661,19 +11606,19 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11661
11606
  ),
11662
11607
  (achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
11663
11608
  ] }),
11664
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
11609
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11665
11610
  /* @__PURE__ */ jsx35("label", { htmlFor: "accounttype", children: "Select account type" }),
11666
- /* @__PURE__ */ jsxs21("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
11611
+ /* @__PURE__ */ jsxs20("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
11667
11612
  /* @__PURE__ */ jsx35("option", { value: "", children: "Select account" }),
11668
11613
  accountTypes.map((type) => /* @__PURE__ */ jsx35("option", { value: type.value, children: type.label }, type.value))
11669
11614
  ] }),
11670
- bankFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
11615
+ bankFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
11671
11616
  "There is a processing fee of ",
11672
11617
  /* @__PURE__ */ jsx35("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
11673
11618
  "."
11674
11619
  ] }),
11675
- !saveACHinfo && /* @__PURE__ */ jsxs21(Fragment20, { children: [
11676
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11620
+ !saveACHinfo && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11621
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11677
11622
  /* @__PURE__ */ jsx35("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
11678
11623
  setIsBankConsentChecked(e.target.checked);
11679
11624
  if (e.target.checked) {
@@ -11684,7 +11629,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11684
11629
  ] }),
11685
11630
  errorBankConsent && /* @__PURE__ */ jsx35("span", { className: "error-span", children: errorBankConsent })
11686
11631
  ] }),
11687
- customerId && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11632
+ customerId && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11688
11633
  /* @__PURE__ */ jsx35("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
11689
11634
  setSaveACHinfo(e.target.checked);
11690
11635
  if (!e.target.checked) {
@@ -11694,15 +11639,15 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11694
11639
  } }),
11695
11640
  /* @__PURE__ */ jsx35("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save for future use" })
11696
11641
  ] }),
11697
- saveACHinfo && /* @__PURE__ */ jsxs21(Fragment20, { children: [
11698
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11642
+ saveACHinfo && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11643
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11699
11644
  /* @__PURE__ */ jsx35("input", { type: "checkbox", id: "saveACHConsent1", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHConsent1, onChange: (e) => {
11700
11645
  setSaveACHConsent1(e.target.checked);
11701
11646
  if (e.target.checked) {
11702
11647
  setErrorBankConsentOther("");
11703
11648
  }
11704
11649
  } }),
11705
- /* @__PURE__ */ jsxs21("label", { className: "saveachlabel", htmlFor: "saveACHConsent1", children: [
11650
+ /* @__PURE__ */ jsxs20("label", { className: "saveachlabel", htmlFor: "saveACHConsent1", children: [
11706
11651
  "By providing my bank account information and selecting \u2018Save for future payments\u2019, I authorize ",
11707
11652
  merchantName || "merchant",
11708
11653
  " 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."
@@ -11727,7 +11672,7 @@ var ModelContentSky_default = ModelContentSky;
11727
11672
 
11728
11673
  // src/app/components/Skysystemz/PayButtonWithForm.tsx
11729
11674
  import axios10 from "axios";
11730
- import { Fragment as Fragment21, jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
11675
+ import { Fragment as Fragment20, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
11731
11676
  var PaymentWidget = ({
11732
11677
  amount,
11733
11678
  bankAmount,
@@ -11751,12 +11696,12 @@ var PaymentWidget = ({
11751
11696
  customCSS: customCSS2,
11752
11697
  disableSubmitBtn = false
11753
11698
  }) => {
11754
- const [show, setShow] = useState12(autoTrigger || false);
11755
- const [loading, setLoading] = useState12(false);
11756
- const [childHandleClose, setChildHandleClose] = useState12(() => () => {
11699
+ const [show, setShow] = useState11(autoTrigger || false);
11700
+ const [loading, setLoading] = useState11(false);
11701
+ const [childHandleClose, setChildHandleClose] = useState11(() => () => {
11757
11702
  });
11758
- const [orderGuid, setOrderGuid] = useState12(null);
11759
- const [remainingAmount, setRemainingAmount] = useState12(null);
11703
+ const [orderGuid, setOrderGuid] = useState11(null);
11704
+ const [remainingAmount, setRemainingAmount] = useState11(null);
11760
11705
  const initialCommonProps = useMemo(
11761
11706
  () => ({
11762
11707
  amount,
@@ -11806,8 +11751,8 @@ var PaymentWidget = ({
11806
11751
  disableSubmitBtn
11807
11752
  ]
11808
11753
  );
11809
- const [commonProps, setCommonProps] = useState12(initialCommonProps);
11810
- useEffect18(() => {
11754
+ const [commonProps, setCommonProps] = useState11(initialCommonProps);
11755
+ useEffect17(() => {
11811
11756
  if (show) {
11812
11757
  setCommonProps(initialCommonProps);
11813
11758
  }
@@ -11838,12 +11783,12 @@ var PaymentWidget = ({
11838
11783
  setLoading(false);
11839
11784
  }
11840
11785
  };
11841
- useEffect18(() => {
11786
+ useEffect17(() => {
11842
11787
  if (show && isPartial && partialRef) {
11843
11788
  getskyosOrderDetails();
11844
11789
  }
11845
11790
  }, [show, isPartial, partialRef]);
11846
- return /* @__PURE__ */ jsxs22(Fragment21, { children: [
11791
+ return /* @__PURE__ */ jsxs21(Fragment20, { children: [
11847
11792
  /* @__PURE__ */ jsx36("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
11848
11793
  /* @__PURE__ */ jsx36(DataScript, {}),
11849
11794
  /* @__PURE__ */ jsx36(FractalTokenizerScript, {}),
@@ -11851,7 +11796,7 @@ var PaymentWidget = ({
11851
11796
  /* @__PURE__ */ jsx36(CardBankRadioStyles, {}),
11852
11797
  /* @__PURE__ */ jsx36(CustomModal2styles_default, {}),
11853
11798
  /* @__PURE__ */ jsx36(DataCapScriptLoader, {}),
11854
- !autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", disabled: disableSubmitBtn, onClick: () => setShow(true), children: [
11799
+ !autoTrigger && /* @__PURE__ */ jsxs21("button", { className: submitBtnClass || "paymentBtn", disabled: disableSubmitBtn, onClick: () => setShow(true), children: [
11855
11800
  submitBtnText,
11856
11801
  submitBtnIcon
11857
11802
  ] }),
@@ -11860,7 +11805,7 @@ var PaymentWidget = ({
11860
11805
  };
11861
11806
 
11862
11807
  // src/app/components/Skysystemz/EmbeddedCheckout.tsx
11863
- import { useEffect as useEffect20, useState as useState13, useMemo as useMemo2 } from "react";
11808
+ import { useEffect as useEffect19, useState as useState12, useMemo as useMemo2 } from "react";
11864
11809
  import axios11 from "axios";
11865
11810
 
11866
11811
  // src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
@@ -12212,10 +12157,10 @@ padding:0px !important;
12212
12157
  }
12213
12158
 
12214
12159
  // src/app/components/Atoms/Applepay/ApplePayScriptLoader.tsx
12215
- import { useEffect as useEffect19 } from "react";
12160
+ import { useEffect as useEffect18 } from "react";
12216
12161
  var applePayScriptLoaded = false;
12217
12162
  var ApplePayScriptLoader = () => {
12218
- useEffect19(() => {
12163
+ useEffect18(() => {
12219
12164
  if (applePayScriptLoaded) return;
12220
12165
  const existingScript = document.querySelector(
12221
12166
  `script[src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"]`
@@ -12241,7 +12186,7 @@ var ApplePayScriptLoader = () => {
12241
12186
  };
12242
12187
 
12243
12188
  // src/app/components/Skysystemz/EmbeddedCheckout.tsx
12244
- import { Fragment as Fragment22, jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
12189
+ import { Fragment as Fragment21, jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
12245
12190
  var EmbeddedCheckout = ({
12246
12191
  amount,
12247
12192
  bankAmount,
@@ -12266,12 +12211,12 @@ var EmbeddedCheckout = ({
12266
12211
  onLoad,
12267
12212
  customCSS: customCSS2
12268
12213
  }) => {
12269
- const [show, setShow] = useState13(false);
12270
- const [loading, setLoading] = useState13(false);
12271
- const [childHandleClose, setChildHandleClose] = useState13(() => () => {
12214
+ const [show, setShow] = useState12(false);
12215
+ const [loading, setLoading] = useState12(false);
12216
+ const [childHandleClose, setChildHandleClose] = useState12(() => () => {
12272
12217
  });
12273
- const [orderGuid, setOrderGuid] = useState13(null);
12274
- const [remainingAmount, setRemainingAmount] = useState13(null);
12218
+ const [orderGuid, setOrderGuid] = useState12(null);
12219
+ const [remainingAmount, setRemainingAmount] = useState12(null);
12275
12220
  const initialCommonProps = useMemo2(
12276
12221
  () => ({
12277
12222
  amount,
@@ -12318,8 +12263,8 @@ var EmbeddedCheckout = ({
12318
12263
  partialRef
12319
12264
  ]
12320
12265
  );
12321
- const [commonProps, setCommonProps] = useState13(initialCommonProps);
12322
- useEffect20(() => {
12266
+ const [commonProps, setCommonProps] = useState12(initialCommonProps);
12267
+ useEffect19(() => {
12323
12268
  if (show) {
12324
12269
  setCommonProps(initialCommonProps);
12325
12270
  }
@@ -12350,13 +12295,13 @@ var EmbeddedCheckout = ({
12350
12295
  setLoading(false);
12351
12296
  }
12352
12297
  };
12353
- useEffect20(() => {
12298
+ useEffect19(() => {
12354
12299
  if (show && isPartial && partialRef) {
12355
12300
  getskyosOrderDetails();
12356
12301
  }
12357
12302
  }, [show, isPartial, partialRef]);
12358
12303
  console.log(onLoad, "onLoad");
12359
- useEffect20(() => {
12304
+ useEffect19(() => {
12360
12305
  const supported = !!window.ApplePaySession;
12361
12306
  let canPay = false;
12362
12307
  if (supported) {
@@ -12367,7 +12312,7 @@ var EmbeddedCheckout = ({
12367
12312
  }
12368
12313
  console.log(`ApplePaySession: ${supported}, canMakePayments: ${canPay}`);
12369
12314
  }, []);
12370
- return /* @__PURE__ */ jsxs23(Fragment22, { children: [
12315
+ return /* @__PURE__ */ jsxs22(Fragment21, { children: [
12371
12316
  /* @__PURE__ */ jsx38("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
12372
12317
  /* @__PURE__ */ jsx38(DataScript, {}),
12373
12318
  /* @__PURE__ */ jsx38(FractalTokenizerScript, {}),
@@ -12377,7 +12322,7 @@ var EmbeddedCheckout = ({
12377
12322
  /* @__PURE__ */ jsx38(DataCapScriptLoader, {}),
12378
12323
  /* @__PURE__ */ jsx38(ApplePayScriptLoader, {}),
12379
12324
  /* @__PURE__ */ jsx38(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
12380
- !autoTrigger && /* @__PURE__ */ jsxs23("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
12325
+ !autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
12381
12326
  submitBtnText,
12382
12327
  submitBtnIcon
12383
12328
  ] }),