@fractalpay/fractalpay-next-dev 0.0.245 → 0.0.246

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.245",
42
+ version: "0.0.246",
43
43
  private: false,
44
44
  type: "module",
45
45
  scripts: {
@@ -113,25 +113,8 @@ import { useState, useEffect } from "react";
113
113
  import { jsx } from "react/jsx-runtime";
114
114
  var LoaderStyle = (props) => {
115
115
  return /* @__PURE__ */ jsx("style", { children: `
116
-
117
- .loader-light {
118
- position: fixed; /* Fixed position to cover the viewport */
119
- top: 0;
120
- left: 0;
121
- width: 100%;
122
- height: 100%;
123
- display: flex;
124
- justify-content: center;
125
- align-items: center;
126
- /* background: rgba(255, 255, 0, 0.01); Adjust the blur effect */
127
- background-color: rgba(31, 29, 29, 0.52); /* Semi-transparent black background */
128
-
129
- backdrop-filter: blur(0.5px); /* Blur effect */
130
- z-index: 999999999999 !important; /* Ensure it's on top of other elements */
131
- transform: translate(0%, 0%) !important
132
- }
133
-
134
- .loader-dark {
116
+
117
+ .loader {
135
118
  position: fixed; /* Fixed position to cover the viewport */
136
119
  top: 0;
137
120
  left: 0;
@@ -143,7 +126,7 @@ var LoaderStyle = (props) => {
143
126
  /* background: rgba(255, 255, 0, 0.01); Adjust the blur effect */
144
127
  background-color: rgba(31, 29, 29, 0.52); /* Semi-transparent black background */
145
128
 
146
- backdrop-filter: blur(6.5px); /* Blur effect */
129
+ backdrop-filter: blur(.5px); /* Blur effect */
147
130
  z-index: 999999999999 !important; /* Ensure it's on top of other elements */
148
131
  transform: translate(0%, 0%) !important
149
132
  }
@@ -218,11 +201,10 @@ var LoaderStyle_default = LoaderStyle;
218
201
 
219
202
  // src/app/components/Loader/Loader.tsx
220
203
  import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
221
- var Loader = (_a) => {
222
- var _b = _a, { intensity = "light" } = _b, props = __objRest(_b, ["intensity"]);
204
+ var Loader = (props) => {
223
205
  return /* @__PURE__ */ jsxs(Fragment, { children: [
224
206
  /* @__PURE__ */ jsx2(LoaderStyle_default, {}),
225
- (props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: `loader-${intensity}`, children: /* @__PURE__ */ jsxs("div", { className: "lds-ellipsis", children: [
207
+ (props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: "loader", children: /* @__PURE__ */ jsxs("div", { className: "lds-ellipsis", children: [
226
208
  /* @__PURE__ */ jsx2("div", {}),
227
209
  /* @__PURE__ */ jsx2("div", {}),
228
210
  /* @__PURE__ */ jsx2("div", {}),
@@ -2926,7 +2908,7 @@ function ErrorCardMszStyle() {
2926
2908
 
2927
2909
  // src/app/components/ErrorCardMessage/ErrorCardMessage.tsx
2928
2910
  import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
2929
- var ErrorCardMessage = ({ onClose, error, autoTrigger = false }) => {
2911
+ var ErrorCardMessage = ({ onClose, error }) => {
2930
2912
  return /* @__PURE__ */ jsxs6(Fragment6, { children: [
2931
2913
  /* @__PURE__ */ jsx12(ErrorCardMszStyle, {}),
2932
2914
  /* @__PURE__ */ jsx12("div", { className: "card-error", children: /* @__PURE__ */ jsx12("div", { className: "payment-error-container", children: /* @__PURE__ */ jsxs6("div", { className: "error-icon", children: [
@@ -2935,7 +2917,7 @@ var ErrorCardMessage = ({ onClose, error, autoTrigger = false }) => {
2935
2917
  /* @__PURE__ */ jsx12("div", { className: "payment-error-text", children: error }),
2936
2918
  /* @__PURE__ */ jsx12("div", { className: "thank-you-text", children: "Try again later " })
2937
2919
  ] }),
2938
- !autoTrigger && /* @__PURE__ */ jsx12("div", { className: "error-btn-div", children: /* @__PURE__ */ jsx12("button", { onClick: onClose, children: "OK" }) })
2920
+ /* @__PURE__ */ jsx12("div", { className: "error-btn-div", children: /* @__PURE__ */ jsx12("button", { onClick: onClose, children: "OK" }) })
2939
2921
  ] }) }) })
2940
2922
  ] });
2941
2923
  };
@@ -2952,28 +2934,14 @@ var socketClient_default = socket;
2952
2934
 
2953
2935
  // src/app/components/Atoms/CardBankRadio/CardBankRadio.tsx
2954
2936
  import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
2955
- var CardBankRadio = (_a) => {
2956
- var _b = _a, { skydesign = false, savingsText } = _b, props = __objRest(_b, ["skydesign", "savingsText"]);
2957
- const savingsBadgeClass = `frac-saving-badge ${skydesign ? "frac-saving-badge-corner" : "frac-saving-badge-corner frac-saving-badge-with-radio"}`;
2958
- return /* @__PURE__ */ jsx13(Fragment7, { children: /* @__PURE__ */ jsx13(
2937
+ var CardBankRadio = (props) => {
2938
+ return /* @__PURE__ */ jsx13(Fragment7, { children: /* @__PURE__ */ jsxs7(
2959
2939
  "div",
2960
2940
  {
2961
2941
  className: `frac-card-bank-radio ${props.activetab === props.value ? "frac-active" : ""}`,
2962
2942
  onClick: () => props.onChange(props.value),
2963
2943
  role: "radio",
2964
- children: skydesign ? /* @__PURE__ */ jsxs7(Fragment7, { children: [
2965
- /* @__PURE__ */ jsxs7("div", { className: "frac-card-title-main", children: [
2966
- /* @__PURE__ */ jsxs7("div", { className: "box-inner-card-text", children: [
2967
- /* @__PURE__ */ jsx13("img", { src: props.label.toLowerCase() === "card" ? defaultcard : props.label.toLowerCase() === "reader" ? pax : bankNew, className: "frac-payment-type-logo", alt: "" }),
2968
- /* @__PURE__ */ jsx13("div", { className: "frac-card-label-text", children: props.label })
2969
- ] }),
2970
- /* @__PURE__ */ jsx13("div", { className: "frac-card-label", children: /* @__PURE__ */ jsx13("div", { className: "frac-card-label-amount", children: formatUSD(props.amount) }) })
2971
- ] }),
2972
- savingsText ? /* @__PURE__ */ jsx13("button", { type: "button", className: savingsBadgeClass, children: savingsText }) : null,
2973
- /* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsx13("input", { name: "paymenttype", checked: props.activetab === props.value, type: "hidden", value: props.value, onChange: (e) => {
2974
- props.onChange(e.target.value);
2975
- } }) })
2976
- ] }) : /* @__PURE__ */ jsxs7(Fragment7, { children: [
2944
+ children: [
2977
2945
  /* @__PURE__ */ jsxs7("div", { className: "frac-card-title-main", children: [
2978
2946
  /* @__PURE__ */ jsx13("img", { src: props.label.toLowerCase() === "card" ? defaultcard : props.label.toLowerCase() === "reader" ? pax : bankNew, className: "frac-payment-type-logo", alt: "" }),
2979
2947
  /* @__PURE__ */ jsxs7("div", { className: "frac-card-label", children: [
@@ -2981,11 +2949,10 @@ var CardBankRadio = (_a) => {
2981
2949
  /* @__PURE__ */ jsx13("div", { className: "frac-card-label-amount", children: formatUSD(props.amount) })
2982
2950
  ] })
2983
2951
  ] }),
2984
- savingsText ? /* @__PURE__ */ jsx13("button", { type: "button", className: savingsBadgeClass, children: savingsText }) : null,
2985
2952
  /* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsx13("input", { name: "paymenttype", checked: props.activetab === props.value, type: "radio", value: props.value, onChange: (e) => {
2986
2953
  props.onChange(e.target.value);
2987
2954
  } }) })
2988
- ] })
2955
+ ]
2989
2956
  }
2990
2957
  ) });
2991
2958
  };
@@ -3010,7 +2977,6 @@ function CardBankRadioStyles({}) {
3010
2977
  justify-content: space-between;
3011
2978
  align-items: center;
3012
2979
  align-self: stretch;
3013
- position: relative;
3014
2980
  }
3015
2981
 
3016
2982
  input[type="radio"] {
@@ -3068,28 +3034,6 @@ function CardBankRadioStyles({}) {
3068
3034
  .frac-card-bank-radio.frac-active {
3069
3035
  background: #F6F6F7;
3070
3036
  }
3071
-
3072
- .frac-saving-badge {
3073
- padding: 1px 7px !important;
3074
- border: 1px solid #9ad7ab;
3075
- border-radius: 999px;
3076
- background: #e8f8ec;
3077
- color: #1e6a34;
3078
- font-size: 10px;
3079
- font-weight: 600;
3080
- line-height: 15px;
3081
- pointer-events: none;
3082
- }
3083
-
3084
- .frac-saving-badge-corner {
3085
- position: absolute;
3086
- top: 8px;
3087
- right: 10px;
3088
- }
3089
-
3090
- .frac-saving-badge-with-radio {
3091
- right: 34px;
3092
- }
3093
3037
  ` });
3094
3038
  }
3095
3039
 
@@ -3267,7 +3211,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
3267
3211
  {
3268
3212
  id: "card_number",
3269
3213
  className: "form-control card-number-new",
3270
- style: { height: `${isSky ? "36px" : "46px"}` }
3214
+ style: { height: `${isSky ? "36px" : "46px"}`, display: "inline-block" }
3271
3215
  }
3272
3216
  ),
3273
3217
  /* @__PURE__ */ jsx17("div", { className: "card-crdi card-expiry-new", children: /* @__PURE__ */ jsxs10("div", { className: "exp-date-year-container", children: [
@@ -3276,7 +3220,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
3276
3220
  {
3277
3221
  id: "exp_month",
3278
3222
  className: "form-control required card-cvv-in",
3279
- style: { height: "36px", display: "block", minHeight: "36px" }
3223
+ style: { height: "36px", display: "inline-block" }
3280
3224
  }
3281
3225
  ) }),
3282
3226
  /* @__PURE__ */ jsx17("div", { className: "exp-year form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
@@ -3284,7 +3228,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
3284
3228
  {
3285
3229
  id: "exp_year",
3286
3230
  className: "form-control required card-cvv-in",
3287
- style: { height: "36px", display: "block", minHeight: "36px" }
3231
+ style: { height: "36px", display: "inline-block" }
3288
3232
  }
3289
3233
  ) }),
3290
3234
  /* @__PURE__ */ jsx17("div", { className: "security-digit form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
@@ -3292,7 +3236,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
3292
3236
  {
3293
3237
  id: "cvv",
3294
3238
  className: "form-control card-cvv-in required",
3295
- style: { height: "36px", display: "block", minHeight: "36px" }
3239
+ style: { height: "36px", display: "inline-block" }
3296
3240
  }
3297
3241
  ) })
3298
3242
  ] }) })
