@fractalpay/fractalpay-next-dev 0.0.274 → 0.0.275

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.d.ts CHANGED
@@ -50,7 +50,6 @@ type Props$6 = {
50
50
  pass_fee?: boolean;
51
51
  isReader?: boolean;
52
52
  sessionToken?: string;
53
- bankFeeAmount?: string;
54
53
  };
55
54
  declare function GetPaymentPage(props: Props$6): React.JSX.Element;
56
55
 
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.274",
42
+ version: "0.0.275",
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
- masterBaseUrl = "https://api.dev.fractalpay.com/";
240
- baseUrl = "https://widget.dev.fractalpay.com/";
239
+ baseUrl = "http://192.168.1.51:8082/";
240
+ masterBaseUrl = "http://192.168.1.51:8081/";
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";
@@ -1058,10 +1058,9 @@ function RequestPayment(props) {
1058
1058
  let cash_discount = CalculateCashDiscount(props == null ? void 0 : props.amount, props == null ? void 0 : props.surcharge);
1059
1059
  setCashDiscount(cash_discount);
1060
1060
  }
1061
- }, [props == null ? void 0 : props.pass_fee, show]);
1061
+ }, [props == null ? void 0 : props.pass_fee]);
1062
1062
  const handleClose = () => {
1063
1063
  setShow(false);
1064
- setCashDiscount(0);
1065
1064
  setErrors({});
1066
1065
  };
1067
1066
  const handleShow = () => setShow(true);
@@ -2459,20 +2458,6 @@ position:relative;
2459
2458
  border: 0;
2460
2459
  border-right: 1px solid #dee2e6;
2461
2460
  }
