@fractalpay/fractalpay-next-dev 0.0.282 → 0.0.283
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 +47 -152
- 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-dev",
|
|
42
|
-
version: "0.0.
|
|
42
|
+
version: "0.0.283",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -212,21 +212,6 @@ var LoaderStyle = (props) => {
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
|
|
216
|
-
.loader-text {
|
|
217
|
-
margin-top: 8px;
|
|
218
|
-
color: #1A1226;
|
|
219
|
-
text-transform: uppercase;
|
|
220
|
-
font-weight: 600;
|
|
221
|
-
font-family: 'IBM Plex Mono', monospace;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.loader-content {
|
|
225
|
-
display: flex;
|
|
226
|
-
flex-direction: column;
|
|
227
|
-
align-items: center;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
215
|
` });
|
|
231
216
|
};
|
|
232
217
|
var LoaderStyle_default = LoaderStyle;
|
|
@@ -234,17 +219,14 @@ var LoaderStyle_default = LoaderStyle;
|
|
|
234
219
|
// src/app/components/Loader/Loader.tsx
|
|
235
220
|
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
236
221
|
var Loader = (_a) => {
|
|
237
|
-
var _b = _a, { intensity = "light"
|
|
222
|
+
var _b = _a, { intensity = "light" } = _b, props = __objRest(_b, ["intensity"]);
|
|
238
223
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
239
224
|
/* @__PURE__ */ jsx2(LoaderStyle_default, {}),
|
|
240
|
-
(props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: `loader-${intensity}`, children: /* @__PURE__ */ jsxs("div", { className: "
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
/* @__PURE__ */ jsx2("div", {})
|
|
246
|
-
] }),
|
|
247
|
-
loaderText && /* @__PURE__ */ jsx2("div", { className: "loader-text", children: loaderText })
|
|
225
|
+
(props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: `loader-${intensity}`, children: /* @__PURE__ */ jsxs("div", { className: "lds-ellipsis", children: [
|
|
226
|
+
/* @__PURE__ */ jsx2("div", {}),
|
|
227
|
+
/* @__PURE__ */ jsx2("div", {}),
|
|
228
|
+
/* @__PURE__ */ jsx2("div", {}),
|
|
229
|
+
/* @__PURE__ */ jsx2("div", {})
|
|
248
230
|
] }) })
|
|
249
231
|
] });
|
|
250
232
|
};
|
|
@@ -254,8 +236,8 @@ var Loader_default = Loader;
|
|
|
254
236
|
var { name } = require_package();
|
|
255
237
|
var S3Url = "https://fractal-userdata-upload.s3.us-east-1.amazonaws.com/";
|
|
256
238
|
if (name === "@fractalpay/fractalpay-next-dev") {
|
|
257
|
-
|
|
258
|
-
|
|
239
|
+
masterBaseUrl = "https://api.dev.fractalpay.com/";
|
|
240
|
+
baseUrl = "https://widget.dev.fractalpay.com/";
|
|
259
241
|
fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
|
|
260
242
|
datacapUrl = "https://token-cert.dcap.com/v1/client";
|
|
261
243
|
threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
|
|
@@ -2491,22 +2473,6 @@ position:relative;
|
|
|
2491
2473
|
color: #c62828 !important;
|
|
2492
2474
|
}
|
|
2493
2475
|
|
|
2494
|
-
.surcharge-program-notice-text{
|
|
2495
|
-
margin: 10px 0 4px;
|
|
2496
|
-
padding: 8px 12px;
|
|
2497
|
-
background: #f6f6f7;
|
|
2498
|
-
border-radius: 8px;
|
|
2499
|
-
font-family: 'Inter', sans-serif;
|
|
2500
|
-
font-size: 12px;
|
|
2501
|
-
color: #727272;
|
|
2502
|
-
line-height: 1.5;
|
|
2503
|
-
}
|
|
2504
|
-
|
|
2505
|
-
.surcharge-program-notice-text-att {
|
|
2506
|
-
font-weight: 700;
|
|
2507
|
-
color: #161616;
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
2476
|
` });
|
|
2511
2477
|
}
|
|
2512
2478
|
|
|
@@ -2711,17 +2677,7 @@ function SuccessMszStyle() {
|
|
|
2711
2677
|
gap: 6px;
|
|
2712
2678
|
background-color: #161616;
|
|
2713
2679
|
color: #fff;
|
|
2714
|
-
}
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
#receipt-debit-note {
|
|
2718
|
-
font-family: 'Inter', sans-serif;
|
|
2719
|
-
font-size: 11px;
|
|
2720
|
-
color: #49B182;
|
|
2721
|
-
margin-top: 2px;
|
|
2722
|
-
}
|
|
2723
|
-
|
|
2724
|
-
` });
|
|
2680
|
+
}` });
|
|
2725
2681
|
}
|
|
2726
2682
|
|
|
2727
2683
|
// src/app/components/SuccessMessage/HandleSubmit.tsx
|
|
@@ -2745,7 +2701,7 @@ function HandleSubmit(event, key, tranId) {
|
|
|
2745
2701
|
|
|
2746
2702
|
// src/app/components/SuccessMessage/SuccessMsz.tsx
|
|
2747
2703
|
import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2748
|
-
function SuccessMsz({ onClose, tranId
|
|
2704
|
+
function SuccessMsz({ onClose, tranId }) {
|
|
2749
2705
|
return /* @__PURE__ */ jsxs5(Fragment5, { children: [
|
|
2750
2706
|
/* @__PURE__ */ jsx10(SuccessMszStyle, {}),
|
|
2751
2707
|
/* @__PURE__ */ jsxs5("div", { className: "payment-msg-container", children: [
|
|
@@ -2772,20 +2728,7 @@ function SuccessMsz({ onClose, tranId, isDebitAdjusted = false }) {
|
|
|
2772
2728
|
/* @__PURE__ */ jsx10("br", {}),
|
|
2773
2729
|
"was successful"
|
|
2774
2730
|
] }),
|
|
2775
|
-
/* @__PURE__ */
|
|
2776
|
-
"We\u2019ve processed your charge",
|
|
2777
|
-
isDebitAdjusted && /* @__PURE__ */ jsxs5(Fragment5, { children: [
|
|
2778
|
-
/* @__PURE__ */ jsx10("br", {}),
|
|
2779
|
-
/* @__PURE__ */ jsx10(
|
|
2780
|
-
"span",
|
|
2781
|
-
{
|
|
2782
|
-
id: "receipt-debit-note",
|
|
2783
|
-
className: "charge-payment-success-subtext",
|
|
2784
|
-
children: "No surcharge \u2014 debit card"
|
|
2785
|
-
}
|
|
2786
|
-
)
|
|
2787
|
-
] })
|
|
2788
|
-
] }),
|
|
2731
|
+
/* @__PURE__ */ jsx10("h6", { className: "charge-payment-success-subtext", children: "We\u2019ve processed your charge" }),
|
|
2789
2732
|
/* @__PURE__ */ jsxs5("div", { className: "charge-success-payment-button-div", children: [
|
|
2790
2733
|
/* @__PURE__ */ jsxs5("button", { className: "charge-success-btn1", onClick: (e) => HandleSubmit(e, "print", tranId), children: [
|
|
2791
2734
|
/* @__PURE__ */ jsxs5(
|
|
@@ -3647,7 +3590,6 @@ function GetPaymentPage(props) {
|
|
|
3647
3590
|
const [errorBankConsent, setErrorBankConsent] = useState4("");
|
|
3648
3591
|
const [saveACHConsent1, setSaveACHConsent1] = useState4(false);
|
|
3649
3592
|
const [errorBankConsentOther, setErrorBankConsentOther] = useState4("");
|
|
3650
|
-
const [loaderText, setLoderText] = useState4("");
|
|
3651
3593
|
const fractalpayClientKey = props.merchantPublicKey;
|
|
3652
3594
|
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
3653
3595
|
let visa2 = S3Url + "widget/visa-img.svg";
|
|
@@ -3672,7 +3614,6 @@ function GetPaymentPage(props) {
|
|
|
3672
3614
|
const [bankFeeAmount, setBankFeeAmount] = useState4(0);
|
|
3673
3615
|
const [paymentData, setPaymentData] = useState4();
|
|
3674
3616
|
let [tranId, setTranId] = useState4("");
|
|
3675
|
-
let [isDebitAdjusted, setIsDebitAdjusted] = useState4(false);
|
|
3676
3617
|
const tokenizerRef = useRef3(null);
|
|
3677
3618
|
const fractalStyles = {
|
|
3678
3619
|
input: {
|
|
@@ -3792,8 +3733,6 @@ function GetPaymentPage(props) {
|
|
|
3792
3733
|
setErrorBankConsent("");
|
|
3793
3734
|
setSaveACHConsent1(false);
|
|
3794
3735
|
setErrorBankConsentOther("");
|
|
3795
|
-
setLoderText("");
|
|
3796
|
-
setIsDebitAdjusted(false);
|
|
3797
3736
|
};
|
|
3798
3737
|
const handleShow = () => setShow(true);
|
|
3799
3738
|
const handletabchange = (id) => {
|
|
@@ -3903,7 +3842,7 @@ function GetPaymentPage(props) {
|
|
|
3903
3842
|
return Object.keys(errors).length > 0;
|
|
3904
3843
|
};
|
|
3905
3844
|
const submitFunc = async (e) => {
|
|
3906
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2
|
|
3845
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
|
|
3907
3846
|
e.preventDefault();
|
|
3908
3847
|
const el = document.activeElement;
|
|
3909
3848
|
if (el instanceof HTMLElement) {
|
|
@@ -3991,20 +3930,15 @@ function GetPaymentPage(props) {
|
|
|
3991
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.");
|
|
3992
3931
|
setLoading2(false);
|
|
3993
3932
|
}
|
|
3994
|
-
const card_issue_type = ((_i2 = tokenizeData == null ? void 0 : tokenizeData.bin_lookup_result) == null ? void 0 : _i2.card_issue_type) || null;
|
|
3995
|
-
if (card_issue_type === "Debit") {
|
|
3996
|
-
setLoderText("Processing Debit card without fee");
|
|
3997
|
-
}
|
|
3998
3933
|
console.log(tokenizeData, "tokenizeData");
|
|
3999
3934
|
const reqData = JSON.stringify(__spreadProps(__spreadValues({}, tokenizeData), {
|
|
4000
3935
|
isSaveCardChecked: saveCardInfo,
|
|
4001
3936
|
name: cardData == null ? void 0 : cardData.cardName,
|
|
4002
3937
|
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
4003
|
-
customer_id: props == null ? void 0 : props.customerId
|
|
4004
|
-
card_issue_type
|
|
3938
|
+
customer_id: props == null ? void 0 : props.customerId
|
|
4005
3939
|
}));
|
|
4006
3940
|
const reqData2 = JSON.stringify({
|
|
4007
|
-
"pre_sales_id": `${(
|
|
3941
|
+
"pre_sales_id": `${(_j2 = (_i2 = result == null ? void 0 : result.data) == null ? void 0 : _i2.data) == null ? void 0 : _j2.posSalesIdEncode}`,
|
|
4008
3942
|
"token": `${tokenizeData == null ? void 0 : tokenizeData.token}`,
|
|
4009
3943
|
"json_response": `${reqData}`
|
|
4010
3944
|
});
|
|
@@ -4020,13 +3954,11 @@ function GetPaymentPage(props) {
|
|
|
4020
3954
|
};
|
|
4021
3955
|
socketClient_default.emit("sendMessage", requestOptions2);
|
|
4022
3956
|
socketClient_default.on("chargeviafractalgateway", (data) => {
|
|
4023
|
-
var _a3
|
|
3957
|
+
var _a3;
|
|
4024
3958
|
if (isValidJson(data == null ? void 0 : data.data)) {
|
|
4025
3959
|
let paymentRes = JSON.parse(data == null ? void 0 : data.data);
|
|
4026
|
-
console.log(paymentRes, "paymentRes");
|
|
4027
3960
|
if (paymentRes == null ? void 0 : paymentRes.result) {
|
|
4028
3961
|
setTranId((_a3 = paymentRes == null ? void 0 : paymentRes.data) == null ? void 0 : _a3.transactionId);
|
|
4029
|
-
setIsDebitAdjusted((_b3 = paymentRes == null ? void 0 : paymentRes.data) == null ? void 0 : _b3.is_debit_adjusted);
|
|
4030
3962
|
setSuccess(true);
|
|
4031
3963
|
setLoading2(false);
|
|
4032
3964
|
} else {
|
|
@@ -4039,11 +3971,11 @@ function GetPaymentPage(props) {
|
|
|
4039
3971
|
});
|
|
4040
3972
|
} catch (err) {
|
|
4041
3973
|
setLoading2(false);
|
|
4042
|
-
setError(((
|
|
3974
|
+
setError(((_l2 = (_k2 = err == null ? void 0 : err.response) == null ? void 0 : _k2.data) == null ? void 0 : _l2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
4043
3975
|
}
|
|
4044
3976
|
} catch (err) {
|
|
4045
3977
|
setLoading2(false);
|
|
4046
|
-
setError(((
|
|
3978
|
+
setError(((_n2 = (_m2 = err == null ? void 0 : err.response) == null ? void 0 : _m2.data) == null ? void 0 : _n2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
4047
3979
|
}
|
|
4048
3980
|
} else {
|
|
4049
3981
|
try {
|
|
@@ -4061,7 +3993,7 @@ function GetPaymentPage(props) {
|
|
|
4061
3993
|
}
|
|
4062
3994
|
} catch (err) {
|
|
4063
3995
|
setLoading2(false);
|
|
4064
|
-
setError(((
|
|
3996
|
+
setError(((_p2 = (_o2 = err == null ? void 0 : err.response) == null ? void 0 : _o2.data) == null ? void 0 : _p2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
4065
3997
|
}
|
|
4066
3998
|
}
|
|
4067
3999
|
}
|
|
@@ -4384,9 +4316,9 @@ function GetPaymentPage(props) {
|
|
|
4384
4316
|
errorIframe && /* @__PURE__ */ jsx19("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx19(ErrorCardMessage_default, { error: errorIframe, onClose: () => {
|
|
4385
4317
|
setErrorIframe("");
|
|
4386
4318
|
} }) }),
|
|
4387
|
-
success && /* @__PURE__ */ jsx19(SuccessMsz, { onClose: handleClose, tranId
|
|
4319
|
+
success && /* @__PURE__ */ jsx19(SuccessMsz, { onClose: handleClose, tranId }),
|
|
4388
4320
|
!error && !errorIframe && !success && /* @__PURE__ */ jsxs11(Fragment11, { children: [
|
|
4389
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx19(Loader_default, { loading: loading || loading2 || loadingIframe
|
|
4321
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx19(Loader_default, { loading: loading || loading2 || loadingIframe }),
|
|
4390
4322
|
/* @__PURE__ */ jsx19("div", { className: "frac-card-payment-page frac-form", children: /* @__PURE__ */ jsxs11("div", { className: "parent-pay-container", children: [
|
|
4391
4323
|
/* @__PURE__ */ jsx19("span", { className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs11("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
4392
4324
|
/* @__PURE__ */ jsx19("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx19("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" }) }),
|
|
@@ -4411,38 +4343,17 @@ function GetPaymentPage(props) {
|
|
|
4411
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 }),
|
|
4412
4344
|
(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 })
|
|
4413
4345
|
] }),
|
|
4414
|
-
!loading &&
|
|
4415
|
-
/* @__PURE__ */ jsx19("small", { children: (paymentData == null ? void 0 : paymentData.surchargeProgram) == 1 ? "Surcharge" : (paymentData == null ? void 0 : paymentData.showSurcharge) ? "3% Card Fee" : "Cash Discount" }),
|
|
4416
|
-
/* @__PURE__ */ jsx19("p", { children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) })
|
|
4417
|
-
] }),
|
|
4418
|
-
!loading && activetab === "ach" && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs11("div", { className: "frac-cash-discount-fee", children: [
|
|
4419
|
-
/* @__PURE__ */ jsx19("small", { children: (paymentData == null ? void 0 : paymentData.surchargeProgram) == 1 ? "Savings" : "Cash Discount Savings" }),
|
|
4420
|
-
/* @__PURE__ */ jsx19("p", { children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) })
|
|
4421
|
-
] }),
|
|
4422
|
-
!loading && (props == null ? void 0 : props.pass_fee) && /* @__PURE__ */ jsxs11("div", { className: "", children: [
|
|
4346
|
+
!loading && /* @__PURE__ */ jsxs11("div", { className: "", children: [
|
|
4423
4347
|
activetab == "ach" && bankFeeAmount > 0 && /* @__PURE__ */ jsxs11("small", { className: "frac-fee-text", children: [
|
|
4424
4348
|
"There is a processing fee of ",
|
|
4425
4349
|
/* @__PURE__ */ jsx19("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
|
|
4426
4350
|
"."
|
|
4427
4351
|
] }),
|
|
4428
|
-
(activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs11(
|
|
4429
|
-
"
|
|
4430
|
-
{
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
children: [
|
|
4434
|
-
"A 3% processing surcharge is applied to all credit card transactions. Debit card payments are processed for",
|
|
4435
|
-
" ",
|
|
4436
|
-
/* @__PURE__ */ jsxs11("span", { className: "surcharge-program-notice-text-att", children: [
|
|
4437
|
-
"$",
|
|
4438
|
-
Number(cashDiscount).toLocaleString("en-US", {
|
|
4439
|
-
minimumFractionDigits: 2,
|
|
4440
|
-
maximumFractionDigits: 2
|
|
4441
|
-
})
|
|
4442
|
-
] })
|
|
4443
|
-
]
|
|
4444
|
-
}
|
|
4445
|
-
)
|
|
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
|
+
] })
|
|
4446
4357
|
] })
|
|
4447
4358
|
] })
|
|
4448
4359
|
] }),
|
|
@@ -7655,7 +7566,6 @@ function PartialPayment(props) {
|
|
|
7655
7566
|
const [errorBankConsent, setErrorBankConsent] = useState8("");
|
|
7656
7567
|
const [saveACHConsent1, setSaveACHConsent1] = useState8(false);
|
|
7657
7568
|
const [errorBankConsentOther, setErrorBankConsentOther] = useState8("");
|
|
7658
|
-
const [loaderText, setLoderText] = useState8("");
|
|
7659
7569
|
const tokenizerRef = useRef8(null);
|
|
7660
7570
|
const fractalStyles = {
|
|
7661
7571
|
input: {
|
|
@@ -7771,7 +7681,6 @@ function PartialPayment(props) {
|
|
|
7771
7681
|
setErrorBankConsent("");
|
|
7772
7682
|
setSaveACHConsent1(false);
|
|
7773
7683
|
setErrorBankConsentOther("");
|
|
7774
|
-
setLoderText("");
|
|
7775
7684
|
};
|
|
7776
7685
|
const handleShow = () => setShow(true);
|
|
7777
7686
|
const handletabchange = (id) => {
|
|
@@ -7882,7 +7791,7 @@ function PartialPayment(props) {
|
|
|
7882
7791
|
return Object.keys(errors).length > 0;
|
|
7883
7792
|
};
|
|
7884
7793
|
const submitFunc = async (e) => {
|
|
7885
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2
|
|
7794
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
|
|
7886
7795
|
e.preventDefault();
|
|
7887
7796
|
const el = document.activeElement;
|
|
7888
7797
|
if (el instanceof HTMLElement) {
|
|
@@ -7957,20 +7866,15 @@ function PartialPayment(props) {
|
|
|
7957
7866
|
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),
|
|
7958
7867
|
session_key: (_f2 = (_e2 = sesionResult == null ? void 0 : sesionResult.data) == null ? void 0 : _e2.data) == null ? void 0 : _f2.session_key
|
|
7959
7868
|
});
|
|
7960
|
-
const card_issue_type = ((_g2 = tokenizeData == null ? void 0 : tokenizeData.bin_lookup_result) == null ? void 0 : _g2.card_issue_type) || null;
|
|
7961
|
-
if (card_issue_type === "Debit") {
|
|
7962
|
-
setLoderText("Processing Debit card without fee");
|
|
7963
|
-
}
|
|
7964
7869
|
const reqData = JSON.stringify(__spreadProps(__spreadValues({}, tokenizeData), {
|
|
7965
7870
|
isSaveCardChecked: saveCardInfo,
|
|
7966
7871
|
name: cardData == null ? void 0 : cardData.cardName,
|
|
7967
7872
|
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
7968
7873
|
customer_id: props == null ? void 0 : props.customerId,
|
|
7969
|
-
partial_amount: partialAmount && !partialError ? partialAmount : aftertaxAmount
|
|
7970
|
-
card_issue_type
|
|
7874
|
+
partial_amount: partialAmount && !partialError ? partialAmount : aftertaxAmount
|
|
7971
7875
|
}));
|
|
7972
7876
|
const reqData2 = JSON.stringify({
|
|
7973
|
-
"pre_sales_id": `${(
|
|
7877
|
+
"pre_sales_id": `${(_g2 = paymentData == null ? void 0 : paymentData.orderDetails) == null ? void 0 : _g2.orderId}`,
|
|
7974
7878
|
"token": `${tokenizeData == null ? void 0 : tokenizeData.token}`,
|
|
7975
7879
|
"json_response": `${reqData}`
|
|
7976
7880
|
});
|
|
@@ -8003,11 +7907,11 @@ function PartialPayment(props) {
|
|
|
8003
7907
|
});
|
|
8004
7908
|
} catch (err) {
|
|
8005
7909
|
setLoading2(false);
|
|
8006
|
-
setError(((
|
|
7910
|
+
setError(((_i2 = (_h2 = err == null ? void 0 : err.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
8007
7911
|
}
|
|
8008
7912
|
} catch (err) {
|
|
8009
7913
|
setLoading2(false);
|
|
8010
|
-
setError(((
|
|
7914
|
+
setError(((_k2 = (_j2 = err == null ? void 0 : err.response) == null ? void 0 : _j2.data) == null ? void 0 : _k2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
8011
7915
|
}
|
|
8012
7916
|
} else {
|
|
8013
7917
|
try {
|
|
@@ -8024,7 +7928,7 @@ function PartialPayment(props) {
|
|
|
8024
7928
|
}
|
|
8025
7929
|
} catch (err) {
|
|
8026
7930
|
setLoading2(false);
|
|
8027
|
-
setError(((
|
|
7931
|
+
setError(((_m2 = (_l2 = err == null ? void 0 : err.response) == null ? void 0 : _l2.data) == null ? void 0 : _m2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
8028
7932
|
}
|
|
8029
7933
|
}
|
|
8030
7934
|
}
|
|
@@ -8391,7 +8295,7 @@ function PartialPayment(props) {
|
|
|
8391
8295
|
} }) }),
|
|
8392
8296
|
success && /* @__PURE__ */ jsx28(SuccessMsz, { onClose: handleClose, tranId }),
|
|
8393
8297
|
!error && !success && !errorIframe && /* @__PURE__ */ jsxs17(Fragment17, { children: [
|
|
8394
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx28(Loader_default, { loading: loading || loading2 || loadingIframe
|
|
8298
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx28(Loader_default, { loading: loading || loading2 || loadingIframe }),
|
|
8395
8299
|
/* @__PURE__ */ jsx28("div", { className: "frac-card-payment-page frac-form", children: /* @__PURE__ */ jsxs17("div", { className: "parent-pay-container", children: [
|
|
8396
8300
|
/* @__PURE__ */ jsx28("span", { className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs17("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
8397
8301
|
/* @__PURE__ */ jsx28("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx28("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" }) }),
|
|
@@ -8412,28 +8316,19 @@ function PartialPayment(props) {
|
|
|
8412
8316
|
/* @__PURE__ */ jsxs17("div", { className: "amt-pay-con", children: [
|
|
8413
8317
|
/* @__PURE__ */ jsx28("div", { className: "pay-amount-conatiner", children: /* @__PURE__ */ jsx28("small", { className: "pay-payment-amount", children: "Select payment type" }) }),
|
|
8414
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 }) }),
|
|
8415
|
-
|
|
8416
|
-
/* @__PURE__ */
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
"
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
"$",
|
|
8429
|
-
Number(cashDiscount).toLocaleString("en-US", {
|
|
8430
|
-
minimumFractionDigits: 2,
|
|
8431
|
-
maximumFractionDigits: 2
|
|
8432
|
-
})
|
|
8433
|
-
] })
|
|
8434
|
-
]
|
|
8435
|
-
}
|
|
8436
|
-
) }),
|
|
8319
|
+
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
|
+
/* @__PURE__ */ jsxs17("small", { children: [
|
|
8321
|
+
activetab === "card" ? "Cash Discount" : "Cash Discount Savings",
|
|
8322
|
+
" "
|
|
8323
|
+
] }),
|
|
8324
|
+
/* @__PURE__ */ jsx28("p", { children: formatUSD((Number(aftertaxAmount) - cashDiscount).toFixed(2)) })
|
|
8325
|
+
] }) : null : cashDiscount && cashDiscount > 0 && (props == null ? void 0 : props.pass_fee) && activetab === "card" ? /* @__PURE__ */ jsxs17("div", { className: "frac-cash-discount-fee", children: [
|
|
8326
|
+
/* @__PURE__ */ jsxs17("small", { children: [
|
|
8327
|
+
activetab === "card" ? "Surcharge" : null,
|
|
8328
|
+
" "
|
|
8329
|
+
] }),
|
|
8330
|
+
/* @__PURE__ */ jsx28("p", { children: formatUSD((Number(aftertaxAmount) - cashDiscount).toFixed(2)) })
|
|
8331
|
+
] }) : null,
|
|
8437
8332
|
(props == null ? void 0 : props.allowPartial) && /* @__PURE__ */ jsxs17("div", { className: "frac-partial-payment-input", children: [
|
|
8438
8333
|
/* @__PURE__ */ jsx28("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
8439
8334
|
/* @__PURE__ */ jsx28(
|