@fractalpay/fractalpay-next-test 0.0.37 → 0.0.38

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.d.ts CHANGED
@@ -134,8 +134,9 @@ type Props$1 = {
134
134
  isPartial?: boolean;
135
135
  partialRef?: string;
136
136
  customCSS?: string;
137
+ disableSubmitBtn?: boolean;
137
138
  };
138
- declare const PaymentWidget: ({ amount, bankAmount, submitBtnText, session_token, customerId, callback, merchantName, isPreAuth, surcharge, submitBtnClass, submitBtnIcon, isRequest, pass_fee, pass_fee_amount, require3ds, autoTrigger, isPartial, bankSurcharge, partialRef, customCSS }: Props$1) => React.JSX.Element;
139
+ declare const PaymentWidget: ({ amount, bankAmount, submitBtnText, session_token, customerId, callback, merchantName, isPreAuth, surcharge, submitBtnClass, submitBtnIcon, isRequest, pass_fee, pass_fee_amount, require3ds, autoTrigger, isPartial, bankSurcharge, partialRef, customCSS, disableSubmitBtn }: Props$1) => React.JSX.Element;
139
140
 
140
141
  type Props = {
141
142
  session_token: string;
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-test",
42
- version: "0.0.37",
42
+ version: "0.0.38",
43
43
  private: false,
44
44
  type: "module",
45
45
  scripts: {
@@ -3573,6 +3573,8 @@ function GetPaymentPage(props) {
3573
3573
  const [saveACHinfo, setSaveACHinfo] = useState4(false);
3574
3574
  const [isBankConsentChecked, setIsBankConsentChecked] = useState4(false);
3575
3575
  const [errorBankConsent, setErrorBankConsent] = useState4("");
3576
+ const [saveACHConsent1, setSaveACHConsent1] = useState4(false);
3577
+ const [errorBankConsentOther, setErrorBankConsentOther] = useState4("");
3576
3578
  const fractalpayClientKey = props.merchantPublicKey;
3577
3579
  let mastercard2 = S3Url + "widget/mc-img.svg";
3578
3580
  let visa2 = S3Url + "widget/visa-img.svg";
@@ -3694,6 +3696,8 @@ function GetPaymentPage(props) {
3694
3696
  setCardList([]);
3695
3697
  setIsBankConsentChecked(false);
3696
3698
  setErrorBankConsent("");
3699
+ setSaveACHConsent1(false);
3700
+ setErrorBankConsentOther("");
3697
3701
  };
3698
3702
  const handleShow = () => setShow(true);
3699
3703
  const handletabchange = (id) => {
@@ -3793,11 +3797,14 @@ function GetPaymentPage(props) {
3793
3797
  errors.companyName = "Company Name is required for business accounts";
3794
3798
  }
3795
3799
  }
3796
- if (!isBankConsentChecked) {
3800
+ if (!saveACHinfo && !isBankConsentChecked) {
3797
3801
  setErrorBankConsent("Above consent is required");
3798
3802
  }
3803
+ if (saveACHinfo && !saveACHConsent1) {
3804
+ setErrorBankConsentOther("Your consent is required to save your bank details for future use");
3805
+ }
3799
3806
  setAchError(errors);
3800
- return Object.keys(errors).length > 0 || !isBankConsentChecked;
3807
+ return Object.keys(errors).length > 0;
3801
3808
  };
3802
3809
  const submitFunc = async (e) => {
3803
3810
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
@@ -3956,7 +3963,13 @@ function GetPaymentPage(props) {
3956
3963
  }
3957
3964
  }
3958
3965
  } else {
3959
- const hasError = validateAchData();
3966
+ let hasError = validateAchData();
3967
+ if (saveACHinfo && !saveACHConsent1) {
3968
+ hasError = true;
3969
+ }
3970
+ if (!saveACHinfo && !isBankConsentChecked) {
3971
+ hasError = true;
3972
+ }
3960
3973
  if (hasError) return;
3961
3974
  else {
3962
3975
  setLoading2(true);
@@ -4720,25 +4733,44 @@ function GetPaymentPage(props) {
4720
4733
  accountTypes.map((type) => /* @__PURE__ */ jsx19("option", { value: type.value, children: type.label }, type.value))
4721
4734
  ] })
4722
4735
  ] }),
