@fractalpay/fractalpay-next-dev 0.0.280 → 0.0.282
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 +152 -47
- 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.282",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -212,6 +212,21 @@ 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
|
+
|
|
215
230
|
` });
|
|
216
231
|
};
|
|
217
232
|
var LoaderStyle_default = LoaderStyle;
|
|
@@ -219,14 +234,17 @@ var LoaderStyle_default = LoaderStyle;
|
|
|
219
234
|
// src/app/components/Loader/Loader.tsx
|
|
220
235
|
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
221
236
|
var Loader = (_a) => {
|
|
222
|
-
var _b = _a, { intensity = "light" } = _b, props = __objRest(_b, ["intensity"]);
|
|
237
|
+
var _b = _a, { intensity = "light", loaderText } = _b, props = __objRest(_b, ["intensity", "loaderText"]);
|
|
223
238
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
224
239
|
/* @__PURE__ */ jsx2(LoaderStyle_default, {}),
|
|
225
|
-
(props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: `loader-${intensity}`, children: /* @__PURE__ */ jsxs("div", { className: "
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
240
|
+
(props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: `loader-${intensity}`, children: /* @__PURE__ */ jsxs("div", { className: "loader-content", children: [
|
|
241
|
+
/* @__PURE__ */ jsxs("div", { className: "lds-ellipsis", children: [
|
|
242
|
+
/* @__PURE__ */ jsx2("div", {}),
|
|
243
|
+
/* @__PURE__ */ jsx2("div", {}),
|
|
244
|
+
/* @__PURE__ */ jsx2("div", {}),
|
|
245
|
+
/* @__PURE__ */ jsx2("div", {})
|
|
246
|
+
] }),
|
|
247
|
+
loaderText && /* @__PURE__ */ jsx2("div", { className: "loader-text", children: loaderText })
|
|
230
248
|
] }) })
|
|
231
249
|
] });
|
|
232
250
|
};
|
|
@@ -236,8 +254,8 @@ var Loader_default = Loader;
|
|
|
236
254
|
var { name } = require_package();
|
|
237
255
|
var S3Url = "https://fractal-userdata-upload.s3.us-east-1.amazonaws.com/";
|
|
238
256
|
if (name === "@fractalpay/fractalpay-next-dev") {
|
|
239
|
-
baseUrl = "http://
|
|
240
|
-
masterBaseUrl = "http://
|
|
257
|
+
baseUrl = "http://localhost:8082/";
|
|
258
|
+
masterBaseUrl = "http://localhost:8081/";
|
|
241
259
|
fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
|
|
242
260
|
datacapUrl = "https://token-cert.dcap.com/v1/client";
|
|
243
261
|
threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
|
|
@@ -2473,6 +2491,22 @@ position:relative;
|
|
|
2473
2491
|
color: #c62828 !important;
|
|
2474
2492
|
}
|
|
2475
2493
|
|
|
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
|
+
|
|
2476
2510
|
` });
|
|
2477
2511
|
}
|
|
2478
2512
|
|
|
@@ -2677,7 +2711,17 @@ function SuccessMszStyle() {
|
|
|
2677
2711
|
gap: 6px;
|
|
2678
2712
|
background-color: #161616;
|
|
2679
2713
|
color: #fff;
|
|
2680
|
-
}
|
|
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
|
+
` });
|
|
2681
2725
|
}
|
|
2682
2726
|
|
|
2683
2727
|
// src/app/components/SuccessMessage/HandleSubmit.tsx
|
|
@@ -2701,7 +2745,7 @@ function HandleSubmit(event, key, tranId) {
|
|
|
2701
2745
|
|
|
2702
2746
|
// src/app/components/SuccessMessage/SuccessMsz.tsx
|
|
2703
2747
|
import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2704
|
-
function SuccessMsz({ onClose, tranId }) {
|
|
2748
|
+
function SuccessMsz({ onClose, tranId, isDebitAdjusted = false }) {
|
|
2705
2749
|
return /* @__PURE__ */ jsxs5(Fragment5, { children: [
|
|
2706
2750
|
/* @__PURE__ */ jsx10(SuccessMszStyle, {}),
|
|
2707
2751
|
/* @__PURE__ */ jsxs5("div", { className: "payment-msg-container", children: [
|
|
@@ -2728,7 +2772,20 @@ function SuccessMsz({ onClose, tranId }) {
|
|
|
2728
2772
|
/* @__PURE__ */ jsx10("br", {}),
|
|
2729
2773
|
"was successful"
|
|
2730
2774
|
] }),
|
|
2731
|
-
/* @__PURE__ */
|
|
2775
|
+
/* @__PURE__ */ jsxs5("h6", { className: "charge-payment-success-subtext", children: [
|
|
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
|
+
] }),
|
|
2732
2789
|
/* @__PURE__ */ jsxs5("div", { className: "charge-success-payment-button-div", children: [
|
|
2733
2790
|
/* @__PURE__ */ jsxs5("button", { className: "charge-success-btn1", onClick: (e) => HandleSubmit(e, "print", tranId), children: [
|
|
2734
2791
|
/* @__PURE__ */ jsxs5(
|
|
@@ -3590,6 +3647,7 @@ function GetPaymentPage(props) {
|
|
|
3590
3647
|
const [errorBankConsent, setErrorBankConsent] = useState4("");
|
|
3591
3648
|
const [saveACHConsent1, setSaveACHConsent1] = useState4(false);
|
|
3592
3649
|
const [errorBankConsentOther, setErrorBankConsentOther] = useState4("");
|
|
3650
|
+
const [loaderText, setLoderText] = useState4("");
|
|
3593
3651
|
const fractalpayClientKey = props.merchantPublicKey;
|
|
3594
3652
|
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
3595
3653
|
let visa2 = S3Url + "widget/visa-img.svg";
|
|
@@ -3614,6 +3672,7 @@ function GetPaymentPage(props) {
|
|
|
3614
3672
|
const [bankFeeAmount, setBankFeeAmount] = useState4(0);
|
|
3615
3673
|
const [paymentData, setPaymentData] = useState4();
|
|
3616
3674
|
let [tranId, setTranId] = useState4("");
|
|
3675
|
+
let [isDebitAdjusted, setIsDebitAdjusted] = useState4(false);
|
|
3617
3676
|
const tokenizerRef = useRef3(null);
|
|
3618
3677
|
const fractalStyles = {
|
|
3619
3678
|
input: {
|
|
@@ -3733,6 +3792,8 @@ function GetPaymentPage(props) {
|
|
|
3733
3792
|
setErrorBankConsent("");
|
|
3734
3793
|
setSaveACHConsent1(false);
|
|
3735
3794
|
setErrorBankConsentOther("");
|
|
3795
|
+
setLoderText("");
|
|
3796
|
+
setIsDebitAdjusted(false);
|
|
3736
3797
|
};
|
|
3737
3798
|
const handleShow = () => setShow(true);
|
|
3738
3799
|
const handletabchange = (id) => {
|
|
@@ -3842,7 +3903,7 @@ function GetPaymentPage(props) {
|
|
|
3842
3903
|
return Object.keys(errors).length > 0;
|
|
3843
3904
|
};
|
|
3844
3905
|
const submitFunc = async (e) => {
|
|
3845
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
|
|
3906
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2;
|
|
3846
3907
|
e.preventDefault();
|
|
3847
3908
|
const el = document.activeElement;
|
|
3848
3909
|
if (el instanceof HTMLElement) {
|
|
@@ -3930,15 +3991,20 @@ function GetPaymentPage(props) {
|
|
|
3930
3991
|
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
3992
|
setLoading2(false);
|
|
3932
3993
|
}
|
|
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
|
+
}
|
|
3933
3998
|
console.log(tokenizeData, "tokenizeData");
|
|
3934
3999
|
const reqData = JSON.stringify(__spreadProps(__spreadValues({}, tokenizeData), {
|
|
3935
4000
|
isSaveCardChecked: saveCardInfo,
|
|
3936
4001
|
name: cardData == null ? void 0 : cardData.cardName,
|
|
3937
4002
|
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
3938
|
-
customer_id: props == null ? void 0 : props.customerId
|
|
4003
|
+
customer_id: props == null ? void 0 : props.customerId,
|
|
4004
|
+
card_issue_type
|
|
3939
4005
|
}));
|
|
3940
4006
|
const reqData2 = JSON.stringify({
|
|
3941
|
-
"pre_sales_id": `${(
|
|
4007
|
+
"pre_sales_id": `${(_k2 = (_j2 = result == null ? void 0 : result.data) == null ? void 0 : _j2.data) == null ? void 0 : _k2.posSalesIdEncode}`,
|
|
3942
4008
|
"token": `${tokenizeData == null ? void 0 : tokenizeData.token}`,
|
|
3943
4009
|
"json_response": `${reqData}`
|
|
3944
4010
|
});
|
|
@@ -3954,11 +4020,13 @@ function GetPaymentPage(props) {
|
|
|
3954
4020
|
};
|
|
3955
4021
|
socketClient_default.emit("sendMessage", requestOptions2);
|
|
3956
4022
|
socketClient_default.on("chargeviafractalgateway", (data) => {
|
|
3957
|
-
var _a3;
|
|
4023
|
+
var _a3, _b3;
|
|
3958
4024
|
if (isValidJson(data == null ? void 0 : data.data)) {
|
|
3959
4025
|
let paymentRes = JSON.parse(data == null ? void 0 : data.data);
|
|
4026
|
+
console.log(paymentRes, "paymentRes");
|
|
3960
4027
|
if (paymentRes == null ? void 0 : paymentRes.result) {
|
|
3961
4028
|
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);
|
|
3962
4030
|
setSuccess(true);
|
|
3963
4031
|
setLoading2(false);
|
|
3964
4032
|
} else {
|
|
@@ -3971,11 +4039,11 @@ function GetPaymentPage(props) {
|
|
|
3971
4039
|
});
|
|
3972
4040
|
} catch (err) {
|
|
3973
4041
|
setLoading2(false);
|
|
3974
|
-
setError(((
|
|
4042
|
+
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.");
|
|
3975
4043
|
}
|
|
3976
4044
|
} catch (err) {
|
|
3977
4045
|
setLoading2(false);
|
|
3978
|
-
setError(((
|
|
4046
|
+
setError(((_o2 = (_n2 = err == null ? void 0 : err.response) == null ? void 0 : _n2.data) == null ? void 0 : _o2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
3979
4047
|
}
|
|
3980
4048
|
} else {
|
|
3981
4049
|
try {
|
|
@@ -3993,7 +4061,7 @@ function GetPaymentPage(props) {
|
|
|
3993
4061
|
}
|
|
3994
4062
|
} catch (err) {
|
|
3995
4063
|
setLoading2(false);
|
|
3996
|
-
setError(((
|
|
4064
|
+
setError(((_q2 = (_p2 = err == null ? void 0 : err.response) == null ? void 0 : _p2.data) == null ? void 0 : _q2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
3997
4065
|
}
|
|
3998
4066
|
}
|
|
3999
4067
|
}
|
|
@@ -4316,9 +4384,9 @@ function GetPaymentPage(props) {
|
|
|
4316
4384
|
errorIframe && /* @__PURE__ */ jsx19("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx19(ErrorCardMessage_default, { error: errorIframe, onClose: () => {
|
|
4317
4385
|
setErrorIframe("");
|
|
4318
4386
|
} }) }),
|
|
4319
|
-
success && /* @__PURE__ */ jsx19(SuccessMsz, { onClose: handleClose, tranId }),
|
|
4387
|
+
success && /* @__PURE__ */ jsx19(SuccessMsz, { onClose: handleClose, tranId, isDebitAdjusted }),
|
|
4320
4388
|
!error && !errorIframe && !success && /* @__PURE__ */ jsxs11(Fragment11, { children: [
|
|
4321
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx19(Loader_default, { loading: loading || loading2 || loadingIframe }),
|
|
4389
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx19(Loader_default, { loading: loading || loading2 || loadingIframe, loaderText }),
|
|
4322
4390
|
/* @__PURE__ */ jsx19("div", { className: "frac-card-payment-page frac-form", children: /* @__PURE__ */ jsxs11("div", { className: "parent-pay-container", children: [
|
|
4323
4391
|
/* @__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: [
|
|
4324
4392
|
/* @__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" }) }),
|
|
@@ -4343,17 +4411,38 @@ function GetPaymentPage(props) {
|
|
|
4343
4411
|
(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 }),
|
|
4344
4412
|
(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
4413
|
] }),
|
|
4346
|
-
!loading && /* @__PURE__ */ jsxs11("div", { className: "", children: [
|
|
4414
|
+
!loading && (activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs11("div", { className: "frac-cash-discount-fee", children: [
|
|
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: [
|
|
4347
4423
|
activetab == "ach" && bankFeeAmount > 0 && /* @__PURE__ */ jsxs11("small", { className: "frac-fee-text", children: [
|
|
4348
4424
|
"There is a processing fee of ",
|
|
4349
4425
|
/* @__PURE__ */ jsx19("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
|
|
4350
4426
|
"."
|
|
4351
4427
|
] }),
|
|
4352
|
-
(activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs11(
|
|
4353
|
-
"
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4428
|
+
(activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs11(
|
|
4429
|
+
"div",
|
|
4430
|
+
{
|
|
4431
|
+
id: "surcharge-program-notice",
|
|
4432
|
+
className: "surcharge-program-notice-text",
|
|
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
|
+
)
|
|
4357
4446
|
] })
|
|
4358
4447
|
] })
|
|
4359
4448
|
] }),
|
|
@@ -7566,6 +7655,7 @@ function PartialPayment(props) {
|
|
|
7566
7655
|
const [errorBankConsent, setErrorBankConsent] = useState8("");
|
|
7567
7656
|
const [saveACHConsent1, setSaveACHConsent1] = useState8(false);
|
|
7568
7657
|
const [errorBankConsentOther, setErrorBankConsentOther] = useState8("");
|
|
7658
|
+
const [loaderText, setLoderText] = useState8("");
|
|
7569
7659
|
const tokenizerRef = useRef8(null);
|
|
7570
7660
|
const fractalStyles = {
|
|
7571
7661
|
input: {
|
|
@@ -7681,6 +7771,7 @@ function PartialPayment(props) {
|
|
|
7681
7771
|
setErrorBankConsent("");
|
|
7682
7772
|
setSaveACHConsent1(false);
|
|
7683
7773
|
setErrorBankConsentOther("");
|
|
7774
|
+
setLoderText("");
|
|
7684
7775
|
};
|
|
7685
7776
|
const handleShow = () => setShow(true);
|
|
7686
7777
|
const handletabchange = (id) => {
|
|
@@ -7791,7 +7882,7 @@ function PartialPayment(props) {
|
|
|
7791
7882
|
return Object.keys(errors).length > 0;
|
|
7792
7883
|
};
|
|
7793
7884
|
const submitFunc = async (e) => {
|
|
7794
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
|
|
7885
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2;
|
|
7795
7886
|
e.preventDefault();
|
|
7796
7887
|
const el = document.activeElement;
|
|
7797
7888
|
if (el instanceof HTMLElement) {
|
|
@@ -7866,15 +7957,20 @@ function PartialPayment(props) {
|
|
|
7866
7957
|
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),
|
|
7867
7958
|
session_key: (_f2 = (_e2 = sesionResult == null ? void 0 : sesionResult.data) == null ? void 0 : _e2.data) == null ? void 0 : _f2.session_key
|
|
7868
7959
|
});
|
|
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
|
+
}
|
|
7869
7964
|
const reqData = JSON.stringify(__spreadProps(__spreadValues({}, tokenizeData), {
|
|
7870
7965
|
isSaveCardChecked: saveCardInfo,
|
|
7871
7966
|
name: cardData == null ? void 0 : cardData.cardName,
|
|
7872
7967
|
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
7873
7968
|
customer_id: props == null ? void 0 : props.customerId,
|
|
7874
|
-
partial_amount: partialAmount && !partialError ? partialAmount : aftertaxAmount
|
|
7969
|
+
partial_amount: partialAmount && !partialError ? partialAmount : aftertaxAmount,
|
|
7970
|
+
card_issue_type
|
|
7875
7971
|
}));
|
|
7876
7972
|
const reqData2 = JSON.stringify({
|
|
7877
|
-
"pre_sales_id": `${(
|
|
7973
|
+
"pre_sales_id": `${(_h2 = paymentData == null ? void 0 : paymentData.orderDetails) == null ? void 0 : _h2.orderId}`,
|
|
7878
7974
|
"token": `${tokenizeData == null ? void 0 : tokenizeData.token}`,
|
|
7879
7975
|
"json_response": `${reqData}`
|
|
7880
7976
|
});
|
|
@@ -7907,11 +8003,11 @@ function PartialPayment(props) {
|
|
|
7907
8003
|
});
|
|
7908
8004
|
} catch (err) {
|
|
7909
8005
|
setLoading2(false);
|
|
7910
|
-
setError(((
|
|
8006
|
+
setError(((_j2 = (_i2 = err == null ? void 0 : err.response) == null ? void 0 : _i2.data) == null ? void 0 : _j2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
7911
8007
|
}
|
|
7912
8008
|
} catch (err) {
|
|
7913
8009
|
setLoading2(false);
|
|
7914
|
-
setError(((
|
|
8010
|
+
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.");
|
|
7915
8011
|
}
|
|
7916
8012
|
} else {
|
|
7917
8013
|
try {
|
|
@@ -7928,7 +8024,7 @@ function PartialPayment(props) {
|
|
|
7928
8024
|
}
|
|
7929
8025
|
} catch (err) {
|
|
7930
8026
|
setLoading2(false);
|
|
7931
|
-
setError(((
|
|
8027
|
+
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.");
|
|
7932
8028
|
}
|
|
7933
8029
|
}
|
|
7934
8030
|
}
|
|
@@ -8295,7 +8391,7 @@ function PartialPayment(props) {
|
|
|
8295
8391
|
} }) }),
|
|
8296
8392
|
success && /* @__PURE__ */ jsx28(SuccessMsz, { onClose: handleClose, tranId }),
|
|
8297
8393
|
!error && !success && !errorIframe && /* @__PURE__ */ jsxs17(Fragment17, { children: [
|
|
8298
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx28(Loader_default, { loading: loading || loading2 || loadingIframe }),
|
|
8394
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx28(Loader_default, { loading: loading || loading2 || loadingIframe, loaderText }),
|
|
8299
8395
|
/* @__PURE__ */ jsx28("div", { className: "frac-card-payment-page frac-form", children: /* @__PURE__ */ jsxs17("div", { className: "parent-pay-container", children: [
|
|
8300
8396
|
/* @__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: [
|
|
8301
8397
|
/* @__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" }) }),
|
|
@@ -8316,19 +8412,28 @@ function PartialPayment(props) {
|
|
|
8316
8412
|
/* @__PURE__ */ jsxs17("div", { className: "amt-pay-con", children: [
|
|
8317
8413
|
/* @__PURE__ */ jsx28("div", { className: "pay-amount-conatiner", children: /* @__PURE__ */ jsx28("small", { className: "pay-payment-amount", children: "Select payment type" }) }),
|
|
8318
8414
|
/* @__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 }) }),
|
|
8319
|
-
|
|
8320
|
-
/* @__PURE__ */
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8415
|
+
!loading && (activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs17("div", { className: "frac-cash-discount-fee", children: [
|
|
8416
|
+
/* @__PURE__ */ jsx28("small", { children: (paymentData == null ? void 0 : paymentData.surchargeProgram) == 1 ? "Surcharge" : (paymentData == null ? void 0 : paymentData.showSurcharge) ? "3% Card Fee" : "Cash Discount" }),
|
|
8417
|
+
/* @__PURE__ */ jsx28("p", { children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) })
|
|
8418
|
+
] }),
|
|
8419
|
+
!loading && (props == null ? void 0 : props.pass_fee) && /* @__PURE__ */ jsx28("div", { className: "", children: (activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs17(
|
|
8420
|
+
"div",
|
|
8421
|
+
{
|
|
8422
|
+
id: "surcharge-program-notice",
|
|
8423
|
+
className: "surcharge-program-notice-text",
|
|
8424
|
+
children: [
|
|
8425
|
+
"A 3% processing surcharge is applied to all credit card transactions. Debit card payments are processed for",
|
|
8426
|
+
" ",
|
|
8427
|
+
/* @__PURE__ */ jsxs17("span", { className: "surcharge-program-notice-text-att", children: [
|
|
8428
|
+
"$",
|
|
8429
|
+
Number(cashDiscount).toLocaleString("en-US", {
|
|
8430
|
+
minimumFractionDigits: 2,
|
|
8431
|
+
maximumFractionDigits: 2
|
|
8432
|
+
})
|
|
8433
|
+
] })
|
|
8434
|
+
]
|
|
8435
|
+
}
|
|
8436
|
+
) }),
|
|
8332
8437
|
(props == null ? void 0 : props.allowPartial) && /* @__PURE__ */ jsxs17("div", { className: "frac-partial-payment-input", children: [
|
|
8333
8438
|
/* @__PURE__ */ jsx28("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
8334
8439
|
/* @__PURE__ */ jsx28(
|