@@ -3415,8 +3359,7 @@ var DataCapFields = ({
3415
3359
  isOpen,
3416
3360
  tokenKey,
3417
3361
  setLoader,
3418
- isAddCard,
3419
- isEmbedded
3362
+ isAddCard
3420
3363
  }) => {
3421
3364
  const iframeId = "datacap-iframe";
3422
3365
  const resolverRef = useRef2(null);
@@ -3442,20 +3385,6 @@ var DataCapFields = ({
3442
3385
 
3443
3386
  `;
3444
3387
  }
3445
- if (isEmbedded) {
3446
- customCSS += `
3447
-
3448
- input {
3449
- background-color: #F6F6F7;
3450
- box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1;
3451
- }
3452
-
3453
- select {
3454
- background-color: #F6F6F7;
3455
- box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
3456
- }
3457
- `;
3458
- }
3459
3388
  const initialize = async () => {
3460
3389
  setLoader == null ? void 0 : setLoader(true);
3461
3390
  setIframeReady(false);
@@ -3487,18 +3416,13 @@ var DataCapFields = ({
3487
3416
  };
3488
3417
  initialize();
3489
3418
  }, [isOpen, tokenKey]);
3490
- useEffect7(() => {
3491
- window.requestDcToken = () => {
3492
- return new Promise((resolve, reject) => {
3493
- setLoader == null ? void 0 : setLoader(true);
3494
- resolverRef.current = { resolve, reject };
3495
- });
3496
- };
3497
- return () => {
3498
- delete window.requestDcToken;
3499
- };
3500
- }, []);
3501
- console.log(setLoader, "loadingIframe");
3419
+ window.requestDcToken = () => {
3420
+ return new Promise((resolve, reject) => {
3421
+ setLoader == null ? void 0 : setLoader(true);
3422
+ resolverRef.current = { resolve, reject };
3423
+ window.DatacapHostedWebToken.requestToken();
3424
+ });
3425
+ };
3502
3426
  return /* @__PURE__ */ jsx18(
3503
3427
  "iframe",
3504
3428
  {
@@ -3537,6 +3461,8 @@ function GetPaymentPage(props) {
3537
3461
  const [activeForm, setActiveForm] = useState4(true);
3538
3462
  const [saveCardInfo, setSaveCardInfo] = useState4(false);
3539
3463
  const [saveACHinfo, setSaveACHinfo] = useState4(false);
3464
+ const [isBankConsentChecked, setIsBankConsentChecked] = useState4(false);
3465
+ const [errorBankConsent, setErrorBankConsent] = useState4("");
3540
3466
  const fractalpayClientKey = props.merchantPublicKey;
3541
3467
  let mastercard2 = S3Url + "widget/mc-img.svg";
3542
3468
  let visa2 = S3Url + "widget/visa-img.svg";
@@ -3656,6 +3582,8 @@ function GetPaymentPage(props) {
3656
3582
  setLoading(false);
3657
3583
  setBankList([]);
3658
3584
  setCardList([]);
3585
+ setIsBankConsentChecked(false);
3586
+ setErrorBankConsent("");
3659
3587
  };
3660
3588
  const handleShow = () => setShow(true);
3661
3589
  const handletabchange = (id) => {
@@ -3755,8 +3683,11 @@ function GetPaymentPage(props) {
3755
3683
  errors.companyName = "Company Name is required for business accounts";
3756
3684
  }
3757
3685
  }
3686
+ if (!isBankConsentChecked) {
3687
+ setErrorBankConsent("Above consent is requied");
3688
+ }
3758
3689
  setAchError(errors);
3759
- return Object.keys(errors).length > 0;
3690
+ return Object.keys(errors).length > 0 || !isBankConsentChecked;
3760
3691
  };
3761
3692
  const submitFunc = async (e) => {
3762
3693
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
@@ -4680,9 +4611,15 @@ function GetPaymentPage(props) {
4680
4611
  ] })
4681
4612
  ] }),
4682
4613
  /* @__PURE__ */ jsxs11("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
4683
- /* @__PURE__ */ jsx19("input", { type: "checkbox", id: "achconsent", className: "", maxLength: 100, placeholder: "My Bank" }),
4614
+ /* @__PURE__ */ jsx19("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
4615
+ setIsBankConsentChecked(e.target.checked);
4616
+ if (e.target.checked) {
4617
+ setErrorBankConsent("");
4618
+ }
4619
+ } }),
4684
4620
  /* @__PURE__ */ jsx19("label", { htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${(paymentData == null ? void 0 : paymentData.bname) || "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.` })
4685
4621
  ] }),