4723
- /* @__PURE__ */ jsxs11("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
4724
- /* @__PURE__ */ jsx19("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
4725
- setIsBankConsentChecked(e.target.checked);
4726
- if (e.target.checked) {
4727
- setErrorBankConsent("");
4728
- }
4729
- } }),
4730
- /* @__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.` })
4736
+ !saveACHinfo && /* @__PURE__ */ jsxs11(Fragment11, { children: [
4737
+ /* @__PURE__ */ jsxs11("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
4738
+ /* @__PURE__ */ jsx19("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
4739
+ setIsBankConsentChecked(e.target.checked);
4740
+ if (e.target.checked) {
4741
+ setErrorBankConsent("");
4742
+ }
4743
+ } }),
4744
+ /* @__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.` })
4745
+ ] }),
4746
+ errorBankConsent && /* @__PURE__ */ jsx19("span", { className: "error-span", children: errorBankConsent })
4731
4747
  ] }),
4732
- errorBankConsent && /* @__PURE__ */ jsx19("span", { className: "error-span", children: errorBankConsent }),
4733
4748
  (props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsxs11("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
4734
- /* @__PURE__ */ jsx19("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
4735
- /* @__PURE__ */ jsx19("label", { htmlFor: "saveACH", children: "Save Bank" })
4749
+ /* @__PURE__ */ jsx19("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
4750
+ setSaveACHinfo(e.target.checked);
4751
+ if (!e.target.checked) {
4752
+ setSaveACHConsent1(false);
4753
+ setErrorBankConsentOther("");
4754
+ }
4755
+ } }),
4756
+ /* @__PURE__ */ jsx19("label", { htmlFor: "saveACH", children: "Save for future use" })
4736
4757
  ] }),
4737
- saveACHinfo && /* @__PURE__ */ jsx19("div", { className: "form-group mb-4", style: { fontSize: "12px", color: "#727272" }, children: /* @__PURE__ */ jsxs11("p", { children: [
4738
- "If checked, I agree for ",
4739
- /* @__PURE__ */ jsx19("b", { children: (paymentData == null ? void 0 : paymentData.bname) || "merchant" }),
4740
- " to have my permission to charge this bank account for agreed upon purchases in the future."
4741
- ] }) })
4758
+ saveACHinfo && /* @__PURE__ */ jsxs11(Fragment11, { children: [
4759
+ /* @__PURE__ */ jsxs11("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
4760
+ /* @__PURE__ */ jsx19("input", { type: "checkbox", id: "saveACHConsent1", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHConsent1, onChange: (e) => {
4761
+ setSaveACHConsent1(e.target.checked);
4762
+ if (e.target.checked) {
4763
+ setErrorBankConsentOther("");
4764
+ }
4765
+ } }),
4766
+ /* @__PURE__ */ jsxs11("label", { className: "saveachlabel", htmlFor: "saveACHConsent1", children: [
4767
+ "By providing my bank account information and selecting \u2018Save for future payments\u2019, I authorize ",
4768
+ (paymentData == null ? void 0 : paymentData.bname) || "merchant",
4769
+ " to store my bank account details for future ACH payments. I understand that future payments may be initiated using this saved account in accordance with my instructions. I confirm I am authorized to use this bank account."
4770
+ ] })
4771
+ ] }),
4772
+ errorBankConsentOther && /* @__PURE__ */ jsx19("span", { className: "error-span", children: errorBankConsentOther })
4773
+ ] })
4742
4774
  ] }),
