@fractalpay/fractalpay-next-dev 0.0.220 → 0.0.222

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.220",
42
+ version: "0.0.222",
43
43
  private: false,
44
44
  type: "module",
45
45
  scripts: {
@@ -8573,7 +8573,6 @@ function SkyChargewidgetstyles() {
8573
8573
  font-family: 'Inter', sans-serif !important;
8574
8574
  }
8575
8575
  .frac-form .form-group-frac{
8576
- margin:0 !important;
8577
8576
  padding: 5px 0;
8578
8577
  }
8579
8578
  .frac-form .mb-4{
@@ -8897,7 +8896,6 @@ function SkyChargewidgetstyles() {
8897
8896
  .form-control-frac{box-sizing: border-box ;}
8898
8897
  #PaymentForm .form-group-frac{
8899
8898
  padding:5px 0 ;
8900
- matgin: 0 !important
8901
8899
  }
8902
8900
 
8903
8901
  .toggle-label {
@@ -9767,11 +9765,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9767
9765
  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),
9768
9766
  session_key: (_f2 = (_e2 = sesionResult == null ? void 0 : sesionResult.data) == null ? void 0 : _e2.data) == null ? void 0 : _f2.session_key
9769
9767
  };
9768
+ debugger;
9769
+ let three_ds_data = null;
9770
9770
  if (require3ds) {
9771
9771
  if (typeof window !== "undefined" && typeof navigator !== "undefined") {
9772
9772
  const languages = (_g2 = navigator.languages) != null ? _g2 : [navigator.language];
9773
9773
  const language = Array.isArray(languages) ? languages[0] : languages;
9774
- objtokenize.three_ds_data = {
9774
+ three_ds_data = {
9775
9775
  amount: partialAmount ? Math.round(parseFloat(partialAmount) * 100) : Math.round(parseFloat(amount) * 100),
9776
9776
  // convert dollars → cents
9777
9777
  currency: "usd",
@@ -9791,7 +9791,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9791
9791
  }
9792
9792
  let tokenizeData;
9793
9793
  try {
9794
- tokenizeData = await tokenizerRef.current.createToken(objtokenize);
9794
+ tokenizeData = await tokenizerRef.current.createToken(
9795
+ objtokenize,
9796
+ three_ds_data
9797
+ );
9795
9798
  } catch (error2) {
9796
9799
  setErrorIframe(error2);
9797
9800
  hideLoader();
@@ -9884,6 +9887,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9884
9887
  pass_fee
9885
9888
  }
9886
9889
  });
9890
+ debugger;
9887
9891
  if ((result == null ? void 0 : result.status) == 200) {
9888
9892
  let gatewayToken = (_b2 = (_a2 = result == null ? void 0 : result.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.gateway_token;
9889
9893
  let paymentGateway2 = (_d2 = (_c2 = result == null ? void 0 : result.data) == null ? void 0 : _c2.data) == null ? void 0 : _d2.paymentGateway;
@@ -10120,6 +10124,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10120
10124
  setActive("card");
10121
10125
  setActiveinCard("list");
10122
10126
  setCardList(cardlists);
10127
+ setLoadingIframe(false);
10123
10128
  } else {
10124
10129
  setActive("card");
10125
10130
  setCardList([]);
@@ -10319,7 +10324,12 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10319
10324
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2;
10320
10325
  try {
10321
10326
  showLoader();
10322
- const res = await axios9.get(`${masterBaseUrl}api/v1/gateway/get-payment-details/${session_token}`);
10327
+ const res = await axios9.get(`${masterBaseUrl}api/v1/gateway/get-payment-details/${session_token}`, {
10328
+ params: {
10329
+ require3ds,
10330
+ pass_fee
10331
+ }
10332
+ });
10323
10333
  if ((res == null ? void 0 : res.status) == 200) {
10324
10334
  setIsBankActive((_b2 = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.isBankActive);
10325
10335
  setProcessingFee(Number((_d2 = (_c2 = res == null ? void 0 : res.data) == null ? void 0 : _c2.data) == null ? void 0 : _d2.fee) || 0);
@@ -10464,6 +10474,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10464
10474
  styles: {}
10465
10475
  });
10466
10476
  }, []);
10477
+ console.log(activeinCard === "list", "activeinCard", activeList);
10467
10478
  return /* @__PURE__ */ jsxs19(Fragment18, { children: [
10468
10479
  initialLoader && /* @__PURE__ */ jsx32(Loader_default, { loading: initialLoader }),
10469
10480
  error && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error, onClose: handleClose }) }),
@@ -10669,7 +10680,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10669
10680
  {
10670
10681
  isOpen: show,
10671
10682
  tokenKey: dcToken,
10672
- setLoader: setLoadingIframe
10683
+ setLoader: activeinCard === "form" ? setLoadingIframe : null
10673
10684
  }
10674
10685
  ) }),
