@fractalpay/fractalpay-next-dev 0.0.277 → 0.0.279

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.277",
42
+ version: "0.0.279",
43
43
  private: false,
44
44
  type: "module",
45
45
  scripts: {
@@ -236,8 +236,8 @@ var Loader_default = Loader;
236
236
  var { name } = require_package();
237
237
  var S3Url = "https://fractal-userdata-upload.s3.us-east-1.amazonaws.com/";
238
238
  if (name === "@fractalpay/fractalpay-next-dev") {
239
- baseUrl = "http://192.168.1.64:8083/";
240
- masterBaseUrl = "http://192.168.1.64:8082/";
239
+ masterBaseUrl = "https://api.dev.fractalpay.com/";
240
+ baseUrl = "https://widget.dev.fractalpay.com/";
241
241
  fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
242
242
  datacapUrl = "https://token-cert.dcap.com/v1/client";
243
243
  threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
@@ -3929,7 +3929,6 @@ function GetPaymentPage(props) {
3929
3929
  } catch (err) {
3930
3930
  setErrorIframe(((_h2 = (_g2 = err == null ? void 0 : err.response) == null ? void 0 : _g2.data) == null ? void 0 : _h2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
3931
3931
  setLoading2(false);
3932
- return;
3933
3932
  }
3934
3933
  console.log(tokenizeData, "tokenizeData");
3935
3934
  const reqData = JSON.stringify(__spreadProps(__spreadValues({}, tokenizeData), {
@@ -9889,9 +9888,7 @@ width: fit-content;
9889
9888
  top: 50%;
9890
9889
  left: 50%;
9891
9890
  transform: translate(-50%, -50%);
9892
- background: rgba(255, 255, 255, 0.15);
9893
- backdrop-filter: blur(12px);
9894
- -webkit-backdrop-filter: blur(12px);
9891
+ background: #fff;
9895
9892
  border-radius: 12px;
9896
9893
  z-index: 11111;
9897
9894
  max-width: 240px;
@@ -10418,6 +10415,9 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10418
10415
  name: cardData == null ? void 0 : cardData.cardName
10419
10416
  }
10420
10417
  } : null);
10418
+ if (require3ds && (data == null ? void 0 : data.stripe_3ds_auth_id)) {
10419
+ dataObj.stripe_3ds_auth_id = data == null ? void 0 : data.stripe_3ds_auth_id;
10420
+ }
10421
10421
  const preAuthResponse = await axios9.post(`${masterBaseUrl}api/v1/gateway/preauth/${session_token}`, dataObj);
10422
10422
  if ((_a2 = preAuthResponse == null ? void 0 : preAuthResponse.data) == null ? void 0 : _a2.result) {
10423
10423
  let addCard;
@@ -10512,13 +10512,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10512
10512
  return Object.keys(errors).length > 0;
10513
10513
  };
10514
10514
  const completeFractalFlow = async (tokenizeData, intentid, typeoftoken) => {
10515
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
10515
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
10516
10516
  try {
10517
- console.log({
10518
- tokenizeData,
10519
- intentid,
10520
- typeoftoken
10521
- });
10522
10517
  if (typeoftoken == "google_pay" || typeoftoken == "apple_pay") {
10523
10518
  handleCharge({
10524
10519
  Token: tokenizeData,
@@ -10526,28 +10521,39 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10526
10521
  typeoftoken
10527
10522
  });
10528
10523
  return;
10529
- } else {
10524
+ }
10525
+ let token = tokenizeData;
10526
+ let verifyandsaveresp = await axios9.post(`${masterBaseUrl}api/v1/gateway/verify-and-save/${session_token}`, {
10527
+ token,
10528
+ require3ds,
10529
+ pass_fee,
10530
+ typeoftoken
10531
+ });
10532
+ if ((verifyandsaveresp == null ? void 0 : verifyandsaveresp.status) == 200) {
10533
+ let responsetemp = (_a2 = verifyandsaveresp == null ? void 0 : verifyandsaveresp.data) == null ? void 0 : _a2.data;
10534
+ let respData = {
10535
+ Token: responsetemp.gateway_token,
10536
+ Brand: responsetemp.card_data.brand,
10537
+ ExpirationMonth: responsetemp.card_data.expire_mm,
10538
+ ExpirationYear: responsetemp.card_data.expire_yy,
10539
+ Last4: responsetemp.card_data.last4,
10540
+ Bin: responsetemp.card_data.bin,
10541
+ postalCode: cardData == null ? void 0 : cardData.zipCode,
10542
+ stripe_3ds_auth_id: intentid
10543
+ };
10530
10544
  if (isPreAuth) {
10531
- handlePreAuth({
10532
- Token: tokenizeData,
10533
- postalCode: cardData == null ? void 0 : cardData.zipCode,
10534
- typeoftoken: "token"
10535
- });
10545
+ handlePreAuth(respData);
10536
10546
  } else {
10537
- handleCharge(__spreadValues({
10538
- Token: tokenizeData,
10539
- postalCode: cardData == null ? void 0 : cardData.zipCode,
10540
- typeoftoken: "token"
10541
- }, intentid && { stripe_3ds_auth_id: intentid }));
10547
+ handleCharge(respData);
10542
10548
  }
10543
10549
  }
10544
10550
  } catch (error2) {
10545
10551
  console.log(error2, "error");
10546
- setError(((_b2 = (_a2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || "Something went wrong!");
10552
+ setError(((_c2 = (_b2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _b2.data) == null ? void 0 : _c2.message) || "Something went wrong!");
10547
10553
  callback({
10548
- error: ((_d2 = (_c2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || "Something went wrong!",
10549
- result: (_f2 = (_e2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _e2.data) == null ? void 0 : _f2.result,
10550
- statusCode: (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.status
10554
+ error: ((_e2 = (_d2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _d2.data) == null ? void 0 : _e2.message) || "Something went wrong!",
10555
+ result: (_g2 = (_f2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _f2.data) == null ? void 0 : _g2.result,
10556
+ statusCode: (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.status
10551
10557
  });
10552
10558
  hideLoader();
10553
10559
  }