4743
4775
  /* @__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)) }) })
4744
4776
  ] })
@@ -7498,6 +7530,8 @@ function PartialPayment(props) {
7498
7530
  const [partialError, setPartialError] = useState8("");
7499
7531
  const [isBankConsentChecked, setIsBankConsentChecked] = useState8(false);
7500
7532
  const [errorBankConsent, setErrorBankConsent] = useState8("");
7533
+ const [saveACHConsent1, setSaveACHConsent1] = useState8(false);
7534
+ const [errorBankConsentOther, setErrorBankConsentOther] = useState8("");
7501
7535
  const tokenizerRef = useRef8(null);
7502
7536
  const fractalStyles = {
7503
7537
  input: {
@@ -7611,6 +7645,8 @@ function PartialPayment(props) {
7611
7645
  setPartialError("");
7612
7646
  setIsBankConsentChecked(false);
7613
7647
  setErrorBankConsent("");
7648
+ setSaveACHConsent1(false);
7649
+ setErrorBankConsentOther("");
7614
7650
  };
7615
7651
  const handleShow = () => setShow(true);
7616
7652
  const handletabchange = (id) => {
@@ -7711,11 +7747,14 @@ function PartialPayment(props) {
7711
7747
  errors.companyName = "Company Name is required for business accounts";
7712
7748
  }
7713
7749
  }
7714
- if (!isBankConsentChecked) {
7750
+ if (!saveACHinfo && !isBankConsentChecked) {
7715
7751
  setErrorBankConsent("Above consent is required");
7716
7752
  }
7753
+ if (saveACHinfo && !saveACHConsent1) {
7754
+ setErrorBankConsentOther("Your consent is required to save your bank details for future use");
7755
+ }
7717
7756
  setAchError(errors);
7718
- return Object.keys(errors).length > 0 || !isBankConsentChecked;
7757
+ return Object.keys(errors).length > 0;
7719
7758
  };
7720
7759
  const submitFunc = async (e) => {
7721
7760
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
@@ -7860,7 +7899,13 @@ function PartialPayment(props) {
7860
7899
  }
7861
7900
  }
7862
7901
  } else {
7863
- const hasError = validateAchData();
7902
+ let hasError = validateAchData();
7903
+ if (saveACHinfo && !saveACHConsent1) {
7904
+ hasError = true;
7905
+ }
7906
+ if (!saveACHinfo && !isBankConsentChecked) {
7907
+ hasError = true;
7908
+ }
7864
7909
  if (hasError) return;
7865
7910
  else {
7866
7911
  setLoading2(true);
@@ -8662,34 +8707,47 @@ function PartialPayment(props) {
8662
8707
  accountTypes.map((type) => /* @__PURE__ */ jsx28("option", { value: type.value, children: type.label }, type.value))
8663
8708
  ] })
8664
8709
  ] }),
8665
- /* @__PURE__ */ jsxs17("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
8666
- /* @__PURE__ */ jsx28(
8667
- "input",
8668
- {
8669
- type: "checkbox",
8670
- id: "achconsent",
8671
- className: "",
8672
- checked: isBankConsentChecked,
8673
- onChange: (e) => {
8674
- setIsBankConsentChecked(e.target.checked);
8675
- if (e.target.checked) {
8676
- setErrorBankConsent("");
8710
+ !saveACHinfo && /* @__PURE__ */ jsxs17(Fragment17, { children: [
8711
+ /* @__PURE__ */ jsxs17("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
8712
+ /* @__PURE__ */ jsx28(
8713
+ "input",
8714
+ {
8715
+ type: "checkbox",
8716
+ id: "achconsent",
8717
+ className: "",
8718
+ checked: isBankConsentChecked,
8719
+ onChange: (e) => {
8720
+ setIsBankConsentChecked(e.target.checked);
8721
+ if (e.target.checked) {
8722
+ setErrorBankConsent("");
8723
+ }
8677
8724
  }
8678
8725
  }
8679
- }
8680
- ),
8681
- /* @__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.` })
8726
+ ),
8727
+ /* @__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.` })
8728
+ ] }),
8729
+ errorBankConsent && /* @__PURE__ */ jsx28("span", { className: "error-span", children: errorBankConsent })
8682
8730
  ] }),
8683
- errorBankConsent && /* @__PURE__ */ jsx28("span", { className: "error-span", children: errorBankConsent }),
8684
8731
  (props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsxs17("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
8685
8732
  /* @__PURE__ */ jsx28("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
8686
- /* @__PURE__ */ jsx28("label", { htmlFor: "saveACH", children: "Save Bank" })
8733
+ /* @__PURE__ */ jsx28("label", { htmlFor: "saveACH", children: "Save for future use" })
8687
8734
  ] }),
8688
- saveACHinfo && /* @__PURE__ */ jsx28("div", { className: "form-group mb-4", style: { fontSize: "12px", color: "#727272" }, children: /* @__PURE__ */ jsxs17("p", { children: [
8689
- "If checked, I agree for ",
8690
- /* @__PURE__ */ jsx28("b", { children: (paymentData == null ? void 0 : paymentData.bname) || "merchant" }),
8691
- " to have my permission to charge this bank account for agreed upon purchases in the future."
8692
- ] }) })
8735
+ saveACHinfo && /* @__PURE__ */ jsxs17(Fragment17, { children: [
8736
+ /* @__PURE__ */ jsxs17("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
8737
+ /* @__PURE__ */ jsx28("input", { type: "checkbox", id: "saveACHConsent1", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHConsent1, onChange: (e) => {
8738
+ setSaveACHConsent1(e.target.checked);
8739
+ if (e.target.checked) {
8740
+ setErrorBankConsentOther("");
8741
+ }
8742
+ } }),
8743
+ /* @__PURE__ */ jsxs17("label", { className: "saveachlabel", htmlFor: "saveACHConsent1", children: [
8744
+ "By providing my bank account information and selecting \u2018Save for future payments\u2019, I authorize ",
8745
+ (paymentData == null ? void 0 : paymentData.bname) || "merchant",
8746
+ " to store my bank account details for future ACH payments. I understand that future payments may be initiated using this saved account in accordance with my instructions. I confirm I am authorized to use this bank account."
8747
+ ] })
8748
+ ] }),
8749
+ errorBankConsentOther && /* @__PURE__ */ jsx28("span", { className: "error-span", children: errorBankConsentOther })
8750
+ ] })
8693
8751
  ] }),