4622
+ errorBankConsent && /* @__PURE__ */ jsx19("span", { className: "error-span", children: errorBankConsent }),
4686
4623
  (props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsxs11("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
4687
4624
  /* @__PURE__ */ jsx19("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
4688
4625
  /* @__PURE__ */ jsx19("label", { htmlFor: "saveACH", children: "Save Bank" })
@@ -7447,6 +7384,8 @@ function PartialPayment(props) {
7447
7384
  const [aftertaxAmount, setAfterTaxAmount] = useState8(Number(props == null ? void 0 : props.amount));
7448
7385
  const [partialAmount, setPartialAmount] = useState8("");
7449
7386
  const [partialError, setPartialError] = useState8("");
7387
+ const [isBankConsentChecked, setIsBankConsentChecked] = useState8(false);
7388
+ const [errorBankConsent, setErrorBankConsent] = useState8("");
7450
7389
  const tokenizerRef = useRef8(null);
7451
7390
  const fractalStyles = {
7452
7391
  input: {
@@ -7558,6 +7497,8 @@ function PartialPayment(props) {
7558
7497
  setCardList([]);
7559
7498
  setPartialAmount("");
7560
7499
  setPartialError("");
7500
+ setIsBankConsentChecked(false);
7501
+ setErrorBankConsent("");
7561
7502
  };
7562
7503
  const handleShow = () => setShow(true);
7563
7504
  const handletabchange = (id) => {
@@ -7658,8 +7599,11 @@ function PartialPayment(props) {
7658
7599
  errors.companyName = "Company Name is required for business accounts";
7659
7600
  }
7660
7601
  }
7602
+ if (!isBankConsentChecked) {
7603
+ setErrorBankConsent("Above consent is requied");
7604
+ }
7661
7605
  setAchError(errors);
7662
- return Object.keys(errors).length > 0;
7606
+ return Object.keys(errors).length > 0 || !isBankConsentChecked;
7663
7607
  };
7664
7608
  const submitFunc = async (e) => {
7665
7609
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
@@ -8607,9 +8551,24 @@ function PartialPayment(props) {
8607
8551
  ] })
8608
8552
  ] }),
8609
8553
  /* @__PURE__ */ jsxs17("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
8610
- /* @__PURE__ */ jsx28("input", { type: "checkbox", id: "achconsent", className: "", maxLength: 100, placeholder: "My Bank" }),
8554
+ /* @__PURE__ */ jsx28(
8555
+ "input",
8556
+ {
8557
+ type: "checkbox",
8558
+ id: "achconsent",
8559
+ className: "",
8560
+ checked: isBankConsentChecked,
8561
+ onChange: (e) => {
8562
+ setIsBankConsentChecked(e.target.checked);
8563
+ if (e.target.checked) {
8564
+ setErrorBankConsent("");
8565
+ }
8566
+ }
8567
+ }
8568
+ ),
8611
8569
  /* @__PURE__ */ jsx28("label", { htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${(paymentData == null ? void 0 : paymentData.bname) || "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.` })
8612
8570
  ] }),
8571
+ errorBankConsent && /* @__PURE__ */ jsx28("span", { className: "error-span", children: errorBankConsent }),
8613
8572
  (props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsxs17("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
8614
8573
  /* @__PURE__ */ jsx28("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
8615
8574
  /* @__PURE__ */ jsx28("label", { htmlFor: "saveACH", children: "Save Bank" })
@@ -8871,17 +8830,6 @@ function SkyChargewidgetstyles() {
8871
8830
  text-align : left !important;
8872
8831
  text-transform: uppercase !important;
8873
8832
  }
8874
- .frac-form .frac-fee-text{
8875
- display: block;
8876
- padding: 10px 0 4px;
8877
- font-family: 'IBM Plex Mono', monospace !important;
8878
- color: #727272 !important;
8879
- font-size: 12px;
8880
- line-height: 1.4;
8881
- }
8882
- .frac-form .frac-fee-amount{
8883
- color: #c62828 !important;
8884
- }
8885
8833
  .form-control-frac{
8886
8834
  display: block;
8887
8835
  width: 100%;
@@ -8916,7 +8864,7 @@ function SkyChargewidgetstyles() {
8916
8864
  }
8917
8865
  .exp-date-year-container .form-group {
8918
8866
  flex: 1;
8919
- padding-left:.75rem !important;
8867
+ padding-left:.75rem;
8920
8868
  }
8921
8869
  .card-crdi {
8922
8870
  display: flex;
@@ -8933,7 +8881,7 @@ function SkyChargewidgetstyles() {
8933
8881
  }
8934
8882
  .exp-date-year-container .form-group-frac{
8935
8883
  flex:1;
8936
- // padding: 0px !important
8884
+ padding: 0px !important
8937
8885
 
8938
8886
  }
8939
8887
 
@@ -9434,16 +9382,7 @@ margin:0px !important;
9434
9382
  padding:0px !important;
9435
9383
  }
9436
9384
 
9437
-
9438
- .toggle-num-wrapper-new div#card_number {
9439
- display: block !important;
9440
- }
9441
- .toggle-num-wrapper-new .input-main-wrap-frac {
9442
- height: 36px;
9443
- }
9444
- .toggle-num-wrapper-new:focus {
9445
- border: 1px solid #004eab !important;
9446
- }
9385
+
9447
9386
 
9448
9387
  ` });
9449
9388
  }
@@ -9590,162 +9529,10 @@ function CheckoutWrapper({ clientSecret, onSuccess, showLoader, setError, sessio
9590
9529
  // src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
9591
9530
  import { IoArrowBack as IoArrowBack4 } from "react-icons/io5";
9592
9531
  import { NumericFormat as NumericFormat2 } from "react-number-format";
9593
-
9594
- // src/app/components/ErrorCardMessage/ErrorCardOverlaystyle.tsx
9595
- import { jsx as jsx32 } from "react/jsx-runtime";
9596
- function ErrorCardOverlayStyle() {
9597
- return /* @__PURE__ */ jsx32("style", { children: `
9598
- .card-error-overlay .logo-container {
9599
- display: flex;
9600
- justify-content: center;
9601
- align-items: center;
9602
- margin-bottom: -50px; /* Adjust this to overlap the content */
9603
- z-index: 10;
9604
- }
9605
-
9606
- .card-error-overlay .client-logo {
9607
- max-width: 100px;
9608
- height: auto;
9609
- object-fit: contain;
9610
- display: block;
9611
- }
9612
-
9613
-
9614
- .card-error-overlay .error-icon-overlay {
9615
- display: flex;
9616
- flex-direction: column;
9617
- align-items: center;
9618
- gap: 12px;
9619
- min-height: 116px;
9620
- z-index: 2;
9621
- }
9622
-
9623
- .card-error-overlay .circle {
9624
- width: 50px;
9625
- height: 50px;
9626
- border: 1px solid red;
9627
- border-radius: 50%;
9628
- display: flex;
9629
- justify-content: center;
9630
- align-items: center;
9631
- margin-bottom:20px
9632
- }
9633
-
9634
- .card-error-overlay .circle .fa-times {
9635
- font-size: 30px;
9636
- color: red;
9637
- }
9638
-
9639
- .card-error-overlay .error-text-overlay {
9640
- display: flex;
9641
- flex-direction: column;
9642
- justify-content: center;
9643
- align-items: center;
9644
- gap: 4px;
9645
- // width: 227px;
9646
- }
9647
-
9648
- .card-error-overlay .payment-error-text-overlay {
9649
- font-family: 'Inter', sans-serif;
9650
- font-weight: 500;
9651
- font-size: 18px;
9652
- line-height: 21px;
9653
- text-align: center;
9654
- letter-spacing: -0.02em;
9655
- color: #161616;
9656
- }
9657
-
9658
- .card-error-overlay .thank-you-text-overlay {
9659
- font-family: 'Inter', sans-serif;
9660
- font-weight: 500;
9661
- font-size: 16px;
9662
- line-height: 18px;
9663
- text-align: center;
9664
- letter-spacing: -0.02em;
9665
- color: #161616 !important;
9666
- opacity: 0.5;
9667
- padding-top:10px
9668
- }
9669
-
9670
- .card-error-overlay .error-btn-div-overlay{
9671
- padding-top:20px;
9672
- width: 100%;
9673
-
9674
- }
9675
- .card-error-overlay .error-btn-div-overlay button{
9676
- outline: 0;
9677
- height: 46px;
9678
- font-size: 16px;
9679
- background: #727272;
9680
- border: none;
9681
- display: block;
9682
- color: #fff;
9683
- width: 100%;
9684
- border-radius: 180px;
9685
- margin: 10px 0;
9686
- text-decoration: none;
9687
- }
9688
- .card-error-overlay .error-btn-div-overlay button:hover, .card-error-overlay .error-btn-div-overlay button:focus {
9689
- background: #222;
9690
- color: #fff;
9691
- cursor: pointer;
9692
- }
9693
- .payment-error-container-overlay {
9694
- width: fit-content;
9695
- position: relative;
9696
- top: 50%;
9697
- left: 50%;
9698
- transform: translate(-50%, -50%);
9699
- background: rgba(255, 255, 255, 0.15);
9700
- backdrop-filter: blur(12px);
9701
- -webkit-backdrop-filter: blur(12px);
9702
- border-radius: 12px;
9703
- z-index: 11111;
9704
- max-width: 240px;
9705
- min-width: 224px;
9706
- padding: 20px;
9707
- margin-left: 17px !important;
9708
- }
9709
- .card-error-overlay {
9710
- position: absolute;
9711
- top: 0;
9712
- left: 0;
9713
- width: 100%;
9714
- height: 100%;
9715
- background: rgb(87 87 87 / 15%);
9716
- backdrop-filter: blur(2px);
9717
- -webkit-backdrop-filter: blur(12px);
9718
- z-index: 1111;
9719
- }
9720
- ` });
9721
- }
9722
-
9723
- // src/app/components/ErrorCardMessage/ErrorCardOverlay.tsx
9724
- import { Fragment as Fragment18, jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
9725
- var ErrorCardOverlay = ({ onClose, error, autoTrigger = false }) => {
9726
- return /* @__PURE__ */ jsxs19(Fragment18, { children: [
9727
- /* @__PURE__ */ jsx33(ErrorCardOverlayStyle, {}),
9728
- /* @__PURE__ */ jsx33("div", { className: "card-error-overlay", children: /* @__PURE__ */ jsx33("div", { className: "payment-error-container-overlay", children: /* @__PURE__ */ jsxs19("div", { className: "error-icon-overlay", children: [
9729
- /* @__PURE__ */ jsx33("div", { className: "circle", children: /* @__PURE__ */ jsx33("i", { className: "fa fa-times", "aria-hidden": "true" }) }),
9730
- /* @__PURE__ */ jsxs19("div", { className: "error-text-overlay", children: [
9731
- /* @__PURE__ */ jsx33("div", { className: "payment-error-text-overlay", children: error }),
9732
- /* @__PURE__ */ jsx33("div", { className: "thank-you-text-overlay", children: "Try again later " })
9733
- ] }),
9734
- !autoTrigger && /* @__PURE__ */ jsx33("div", { className: "error-btn-div-overlay", children: /* @__PURE__ */ jsx33("button", { onClick: onClose, children: "OK" }) })
9735
- ] }) }) })
9736
- ] });
9737
- };
9738
- var ErrorCardOverlay_default = ErrorCardOverlay;
9739
-
9740
- // src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
9741
- import { Fragment as Fragment19, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
9742
- 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 }) => {
9743
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
9532
+ import { Fragment as Fragment18, jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
9533
+ 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 }) => {
9534
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
9744
9535
  const hasRunRef = useRef10(false);
9745
- const cardFormRef = useRef10(null);
9746
- const bankFormRef = useRef10(null);
9747
- const expiryYearRef = useRef10(null);
9748
- const expiryMonthRef = useRef10(null);
9749
9536
  const cardListRunRef = useRef10(false);
9750
9537
  const threeDSContainerRef = useRef10(null);
9751
9538
  const [activetab, setActive] = useState10("card");
@@ -9783,6 +9570,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9783
9570
  const [remainingAmount, setRemainingAmount] = useState10("");
9784
9571
  const [paymentGateway, setPaymentGateway] = useState10();
9785
9572
  const [dcToken, setDCToken] = useState10();
9573
+ const [isBankConsentChecked, setIsBankConsentChecked] = useState10(false);
9574
+ const [errorBankConsent, setErrorBankConsent] = useState10("");
9786
9575
  let mastercard2 = S3Url + "widget/mc-img.svg";
9787
9576
  let visa2 = S3Url + "widget/visa-img.svg";
9788
9577
  let americanexp2 = S3Url + "widget/ae-img.svg";
@@ -9795,10 +9584,6 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9795
9584
  let pax2 = S3Url + "widget/pax.svg";
9796
9585
  let cardicon = S3Url + "widget/cardicon.svg";
9797
9586
  let bankicon = S3Url + "widget/bankicon.svg";
9798
- let defualtcardborder = S3Url + "widget/defualtcardborder.svg";
9799
- let unionicon = S3Url + "widget/unionpay.svg";
9800
- let dinersicon = S3Url + "widget/diners.svg";
9801
- let jcbicon = S3Url + "widget/jcb.svg";
9802
9587
  const showLoader = () => setLoading(true);
9803
9588
  const hideLoader = () => setLoading(false);
9804
9589
  const CalculateCashDiscount = (amount2, surcharge2) => {
@@ -9806,10 +9591,6 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9806
9591
  const originalAmount = amount2 / (1 + surchargeVal);
9807
9592
  return Math.round(originalAmount * 100) / 100;
9808
9593
  };
9809
- const cardFeeAmount = Number(pass_fee_amount || 0);
9810
- const bankFeeAmount = Number(bankSurcharge || 0);
9811
- const bankSavingsAmount = Math.max(bankFeeAmount > 0 ? cardFeeAmount - bankFeeAmount : cardFeeAmount, 0);
9812
- const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
9813
9594
  const tokenizerRef = useRef10(null);
9814
9595
  const fractalStyles = {
9815
9596
  input: {
@@ -9974,8 +9755,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9974
9755
  errors.companyName = "Company Name is required for business accounts";
9975
9756
  }
9976
9757
  }
9758
+ if (!isBankConsentChecked) {
9759
+ setErrorBankConsent("Above consent is requied");
9760
+ }
9977
9761
  setAchError(errors);
9978
- return Object.keys(errors).length > 0;
9762
+ return Object.keys(errors).length > 0 || !isBankConsentChecked;
9979
9763
  };
9980
9764
  const completeFractalFlow = async (tokenizeData, intentid) => {
9981
9765
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
@@ -10016,7 +9800,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10016
9800
  }
10017
9801
  };
10018
9802
  const handleFractalTokenFlow = async () => {
10019
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v, _w, _x, _y, _z, _A;
9803
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t, _u, _v, _w;
10020
9804
  try {
10021
9805
  const requestOptions = {
10022
9806
  method: "POST",
@@ -10057,29 +9841,17 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10057
9841
  three_ds_data
10058
9842
  );
10059
9843
  } catch (error2) {
10060
- console.log(error2, "error in tokenization");
10061
- let readableMessage = "Something went wrong!";
10062
- try {
10063
- const rawError = ((_n2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _n2.data) || (error2 == null ? void 0 : error2.message) || "";
10064
- const errorText = typeof rawError === "string" ? rawError : JSON.stringify(rawError);
10065
- const lines = ((_p2 = (_o2 = errorText.split) == null ? void 0 : _o2.call(errorText, "\n")) == null ? void 0 : _p2.filter(Boolean)) || [];
10066
- const lastLine = lines.at(-1) || "";
10067
- const parts = (_q2 = lastLine.split) == null ? void 0 : _q2.call(lastLine, ": ");
10068
- readableMessage = (parts == null ? void 0 : parts.length) > 1 ? parts.pop().trim() : lastLine.trim() || readableMessage;
10069
- } catch (e) {
10070
- readableMessage = "Something went wrong!";
10071
- }
10072
- setErrorIframe(readableMessage);
9844
+ setErrorIframe(error2);
10073
9845
  hideLoader();
10074
9846
  }
10075
9847
  if (tokenizeData == null ? void 0 : tokenizeData.token) {
10076
9848
  let ThreedsData = tokenizeData == null ? void 0 : tokenizeData.stripe_three_ds_response;
10077
- if (require3ds && !ThreedsData && (ThreedsData == null ? void 0 : ThreedsData.status) === "200 OK" && ((_r2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _r2.challenge_url)) {
9849
+ if (require3ds && !ThreedsData && (ThreedsData == null ? void 0 : ThreedsData.status) === "200 OK" && ((_n2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _n2.challenge_url)) {
10078
9850
  setError("Something went wrong. Please try again later.");
10079
9851
  }
10080
9852
  if (require3ds) {
10081
- if (!((_s2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _s2.challenge_url)) {
10082
- completeFractalFlow(tokenizeData == null ? void 0 : tokenizeData.token, (_t2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _t2.id);
9853
+ if (!((_o2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _o2.challenge_url)) {
9854
+ completeFractalFlow(tokenizeData == null ? void 0 : tokenizeData.token, (_p2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _p2.id);
10083
9855
  } else {
10084
9856
  hideLoader();
10085
9857
  setStripeResponse(__spreadProps(__spreadValues({}, ThreedsData == null ? void 0 : ThreedsData.data), {
@@ -10095,11 +9867,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10095
9867
  console.log(error2, "error");
10096
9868
  let readableMessage = "Something went wrong!";
10097
9869
  try {
10098
- const rawError = ((_u2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _u2.data) || (error2 == null ? void 0 : error2.message) || "";
9870
+ const rawError = ((_q2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _q2.data) || (error2 == null ? void 0 : error2.message) || "";
10099
9871
  const errorText = typeof rawError === "string" ? rawError : JSON.stringify(rawError);
10100
- const lines = ((_w = (_v = errorText.split) == null ? void 0 : _v.call(errorText, "\n")) == null ? void 0 : _w.filter(Boolean)) || [];
9872
+ const lines = ((_s2 = (_r2 = errorText.split) == null ? void 0 : _r2.call(errorText, "\n")) == null ? void 0 : _s2.filter(Boolean)) || [];
10101
9873
  const lastLine = lines.at(-1) || "";
10102
- const parts = (_x = lastLine.split) == null ? void 0 : _x.call(lastLine, ": ");
9874
+ const parts = (_t = lastLine.split) == null ? void 0 : _t.call(lastLine, ": ");
10103
9875
  readableMessage = (parts == null ? void 0 : parts.length) > 1 ? parts.pop().trim() : lastLine.trim() || readableMessage;
10104
9876
  } catch (e) {
10105
9877
  readableMessage = "Something went wrong!";
@@ -10107,8 +9879,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10107
9879
  setError(readableMessage);
10108
9880
  callback({
10109
9881
  error: readableMessage,
10110
- result: (_z = (_y = error2 == null ? void 0 : error2.response) == null ? void 0 : _y.data) == null ? void 0 : _z.result,
10111
- statusCode: (_A = error2 == null ? void 0 : error2.response) == null ? void 0 : _A.status
9882
+ result: (_v = (_u = error2 == null ? void 0 : error2.response) == null ? void 0 : _u.data) == null ? void 0 : _v.result,
9883
+ statusCode: (_w = error2 == null ? void 0 : error2.response) == null ? void 0 : _w.status
10112
9884
  });
10113
9885
  }
10114
9886
  };
@@ -10379,6 +10151,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10379
10151
  setPartialAmount("");
10380
10152
  setPartialError("");
10381
10153
  setRemainingAmount("");
10154
+ setIsBankConsentChecked(false);
10155
+ setErrorBankConsent("");
10382
10156
  };
10383
10157
  const getCardList = async () => {
10384
10158
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
@@ -10523,8 +10297,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10523
10297
  });
10524
10298
  };
10525
10299
  const handlechargeCustomer = async (e) => {
10526
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
10527
- e == null ? void 0 : e.currentTarget.blur();
10300
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
10301
+ e.currentTarget.blur();
10528
10302
  if (loading) return;
10529
10303
  let customer_id = customerId;
10530
10304
  let card_id = selectedCard == null ? void 0 : selectedCard.id;
@@ -10571,6 +10345,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10571
10345
  statusCode: (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.status
10572
10346
  });
10573
10347
  hideLoader();
10348
+ setError(((_i2 = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.message) || "Something went wrong!");
10574
10349
  }
10575
10350
  } else {
10576
10351
  setError("Please Select A Card/Bank");
@@ -10592,7 +10367,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10592
10367
  }
10593
10368
  };
10594
10369
  const getPaymentDetails = async () => {
10595
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2;
10370
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2;
10596
10371
  try {
10597
10372
  showLoader();
10598
10373
  const res = await axios9.get(`${masterBaseUrl}api/v1/gateway/get-payment-details/${session_token}`, {
@@ -10615,7 +10390,6 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10615
10390
  result: (_n2 = (_m2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _m2.data) == null ? void 0 : _n2.result,
10616
10391
  statusCode: (_o2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _o2.status
10617
10392
  });
10618
- setError(((_q2 = (_p2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _p2.data) == null ? void 0 : _q2.message) || (error2 == null ? void 0 : error2.message) || "Something went wrong");
10619
10393
  hideLoader();
10620
10394
  }
10621
10395
  };
@@ -10653,13 +10427,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10653
10427
  }
10654
10428
  }, [show, autoTrigger]);
10655
10429
  useEffect15(() => {
10656
- if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
10430
+ if (!hasRunRef.current && (show || autoTrigger)) {
10657
10431
  getPaymentDetails();
10658
10432
  if (isPartial && !partialRef) {
10659
10433
  crateOrderFrac();
10660
10434
  }
10661
10435
  }
10662
- }, [show, autoTrigger, isPartial, onLoad]);
10436
+ }, [show, autoTrigger, isPartial]);
10663
10437
  useEffect15(() => {
10664
10438
  if ((show || autoTrigger) && pass_fee_amount) {
10665
10439
  let cashdisc = Number(amount) - Number(pass_fee_amount);
@@ -10746,89 +10520,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10746
10520
  styles: {}
10747
10521
  });
10748
10522
  }, []);
10749
- const stateRef = useRef10({
10750
- activeinBank,
10751
- activeinCard,
10752
- activetab
10753
- });
10754
- useEffect15(() => {
10755
- stateRef.current = {
10756
- activeinBank,
10757
- activeinCard,
10758
- activetab
10759
- };
10760
- }, [activeinBank, activeinCard, activetab]);
10761
- const submit = useCallback(() => {
10762
- var _a2, _b2;
10763
- const { activeinBank: activeinBank2, activeinCard: activeinCard2, activetab: activetab2 } = stateRef.current;
10764
- if (activetab2 === "card") {
10765
- if (activeinCard2 === "form") {
10766
- (_a2 = cardFormRef.current) == null ? void 0 : _a2.requestSubmit();
10767
- } else if (activeinCard2 === "list") {
10768
- handlechargeCustomer();
10769
- }
10770
- } else if (activetab2 === "ach") {
10771
- if (activeinBank2 === "form") {
10772
- (_b2 = bankFormRef.current) == null ? void 0 : _b2.requestSubmit();
10773
- } else if (activeinBank2 === "list") {
10774
- handlechargeCustomer();
10775
- }
10776
- }
10777
- }, []);
10778
- useEffect15(() => {
10779
- onSubmit == null ? void 0 : onSubmit(submit);
10780
- }, [onSubmit, submit]);
10781
- function detectCardType(cardinput) {
10782
- if (!cardinput) return null;
10783
- const number = cardinput.replace(/\D/g, "");
10784
- const patterns = {
10785
- visa: /^4/,
10786
- mastercard: /^(5[1-5]|2[2-7][0-9]{2})/,
10787
- amex: /^3[47]/,
10788
- discover: /^(6011|65|64[4-9])/,
10789
- diners: /^(30[0-5]|36|38)/,
10790
- jcb: /^(35[2-8][0-9])/,
10791
- unionpay: /^62/
10792
- };
10793
- for (const [type, regex] of Object.entries(patterns)) {
10794
- if (regex.test(number)) {
10795
- return type;
10796
- }
10797
- }
10798
- return "unknown";
10799
- }
10800
- function getCardImage(cardInput) {
10801
- const cardType = detectCardType(cardInput);
10802
- switch (cardType) {
10803
- case "visa":
10804
- return /* @__PURE__ */ jsx34("img", { src: visa2, alt: "visa", width: 33 });
10805
- case "mastercard":
10806
- return /* @__PURE__ */ jsx34("img", { src: mastercard2, width: 33, alt: "mastercard" });
10807
- case "amex":
10808
- return /* @__PURE__ */ jsx34("img", { src: americanexp2, alt: "amex", width: 33 });
10809
- case "discover":
10810
- return /* @__PURE__ */ jsx34("img", { src: discover2, width: 33, alt: "discover" });
10811
- case "diners":
10812
- return /* @__PURE__ */ jsx34("img", { src: dinersicon, alt: "Diners Club" });
10813
- case "jcb":
10814
- return /* @__PURE__ */ jsx34("img", { src: jcbicon, alt: "JCB" });
10815
- case "unionpay":
10816
- return /* @__PURE__ */ jsx34("img", { src: unionicon, alt: "UnionPay" });
10817
- default:
10818
- return /* @__PURE__ */ jsx34("img", { src: defualtcardborder, alt: "card" });
10819
- }
10820
- }
10821
- return /* @__PURE__ */ jsxs20(Fragment19, { children: [
10822
- (initialLoader || !onLoad) && /* @__PURE__ */ jsx34(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
10823
- error && /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
10824
- errorIframe && /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
10523
+ console.log(activeinCard === "list", "activeinCard", activeList);
10524
+ return /* @__PURE__ */ jsxs19(Fragment18, { children: [
10525
+ initialLoader && /* @__PURE__ */ jsx32(Loader_default, { loading: initialLoader }),
10526
+ error && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error, onClose: handleClose }) }),
10527
+ errorIframe && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error: errorIframe, onClose: () => {
10825
10528
  setErrorIframe("");
10826
- }, autoTrigger: onSubmit ? !onSubmit : autoTrigger }) }),
10827
- /* @__PURE__ */ jsxs20(Fragment19, { children: [
10828
- (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx34(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
10829
- /* @__PURE__ */ jsxs20("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
10830
- /* @__PURE__ */ jsx34("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
10831
- (stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx34(
10529
+ } }) }),
10530
+ !error && !errorIframe && /* @__PURE__ */ jsxs19(Fragment18, { children: [
10531
+ (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx32(Loader_default, { loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
10532
+ /* @__PURE__ */ jsxs19("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
10533
+ /* @__PURE__ */ jsx32("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
10534
+ (stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx32(
10832
10535
  ThreeDSChallenge,
10833
10536
  {
10834
10537
  containerRef: threeDSContainerRef,
@@ -10838,33 +10541,40 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10838
10541
  onSuccess: handleSuccess,
10839
10542
  onError: handleError
10840
10543
  }
10841
- ) : /* @__PURE__ */ jsxs20("div", { className: "parent-pay-container", children: [
10842
- /* @__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: [
10843
- /* @__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" }) }),
10844
- /* @__PURE__ */ jsx34("defs", { children: /* @__PURE__ */ jsx34("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx34("rect", { width: "16", height: "16", fill: "white" }) }) })
10544
+ ) : /* @__PURE__ */ jsxs19("div", { className: "parent-pay-container", children: [
10545
+ /* @__PURE__ */ jsx32("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs19("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
10546
+ /* @__PURE__ */ jsx32("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx32("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" }) }),
10547
+ /* @__PURE__ */ jsx32("defs", { children: /* @__PURE__ */ jsx32("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx32("rect", { width: "16", height: "16", fill: "white" }) }) })
10845
10548
  ] }) }),
10846
- /* @__PURE__ */ jsx34("div", { className: "pay-main-logo-res" }),
10847
- /* @__PURE__ */ jsxs20("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
10848
- !onSubmit && /* @__PURE__ */ jsxs20("div", { className: "pay-header pay-conatiner-one", children: [
10849
- /* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-first", children: [
10850
- /* @__PURE__ */ jsxs20("div", { className: "pay-logo-container", children: [
10851
- /* @__PURE__ */ jsx34("div", { className: "pay-main-logo" }),
10852
- /* @__PURE__ */ jsx34("h1", { className: "pay-heading", children: "Pay" }),
10853
- (cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs20("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
10549
+ /* @__PURE__ */ jsx32("div", { className: "pay-main-logo-res" }),
10550
+ /* @__PURE__ */ jsxs19("div", { className: "pay-container", children: [
10551
+ /* @__PURE__ */ jsxs19("div", { className: "pay-header pay-conatiner-one", children: [
10552
+ /* @__PURE__ */ jsxs19("div", { className: "pay-conatiner-one-first", children: [
10553
+ /* @__PURE__ */ jsxs19("div", { className: "pay-logo-container", children: [
10554
+ /* @__PURE__ */ jsx32("div", { className: "pay-main-logo" }),
10555
+ /* @__PURE__ */ jsx32("h1", { className: "pay-heading", children: "Pay" }),
10556
+ (cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs19("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
10854
10557
  " ",
10855
- /* @__PURE__ */ jsx34(IoArrowBack4, {}),
10558
+ /* @__PURE__ */ jsx32(IoArrowBack4, {}),
10856
10559
  " Back"
10857
10560
  ] })
10858
10561
  ] }),
10859
- /* @__PURE__ */ jsx34("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
10860
- /* @__PURE__ */ jsx34("small", { className: "pay-payment-amount", children: "Select payment type" }),
10861
- /* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
10862
- /* @__PURE__ */ jsx34(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
10863
- !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 })
10562
+ /* @__PURE__ */ jsx32("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs19("div", { className: "pay-amount-conatiner", children: [
10563
+ /* @__PURE__ */ jsx32("small", { className: "pay-payment-amount", children: "Select payment type" }),
10564
+ /* @__PURE__ */ jsxs19("div", { className: "frac-card-bank-radio-main", children: [
10565
+ /* @__PURE__ */ jsx32(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
10566
+ !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx32(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab })
10864
10567
  ] }),
10865
- isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
10866
- /* @__PURE__ */ jsx34("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
10867
- /* @__PURE__ */ jsx34(
10568
+ pass_fee && activetab === "card" && cashDiscount && Number(amount) - Number(cashDiscount) > 0 ? /* @__PURE__ */ jsxs19("div", { className: "frac-cash-discount-fee", children: [
10569
+ /* @__PURE__ */ jsxs19("small", { children: [
10570
+ activetab === "card" ? "Cash Discount" : "Cash Discount Savings",
10571
+ " "
10572
+ ] }),
10573
+ /* @__PURE__ */ jsx32("p", { children: formatUSD((Number(amount) - Number(cashDiscount)).toFixed(2)) })
10574
+ ] }) : null,
10575
+ isPartial && /* @__PURE__ */ jsxs19("div", { className: "frac-partial-payment-input", children: [
10576
+ /* @__PURE__ */ jsx32("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
10577
+ /* @__PURE__ */ jsx32(
10868
10578
  NumericFormat2,
10869
10579
  {
10870
10580
  prefix: "$",
@@ -10888,372 +10598,331 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10888
10598
  }
10889
10599
  }
10890
10600
  ),
10891
- partialError && /* @__PURE__ */ jsx34("span", { className: "error-span", children: partialError })
10601
+ partialError && /* @__PURE__ */ jsx32("span", { className: "error-span", children: partialError })
10892
10602
  ] })
10893
10603
  ] }) })
10894
10604
  ] }),
10895
- /* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-last", children: [
10896
- /* @__PURE__ */ jsx34("img", { src: secure2, alt: "" }),
10897
- /* @__PURE__ */ jsx34("img", { src: pov2, alt: "" }),
10605
+ /* @__PURE__ */ jsxs19("div", { className: "pay-conatiner-one-last", children: [
10606
+ /* @__PURE__ */ jsx32("img", { src: secure2, alt: "" }),
10607
+ /* @__PURE__ */ jsx32("img", { src: pov2, alt: "" }),
10898
10608
  "Secure payments powered by Fractal"
10899
10609
  ] })
10900
10610
  ] }),
10901
- /* @__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: [
10902
- onSubmit && /* @__PURE__ */ jsx34("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
10903
- /* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
10904
- /* @__PURE__ */ jsx34(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
10905
- !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 })
10611
+ /* @__PURE__ */ jsx32("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx32("div", { className: "col-md-12", children: /* @__PURE__ */ jsx32("div", { id: "payment-form-div", children: is3DSEnable ? clientSecret && /* @__PURE__ */ jsx32(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs19(Fragment18, { children: [
10612
+ /* @__PURE__ */ jsxs19("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
10613
+ /* @__PURE__ */ jsxs19("div", { className: "frac-heading-card-wrap", children: [
10614
+ /* @__PURE__ */ jsx32("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs19("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
10615
+ " ",
10616
+ /* @__PURE__ */ jsx32(IoArrowBack4, {})
10617
+ ] }) }),
10618
+ /* @__PURE__ */ jsx32("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
10906
10619
  ] }),
10907
- isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
10908
- /* @__PURE__ */ jsx34("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
10909
- /* @__PURE__ */ jsx34(
10910
- NumericFormat2,
10911
- {
10912
- prefix: "$",
10913
- className: "form-control-frac",
10914
- value: partialAmount,
10915
- onValueChange: (values) => {
10916
- handlePartialChange(values);
10917
- },
10918
- thousandSeparator: true,
10919
- placeholder: "Enter partial amount",
10920
- allowNegative: false,
10921
- allowLeadingZeros: false,
10922
- decimalScale: 2,
10923
- fixedDecimalScale: true
10924
- }
10925
- ),
10926
- partialError && /* @__PURE__ */ jsx34("span", { className: "error-span", children: partialError })
10927
- ] })
10928
- ] }) }),
10929
- is3DSEnable ? clientSecret && /* @__PURE__ */ jsx34(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs20(Fragment19, { children: [
10930
- /* @__PURE__ */ jsxs20("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
10931
- !onSubmit && /* @__PURE__ */ jsxs20(Fragment19, { children: [
10932
- /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
10933
- /* @__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: [
10934
- " ",
10935
- /* @__PURE__ */ jsx34(IoArrowBack4, {})
10936
- ] }) }),
10937
- /* @__PURE__ */ jsx34("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
10620
+ /* @__PURE__ */ jsxs19("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
10621
+ /* @__PURE__ */ jsx32("img", { src: visa2, alt: "", width: 33 }),
10622
+ /* @__PURE__ */ jsx32("img", { src: mastercard2, width: 33, alt: "" }),
10623
+ /* @__PURE__ */ jsx32("img", { src: americanexp2, alt: "", width: 33 }),
10624
+ /* @__PURE__ */ jsx32("img", { src: discover2, width: 33, alt: "" })
10625
+ ] }),
10626
+ activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
10627
+ /* @__PURE__ */ jsx32(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
10628
+ setActiveinCard("form");
10629
+ } }),
10630
+ /* @__PURE__ */ jsx32("div", { className: "form-group-frac", style: { padding: "0" }, children: /* @__PURE__ */ jsx32("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: partialAmount ? formatUSD((_c = Number(partialAmount)) == null ? void 0 : _c.toFixed(2)) : formatUSD((_d = Number(amount)) == null ? void 0 : _d.toFixed(2)) }) })
10631
+ ] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs19("form", { id: "paymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, onKeyDown: (e) => {
10632
+ if (e.key === "Enter" && loading) {
10633
+ e.preventDefault();
10634
+ e.stopPropagation();
10635
+ }
10636
+ }, children: [
10637
+ /* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
10638
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10639
+ /* @__PURE__ */ jsx32("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
10640
+ /* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
10641
+ const value = e.target.value;
10642
+ if (/^[a-zA-Z\s]*$/.test(value)) {
10643
+ handleCardChange("cardName", value);
10644
+ }
10645
+ } }),
10646
+ (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
10938
10647
  ] }),
10939
- /* @__PURE__ */ jsxs20("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
10940
- /* @__PURE__ */ jsx34("img", { src: visa2, alt: "", width: 33 }),
10941
- /* @__PURE__ */ jsx34("img", { src: mastercard2, width: 33, alt: "" }),
10942
- /* @__PURE__ */ jsx34("img", { src: americanexp2, alt: "", width: 33 }),
10943
- /* @__PURE__ */ jsx34("img", { src: discover2, width: 33, alt: "" })
10944
- ] })
10945
- ] }),
10946
- activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
10947
- /* @__PURE__ */ jsx34(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
10948
- setActiveinCard("form");
10949
- } }),
10950
- /* @__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)) }) })
10951
- ] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs20("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
10952
- if (e.key === "Enter" && loading) {
10953
- e.preventDefault();
10954
- e.stopPropagation();
10955
- }
10956
- }, children: [
10957
- /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
10958
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
10959
- /* @__PURE__ */ jsx34("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
10960
- /* @__PURE__ */ jsx34("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
10961
- const value = e.target.value;
10962
- if (/^[a-zA-Z\s]*$/.test(value)) {
10963
- handleCardChange("cardName", value);
10964
- }
10965
- } }),
10966
- (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
10967
- ] }),
10968
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
10969
- /* @__PURE__ */ jsx34("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
10970
- /* @__PURE__ */ jsx34("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx34(
10971
- FractalFields_default,
10972
- {
10973
- fractalStyles,
10974
- tokenizerRef,
10975
- isSky: true
10976
- }
10977
- ) })
10978
- ] }),
10979
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
10980
- /* @__PURE__ */ jsx34("label", { htmlFor: "zip", children: "ZIP" }),
10981
- /* @__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) }),
10982
- (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
10983
- pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
10984
- "Credit cards include a fee amount of ",
10985
- /* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
10986
- "."
10987
- ] })
10988
- ] }),
10989
- 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: [
10990
- /* @__PURE__ */ jsx34(
10991
- "input",
10992
- {
10993
- type: "checkbox",
10994
- id: "save_card",
10995
- className: "toggle-checkbox",
10996
- checked: saveCardInfo,
10997
- onChange: (e) => setSaveCardInfo(e.target.checked)
10998
- }
10999
- ),
11000
- /* @__PURE__ */ jsx34("label", { htmlFor: "save_card", className: "toggle-label" }),
11001
- /* @__PURE__ */ jsx34("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11002
- /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
11003
- /* @__PURE__ */ jsx34("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
11004
- "svg",
11005
- {
11006
- xmlns: "http://www.w3.org/2000/svg",
11007
- width: "20",
11008
- height: "20",
11009
- viewBox: "0 0 20 20",
11010
- fill: "none",
11011
- children: [
11012
- /* @__PURE__ */ jsx34("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11013
- /* @__PURE__ */ jsx34(
11014
- "path",
11015
- {
11016
- 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",
11017
- fill: "#161616"
11018
- }
11019
- )
11020
- ]
11021
- }
11022
- ) }),
11023
- /* @__PURE__ */ jsx34("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
11024
- "If checked, I agree to give the ",
11025
- /* @__PURE__ */ jsx34("b", { children: merchantName || "merchant" }),
11026
- " permission to charge this credit card for agreed-upon purchases in the future."
11027
- ] }) })
11028
- ] })
11029
- ] }) })
10648
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10649
+ /* @__PURE__ */ jsx32("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
10650
+ /* @__PURE__ */ jsx32("div", { className: "toggle-num-wrapper", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx32(
10651
+ FractalFields_default,
10652
+ {
10653
+ fractalStyles,
10654
+ tokenizerRef,
10655
+ isSky: true
10656
+ }
10657
+ ) })
11030
10658
  ] }),
11031
- /* @__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)) }) })
11032
- ] }) : /* @__PURE__ */ jsxs20("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11033
- if (e.key === "Enter" && loading) {
11034
- e.preventDefault();
11035
- e.stopPropagation();
11036
- }
11037
- }, children: [
11038
- /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11039
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11040
- /* @__PURE__ */ jsx34("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11041
- /* @__PURE__ */ jsx34("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11042
- const value = e.target.value;
11043
- if (/^[a-zA-Z\s]*$/.test(value)) {
11044
- handleCardChange("cardName", value);
11045
- }
11046
- } }),
11047
- (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11048
- ] }),
11049
- /* @__PURE__ */ jsx34("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx34(
11050
- DataCapFields,
10659
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10660
+ /* @__PURE__ */ jsx32("label", { htmlFor: "zip", children: "ZIP" }),
10661
+ /* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_e = cardData == null ? void 0 : cardData.zipCode) != null ? _e : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
10662
+ (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
10663
+ ] }),
10664
+ customerId && /* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
10665
+ /* @__PURE__ */ jsx32(
10666
+ "input",
11051
10667
  {
11052
- isOpen: show || autoTrigger,
11053
- tokenKey: dcToken,
11054
- setLoader: activeinCard === "form" ? setLoadingIframe : null,
11055
- isEmbedded: onSubmit ? true : false
10668
+ type: "checkbox",
10669
+ id: "save_card",
10670
+ className: "toggle-checkbox",
10671
+ checked: saveCardInfo,
10672
+ onChange: (e) => setSaveCardInfo(e.target.checked)
11056
10673
  }
11057
- ) }),
11058
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11059
- /* @__PURE__ */ jsx34("label", { htmlFor: "zip", children: "ZIP" }),
11060
- /* @__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) }),
11061
- (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11062
- pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
11063
- "Credit cards include a fee amount of ",
11064
- /* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11065
- "."
11066
- ] })
11067
- ] }),
11068
- 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: [
11069
- /* @__PURE__ */ jsx34(
11070
- "input",
10674
+ ),
10675
+ /* @__PURE__ */ jsx32("label", { htmlFor: "save_card", className: "toggle-label" }),
10676
+ /* @__PURE__ */ jsx32("label", { htmlFor: "save_card", children: "Save card for future payments " }),
10677
+ /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
10678
+ /* @__PURE__ */ jsx32("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
10679
+ "svg",
11071
10680
  {
11072
- type: "checkbox",
11073
- id: "save_card",
11074
- className: "toggle-checkbox",
11075
- checked: saveCardInfo,
11076
- onChange: (e) => setSaveCardInfo(e.target.checked)
10681
+ xmlns: "http://www.w3.org/2000/svg",
10682
+ width: "20",
10683
+ height: "20",
10684
+ viewBox: "0 0 20 20",
10685
+ fill: "none",
10686
+ children: [
10687
+ /* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
10688
+ /* @__PURE__ */ jsx32(
10689
+ "path",
10690
+ {
10691
+ 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",
10692
+ fill: "#161616"
10693
+ }
10694
+ )
10695
+ ]
11077
10696
  }
11078
- ),
11079
- /* @__PURE__ */ jsx34("label", { htmlFor: "save_card", className: "toggle-label" }),
11080
- /* @__PURE__ */ jsx34("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11081
- /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
11082
- /* @__PURE__ */ jsx34("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
11083
- "svg",
11084
- {
11085
- xmlns: "http://www.w3.org/2000/svg",
11086
- width: "20",
11087
- height: "20",
11088
- viewBox: "0 0 20 20",
11089
- fill: "none",
11090
- children: [
11091
- /* @__PURE__ */ jsx34("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11092
- /* @__PURE__ */ jsx34(
11093
- "path",
11094
- {
11095
- 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",
11096
- fill: "#161616"
11097
- }
11098
- )
11099
- ]
11100
- }
11101
- ) }),
11102
- /* @__PURE__ */ jsx34("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
11103
- "If checked, I agree to give the ",
11104
- /* @__PURE__ */ jsx34("b", { children: merchantName || "merchant" }),
11105
- " permission to charge this credit card for agreed-upon purchases in the future."
11106
- ] }) })
11107
- ] })
11108
- ] }) })
11109
- ] }),
11110
- /* @__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)) }) })
11111
- ] })
11112
- ] }),
11113
- /* @__PURE__ */ jsx34("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs20(Fragment19, { children: [
11114
- !onSubmit && /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
11115
- /* @__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: [
11116
- " ",
11117
- /* @__PURE__ */ jsx34(IoArrowBack4, {})
11118
- ] }) }),
11119
- /* @__PURE__ */ jsx34("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
10697
+ ) }),
10698
+ /* @__PURE__ */ jsx32("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
10699
+ "If checked, I agree to give the ",
10700
+ /* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
10701
+ " permission to charge this credit card for agreed-upon purchases in the future."
10702
+ ] }) })
10703
+ ] })
10704
+ ] }) })
11120
10705
  ] }),
11121
- activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
11122
- /* @__PURE__ */ jsx34(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
11123
- setActiveinBank("form");
11124
- } }),
11125
- /* @__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)) }) })
11126
- ] }) : /* @__PURE__ */ jsxs20("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
11127
- if (e.key === "Enter" && loading) {
11128
- e.preventDefault();
11129
- e.stopPropagation();
11130
- }
11131
- }, children: [
11132
- /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: {
11133
- minHeight: "444px",
11134
- maxHeight: "444px"
11135
- }, children: [
11136
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11137
- /* @__PURE__ */ jsx34("label", { htmlFor: "nameonaccount", children: "Name on account" }),
11138
- /* @__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 }),
11139
- (achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
11140
- ] }),
11141
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11142
- /* @__PURE__ */ jsx34("label", { htmlFor: "routingnumber", children: "Routing number" }),
11143
- /* @__PURE__ */ jsx34(
11144
- "input",
11145
- {
11146
- type: "text",
11147
- id: "routingnumber",
11148
- className: "form-control-frac",
11149
- maxLength: 9,
11150
- placeholder: "000000000",
11151
- name: "routingNumber",
11152
- value: (_o = achData == null ? void 0 : achData.routingNumber) != null ? _o : "",
11153
- onChange: handleChangeAch
11154
- }
11155
- ),
11156
- (achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
11157
- ] }),
11158
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11159
- /* @__PURE__ */ jsx34("label", { htmlFor: "accountnumber", children: "Account number" }),
11160
- /* @__PURE__ */ jsx34(
11161
- "input",
11162
- {
11163
- type: "text",
11164
- id: "accountnumber",
11165
- className: "form-control-frac",
11166
- maxLength: 16,
11167
- placeholder: "0000000000",
11168
- name: "accountNumber",
11169
- value: (_p = achData == null ? void 0 : achData.accountNumber) != null ? _p : "",
11170
- onChange: handleChangeAch
11171
- }
11172
- ),
11173
- (achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
11174
- ] }),
11175
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11176
- /* @__PURE__ */ jsx34("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
11177
- /* @__PURE__ */ jsx34(
11178
- "input",
11179
- {
11180
- type: "text",
11181
- id: "confirmaccountnumber",
11182
- className: "form-control-frac",
11183
- maxLength: 16,
11184
- placeholder: "0000000000",
11185
- name: "confirmAccountNumber",
11186
- value: (_q = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _q : "",
11187
- onChange: handleChangeAch
11188
- }
11189
- ),
11190
- (achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
11191
- ] }),
11192
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11193
- /* @__PURE__ */ jsx34("label", { htmlFor: "bankname", children: "Bank name" }),
11194
- /* @__PURE__ */ jsx34(
11195
- "input",
11196
- {
11197
- type: "text",
11198
- id: "bankname",
11199
- className: "form-control-frac",
11200
- maxLength: 100,
11201
- placeholder: "My Bank",
11202
- name: "bankName",
11203
- value: (_r = achData == null ? void 0 : achData.bankName) != null ? _r : "",
11204
- onChange: handleChangeAch
11205
- }
11206
- ),
11207
- (achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
11208
- ] }),
11209
- ((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11210
- /* @__PURE__ */ jsx34("label", { htmlFor: "companyName", children: "Company name" }),
11211
- /* @__PURE__ */ jsx34(
11212
- "input",
10706
+ /* @__PURE__ */ jsx32("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx32("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount ? formatUSD((_f = Number(partialAmount)) == null ? void 0 : _f.toFixed(2)) : formatUSD((_g = Number(amount)) == null ? void 0 : _g.toFixed(2)) }) })
10707
+ ] }) : /* @__PURE__ */ jsxs19("form", { id: "PaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, onKeyDown: (e) => {
10708
+ if (e.key === "Enter" && loading) {
10709
+ e.preventDefault();
10710
+ e.stopPropagation();
10711
+ }
10712
+ }, children: [
10713
+ /* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
10714
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10715
+ /* @__PURE__ */ jsx32("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
10716
+ /* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
10717
+ const value = e.target.value;
10718
+ if (/^[a-zA-Z\s]*$/.test(value)) {
10719
+ handleCardChange("cardName", value);
10720
+ }
10721
+ } }),
10722
+ (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
10723
+ ] }),
10724
+ /* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx32(
10725
+ DataCapFields,
10726
+ {
10727
+ isOpen: show || autoTrigger,
10728
+ tokenKey: dcToken,
10729
+ setLoader: activeinCard === "form" ? setLoadingIframe : null
10730
+ }
10731
+ ) }),
10732
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10733
+ /* @__PURE__ */ jsx32("label", { htmlFor: "zip", children: "ZIP" }),
10734
+ /* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_h = cardData == null ? void 0 : cardData.zipCode) != null ? _h : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
10735
+ (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
10736
+ ] }),
10737
+ customerId && /* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
10738
+ /* @__PURE__ */ jsx32(
10739
+ "input",
10740
+ {
10741
+ type: "checkbox",
10742
+ id: "save_card",
10743
+ className: "toggle-checkbox",
10744
+ checked: saveCardInfo,
10745
+ onChange: (e) => setSaveCardInfo(e.target.checked)
10746
+ }
10747
+ ),
10748
+ /* @__PURE__ */ jsx32("label", { htmlFor: "save_card", className: "toggle-label" }),
10749
+ /* @__PURE__ */ jsx32("label", { htmlFor: "save_card", children: "Save card for future payments " }),
10750
+ /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
10751
+ /* @__PURE__ */ jsx32("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
10752
+ "svg",
11213
10753
  {
11214
- type: "text",
11215
- id: "companyName",
11216
- className: "form-control-frac",
11217
- maxLength: 100,
11218
- placeholder: "My Company",
11219
- name: "companyName",
11220
- value: (_s = achData == null ? void 0 : achData.companyName) != null ? _s : "",
11221
- onChange: handleChangeAch
10754
+ xmlns: "http://www.w3.org/2000/svg",
10755
+ width: "20",
10756
+ height: "20",
10757
+ viewBox: "0 0 20 20",
10758
+ fill: "none",
10759
+ children: [
10760
+ /* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
10761
+ /* @__PURE__ */ jsx32(
10762
+ "path",
10763
+ {
10764
+ 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",
10765
+ fill: "#161616"
10766
+ }
10767
+ )
10768
+ ]
11222
10769
  }
11223
- ),
11224
- (achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
11225
- ] }),
11226
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11227
- /* @__PURE__ */ jsx34("label", { htmlFor: "accounttype", children: "Select account type" }),
11228
- /* @__PURE__ */ jsxs20("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
11229
- /* @__PURE__ */ jsx34("option", { value: "", children: "Select account" }),
11230
- accountTypes.map((type) => /* @__PURE__ */ jsx34("option", { value: type.value, children: type.label }, type.value))
11231
- ] }),
11232
- bankFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
11233
- "There is a processing fee of ",
11234
- /* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
11235
- "."
11236
- ] })
11237
- ] }),
11238
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11239
- /* @__PURE__ */ jsx34("input", { type: "checkbox", id: "achconsent", className: "", maxLength: 100, placeholder: "My Bank" }),
11240
- /* @__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.` })
11241
- ] }),
11242
- customerId && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11243
- /* @__PURE__ */ jsx34("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
11244
- /* @__PURE__ */ jsx34("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
11245
- ] }),
11246
- saveACHinfo && /* @__PURE__ */ jsx34("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs20("p", { children: [
11247
- "If checked, I agree to give the ",
11248
- /* @__PURE__ */ jsx34("b", { children: merchantName || "merchant" }),
11249
- " permission to charge this bank account for agreed-upon purchases in the future."
11250
- ] }) })
10770
+ ) }),
10771
+ /* @__PURE__ */ jsx32("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
10772
+ "If checked, I agree to give the ",
10773
+ /* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
10774
+ " permission to charge this credit card for agreed-upon purchases in the future."
10775
+ ] }) })
10776
+ ] })
10777
+ ] }) })
10778
+ ] }),
10779
+ /* @__PURE__ */ jsx32("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx32("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount ? formatUSD((_i = Number(partialAmount)) == null ? void 0 : _i.toFixed(2)) : formatUSD((_j = Number(amount)) == null ? void 0 : _j.toFixed(2)) }) })
10780
+ ] })
10781
+ ] }),
10782
+ /* @__PURE__ */ jsx32("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs19(Fragment18, { children: [
10783
+ /* @__PURE__ */ jsxs19("div", { className: "frac-heading-card-wrap", children: [
10784
+ /* @__PURE__ */ jsx32("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs19("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
10785
+ " ",
10786
+ /* @__PURE__ */ jsx32(IoArrowBack4, {})
10787
+ ] }) }),
10788
+ /* @__PURE__ */ jsx32("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
10789
+ ] }),
10790
+ activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
10791
+ /* @__PURE__ */ jsx32(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
10792
+ setActiveinBank("form");
10793
+ } }),
10794
+ /* @__PURE__ */ jsx32("div", { className: "form-group-frac", style: { padding: "0" }, children: /* @__PURE__ */ jsx32("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_k = Number(bankAmount)) == null ? void 0 : _k.toFixed(2)) }) })
10795
+ ] }) : /* @__PURE__ */ jsxs19("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
10796
+ if (e.key === "Enter" && loading) {
10797
+ e.preventDefault();
10798
+ e.stopPropagation();
10799
+ }
10800
+ }, children: [
10801
+ /* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: {
10802
+ minHeight: "444px",
10803
+ maxHeight: "444px"
10804
+ }, children: [
10805
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10806
+ /* @__PURE__ */ jsx32("label", { htmlFor: "nameonaccount", children: "Name on account" }),
10807
+ /* @__PURE__ */ jsx32("input", { type: "text", id: "nameonaccount", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", name: "name", value: (_l = achData == null ? void 0 : achData.name) != null ? _l : "", onChange: handleChangeAch }),
10808
+ (achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
11251
10809
  ] }),
11252
- /* @__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)) }) })
11253
- ] })
11254
- ] }) })
11255
- ] })
11256
- ] }) }) })
10810
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10811
+ /* @__PURE__ */ jsx32("label", { htmlFor: "routingnumber", children: "Routing number" }),
10812
+ /* @__PURE__ */ jsx32(
10813
+ "input",
10814
+ {
10815
+ type: "text",
10816
+ id: "routingnumber",
10817
+ className: "form-control-frac",
10818
+ maxLength: 9,
10819
+ placeholder: "000000000",
10820
+ name: "routingNumber",
10821
+ value: (_m = achData == null ? void 0 : achData.routingNumber) != null ? _m : "",
10822
+ onChange: handleChangeAch
10823
+ }
10824
+ ),
10825
+ (achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
10826
+ ] }),
10827
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10828
+ /* @__PURE__ */ jsx32("label", { htmlFor: "accountnumber", children: "Account number" }),
10829
+ /* @__PURE__ */ jsx32(
10830
+ "input",
10831
+ {
10832
+ type: "text",
10833
+ id: "accountnumber",
10834
+ className: "form-control-frac",
10835
+ maxLength: 16,
10836
+ placeholder: "0000000000",
10837
+ name: "accountNumber",
10838
+ value: (_n = achData == null ? void 0 : achData.accountNumber) != null ? _n : "",
10839
+ onChange: handleChangeAch
10840
+ }
10841
+ ),
10842
+ (achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
10843
+ ] }),
10844
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10845
+ /* @__PURE__ */ jsx32("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
10846
+ /* @__PURE__ */ jsx32(
10847
+ "input",
10848
+ {
10849
+ type: "text",
10850
+ id: "confirmaccountnumber",
10851
+ className: "form-control-frac",
10852
+ maxLength: 16,
10853
+ placeholder: "0000000000",
10854
+ name: "confirmAccountNumber",
10855
+ value: (_o = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _o : "",
10856
+ onChange: handleChangeAch
10857
+ }
10858
+ ),
10859
+ (achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
10860
+ ] }),
10861
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10862
+ /* @__PURE__ */ jsx32("label", { htmlFor: "bankname", children: "Bank name" }),
10863
+ /* @__PURE__ */ jsx32(
10864
+ "input",
10865
+ {
10866
+ type: "text",
10867
+ id: "bankname",
10868
+ className: "form-control-frac",
10869
+ maxLength: 100,
10870
+ placeholder: "My Bank",
10871
+ name: "bankName",
10872
+ value: (_p = achData == null ? void 0 : achData.bankName) != null ? _p : "",
10873
+ onChange: handleChangeAch
10874
+ }
10875
+ ),
10876
+ (achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
10877
+ ] }),
10878
+ ((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10879
+ /* @__PURE__ */ jsx32("label", { htmlFor: "companyName", children: "Company name" }),
10880
+ /* @__PURE__ */ jsx32(
10881
+ "input",
10882
+ {
10883
+ type: "text",
10884
+ id: "companyName",
10885
+ className: "form-control-frac",
10886
+ maxLength: 100,
10887
+ placeholder: "My Company",
10888
+ name: "companyName",
10889
+ value: (_q = achData == null ? void 0 : achData.companyName) != null ? _q : "",
10890
+ onChange: handleChangeAch
10891
+ }
10892
+ ),
10893
+ (achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
10894
+ ] }),
10895
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10896
+ /* @__PURE__ */ jsx32("label", { htmlFor: "accounttype", children: "Select account type" }),
10897
+ /* @__PURE__ */ jsxs19("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_r = achData == null ? void 0 : achData.accountType) != null ? _r : "", onChange: handleChangeAch, children: [
10898
+ /* @__PURE__ */ jsx32("option", { value: "", children: "Select account" }),
10899
+ accountTypes.map((type) => /* @__PURE__ */ jsx32("option", { value: type.value, children: type.label }, type.value))
10900
+ ] })
10901
+ ] }),
10902
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
10903
+ /* @__PURE__ */ jsx32("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
10904
+ setIsBankConsentChecked(e.target.checked);
10905
+ if (e.target.checked) {
10906
+ setErrorBankConsent("");
10907
+ }
10908
+ } }),
10909
+ /* @__PURE__ */ jsx32("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.` })
10910
+ ] }),
10911
+ errorBankConsent && /* @__PURE__ */ jsx32("span", { className: "error-span", children: errorBankConsent }),
10912
+ customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
10913
+ /* @__PURE__ */ jsx32("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
10914
+ /* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
10915
+ ] }),
10916
+ saveACHinfo && /* @__PURE__ */ jsx32("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs19("p", { children: [
10917
+ "If checked, I agree to give the ",
10918
+ /* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
10919
+ " permission to charge this bank account for agreed-upon purchases in the future."
10920
+ ] }) })
10921
+ ] }),
10922
+ /* @__PURE__ */ jsx32("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx32("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: formatUSD((_s = Number(bankAmount)) == null ? void 0 : _s.toFixed(2)) }) })
10923
+ ] })
10924
+ ] }) })
10925
+ ] }) }) }) })
11257
10926
  ] })
