@fractalpay/fractalpay-next-dev 0.0.239 → 0.0.240

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.239",
42
+ version: "0.0.240",
43
43
  private: false,
44
44
  type: "module",
45
45
  scripts: {
@@ -113,8 +113,25 @@ 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 {
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 {
118
135
  position: fixed; /* Fixed position to cover the viewport */
119
136
  top: 0;
120
137
  left: 0;
@@ -126,7 +143,7 @@ var LoaderStyle = (props) => {
126
143
  /* background: rgba(255, 255, 0, 0.01); Adjust the blur effect */
127
144
  background-color: rgba(31, 29, 29, 0.52); /* Semi-transparent black background */
128
145
 
129
- backdrop-filter: blur(.5px); /* Blur effect */
146
+ backdrop-filter: blur(6.5px); /* Blur effect */
130
147
  z-index: 999999999999 !important; /* Ensure it's on top of other elements */
131
148
  transform: translate(0%, 0%) !important
132
149
  }
@@ -201,10 +218,11 @@ var LoaderStyle_default = LoaderStyle;
201
218
 
202
219
  // src/app/components/Loader/Loader.tsx
203
220
  import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
204
- var Loader = (props) => {
221
+ var Loader = (_a) => {
222
+ var _b = _a, { intensity = "light" } = _b, props = __objRest(_b, ["intensity"]);
205
223
  return /* @__PURE__ */ jsxs(Fragment, { children: [
206
224
  /* @__PURE__ */ jsx2(LoaderStyle_default, {}),
207
- (props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: "loader", children: /* @__PURE__ */ jsxs("div", { className: "lds-ellipsis", children: [
225
+ (props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: `loader-${intensity}`, children: /* @__PURE__ */ jsxs("div", { className: "lds-ellipsis", children: [
208
226
  /* @__PURE__ */ jsx2("div", {}),
209
227
  /* @__PURE__ */ jsx2("div", {}),
210
228
  /* @__PURE__ */ jsx2("div", {}),
@@ -1697,11 +1715,9 @@ function Chargewidgetstyles() {
1697
1715
  .frac-form .save-ach-div{
1698
1716
  display:flex !important;
1699
1717
  gap:5px !important;
1700
- align-items:start;
1701
- }
1702
- .save-ach-div label{
1703
- margin-top: -4px;
1718
+ align-items:center
1704
1719
  }
1720
+
1705
1721
  .frac-form .card-cvv-in{
1706
1722
  height : 36px !importantt;
1707
1723
  }
@@ -2908,7 +2924,7 @@ function ErrorCardMszStyle() {
2908
2924
 
2909
2925
  // src/app/components/ErrorCardMessage/ErrorCardMessage.tsx
2910
2926
  import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
2911
- var ErrorCardMessage = ({ onClose, error }) => {
2927
+ var ErrorCardMessage = ({ onClose, error, autoTrigger = false }) => {
2912
2928
  return /* @__PURE__ */ jsxs6(Fragment6, { children: [
2913
2929
  /* @__PURE__ */ jsx12(ErrorCardMszStyle, {}),
2914
2930
  /* @__PURE__ */ jsx12("div", { className: "card-error", children: /* @__PURE__ */ jsx12("div", { className: "payment-error-container", children: /* @__PURE__ */ jsxs6("div", { className: "error-icon", children: [
@@ -2917,7 +2933,7 @@ var ErrorCardMessage = ({ onClose, error }) => {
2917
2933
  /* @__PURE__ */ jsx12("div", { className: "payment-error-text", children: error }),
2918
2934
  /* @__PURE__ */ jsx12("div", { className: "thank-you-text", children: "Try again later " })
2919
2935
  ] }),
2920
- /* @__PURE__ */ jsx12("div", { className: "error-btn-div", children: /* @__PURE__ */ jsx12("button", { onClick: onClose, children: "OK" }) })
2936
+ !autoTrigger && /* @__PURE__ */ jsx12("div", { className: "error-btn-div", children: /* @__PURE__ */ jsx12("button", { onClick: onClose, children: "OK" }) })
2921
2937
  ] }) }) })
2922
2938
  ] });
2923
2939
  };
@@ -2934,14 +2950,26 @@ var socketClient_default = socket;
2934
2950
 
2935
2951
  // src/app/components/Atoms/CardBankRadio/CardBankRadio.tsx
2936
2952
  import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
2937
- var CardBankRadio = (props) => {
2938
- return /* @__PURE__ */ jsx13(Fragment7, { children: /* @__PURE__ */ jsxs7(
2953
+ var CardBankRadio = (_a) => {
2954
+ var _b = _a, { skydesign = false } = _b, props = __objRest(_b, ["skydesign"]);
2955
+ return /* @__PURE__ */ jsx13(Fragment7, { children: /* @__PURE__ */ jsx13(
2939
2956
  "div",
2940
2957
  {
2941
2958
  className: `frac-card-bank-radio ${props.activetab === props.value ? "frac-active" : ""}`,
2942
2959
  onClick: () => props.onChange(props.value),
2943
2960
  role: "radio",
2944
- children: [
2961
+ children: skydesign ? /* @__PURE__ */ jsxs7(Fragment7, { children: [
2962
+ /* @__PURE__ */ jsxs7("div", { className: "frac-card-title-main", children: [
2963
+ /* @__PURE__ */ jsxs7("div", { className: "box-inner-card-text", children: [
2964
+ /* @__PURE__ */ jsx13("img", { src: props.label.toLowerCase() === "card" ? defaultcard : props.label.toLowerCase() === "reader" ? pax : bankNew, className: "frac-payment-type-logo", alt: "" }),
2965
+ /* @__PURE__ */ jsx13("div", { className: "frac-card-label-text", children: props.label })
2966
+ ] }),
2967
+ /* @__PURE__ */ jsx13("div", { className: "frac-card-label", children: /* @__PURE__ */ jsx13("div", { className: "frac-card-label-amount", children: formatUSD(props.amount) }) })
2968
+ ] }),
2969
+ /* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsx13("input", { name: "paymenttype", checked: props.activetab === props.value, type: "hidden", value: props.value, onChange: (e) => {
2970
+ props.onChange(e.target.value);
2971
+ } }) })
2972
+ ] }) : /* @__PURE__ */ jsxs7(Fragment7, { children: [
2945
2973
  /* @__PURE__ */ jsxs7("div", { className: "frac-card-title-main", children: [
2946
2974
  /* @__PURE__ */ jsx13("img", { src: props.label.toLowerCase() === "card" ? defaultcard : props.label.toLowerCase() === "reader" ? pax : bankNew, className: "frac-payment-type-logo", alt: "" }),
2947
2975
  /* @__PURE__ */ jsxs7("div", { className: "frac-card-label", children: [
@@ -2952,7 +2980,7 @@ var CardBankRadio = (props) => {
2952
2980
  /* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsx13("input", { name: "paymenttype", checked: props.activetab === props.value, type: "radio", value: props.value, onChange: (e) => {
2953
2981
  props.onChange(e.target.value);
2954
2982
  } }) })
2955
- ]
2983
+ ] })
2956
2984
  }
2957
2985
  ) });
2958
2986
  };
@@ -3211,7 +3239,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
3211
3239
  {
3212
3240
  id: "card_number",
3213
3241
  className: "form-control card-number-new",
3214
- style: { height: `${isSky ? "36px" : "46px"}`, display: "inline-block" }
3242
+ style: { height: `${isSky ? "36px" : "46px"}` }
3215
3243
  }
3216
3244
  ),
3217
3245
  /* @__PURE__ */ jsx17("div", { className: "card-crdi card-expiry-new", children: /* @__PURE__ */ jsxs10("div", { className: "exp-date-year-container", children: [
@@ -3220,7 +3248,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
3220
3248
  {
3221
3249
  id: "exp_month",
3222
3250
  className: "form-control required card-cvv-in",
3223
- style: { height: "36px", display: "inline-block" }
3251
+ style: { height: "36px", display: "block", minHeight: "36px" }
3224
3252
  }
3225
3253
  ) }),
3226
3254
  /* @__PURE__ */ jsx17("div", { className: "exp-year form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
@@ -3228,7 +3256,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
3228
3256
  {
3229
3257
  id: "exp_year",
3230
3258
  className: "form-control required card-cvv-in",
3231
- style: { height: "36px", display: "inline-block" }
3259
+ style: { height: "36px", display: "block", minHeight: "36px" }
3232
3260
  }
3233
3261
  ) }),
3234
3262
  /* @__PURE__ */ jsx17("div", { className: "security-digit form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
@@ -3236,7 +3264,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
3236
3264
  {
3237
3265
  id: "cvv",
3238
3266
  className: "form-control card-cvv-in required",
3239
- style: { height: "36px", display: "inline-block" }
3267
+ style: { height: "36px", display: "block", minHeight: "36px" }
3240
3268
  }
3241
3269
  ) })
3242
3270
  ] }) })
@@ -3359,7 +3387,8 @@ var DataCapFields = ({
3359
3387
  isOpen,
3360
3388
  tokenKey,
3361
3389
  setLoader,
3362
- isAddCard
3390
+ isAddCard,
3391
+ isEmbedded
3363
3392
  }) => {
3364
3393
  const iframeId = "datacap-iframe";
3365
3394
  const resolverRef = useRef2(null);
@@ -3385,6 +3414,20 @@ var DataCapFields = ({
3385
3414
 
3386
3415
  `;
3387
3416
  }
3417
+ if (isEmbedded) {
3418
+ customCSS += `
3419
+
3420
+ input {
3421
+ background-color: #F6F6F7;
3422
+ box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1;
3423
+ }
3424
+
3425
+ select {
3426
+ background-color: #F6F6F7;
3427
+ box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
3428
+ }
3429
+ `;
3430
+ }
3388
3431
  const initialize = async () => {
3389
3432
  setLoader == null ? void 0 : setLoader(true);
3390
3433
  setIframeReady(false);
@@ -3423,6 +3466,7 @@ var DataCapFields = ({
3423
3466
  window.DatacapHostedWebToken.requestToken();
3424
3467
  });
3425
3468
  };
3469
+ console.log(setLoader, "loadingIframe");
3426
3470
  return /* @__PURE__ */ jsx18(
3427
3471
  "iframe",
3428
3472
  {
@@ -4603,18 +4647,14 @@ function GetPaymentPage(props) {
4603
4647
  accountTypes.map((type) => /* @__PURE__ */ jsx19("option", { value: type.value, children: type.label }, type.value))
4604
4648
  ] })
4605
4649
  ] }),
4606
- /* @__PURE__ */ jsxs11("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
4607
- /* @__PURE__ */ jsx19("input", { type: "checkbox", id: "achconsent", className: "", maxLength: 100, placeholder: "My Bank" }),
4608
- /* @__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.` })
4609
- ] }),
4610
4650
  (props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsxs11("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
4611
4651
  /* @__PURE__ */ jsx19("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
4612
- /* @__PURE__ */ jsx19("label", { htmlFor: "saveACH", children: "Save Bank" })
4652
+ /* @__PURE__ */ jsx19("label", { htmlFor: "saveACH", children: "Save ACH" })
4613
4653
  ] }),
4614
4654
  saveACHinfo && /* @__PURE__ */ jsx19("div", { className: "form-group mb-4", style: { fontSize: "12px", color: "#727272" }, children: /* @__PURE__ */ jsxs11("p", { children: [
4615
4655
  "If checked, I agree for ",
4616
- /* @__PURE__ */ jsx19("b", { children: (paymentData == null ? void 0 : paymentData.bname) || "merchant" }),
4617
- " to have my permission to charge this bank account for agreed upon purchases in the future."
4656
+ /* @__PURE__ */ jsx19("b", { children: "ecommerce" }),
4657
+ " to have my permission to charge this credit card for agreed upon purchases in the future."
4618
4658
  ] }) })
4619
4659
  ] }),
4620
4660
  /* @__PURE__ */ jsx19("div", { className: "form-group ", children: /* @__PURE__ */ jsx19("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: formatUSD((_v = Number(cashDiscount)) == null ? void 0 : _v.toFixed(2)) }) })
@@ -8530,18 +8570,14 @@ function PartialPayment(props) {
8530
8570
  accountTypes.map((type) => /* @__PURE__ */ jsx28("option", { value: type.value, children: type.label }, type.value))
8531
8571
  ] })
8532
8572
  ] }),
8533
- /* @__PURE__ */ jsxs17("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
8534
- /* @__PURE__ */ jsx28("input", { type: "checkbox", id: "achconsent", className: "", maxLength: 100, placeholder: "My Bank" }),
8535
- /* @__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.` })
8536
- ] }),
8537
8573
  (props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsxs17("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
8538
8574
  /* @__PURE__ */ jsx28("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
8539
- /* @__PURE__ */ jsx28("label", { htmlFor: "saveACH", children: "Save Bank" })
8575
+ /* @__PURE__ */ jsx28("label", { htmlFor: "saveACH", children: "Save ACH" })
8540
8576
  ] }),
8541
8577
  saveACHinfo && /* @__PURE__ */ jsx28("div", { className: "form-group mb-4", style: { fontSize: "12px", color: "#727272" }, children: /* @__PURE__ */ jsxs17("p", { children: [
8542
8578
  "If checked, I agree for ",
8543
- /* @__PURE__ */ jsx28("b", { children: (paymentData == null ? void 0 : paymentData.bname) || "merchant" }),
8544
- " to have my permission to charge this bank account for agreed upon purchases in the future."
8579
+ /* @__PURE__ */ jsx28("b", { children: "ecommerce" }),
8580
+ " to have my permission to charge this credit card for agreed upon purchases in the future."
8545
8581
  ] }) })
8546
8582
  ] }),
8547
8583
  /* @__PURE__ */ jsx28("div", { className: "form-group ", children: /* @__PURE__ */ jsx28("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: partialAmount && !partialError ? formatUSD((_z = Number(partialAmount)) == null ? void 0 : _z.toFixed(2)) : formatUSD((_A = Number(cashDiscount)) == null ? void 0 : _A.toFixed(2)) }) })
@@ -9347,7 +9383,16 @@ margin:0px !important;
9347
9383
  padding:0px !important;
9348
9384
  }
9349
9385
 
9350
-
9386
+
9387
+ .toggle-num-wrapper-new div#card_number {
9388
+ display: block !important;
9389
+ }
9390
+ .toggle-num-wrapper-new .input-main-wrap-frac {
9391
+ height: 36px;
9392
+ }
9393
+ .toggle-num-wrapper-new:focus {
9394
+ border: 1px solid #004eab !important;
9395
+ }
9351
9396
 
9352
9397
  ` });
9353
9398
  }
@@ -9494,10 +9539,162 @@ function CheckoutWrapper({ clientSecret, onSuccess, showLoader, setError, sessio
9494
9539
  // src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
9495
9540
  import { IoArrowBack as IoArrowBack4 } from "react-icons/io5";
9496
9541
  import { NumericFormat as NumericFormat2 } from "react-number-format";
9497
- import { Fragment as Fragment18, jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
9498
- 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 }) => {
9499
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
9542
+
9543
+ // src/app/components/ErrorCardMessage/ErrorCardOverlaystyle.tsx
9544
+ import { jsx as jsx32 } from "react/jsx-runtime";
9545
+ function ErrorCardOverlayStyle() {
9546
+ return /* @__PURE__ */ jsx32("style", { children: `
9547
+ .card-error-overlay .logo-container {
9548
+ display: flex;
9549
+ justify-content: center;
9550
+ align-items: center;
9551
+ margin-bottom: -50px; /* Adjust this to overlap the content */
9552
+ z-index: 10;
9553
+ }
9554
+
9555
+ .card-error-overlay .client-logo {
9556
+ max-width: 100px;
9557
+ height: auto;
9558
+ object-fit: contain;
9559
+ display: block;
9560
+ }
9561
+
9562
+
9563
+ .card-error-overlay .error-icon-overlay {
9564
+ display: flex;
9565
+ flex-direction: column;
9566
+ align-items: center;
9567
+ gap: 12px;
9568
+ min-height: 116px;
9569
+ z-index: 2;
9570
+ }
9571
+
9572
+ .card-error-overlay .circle {
9573
+ width: 50px;
9574
+ height: 50px;
9575
+ border: 1px solid red;
9576
+ border-radius: 50%;
9577
+ display: flex;
9578
+ justify-content: center;
9579
+ align-items: center;
9580
+ margin-bottom:20px
9581
+ }
9582
+
9583
+ .card-error-overlay .circle .fa-times {
9584
+ font-size: 30px;
9585
+ color: red;
9586
+ }
9587
+
9588
+ .card-error-overlay .error-text-overlay {
9589
+ display: flex;
9590
+ flex-direction: column;
9591
+ justify-content: center;
9592
+ align-items: center;
9593
+ gap: 4px;
9594
+ // width: 227px;
9595
+ }
9596
+
9597
+ .card-error-overlay .payment-error-text-overlay {
9598
+ font-family: 'Inter', sans-serif;
9599
+ font-weight: 500;
9600
+ font-size: 18px;
9601
+ line-height: 21px;
9602
+ text-align: center;
9603
+ letter-spacing: -0.02em;
9604
+ color: #161616;
9605
+ }
9606
+
9607
+ .card-error-overlay .thank-you-text-overlay {
9608
+ font-family: 'Inter', sans-serif;
9609
+ font-weight: 500;
9610
+ font-size: 16px;
9611
+ line-height: 18px;
9612
+ text-align: center;
9613
+ letter-spacing: -0.02em;
9614
+ color: #161616 !important;
9615
+ opacity: 0.5;
9616
+ padding-top:10px
9617
+ }
9618
+
9619
+ .card-error-overlay .error-btn-div-overlay{
9620
+ padding-top:20px;
9621
+ width: 100%;
9622
+
9623
+ }
9624
+ .card-error-overlay .error-btn-div-overlay button{
9625
+ outline: 0;
9626
+ height: 46px;
9627
+ font-size: 16px;
9628
+ background: #727272;
9629
+ border: none;
9630
+ display: block;
9631
+ color: #fff;
9632
+ width: 100%;
9633
+ border-radius: 180px;
9634
+ margin: 10px 0;
9635
+ text-decoration: none;
9636
+ }
9637
+ .card-error-overlay .error-btn-div-overlay button:hover, .card-error-overlay .error-btn-div-overlay button:focus {
9638
+ background: #222;
9639
+ color: #fff;
9640
+ cursor: pointer;
9641
+ }
9642
+ .payment-error-container-overlay {
9643
+ width: fit-content;
9644
+ position: relative;
9645
+ top: 50%;
9646
+ left: 50%;
9647
+ transform: translate(-50%, -50%);
9648
+ background: rgba(255, 255, 255, 0.15);
9649
+ backdrop-filter: blur(12px);
9650
+ -webkit-backdrop-filter: blur(12px);
9651
+ border-radius: 12px;
9652
+ z-index: 11111;
9653
+ max-width: 240px;
9654
+ min-width: 224px;
9655
+ padding: 20px;
9656
+ margin-left: 17px !important;
9657
+ }
9658
+ .card-error-overlay {
9659
+ position: absolute;
9660
+ top: 0;
9661
+ left: 0;
9662
+ width: 100%;
9663
+ height: 100%;
9664
+ background: rgb(87 87 87 / 15%);
9665
+ backdrop-filter: blur(2px);
9666
+ -webkit-backdrop-filter: blur(12px);
9667
+ z-index: 1111;
9668
+ }
9669
+ ` });
9670
+ }
9671
+
9672
+ // src/app/components/ErrorCardMessage/ErrorCardOverlay.tsx
9673
+ import { Fragment as Fragment18, jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
9674
+ var ErrorCardOverlay = ({ onClose, error, autoTrigger = false }) => {
9675
+ return /* @__PURE__ */ jsxs19(Fragment18, { children: [
9676
+ /* @__PURE__ */ jsx33(ErrorCardOverlayStyle, {}),
9677
+ /* @__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: [
9678
+ /* @__PURE__ */ jsx33("div", { className: "circle", children: /* @__PURE__ */ jsx33("i", { className: "fa fa-times", "aria-hidden": "true" }) }),
9679
+ /* @__PURE__ */ jsxs19("div", { className: "error-text-overlay", children: [
9680
+ /* @__PURE__ */ jsx33("div", { className: "payment-error-text-overlay", children: error }),
9681
+ /* @__PURE__ */ jsx33("div", { className: "thank-you-text-overlay", children: "Try again later " })
9682
+ ] }),
9683
+ !autoTrigger && /* @__PURE__ */ jsx33("div", { className: "error-btn-div-overlay", children: /* @__PURE__ */ jsx33("button", { onClick: onClose, children: "OK" }) })
9684
+ ] }) }) })
9685
+ ] });
9686
+ };
9687
+ var ErrorCardOverlay_default = ErrorCardOverlay;
9688
+
9689
+ // src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
9690
+ import { Fragment as Fragment19, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
9691
+ 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 }) => {
9692
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
9500
9693
  const hasRunRef = useRef10(false);
9694
+ const cardFormRef = useRef10(null);
9695
+ const bankFormRef = useRef10(null);
9696
+ const expiryYearRef = useRef10(null);
9697
+ const expiryMonthRef = useRef10(null);
9501
9698
  const cardListRunRef = useRef10(false);
9502
9699
  const threeDSContainerRef = useRef10(null);
9503
9700
  const [activetab, setActive] = useState10("card");
@@ -9548,6 +9745,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9548
9745
  let pax2 = S3Url + "widget/pax.svg";
9549
9746
  let cardicon = S3Url + "widget/cardicon.svg";
9550
9747
  let bankicon = S3Url + "widget/bankicon.svg";
9748
+ let defualtcardborder = S3Url + "widget/defualtcardborder.svg";
9749
+ let unionicon = S3Url + "widget/unionpay.svg";
9750
+ let dinersicon = S3Url + "widget/diners.svg";
9751
+ let jcbicon = S3Url + "widget/jcb.svg";
9551
9752
  const showLoader = () => setLoading(true);
9552
9753
  const hideLoader = () => setLoading(false);
9553
9754
  const CalculateCashDiscount = (amount2, surcharge2) => {
@@ -9761,7 +9962,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9761
9962
  }
9762
9963
  };
9763
9964
  const handleFractalTokenFlow = async () => {
9764
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t, _u, _v, _w;
9965
+ 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;
9765
9966
  try {
9766
9967
  const requestOptions = {
9767
9968
  method: "POST",
@@ -9802,17 +10003,28 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9802
10003
  three_ds_data
9803
10004
  );
9804
10005
  } catch (error2) {
9805
- setErrorIframe(error2);
10006
+ let readableMessage = "Something went wrong!";
10007
+ try {
10008
+ const rawError = ((_n2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _n2.data) || (error2 == null ? void 0 : error2.message) || "";
10009
+ const errorText = typeof rawError === "string" ? rawError : JSON.stringify(rawError);
10010
+ const lines = ((_p2 = (_o2 = errorText.split) == null ? void 0 : _o2.call(errorText, "\n")) == null ? void 0 : _p2.filter(Boolean)) || [];
10011
+ const lastLine = lines.at(-1) || "";
10012
+ const parts = (_q2 = lastLine.split) == null ? void 0 : _q2.call(lastLine, ": ");
10013
+ readableMessage = (parts == null ? void 0 : parts.length) > 1 ? parts.pop().trim() : lastLine.trim() || readableMessage;
10014
+ } catch (e) {
10015
+ readableMessage = "Something went wrong!";
10016
+ }
10017
+ setErrorIframe(readableMessage);
9806
10018
  hideLoader();
9807
10019
  }
9808
10020
  if (tokenizeData == null ? void 0 : tokenizeData.token) {
9809
10021
  let ThreedsData = tokenizeData == null ? void 0 : tokenizeData.stripe_three_ds_response;
9810
- if (require3ds && !ThreedsData && (ThreedsData == null ? void 0 : ThreedsData.status) === "200 OK" && ((_n2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _n2.challenge_url)) {
10022
+ if (require3ds && !ThreedsData && (ThreedsData == null ? void 0 : ThreedsData.status) === "200 OK" && ((_r2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _r2.challenge_url)) {
9811
10023
  setError("Something went wrong. Please try again later.");
9812
10024
  }
9813
10025
  if (require3ds) {
9814
- if (!((_o2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _o2.challenge_url)) {
9815
- completeFractalFlow(tokenizeData == null ? void 0 : tokenizeData.token, (_p2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _p2.id);
10026
+ if (!((_s2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _s2.challenge_url)) {
10027
+ completeFractalFlow(tokenizeData == null ? void 0 : tokenizeData.token, (_t2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _t2.id);
9816
10028
  } else {
9817
10029
  hideLoader();
9818
10030
  setStripeResponse(__spreadProps(__spreadValues({}, ThreedsData == null ? void 0 : ThreedsData.data), {
@@ -9828,11 +10040,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9828
10040
  console.log(error2, "error");
9829
10041
  let readableMessage = "Something went wrong!";
9830
10042
  try {
9831
- const rawError = ((_q2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _q2.data) || (error2 == null ? void 0 : error2.message) || "";
10043
+ const rawError = ((_u2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _u2.data) || (error2 == null ? void 0 : error2.message) || "";
9832
10044
  const errorText = typeof rawError === "string" ? rawError : JSON.stringify(rawError);
9833
- const lines = ((_s2 = (_r2 = errorText.split) == null ? void 0 : _r2.call(errorText, "\n")) == null ? void 0 : _s2.filter(Boolean)) || [];
10045
+ const lines = ((_w = (_v = errorText.split) == null ? void 0 : _v.call(errorText, "\n")) == null ? void 0 : _w.filter(Boolean)) || [];
9834
10046
  const lastLine = lines.at(-1) || "";
9835
- const parts = (_t = lastLine.split) == null ? void 0 : _t.call(lastLine, ": ");
10047
+ const parts = (_x = lastLine.split) == null ? void 0 : _x.call(lastLine, ": ");
9836
10048
  readableMessage = (parts == null ? void 0 : parts.length) > 1 ? parts.pop().trim() : lastLine.trim() || readableMessage;
9837
10049
  } catch (e) {
9838
10050
  readableMessage = "Something went wrong!";
@@ -9840,8 +10052,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9840
10052
  setError(readableMessage);
9841
10053
  callback({
9842
10054
  error: readableMessage,
9843
- result: (_v = (_u = error2 == null ? void 0 : error2.response) == null ? void 0 : _u.data) == null ? void 0 : _v.result,
9844
- statusCode: (_w = error2 == null ? void 0 : error2.response) == null ? void 0 : _w.status
10055
+ result: (_z = (_y = error2 == null ? void 0 : error2.response) == null ? void 0 : _y.data) == null ? void 0 : _z.result,
10056
+ statusCode: (_A = error2 == null ? void 0 : error2.response) == null ? void 0 : _A.status
9845
10057
  });
9846
10058
  }
9847
10059
  };
@@ -10256,8 +10468,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10256
10468
  });
10257
10469
  };
10258
10470
  const handlechargeCustomer = async (e) => {
10259
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
10260
- e.currentTarget.blur();
10471
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
10472
+ e == null ? void 0 : e.currentTarget.blur();
10261
10473
  if (loading) return;
10262
10474
  let customer_id = customerId;
10263
10475
  let card_id = selectedCard == null ? void 0 : selectedCard.id;
@@ -10304,7 +10516,6 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10304
10516
  statusCode: (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.status
10305
10517
  });
10306
10518
  hideLoader();
10307
- setError(((_i2 = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.message) || "Something went wrong!");
10308
10519
  }
10309
10520
  } else {
10310
10521
  setError("Please Select A Card/Bank");
@@ -10386,13 +10597,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10386
10597
  }
10387
10598
  }, [show, autoTrigger]);
10388
10599
  useEffect15(() => {
10389
- if (!hasRunRef.current && (show || autoTrigger)) {
10600
+ if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
10390
10601
  getPaymentDetails();
10391
10602
  if (isPartial && !partialRef) {
10392
10603
  crateOrderFrac();
10393
10604
  }
10394
10605
  }
10395
- }, [show, autoTrigger, isPartial]);
10606
+ }, [show, autoTrigger, isPartial, onLoad]);
10396
10607
  useEffect15(() => {
10397
10608
  if ((show || autoTrigger) && pass_fee_amount) {
10398
10609
  let cashdisc = Number(amount) - Number(pass_fee_amount);
@@ -10480,17 +10691,92 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10480
10691
  });
10481
10692
  }, []);
10482
10693
  console.log(activeinCard === "list", "activeinCard", activeList);
10483
- return /* @__PURE__ */ jsxs19(Fragment18, { children: [
10484
- initialLoader && /* @__PURE__ */ jsx32(Loader_default, { loading: initialLoader }),
10485
- error && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error, onClose: handleClose }) }),
10486
- errorIframe && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error: errorIframe, onClose: () => {
10694
+ const stateRef = useRef10({
10695
+ activeinBank,
10696
+ activeinCard,
10697
+ activetab
10698
+ });
10699
+ useEffect15(() => {
10700
+ stateRef.current = {
10701
+ activeinBank,
10702
+ activeinCard,
10703
+ activetab
10704
+ };
10705
+ }, [activeinBank, activeinCard, activetab]);
10706
+ const submit = useCallback(() => {
10707
+ var _a2, _b2;
10708
+ const { activeinBank: activeinBank2, activeinCard: activeinCard2, activetab: activetab2 } = stateRef.current;
10709
+ console.log("Submitt logic", activeinBank2, "activeinBank", activeinCard2, "activeinCard", activetab2, "activetab");
10710
+ if (activetab2 === "card") {
10711
+ if (activeinCard2 === "form") {
10712
+ (_a2 = cardFormRef.current) == null ? void 0 : _a2.requestSubmit();
10713
+ } else if (activeinCard2 === "list") {
10714
+ handlechargeCustomer();
10715
+ }
10716
+ } else if (activetab2 === "ach") {
10717
+ if (activeinBank2 === "form") {
10718
+ (_b2 = bankFormRef.current) == null ? void 0 : _b2.requestSubmit();
10719
+ } else if (activeinBank2 === "list") {
10720
+ handlechargeCustomer();
10721
+ }
10722
+ }
10723
+ }, []);
10724
+ useEffect15(() => {
10725
+ console.log("Registering submit");
10726
+ onSubmit == null ? void 0 : onSubmit(submit);
10727
+ }, [onSubmit, submit]);
10728
+ function detectCardType(cardinput) {
10729
+ if (!cardinput) return null;
10730
+ const number = cardinput.replace(/\D/g, "");
10731
+ const patterns = {
10732
+ visa: /^4/,
10733
+ mastercard: /^(5[1-5]|2[2-7][0-9]{2})/,
10734
+ amex: /^3[47]/,
10735
+ discover: /^(6011|65|64[4-9])/,
10736
+ diners: /^(30[0-5]|36|38)/,
10737
+ jcb: /^(35[2-8][0-9])/,
10738
+ unionpay: /^62/
10739
+ };
10740
+ for (const [type, regex] of Object.entries(patterns)) {
10741
+ if (regex.test(number)) {
10742
+ return type;
10743
+ }
10744
+ }
10745
+ return "unknown";
10746
+ }
10747
+ function getCardImage(cardInput) {
10748
+ const cardType = detectCardType(cardInput);
10749
+ switch (cardType) {
10750
+ case "visa":
10751
+ return /* @__PURE__ */ jsx34("img", { src: visa2, alt: "visa", width: 33 });
10752
+ case "mastercard":
10753
+ return /* @__PURE__ */ jsx34("img", { src: mastercard2, width: 33, alt: "mastercard" });
10754
+ case "amex":
10755
+ return /* @__PURE__ */ jsx34("img", { src: americanexp2, alt: "amex", width: 33 });
10756
+ case "discover":
10757
+ return /* @__PURE__ */ jsx34("img", { src: discover2, width: 33, alt: "discover" });
10758
+ case "diners":
10759
+ return /* @__PURE__ */ jsx34("img", { src: dinersicon, alt: "Diners Club" });
10760
+ case "jcb":
10761
+ return /* @__PURE__ */ jsx34("img", { src: jcbicon, alt: "JCB" });
10762
+ case "unionpay":
10763
+ return /* @__PURE__ */ jsx34("img", { src: unionicon, alt: "UnionPay" });
10764
+ default:
10765
+ return /* @__PURE__ */ jsx34("img", { src: defualtcardborder, alt: "card" });
10766
+ }
10767
+ }
10768
+ console.log(loadingIframe, "loadingIframe 222");
10769
+ return /* @__PURE__ */ jsxs20(Fragment19, { children: [
10770
+ (initialLoader || !onLoad) && /* @__PURE__ */ jsx34(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
10771
+ error && /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
10772
+ errorIframe && /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
10487
10773
  setErrorIframe("");
10488
- } }) }),
10489
- !error && !errorIframe && /* @__PURE__ */ jsxs19(Fragment18, { children: [
10490
- (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx32(Loader_default, { loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
10491
- /* @__PURE__ */ jsxs19("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
10492
- /* @__PURE__ */ jsx32("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
10493
- (stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx32(
10774
+ }, autoTrigger }) }),
10775
+ /* @__PURE__ */ jsxs20(Fragment19, { children: [
10776
+ (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx34(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
10777
+ /* @__PURE__ */ jsxs20("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
10778
+ /* @__PURE__ */ jsx34("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
10779
+ (stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx34(
10494
10780
  ThreeDSChallenge,
10495
10781
  {
10496
10782
  containerRef: threeDSContainerRef,
@@ -10500,40 +10786,40 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10500
10786
  onSuccess: handleSuccess,
10501
10787
  onError: handleError
10502
10788
  }
10503
- ) : /* @__PURE__ */ jsxs19("div", { className: "parent-pay-container", children: [
10504
- /* @__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: [
10505
- /* @__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" }) }),
10506
- /* @__PURE__ */ jsx32("defs", { children: /* @__PURE__ */ jsx32("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx32("rect", { width: "16", height: "16", fill: "white" }) }) })
10789
+ ) : /* @__PURE__ */ jsxs20("div", { className: "parent-pay-container", children: [
10790
+ /* @__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: [
10791
+ /* @__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" }) }),
10792
+ /* @__PURE__ */ jsx34("defs", { children: /* @__PURE__ */ jsx34("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx34("rect", { width: "16", height: "16", fill: "white" }) }) })
10507
10793
  ] }) }),
10508
- /* @__PURE__ */ jsx32("div", { className: "pay-main-logo-res" }),
10509
- /* @__PURE__ */ jsxs19("div", { className: "pay-container", children: [
10510
- /* @__PURE__ */ jsxs19("div", { className: "pay-header pay-conatiner-one", children: [
10511
- /* @__PURE__ */ jsxs19("div", { className: "pay-conatiner-one-first", children: [
10512
- /* @__PURE__ */ jsxs19("div", { className: "pay-logo-container", children: [
10513
- /* @__PURE__ */ jsx32("div", { className: "pay-main-logo" }),
10514
- /* @__PURE__ */ jsx32("h1", { className: "pay-heading", children: "Pay" }),
10515
- (cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs19("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
10794
+ /* @__PURE__ */ jsx34("div", { className: "pay-main-logo-res" }),
10795
+ /* @__PURE__ */ jsxs20("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
10796
+ !onSubmit && /* @__PURE__ */ jsxs20("div", { className: "pay-header pay-conatiner-one", children: [
10797
+ /* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-first", children: [
10798
+ /* @__PURE__ */ jsxs20("div", { className: "pay-logo-container", children: [
10799
+ /* @__PURE__ */ jsx34("div", { className: "pay-main-logo" }),
10800
+ /* @__PURE__ */ jsx34("h1", { className: "pay-heading", children: "Pay" }),
10801
+ (cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs20("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
10516
10802
  " ",
10517
- /* @__PURE__ */ jsx32(IoArrowBack4, {}),
10803
+ /* @__PURE__ */ jsx34(IoArrowBack4, {}),
10518
10804
  " Back"
10519
10805
  ] })
10520
10806
  ] }),
10521
- /* @__PURE__ */ jsx32("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs19("div", { className: "pay-amount-conatiner", children: [
10522
- /* @__PURE__ */ jsx32("small", { className: "pay-payment-amount", children: "Select payment type" }),
10523
- /* @__PURE__ */ jsxs19("div", { className: "frac-card-bank-radio-main", children: [
10524
- /* @__PURE__ */ jsx32(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
10525
- !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx32(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab })
10807
+ /* @__PURE__ */ jsx34("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
10808
+ /* @__PURE__ */ jsx34("small", { className: "pay-payment-amount", children: "Select payment type" }),
10809
+ /* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
10810
+ /* @__PURE__ */ jsx34(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
10811
+ !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx34(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab })
10526
10812
  ] }),
10527
- pass_fee && activetab === "card" && cashDiscount && Number(amount) - Number(cashDiscount) > 0 ? /* @__PURE__ */ jsxs19("div", { className: "frac-cash-discount-fee", children: [
10528
- /* @__PURE__ */ jsxs19("small", { children: [
10813
+ pass_fee && activetab === "card" && cashDiscount && Number(amount) - Number(cashDiscount) > 0 ? /* @__PURE__ */ jsxs20("div", { className: "frac-cash-discount-fee", children: [
10814
+ /* @__PURE__ */ jsxs20("small", { children: [
10529
10815
  activetab === "card" ? "Cash Discount" : "Cash Discount Savings",
10530
10816
  " "
10531
10817
  ] }),
10532
- /* @__PURE__ */ jsx32("p", { children: formatUSD((Number(amount) - Number(cashDiscount)).toFixed(2)) })
10818
+ /* @__PURE__ */ jsx34("p", { children: formatUSD((Number(amount) - Number(cashDiscount)).toFixed(2)) })
10533
10819
  ] }) : null,
10534
- isPartial && /* @__PURE__ */ jsxs19("div", { className: "frac-partial-payment-input", children: [
10535
- /* @__PURE__ */ jsx32("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
10536
- /* @__PURE__ */ jsx32(
10820
+ isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
10821
+ /* @__PURE__ */ jsx34("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
10822
+ /* @__PURE__ */ jsx34(
10537
10823
  NumericFormat2,
10538
10824
  {
10539
10825
  prefix: "$",
@@ -10557,325 +10843,355 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10557
10843
  }
10558
10844
  }
10559
10845
  ),
10560
- partialError && /* @__PURE__ */ jsx32("span", { className: "error-span", children: partialError })
10846
+ partialError && /* @__PURE__ */ jsx34("span", { className: "error-span", children: partialError })
10561
10847
  ] })
10562
10848
  ] }) })
10563
10849
  ] }),
10564
- /* @__PURE__ */ jsxs19("div", { className: "pay-conatiner-one-last", children: [
10565
- /* @__PURE__ */ jsx32("img", { src: secure2, alt: "" }),
10566
- /* @__PURE__ */ jsx32("img", { src: pov2, alt: "" }),
10850
+ /* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-last", children: [
10851
+ /* @__PURE__ */ jsx34("img", { src: secure2, alt: "" }),
10852
+ /* @__PURE__ */ jsx34("img", { src: pov2, alt: "" }),
10567
10853
  "Secure payments powered by Fractal"
10568
10854
  ] })
10569
10855
  ] }),
10570
- /* @__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: [
10571
- /* @__PURE__ */ jsxs19("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
10572
- /* @__PURE__ */ jsxs19("div", { className: "frac-heading-card-wrap", children: [
10573
- /* @__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: [
10574
- " ",
10575
- /* @__PURE__ */ jsx32(IoArrowBack4, {})
10576
- ] }) }),
10577
- /* @__PURE__ */ jsx32("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
10578
- ] }),
10579
- /* @__PURE__ */ jsxs19("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
10580
- /* @__PURE__ */ jsx32("img", { src: visa2, alt: "", width: 33 }),
10581
- /* @__PURE__ */ jsx32("img", { src: mastercard2, width: 33, alt: "" }),
10582
- /* @__PURE__ */ jsx32("img", { src: americanexp2, alt: "", width: 33 }),
10583
- /* @__PURE__ */ jsx32("img", { src: discover2, width: 33, alt: "" })
10856
+ /* @__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: [
10857
+ onSubmit && /* @__PURE__ */ jsx34("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
10858
+ /* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
10859
+ /* @__PURE__ */ jsx34(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
10860
+ !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 })
10584
10861
  ] }),
10585
- activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
10586
- /* @__PURE__ */ jsx32(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
10587
- setActiveinCard("form");
10588
- } }),
10589
- /* @__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)) }) })
10590
- ] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs19("form", { id: "paymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, onKeyDown: (e) => {
10591
- if (e.key === "Enter" && loading) {
10592
- e.preventDefault();
10593
- e.stopPropagation();
10594
- }
10595
- }, children: [
10596
- /* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
10597
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10598
- /* @__PURE__ */ jsx32("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
10599
- /* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
10600
- const value = e.target.value;
10601
- if (/^[a-zA-Z\s]*$/.test(value)) {
10602
- handleCardChange("cardName", value);
10603
- }
10604
- } }),
10605
- (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
10606
- ] }),
10607
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10608
- /* @__PURE__ */ jsx32("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
10609
- /* @__PURE__ */ jsx32("div", { className: "toggle-num-wrapper", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx32(
10610
- FractalFields_default,
10611
- {
10612
- fractalStyles,
10613
- tokenizerRef,
10614
- isSky: true
10615
- }
10616
- ) })
10617
- ] }),
10618
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10619
- /* @__PURE__ */ jsx32("label", { htmlFor: "zip", children: "ZIP" }),
10620
- /* @__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) }),
10621
- (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
10862
+ pass_fee && activetab === "card" && cashDiscount && Number(amount) - Number(cashDiscount) > 0 ? /* @__PURE__ */ jsxs20("div", { className: "frac-cash-discount-fee", children: [
10863
+ /* @__PURE__ */ jsxs20("small", { children: [
10864
+ activetab === "card" ? "Cash Discount" : "Cash Discount Savings",
10865
+ " "
10866
+ ] }),
10867
+ /* @__PURE__ */ jsx34("p", { children: formatUSD((Number(amount) - Number(cashDiscount)).toFixed(2)) })
10868
+ ] }) : null,
10869
+ isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
10870
+ /* @__PURE__ */ jsx34("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
10871
+ /* @__PURE__ */ jsx34(
10872
+ NumericFormat2,
10873
+ {
10874
+ prefix: "$",
10875
+ className: "form-control-frac",
10876
+ value: partialAmount,
10877
+ onValueChange: (values) => {
10878
+ handlePartialChange(values);
10879
+ },
10880
+ thousandSeparator: true,
10881
+ placeholder: "Enter partial amount",
10882
+ allowNegative: false,
10883
+ allowLeadingZeros: false,
10884
+ decimalScale: 2,
10885
+ fixedDecimalScale: true
10886
+ }
10887
+ ),
10888
+ partialError && /* @__PURE__ */ jsx34("span", { className: "error-span", children: partialError })
10889
+ ] })
10890
+ ] }) }),
10891
+ is3DSEnable ? clientSecret && /* @__PURE__ */ jsx34(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs20(Fragment19, { children: [
10892
+ /* @__PURE__ */ jsxs20("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
10893
+ !onSubmit && /* @__PURE__ */ jsxs20(Fragment19, { children: [
10894
+ /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
10895
+ /* @__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: [
10896
+ " ",
10897
+ /* @__PURE__ */ jsx34(IoArrowBack4, {})
10898
+ ] }) }),
10899
+ /* @__PURE__ */ jsx34("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
10622
10900
  ] }),
10623
- 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: [
10624
- /* @__PURE__ */ jsx32(
10625
- "input",
10626
- {
10627
- type: "checkbox",
10628
- id: "save_card",
10629
- className: "toggle-checkbox",
10630
- checked: saveCardInfo,
10631
- onChange: (e) => setSaveCardInfo(e.target.checked)
10632
- }
10633
- ),
10634
- /* @__PURE__ */ jsx32("label", { htmlFor: "save_card", className: "toggle-label" }),
10635
- /* @__PURE__ */ jsx32("label", { htmlFor: "save_card", children: "Save card for future payments " }),
10636
- /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
10637
- /* @__PURE__ */ jsx32("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
10638
- "svg",
10901
+ /* @__PURE__ */ jsxs20("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
10902
+ /* @__PURE__ */ jsx34("img", { src: visa2, alt: "", width: 33 }),
10903
+ /* @__PURE__ */ jsx34("img", { src: mastercard2, width: 33, alt: "" }),
10904
+ /* @__PURE__ */ jsx34("img", { src: americanexp2, alt: "", width: 33 }),
10905
+ /* @__PURE__ */ jsx34("img", { src: discover2, width: 33, alt: "" })
10906
+ ] })
10907
+ ] }),
10908
+ activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
10909
+ /* @__PURE__ */ jsx34(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
10910
+ setActiveinCard("form");
10911
+ } }),
10912
+ /* @__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)) }) })
10913
+ ] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs20("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
10914
+ if (e.key === "Enter" && loading) {
10915
+ e.preventDefault();
10916
+ e.stopPropagation();
10917
+ }
10918
+ }, children: [
10919
+ /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
10920
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
10921
+ /* @__PURE__ */ jsx34("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
10922
+ /* @__PURE__ */ jsx34("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
10923
+ const value = e.target.value;
10924
+ if (/^[a-zA-Z\s]*$/.test(value)) {
10925
+ handleCardChange("cardName", value);
10926
+ }
10927
+ } }),
10928
+ (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
10929
+ ] }),
10930
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
10931
+ /* @__PURE__ */ jsx34("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
10932
+ /* @__PURE__ */ jsx34("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx34(
10933
+ FractalFields_default,
10639
10934
  {
10640
- xmlns: "http://www.w3.org/2000/svg",
10641
- width: "20",
10642
- height: "20",
10643
- viewBox: "0 0 20 20",
10644
- fill: "none",
10645
- children: [
10646
- /* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
10647
- /* @__PURE__ */ jsx32(
10648
- "path",
10649
- {
10650
- 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",
10651
- fill: "#161616"
10652
- }
10653
- )
10654
- ]
10935
+ fractalStyles,
10936
+ tokenizerRef,
10937
+ isSky: true
10655
10938
  }
10656
- ) }),
10657
- /* @__PURE__ */ jsx32("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
10658
- "If checked, I agree to give the ",
10659
- /* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
10660
- " permission to charge this credit card for agreed-upon purchases in the future."
10661
- ] }) })
10662
- ] })
10663
- ] }) })
10664
- ] }),
10665
- /* @__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)) }) })
10666
- ] }) : /* @__PURE__ */ jsxs19("form", { id: "PaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, onKeyDown: (e) => {
10667
- if (e.key === "Enter" && loading) {
10668
- e.preventDefault();
10669
- e.stopPropagation();
10670
- }
10671
- }, children: [
10672
- /* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
10673
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10674
- /* @__PURE__ */ jsx32("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
10675
- /* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
10676
- const value = e.target.value;
10677
- if (/^[a-zA-Z\s]*$/.test(value)) {
10678
- handleCardChange("cardName", value);
10679
- }
10680
- } }),
10681
- (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
10682
- ] }),
10683
- /* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx32(
10684
- DataCapFields,
10685
- {
10686
- isOpen: show || autoTrigger,
10687
- tokenKey: dcToken,
10688
- setLoader: activeinCard === "form" ? setLoadingIframe : null
10689
- }
10690
- ) }),
10691
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10692
- /* @__PURE__ */ jsx32("label", { htmlFor: "zip", children: "ZIP" }),
10693
- /* @__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) }),
10694
- (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
10939
+ ) })
10940
+ ] }),
10941
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
10942
+ /* @__PURE__ */ jsx34("label", { htmlFor: "zip", children: "ZIP" }),
10943
+ /* @__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) }),
10944
+ (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
10945
+ ] }),
10946
+ 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: [
10947
+ /* @__PURE__ */ jsx34(
10948
+ "input",
10949
+ {
10950
+ type: "checkbox",
10951
+ id: "save_card",
10952
+ className: "toggle-checkbox",
10953
+ checked: saveCardInfo,
10954
+ onChange: (e) => setSaveCardInfo(e.target.checked)
10955
+ }
10956
+ ),
10957
+ /* @__PURE__ */ jsx34("label", { htmlFor: "save_card", className: "toggle-label" }),
10958
+ /* @__PURE__ */ jsx34("label", { htmlFor: "save_card", children: "Save card for future payments " }),
10959
+ /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
10960
+ /* @__PURE__ */ jsx34("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
10961
+ "svg",
10962
+ {
10963
+ xmlns: "http://www.w3.org/2000/svg",
10964
+ width: "20",
10965
+ height: "20",
10966
+ viewBox: "0 0 20 20",
10967
+ fill: "none",
10968
+ children: [
10969
+ /* @__PURE__ */ jsx34("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
10970
+ /* @__PURE__ */ jsx34(
10971
+ "path",
10972
+ {
10973
+ 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",
10974
+ fill: "#161616"
10975
+ }
10976
+ )
10977
+ ]
10978
+ }
10979
+ ) }),
10980
+ /* @__PURE__ */ jsx34("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
10981
+ "If checked, I agree to give the ",
10982
+ /* @__PURE__ */ jsx34("b", { children: merchantName || "merchant" }),
10983
+ " permission to charge this credit card for agreed-upon purchases in the future."
10984
+ ] }) })
10985
+ ] })
10986
+ ] }) })
10695
10987
  ] }),
10696
- 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: [
10697
- /* @__PURE__ */ jsx32(
10698
- "input",
10988
+ /* @__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)) }) })
10989
+ ] }) : /* @__PURE__ */ jsxs20("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
10990
+ if (e.key === "Enter" && loading) {
10991
+ e.preventDefault();
10992
+ e.stopPropagation();
10993
+ }
10994
+ }, children: [
10995
+ /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
10996
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
10997
+ /* @__PURE__ */ jsx34("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
10998
+ /* @__PURE__ */ jsx34("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
10999
+ const value = e.target.value;
11000
+ if (/^[a-zA-Z\s]*$/.test(value)) {
11001
+ handleCardChange("cardName", value);
11002
+ }
11003
+ } }),
11004
+ (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11005
+ ] }),
11006
+ /* @__PURE__ */ jsx34("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx34(
11007
+ DataCapFields,
10699
11008
  {
10700
- type: "checkbox",
10701
- id: "save_card",
10702
- className: "toggle-checkbox",
10703
- checked: saveCardInfo,
10704
- onChange: (e) => setSaveCardInfo(e.target.checked)
11009
+ isOpen: show || autoTrigger,
11010
+ tokenKey: dcToken,
11011
+ setLoader: activeinCard === "form" ? setLoadingIframe : null,
11012
+ isEmbedded: onSubmit ? true : false
10705
11013
  }
10706
- ),
10707
- /* @__PURE__ */ jsx32("label", { htmlFor: "save_card", className: "toggle-label" }),
10708
- /* @__PURE__ */ jsx32("label", { htmlFor: "save_card", children: "Save card for future payments " }),
10709
- /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
10710
- /* @__PURE__ */ jsx32("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
10711
- "svg",
11014
+ ) }),
11015
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11016
+ /* @__PURE__ */ jsx34("label", { htmlFor: "zip", children: "ZIP" }),
11017
+ /* @__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) }),
11018
+ (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
11019
+ ] }),
11020
+ 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: [
11021
+ /* @__PURE__ */ jsx34(
11022
+ "input",
10712
11023
  {
10713
- xmlns: "http://www.w3.org/2000/svg",
10714
- width: "20",
10715
- height: "20",
10716
- viewBox: "0 0 20 20",
10717
- fill: "none",
10718
- children: [
10719
- /* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
10720
- /* @__PURE__ */ jsx32(
10721
- "path",
10722
- {
10723
- 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",
10724
- fill: "#161616"
10725
- }
10726
- )
10727
- ]
11024
+ type: "checkbox",
11025
+ id: "save_card",
11026
+ className: "toggle-checkbox",
11027
+ checked: saveCardInfo,
11028
+ onChange: (e) => setSaveCardInfo(e.target.checked)
10728
11029
  }
10729
- ) }),
10730
- /* @__PURE__ */ jsx32("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
10731
- "If checked, I agree to give the ",
10732
- /* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
10733
- " permission to charge this credit card for agreed-upon purchases in the future."
10734
- ] }) })
10735
- ] })
10736
- ] }) })
10737
- ] }),
10738
- /* @__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)) }) })
10739
- ] })
10740
- ] }),
10741
- /* @__PURE__ */ jsx32("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs19(Fragment18, { children: [
10742
- /* @__PURE__ */ jsxs19("div", { className: "frac-heading-card-wrap", children: [
10743
- /* @__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: [
10744
- " ",
10745
- /* @__PURE__ */ jsx32(IoArrowBack4, {})
10746
- ] }) }),
10747
- /* @__PURE__ */ jsx32("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
11030
+ ),
11031
+ /* @__PURE__ */ jsx34("label", { htmlFor: "save_card", className: "toggle-label" }),
11032
+ /* @__PURE__ */ jsx34("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11033
+ /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
11034
+ /* @__PURE__ */ jsx34("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
11035
+ "svg",
11036
+ {
11037
+ xmlns: "http://www.w3.org/2000/svg",
11038
+ width: "20",
11039
+ height: "20",
11040
+ viewBox: "0 0 20 20",
11041
+ fill: "none",
11042
+ children: [
11043
+ /* @__PURE__ */ jsx34("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11044
+ /* @__PURE__ */ jsx34(
11045
+ "path",
11046
+ {
11047
+ 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",
11048
+ fill: "#161616"
11049
+ }
11050
+ )
11051
+ ]
11052
+ }
11053
+ ) }),
11054
+ /* @__PURE__ */ jsx34("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
11055
+ "If checked, I agree to give the ",
11056
+ /* @__PURE__ */ jsx34("b", { children: merchantName || "merchant" }),
11057
+ " permission to charge this credit card for agreed-upon purchases in the future."
11058
+ ] }) })
11059
+ ] })
11060
+ ] }) })
11061
+ ] }),
11062
+ /* @__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)) }) })
11063
+ ] })
10748
11064
  ] }),
10749
- activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
10750
- /* @__PURE__ */ jsx32(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
10751
- setActiveinBank("form");
10752
- } }),
10753
- /* @__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)) }) })
10754
- ] }) : /* @__PURE__ */ jsxs19("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
10755
- if (e.key === "Enter" && loading) {
10756
- e.preventDefault();
10757
- e.stopPropagation();
10758
- }
10759
- }, children: [
10760
- /* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: {
10761
- minHeight: "444px",
10762
- maxHeight: "444px"
11065
+ /* @__PURE__ */ jsx34("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs20(Fragment19, { children: [
11066
+ !onSubmit && /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
11067
+ /* @__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: [
11068
+ " ",
11069
+ /* @__PURE__ */ jsx34(IoArrowBack4, {})
11070
+ ] }) }),
11071
+ /* @__PURE__ */ jsx34("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
11072
+ ] }),
11073
+ activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
11074
+ /* @__PURE__ */ jsx34(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
11075
+ setActiveinBank("form");
11076
+ } }),
11077
+ /* @__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)) }) })
11078
+ ] }) : /* @__PURE__ */ jsxs20("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
11079
+ if (e.key === "Enter" && loading) {
11080
+ e.preventDefault();
11081
+ e.stopPropagation();
11082
+ }
10763
11083
  }, children: [
10764
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10765
- /* @__PURE__ */ jsx32("label", { htmlFor: "nameonaccount", children: "Name on account" }),
10766
- /* @__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 }),
10767
- (achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
10768
- ] }),
10769
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10770
- /* @__PURE__ */ jsx32("label", { htmlFor: "routingnumber", children: "Routing number" }),
10771
- /* @__PURE__ */ jsx32(
10772
- "input",
10773
- {
10774
- type: "text",
10775
- id: "routingnumber",
10776
- className: "form-control-frac",
10777
- maxLength: 9,
10778
- placeholder: "000000000",
10779
- name: "routingNumber",
10780
- value: (_m = achData == null ? void 0 : achData.routingNumber) != null ? _m : "",
10781
- onChange: handleChangeAch
10782
- }
10783
- ),
10784
- (achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
10785
- ] }),
10786
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10787
- /* @__PURE__ */ jsx32("label", { htmlFor: "accountnumber", children: "Account number" }),
10788
- /* @__PURE__ */ jsx32(
10789
- "input",
10790
- {
10791
- type: "text",
10792
- id: "accountnumber",
10793
- className: "form-control-frac",
10794
- maxLength: 16,
10795
- placeholder: "0000000000",
10796
- name: "accountNumber",
10797
- value: (_n = achData == null ? void 0 : achData.accountNumber) != null ? _n : "",
10798
- onChange: handleChangeAch
10799
- }
10800
- ),
10801
- (achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
10802
- ] }),
10803
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10804
- /* @__PURE__ */ jsx32("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
10805
- /* @__PURE__ */ jsx32(
10806
- "input",
10807
- {
10808
- type: "text",
10809
- id: "confirmaccountnumber",
10810
- className: "form-control-frac",
10811
- maxLength: 16,
10812
- placeholder: "0000000000",
10813
- name: "confirmAccountNumber",
10814
- value: (_o = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _o : "",
10815
- onChange: handleChangeAch
10816
- }
10817
- ),
10818
- (achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
10819
- ] }),
10820
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10821
- /* @__PURE__ */ jsx32("label", { htmlFor: "bankname", children: "Bank name" }),
10822
- /* @__PURE__ */ jsx32(
10823
- "input",
10824
- {
10825
- type: "text",
10826
- id: "bankname",
10827
- className: "form-control-frac",
10828
- maxLength: 100,
10829
- placeholder: "My Bank",
10830
- name: "bankName",
10831
- value: (_p = achData == null ? void 0 : achData.bankName) != null ? _p : "",
10832
- onChange: handleChangeAch
10833
- }
10834
- ),
10835
- (achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
10836
- ] }),
10837
- ((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10838
- /* @__PURE__ */ jsx32("label", { htmlFor: "companyName", children: "Company name" }),
10839
- /* @__PURE__ */ jsx32(
10840
- "input",
10841
- {
10842
- type: "text",
10843
- id: "companyName",
10844
- className: "form-control-frac",
10845
- maxLength: 100,
10846
- placeholder: "My Company",
10847
- name: "companyName",
10848
- value: (_q = achData == null ? void 0 : achData.companyName) != null ? _q : "",
10849
- onChange: handleChangeAch
10850
- }
10851
- ),
10852
- (achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
10853
- ] }),
10854
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10855
- /* @__PURE__ */ jsx32("label", { htmlFor: "accounttype", children: "Select account type" }),
10856
- /* @__PURE__ */ jsxs19("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_r = achData == null ? void 0 : achData.accountType) != null ? _r : "", onChange: handleChangeAch, children: [
10857
- /* @__PURE__ */ jsx32("option", { value: "", children: "Select account" }),
10858
- accountTypes.map((type) => /* @__PURE__ */ jsx32("option", { value: type.value, children: type.label }, type.value))
11084
+ /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: {
11085
+ minHeight: "444px",
11086
+ maxHeight: "444px"
11087
+ }, children: [
11088
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11089
+ /* @__PURE__ */ jsx34("label", { htmlFor: "nameonaccount", children: "Name on account" }),
11090
+ /* @__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 }),
11091
+ (achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
11092
+ ] }),
11093
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11094
+ /* @__PURE__ */ jsx34("label", { htmlFor: "routingnumber", children: "Routing number" }),
11095
+ /* @__PURE__ */ jsx34(
11096
+ "input",
11097
+ {
11098
+ type: "text",
11099
+ id: "routingnumber",
11100
+ className: "form-control-frac",
11101
+ maxLength: 9,
11102
+ placeholder: "000000000",
11103
+ name: "routingNumber",
11104
+ value: (_o = achData == null ? void 0 : achData.routingNumber) != null ? _o : "",
11105
+ onChange: handleChangeAch
11106
+ }
11107
+ ),
11108
+ (achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
11109
+ ] }),
11110
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11111
+ /* @__PURE__ */ jsx34("label", { htmlFor: "accountnumber", children: "Account number" }),
11112
+ /* @__PURE__ */ jsx34(
11113
+ "input",
11114
+ {
11115
+ type: "text",
11116
+ id: "accountnumber",
11117
+ className: "form-control-frac",
11118
+ maxLength: 16,
11119
+ placeholder: "0000000000",
11120
+ name: "accountNumber",
11121
+ value: (_p = achData == null ? void 0 : achData.accountNumber) != null ? _p : "",
11122
+ onChange: handleChangeAch
11123
+ }
11124
+ ),
11125
+ (achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
11126
+ ] }),
11127
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11128
+ /* @__PURE__ */ jsx34("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
11129
+ /* @__PURE__ */ jsx34(
11130
+ "input",
11131
+ {
11132
+ type: "text",
11133
+ id: "confirmaccountnumber",
11134
+ className: "form-control-frac",
11135
+ maxLength: 16,
11136
+ placeholder: "0000000000",
11137
+ name: "confirmAccountNumber",
11138
+ value: (_q = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _q : "",
11139
+ onChange: handleChangeAch
11140
+ }
11141
+ ),
11142
+ (achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
11143
+ ] }),
11144
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11145
+ /* @__PURE__ */ jsx34("label", { htmlFor: "bankname", children: "Bank name" }),
11146
+ /* @__PURE__ */ jsx34(
11147
+ "input",
11148
+ {
11149
+ type: "text",
11150
+ id: "bankname",
11151
+ className: "form-control-frac",
11152
+ maxLength: 100,
11153
+ placeholder: "My Bank",
11154
+ name: "bankName",
11155
+ value: (_r = achData == null ? void 0 : achData.bankName) != null ? _r : "",
11156
+ onChange: handleChangeAch
11157
+ }
11158
+ ),
11159
+ (achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
11160
+ ] }),
11161
+ ((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11162
+ /* @__PURE__ */ jsx34("label", { htmlFor: "companyName", children: "Company name" }),
11163
+ /* @__PURE__ */ jsx34(
11164
+ "input",
11165
+ {
11166
+ type: "text",
11167
+ id: "companyName",
11168
+ className: "form-control-frac",
11169
+ maxLength: 100,
11170
+ placeholder: "My Company",
11171
+ name: "companyName",
11172
+ value: (_s = achData == null ? void 0 : achData.companyName) != null ? _s : "",
11173
+ onChange: handleChangeAch
11174
+ }
11175
+ ),
11176
+ (achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
11177
+ ] }),
11178
+ /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11179
+ /* @__PURE__ */ jsx34("label", { htmlFor: "accounttype", children: "Select account type" }),
11180
+ /* @__PURE__ */ jsxs20("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
11181
+ /* @__PURE__ */ jsx34("option", { value: "", children: "Select account" }),
11182
+ accountTypes.map((type) => /* @__PURE__ */ jsx34("option", { value: type.value, children: type.label }, type.value))
11183
+ ] })
11184
+ ] }),
11185
+ customerId && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11186
+ /* @__PURE__ */ jsx34("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
11187
+ /* @__PURE__ */ jsx34("label", { className: "saveachlabel", htmlFor: "saveACH", 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.` })
10859
11188
  ] })
10860
11189
  ] }),
10861
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
10862
- /* @__PURE__ */ jsx32("input", { type: "checkbox", id: "achconsent", className: "", maxLength: 100, placeholder: "My Bank" }),
10863
- /* @__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.` })
10864
- ] }),
10865
- customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
10866
- /* @__PURE__ */ jsx32("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
10867
- /* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
10868
- ] }),
10869
- saveACHinfo && /* @__PURE__ */ jsx32("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs19("p", { children: [
10870
- "If checked, I agree to give the ",
10871
- /* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
10872
- " permission to charge this bank account for agreed-upon purchases in the future."
10873
- ] }) })
10874
- ] }),
10875
- /* @__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)) }) })
10876
- ] })
10877
- ] }) })
10878
- ] }) }) }) })
11190
+ /* @__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)) }) })
11191
+ ] })
11192
+ ] }) })
11193
+ ] })
11194
+ ] }) }) })
10879
11195
  ] })
10880
11196
  ] })
10881
11197
  ] })
@@ -10886,7 +11202,7 @@ var ModelContentSky_default = ModelContentSky;
10886
11202
 
10887
11203
  // src/app/components/Skysystemz/PayButtonWithForm.tsx
10888
11204
  import axios10 from "axios";
10889
- import { Fragment as Fragment19, jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
11205
+ import { Fragment as Fragment20, jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
10890
11206
  var PaymentWidget = ({
10891
11207
  amount,
10892
11208
  bankAmount,
@@ -10997,24 +11313,510 @@ var PaymentWidget = ({
10997
11313
  getskyosOrderDetails();
10998
11314
  }
10999
11315
  }, [show, isPartial, partialRef]);
11000
- return /* @__PURE__ */ jsxs20(Fragment19, { children: [
11001
- /* @__PURE__ */ jsx33("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
11002
- /* @__PURE__ */ jsx33(DataScript, {}),
11003
- /* @__PURE__ */ jsx33(FractalTokenizerScript, {}),
11004
- /* @__PURE__ */ jsx33(SkyChargewidgetstyles, {}),
11005
- /* @__PURE__ */ jsx33(CardBankRadioStyles, {}),
11006
- /* @__PURE__ */ jsx33(CustomModal2styles_default, {}),
11007
- /* @__PURE__ */ jsx33(DataCapScriptLoader, {}),
11008
- !autoTrigger && /* @__PURE__ */ jsxs20("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
11316
+ return /* @__PURE__ */ jsxs21(Fragment20, { children: [
11317
+ /* @__PURE__ */ jsx35("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
11318
+ /* @__PURE__ */ jsx35(DataScript, {}),
11319
+ /* @__PURE__ */ jsx35(FractalTokenizerScript, {}),
11320
+ /* @__PURE__ */ jsx35(SkyChargewidgetstyles, {}),
11321
+ /* @__PURE__ */ jsx35(CardBankRadioStyles, {}),
11322
+ /* @__PURE__ */ jsx35(CustomModal2styles_default, {}),
11323
+ /* @__PURE__ */ jsx35(DataCapScriptLoader, {}),
11324
+ !autoTrigger && /* @__PURE__ */ jsxs21("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
11325
+ submitBtnText,
11326
+ submitBtnIcon
11327
+ ] }),
11328
+ !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 }))
11329
+ ] });
11330
+ };
11331
+
11332
+ // src/app/components/Skysystemz/EmbeddedCheckout.tsx
11333
+ import { useEffect as useEffect17, useState as useState12, useMemo as useMemo2 } from "react";
11334
+ import axios11 from "axios";
11335
+
11336
+ // src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
11337
+ import { jsx as jsx36 } from "react/jsx-runtime";
11338
+ function EmbeddedCheckoutStyles({ extraCustomCSS }) {
11339
+ return /* @__PURE__ */ jsx36("style", { children: `
11340
+
11341
+ .pay-amount-conatiner{
11342
+ margin-top: 20px !important;
11343
+ margin-bottom: 20px !important ;
11344
+ }
11345
+
11346
+ .frac-pay-container.pay-container {
11347
+ grid-template-columns:1fr;
11348
+ }
11349
+
11350
+
11351
+ /* Card */
11352
+ .plan-card {
11353
+ width: 100%;
11354
+ font-family: Inter, sans-serif;
11355
+ background: #fff;
11356
+ }
11357
+
11358
+ /* Header */
11359
+ .card-header {
11360
+ padding: 12px 0 0 0;
11361
+ }
11362
+
11363
+ /* Button */
11364
+ .collapse-btn {
11365
+ width: 100%;
11366
+ background: none;
11367
+ border: none;
11368
+ display: flex;
11369
+ justify-content: space-between;
11370
+ align-items: center;
11371
+ cursor: pointer;
11372
+ font-size: 15px;
11373
+ padding: 0;
11374
+ }
11375
+
11376
+ /* Arrow */
11377
+ .arrow {
11378
+ transition: transform 0.3s ease;
11379
+ height: 8px;
11380
+ }
11381
+
11382
+ /* Open State */
11383
+ .collapse-btn.open .arrow {
11384
+ transform: rotate(180deg); /* Down */
11385
+ }
11386
+
11387
+ /* Body */
11388
+ .card-body {
11389
+ padding: 0;
11390
+ }
11391
+
11392
+ /* Plan Header */
11393
+ .plan-header {
11394
+ font-size: 15px;
11395
+ font-weight: 600;
11396
+ }
11397
+
11398
+ /* Scrollable List */
11399
+ .plan-list {
11400
+ max-height: 200px;
11401
+ overflow-y: auto;
11402
+ padding-right: 6px;
11403
+ }
11404
+
11405
+ /* Items */
11406
+ .plan-item {
11407
+ display: flex;
11408
+ justify-content: space-between;
11409
+ padding: 6px 0;
11410
+ font-size: 14px;
11411
+ }
11412
+
11413
+ /* Badges */
11414
+ .badge {
11415
+ padding: 4px 10px;
11416
+ border-radius: 12px;
11417
+ font-size: 12px;
11418
+ font-weight: 500;
11419
+ }
11420
+
11421
+ .badge-included {
11422
+ background: #f1f3f5;
11423
+ color: #495057;
11424
+ }
11425
+
11426
+ .badge-available {
11427
+ background: #f8f9fa;
11428
+ color: #212529;
11429
+ }
11430
+
11431
+ /* Helpers */
11432
+ .row-between {
11433
+ display: flex;
11434
+ justify-content: space-between;
11435
+ }
11436
+
11437
+ .text-end {
11438
+ text-align: right;
11439
+ }
11440
+
11441
+ .text-muted {
11442
+ color: #6c757d;
11443
+ font-size: 12px;
11444
+ }
11445
+
11446
+ .fw-semibold {
11447
+ font-weight: 600;
11448
+ }
11449
+
11450
+ .mb-2 {
11451
+ margin-bottom: 8px;
11452
+ }
11453
+
11454
+ /* Divider */
11455
+ .divider {
11456
+ height: 1px;
11457
+ background: #e5e7eb;
11458
+ margin: 8px 0;
11459
+ }
11460
+
11461
+ /* Collapse Animation */
11462
+ .collapse {
11463
+ max-height: 0;
11464
+ overflow: hidden;
11465
+ transition: max-height 0.3s ease;
11466
+ }
11467
+
11468
+ .collapse.show {
11469
+ max-height: 1000px;
11470
+ }
11471
+ .frac-pay-container.pay-container {
11472
+ grid-template-columns:1fr;
11473
+ }
11474
+ .frac-payment-form-div .amt-pay-con {
11475
+ padding-right: 0px;
11476
+ }
11477
+ .frac-payment-form-div .ach-scrl {
11478
+ padding-right: 0px;
11479
+ gap: 10px;
11480
+ max-height: fit-content !important;
11481
+ min-height: fit-content !important;
11482
+ overflow: hidden !important;
11483
+ }
11484
+ .frac-payment-form-div .frac-card-bank-radio-main {
11485
+ display: flex;
11486
+ flex-direction: row;
11487
+ align-items: flex-start;
11488
+ align-self: stretch;
11489
+ border-radius: 14px;
11490
+ border: none;
11491
+ overflow: visible;
11492
+ gap: 10px;
11493
+ }
11494
+ .frac-payment-form-div .frac-card-bank-radio {
11495
+ display: flex;
11496
+ padding: 12px 16px;
11497
+ justify-content: space-between;
11498
+ align-items: center;
11499
+ align-self: stretch;
11500
+ width: 50%;
11501
+ border: 1px solid #E0DFE2;
11502
+ border-radius: 10px;
11503
+ box-shadow: rgba(149, 157, 165, 0.2) 0px 1px 4px;
11504
+ }
11505
+ .frac-payment-form-div .frac-card-bank-radio.frac-active {
11506
+ background: #fff;
11507
+ border: 2px solid #004eab !important;
11508
+ }
11509
+
11510
+ .frac-payment-form-div .form-control-frac {
11511
+ border: 1px solid #dee2e6 !important;
11512
+ border-radius: 0.375rem !important;
11513
+ background-color: #F6F6F7;
11514
+ box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
11515
+ }
11516
+ .frac-payment-form-div .form-control-frac:focus {
11517
+ border: 1px solid #004eab !important;
11518
+ }
11519
+ .frac-payment-form-div .card-expiry-new {
11520
+ border: none;
11521
+ gap: 10px;
11522
+ }
11523
+ .frac-payment-form-div .exp-date-year-container {
11524
+ gap: 10px;
11525
+ width: 100%;
11526
+ }
11527
+ .frac-payment-form-div .card-type-logo-wrap{
11528
+ position: absolute;
11529
+ right: 10px;
11530
+ max-width: 30px;
11531
+ }
11532
+ .detials-wrap.detials-wrap-1 {
11533
+ display: flex;
11534
+ flex-wrap: wrap;
11535
+ }
11536
+ @media screen and (max-width: 1280px) {
11537
+ .frac-pay-container.pay-container {
11538
+ grid-template-columns: 1fr;
11539
+ border: none;
11540
+ }
11541
+ }
11542
+ @media screen and (max-width: 899px) {
11543
+ .detials-wrap {
11544
+ grid-template-columns: 1fr !important;
11545
+ }
11546
+ .frac-payment-form-div .exp-date-year-container{
11547
+ width: 100%;}
11548
+
11549
+ }
11550
+ @media screen and (max-width: 575px) {
11551
+ .frac-payment-form-div .card-type-logo-wrap{
11552
+ max-width: 30px;
11553
+ }
11554
+ form#ACHPaymentForm .ach-scrl {
11555
+ grid-template-columns: 1fr !important;
11556
+ }
11557
+ @media screen and (max-width: 375px) {
11558
+ .frac-payment-form-div .exp-date-year-container {
11559
+ flex-direction: column;
11560
+ }
11561
+ .parent-pay-container {
11562
+ padding: 10px;
11563
+ }
11564
+ }
11565
+ }
11566
+ .box-inner-card-text{
11567
+ display: flex;
11568
+ gap: 0px;
11569
+ flex-direction: column;
11570
+ }
11571
+ .box-inner-card-text .frac-payment-type-logo {
11572
+ width: 17px;
11573
+ height: 17px;
11574
+ aspect-ratio: 1/1;
11575
+ }
11576
+ .exp-date-year-wrap.form-control-frac input {
11577
+ background: transparent;
11578
+ border: none;
11579
+ outline: none;
11580
+ font-size: 1rem;
11581
+ font-weight: 400;
11582
+ }
11583
+ .exp-date-year-wrap.form-control-frac {
11584
+ display: flex;
11585
+ gap: 2px;
11586
+ }
11587
+ .exp-date-year-wrap input.exp-month {
11588
+ width: 32px;
11589
+ }
11590
+ .detials-wrap {
11591
+ display: grid;
11592
+ grid-template-columns: 1fr 1fr;
11593
+ gap: 10px;
11594
+ }
11595
+ .detials-wrap.detials-wrap-2{
11596
+ grid-template-columns: 1fr 1fr;
11597
+ }
11598
+ form#ACHPaymentForm .ach-scrl {
11599
+ display: grid;
11600
+ grid-gap: 0px 10px;
11601
+ grid-template-columns: 1fr;
11602
+ }
11603
+ .plan-list {
11604
+ max-height: 130px;
11605
+ min-height: 130px;
11606
+ overflow-y: auto;
11607
+ padding-right: 6px;
11608
+ }
11609
+ .plan-list::-webkit-scrollbar {
11610
+ width: 3px;
11611
+ background-color: #F5F5F5;
11612
+ }
11613
+ .plan-list::-webkit-scrollbar-thumb {
11614
+ background-color: #35254D;
11615
+ }
11616
+ div#cvv {
11617
+ border-top-left-radius: 0;
11618
+ border-bottom-left-radius: 0;
11619
+ border-top: 0;
11620
+ border-bottom: 0;
11621
+ border-right: 0;
11622
+ }
11623
+ div#exp_year {
11624
+ height: 36px;
11625
+ width: calc(100% + 1px);
11626
+ border-radius: 0;
11627
+ border-top: 0;
11628
+ border-bottom: 0;
11629
+ border-right: 1px solid #dee2e6;
11630
+ }
11631
+ div#exp_month {
11632
+ width: calc(100% + 1px);
11633
+ border-top-right-radius: 0;
11634
+ border-bottom-right-radius: 0;
11635
+ border: 0;
11636
+ border-right: 1px solid #dee2e6;
11637
+ }
11638
+ .exp-date-year-container .form-group {
11639
+ flex: 1;
11640
+ }
11641
+ .input-main-wrap-frac{
11642
+ margin:0px !important;
11643
+ padding:0px !important;
11644
+ }
11645
+ .toggle-num-wrapper.toggle-num-wrapper-new {
11646
+ border: 1px solid #dee2e6 !important;
11647
+ border-radius: 0.375rem !important;
11648
+ background-color: #F6F6F7;
11649
+ box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
11650
+ }
11651
+ .toggle-num-wrapper-new div#card_number {
11652
+ padding: 0px 10px;
11653
+ border: none;
11654
+ border-bottom: 1px solid #dee2e6;
11655
+ }
11656
+ .toggle-num-wrapper-new .card-crdi.card-expiry-new {
11657
+ padding: 0px 10px;
11658
+ }
11659
+ .toggle-num-wrapper-new .input-main-wrap-frac {
11660
+ height: 36px;
11661
+ }
11662
+ .toggle-num-wrapper-new:focus {
11663
+ border: 1px solid #004eab !important;
11664
+ }
11665
+ .frac-card-title-main {
11666
+ display: flex;
11667
+ align-items: start;
11668
+ gap: 4px;
11669
+ flex-direction: column;
11670
+ }
11671
+ .parent-pay-container {
11672
+ padding: 24px;
11673
+ background-color: #ffffff !important;
11674
+ border-radius: 15px;
11675
+ min-width: 300px;
11676
+ }
11677
+
11678
+
11679
+ ${extraCustomCSS}
11680
+
11681
+ ` });
11682
+ }
11683
+
11684
+ // src/app/components/Skysystemz/EmbeddedCheckout.tsx
11685
+ import { Fragment as Fragment21, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
11686
+ var EmbeddedCheckout = ({
11687
+ amount,
11688
+ bankAmount,
11689
+ submitBtnText = "Pay",
11690
+ session_token,
11691
+ customerId,
11692
+ callback,
11693
+ merchantName = "merchant",
11694
+ isPreAuth,
11695
+ surcharge = "0",
11696
+ submitBtnClass,
11697
+ submitBtnIcon,
11698
+ isRequest,
11699
+ pass_fee,
11700
+ pass_fee_amount,
11701
+ require3ds = false,
11702
+ autoTrigger = false,
11703
+ isPartial,
11704
+ bankSurcharge,
11705
+ partialRef,
11706
+ onSubmit,
11707
+ onLoad,
11708
+ customCSS: customCSS2
11709
+ }) => {
11710
+ const [show, setShow] = useState12(false);
11711
+ const [loading, setLoading] = useState12(false);
11712
+ const [childHandleClose, setChildHandleClose] = useState12(() => () => {
11713
+ });
11714
+ const [orderGuid, setOrderGuid] = useState12(null);
11715
+ const [remainingAmount, setRemainingAmount] = useState12(null);
11716
+ const initialCommonProps = useMemo2(
11717
+ () => ({
11718
+ amount,
11719
+ bankAmount,
11720
+ submitBtnText,
11721
+ session_token,
11722
+ customerId,
11723
+ callback,
11724
+ merchantName,
11725
+ isPreAuth,
11726
+ surcharge,
11727
+ submitBtnClass,
11728
+ submitBtnIcon,
11729
+ isRequest,
11730
+ pass_fee,
11731
+ pass_fee_amount,
11732
+ require3ds,
11733
+ autoTrigger,
11734
+ setShow,
11735
+ setHandleCloseRef: setChildHandleClose,
11736
+ isPartial,
11737
+ bankSurcharge,
11738
+ partialRef
11739
+ }),
11740
+ [
11741
+ amount,
11742
+ bankAmount,
11743
+ submitBtnText,
11744
+ session_token,
11745
+ customerId,
11746
+ callback,
11747
+ merchantName,
11748
+ isPreAuth,
11749
+ surcharge,
11750
+ submitBtnClass,
11751
+ submitBtnIcon,
11752
+ isRequest,
11753
+ pass_fee,
11754
+ pass_fee_amount,
11755
+ require3ds,
11756
+ autoTrigger,
11757
+ isPartial,
11758
+ bankSurcharge,
11759
+ partialRef
11760
+ ]
11761
+ );
11762
+ const [commonProps, setCommonProps] = useState12(initialCommonProps);
11763
+ useEffect17(() => {
11764
+ if (show) {
11765
+ setCommonProps(initialCommonProps);
11766
+ }
11767
+ }, [show, initialCommonProps]);
11768
+ const getskyosOrderDetails = async () => {
11769
+ var _a;
11770
+ setLoading(true);
11771
+ try {
11772
+ const res = await axios11.get(
11773
+ `${masterBaseUrl}api/v1/gateway/get-order-details/${session_token}`,
11774
+ { params: { isPartial, partialRef } }
11775
+ );
11776
+ if ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.result) {
11777
+ const data = res.data.data;
11778
+ if (data == null ? void 0 : data.orderGuid) {
11779
+ setOrderGuid(data == null ? void 0 : data.orderGuid);
11780
+ setRemainingAmount(data == null ? void 0 : data.remainingAmount);
11781
+ }
11782
+ setCommonProps((prev) => __spreadProps(__spreadValues({}, prev), {
11783
+ amount: data.amount,
11784
+ pass_fee_amount: data.pass_fee_amount,
11785
+ pass_fee: data.pass_fee
11786
+ }));
11787
+ }
11788
+ } catch (error) {
11789
+ console.log("error while getting skyosorderdeatils", error);
11790
+ } finally {
11791
+ setLoading(false);
11792
+ }
11793
+ };
11794
+ useEffect17(() => {
11795
+ if (show && isPartial && partialRef) {
11796
+ getskyosOrderDetails();
11797
+ }
11798
+ }, [show, isPartial, partialRef]);
11799
+ console.log(onLoad, "onLoad");
11800
+ return /* @__PURE__ */ jsxs22(Fragment21, { children: [
11801
+ /* @__PURE__ */ jsx37("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
11802
+ /* @__PURE__ */ jsx37(DataScript, {}),
11803
+ /* @__PURE__ */ jsx37(FractalTokenizerScript, {}),
11804
+ /* @__PURE__ */ jsx37(SkyChargewidgetstyles, {}),
11805
+ /* @__PURE__ */ jsx37(CardBankRadioStyles, {}),
11806
+ /* @__PURE__ */ jsx37(CustomModal2styles_default, {}),
11807
+ /* @__PURE__ */ jsx37(DataCapScriptLoader, {}),
11808
+ /* @__PURE__ */ jsx37(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
11809
+ !autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
11009
11810
  submitBtnText,
11010
11811
  submitBtnIcon
11011
11812
  ] }),
11012
- !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 }))
11813
+ !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 }))
11013
11814
  ] });
11014
11815
  };
11015
11816
  export {
11016
11817
  AddCardEasyPay as AddCard,
11017
11818
  CardOnFile,
11819
+ EmbeddedCheckout,
11018
11820
  GetPaymentPage,
11019
11821
  PartialPayment,
11020
11822
  PaymentWidget,