@fractalpay/fractalpay-next-dev 0.0.280 → 0.0.281

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.280",
42
+ version: "0.0.281",
43
43
  private: false,
44
44
  type: "module",
45
45
  scripts: {
@@ -212,6 +212,17 @@ var LoaderStyle = (props) => {
212
212
  }
213
213
  }
214
214
 
215
+
216
+ .loader-text {
217
+ margin-top: 8px;
218
+ }
219
+
220
+ .loader-content {
221
+ display: flex;
222
+ flex-direction: column;
223
+ align-items: center;
224
+ }
225
+
215
226
  ` });
216
227
  };
217
228
  var LoaderStyle_default = LoaderStyle;
@@ -219,14 +230,17 @@ var LoaderStyle_default = LoaderStyle;
219
230
  // src/app/components/Loader/Loader.tsx
220
231
  import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
221
232
  var Loader = (_a) => {
222
- var _b = _a, { intensity = "light" } = _b, props = __objRest(_b, ["intensity"]);
233
+ var _b = _a, { intensity = "light", loaderText } = _b, props = __objRest(_b, ["intensity", "loaderText"]);
223
234
  return /* @__PURE__ */ jsxs(Fragment, { children: [
224
235
  /* @__PURE__ */ jsx2(LoaderStyle_default, {}),
225
- (props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: `loader-${intensity}`, children: /* @__PURE__ */ jsxs("div", { className: "lds-ellipsis", children: [
226
- /* @__PURE__ */ jsx2("div", {}),
227
- /* @__PURE__ */ jsx2("div", {}),
228
- /* @__PURE__ */ jsx2("div", {}),
229
- /* @__PURE__ */ jsx2("div", {})
236
+ (props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: `loader-${intensity}`, children: /* @__PURE__ */ jsxs("div", { className: "loader-content", children: [
237
+ /* @__PURE__ */ jsxs("div", { className: "lds-ellipsis", children: [
238
+ /* @__PURE__ */ jsx2("div", {}),
239
+ /* @__PURE__ */ jsx2("div", {}),
240
+ /* @__PURE__ */ jsx2("div", {}),
241
+ /* @__PURE__ */ jsx2("div", {})
242
+ ] }),
243
+ loaderText && /* @__PURE__ */ jsx2("div", { className: "loader-text", children: loaderText })
230
244
  ] }) })
231
245
  ] });
232
246
  };
@@ -236,8 +250,8 @@ var Loader_default = Loader;
236
250
  var { name } = require_package();
237
251
  var S3Url = "https://fractal-userdata-upload.s3.us-east-1.amazonaws.com/";
238
252
  if (name === "@fractalpay/fractalpay-next-dev") {
239
- baseUrl = "http://192.168.1.64:8083/";
240
- masterBaseUrl = "http://192.168.1.64:8082/";
253
+ baseUrl = "http://localhost:8082/";
254
+ masterBaseUrl = "http://localhost:8081/";
241
255
  fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
242
256
  datacapUrl = "https://token-cert.dcap.com/v1/client";
243
257
  threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
@@ -2473,6 +2487,22 @@ position:relative;
2473
2487
  color: #c62828 !important;
2474
2488
  }
2475
2489
 
2490
+ .surcharge-program-notice-text{
2491
+ margin: 10px 0 4px;
2492
+ padding: 8px 12px;
2493
+ background: #f6f6f7;
2494
+ border-radius: 8px;
2495
+ font-family: 'Inter', sans-serif;
2496
+ font-size: 12px;
2497
+ color: #727272;
2498
+ line-height: 1.5;
2499
+ }
2500
+
2501
+ .surcharge-program-notice-text-att {
2502
+ font-weight: 700;
2503
+ color: #161616;
2504
+ }
2505
+
2476
2506
  ` });
2477
2507
  }
2478
2508
 
