@fractalpay/fractalpay-next-test 0.0.33 → 0.0.35
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 +58 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.
|
|
42
|
+
version: "0.0.35",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -890,8 +890,8 @@ var isValidJson = (jsonString) => {
|
|
|
890
890
|
}
|
|
891
891
|
};
|
|
892
892
|
var accountTypes = [
|
|
893
|
-
{ value: "personal saving", label: "Personal Saving" },
|
|
894
|
-
{ value: "business saving", label: "Business Saving" },
|
|
893
|
+
// { value: "personal saving", label: "Personal Saving" },
|
|
894
|
+
// { value: "business saving", label: "Business Saving" },
|
|
895
895
|
{ value: "personal checking", label: "Personal Checking" },
|
|
896
896
|
{ value: "business checking", label: "Business Checking" }
|
|
897
897
|
];
|
|
@@ -3461,6 +3461,8 @@ function GetPaymentPage(props) {
|
|
|
3461
3461
|
const [activeForm, setActiveForm] = useState4(true);
|
|
3462
3462
|
const [saveCardInfo, setSaveCardInfo] = useState4(false);
|
|
3463
3463
|
const [saveACHinfo, setSaveACHinfo] = useState4(false);
|
|
3464
|
+
const [isBankConsentChecked, setIsBankConsentChecked] = useState4(false);
|
|
3465
|
+
const [errorBankConsent, setErrorBankConsent] = useState4("");
|
|
3464
3466
|
const fractalpayClientKey = props.merchantPublicKey;
|
|
3465
3467
|
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
3466
3468
|
let visa2 = S3Url + "widget/visa-img.svg";
|
|
@@ -3580,6 +3582,8 @@ function GetPaymentPage(props) {
|
|
|
3580
3582
|
setLoading(false);
|
|
3581
3583
|
setBankList([]);
|
|
3582
3584
|
setCardList([]);
|
|
3585
|
+
setIsBankConsentChecked(false);
|
|
3586
|
+
setErrorBankConsent("");
|
|
3583
3587
|
};
|
|
3584
3588
|
const handleShow = () => setShow(true);
|
|
3585
3589
|
const handletabchange = (id) => {
|
|
@@ -3679,8 +3683,11 @@ function GetPaymentPage(props) {
|
|
|
3679
3683
|
errors.companyName = "Company Name is required for business accounts";
|
|
3680
3684
|
}
|
|
3681
3685
|
}
|
|
3686
|
+
if (!isBankConsentChecked) {
|
|
3687
|
+
setErrorBankConsent("Above consent is requied");
|
|
3688
|
+
}
|
|
3682
3689
|
setAchError(errors);
|
|
3683
|
-
return Object.keys(errors).length > 0;
|
|
3690
|
+
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
3684
3691
|
};
|
|
3685
3692
|
const submitFunc = async (e) => {
|
|
3686
3693
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
|
|
@@ -4604,9 +4611,15 @@ function GetPaymentPage(props) {
|
|
|
4604
4611
|
] })
|
|
4605
4612
|
] }),
|
|
4606
4613
|
/* @__PURE__ */ jsxs11("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
4607
|
-
/* @__PURE__ */ jsx19("input", { type: "checkbox", id: "achconsent", className: "",
|
|
4614
|
+
/* @__PURE__ */ jsx19("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
|
|
4615
|
+
setIsBankConsentChecked(e.target.checked);
|
|
4616
|
+
if (e.target.checked) {
|
|
4617
|
+
setErrorBankConsent("");
|
|
4618
|
+
}
|
|
4619
|
+
} }),
|
|
4608
4620
|
/* @__PURE__ */ jsx19("label", { htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${(paymentData == null ? void 0 : paymentData.bname) || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
|
|
4609
4621
|
] }),
|
|
4622
|
+
errorBankConsent && /* @__PURE__ */ jsx19("span", { className: "error-span", children: errorBankConsent }),
|
|
4610
4623
|
(props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsxs11("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
4611
4624
|
/* @__PURE__ */ jsx19("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
4612
4625
|
/* @__PURE__ */ jsx19("label", { htmlFor: "saveACH", children: "Save Bank" })
|
|
@@ -7371,6 +7384,8 @@ function PartialPayment(props) {
|
|
|
7371
7384
|
const [aftertaxAmount, setAfterTaxAmount] = useState8(Number(props == null ? void 0 : props.amount));
|
|
7372
7385
|
const [partialAmount, setPartialAmount] = useState8("");
|
|
7373
7386
|
const [partialError, setPartialError] = useState8("");
|
|
7387
|
+
const [isBankConsentChecked, setIsBankConsentChecked] = useState8(false);
|
|
7388
|
+
const [errorBankConsent, setErrorBankConsent] = useState8("");
|
|
7374
7389
|
const tokenizerRef = useRef8(null);
|
|
7375
7390
|
const fractalStyles = {
|
|
7376
7391
|
input: {
|
|
@@ -7482,6 +7497,8 @@ function PartialPayment(props) {
|
|
|
7482
7497
|
setCardList([]);
|
|
7483
7498
|
setPartialAmount("");
|
|
7484
7499
|
setPartialError("");
|
|
7500
|
+
setIsBankConsentChecked(false);
|
|
7501
|
+
setErrorBankConsent("");
|
|
7485
7502
|
};
|
|
7486
7503
|
const handleShow = () => setShow(true);
|
|
7487
7504
|
const handletabchange = (id) => {
|
|
@@ -7582,8 +7599,11 @@ function PartialPayment(props) {
|
|
|
7582
7599
|
errors.companyName = "Company Name is required for business accounts";
|
|
7583
7600
|
}
|
|
7584
7601
|
}
|
|
7602
|
+
if (!isBankConsentChecked) {
|
|
7603
|
+
setErrorBankConsent("Above consent is requied");
|
|
7604
|
+
}
|
|
7585
7605
|
setAchError(errors);
|
|
7586
|
-
return Object.keys(errors).length > 0;
|
|
7606
|
+
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
7587
7607
|
};
|
|
7588
7608
|
const submitFunc = async (e) => {
|
|
7589
7609
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
|
|
@@ -8531,9 +8551,24 @@ function PartialPayment(props) {
|
|
|
8531
8551
|
] })
|
|
8532
8552
|
] }),
|
|
8533
8553
|
/* @__PURE__ */ jsxs17("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
8534
|
-
/* @__PURE__ */ jsx28(
|
|
8554
|
+
/* @__PURE__ */ jsx28(
|
|
8555
|
+
"input",
|
|
8556
|
+
{
|
|
8557
|
+
type: "checkbox",
|
|
8558
|
+
id: "achconsent",
|
|
8559
|
+
className: "",
|
|
8560
|
+
checked: isBankConsentChecked,
|
|
8561
|
+
onChange: (e) => {
|
|
8562
|
+
setIsBankConsentChecked(e.target.checked);
|
|
8563
|
+
if (e.target.checked) {
|
|
8564
|
+
setErrorBankConsent("");
|
|
8565
|
+
}
|
|
8566
|
+
}
|
|
8567
|
+
}
|
|
8568
|
+
),
|
|
8535
8569
|
/* @__PURE__ */ jsx28("label", { htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${(paymentData == null ? void 0 : paymentData.bname) || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
|
|
8536
8570
|
] }),
|
|
8571
|
+
errorBankConsent && /* @__PURE__ */ jsx28("span", { className: "error-span", children: errorBankConsent }),
|
|
8537
8572
|
(props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsxs17("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
8538
8573
|
/* @__PURE__ */ jsx28("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
8539
8574
|
/* @__PURE__ */ jsx28("label", { htmlFor: "saveACH", children: "Save Bank" })
|
|
@@ -9535,7 +9570,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9535
9570
|
const [remainingAmount, setRemainingAmount] = useState10("");
|
|
9536
9571
|
const [paymentGateway, setPaymentGateway] = useState10();
|
|
9537
9572
|
const [dcToken, setDCToken] = useState10();
|
|
9538
|
-
|
|
9573
|
+
const [isBankConsentChecked, setIsBankConsentChecked] = useState10(false);
|
|
9574
|
+
const [errorBankConsent, setErrorBankConsent] = useState10("");
|
|
9539
9575
|
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
9540
9576
|
let visa2 = S3Url + "widget/visa-img.svg";
|
|
9541
9577
|
let americanexp2 = S3Url + "widget/ae-img.svg";
|
|
@@ -9719,8 +9755,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9719
9755
|
errors.companyName = "Company Name is required for business accounts";
|
|
9720
9756
|
}
|
|
9721
9757
|
}
|
|
9758
|
+
if (!isBankConsentChecked) {
|
|
9759
|
+
setErrorBankConsent("Above consent is requied");
|
|
9760
|
+
}
|
|
9722
9761
|
setAchError(errors);
|
|
9723
|
-
return Object.keys(errors).length > 0;
|
|
9762
|
+
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
9724
9763
|
};
|
|
9725
9764
|
const completeFractalFlow = async (tokenizeData, intentid) => {
|
|
9726
9765
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
@@ -10112,6 +10151,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10112
10151
|
setPartialAmount("");
|
|
10113
10152
|
setPartialError("");
|
|
10114
10153
|
setRemainingAmount("");
|
|
10154
|
+
setIsBankConsentChecked(false);
|
|
10155
|
+
setErrorBankConsent("");
|
|
10115
10156
|
};
|
|
10116
10157
|
const getCardList = async () => {
|
|
10117
10158
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
@@ -10859,9 +10900,15 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10859
10900
|
] })
|
|
10860
10901
|
] }),
|
|
10861
10902
|
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
10862
|
-
/* @__PURE__ */ jsx32("input", { type: "checkbox", id: "achconsent", className: "",
|
|
10903
|
+
/* @__PURE__ */ jsx32("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
|
|
10904
|
+
setIsBankConsentChecked(e.target.checked);
|
|
10905
|
+
if (e.target.checked) {
|
|
10906
|
+
setErrorBankConsent("");
|
|
10907
|
+
}
|
|
10908
|
+
} }),
|
|
10863
10909
|
/* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${merchantName || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
|
|
10864
10910
|
] }),
|
|
10911
|
+
errorBankConsent && /* @__PURE__ */ jsx32("span", { className: "error-span", children: errorBankConsent }),
|
|
10865
10912
|
customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
10866
10913
|
/* @__PURE__ */ jsx32("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
10867
10914
|
/* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
|
|
@@ -10908,7 +10955,7 @@ var PaymentWidget = ({
|
|
|
10908
10955
|
bankSurcharge,
|
|
10909
10956
|
partialRef
|
|
10910
10957
|
}) => {
|
|
10911
|
-
const [show, setShow] = useState11(false);
|
|
10958
|
+
const [show, setShow] = useState11(autoTrigger || false);
|
|
10912
10959
|
const [loading, setLoading] = useState11(false);
|
|
10913
10960
|
const [childHandleClose, setChildHandleClose] = useState11(() => () => {
|
|
10914
10961
|
});
|