11258
10927
  ] })
11259
10928
  ] })
@@ -11264,7 +10933,7 @@ var ModelContentSky_default = ModelContentSky;
11264
10933
 
11265
10934
  // src/app/components/Skysystemz/PayButtonWithForm.tsx
11266
10935
  import axios10 from "axios";
11267
- import { Fragment as Fragment20, jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
10936
+ import { Fragment as Fragment19, jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
11268
10937
  var PaymentWidget = ({
11269
10938
  amount,
11270
10939
  bankAmount,
@@ -11375,510 +11044,24 @@ var PaymentWidget = ({
11375
11044
  getskyosOrderDetails();
11376
11045
  }
11377
11046
  }, [show, isPartial, partialRef]);
11378
- return /* @__PURE__ */ jsxs21(Fragment20, { children: [
11379
- /* @__PURE__ */ jsx35("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
11380
- /* @__PURE__ */ jsx35(DataScript, {}),
11381
- /* @__PURE__ */ jsx35(FractalTokenizerScript, {}),
11382
- /* @__PURE__ */ jsx35(SkyChargewidgetstyles, {}),
11383
- /* @__PURE__ */ jsx35(CardBankRadioStyles, {}),
11384
- /* @__PURE__ */ jsx35(CustomModal2styles_default, {}),
11385
- /* @__PURE__ */ jsx35(DataCapScriptLoader, {}),
11386
- !autoTrigger && /* @__PURE__ */ jsxs21("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
11387
- submitBtnText,
11388
- submitBtnIcon
11389
- ] }),
11390
- !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 }))
11391
- ] });
11392
- };
11393
-
11394
- // src/app/components/Skysystemz/EmbeddedCheckout.tsx
11395
- import { useEffect as useEffect17, useState as useState12, useMemo as useMemo2 } from "react";
11396
- import axios11 from "axios";
11397
-
11398
- // src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
11399
- import { jsx as jsx36 } from "react/jsx-runtime";
11400
- function EmbeddedCheckoutStyles({ extraCustomCSS }) {
11401
- return /* @__PURE__ */ jsx36("style", { children: `
11402
-
11403
- .pay-amount-conatiner{
11404
- margin-top: 20px !important;
11405
- margin-bottom: 20px !important ;
11406
- }
11407
-
11408
- .frac-pay-container.pay-container {
11409
- grid-template-columns:1fr;
11410
- }
11411
-
11412
-
11413
- /* Card */
11414
- .plan-card {
11415
- width: 100%;
11416
- font-family: Inter, sans-serif;
11417
- background: #fff;
11418
- }
11419
-
11420
- /* Header */
11421
- .card-header {
11422
- padding: 12px 0 0 0;
11423
- }
11424
-
11425
- /* Button */
11426
- .collapse-btn {
11427
- width: 100%;
11428
- background: none;
11429
- border: none;
11430
- display: flex;
11431
- justify-content: space-between;
11432
- align-items: center;
11433
- cursor: pointer;
11434
- font-size: 15px;
11435
- padding: 0;
11436
- }
11437
-
11438
- /* Arrow */
11439
- .arrow {
11440
- transition: transform 0.3s ease;
11441
- height: 8px;
11442
- }
11443
-
11444
- /* Open State */
11445
- .collapse-btn.open .arrow {
11446
- transform: rotate(180deg); /* Down */
11447
- }
11448
-
11449
- /* Body */
11450
- .card-body {
11451
- padding: 0;
11452
- }
11453
-
11454
- /* Plan Header */
11455
- .plan-header {
11456
- font-size: 15px;
11457
- font-weight: 600;
11458
- }
11459
-
11460
- /* Scrollable List */
11461
- .plan-list {
11462
- max-height: 200px;
11463
- overflow-y: auto;
11464
- padding-right: 6px;
11465
- }
11466
-
11467
- /* Items */
11468
- .plan-item {
11469
- display: flex;
11470
- justify-content: space-between;
11471
- padding: 6px 0;
11472
- font-size: 14px;
11473
- }
11474
-
11475
- /* Badges */
11476
- .badge {
11477
- padding: 4px 10px;
11478
- border-radius: 12px;
11479
- font-size: 12px;
11480
- font-weight: 500;
11481
- }
11482
-
11483
- .badge-included {
11484
- background: #f1f3f5;
11485
- color: #495057;
11486
- }
11487
-
11488
- .badge-available {
11489
- background: #f8f9fa;
11490
- color: #212529;
11491
- }
11492
-
11493
- /* Helpers */
11494
- .row-between {
11495
- display: flex;
11496
- justify-content: space-between;
11497
- }
11498
-
11499
- .text-end {
11500
- text-align: right;
11501
- }
11502
-
11503
- .text-muted {
11504
- color: #6c757d;
11505
- font-size: 12px;
11506
- }
11507
-
11508
- .fw-semibold {
11509
- font-weight: 600;
11510
- }
11511
-
11512
- .mb-2 {
11513
- margin-bottom: 8px;
11514
- }
11515
-
11516
- /* Divider */
11517
- .divider {
11518
- height: 1px;
11519
- background: #e5e7eb;
11520
- margin: 8px 0;
11521
- }
11522
-
11523
- /* Collapse Animation */
11524
- .collapse {
11525
- max-height: 0;
11526
- overflow: hidden;
11527
- transition: max-height 0.3s ease;
11528
- }
11529
-
11530
- .collapse.show {
11531
- max-height: 1000px;
11532
- }
11533
- .frac-pay-container.pay-container {
11534
- grid-template-columns:1fr;
11535
- }
11536
- .frac-payment-form-div .amt-pay-con {
11537
- padding-right: 0px;
11538
- }
11539
- .frac-payment-form-div .ach-scrl {
11540
- padding-right: 0px;
11541
- gap: 10px;
11542
- max-height: fit-content !important;
11543
- min-height: fit-content !important;
11544
- overflow: hidden !important;
11545
- }
11546
- .frac-payment-form-div .frac-card-bank-radio-main {
11547
- display: flex;
11548
- flex-direction: row;
11549
- align-items: flex-start;
11550
- align-self: stretch;
11551
- border-radius: 14px;
11552
- border: none;
11553
- overflow: visible;
11554
- gap: 10px;
11555
- }
11556
- .frac-payment-form-div .frac-card-bank-radio {
11557
- display: flex;
11558
- padding: 12px 16px;
11559
- justify-content: space-between;
11560
- align-items: center;
11561
- align-self: stretch;
11562
- width: 50%;
11563
- border: 1px solid #E0DFE2;
11564
- border-radius: 10px;
11565
- box-shadow: rgba(149, 157, 165, 0.2) 0px 1px 4px;
11566
- }
11567
- .frac-payment-form-div .frac-card-bank-radio.frac-active {
11568
- background: #fff;
11569
- border: 2px solid #004eab !important;
11570
- }
11571
-
11572
- .frac-payment-form-div .form-control-frac {
11573
- border: 1px solid #dee2e6 !important;
11574
- border-radius: 0.375rem !important;
11575
- background-color: #F6F6F7;
11576
- box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
11577
- }
11578
- .frac-payment-form-div .form-control-frac:focus {
11579
- border: 1px solid #004eab !important;
11580
- }
11581
- .frac-payment-form-div .card-expiry-new {
11582
- border: none;
11583
- gap: 10px;
11584
- }
11585
- .frac-payment-form-div .exp-date-year-container {
11586
- gap: 10px;
11587
- width: 100%;
11588
- }
11589
- .frac-payment-form-div .card-type-logo-wrap{
11590
- position: absolute;
11591
- right: 10px;
11592
- max-width: 30px;
11593
- }
11594
- .detials-wrap.detials-wrap-1 {
11595
- display: flex;
11596
- flex-wrap: wrap;
11597
- }
11598
- @media screen and (max-width: 1280px) {
11599
- .frac-pay-container.pay-container {
11600
- grid-template-columns: 1fr;
11601
- border: none;
11602
- }
11603
- }
11604
- @media screen and (max-width: 899px) {
11605
- .detials-wrap {
11606
- grid-template-columns: 1fr !important;
11607
- }
11608
- .frac-payment-form-div .exp-date-year-container{
11609
- width: 100%;}
11610
-
11611
- }
11612
- @media screen and (max-width: 575px) {
11613
- .frac-payment-form-div .card-type-logo-wrap{
11614
- max-width: 30px;
11615
- }
11616
- form#ACHPaymentForm .ach-scrl {
11617
- grid-template-columns: 1fr !important;
11618
- }
11619
- @media screen and (max-width: 375px) {
11620
- .frac-payment-form-div .exp-date-year-container {
11621
- flex-direction: column;
11622
- }
11623
- .parent-pay-container {
11624
- padding: 10px;
11625
- }
11626
- }
11627
- }
11628
- .box-inner-card-text{
11629
- display: flex;
11630
- gap: 0px;
11631
- flex-direction: column;
11632
- }
11633
- .box-inner-card-text .frac-payment-type-logo {
11634
- width: 17px;
11635
- height: 17px;
11636
- aspect-ratio: 1/1;
11637
- }
11638
- .exp-date-year-wrap.form-control-frac input {
11639
- background: transparent;
11640
- border: none;
11641
- outline: none;
11642
- font-size: 1rem;
11643
- font-weight: 400;
11644
- }
11645
- .exp-date-year-wrap.form-control-frac {
11646
- display: flex;
11647
- gap: 2px;
11648
- }
11649
- .exp-date-year-wrap input.exp-month {
11650
- width: 32px;
11651
- }
11652
- .detials-wrap {
11653
- display: grid;
11654
- grid-template-columns: 1fr 1fr;
11655
- gap: 10px;
11656
- }
11657
- .detials-wrap.detials-wrap-2{
11658
- grid-template-columns: 1fr 1fr;
11659
- }
11660
- form#ACHPaymentForm .ach-scrl {
11661
- display: grid;
11662
- grid-gap: 0px 10px;
11663
- grid-template-columns: 1fr;
11664
- }
11665
- .plan-list {
11666
- max-height: 130px;
11667
- min-height: 130px;
11668
- overflow-y: auto;
11669
- padding-right: 6px;
11670
- }
11671
- .plan-list::-webkit-scrollbar {
11672
- width: 3px;
11673
- background-color: #F5F5F5;
11674
- }
11675
- .plan-list::-webkit-scrollbar-thumb {
11676
- background-color: #35254D;
11677
- }
11678
- div#cvv {
11679
- border-top-left-radius: 0;
11680
- border-bottom-left-radius: 0;
11681
- border-top: 0;
11682
- border-bottom: 0;
11683
- border-right: 0;
11684
- }
11685
- div#exp_year {
11686
- height: 36px;
11687
- width: calc(100% + 1px);
11688
- border-radius: 0;
11689
- border-top: 0;
11690
- border-bottom: 0;
11691
- border-right: 1px solid #dee2e6;
11692
- }
11693
- div#exp_month {
11694
- width: calc(100% + 1px);
11695
- border-top-right-radius: 0;
11696
- border-bottom-right-radius: 0;
11697
- border: 0;
11698
- border-right: 1px solid #dee2e6;
11699
- }
11700
- .exp-date-year-container .form-group {
11701
- flex: 1;
11702
- }
11703
- .input-main-wrap-frac{
11704
- margin:0px !important;
11705
- padding:0px !important;
11706
- }
11707
- .toggle-num-wrapper.toggle-num-wrapper-new {
11708
- border: 1px solid #dee2e6 !important;
11709
- border-radius: 0.375rem !important;
11710
- background-color: #F6F6F7;
11711
- box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
11712
- }
11713
- .toggle-num-wrapper-new div#card_number {
11714
- padding: 0px 10px;
11715
- border: none;
11716
- border-bottom: 1px solid #dee2e6;
11717
- }
11718
- .toggle-num-wrapper-new .card-crdi.card-expiry-new {
11719
- padding: 0px 10px;
11720
- }
11721
- .toggle-num-wrapper-new .input-main-wrap-frac {
11722
- height: 36px;
11723
- }
11724
- .toggle-num-wrapper-new:focus {
11725
- border: 1px solid #004eab !important;
11726
- }
11727
- .frac-card-title-main {
11728
- display: flex;
11729
- align-items: start;
11730
- gap: 4px;
11731
- flex-direction: column;
11732
- }
11733
- .parent-pay-container {
11734
- padding: 24px;
11735
- background-color: #ffffff !important;
11736
- border-radius: 15px;
11737
- min-width: 300px;
11738
- }
11739
-
11740
-
11741
- ${extraCustomCSS}
11742
-
11743
- ` });
11744
- }
11745
-
11746
- // src/app/components/Skysystemz/EmbeddedCheckout.tsx
11747
- import { Fragment as Fragment21, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
11748
- var EmbeddedCheckout = ({
11749
- amount,
11750
- bankAmount,
11751
- submitBtnText = "Pay",
11752
- session_token,
11753
- customerId,
11754
- callback,
11755
- merchantName = "merchant",
11756
- isPreAuth,
11757
- surcharge = "0",
11758
- submitBtnClass,
11759
- submitBtnIcon,
11760
- isRequest,
11761
- pass_fee,
11762
- pass_fee_amount,
11763
- require3ds = false,
11764
- autoTrigger = false,
11765
- isPartial,
11766
- bankSurcharge,
11767
- partialRef,
11768
- onSubmit,
11769
- onLoad,
11770
- customCSS: customCSS2
11771
- }) => {
11772
- const [show, setShow] = useState12(false);
11773
- const [loading, setLoading] = useState12(false);
11774
- const [childHandleClose, setChildHandleClose] = useState12(() => () => {
11775
- });
11776
- const [orderGuid, setOrderGuid] = useState12(null);
11777
- const [remainingAmount, setRemainingAmount] = useState12(null);
11778
- const initialCommonProps = useMemo2(
11779
- () => ({
11780
- amount,
11781
- bankAmount,
11782
- submitBtnText,
11783
- session_token,
11784
- customerId,
11785
- callback,
11786
- merchantName,
11787
- isPreAuth,
11788
- surcharge,
11789
- submitBtnClass,
11790
- submitBtnIcon,
11791
- isRequest,
11792
- pass_fee,
11793
- pass_fee_amount,
11794
- require3ds,
11795
- autoTrigger,
11796
- setShow,
11797
- setHandleCloseRef: setChildHandleClose,
11798
- isPartial,
11799
- bankSurcharge,
11800
- partialRef
11801
- }),
11802
- [
11803
- amount,
11804
- bankAmount,
11805
- submitBtnText,
11806
- session_token,
11807
- customerId,
11808
- callback,
11809
- merchantName,
11810
- isPreAuth,
11811
- surcharge,
11812
- submitBtnClass,
11813
- submitBtnIcon,
11814
- isRequest,
11815
- pass_fee,
11816
- pass_fee_amount,
11817
- require3ds,
11818
- autoTrigger,
11819
- isPartial,
11820
- bankSurcharge,
11821
- partialRef
11822
- ]
11823
- );
11824
- const [commonProps, setCommonProps] = useState12(initialCommonProps);
11825
- useEffect17(() => {
11826
- if (show) {
11827
- setCommonProps(initialCommonProps);
11828
- }
11829
- }, [show, initialCommonProps]);
11830
- const getskyosOrderDetails = async () => {
11831
- var _a;
11832
- setLoading(true);
11833
- try {
11834
- const res = await axios11.get(
11835
- `${masterBaseUrl}api/v1/gateway/get-order-details/${session_token}`,
11836
- { params: { isPartial, partialRef } }
11837
- );
11838
- if ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.result) {
11839
- const data = res.data.data;
11840
- if (data == null ? void 0 : data.orderGuid) {
11841
- setOrderGuid(data == null ? void 0 : data.orderGuid);
11842
- setRemainingAmount(data == null ? void 0 : data.remainingAmount);
11843
- }
11844
- setCommonProps((prev) => __spreadProps(__spreadValues({}, prev), {
11845
- amount: data.amount,
11846
- pass_fee_amount: data.pass_fee_amount,
11847
- pass_fee: data.pass_fee
11848
- }));
11849
- }
11850
- } catch (error) {
11851
- console.log("error while getting skyosorderdeatils", error);
11852
- } finally {
11853
- setLoading(false);
11854
- }
11855
- };
11856
- useEffect17(() => {
11857
- if (show && isPartial && partialRef) {
11858
- getskyosOrderDetails();
11859
- }
11860
- }, [show, isPartial, partialRef]);
11861
- console.log(onLoad, "onLoad");
11862
- return /* @__PURE__ */ jsxs22(Fragment21, { children: [
11863
- /* @__PURE__ */ jsx37("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
11864
- /* @__PURE__ */ jsx37(DataScript, {}),
11865
- /* @__PURE__ */ jsx37(FractalTokenizerScript, {}),
11866
- /* @__PURE__ */ jsx37(SkyChargewidgetstyles, {}),
11867
- /* @__PURE__ */ jsx37(CardBankRadioStyles, {}),
11868
- /* @__PURE__ */ jsx37(CustomModal2styles_default, {}),
11869
- /* @__PURE__ */ jsx37(DataCapScriptLoader, {}),
11870
- /* @__PURE__ */ jsx37(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
11871
- !autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
11047
+ return /* @__PURE__ */ jsxs20(Fragment19, { children: [
11048
+ /* @__PURE__ */ jsx33("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
11049
+ /* @__PURE__ */ jsx33(DataScript, {}),
11050
+ /* @__PURE__ */ jsx33(FractalTokenizerScript, {}),
11051
+ /* @__PURE__ */ jsx33(SkyChargewidgetstyles, {}),
11052
+ /* @__PURE__ */ jsx33(CardBankRadioStyles, {}),
11053
+ /* @__PURE__ */ jsx33(CustomModal2styles_default, {}),
11054
+ /* @__PURE__ */ jsx33(DataCapScriptLoader, {}),
11055
+ !autoTrigger && /* @__PURE__ */ jsxs20("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
11872
11056
  submitBtnText,
11873
11057
  submitBtnIcon
11874
11058
  ] }),
11875
- !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 }))
11059
+ !autoTrigger ? /* @__PURE__ */ jsx33(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx33(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx33(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
11876
11060
  ] });
11877
11061
  };
11878
11062
  export {
11879
11063
  AddCardEasyPay as AddCard,
11880
11064
  CardOnFile,
11881
- EmbeddedCheckout,
11882
11065
  GetPaymentPage,
11883
11066
  PartialPayment,
11884
11067
  PaymentWidget,