@fractalpay/fractalpay-next-dev 0.0.268 → 0.0.269

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.268",
42
+ version: "0.0.269",
43
43
  private: false,
44
44
  type: "module",
45
45
  scripts: {
@@ -3797,14 +3797,14 @@ function GetPaymentPage(props) {
3797
3797
  errors.companyName = "Company Name is required for business accounts";
3798
3798
  }
3799
3799
  }
3800
- if (!isBankConsentChecked) {
3800
+ if (!saveACHinfo && !isBankConsentChecked) {
3801
3801
  setErrorBankConsent("Above consent is required");
3802
3802
  }
3803
3803
  if (saveACHinfo && !saveACHConsent1) {
3804
3804
  setErrorBankConsentOther("Your consent is required to save your bank details for future use");
3805
3805
  }
3806
3806
  setAchError(errors);
3807
- return Object.keys(errors).length > 0 || !isBankConsentChecked;
3807
+ return Object.keys(errors).length > 0;
3808
3808
  };
3809
3809
  const submitFunc = async (e) => {
3810
3810
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
@@ -3967,7 +3967,7 @@ function GetPaymentPage(props) {
3967
3967
  if (saveACHinfo && !saveACHConsent1) {
3968
3968
  hasError = true;
3969
3969
  }
3970
- if (!isBankConsentChecked) {
3970
+ if (!saveACHinfo && !isBankConsentChecked) {
3971
3971
  hasError = true;
3972
3972
  }
3973
3973
  if (hasError) return;
@@ -4733,16 +4733,18 @@ function GetPaymentPage(props) {
4733
4733
  accountTypes.map((type) => /* @__PURE__ */ jsx19("option", { value: type.value, children: type.label }, type.value))
4734
4734
  ] })
4735
4735
  ] }),
4736
- /* @__PURE__ */ jsxs11("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
4737
- /* @__PURE__ */ jsx19("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
4738
- setIsBankConsentChecked(e.target.checked);
4739
- if (e.target.checked) {
4740
- setErrorBankConsent("");
4741
- }
4742
- } }),
4743
- /* @__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 })
4744
4747
  ] }),
4745
- errorBankConsent && /* @__PURE__ */ jsx19("span", { className: "error-span", children: errorBankConsent }),
4746
4748
  (props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsxs11("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
4747
4749
  /* @__PURE__ */ jsx19("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
4748
4750
  setSaveACHinfo(e.target.checked);
@@ -7745,17 +7747,14 @@ function PartialPayment(props) {
7745
7747
  errors.companyName = "Company Name is required for business accounts";
7746
7748
  }
7747
7749
  }
7748
- if (!isBankConsentChecked) {
7749
- setErrorBankConsent("Above consent is required");
7750
- }
7751
- if (!isBankConsentChecked) {
7750
+ if (!saveACHinfo && !isBankConsentChecked) {
7752
7751
  setErrorBankConsent("Above consent is required");
7753
7752
  }
7754
7753
  if (saveACHinfo && !saveACHConsent1) {
7755
7754
  setErrorBankConsentOther("Your consent is required to save your bank details for future use");
7756
7755
  }
7757
7756
  setAchError(errors);
7758
- return Object.keys(errors).length > 0 || !isBankConsentChecked;
7757
+ return Object.keys(errors).length > 0;
7759
7758
  };
7760
7759
  const submitFunc = async (e) => {
7761
7760
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
@@ -7904,7 +7903,7 @@ function PartialPayment(props) {
7904
7903
  if (saveACHinfo && !saveACHConsent1) {
7905
7904
  hasError = true;
7906
7905
  }
7907
- if (!isBankConsentChecked) {
7906
+ if (!saveACHinfo && !isBankConsentChecked) {
7908
7907
  hasError = true;
7909
7908
  }
7910
7909
  if (hasError) return;
@@ -8708,25 +8707,27 @@ function PartialPayment(props) {
8708
8707
  accountTypes.map((type) => /* @__PURE__ */ jsx28("option", { value: type.value, children: type.label }, type.value))
8709
8708
  ] })
8710
8709
  ] }),
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("");
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
+ }
8723
8724
  }
8724
8725
  }
8725
- }
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.` })
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 })
8728
8730
  ] }),
8729
- errorBankConsent && /* @__PURE__ */ jsx28("span", { className: "error-span", children: errorBankConsent }),
8730
8731
  (props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsxs17("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
8731
8732
  /* @__PURE__ */ jsx28("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
8732
8733
  /* @__PURE__ */ jsx28("label", { htmlFor: "saveACH", children: "Save for future use" })
@@ -10469,14 +10470,14 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10469
10470
  errors.companyName = "Company Name is required for business accounts";
10470
10471
  }
10471
10472
  }
10472
- if (!isBankConsentChecked) {
10473
+ if (!saveACHinfo && !isBankConsentChecked) {
10473
10474
  setErrorBankConsent("Above consent is required");
10474
10475
  }
10475
10476
  if (saveACHinfo && !saveACHConsent1) {
10476
10477
  setErrorBankConsentOther("Your consent is required to save your bank details for future use");
10477
10478
  }
10478
10479
  setAchError(errors);
10479
- return Object.keys(errors).length > 0 || !isBankConsentChecked;
10480
+ return Object.keys(errors).length > 0;
10480
10481
  };
10481
10482
  const completeFractalFlow = async (tokenizeData, intentid, typeoftoken) => {
10482
10483
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
@@ -10663,7 +10664,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10663
10664
  if (saveACHinfo && !saveACHConsent1) {
10664
10665
  hasError = true;
10665
10666
  }
10666
- if (!isBankConsentChecked) {
10667
+ if (!saveACHinfo && !isBankConsentChecked) {
10667
10668
  hasError = true;
10668
10669
  }
10669
10670
  if (hasError) return;
@@ -11781,16 +11782,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11781
11782
  /* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
11782
11783
  "."
11783
11784
  ] }),
11784
- /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11785
- /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
11786
- setIsBankConsentChecked(e.target.checked);
11787
- if (e.target.checked) {
11788
- setErrorBankConsent("");
11789
- }
11790
- } }),
11791
- /* @__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 })
11792
11796
  ] }),
11793
- errorBankConsent && /* @__PURE__ */ jsx36("span", { className: "error-span", children: errorBankConsent }),
11794
11797
  customerId && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11795
11798
  /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
11796
11799
  setSaveACHinfo(e.target.checked);