8694
8752
  /* @__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)) }) })
8695
8753
  ] })
@@ -10187,6 +10245,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10187
10245
  const [achData, setAchData] = useState11();
10188
10246
  const [achError, setAchError] = useState11({});
10189
10247
  const [saveACHinfo, setSaveACHinfo] = useState11(false);
10248
+ const [saveACHConsent1, setSaveACHConsent1] = useState11(false);
10190
10249
  const [saveCardInfo, setSaveCardInfo] = useState11(false);
10191
10250
  const [error, setError] = useState11("");
10192
10251
  const [errorIframe, setErrorIframe] = useState11("");
@@ -10217,6 +10276,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10217
10276
  const [dcToken, setDCToken] = useState11();
10218
10277
  const [isBankConsentChecked, setIsBankConsentChecked] = useState11(false);
10219
10278
  const [errorBankConsent, setErrorBankConsent] = useState11("");
10279
+ const [errorBankConsentOther, setErrorBankConsentOther] = useState11("");
10220
10280
  let mastercard2 = S3Url + "widget/mc-img.svg";
10221
10281
  let visa2 = S3Url + "widget/visa-img.svg";
10222
10282
  let americanexp2 = S3Url + "widget/ae-img.svg";
@@ -10410,11 +10470,14 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10410
10470
  errors.companyName = "Company Name is required for business accounts";
10411
10471
  }
10412
10472
  }
10413
- if (!isBankConsentChecked) {
10473
+ if (!saveACHinfo && !isBankConsentChecked) {
10414
10474
  setErrorBankConsent("Above consent is required");
10415
10475
  }
10476
+ if (saveACHinfo && !saveACHConsent1) {
10477
+ setErrorBankConsentOther("Your consent is required to save your bank details for future use");
10478
+ }
10416
10479
  setAchError(errors);
10417
- return Object.keys(errors).length > 0 || !isBankConsentChecked;
10480
+ return Object.keys(errors).length > 0;
10418
10481
  };
10419
10482
  const completeFractalFlow = async (tokenizeData, intentid, typeoftoken) => {
10420
10483
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
@@ -10597,7 +10660,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10597
10660
  let isValid = true;
10598
10661
  if (!isValid) return;
10599
10662
  } else {
10600
- const hasError = validateAchData();
10663
+ let hasError = validateAchData();
10664
+ if (saveACHinfo && !saveACHConsent1) {
10665
+ hasError = true;
10666
+ }
10667
+ if (!saveACHinfo && !isBankConsentChecked) {
10668
+ hasError = true;
10669
+ }
10601
10670
  if (hasError) return;
10602
10671
  }
10603
10672
  try {
@@ -10828,6 +10897,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10828
10897
  setRemainingAmount("");
10829
10898
  setIsBankConsentChecked(false);
10830
10899
  setErrorBankConsent("");
10900
+ setSaveACHConsent1(false);
10901
+ setErrorBankConsentOther("");
10831
10902
  };
10832
10903
  const getCardList = async () => {
10833
10904
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
@@ -11711,25 +11782,44 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11711
11782
  /* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
11712
11783
  "."
11713
11784
  ] }),
11714
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11715
- /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
11716
- setIsBankConsentChecked(e.target.checked);
11717
- if (e.target.checked) {
11718
- setErrorBankConsent("");
11719
- }
11720
- } }),
11721
- /* @__PURE__ */ jsx36("label", { className: "saveachlabel", htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${merchantName || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
11785
+ !saveACHinfo && /* @__PURE__ */ jsxs21(Fragment20, { children: [
11786
+ /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11787
+ /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
11788
+ setIsBankConsentChecked(e.target.checked);
11789
+ if (e.target.checked) {
11790
+ setErrorBankConsent("");
11791
+ }
11792
+ } }),
11793
+ /* @__PURE__ */ jsx36("label", { className: "saveachlabel", htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${merchantName || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
11794
+ ] }),
11795
+ errorBankConsent && /* @__PURE__ */ jsx36("span", { className: "error-span", children: errorBankConsent })
11722
11796
  ] }),