2462
-
2463
- .frac-fee-text{
2464
- display: block;
2465
- padding: 10px 0 4px;
2466
- font-family: 'IBM Plex Mono', monospace !important;
2467
- color: #727272 !important;
2468
- font-size: 12px;
2469
- line-height: 1.4;
2470
- text-align: start !important;
2471
- }
2472
- .frac-fee-amount{
2473
- color: #c62828 !important;
2474
- }
2475
-
2476
2461
  ` });
2477
2462
  }
2478
2463
 
@@ -3313,7 +3298,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
3313
3298
  {
3314
3299
  id: "exp_month",
3315
3300
  className: "form-control required card-cvv-in",
3316
- style: { height: "46px", display: "block", minHeight: "46px" }
3301
+ style: { height: "36px", display: "block", minHeight: "36px" }
3317
3302
  }
3318
3303
  ) }),
3319
3304
  /* @__PURE__ */ jsx17("div", { className: "exp-year form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
@@ -3321,7 +3306,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
3321
3306
  {
3322
3307
  id: "exp_year",
3323
3308
  className: "form-control required card-cvv-in",
3324
- style: { height: "46px", display: "block", minHeight: "46px" }
3309
+ style: { height: "36px", display: "block", minHeight: "36px" }
3325
3310
  }
3326
3311
  ) }),
3327
3312
  /* @__PURE__ */ jsx17("div", { className: "security-digit form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
@@ -3329,7 +3314,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
3329
3314
  {
3330
3315
  id: "cvv",
3331
3316
  className: "form-control card-cvv-in required",
3332
- style: { height: "46px", display: "block", minHeight: "46px" }
3317
+ style: { height: "36px", display: "block", minHeight: "36px" }
3333
3318
  }
3334
3319
  ) })
3335
3320
  ] }) })
@@ -3610,8 +3595,6 @@ function GetPaymentPage(props) {
3610
3595
  const [selectedCard, setSelectedCard] = useState4();
3611
3596
  const [selectedReader, setSelectedReader] = useState4(void 0);
3612
3597
  const [cashDiscount, setCashDiscount] = useState4(Number(props == null ? void 0 : props.amount));
3613
- const [bankAmount, setBankAmount] = useState4(Number(props == null ? void 0 : props.amount));
3614
- const [bankFeeAmount, setBankFeeAmount] = useState4(0);
3615
3598
  const [paymentData, setPaymentData] = useState4();
3616
3599
  let [tranId, setTranId] = useState4("");
3617
3600
  const tokenizerRef = useRef3(null);
@@ -3646,25 +3629,7 @@ function GetPaymentPage(props) {
3646
3629
  useEffect8(() => {
3647
3630
  if (show) {
3648
3631
  let cash_discount = CalculateCashDiscount(props == null ? void 0 : props.amount, (props == null ? void 0 : props.surcharge) || 0);
3649
- let bankAmount2 = cash_discount;
3650
- if ((props == null ? void 0 : props.bankFeeAmount) && Number(props == null ? void 0 : props.bankFeeAmount) > 0) {
3651
- bankAmount2 = Number(cash_discount) + Number(props == null ? void 0 : props.bankFeeAmount);
3652
- }
3653
- setBankAmount(bankAmount2);
3654
3632
  setCashDiscount(cash_discount);
3655
- const cardFeeAmount = Number((Number(props == null ? void 0 : props.amount) - Number(cash_discount || 0)).toFixed(2));
3656
- const bankFeeAmount2 = Number((props == null ? void 0 : props.bankFeeAmount) || 0);
3657
- const bankSavingsAmount = Math.max(bankFeeAmount2 > 0 ? cardFeeAmount - bankFeeAmount2 : cardFeeAmount, 0);
3658
- const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
3659
- setBankFeeAmount(bankFeeAmount2);
3660
- console.log({
3661
- cash_discount,
3662
- bankAmount: bankAmount2,
3663
- cardFeeAmount,
3664
- bankFeeAmount: bankFeeAmount2,
3665
- bankSavingsAmount,
3666
- bankSavingsText
3667
- });
3668
3633
  }
3669
3634
  }, [show, props == null ? void 0 : props.pass_fee, props == null ? void 0 : props.amount, props == null ? void 0 : props.surcharge]);
3670
3635
  const handleClose = () => {
@@ -3929,6 +3894,7 @@ function GetPaymentPage(props) {
3929
3894
  } catch (err) {
3930
3895
  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
3896
  setLoading2(false);
3897
+ return;
3932
3898
  }
3933
3899
  console.log(tokenizeData, "tokenizeData");
3934
3900
  const reqData = JSON.stringify(__spreadProps(__spreadValues({}, tokenizeData), {
@@ -4015,7 +3981,7 @@ function GetPaymentPage(props) {
4015
3981
  routing_number: achData == null ? void 0 : achData.routingNumber,
4016
3982
  bank_name: achData == null ? void 0 : achData.bankName,
4017
3983
  account_type: achData == null ? void 0 : achData.accountType,
4018
- amount: String(bankAmount || 0),
3984
+ amount: String(cashDiscount || 0),
4019
3985
  isSaveAch: saveACHinfo,
4020
3986
  customer_id: props == null ? void 0 : props.customerId,
4021
3987
  order_id: props == null ? void 0 : props.orderID,
@@ -4097,11 +4063,11 @@ function GetPaymentPage(props) {
4097
4063
  let amount = String(props == null ? void 0 : props.amount);
4098
4064
  let card_id = selectedCard == null ? void 0 : selectedCard.id;
4099
4065
  let card_type = selectedCard == null ? void 0 : selectedCard.card_type;
4100
- if (fractalpayPublicKey && order_id && amount && bankAmount) {
4066
+ if (fractalpayPublicKey && order_id && amount && cashDiscount) {
4101
4067
  if (customer_id) {
4102
4068
  if (card_id) {
4103
4069
  let chargeobj = __spreadValues({
4104
- amount: card_type === "Bank" ? `${bankAmount}` : amount,
4070
+ amount: card_type === "Bank" ? `${cashDiscount}` : amount,
4105
4071
  order_id,
4106
4072
  customer_id,
4107
4073
  card_id,
@@ -4340,21 +4306,22 @@ function GetPaymentPage(props) {
4340
4306
  /* @__PURE__ */ jsx19("div", { className: "pay-amount-conatiner", children: /* @__PURE__ */ jsx19("small", { className: "pay-payment-amount", children: "Select paymet type" }) }),
4341
4307
  /* @__PURE__ */ jsxs11("div", { className: "frac-card-bank-radio-main", children: [
4342
4308
  /* @__PURE__ */ jsx19(CardBankRadio, { label: "Card", amount: (_a = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
4343
- (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && /* @__PURE__ */ jsx19(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab }),
4309
+ (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && /* @__PURE__ */ jsx19(CardBankRadio, { label: "Bank", amount: (_b = Number(cashDiscount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab }),
4344
4310
  (props == null ? void 0 : props.isReader) && (paymentData == null ? void 0 : paymentData.paymentDeviceList) && ((_c = paymentData == null ? void 0 : paymentData.paymentDeviceList) == null ? void 0 : _c.length) > 0 && /* @__PURE__ */ jsx19(CardBankRadio, { label: "Reader", amount: (_d = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _d.toFixed(2), value: "reader", onChange: handletabchange, activetab })
4345
4311
  ] }),
4346
- !loading && /* @__PURE__ */ jsxs11("div", { className: "", children: [
4347
- activetab == "ach" && bankFeeAmount > 0 && /* @__PURE__ */ jsxs11("small", { className: "frac-fee-text", children: [
4348
- "There is a processing fee of ",
4349
- /* @__PURE__ */ jsx19("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
4350
- "."
4312
+ !loading && (numberToBoolean(paymentData == null ? void 0 : paymentData.showSurcharge) ? cashDiscount && cashDiscount > 0 && (props == null ? void 0 : props.pass_fee) ? /* @__PURE__ */ jsxs11("div", { className: "frac-cash-discount-fee", children: [
4313
+ /* @__PURE__ */ jsxs11("small", { children: [
4314
+ activetab === "card" || activetab === "reader" ? "Cash Discount" : "Cash Discount Savings",
4315
+ " "
4351
4316
  ] }),
4352
- (activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs11("small", { className: "frac-fee-text", children: [
4353
- "Cards include a fee amount of ",
4354
- /* @__PURE__ */ jsx19("span", { className: "frac-fee-amount", children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) }),
4355
- "."
4356
- ] })
4357
- ] })
4317
+ /* @__PURE__ */ jsx19("p", { children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) })
4318
+ ] }) : null : cashDiscount && cashDiscount > 0 && (props == null ? void 0 : props.pass_fee) && (activetab === "card" || activetab === "reader") ? /* @__PURE__ */ jsxs11("div", { className: "frac-cash-discount-fee", children: [
4319
+ /* @__PURE__ */ jsxs11("small", { children: [
4320
+ activetab === "card" || activetab === "reader" ? "Surcharge" : null,
4321
+ " "
4322
+ ] }),
4323
+ /* @__PURE__ */ jsx19("p", { children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) })
4324
+ ] }) : null)
4358
4325
  ] })
4359
4326
  ] }),
4360
4327
  /* @__PURE__ */ jsxs11("div", { className: "pay-conatiner-one-last", children: [
@@ -4659,7 +4626,7 @@ function GetPaymentPage(props) {
4659
4626
  /* @__PURE__ */ jsx19(CardList, { listHeading: "Banks", paymentGateway: paymentData == null ? void 0 : paymentData.paymentGateway, ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
4660
4627
  setActiveinBank("form");
4661
4628
  } }),
4662
- /* @__PURE__ */ jsx19("div", { className: "form-group", style: { padding: "0" }, children: /* @__PURE__ */ jsx19("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlepayment, children: formatUSD((_n = Number(bankAmount)) == null ? void 0 : _n.toFixed(2)) }) })
4629
+ /* @__PURE__ */ jsx19("div", { className: "form-group", style: { padding: "0" }, children: /* @__PURE__ */ jsx19("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlepayment, children: formatUSD((_n = Number(cashDiscount)) == null ? void 0 : _n.toFixed(2)) }) })
4663
4630
  ] }) : /* @__PURE__ */ jsxs11("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
4664
4631
  if (e.key === "Enter" && loading2) {
4665
4632
  e.preventDefault();
@@ -4806,7 +4773,7 @@ function GetPaymentPage(props) {
4806
4773
  errorBankConsentOther && /* @__PURE__ */ jsx19("span", { className: "error-span", children: errorBankConsentOther })
4807
4774
  ] })
4808
4775
  ] }),
4809
- /* @__PURE__ */ jsx19("div", { className: "form-group ", children: /* @__PURE__ */ jsx19("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: formatUSD((_v = Number(bankAmount)) == null ? void 0 : _v.toFixed(2)) }) })
4776
+ /* @__PURE__ */ jsx19("div", { className: "form-group ", children: /* @__PURE__ */ jsx19("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: formatUSD((_v = Number(cashDiscount)) == null ? void 0 : _v.toFixed(2)) }) })
4810
4777
  ] })
4811
4778
  ] }),
4812
4779
  /* @__PURE__ */ jsxs11("div", { id: "reader", style: { display: activetab === "reader" ? "block" : "none" }, className: "tabcontent", children: [
@@ -7516,7 +7483,7 @@ import { IoArrowBack as IoArrowBack3 } from "react-icons/io5";
7516
7483
  import { NumericFormat } from "react-number-format";
7517
7484
  import { Fragment as Fragment17, jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
7518
7485
  function PartialPayment(props) {
7519
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
7486
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
7520
7487
  const buttonRef = useRef8(null);
7521
7488
  useEffect13(() => {
7522
7489
  if (props.onTriggerPay) {
@@ -8315,7 +8282,10 @@ function PartialPayment(props) {
8315
8282
  ] }),
8316
8283
  /* @__PURE__ */ jsxs17("div", { className: "amt-pay-con", children: [
8317
8284
  /* @__PURE__ */ jsx28("div", { className: "pay-amount-conatiner", children: /* @__PURE__ */ jsx28("small", { className: "pay-payment-amount", children: "Select payment type" }) }),
8318
- /* @__PURE__ */ jsx28("div", { className: "frac-card-bank-radio-main", children: /* @__PURE__ */ jsx28(CardBankRadio, { label: "Card", amount: (_a = Number(aftertaxAmount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }) }),
8285
+ /* @__PURE__ */ jsxs17("div", { className: "frac-card-bank-radio-main", children: [
8286
+ /* @__PURE__ */ jsx28(CardBankRadio, { label: "Card", amount: (_a = Number(aftertaxAmount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
8287
+ (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && /* @__PURE__ */ jsx28(CardBankRadio, { label: "Bank", amount: (_b = Number(cashDiscount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab })
8288
+ ] }),
8319
8289
  numberToBoolean(paymentData == null ? void 0 : paymentData.showSurcharge) ? cashDiscount && cashDiscount > 0 && (props == null ? void 0 : props.pass_fee) ? /* @__PURE__ */ jsxs17("div", { className: "frac-cash-discount-fee", children: [
8320
8290
  /* @__PURE__ */ jsxs17("small", { children: [
8321
8291
  activetab === "card" ? "Cash Discount" : "Cash Discount Savings",
@@ -8384,7 +8354,7 @@ function PartialPayment(props) {
8384
8354
  /* @__PURE__ */ jsx28("small", { className: "pay-payment-amount", children: "Payment Amount" }),
8385
8355
  /* @__PURE__ */ jsxs17("strong", { className: "pay-amount", children: [
8386
8356
  "$",
8387
- (_b = Number(aftertaxAmount)) == null ? void 0 : _b.toFixed(2)
8357
+ (_c = Number(aftertaxAmount)) == null ? void 0 : _c.toFixed(2)
8388
8358
  ] })
8389
8359
  ] }),
8390
8360
  activetab != "ach" && /* @__PURE__ */ jsxs17("div", { children: [
@@ -8426,7 +8396,7 @@ function PartialPayment(props) {
8426
8396
  /* @__PURE__ */ jsx28("small", { className: "pay-payment-amount", children: "Payment Amount" }),
8427
8397
  /* @__PURE__ */ jsxs17("strong", { className: "pay-amount", children: [
8428
8398
  "$",
8429
- (_c = Number(aftertaxAmount)) == null ? void 0 : _c.toFixed(2)
8399
+ (_d = Number(aftertaxAmount)) == null ? void 0 : _d.toFixed(2)
8430
8400
  ] })
8431
8401
  ] }),
8432
8402
  /* @__PURE__ */ jsxs17("div", { children: [
@@ -8461,7 +8431,7 @@ function PartialPayment(props) {
8461
8431
  /* @__PURE__ */ jsx28(CardList, { listHeading: "Cards", paymentGateway: paymentData == null ? void 0 : paymentData.paymentGateway, ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
8462
8432
  setActiveinCard("form");
8463
8433
  } }),
8464
- /* @__PURE__ */ jsx28("div", { className: "form-group", style: { padding: "0" }, children: /* @__PURE__ */ jsx28("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlepayment, children: partialAmount && !partialError ? formatUSD((_d = Number(partialAmount)) == null ? void 0 : _d.toFixed(2)) : formatUSD((_e = Number(aftertaxAmount)) == null ? void 0 : _e.toFixed(2)) }) })
8434
+ /* @__PURE__ */ jsx28("div", { className: "form-group", style: { padding: "0" }, children: /* @__PURE__ */ jsx28("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlepayment, children: partialAmount && !partialError ? formatUSD((_e = Number(partialAmount)) == null ? void 0 : _e.toFixed(2)) : formatUSD((_f = Number(aftertaxAmount)) == null ? void 0 : _f.toFixed(2)) }) })
8465
8435
  ] }) : (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 ? /* @__PURE__ */ jsxs17(
8466
8436
  "form",
8467
8437
  {
@@ -8505,14 +8475,14 @@ function PartialPayment(props) {
8505
8475
  maxLength: 100,
8506
8476
  placeholder: "Order Id",
8507
8477
  disabled: true,
8508
- value: (_f = props == null ? void 0 : props.orderID) != null ? _f : "",
8478
+ value: (_g = props == null ? void 0 : props.orderID) != null ? _g : "",
8509
8479
  style: { background: "#F6F6F7", color: "#727272" }
8510
8480
  }
8511
8481
  )
8512
8482
  ] }),
8513
8483
  /* @__PURE__ */ jsxs17("div", { className: "form-group", children: [
8514
8484
  /* @__PURE__ */ jsx28("label", { htmlFor: "zip", children: "ZIP" }),
8515
- /* @__PURE__ */ jsx28("input", { type: "text", className: "form-control", maxLength: 100, placeholder: "000000", value: (_g = cardData == null ? void 0 : cardData.zipCode) != null ? _g : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
8485
+ /* @__PURE__ */ jsx28("input", { type: "text", className: "form-control", maxLength: 100, placeholder: "000000", value: (_h = cardData == null ? void 0 : cardData.zipCode) != null ? _h : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
8516
8486
  (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx28("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
8517
8487
  ] }),
8518
8488
  (props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsx28("div", { className: "form-group", children: /* @__PURE__ */ jsxs17("div", { style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
@@ -8539,8 +8509,8 @@ function PartialPayment(props) {
8539
8509
  ] }) })
8540
8510
  ] }),
8541
8511
  /* @__PURE__ */ jsxs17("div", { className: "form-group", style: { marginTop: "20px", padding: "0" }, children: [
8542
- (paymentData == null ? void 0 : paymentData.paymentDeviceList) && ((_h = paymentData == null ? void 0 : paymentData.paymentDeviceList) == null ? void 0 : _h.length) > 0 && /* @__PURE__ */ jsx28("button", { type: "button", style: { marginBottom: "10px" }, className: "pay-button", onClick: () => setActiveForm(!activeForm), children: activeForm ? "Pay With Reader" : "Pay With Card" }),
8543
- /* @__PURE__ */ jsx28("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount && !partialError ? formatUSD((_i = Number(partialAmount)) == null ? void 0 : _i.toFixed(2)) : formatUSD((_j = Number(aftertaxAmount)) == null ? void 0 : _j.toFixed(2)) })
8512
+ (paymentData == null ? void 0 : paymentData.paymentDeviceList) && ((_i = paymentData == null ? void 0 : paymentData.paymentDeviceList) == null ? void 0 : _i.length) > 0 && /* @__PURE__ */ jsx28("button", { type: "button", style: { marginBottom: "10px" }, className: "pay-button", onClick: () => setActiveForm(!activeForm), children: activeForm ? "Pay With Reader" : "Pay With Card" }),
8513
+ /* @__PURE__ */ jsx28("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount && !partialError ? formatUSD((_j = Number(partialAmount)) == null ? void 0 : _j.toFixed(2)) : formatUSD((_k = Number(aftertaxAmount)) == null ? void 0 : _k.toFixed(2)) })
8544
8514
  ] })
8545
8515
  ]
8546
8516
  }
@@ -8579,14 +8549,14 @@ function PartialPayment(props) {
8579
8549
  maxLength: 100,
8580
8550
  placeholder: "Order Id",
8581
8551
  disabled: true,
8582
- value: (_k = props == null ? void 0 : props.orderID) != null ? _k : "",
8552
+ value: (_l = props == null ? void 0 : props.orderID) != null ? _l : "",
8583
8553
  style: { background: "#F6F6F7", color: "#727272" }
8584
8554
  }
8585
8555
  )
8586
8556
  ] }),
8587
8557
  /* @__PURE__ */ jsxs17("div", { className: "form-group", children: [
8588
8558
  /* @__PURE__ */ jsx28("label", { htmlFor: "zip", children: "ZIP" }),
8589
- /* @__PURE__ */ jsx28("input", { type: "text", className: "form-control", maxLength: 100, placeholder: "000000", value: (_l = cardData == null ? void 0 : cardData.zipCode) != null ? _l : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
8559
+ /* @__PURE__ */ jsx28("input", { type: "text", className: "form-control", maxLength: 100, placeholder: "000000", value: (_m = cardData == null ? void 0 : cardData.zipCode) != null ? _m : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
8590
8560
  (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx28("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
8591
8561
  ] }),
8592
8562
  (props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsx28("div", { className: "form-group", children: /* @__PURE__ */ jsxs17("div", { style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
@@ -8613,8 +8583,8 @@ function PartialPayment(props) {
8613
8583
  ] }) })
8614
8584
  ] }),
8615
8585
  /* @__PURE__ */ jsxs17("div", { className: "form-group", style: { marginTop: "20px", padding: "0" }, children: [
8616
- (paymentData == null ? void 0 : paymentData.paymentDeviceList) && ((_m = paymentData == null ? void 0 : paymentData.paymentDeviceList) == null ? void 0 : _m.length) > 0 && /* @__PURE__ */ jsx28("button", { type: "button", style: { marginBottom: "10px" }, className: "pay-button", onClick: () => setActiveForm(!activeForm), children: activeForm ? "Pay With Reader" : "Pay With Card" }),
8617
- /* @__PURE__ */ jsx28("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount && !partialError ? formatUSD((_n = Number(partialAmount)) == null ? void 0 : _n.toFixed(2)) : formatUSD((_o = Number(aftertaxAmount)) == null ? void 0 : _o.toFixed(2)) })
8586
+ (paymentData == null ? void 0 : paymentData.paymentDeviceList) && ((_n = paymentData == null ? void 0 : paymentData.paymentDeviceList) == null ? void 0 : _n.length) > 0 && /* @__PURE__ */ jsx28("button", { type: "button", style: { marginBottom: "10px" }, className: "pay-button", onClick: () => setActiveForm(!activeForm), children: activeForm ? "Pay With Reader" : "Pay With Card" }),
8587
+ /* @__PURE__ */ jsx28("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount && !partialError ? formatUSD((_o = Number(partialAmount)) == null ? void 0 : _o.toFixed(2)) : formatUSD((_p = Number(aftertaxAmount)) == null ? void 0 : _p.toFixed(2)) })
8618
8588
  ] })
8619
8589
  ] })
8620
8590
  ] }),
@@ -8630,7 +8600,7 @@ function PartialPayment(props) {
8630
8600
  /* @__PURE__ */ jsx28(CardList, { listHeading: "Banks", paymentGateway: paymentData == null ? void 0 : paymentData.paymentGateway, ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
8631
8601
  setActiveinBank("form");
8632
8602
  } }),
8633
- /* @__PURE__ */ jsx28("div", { className: "form-group", style: { padding: "0" }, children: /* @__PURE__ */ jsx28("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlepayment, children: partialAmount && !partialError ? formatUSD((_p = Number(partialAmount)) == null ? void 0 : _p.toFixed(2)) : formatUSD((_q = Number(cashDiscount)) == null ? void 0 : _q.toFixed(2)) }) })
8603
+ /* @__PURE__ */ jsx28("div", { className: "form-group", style: { padding: "0" }, children: /* @__PURE__ */ jsx28("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlepayment, children: partialAmount && !partialError ? formatUSD((_q = Number(partialAmount)) == null ? void 0 : _q.toFixed(2)) : formatUSD((_r = Number(cashDiscount)) == null ? void 0 : _r.toFixed(2)) }) })
8634
8604
  ] }) : /* @__PURE__ */ jsxs17("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
8635
8605
  if (e.key === "Enter" && loading2) {
8636
8606
  e.preventDefault();
@@ -8643,7 +8613,7 @@ function PartialPayment(props) {
8643
8613
  }, children: [
8644
8614
  /* @__PURE__ */ jsxs17("div", { className: "form-group mb-4", children: [
8645
8615
  /* @__PURE__ */ jsx28("label", { htmlFor: "nameonaccount", children: "Name on account" }),
8646
- /* @__PURE__ */ jsx28("input", { type: "text", id: "nameonaccount", className: "form-control", maxLength: 100, placeholder: "John Doe", name: "name", value: (_r = achData == null ? void 0 : achData.name) != null ? _r : "", onChange: handleChangeAch }),
8616
+ /* @__PURE__ */ jsx28("input", { type: "text", id: "nameonaccount", className: "form-control", maxLength: 100, placeholder: "John Doe", name: "name", value: (_s = achData == null ? void 0 : achData.name) != null ? _s : "", onChange: handleChangeAch }),
8647
8617
  (achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx28("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
8648
8618
  ] }),
8649
8619
  /* @__PURE__ */ jsxs17("div", { className: "form-group mb-4", children: [
@@ -8657,7 +8627,7 @@ function PartialPayment(props) {
8657
8627
  maxLength: 9,
8658
8628
  placeholder: "000000000",
8659
8629
  name: "routingNumber",
8660
- value: (_s = achData == null ? void 0 : achData.routingNumber) != null ? _s : "",
8630
+ value: (_t = achData == null ? void 0 : achData.routingNumber) != null ? _t : "",
8661
8631
  onChange: handleChangeAch
8662
8632
  }
8663
8633
  ),
@@ -8674,7 +8644,7 @@ function PartialPayment(props) {
8674
8644
  maxLength: 16,
8675
8645
  placeholder: "0000000000",
8676
8646
  name: "accountNumber",
8677
- value: (_t = achData == null ? void 0 : achData.accountNumber) != null ? _t : "",
8647
+ value: (_u = achData == null ? void 0 : achData.accountNumber) != null ? _u : "",
8678
8648
  onChange: handleChangeAch
8679
8649
  }
8680
8650
  ),
@@ -8691,7 +8661,7 @@ function PartialPayment(props) {
8691
8661
  maxLength: 16,
8692
8662
  placeholder: "0000000000",
8693
8663
  name: "confirmAccountNumber",
8694
- value: (_u = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _u : "",
8664
+ value: (_v = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _v : "",
8695
8665
  onChange: handleChangeAch
8696
8666
  }
8697
8667
  ),
@@ -8708,7 +8678,7 @@ function PartialPayment(props) {
8708
8678
  maxLength: 100,
8709
8679
  placeholder: "My Bank",
8710
8680
  name: "bankName",
8711
- value: (_v = achData == null ? void 0 : achData.bankName) != null ? _v : "",
8681
+ value: (_w = achData == null ? void 0 : achData.bankName) != null ? _w : "",
8712
8682
  onChange: handleChangeAch
8713
8683
  }
8714
8684
  ),
@@ -8725,7 +8695,7 @@ function PartialPayment(props) {
8725
8695
  maxLength: 100,
8726
8696
  placeholder: "My Company",
8727
8697
  name: "companyName",
8728
- value: (_w = achData == null ? void 0 : achData.companyName) != null ? _w : "",
8698
+ value: (_x = achData == null ? void 0 : achData.companyName) != null ? _x : "",
8729
8699
  onChange: handleChangeAch
8730
8700
  }
8731
8701
  ),
@@ -8733,7 +8703,7 @@ function PartialPayment(props) {
8733
8703
  ] }),
8734
8704
  /* @__PURE__ */ jsxs17("div", { className: "form-group mb-4", children: [
8735
8705
  /* @__PURE__ */ jsx28("label", { htmlFor: "accounttype", children: "Select account type" }),
8736
- /* @__PURE__ */ jsxs17("select", { name: "accountType", id: "accounttype", className: "form-control", value: (_x = achData == null ? void 0 : achData.accountType) != null ? _x : "", onChange: handleChangeAch, children: [
8706
+ /* @__PURE__ */ jsxs17("select", { name: "accountType", id: "accounttype", className: "form-control", value: (_y = achData == null ? void 0 : achData.accountType) != null ? _y : "", onChange: handleChangeAch, children: [
8737
8707
  /* @__PURE__ */ jsx28("option", { value: "", children: "Select account" }),
8738
8708
  accountTypes.map((type) => /* @__PURE__ */ jsx28("option", { value: type.value, children: type.label }, type.value))
8739
8709
  ] })
@@ -8780,7 +8750,7 @@ function PartialPayment(props) {
8780
8750
  errorBankConsentOther && /* @__PURE__ */ jsx28("span", { className: "error-span", children: errorBankConsentOther })
8781
8751
  ] })
8782
8752
  ] }),
8783
- /* @__PURE__ */ jsx28("div", { className: "form-group ", children: /* @__PURE__ */ jsx28("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: partialAmount && !partialError ? formatUSD((_y = Number(partialAmount)) == null ? void 0 : _y.toFixed(2)) : formatUSD((_z = Number(cashDiscount)) == null ? void 0 : _z.toFixed(2)) }) })
8753
+ /* @__PURE__ */ jsx28("div", { className: "form-group ", children: /* @__PURE__ */ jsx28("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: partialAmount && !partialError ? formatUSD((_z = Number(partialAmount)) == null ? void 0 : _z.toFixed(2)) : formatUSD((_A = Number(cashDiscount)) == null ? void 0 : _A.toFixed(2)) }) })
8784
8754
  ] })
8785
8755
  ] })
8786
8756
  ] }) }) })
@@ -10511,8 +10481,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10511
10481
  return Object.keys(errors).length > 0;
10512
10482
  };
10513
10483
  const completeFractalFlow = async (tokenizeData, intentid, typeoftoken) => {
10514
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
10484
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
10515
10485
  try {
10486
+ console.log({
10487
+ tokenizeData,
10488
+ intentid,
10489
+ typeoftoken
10490
+ });
10516
10491
  if (typeoftoken == "google_pay" || typeoftoken == "apple_pay") {
10517
10492
  handleCharge({
10518
10493
  Token: tokenizeData,
@@ -10520,39 +10495,28 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10520
10495
  typeoftoken
10521
10496
  });
10522
10497
  return;
10523
- }
10524
- let token = tokenizeData;
10525
- let verifyandsaveresp = await axios9.post(`${masterBaseUrl}api/v1/gateway/verify-and-save/${session_token}`, {
10526
- token,
10527
- require3ds,
10528
- pass_fee,
10529
- typeoftoken
10530
- });
10531
- if ((verifyandsaveresp == null ? void 0 : verifyandsaveresp.status) == 200) {
10532
- let responsetemp = (_a2 = verifyandsaveresp == null ? void 0 : verifyandsaveresp.data) == null ? void 0 : _a2.data;
10533
- let respData = {
10534
- Token: responsetemp.gateway_token,
10535
- Brand: responsetemp.card_data.brand,
10536
- ExpirationMonth: responsetemp.card_data.expire_mm,
10537
- ExpirationYear: responsetemp.card_data.expire_yy,
10538
- Last4: responsetemp.card_data.last4,
10539
- Bin: responsetemp.card_data.bin,
10540
- postalCode: cardData == null ? void 0 : cardData.zipCode,
10541
- stripe_3ds_auth_id: intentid
10542
- };
10498
+ } else {
10543
10499
  if (isPreAuth) {
10544
- handlePreAuth(respData);
10500
+ handlePreAuth({
10501
+ Token: tokenizeData,
10502
+ postalCode: cardData == null ? void 0 : cardData.zipCode,
10503
+ typeoftoken: "token"
10504
+ });
10545
10505
  } else {
10546
- handleCharge(respData);
10506
+ handleCharge(__spreadValues({
10507
+ Token: tokenizeData,
10508
+ postalCode: cardData == null ? void 0 : cardData.zipCode,
10509
+ typeoftoken: "token"
10510
+ }, intentid && { stripe_3ds_auth_id: intentid }));
10547
10511
  }
10548
10512
  }
10549
10513
  } catch (error2) {
10550
10514
  console.log(error2, "error");
10551
- setError(((_c2 = (_b2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _b2.data) == null ? void 0 : _c2.message) || "Something went wrong!");
10515
+ setError(((_b2 = (_a2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || "Something went wrong!");
10552
10516
  callback({
10553
- error: ((_e2 = (_d2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _d2.data) == null ? void 0 : _e2.message) || "Something went wrong!",
10554
- result: (_g2 = (_f2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _f2.data) == null ? void 0 : _g2.result,
10555
- statusCode: (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.status
10517
+ error: ((_d2 = (_c2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || "Something went wrong!",
10518
+ result: (_f2 = (_e2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _e2.data) == null ? void 0 : _f2.result,
10519
+ statusCode: (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.status
10556
10520
  });
10557
10521
  hideLoader();
10558
10522
  }
@@ -11558,7 +11522,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11558
11522
  /* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_g = cardData == null ? void 0 : cardData.zipCode) != null ? _g : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
11559
11523
  (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11560
11524
  pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
11561
- "Cards include a fee amount of ",
11525
+ "Credit cards include a fee amount of ",
11562
11526
  /* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11563
11527
  "."
11564
11528
  ] })
@@ -11639,7 +11603,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11639
11603
  /* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_j = cardData == null ? void 0 : cardData.zipCode) != null ? _j : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
11640
11604
  (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11641
11605
  pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
11642
- "Cards include a fee amount of ",
11606
+ "Credit cards include a fee amount of ",
11643
11607
  /* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11644
11608
  "."
11645
11609
  ] })
@@ -12227,7 +12191,7 @@ form#ACHPaymentForm .ach-scrl {
12227
12191
  }
12228
12192
  @media screen and (max-width: 375px) {
12229
12193
  .frac-payment-form-div .exp-date-year-container {
12230
- // flex-direction: column;
12194
+ flex-direction: column;
12231
12195
  }
12232
12196
  .parent-pay-container {
12233
12197
  padding: 10px;
@@ -12328,7 +12292,7 @@ padding:0px !important;
12328
12292
  padding: 0px 10px;
12329
12293
  }
12330
12294
  .toggle-num-wrapper-new .input-main-wrap-frac {
12331
- height: 38px;
12295
+ height: 36px;
12332
12296
  }
12333
12297
  .toggle-num-wrapper-new:focus {
12334
12298
  border: 1px solid #004eab !important;