@@ -3590,6 +3620,7 @@ function GetPaymentPage(props) {
3590
3620
  const [errorBankConsent, setErrorBankConsent] = useState4("");
3591
3621
  const [saveACHConsent1, setSaveACHConsent1] = useState4(false);
3592
3622
  const [errorBankConsentOther, setErrorBankConsentOther] = useState4("");
3623
+ const [loaderText, setLoderText] = useState4("");
3593
3624
  const fractalpayClientKey = props.merchantPublicKey;
3594
3625
  let mastercard2 = S3Url + "widget/mc-img.svg";
3595
3626
  let visa2 = S3Url + "widget/visa-img.svg";
@@ -3733,6 +3764,7 @@ function GetPaymentPage(props) {
3733
3764
  setErrorBankConsent("");
3734
3765
  setSaveACHConsent1(false);
3735
3766
  setErrorBankConsentOther("");
3767
+ setLoderText("");
3736
3768
  };
3737
3769
  const handleShow = () => setShow(true);
3738
3770
  const handletabchange = (id) => {
@@ -3842,7 +3874,7 @@ function GetPaymentPage(props) {
3842
3874
  return Object.keys(errors).length > 0;
3843
3875
  };
3844
3876
  const submitFunc = async (e) => {
3845
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
3877
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2;
3846
3878
  e.preventDefault();
3847
3879
  const el = document.activeElement;
3848
3880
  if (el instanceof HTMLElement) {
@@ -3930,15 +3962,20 @@ function GetPaymentPage(props) {
3930
3962
  setErrorIframe(((_h2 = (_g2 = err == null ? void 0 : err.response) == null ? void 0 : _g2.data) == null ? void 0 : _h2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
3931
3963
  setLoading2(false);
3932
3964
  }
3965
+ const card_issue_type = ((_i2 = tokenizeData == null ? void 0 : tokenizeData.bin_lookup_result) == null ? void 0 : _i2.card_issue_type) || null;
3966
+ if (card_issue_type === "Debit") {
3967
+ setLoderText("Processing Debit card without fee");
3968
+ }
3933
3969
  console.log(tokenizeData, "tokenizeData");
3934
3970
  const reqData = JSON.stringify(__spreadProps(__spreadValues({}, tokenizeData), {
3935
3971
  isSaveCardChecked: saveCardInfo,
3936
3972
  name: cardData == null ? void 0 : cardData.cardName,
3937
3973
  postal_code: cardData == null ? void 0 : cardData.zipCode,
3938
- customer_id: props == null ? void 0 : props.customerId
3974
+ customer_id: props == null ? void 0 : props.customerId,
3975
+ card_issue_type
3939
3976
  }));
3940
3977
  const reqData2 = JSON.stringify({
3941
- "pre_sales_id": `${(_j2 = (_i2 = result == null ? void 0 : result.data) == null ? void 0 : _i2.data) == null ? void 0 : _j2.posSalesIdEncode}`,
3978
+ "pre_sales_id": `${(_k2 = (_j2 = result == null ? void 0 : result.data) == null ? void 0 : _j2.data) == null ? void 0 : _k2.posSalesIdEncode}`,
3942
3979
  "token": `${tokenizeData == null ? void 0 : tokenizeData.token}`,
3943
3980
  "json_response": `${reqData}`
3944
3981
  });
@@ -3971,11 +4008,11 @@ function GetPaymentPage(props) {
3971
4008
  });
3972
4009
  } catch (err) {
3973
4010
  setLoading2(false);
3974
- setError(((_l2 = (_k2 = err == null ? void 0 : err.response) == null ? void 0 : _k2.data) == null ? void 0 : _l2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
4011
+ setError(((_m2 = (_l2 = err == null ? void 0 : err.response) == null ? void 0 : _l2.data) == null ? void 0 : _m2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
3975
4012
  }
3976
4013
  } catch (err) {
3977
4014
  setLoading2(false);
3978
- setError(((_n2 = (_m2 = err == null ? void 0 : err.response) == null ? void 0 : _m2.data) == null ? void 0 : _n2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
4015
+ setError(((_o2 = (_n2 = err == null ? void 0 : err.response) == null ? void 0 : _n2.data) == null ? void 0 : _o2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
3979
4016
  }
3980
4017
  } else {
3981
4018
  try {
@@ -3993,7 +4030,7 @@ function GetPaymentPage(props) {
3993
4030
  }
3994
4031
  } catch (err) {
3995
4032
  setLoading2(false);
3996
- setError(((_p2 = (_o2 = err == null ? void 0 : err.response) == null ? void 0 : _o2.data) == null ? void 0 : _p2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
4033
+ setError(((_q2 = (_p2 = err == null ? void 0 : err.response) == null ? void 0 : _p2.data) == null ? void 0 : _q2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
3997
4034
  }
3998
4035
  }
3999
4036
  }
@@ -4318,7 +4355,7 @@ function GetPaymentPage(props) {
4318
4355
  } }) }),
4319
4356
  success && /* @__PURE__ */ jsx19(SuccessMsz, { onClose: handleClose, tranId }),
4320
4357
  !error && !errorIframe && !success && /* @__PURE__ */ jsxs11(Fragment11, { children: [
4321
- (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx19(Loader_default, { loading: loading || loading2 || loadingIframe }),
4358
+ (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx19(Loader_default, { loading: loading || loading2 || loadingIframe, loaderText }),
4322
4359
  /* @__PURE__ */ jsx19("div", { className: "frac-card-payment-page frac-form", children: /* @__PURE__ */ jsxs11("div", { className: "parent-pay-container", children: [
4323
4360
  /* @__PURE__ */ jsx19("span", { className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs11("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
4324
4361
  /* @__PURE__ */ jsx19("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx19("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" }) }),
@@ -4343,17 +4380,38 @@ function GetPaymentPage(props) {
4343
4380
  (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && /* @__PURE__ */ jsx19(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab }),
4344
4381
  (props == null ? void 0 : props.isReader) && (paymentData == null ? void 0 : paymentData.paymentDeviceList) && ((_c = paymentData == null ? void 0 : paymentData.paymentDeviceList) == null ? void 0 : _c.length) > 0 && /* @__PURE__ */ jsx19(CardBankRadio, { label: "Reader", amount: (_d = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _d.toFixed(2), value: "reader", onChange: handletabchange, activetab })
4345
4382
  ] }),
4346
- !loading && /* @__PURE__ */ jsxs11("div", { className: "", children: [
4383
+ !loading && (activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs11("div", { className: "frac-cash-discount-fee", children: [
4384
+ /* @__PURE__ */ jsx19("small", { children: (paymentData == null ? void 0 : paymentData.surchargeProgram) == 1 ? "Surcharge" : (paymentData == null ? void 0 : paymentData.showSurcharge) ? "3% Card Fee" : "Cash Discount" }),
4385
+ /* @__PURE__ */ jsx19("p", { children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) })
4386
+ ] }),
4387
+ !loading && activetab === "ach" && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs11("div", { className: "frac-cash-discount-fee", children: [
4388
+ /* @__PURE__ */ jsx19("small", { children: (paymentData == null ? void 0 : paymentData.surchargeProgram) == 1 ? "Savings" : "Cash Discount Savings" }),
4389
+ /* @__PURE__ */ jsx19("p", { children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) })
4390
+ ] }),
4391
+ !loading && (props == null ? void 0 : props.pass_fee) && /* @__PURE__ */ jsxs11("div", { className: "", children: [
4347
4392
  activetab == "ach" && bankFeeAmount > 0 && /* @__PURE__ */ jsxs11("small", { className: "frac-fee-text", children: [
4348
4393
  "There is a processing fee of ",
4349
4394
  /* @__PURE__ */ jsx19("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
4350
4395
  "."
4351
4396
  ] }),
4352
- (activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs11("small", { className: "frac-fee-text", children: [
4353
- "Cards include a fee amount of ",
4354
- /* @__PURE__ */ jsx19("span", { className: "frac-fee-amount", children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) }),
4355
- "."
4356
- ] })
4397
+ (activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs11(
4398
+ "div",
4399
+ {
4400
+ id: "surcharge-program-notice",
4401
+ className: "surcharge-program-notice-text",
4402
+ children: [
4403
+ "A 3% processing surcharge is applied to all credit card transactions. Debit card payments are processed for",
4404
+ " ",
4405
+ /* @__PURE__ */ jsxs11("span", { className: "surcharge-program-notice-text-att", children: [
4406
+ "$",
4407
+ Number(cashDiscount).toLocaleString("en-US", {
4408
+ minimumFractionDigits: 2,
4409
+ maximumFractionDigits: 2
4410
+ })
4411
+ ] })
4412
+ ]
4413
+ }
4414
+ )
4357
4415
  ] })
4358
4416
  ] })
4359
4417
  ] }),
@@ -7566,6 +7624,7 @@ function PartialPayment(props) {
7566
7624
  const [errorBankConsent, setErrorBankConsent] = useState8("");
7567
7625
  const [saveACHConsent1, setSaveACHConsent1] = useState8(false);
7568
7626
  const [errorBankConsentOther, setErrorBankConsentOther] = useState8("");
7627
+ const [loaderText, setLoderText] = useState8("");
7569
7628
  const tokenizerRef = useRef8(null);
7570
7629
  const fractalStyles = {
7571
7630
  input: {
@@ -7681,6 +7740,7 @@ function PartialPayment(props) {
7681
7740
  setErrorBankConsent("");
7682
7741
  setSaveACHConsent1(false);
7683
7742
  setErrorBankConsentOther("");
7743
+ setLoderText("");
7684
7744
  };
7685
7745
  const handleShow = () => setShow(true);
7686
7746
  const handletabchange = (id) => {
@@ -7791,7 +7851,7 @@ function PartialPayment(props) {
7791
7851
  return Object.keys(errors).length > 0;
7792
7852
  };
7793
7853
  const submitFunc = async (e) => {
7794
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
7854
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2;
7795
7855
  e.preventDefault();
7796
7856
  const el = document.activeElement;
7797
7857
  if (el instanceof HTMLElement) {
@@ -7866,15 +7926,20 @@ function PartialPayment(props) {
7866
7926
  public_key_pem: ((_b2 = (_a2 = sesionResult == null ? void 0 : sesionResult.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.publicKeyPem) || ((_d2 = (_c2 = sesionResult == null ? void 0 : sesionResult.data) == null ? void 0 : _c2.data) == null ? void 0 : _d2.public_key_pem),
7867
7927
  session_key: (_f2 = (_e2 = sesionResult == null ? void 0 : sesionResult.data) == null ? void 0 : _e2.data) == null ? void 0 : _f2.session_key
7868
7928
  });
7929
+ const card_issue_type = ((_g2 = tokenizeData == null ? void 0 : tokenizeData.bin_lookup_result) == null ? void 0 : _g2.card_issue_type) || null;
7930
+ if (card_issue_type === "Debit") {
7931
+ setLoderText("Processing Debit card without fee");
7932
+ }
7869
7933
  const reqData = JSON.stringify(__spreadProps(__spreadValues({}, tokenizeData), {
7870
7934
  isSaveCardChecked: saveCardInfo,
7871
7935
  name: cardData == null ? void 0 : cardData.cardName,
7872
7936
  postal_code: cardData == null ? void 0 : cardData.zipCode,
7873
7937
  customer_id: props == null ? void 0 : props.customerId,
7874
- partial_amount: partialAmount && !partialError ? partialAmount : aftertaxAmount
7938
+ partial_amount: partialAmount && !partialError ? partialAmount : aftertaxAmount,
7939
+ card_issue_type
7875
7940
  }));
7876
7941
  const reqData2 = JSON.stringify({
7877
- "pre_sales_id": `${(_g2 = paymentData == null ? void 0 : paymentData.orderDetails) == null ? void 0 : _g2.orderId}`,
7942
+ "pre_sales_id": `${(_h2 = paymentData == null ? void 0 : paymentData.orderDetails) == null ? void 0 : _h2.orderId}`,
7878
7943
  "token": `${tokenizeData == null ? void 0 : tokenizeData.token}`,
7879
7944
  "json_response": `${reqData}`
7880
7945
  });
@@ -7907,11 +7972,11 @@ function PartialPayment(props) {
7907
7972
  });
7908
7973
  } catch (err) {
7909
7974
  setLoading2(false);
7910
- setError(((_i2 = (_h2 = err == null ? void 0 : err.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
7975
+ setError(((_j2 = (_i2 = err == null ? void 0 : err.response) == null ? void 0 : _i2.data) == null ? void 0 : _j2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
7911
7976
  }
7912
7977
  } catch (err) {
7913
7978
  setLoading2(false);
7914
- setError(((_k2 = (_j2 = err == null ? void 0 : err.response) == null ? void 0 : _j2.data) == null ? void 0 : _k2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
7979
+ setError(((_l2 = (_k2 = err == null ? void 0 : err.response) == null ? void 0 : _k2.data) == null ? void 0 : _l2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
7915
7980
  }
7916
7981
  } else {
7917
7982
  try {
@@ -7928,7 +7993,7 @@ function PartialPayment(props) {
7928
7993
  }
7929
7994
  } catch (err) {
7930
7995
  setLoading2(false);
7931
- setError(((_m2 = (_l2 = err == null ? void 0 : err.response) == null ? void 0 : _l2.data) == null ? void 0 : _m2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
7996
+ setError(((_n2 = (_m2 = err == null ? void 0 : err.response) == null ? void 0 : _m2.data) == null ? void 0 : _n2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
7932
7997
  }
7933
7998
  }
7934
7999
  }
@@ -8295,7 +8360,7 @@ function PartialPayment(props) {
8295
8360
  } }) }),
8296
8361
  success && /* @__PURE__ */ jsx28(SuccessMsz, { onClose: handleClose, tranId }),
8297
8362
  !error && !success && !errorIframe && /* @__PURE__ */ jsxs17(Fragment17, { children: [
8298
- (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx28(Loader_default, { loading: loading || loading2 || loadingIframe }),
8363
+ (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx28(Loader_default, { loading: loading || loading2 || loadingIframe, loaderText }),
8299
8364
  /* @__PURE__ */ jsx28("div", { className: "frac-card-payment-page frac-form", children: /* @__PURE__ */ jsxs17("div", { className: "parent-pay-container", children: [
8300
8365
  /* @__PURE__ */ jsx28("span", { className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs17("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
8301
8366
  /* @__PURE__ */ jsx28("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx28("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" }) }),
@@ -8316,19 +8381,28 @@ function PartialPayment(props) {
8316
8381
  /* @__PURE__ */ jsxs17("div", { className: "amt-pay-con", children: [
8317
8382
  /* @__PURE__ */ jsx28("div", { className: "pay-amount-conatiner", children: /* @__PURE__ */ jsx28("small", { className: "pay-payment-amount", children: "Select payment type" }) }),
8318
8383
  /* @__PURE__ */ jsx28("div", { className: "frac-card-bank-radio-main", children: /* @__PURE__ */ jsx28(CardBankRadio, { label: "Card", amount: (_a = Number(aftertaxAmount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }) }),
8319
- numberToBoolean(paymentData == null ? void 0 : paymentData.showSurcharge) ? cashDiscount && cashDiscount > 0 && (props == null ? void 0 : props.pass_fee) ? /* @__PURE__ */ jsxs17("div", { className: "frac-cash-discount-fee", children: [
8320
- /* @__PURE__ */ jsxs17("small", { children: [
8321
- activetab === "card" ? "Cash Discount" : "Cash Discount Savings",
8322
- " "
8323
- ] }),
8324
- /* @__PURE__ */ jsx28("p", { children: formatUSD((Number(aftertaxAmount) - cashDiscount).toFixed(2)) })
8325
- ] }) : null : cashDiscount && cashDiscount > 0 && (props == null ? void 0 : props.pass_fee) && activetab === "card" ? /* @__PURE__ */ jsxs17("div", { className: "frac-cash-discount-fee", children: [
8326
- /* @__PURE__ */ jsxs17("small", { children: [
8327
- activetab === "card" ? "Surcharge" : null,
8328
- " "
8329
- ] }),
8330
- /* @__PURE__ */ jsx28("p", { children: formatUSD((Number(aftertaxAmount) - cashDiscount).toFixed(2)) })
8331
- ] }) : null,
8384
+ !loading && (activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs17("div", { className: "frac-cash-discount-fee", children: [
8385
+ /* @__PURE__ */ jsx28("small", { children: (paymentData == null ? void 0 : paymentData.surchargeProgram) == 1 ? "Surcharge" : (paymentData == null ? void 0 : paymentData.showSurcharge) ? "3% Card Fee" : "Cash Discount" }),
8386
+ /* @__PURE__ */ jsx28("p", { children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) })
8387
+ ] }),
8388
+ !loading && (props == null ? void 0 : props.pass_fee) && /* @__PURE__ */ jsx28("div", { className: "", children: (activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs17(
8389
+ "div",
8390
+ {
8391
+ id: "surcharge-program-notice",
8392
+ className: "surcharge-program-notice-text",
8393
+ children: [
8394
+ "A 3% processing surcharge is applied to all credit card transactions. Debit card payments are processed for",
8395
+ " ",
8396
+ /* @__PURE__ */ jsxs17("span", { className: "surcharge-program-notice-text-att", children: [
8397
+ "$",
8398
+ Number(cashDiscount).toLocaleString("en-US", {
8399
+ minimumFractionDigits: 2,
8400
+ maximumFractionDigits: 2
8401
+ })
8402
+ ] })
8403
+ ]
8404
+ }
8405
+ ) }),
8332
8406
  (props == null ? void 0 : props.allowPartial) && /* @__PURE__ */ jsxs17("div", { className: "frac-partial-payment-input", children: [
8333
8407
  /* @__PURE__ */ jsx28("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
8334
8408
  /* @__PURE__ */ jsx28(