@fractalpay/fractalpay-next-dev 0.0.220 → 0.0.221

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.221",
43
43
  private: false,
44
44
  type: "module",
45
45
  scripts: {
@@ -9767,11 +9767,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9767
9767
  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
9768
  session_key: (_f2 = (_e2 = sesionResult == null ? void 0 : sesionResult.data) == null ? void 0 : _e2.data) == null ? void 0 : _f2.session_key
9769
9769
  };
9770
+ debugger;
9771
+ let three_ds_data = null;
9770
9772
  if (require3ds) {
9771
9773
  if (typeof window !== "undefined" && typeof navigator !== "undefined") {
9772
9774
  const languages = (_g2 = navigator.languages) != null ? _g2 : [navigator.language];
9773
9775
  const language = Array.isArray(languages) ? languages[0] : languages;
9774
- objtokenize.three_ds_data = {
9776
+ three_ds_data = {
9775
9777
  amount: partialAmount ? Math.round(parseFloat(partialAmount) * 100) : Math.round(parseFloat(amount) * 100),
9776
9778
  // convert dollars → cents
9777
9779
  currency: "usd",
@@ -9791,7 +9793,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9791
9793
  }
9792
9794
  let tokenizeData;
9793
9795
  try {
9794
- tokenizeData = await tokenizerRef.current.createToken(objtokenize);
9796
+ tokenizeData = await tokenizerRef.current.createToken(
9797
+ objtokenize,
9798
+ three_ds_data
9799
+ );
9795
9800
  } catch (error2) {
9796
9801
  setErrorIframe(error2);
9797
9802
  hideLoader();
@@ -9884,6 +9889,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
9884
9889
  pass_fee
9885
9890
  }
9886
9891
  });
9892
+ debugger;
9887
9893
  if ((result == null ? void 0 : result.status) == 200) {
9888
9894
  let gatewayToken = (_b2 = (_a2 = result == null ? void 0 : result.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.gateway_token;
9889
9895
  let paymentGateway2 = (_d2 = (_c2 = result == null ? void 0 : result.data) == null ? void 0 : _c2.data) == null ? void 0 : _d2.paymentGateway;
@@ -10319,7 +10325,12 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10319
10325
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2;
10320
10326
  try {
10321
10327
  showLoader();
10322
- const res = await axios9.get(`${masterBaseUrl}api/v1/gateway/get-payment-details/${session_token}`);
10328
+ const res = await axios9.get(`${masterBaseUrl}api/v1/gateway/get-payment-details/${session_token}`, {
10329
+ params: {
10330
+ require3ds,
10331
+ pass_fee
10332
+ }
10333
+ });
10323
10334
  if ((res == null ? void 0 : res.status) == 200) {
10324
10335
  setIsBankActive((_b2 = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.isBankActive);
10325
10336
  setProcessingFee(Number((_d2 = (_c2 = res == null ? void 0 : res.data) == null ? void 0 : _c2.data) == null ? void 0 : _d2.fee) || 0);