11723
- errorBankConsent && /* @__PURE__ */ jsx36("span", { className: "error-span", children: errorBankConsent }),
11724
11797
  customerId && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11725
- /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
11726
- /* @__PURE__ */ jsx36("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
11798
+ /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
11799
+ setSaveACHinfo(e.target.checked);
11800
+ if (!e.target.checked) {
11801
+ setSaveACHConsent1(false);
11802
+ setErrorBankConsentOther("");
11803
+ }
11804
+ } }),
11805
+ /* @__PURE__ */ jsx36("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save for future use" })
11727
11806
  ] }),
11728
- saveACHinfo && /* @__PURE__ */ jsx36("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs21("p", { children: [
11729
- "If checked, I agree to give the ",
11730
- /* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
11731
- " permission to charge this bank account for agreed-upon purchases in the future."
11732
- ] }) })
11807
+ saveACHinfo && /* @__PURE__ */ jsxs21(Fragment20, { children: [
11808
+ /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11809
+ /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "saveACHConsent1", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHConsent1, onChange: (e) => {
11810
+ setSaveACHConsent1(e.target.checked);
11811
+ if (e.target.checked) {
11812
+ setErrorBankConsentOther("");
11813
+ }
11814
+ } }),
11815
+ /* @__PURE__ */ jsxs21("label", { className: "saveachlabel", htmlFor: "saveACHConsent1", children: [
11816
+ "By providing my bank account information and selecting \u2018Save for future payments\u2019, I authorize ",
11817
+ merchantName || "merchant",
11818
+ " to store my bank account details for future ACH payments. I understand that future payments may be initiated using this saved account in accordance with my instructions. I confirm I am authorized to use this bank account."
11819
+ ] })
11820
+ ] }),
11821
+ errorBankConsentOther && /* @__PURE__ */ jsx36("span", { className: "error-span", children: errorBankConsentOther })
11822
+ ] })
11733
11823
  ] })
11734
11824
  ] }),
11735
11825
  /* @__PURE__ */ jsx36("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx36("button", { className: "pay-button", style: { margin: "20px 0 0", display: onSubmit ? "none" : "block" }, type: "submit", children: formatUSD((_u = Number(bankAmount)) == null ? void 0 : _u.toFixed(2)) }) })
@@ -11768,7 +11858,8 @@ var PaymentWidget = ({
11768
11858
  isPartial,
11769
11859
  bankSurcharge,
11770
11860
  partialRef,
11771
- customCSS: customCSS2
11861
+ customCSS: customCSS2,
11862
+ disableSubmitBtn = false
11772
11863
  }) => {
11773
11864
  const [show, setShow] = useState12(autoTrigger || false);
11774
11865
  const [loading, setLoading] = useState12(false);
@@ -11799,7 +11890,8 @@ var PaymentWidget = ({
11799
11890
  isPartial,
11800
11891
  bankSurcharge,
11801
11892
  partialRef,
11802
- customCSS: customCSS2
11893
+ customCSS: customCSS2,
11894
+ disableSubmitBtn
11803
11895
  }),
11804
11896
  [
11805
11897
  amount,
@@ -11820,7 +11912,8 @@ var PaymentWidget = ({
11820
11912
  autoTrigger,
11821
11913
  isPartial,
11822
11914
  bankSurcharge,
11823
- partialRef
11915
+ partialRef,
11916
+ disableSubmitBtn
11824
11917
  ]
11825
11918
  );
11826
11919
  const [commonProps, setCommonProps] = useState12(initialCommonProps);
@@ -11868,7 +11961,7 @@ var PaymentWidget = ({
11868
11961
  /* @__PURE__ */ jsx37(CardBankRadioStyles, {}),
11869
11962
  /* @__PURE__ */ jsx37(CustomModal2styles_default, {}),
11870
11963
  /* @__PURE__ */ jsx37(DataCapScriptLoader, {}),
11871
- !autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
11964
+ !autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", disabled: disableSubmitBtn, onClick: () => setShow(true), children: [
11872
11965
  submitBtnText,
11873
11966
  submitBtnIcon
11874
11967
  ] }),