10675
10686
  /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
@@ -10745,12 +10756,12 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10745
10756
  minHeight: "444px",
10746
10757
  maxHeight: "444px"
10747
10758
  }, children: [
10748
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac mb-4", children: [
10759
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10749
10760
  /* @__PURE__ */ jsx32("label", { htmlFor: "nameonaccount", children: "Name on account" }),
10750
10761
  /* @__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 }),
10751
10762
  (achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
10752
10763
  ] }),
10753
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac mb-4", children: [
10764
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10754
10765
  /* @__PURE__ */ jsx32("label", { htmlFor: "routingnumber", children: "Routing number" }),
10755
10766
  /* @__PURE__ */ jsx32(
10756
10767
  "input",
@@ -10767,7 +10778,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10767
10778
  ),
10768
10779
  (achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
10769
10780
  ] }),
10770
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac mb-4", children: [
10781
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10771
10782
  /* @__PURE__ */ jsx32("label", { htmlFor: "accountnumber", children: "Account number" }),
10772
10783
  /* @__PURE__ */ jsx32(
10773
10784
  "input",
@@ -10784,7 +10795,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10784
10795
  ),
10785
10796
  (achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
10786
10797
  ] }),
10787
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac mb-4", children: [
10798
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10788
10799
  /* @__PURE__ */ jsx32("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
10789
10800
  /* @__PURE__ */ jsx32(
10790
10801
  "input",
@@ -10801,7 +10812,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10801
10812
  ),
10802
10813
  (achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
10803
10814
  ] }),
10804
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac mb-4", children: [
10815
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10805
10816
  /* @__PURE__ */ jsx32("label", { htmlFor: "bankname", children: "Bank name" }),
10806
10817
  /* @__PURE__ */ jsx32(
10807
10818
  "input",
@@ -10818,7 +10829,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10818
10829
  ),
10819
10830
  (achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
10820
10831
  ] }),
10821
- ((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac mb-4", children: [
10832
+ ((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10822
10833
  /* @__PURE__ */ jsx32("label", { htmlFor: "companyName", children: "Company name" }),
10823
10834
  /* @__PURE__ */ jsx32(
10824
10835
  "input",
@@ -10835,18 +10846,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10835
10846
  ),
10836
10847
  (achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
10837
10848
  ] }),
10838
- /* @__PURE__ */ jsxs19("div", { className: "form-group-frac mb-4", children: [
10849
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
10839
10850
  /* @__PURE__ */ jsx32("label", { htmlFor: "accounttype", children: "Select account type" }),
10840
10851
  /* @__PURE__ */ jsxs19("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_r = achData == null ? void 0 : achData.accountType) != null ? _r : "", onChange: handleChangeAch, children: [
10841
10852
  /* @__PURE__ */ jsx32("option", { value: "", children: "Select account" }),
10842
10853
  accountTypes.map((type) => /* @__PURE__ */ jsx32("option", { value: type.value, children: type.label }, type.value))
10843
10854
  ] })
10844
10855
  ] }),
10845
- customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
10856
+ customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
10846
10857
  /* @__PURE__ */ jsx32("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
10847
10858
  /* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save ACH" })
10848
10859
  ] }),
10849
- saveACHinfo && /* @__PURE__ */ jsx32("div", { className: "form-group-frac mb-4 saveachtext", children: /* @__PURE__ */ jsxs19("p", { children: [
10860
+ saveACHinfo && /* @__PURE__ */ jsx32("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs19("p", { children: [
10850
10861
  "If checked, I agree to give the ",
10851
10862
  /* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
10852
10863
  " permission to charge this bank account for agreed-upon purchases in the future."