@fractalpay/fractalpay-next-dev 0.0.244 → 0.0.246
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 +16 -42
- package/dist/index.js +443 -1256
- 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.246",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -113,25 +113,8 @@ import { useState, useEffect } from "react";
|
|
|
113
113
|
import { jsx } from "react/jsx-runtime";
|
|
114
114
|
var LoaderStyle = (props) => {
|
|
115
115
|
return /* @__PURE__ */ jsx("style", { children: `
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
position: fixed; /* Fixed position to cover the viewport */
|
|
119
|
-
top: 0;
|
|
120
|
-
left: 0;
|
|
121
|
-
width: 100%;
|
|
122
|
-
height: 100%;
|
|
123
|
-
display: flex;
|
|
124
|
-
justify-content: center;
|
|
125
|
-
align-items: center;
|
|
126
|
-
/* background: rgba(255, 255, 0, 0.01); Adjust the blur effect */
|
|
127
|
-
background-color: rgba(31, 29, 29, 0.52); /* Semi-transparent black background */
|
|
128
|
-
|
|
129
|
-
backdrop-filter: blur(0.5px); /* Blur effect */
|
|
130
|
-
z-index: 999999999999 !important; /* Ensure it's on top of other elements */
|
|
131
|
-
transform: translate(0%, 0%) !important
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.loader-dark {
|
|
116
|
+
|
|
117
|
+
.loader {
|
|
135
118
|
position: fixed; /* Fixed position to cover the viewport */
|
|
136
119
|
top: 0;
|
|
137
120
|
left: 0;
|
|
@@ -143,7 +126,7 @@ var LoaderStyle = (props) => {
|
|
|
143
126
|
/* background: rgba(255, 255, 0, 0.01); Adjust the blur effect */
|
|
144
127
|
background-color: rgba(31, 29, 29, 0.52); /* Semi-transparent black background */
|
|
145
128
|
|
|
146
|
-
backdrop-filter: blur(
|
|
129
|
+
backdrop-filter: blur(.5px); /* Blur effect */
|
|
147
130
|
z-index: 999999999999 !important; /* Ensure it's on top of other elements */
|
|
148
131
|
transform: translate(0%, 0%) !important
|
|
149
132
|
}
|
|
@@ -218,11 +201,10 @@ var LoaderStyle_default = LoaderStyle;
|
|
|
218
201
|
|
|
219
202
|
// src/app/components/Loader/Loader.tsx
|
|
220
203
|
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
221
|
-
var Loader = (
|
|
222
|
-
var _b = _a, { intensity = "light" } = _b, props = __objRest(_b, ["intensity"]);
|
|
204
|
+
var Loader = (props) => {
|
|
223
205
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
224
206
|
/* @__PURE__ */ jsx2(LoaderStyle_default, {}),
|
|
225
|
-
(props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className:
|
|
207
|
+
(props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: "loader", children: /* @__PURE__ */ jsxs("div", { className: "lds-ellipsis", children: [
|
|
226
208
|
/* @__PURE__ */ jsx2("div", {}),
|
|
227
209
|
/* @__PURE__ */ jsx2("div", {}),
|
|
228
210
|
/* @__PURE__ */ jsx2("div", {}),
|
|
@@ -2926,7 +2908,7 @@ function ErrorCardMszStyle() {
|
|
|
2926
2908
|
|
|
2927
2909
|
// src/app/components/ErrorCardMessage/ErrorCardMessage.tsx
|
|
2928
2910
|
import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2929
|
-
var ErrorCardMessage = ({ onClose, error
|
|
2911
|
+
var ErrorCardMessage = ({ onClose, error }) => {
|
|
2930
2912
|
return /* @__PURE__ */ jsxs6(Fragment6, { children: [
|
|
2931
2913
|
/* @__PURE__ */ jsx12(ErrorCardMszStyle, {}),
|
|
2932
2914
|
/* @__PURE__ */ jsx12("div", { className: "card-error", children: /* @__PURE__ */ jsx12("div", { className: "payment-error-container", children: /* @__PURE__ */ jsxs6("div", { className: "error-icon", children: [
|
|
@@ -2935,7 +2917,7 @@ var ErrorCardMessage = ({ onClose, error, autoTrigger = false }) => {
|
|
|
2935
2917
|
/* @__PURE__ */ jsx12("div", { className: "payment-error-text", children: error }),
|
|
2936
2918
|
/* @__PURE__ */ jsx12("div", { className: "thank-you-text", children: "Try again later " })
|
|
2937
2919
|
] }),
|
|
2938
|
-
|
|
2920
|
+
/* @__PURE__ */ jsx12("div", { className: "error-btn-div", children: /* @__PURE__ */ jsx12("button", { onClick: onClose, children: "OK" }) })
|
|
2939
2921
|
] }) }) })
|
|
2940
2922
|
] });
|
|
2941
2923
|
};
|
|
@@ -2952,28 +2934,14 @@ var socketClient_default = socket;
|
|
|
2952
2934
|
|
|
2953
2935
|
// src/app/components/Atoms/CardBankRadio/CardBankRadio.tsx
|
|
2954
2936
|
import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2955
|
-
var CardBankRadio = (
|
|
2956
|
-
|
|
2957
|
-
const savingsBadgeClass = `frac-saving-badge ${skydesign ? "frac-saving-badge-corner" : "frac-saving-badge-corner frac-saving-badge-with-radio"}`;
|
|
2958
|
-
return /* @__PURE__ */ jsx13(Fragment7, { children: /* @__PURE__ */ jsx13(
|
|
2937
|
+
var CardBankRadio = (props) => {
|
|
2938
|
+
return /* @__PURE__ */ jsx13(Fragment7, { children: /* @__PURE__ */ jsxs7(
|
|
2959
2939
|
"div",
|
|
2960
2940
|
{
|
|
2961
2941
|
className: `frac-card-bank-radio ${props.activetab === props.value ? "frac-active" : ""}`,
|
|
2962
2942
|
onClick: () => props.onChange(props.value),
|
|
2963
2943
|
role: "radio",
|
|
2964
|
-
children:
|
|
2965
|
-
/* @__PURE__ */ jsxs7("div", { className: "frac-card-title-main", children: [
|
|
2966
|
-
/* @__PURE__ */ jsxs7("div", { className: "box-inner-card-text", children: [
|
|
2967
|
-
/* @__PURE__ */ jsx13("img", { src: props.label.toLowerCase() === "card" ? defaultcard : props.label.toLowerCase() === "reader" ? pax : bankNew, className: "frac-payment-type-logo", alt: "" }),
|
|
2968
|
-
/* @__PURE__ */ jsx13("div", { className: "frac-card-label-text", children: props.label })
|
|
2969
|
-
] }),
|
|
2970
|
-
/* @__PURE__ */ jsx13("div", { className: "frac-card-label", children: /* @__PURE__ */ jsx13("div", { className: "frac-card-label-amount", children: formatUSD(props.amount) }) })
|
|
2971
|
-
] }),
|
|
2972
|
-
savingsText ? /* @__PURE__ */ jsx13("button", { type: "button", className: savingsBadgeClass, children: savingsText }) : null,
|
|
2973
|
-
/* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsx13("input", { name: "paymenttype", checked: props.activetab === props.value, type: "hidden", value: props.value, onChange: (e) => {
|
|
2974
|
-
props.onChange(e.target.value);
|
|
2975
|
-
} }) })
|
|
2976
|
-
] }) : /* @__PURE__ */ jsxs7(Fragment7, { children: [
|
|
2944
|
+
children: [
|
|
2977
2945
|
/* @__PURE__ */ jsxs7("div", { className: "frac-card-title-main", children: [
|
|
2978
2946
|
/* @__PURE__ */ jsx13("img", { src: props.label.toLowerCase() === "card" ? defaultcard : props.label.toLowerCase() === "reader" ? pax : bankNew, className: "frac-payment-type-logo", alt: "" }),
|
|
2979
2947
|
/* @__PURE__ */ jsxs7("div", { className: "frac-card-label", children: [
|
|
@@ -2981,11 +2949,10 @@ var CardBankRadio = (_a) => {
|
|
|
2981
2949
|
/* @__PURE__ */ jsx13("div", { className: "frac-card-label-amount", children: formatUSD(props.amount) })
|
|
2982
2950
|
] })
|
|
2983
2951
|
] }),
|
|
2984
|
-
savingsText ? /* @__PURE__ */ jsx13("button", { type: "button", className: savingsBadgeClass, children: savingsText }) : null,
|
|
2985
2952
|
/* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsx13("input", { name: "paymenttype", checked: props.activetab === props.value, type: "radio", value: props.value, onChange: (e) => {
|
|
2986
2953
|
props.onChange(e.target.value);
|
|
2987
2954
|
} }) })
|
|
2988
|
-
]
|
|
2955
|
+
]
|
|
2989
2956
|
}
|
|
2990
2957
|
) });
|
|
2991
2958
|
};
|
|
@@ -3010,7 +2977,6 @@ function CardBankRadioStyles({}) {
|
|
|
3010
2977
|
justify-content: space-between;
|
|
3011
2978
|
align-items: center;
|
|
3012
2979
|
align-self: stretch;
|
|
3013
|
-
position: relative;
|
|
3014
2980
|
}
|
|
3015
2981
|
|
|
3016
2982
|
input[type="radio"] {
|
|
@@ -3068,28 +3034,6 @@ function CardBankRadioStyles({}) {
|
|
|
3068
3034
|
.frac-card-bank-radio.frac-active {
|
|
3069
3035
|
background: #F6F6F7;
|
|
3070
3036
|
}
|
|
3071
|
-
|
|
3072
|
-
.frac-saving-badge {
|
|
3073
|
-
padding: 1px 7px;
|
|
3074
|
-
border: 1px solid #9ad7ab;
|
|
3075
|
-
border-radius: 999px;
|
|
3076
|
-
background: #e8f8ec;
|
|
3077
|
-
color: #1e6a34;
|
|
3078
|
-
font-size: 10px;
|
|
3079
|
-
font-weight: 600;
|
|
3080
|
-
line-height: 15px;
|
|
3081
|
-
pointer-events: none;
|
|
3082
|
-
}
|
|
3083
|
-
|
|
3084
|
-
.frac-saving-badge-corner {
|
|
3085
|
-
position: absolute;
|
|
3086
|
-
top: 8px;
|
|
3087
|
-
right: 10px;
|
|
3088
|
-
}
|
|
3089
|
-
|
|
3090
|
-
.frac-saving-badge-with-radio {
|
|
3091
|
-
right: 34px;
|
|
3092
|
-
}
|
|
3093
3037
|
` });
|
|
3094
3038
|
}
|
|
3095
3039
|
|
|
@@ -3267,7 +3211,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3267
3211
|
{
|
|
3268
3212
|
id: "card_number",
|
|
3269
3213
|
className: "form-control card-number-new",
|
|
3270
|
-
style: { height: `${isSky ? "36px" : "46px"}
|
|
3214
|
+
style: { height: `${isSky ? "36px" : "46px"}`, display: "inline-block" }
|
|
3271
3215
|
}
|
|
3272
3216
|
),
|
|
3273
3217
|
/* @__PURE__ */ jsx17("div", { className: "card-crdi card-expiry-new", children: /* @__PURE__ */ jsxs10("div", { className: "exp-date-year-container", children: [
|
|
@@ -3276,7 +3220,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3276
3220
|
{
|
|
3277
3221
|
id: "exp_month",
|
|
3278
3222
|
className: "form-control required card-cvv-in",
|
|
3279
|
-
style: { height: "36px", display: "block"
|
|
3223
|
+
style: { height: "36px", display: "inline-block" }
|
|
3280
3224
|
}
|
|
3281
3225
|
) }),
|
|
3282
3226
|
/* @__PURE__ */ jsx17("div", { className: "exp-year form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
@@ -3284,7 +3228,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3284
3228
|
{
|
|
3285
3229
|
id: "exp_year",
|
|
3286
3230
|
className: "form-control required card-cvv-in",
|
|
3287
|
-
style: { height: "36px", display: "block"
|
|
3231
|
+
style: { height: "36px", display: "inline-block" }
|
|
3288
3232
|
}
|
|
3289
3233
|
) }),
|
|
3290
3234
|
/* @__PURE__ */ jsx17("div", { className: "security-digit form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
@@ -3292,7 +3236,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3292
3236
|
{
|
|
3293
3237
|
id: "cvv",
|
|
3294
3238
|
className: "form-control card-cvv-in required",
|
|
3295
|
-
style: { height: "36px", display: "block"
|
|
3239
|
+
style: { height: "36px", display: "inline-block" }
|
|
3296
3240
|
}
|
|
3297
3241
|
) })
|
|
3298
3242
|
] }) })
|
|
@@ -3415,8 +3359,7 @@ var DataCapFields = ({
|
|
|
3415
3359
|
isOpen,
|
|
3416
3360
|
tokenKey,
|
|
3417
3361
|
setLoader,
|
|
3418
|
-
isAddCard
|
|
3419
|
-
isEmbedded
|
|
3362
|
+
isAddCard
|
|
3420
3363
|
}) => {
|
|
3421
3364
|
const iframeId = "datacap-iframe";
|
|
3422
3365
|
const resolverRef = useRef2(null);
|
|
@@ -3442,20 +3385,6 @@ var DataCapFields = ({
|
|
|
3442
3385
|
|
|
3443
3386
|
`;
|
|
3444
3387
|
}
|
|
3445
|
-
if (isEmbedded) {
|
|
3446
|
-
customCSS += `
|
|
3447
|
-
|
|
3448
|
-
input {
|
|
3449
|
-
background-color: #F6F6F7;
|
|
3450
|
-
box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1;
|
|
3451
|
-
}
|
|
3452
|
-
|
|
3453
|
-
select {
|
|
3454
|
-
background-color: #F6F6F7;
|
|
3455
|
-
box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
|
|
3456
|
-
}
|
|
3457
|
-
`;
|
|
3458
|
-
}
|
|
3459
3388
|
const initialize = async () => {
|
|
3460
3389
|
setLoader == null ? void 0 : setLoader(true);
|
|
3461
3390
|
setIframeReady(false);
|
|
@@ -3494,7 +3423,6 @@ var DataCapFields = ({
|
|
|
3494
3423
|
window.DatacapHostedWebToken.requestToken();
|
|
3495
3424
|
});
|
|
3496
3425
|
};
|
|
3497
|
-
console.log(setLoader, "loadingIframe");
|
|
3498
3426
|
return /* @__PURE__ */ jsx18(
|
|
3499
3427
|
"iframe",
|
|
3500
3428
|
{
|
|
@@ -3533,6 +3461,8 @@ function GetPaymentPage(props) {
|
|
|
3533
3461
|
const [activeForm, setActiveForm] = useState4(true);
|
|
3534
3462
|
const [saveCardInfo, setSaveCardInfo] = useState4(false);
|
|
3535
3463
|
const [saveACHinfo, setSaveACHinfo] = useState4(false);
|
|
3464
|
+
const [isBankConsentChecked, setIsBankConsentChecked] = useState4(false);
|
|
3465
|
+
const [errorBankConsent, setErrorBankConsent] = useState4("");
|
|
3536
3466
|
const fractalpayClientKey = props.merchantPublicKey;
|
|
3537
3467
|
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
3538
3468
|
let visa2 = S3Url + "widget/visa-img.svg";
|
|
@@ -3652,6 +3582,8 @@ function GetPaymentPage(props) {
|
|
|
3652
3582
|
setLoading(false);
|
|
3653
3583
|
setBankList([]);
|
|
3654
3584
|
setCardList([]);
|
|
3585
|
+
setIsBankConsentChecked(false);
|
|
3586
|
+
setErrorBankConsent("");
|
|
3655
3587
|
};
|
|
3656
3588
|
const handleShow = () => setShow(true);
|
|
3657
3589
|
const handletabchange = (id) => {
|
|
@@ -3751,8 +3683,11 @@ function GetPaymentPage(props) {
|
|
|
3751
3683
|
errors.companyName = "Company Name is required for business accounts";
|
|
3752
3684
|
}
|
|
3753
3685
|
}
|
|
3686
|
+
if (!isBankConsentChecked) {
|
|
3687
|
+
setErrorBankConsent("Above consent is requied");
|
|
3688
|
+
}
|
|
3754
3689
|
setAchError(errors);
|
|
3755
|
-
return Object.keys(errors).length > 0;
|
|
3690
|
+
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
3756
3691
|
};
|
|
3757
3692
|
const submitFunc = async (e) => {
|
|
3758
3693
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
|
|
@@ -4676,9 +4611,15 @@ function GetPaymentPage(props) {
|
|
|
4676
4611
|
] })
|
|
4677
4612
|
] }),
|
|
4678
4613
|
/* @__PURE__ */ jsxs11("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
4679
|
-
/* @__PURE__ */ jsx19("input", { type: "checkbox", id: "achconsent", className: "",
|
|
4614
|
+
/* @__PURE__ */ jsx19("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
|
|
4615
|
+
setIsBankConsentChecked(e.target.checked);
|
|
4616
|
+
if (e.target.checked) {
|
|
4617
|
+
setErrorBankConsent("");
|
|
4618
|
+
}
|
|
4619
|
+
} }),
|
|
4680
4620
|
/* @__PURE__ */ jsx19("label", { htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${(paymentData == null ? void 0 : paymentData.bname) || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
|
|
4681
4621
|
] }),
|
|
4622
|
+
errorBankConsent && /* @__PURE__ */ jsx19("span", { className: "error-span", children: errorBankConsent }),
|
|
4682
4623
|
(props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsxs11("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
4683
4624
|
/* @__PURE__ */ jsx19("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
4684
4625
|
/* @__PURE__ */ jsx19("label", { htmlFor: "saveACH", children: "Save Bank" })
|
|
@@ -7443,6 +7384,8 @@ function PartialPayment(props) {
|
|
|
7443
7384
|
const [aftertaxAmount, setAfterTaxAmount] = useState8(Number(props == null ? void 0 : props.amount));
|
|
7444
7385
|
const [partialAmount, setPartialAmount] = useState8("");
|
|
7445
7386
|
const [partialError, setPartialError] = useState8("");
|
|
7387
|
+
const [isBankConsentChecked, setIsBankConsentChecked] = useState8(false);
|
|
7388
|
+
const [errorBankConsent, setErrorBankConsent] = useState8("");
|
|
7446
7389
|
const tokenizerRef = useRef8(null);
|
|
7447
7390
|
const fractalStyles = {
|
|
7448
7391
|
input: {
|
|
@@ -7554,6 +7497,8 @@ function PartialPayment(props) {
|
|
|
7554
7497
|
setCardList([]);
|
|
7555
7498
|
setPartialAmount("");
|
|
7556
7499
|
setPartialError("");
|
|
7500
|
+
setIsBankConsentChecked(false);
|
|
7501
|
+
setErrorBankConsent("");
|
|
7557
7502
|
};
|
|
7558
7503
|
const handleShow = () => setShow(true);
|
|
7559
7504
|
const handletabchange = (id) => {
|
|
@@ -7654,8 +7599,11 @@ function PartialPayment(props) {
|
|
|
7654
7599
|
errors.companyName = "Company Name is required for business accounts";
|
|
7655
7600
|
}
|
|
7656
7601
|
}
|
|
7602
|
+
if (!isBankConsentChecked) {
|
|
7603
|
+
setErrorBankConsent("Above consent is requied");
|
|
7604
|
+
}
|
|
7657
7605
|
setAchError(errors);
|
|
7658
|
-
return Object.keys(errors).length > 0;
|
|
7606
|
+
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
7659
7607
|
};
|
|
7660
7608
|
const submitFunc = async (e) => {
|
|
7661
7609
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
|
|
@@ -8603,9 +8551,24 @@ function PartialPayment(props) {
|
|
|
8603
8551
|
] })
|
|
8604
8552
|
] }),
|
|
8605
8553
|
/* @__PURE__ */ jsxs17("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
8606
|
-
/* @__PURE__ */ jsx28(
|
|
8554
|
+
/* @__PURE__ */ jsx28(
|
|
8555
|
+
"input",
|
|
8556
|
+
{
|
|
8557
|
+
type: "checkbox",
|
|
8558
|
+
id: "achconsent",
|
|
8559
|
+
className: "",
|
|
8560
|
+
checked: isBankConsentChecked,
|
|
8561
|
+
onChange: (e) => {
|
|
8562
|
+
setIsBankConsentChecked(e.target.checked);
|
|
8563
|
+
if (e.target.checked) {
|
|
8564
|
+
setErrorBankConsent("");
|
|
8565
|
+
}
|
|
8566
|
+
}
|
|
8567
|
+
}
|
|
8568
|
+
),
|
|
8607
8569
|
/* @__PURE__ */ jsx28("label", { htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${(paymentData == null ? void 0 : paymentData.bname) || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
|
|
8608
8570
|
] }),
|
|
8571
|
+
errorBankConsent && /* @__PURE__ */ jsx28("span", { className: "error-span", children: errorBankConsent }),
|
|
8609
8572
|
(props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsxs17("div", { className: "form-group mb-4 save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
8610
8573
|
/* @__PURE__ */ jsx28("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
8611
8574
|
/* @__PURE__ */ jsx28("label", { htmlFor: "saveACH", children: "Save Bank" })
|
|
@@ -8867,17 +8830,6 @@ function SkyChargewidgetstyles() {
|
|
|
8867
8830
|
text-align : left !important;
|
|
8868
8831
|
text-transform: uppercase !important;
|
|
8869
8832
|
}
|
|
8870
|
-
.frac-form .frac-fee-text{
|
|
8871
|
-
display: block;
|
|
8872
|
-
padding: 10px 0 4px;
|
|
8873
|
-
font-family: 'IBM Plex Mono', monospace !important;
|
|
8874
|
-
color: #727272 !important;
|
|
8875
|
-
font-size: 12px;
|
|
8876
|
-
line-height: 1.4;
|
|
8877
|
-
}
|
|
8878
|
-
.frac-form .frac-fee-amount{
|
|
8879
|
-
color: #c62828 !important;
|
|
8880
|
-
}
|
|
8881
8833
|
.form-control-frac{
|
|
8882
8834
|
display: block;
|
|
8883
8835
|
width: 100%;
|
|
@@ -8912,7 +8864,7 @@ function SkyChargewidgetstyles() {
|
|
|
8912
8864
|
}
|
|
8913
8865
|
.exp-date-year-container .form-group {
|
|
8914
8866
|
flex: 1;
|
|
8915
|
-
padding-left:.75rem
|
|
8867
|
+
padding-left:.75rem;
|
|
8916
8868
|
}
|
|
8917
8869
|
.card-crdi {
|
|
8918
8870
|
display: flex;
|
|
@@ -8929,7 +8881,7 @@ function SkyChargewidgetstyles() {
|
|
|
8929
8881
|
}
|
|
8930
8882
|
.exp-date-year-container .form-group-frac{
|
|
8931
8883
|
flex:1;
|
|
8932
|
-
|
|
8884
|
+
padding: 0px !important
|
|
8933
8885
|
|
|
8934
8886
|
}
|
|
8935
8887
|
|
|
@@ -9430,16 +9382,7 @@ margin:0px !important;
|
|
|
9430
9382
|
padding:0px !important;
|
|
9431
9383
|
}
|
|
9432
9384
|
|
|
9433
|
-
|
|
9434
|
-
.toggle-num-wrapper-new div#card_number {
|
|
9435
|
-
display: block !important;
|
|
9436
|
-
}
|
|
9437
|
-
.toggle-num-wrapper-new .input-main-wrap-frac {
|
|
9438
|
-
height: 36px;
|
|
9439
|
-
}
|
|
9440
|
-
.toggle-num-wrapper-new:focus {
|
|
9441
|
-
border: 1px solid #004eab !important;
|
|
9442
|
-
}
|
|
9385
|
+
|
|
9443
9386
|
|
|
9444
9387
|
` });
|
|
9445
9388
|
}
|
|
@@ -9586,162 +9529,10 @@ function CheckoutWrapper({ clientSecret, onSuccess, showLoader, setError, sessio
|
|
|
9586
9529
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9587
9530
|
import { IoArrowBack as IoArrowBack4 } from "react-icons/io5";
|
|
9588
9531
|
import { NumericFormat as NumericFormat2 } from "react-number-format";
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
function ErrorCardOverlayStyle() {
|
|
9593
|
-
return /* @__PURE__ */ jsx32("style", { children: `
|
|
9594
|
-
.card-error-overlay .logo-container {
|
|
9595
|
-
display: flex;
|
|
9596
|
-
justify-content: center;
|
|
9597
|
-
align-items: center;
|
|
9598
|
-
margin-bottom: -50px; /* Adjust this to overlap the content */
|
|
9599
|
-
z-index: 10;
|
|
9600
|
-
}
|
|
9601
|
-
|
|
9602
|
-
.card-error-overlay .client-logo {
|
|
9603
|
-
max-width: 100px;
|
|
9604
|
-
height: auto;
|
|
9605
|
-
object-fit: contain;
|
|
9606
|
-
display: block;
|
|
9607
|
-
}
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
.card-error-overlay .error-icon-overlay {
|
|
9611
|
-
display: flex;
|
|
9612
|
-
flex-direction: column;
|
|
9613
|
-
align-items: center;
|
|
9614
|
-
gap: 12px;
|
|
9615
|
-
min-height: 116px;
|
|
9616
|
-
z-index: 2;
|
|
9617
|
-
}
|
|
9618
|
-
|
|
9619
|
-
.card-error-overlay .circle {
|
|
9620
|
-
width: 50px;
|
|
9621
|
-
height: 50px;
|
|
9622
|
-
border: 1px solid red;
|
|
9623
|
-
border-radius: 50%;
|
|
9624
|
-
display: flex;
|
|
9625
|
-
justify-content: center;
|
|
9626
|
-
align-items: center;
|
|
9627
|
-
margin-bottom:20px
|
|
9628
|
-
}
|
|
9629
|
-
|
|
9630
|
-
.card-error-overlay .circle .fa-times {
|
|
9631
|
-
font-size: 30px;
|
|
9632
|
-
color: red;
|
|
9633
|
-
}
|
|
9634
|
-
|
|
9635
|
-
.card-error-overlay .error-text-overlay {
|
|
9636
|
-
display: flex;
|
|
9637
|
-
flex-direction: column;
|
|
9638
|
-
justify-content: center;
|
|
9639
|
-
align-items: center;
|
|
9640
|
-
gap: 4px;
|
|
9641
|
-
// width: 227px;
|
|
9642
|
-
}
|
|
9643
|
-
|
|
9644
|
-
.card-error-overlay .payment-error-text-overlay {
|
|
9645
|
-
font-family: 'Inter', sans-serif;
|
|
9646
|
-
font-weight: 500;
|
|
9647
|
-
font-size: 18px;
|
|
9648
|
-
line-height: 21px;
|
|
9649
|
-
text-align: center;
|
|
9650
|
-
letter-spacing: -0.02em;
|
|
9651
|
-
color: #161616;
|
|
9652
|
-
}
|
|
9653
|
-
|
|
9654
|
-
.card-error-overlay .thank-you-text-overlay {
|
|
9655
|
-
font-family: 'Inter', sans-serif;
|
|
9656
|
-
font-weight: 500;
|
|
9657
|
-
font-size: 16px;
|
|
9658
|
-
line-height: 18px;
|
|
9659
|
-
text-align: center;
|
|
9660
|
-
letter-spacing: -0.02em;
|
|
9661
|
-
color: #161616 !important;
|
|
9662
|
-
opacity: 0.5;
|
|
9663
|
-
padding-top:10px
|
|
9664
|
-
}
|
|
9665
|
-
|
|
9666
|
-
.card-error-overlay .error-btn-div-overlay{
|
|
9667
|
-
padding-top:20px;
|
|
9668
|
-
width: 100%;
|
|
9669
|
-
|
|
9670
|
-
}
|
|
9671
|
-
.card-error-overlay .error-btn-div-overlay button{
|
|
9672
|
-
outline: 0;
|
|
9673
|
-
height: 46px;
|
|
9674
|
-
font-size: 16px;
|
|
9675
|
-
background: #727272;
|
|
9676
|
-
border: none;
|
|
9677
|
-
display: block;
|
|
9678
|
-
color: #fff;
|
|
9679
|
-
width: 100%;
|
|
9680
|
-
border-radius: 180px;
|
|
9681
|
-
margin: 10px 0;
|
|
9682
|
-
text-decoration: none;
|
|
9683
|
-
}
|
|
9684
|
-
.card-error-overlay .error-btn-div-overlay button:hover, .card-error-overlay .error-btn-div-overlay button:focus {
|
|
9685
|
-
background: #222;
|
|
9686
|
-
color: #fff;
|
|
9687
|
-
cursor: pointer;
|
|
9688
|
-
}
|
|
9689
|
-
.payment-error-container-overlay {
|
|
9690
|
-
width: fit-content;
|
|
9691
|
-
position: relative;
|
|
9692
|
-
top: 50%;
|
|
9693
|
-
left: 50%;
|
|
9694
|
-
transform: translate(-50%, -50%);
|
|
9695
|
-
background: rgba(255, 255, 255, 0.15);
|
|
9696
|
-
backdrop-filter: blur(12px);
|
|
9697
|
-
-webkit-backdrop-filter: blur(12px);
|
|
9698
|
-
border-radius: 12px;
|
|
9699
|
-
z-index: 11111;
|
|
9700
|
-
max-width: 240px;
|
|
9701
|
-
min-width: 224px;
|
|
9702
|
-
padding: 20px;
|
|
9703
|
-
margin-left: 17px !important;
|
|
9704
|
-
}
|
|
9705
|
-
.card-error-overlay {
|
|
9706
|
-
position: absolute;
|
|
9707
|
-
top: 0;
|
|
9708
|
-
left: 0;
|
|
9709
|
-
width: 100%;
|
|
9710
|
-
height: 100%;
|
|
9711
|
-
background: rgb(87 87 87 / 15%);
|
|
9712
|
-
backdrop-filter: blur(2px);
|
|
9713
|
-
-webkit-backdrop-filter: blur(12px);
|
|
9714
|
-
z-index: 1111;
|
|
9715
|
-
}
|
|
9716
|
-
` });
|
|
9717
|
-
}
|
|
9718
|
-
|
|
9719
|
-
// src/app/components/ErrorCardMessage/ErrorCardOverlay.tsx
|
|
9720
|
-
import { Fragment as Fragment18, jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
9721
|
-
var ErrorCardOverlay = ({ onClose, error, autoTrigger = false }) => {
|
|
9722
|
-
return /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
9723
|
-
/* @__PURE__ */ jsx33(ErrorCardOverlayStyle, {}),
|
|
9724
|
-
/* @__PURE__ */ jsx33("div", { className: "card-error-overlay", children: /* @__PURE__ */ jsx33("div", { className: "payment-error-container-overlay", children: /* @__PURE__ */ jsxs19("div", { className: "error-icon-overlay", children: [
|
|
9725
|
-
/* @__PURE__ */ jsx33("div", { className: "circle", children: /* @__PURE__ */ jsx33("i", { className: "fa fa-times", "aria-hidden": "true" }) }),
|
|
9726
|
-
/* @__PURE__ */ jsxs19("div", { className: "error-text-overlay", children: [
|
|
9727
|
-
/* @__PURE__ */ jsx33("div", { className: "payment-error-text-overlay", children: error }),
|
|
9728
|
-
/* @__PURE__ */ jsx33("div", { className: "thank-you-text-overlay", children: "Try again later " })
|
|
9729
|
-
] }),
|
|
9730
|
-
!autoTrigger && /* @__PURE__ */ jsx33("div", { className: "error-btn-div-overlay", children: /* @__PURE__ */ jsx33("button", { onClick: onClose, children: "OK" }) })
|
|
9731
|
-
] }) }) })
|
|
9732
|
-
] });
|
|
9733
|
-
};
|
|
9734
|
-
var ErrorCardOverlay_default = ErrorCardOverlay;
|
|
9735
|
-
|
|
9736
|
-
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9737
|
-
import { Fragment as Fragment19, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
9738
|
-
var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_token, customerId, callback, merchantName = "merchant", isPreAuth, surcharge = "0", submitBtnClass, submitBtnIcon, isRequest, pass_fee, pass_fee_amount, require3ds = false, autoTrigger = false, show, setShow, setHandleCloseRef, isPartial, bankSurcharge, partialRef, loadingPrev = false, orderGuid: ordGuid, remainingAmount: remAmount, onSubmit, onLoad = true }) => {
|
|
9739
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
9532
|
+
import { Fragment as Fragment18, jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
9533
|
+
var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_token, customerId, callback, merchantName = "merchant", isPreAuth, surcharge = "0", submitBtnClass, submitBtnIcon, isRequest, pass_fee, pass_fee_amount, require3ds = false, autoTrigger = false, show, setShow, setHandleCloseRef, isPartial, bankSurcharge, partialRef, loadingPrev = false, orderGuid: ordGuid, remainingAmount: remAmount }) => {
|
|
9534
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
9740
9535
|
const hasRunRef = useRef10(false);
|
|
9741
|
-
const cardFormRef = useRef10(null);
|
|
9742
|
-
const bankFormRef = useRef10(null);
|
|
9743
|
-
const expiryYearRef = useRef10(null);
|
|
9744
|
-
const expiryMonthRef = useRef10(null);
|
|
9745
9536
|
const cardListRunRef = useRef10(false);
|
|
9746
9537
|
const threeDSContainerRef = useRef10(null);
|
|
9747
9538
|
const [activetab, setActive] = useState10("card");
|
|
@@ -9779,6 +9570,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9779
9570
|
const [remainingAmount, setRemainingAmount] = useState10("");
|
|
9780
9571
|
const [paymentGateway, setPaymentGateway] = useState10();
|
|
9781
9572
|
const [dcToken, setDCToken] = useState10();
|
|
9573
|
+
const [isBankConsentChecked, setIsBankConsentChecked] = useState10(false);
|
|
9574
|
+
const [errorBankConsent, setErrorBankConsent] = useState10("");
|
|
9782
9575
|
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
9783
9576
|
let visa2 = S3Url + "widget/visa-img.svg";
|
|
9784
9577
|
let americanexp2 = S3Url + "widget/ae-img.svg";
|
|
@@ -9791,10 +9584,6 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9791
9584
|
let pax2 = S3Url + "widget/pax.svg";
|
|
9792
9585
|
let cardicon = S3Url + "widget/cardicon.svg";
|
|
9793
9586
|
let bankicon = S3Url + "widget/bankicon.svg";
|
|
9794
|
-
let defualtcardborder = S3Url + "widget/defualtcardborder.svg";
|
|
9795
|
-
let unionicon = S3Url + "widget/unionpay.svg";
|
|
9796
|
-
let dinersicon = S3Url + "widget/diners.svg";
|
|
9797
|
-
let jcbicon = S3Url + "widget/jcb.svg";
|
|
9798
9587
|
const showLoader = () => setLoading(true);
|
|
9799
9588
|
const hideLoader = () => setLoading(false);
|
|
9800
9589
|
const CalculateCashDiscount = (amount2, surcharge2) => {
|
|
@@ -9802,10 +9591,6 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9802
9591
|
const originalAmount = amount2 / (1 + surchargeVal);
|
|
9803
9592
|
return Math.round(originalAmount * 100) / 100;
|
|
9804
9593
|
};
|
|
9805
|
-
const cardFeeAmount = Number(pass_fee_amount || 0);
|
|
9806
|
-
const bankFeeAmount = Number(bankSurcharge || 0);
|
|
9807
|
-
const bankSavingsAmount = Math.max(bankFeeAmount > 0 ? cardFeeAmount - bankFeeAmount : cardFeeAmount, 0);
|
|
9808
|
-
const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
|
|
9809
9594
|
const tokenizerRef = useRef10(null);
|
|
9810
9595
|
const fractalStyles = {
|
|
9811
9596
|
input: {
|
|
@@ -9970,8 +9755,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9970
9755
|
errors.companyName = "Company Name is required for business accounts";
|
|
9971
9756
|
}
|
|
9972
9757
|
}
|
|
9758
|
+
if (!isBankConsentChecked) {
|
|
9759
|
+
setErrorBankConsent("Above consent is requied");
|
|
9760
|
+
}
|
|
9973
9761
|
setAchError(errors);
|
|
9974
|
-
return Object.keys(errors).length > 0;
|
|
9762
|
+
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
9975
9763
|
};
|
|
9976
9764
|
const completeFractalFlow = async (tokenizeData, intentid) => {
|
|
9977
9765
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
@@ -10012,7 +9800,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10012
9800
|
}
|
|
10013
9801
|
};
|
|
10014
9802
|
const handleFractalTokenFlow = async () => {
|
|
10015
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2,
|
|
9803
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t, _u, _v, _w;
|
|
10016
9804
|
try {
|
|
10017
9805
|
const requestOptions = {
|
|
10018
9806
|
method: "POST",
|
|
@@ -10053,29 +9841,17 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10053
9841
|
three_ds_data
|
|
10054
9842
|
);
|
|
10055
9843
|
} catch (error2) {
|
|
10056
|
-
|
|
10057
|
-
let readableMessage = "Something went wrong!";
|
|
10058
|
-
try {
|
|
10059
|
-
const rawError = ((_n2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _n2.data) || (error2 == null ? void 0 : error2.message) || "";
|
|
10060
|
-
const errorText = typeof rawError === "string" ? rawError : JSON.stringify(rawError);
|
|
10061
|
-
const lines = ((_p2 = (_o2 = errorText.split) == null ? void 0 : _o2.call(errorText, "\n")) == null ? void 0 : _p2.filter(Boolean)) || [];
|
|
10062
|
-
const lastLine = lines.at(-1) || "";
|
|
10063
|
-
const parts = (_q2 = lastLine.split) == null ? void 0 : _q2.call(lastLine, ": ");
|
|
10064
|
-
readableMessage = (parts == null ? void 0 : parts.length) > 1 ? parts.pop().trim() : lastLine.trim() || readableMessage;
|
|
10065
|
-
} catch (e) {
|
|
10066
|
-
readableMessage = "Something went wrong!";
|
|
10067
|
-
}
|
|
10068
|
-
setErrorIframe(readableMessage);
|
|
9844
|
+
setErrorIframe(error2);
|
|
10069
9845
|
hideLoader();
|
|
10070
9846
|
}
|
|
10071
9847
|
if (tokenizeData == null ? void 0 : tokenizeData.token) {
|
|
10072
9848
|
let ThreedsData = tokenizeData == null ? void 0 : tokenizeData.stripe_three_ds_response;
|
|
10073
|
-
if (require3ds && !ThreedsData && (ThreedsData == null ? void 0 : ThreedsData.status) === "200 OK" && ((
|
|
9849
|
+
if (require3ds && !ThreedsData && (ThreedsData == null ? void 0 : ThreedsData.status) === "200 OK" && ((_n2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _n2.challenge_url)) {
|
|
10074
9850
|
setError("Something went wrong. Please try again later.");
|
|
10075
9851
|
}
|
|
10076
9852
|
if (require3ds) {
|
|
10077
|
-
if (!((
|
|
10078
|
-
completeFractalFlow(tokenizeData == null ? void 0 : tokenizeData.token, (
|
|
9853
|
+
if (!((_o2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _o2.challenge_url)) {
|
|
9854
|
+
completeFractalFlow(tokenizeData == null ? void 0 : tokenizeData.token, (_p2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _p2.id);
|
|
10079
9855
|
} else {
|
|
10080
9856
|
hideLoader();
|
|
10081
9857
|
setStripeResponse(__spreadProps(__spreadValues({}, ThreedsData == null ? void 0 : ThreedsData.data), {
|
|
@@ -10091,11 +9867,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10091
9867
|
console.log(error2, "error");
|
|
10092
9868
|
let readableMessage = "Something went wrong!";
|
|
10093
9869
|
try {
|
|
10094
|
-
const rawError = ((
|
|
9870
|
+
const rawError = ((_q2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _q2.data) || (error2 == null ? void 0 : error2.message) || "";
|
|
10095
9871
|
const errorText = typeof rawError === "string" ? rawError : JSON.stringify(rawError);
|
|
10096
|
-
const lines = ((
|
|
9872
|
+
const lines = ((_s2 = (_r2 = errorText.split) == null ? void 0 : _r2.call(errorText, "\n")) == null ? void 0 : _s2.filter(Boolean)) || [];
|
|
10097
9873
|
const lastLine = lines.at(-1) || "";
|
|
10098
|
-
const parts = (
|
|
9874
|
+
const parts = (_t = lastLine.split) == null ? void 0 : _t.call(lastLine, ": ");
|
|
10099
9875
|
readableMessage = (parts == null ? void 0 : parts.length) > 1 ? parts.pop().trim() : lastLine.trim() || readableMessage;
|
|
10100
9876
|
} catch (e) {
|
|
10101
9877
|
readableMessage = "Something went wrong!";
|
|
@@ -10103,8 +9879,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10103
9879
|
setError(readableMessage);
|
|
10104
9880
|
callback({
|
|
10105
9881
|
error: readableMessage,
|
|
10106
|
-
result: (
|
|
10107
|
-
statusCode: (
|
|
9882
|
+
result: (_v = (_u = error2 == null ? void 0 : error2.response) == null ? void 0 : _u.data) == null ? void 0 : _v.result,
|
|
9883
|
+
statusCode: (_w = error2 == null ? void 0 : error2.response) == null ? void 0 : _w.status
|
|
10108
9884
|
});
|
|
10109
9885
|
}
|
|
10110
9886
|
};
|
|
@@ -10375,6 +10151,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10375
10151
|
setPartialAmount("");
|
|
10376
10152
|
setPartialError("");
|
|
10377
10153
|
setRemainingAmount("");
|
|
10154
|
+
setIsBankConsentChecked(false);
|
|
10155
|
+
setErrorBankConsent("");
|
|
10378
10156
|
};
|
|
10379
10157
|
const getCardList = async () => {
|
|
10380
10158
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
@@ -10519,8 +10297,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10519
10297
|
});
|
|
10520
10298
|
};
|
|
10521
10299
|
const handlechargeCustomer = async (e) => {
|
|
10522
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
10523
|
-
e
|
|
10300
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
10301
|
+
e.currentTarget.blur();
|
|
10524
10302
|
if (loading) return;
|
|
10525
10303
|
let customer_id = customerId;
|
|
10526
10304
|
let card_id = selectedCard == null ? void 0 : selectedCard.id;
|
|
@@ -10567,6 +10345,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10567
10345
|
statusCode: (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.status
|
|
10568
10346
|
});
|
|
10569
10347
|
hideLoader();
|
|
10348
|
+
setError(((_i2 = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.message) || "Something went wrong!");
|
|
10570
10349
|
}
|
|
10571
10350
|
} else {
|
|
10572
10351
|
setError("Please Select A Card/Bank");
|
|
@@ -10588,7 +10367,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10588
10367
|
}
|
|
10589
10368
|
};
|
|
10590
10369
|
const getPaymentDetails = async () => {
|
|
10591
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2
|
|
10370
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2;
|
|
10592
10371
|
try {
|
|
10593
10372
|
showLoader();
|
|
10594
10373
|
const res = await axios9.get(`${masterBaseUrl}api/v1/gateway/get-payment-details/${session_token}`, {
|
|
@@ -10611,7 +10390,6 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10611
10390
|
result: (_n2 = (_m2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _m2.data) == null ? void 0 : _n2.result,
|
|
10612
10391
|
statusCode: (_o2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _o2.status
|
|
10613
10392
|
});
|
|
10614
|
-
setError(((_q2 = (_p2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _p2.data) == null ? void 0 : _q2.message) || (error2 == null ? void 0 : error2.message) || "Something went wrong");
|
|
10615
10393
|
hideLoader();
|
|
10616
10394
|
}
|
|
10617
10395
|
};
|
|
@@ -10649,13 +10427,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10649
10427
|
}
|
|
10650
10428
|
}, [show, autoTrigger]);
|
|
10651
10429
|
useEffect15(() => {
|
|
10652
|
-
if (!hasRunRef.current && (show || autoTrigger)
|
|
10430
|
+
if (!hasRunRef.current && (show || autoTrigger)) {
|
|
10653
10431
|
getPaymentDetails();
|
|
10654
10432
|
if (isPartial && !partialRef) {
|
|
10655
10433
|
crateOrderFrac();
|
|
10656
10434
|
}
|
|
10657
10435
|
}
|
|
10658
|
-
}, [show, autoTrigger, isPartial
|
|
10436
|
+
}, [show, autoTrigger, isPartial]);
|
|
10659
10437
|
useEffect15(() => {
|
|
10660
10438
|
if ((show || autoTrigger) && pass_fee_amount) {
|
|
10661
10439
|
let cashdisc = Number(amount) - Number(pass_fee_amount);
|
|
@@ -10742,89 +10520,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10742
10520
|
styles: {}
|
|
10743
10521
|
});
|
|
10744
10522
|
}, []);
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
|
|
10750
|
-
useEffect15(() => {
|
|
10751
|
-
stateRef.current = {
|
|
10752
|
-
activeinBank,
|
|
10753
|
-
activeinCard,
|
|
10754
|
-
activetab
|
|
10755
|
-
};
|
|
10756
|
-
}, [activeinBank, activeinCard, activetab]);
|
|
10757
|
-
const submit = useCallback(() => {
|
|
10758
|
-
var _a2, _b2;
|
|
10759
|
-
const { activeinBank: activeinBank2, activeinCard: activeinCard2, activetab: activetab2 } = stateRef.current;
|
|
10760
|
-
if (activetab2 === "card") {
|
|
10761
|
-
if (activeinCard2 === "form") {
|
|
10762
|
-
(_a2 = cardFormRef.current) == null ? void 0 : _a2.requestSubmit();
|
|
10763
|
-
} else if (activeinCard2 === "list") {
|
|
10764
|
-
handlechargeCustomer();
|
|
10765
|
-
}
|
|
10766
|
-
} else if (activetab2 === "ach") {
|
|
10767
|
-
if (activeinBank2 === "form") {
|
|
10768
|
-
(_b2 = bankFormRef.current) == null ? void 0 : _b2.requestSubmit();
|
|
10769
|
-
} else if (activeinBank2 === "list") {
|
|
10770
|
-
handlechargeCustomer();
|
|
10771
|
-
}
|
|
10772
|
-
}
|
|
10773
|
-
}, []);
|
|
10774
|
-
useEffect15(() => {
|
|
10775
|
-
onSubmit == null ? void 0 : onSubmit(submit);
|
|
10776
|
-
}, [onSubmit, submit]);
|
|
10777
|
-
function detectCardType(cardinput) {
|
|
10778
|
-
if (!cardinput) return null;
|
|
10779
|
-
const number = cardinput.replace(/\D/g, "");
|
|
10780
|
-
const patterns = {
|
|
10781
|
-
visa: /^4/,
|
|
10782
|
-
mastercard: /^(5[1-5]|2[2-7][0-9]{2})/,
|
|
10783
|
-
amex: /^3[47]/,
|
|
10784
|
-
discover: /^(6011|65|64[4-9])/,
|
|
10785
|
-
diners: /^(30[0-5]|36|38)/,
|
|
10786
|
-
jcb: /^(35[2-8][0-9])/,
|
|
10787
|
-
unionpay: /^62/
|
|
10788
|
-
};
|
|
10789
|
-
for (const [type, regex] of Object.entries(patterns)) {
|
|
10790
|
-
if (regex.test(number)) {
|
|
10791
|
-
return type;
|
|
10792
|
-
}
|
|
10793
|
-
}
|
|
10794
|
-
return "unknown";
|
|
10795
|
-
}
|
|
10796
|
-
function getCardImage(cardInput) {
|
|
10797
|
-
const cardType = detectCardType(cardInput);
|
|
10798
|
-
switch (cardType) {
|
|
10799
|
-
case "visa":
|
|
10800
|
-
return /* @__PURE__ */ jsx34("img", { src: visa2, alt: "visa", width: 33 });
|
|
10801
|
-
case "mastercard":
|
|
10802
|
-
return /* @__PURE__ */ jsx34("img", { src: mastercard2, width: 33, alt: "mastercard" });
|
|
10803
|
-
case "amex":
|
|
10804
|
-
return /* @__PURE__ */ jsx34("img", { src: americanexp2, alt: "amex", width: 33 });
|
|
10805
|
-
case "discover":
|
|
10806
|
-
return /* @__PURE__ */ jsx34("img", { src: discover2, width: 33, alt: "discover" });
|
|
10807
|
-
case "diners":
|
|
10808
|
-
return /* @__PURE__ */ jsx34("img", { src: dinersicon, alt: "Diners Club" });
|
|
10809
|
-
case "jcb":
|
|
10810
|
-
return /* @__PURE__ */ jsx34("img", { src: jcbicon, alt: "JCB" });
|
|
10811
|
-
case "unionpay":
|
|
10812
|
-
return /* @__PURE__ */ jsx34("img", { src: unionicon, alt: "UnionPay" });
|
|
10813
|
-
default:
|
|
10814
|
-
return /* @__PURE__ */ jsx34("img", { src: defualtcardborder, alt: "card" });
|
|
10815
|
-
}
|
|
10816
|
-
}
|
|
10817
|
-
return /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
10818
|
-
(initialLoader || !onLoad) && /* @__PURE__ */ jsx34(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
|
|
10819
|
-
error && /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
|
|
10820
|
-
errorIframe && /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
|
|
10523
|
+
console.log(activeinCard === "list", "activeinCard", activeList);
|
|
10524
|
+
return /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10525
|
+
initialLoader && /* @__PURE__ */ jsx32(Loader_default, { loading: initialLoader }),
|
|
10526
|
+
error && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error, onClose: handleClose }) }),
|
|
10527
|
+
errorIframe && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error: errorIframe, onClose: () => {
|
|
10821
10528
|
setErrorIframe("");
|
|
10822
|
-
}
|
|
10823
|
-
/* @__PURE__ */
|
|
10824
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */
|
|
10825
|
-
/* @__PURE__ */
|
|
10826
|
-
/* @__PURE__ */
|
|
10827
|
-
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */
|
|
10529
|
+
} }) }),
|
|
10530
|
+
!error && !errorIframe && /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10531
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx32(Loader_default, { loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
|
|
10532
|
+
/* @__PURE__ */ jsxs19("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
|
|
10533
|
+
/* @__PURE__ */ jsx32("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
|
|
10534
|
+
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx32(
|
|
10828
10535
|
ThreeDSChallenge,
|
|
10829
10536
|
{
|
|
10830
10537
|
containerRef: threeDSContainerRef,
|
|
@@ -10834,33 +10541,40 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10834
10541
|
onSuccess: handleSuccess,
|
|
10835
10542
|
onError: handleError
|
|
10836
10543
|
}
|
|
10837
|
-
) : /* @__PURE__ */
|
|
10838
|
-
/* @__PURE__ */
|
|
10839
|
-
/* @__PURE__ */
|
|
10840
|
-
/* @__PURE__ */
|
|
10544
|
+
) : /* @__PURE__ */ jsxs19("div", { className: "parent-pay-container", children: [
|
|
10545
|
+
/* @__PURE__ */ jsx32("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs19("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
10546
|
+
/* @__PURE__ */ jsx32("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx32("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" }) }),
|
|
10547
|
+
/* @__PURE__ */ jsx32("defs", { children: /* @__PURE__ */ jsx32("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx32("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
10841
10548
|
] }) }),
|
|
10842
|
-
/* @__PURE__ */
|
|
10843
|
-
/* @__PURE__ */
|
|
10844
|
-
|
|
10845
|
-
/* @__PURE__ */
|
|
10846
|
-
/* @__PURE__ */
|
|
10847
|
-
/* @__PURE__ */
|
|
10848
|
-
/* @__PURE__ */
|
|
10849
|
-
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */
|
|
10549
|
+
/* @__PURE__ */ jsx32("div", { className: "pay-main-logo-res" }),
|
|
10550
|
+
/* @__PURE__ */ jsxs19("div", { className: "pay-container", children: [
|
|
10551
|
+
/* @__PURE__ */ jsxs19("div", { className: "pay-header pay-conatiner-one", children: [
|
|
10552
|
+
/* @__PURE__ */ jsxs19("div", { className: "pay-conatiner-one-first", children: [
|
|
10553
|
+
/* @__PURE__ */ jsxs19("div", { className: "pay-logo-container", children: [
|
|
10554
|
+
/* @__PURE__ */ jsx32("div", { className: "pay-main-logo" }),
|
|
10555
|
+
/* @__PURE__ */ jsx32("h1", { className: "pay-heading", children: "Pay" }),
|
|
10556
|
+
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs19("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
|
|
10850
10557
|
" ",
|
|
10851
|
-
/* @__PURE__ */
|
|
10558
|
+
/* @__PURE__ */ jsx32(IoArrowBack4, {}),
|
|
10852
10559
|
" Back"
|
|
10853
10560
|
] })
|
|
10854
10561
|
] }),
|
|
10855
|
-
/* @__PURE__ */
|
|
10856
|
-
/* @__PURE__ */
|
|
10857
|
-
/* @__PURE__ */
|
|
10858
|
-
/* @__PURE__ */
|
|
10859
|
-
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */
|
|
10562
|
+
/* @__PURE__ */ jsx32("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs19("div", { className: "pay-amount-conatiner", children: [
|
|
10563
|
+
/* @__PURE__ */ jsx32("small", { className: "pay-payment-amount", children: "Select payment type" }),
|
|
10564
|
+
/* @__PURE__ */ jsxs19("div", { className: "frac-card-bank-radio-main", children: [
|
|
10565
|
+
/* @__PURE__ */ jsx32(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
10566
|
+
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx32(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab })
|
|
10860
10567
|
] }),
|
|
10861
|
-
|
|
10862
|
-
/* @__PURE__ */
|
|
10863
|
-
|
|
10568
|
+
pass_fee && activetab === "card" && cashDiscount && Number(amount) - Number(cashDiscount) > 0 ? /* @__PURE__ */ jsxs19("div", { className: "frac-cash-discount-fee", children: [
|
|
10569
|
+
/* @__PURE__ */ jsxs19("small", { children: [
|
|
10570
|
+
activetab === "card" ? "Cash Discount" : "Cash Discount Savings",
|
|
10571
|
+
" "
|
|
10572
|
+
] }),
|
|
10573
|
+
/* @__PURE__ */ jsx32("p", { children: formatUSD((Number(amount) - Number(cashDiscount)).toFixed(2)) })
|
|
10574
|
+
] }) : null,
|
|
10575
|
+
isPartial && /* @__PURE__ */ jsxs19("div", { className: "frac-partial-payment-input", children: [
|
|
10576
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
10577
|
+
/* @__PURE__ */ jsx32(
|
|
10864
10578
|
NumericFormat2,
|
|
10865
10579
|
{
|
|
10866
10580
|
prefix: "$",
|
|
@@ -10884,372 +10598,331 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10884
10598
|
}
|
|
10885
10599
|
}
|
|
10886
10600
|
),
|
|
10887
|
-
partialError && /* @__PURE__ */
|
|
10601
|
+
partialError && /* @__PURE__ */ jsx32("span", { className: "error-span", children: partialError })
|
|
10888
10602
|
] })
|
|
10889
10603
|
] }) })
|
|
10890
10604
|
] }),
|
|
10891
|
-
/* @__PURE__ */
|
|
10892
|
-
/* @__PURE__ */
|
|
10893
|
-
/* @__PURE__ */
|
|
10605
|
+
/* @__PURE__ */ jsxs19("div", { className: "pay-conatiner-one-last", children: [
|
|
10606
|
+
/* @__PURE__ */ jsx32("img", { src: secure2, alt: "" }),
|
|
10607
|
+
/* @__PURE__ */ jsx32("img", { src: pov2, alt: "" }),
|
|
10894
10608
|
"Secure payments powered by Fractal"
|
|
10895
10609
|
] })
|
|
10896
10610
|
] }),
|
|
10897
|
-
/* @__PURE__ */
|
|
10898
|
-
|
|
10899
|
-
/* @__PURE__ */
|
|
10900
|
-
/* @__PURE__ */
|
|
10901
|
-
|
|
10611
|
+
/* @__PURE__ */ jsx32("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx32("div", { className: "col-md-12", children: /* @__PURE__ */ jsx32("div", { id: "payment-form-div", children: is3DSEnable ? clientSecret && /* @__PURE__ */ jsx32(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10612
|
+
/* @__PURE__ */ jsxs19("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
|
|
10613
|
+
/* @__PURE__ */ jsxs19("div", { className: "frac-heading-card-wrap", children: [
|
|
10614
|
+
/* @__PURE__ */ jsx32("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs19("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
|
|
10615
|
+
" ",
|
|
10616
|
+
/* @__PURE__ */ jsx32(IoArrowBack4, {})
|
|
10617
|
+
] }) }),
|
|
10618
|
+
/* @__PURE__ */ jsx32("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
10902
10619
|
] }),
|
|
10903
|
-
|
|
10904
|
-
/* @__PURE__ */
|
|
10905
|
-
/* @__PURE__ */
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
10930
|
-
" ",
|
|
10931
|
-
/* @__PURE__ */ jsx34(IoArrowBack4, {})
|
|
10932
|
-
] }) }),
|
|
10933
|
-
/* @__PURE__ */ jsx34("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
10620
|
+
/* @__PURE__ */ jsxs19("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
|
|
10621
|
+
/* @__PURE__ */ jsx32("img", { src: visa2, alt: "", width: 33 }),
|
|
10622
|
+
/* @__PURE__ */ jsx32("img", { src: mastercard2, width: 33, alt: "" }),
|
|
10623
|
+
/* @__PURE__ */ jsx32("img", { src: americanexp2, alt: "", width: 33 }),
|
|
10624
|
+
/* @__PURE__ */ jsx32("img", { src: discover2, width: 33, alt: "" })
|
|
10625
|
+
] }),
|
|
10626
|
+
activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10627
|
+
/* @__PURE__ */ jsx32(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
|
|
10628
|
+
setActiveinCard("form");
|
|
10629
|
+
} }),
|
|
10630
|
+
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", style: { padding: "0" }, children: /* @__PURE__ */ jsx32("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: partialAmount ? formatUSD((_c = Number(partialAmount)) == null ? void 0 : _c.toFixed(2)) : formatUSD((_d = Number(amount)) == null ? void 0 : _d.toFixed(2)) }) })
|
|
10631
|
+
] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs19("form", { id: "paymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
10632
|
+
if (e.key === "Enter" && loading) {
|
|
10633
|
+
e.preventDefault();
|
|
10634
|
+
e.stopPropagation();
|
|
10635
|
+
}
|
|
10636
|
+
}, children: [
|
|
10637
|
+
/* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
10638
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10639
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
10640
|
+
/* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
10641
|
+
const value = e.target.value;
|
|
10642
|
+
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
10643
|
+
handleCardChange("cardName", value);
|
|
10644
|
+
}
|
|
10645
|
+
} }),
|
|
10646
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
10934
10647
|
] }),
|
|
10935
|
-
/* @__PURE__ */
|
|
10936
|
-
/* @__PURE__ */
|
|
10937
|
-
/* @__PURE__ */
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
|
|
10946
|
-
/* @__PURE__ */
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
}
|
|
10952
|
-
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
/* @__PURE__ */
|
|
10965
|
-
/* @__PURE__ */
|
|
10966
|
-
|
|
10967
|
-
FractalFields_default,
|
|
10968
|
-
{
|
|
10969
|
-
fractalStyles,
|
|
10970
|
-
tokenizerRef,
|
|
10971
|
-
isSky: true
|
|
10972
|
-
}
|
|
10973
|
-
) })
|
|
10974
|
-
] }),
|
|
10975
|
-
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
10976
|
-
/* @__PURE__ */ jsx34("label", { htmlFor: "zip", children: "ZIP" }),
|
|
10977
|
-
/* @__PURE__ */ jsx34("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) }),
|
|
10978
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
10979
|
-
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
|
|
10980
|
-
"Credit cards include a fee amount of ",
|
|
10981
|
-
/* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
10982
|
-
"."
|
|
10983
|
-
] })
|
|
10984
|
-
] }),
|
|
10985
|
-
customerId && /* @__PURE__ */ jsx34("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
10986
|
-
/* @__PURE__ */ jsx34(
|
|
10987
|
-
"input",
|
|
10648
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10649
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
|
|
10650
|
+
/* @__PURE__ */ jsx32("div", { className: "toggle-num-wrapper", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx32(
|
|
10651
|
+
FractalFields_default,
|
|
10652
|
+
{
|
|
10653
|
+
fractalStyles,
|
|
10654
|
+
tokenizerRef,
|
|
10655
|
+
isSky: true
|
|
10656
|
+
}
|
|
10657
|
+
) })
|
|
10658
|
+
] }),
|
|
10659
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10660
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "zip", children: "ZIP" }),
|
|
10661
|
+
/* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_e = cardData == null ? void 0 : cardData.zipCode) != null ? _e : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
|
|
10662
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
|
|
10663
|
+
] }),
|
|
10664
|
+
customerId && /* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
10665
|
+
/* @__PURE__ */ jsx32(
|
|
10666
|
+
"input",
|
|
10667
|
+
{
|
|
10668
|
+
type: "checkbox",
|
|
10669
|
+
id: "save_card",
|
|
10670
|
+
className: "toggle-checkbox",
|
|
10671
|
+
checked: saveCardInfo,
|
|
10672
|
+
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
10673
|
+
}
|
|
10674
|
+
),
|
|
10675
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
10676
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
10677
|
+
/* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
|
|
10678
|
+
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
|
|
10679
|
+
"svg",
|
|
10988
10680
|
{
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
10993
|
-
|
|
10681
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10682
|
+
width: "20",
|
|
10683
|
+
height: "20",
|
|
10684
|
+
viewBox: "0 0 20 20",
|
|
10685
|
+
fill: "none",
|
|
10686
|
+
children: [
|
|
10687
|
+
/* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
10688
|
+
/* @__PURE__ */ jsx32(
|
|
10689
|
+
"path",
|
|
10690
|
+
{
|
|
10691
|
+
d: "M9.03406 12.0979V12.0072C9.04055 11.4153 9.10057 10.9443 9.21411 10.5943C9.3309 10.2442 9.49635 9.96102 9.71046 9.74463C9.92457 9.52824 10.1825 9.33095 10.4842 9.15274C10.6788 9.03182 10.854 8.89658 11.0097 8.74702C11.1655 8.59745 11.2887 8.42562 11.3796 8.2315C11.4704 8.03739 11.5158 7.82259 11.5158 7.58711C11.5158 7.3039 11.4477 7.05887 11.3114 6.85203C11.1752 6.64519 10.9935 6.48608 10.7664 6.3747C10.5426 6.26014 10.2928 6.20286 10.017 6.20286C9.76723 6.20286 9.52879 6.25378 9.3017 6.35561C9.07461 6.45744 8.88646 6.61655 8.73723 6.83294C8.588 7.04614 8.50203 7.3214 8.47932 7.65871H7C7.02271 7.08592 7.17032 6.60223 7.44282 6.20764C7.71533 5.80986 8.07543 5.50915 8.52311 5.30549C8.97405 5.10183 9.47202 5 10.017 5C10.6139 5 11.1363 5.10979 11.5839 5.32936C12.0316 5.54574 12.3788 5.84964 12.6253 6.24105C12.8751 6.62928 13 7.08274 13 7.60143C13 7.95784 12.9432 8.27924 12.8297 8.56563C12.7161 8.84885 12.5539 9.10183 12.3431 9.32458C12.1354 9.54733 11.8856 9.74463 11.5937 9.91647C11.3179 10.0851 11.0941 10.2601 10.9221 10.4415C10.7534 10.6229 10.6302 10.8377 10.5523 11.0859C10.4745 11.3341 10.4323 11.6412 10.4258 12.0072V12.0979H9.03406ZM9.76886 15C9.50284 15 9.27413 14.9077 9.08273 14.7232C8.89132 14.5354 8.79562 14.3095 8.79562 14.0453C8.79562 13.7844 8.89132 13.5617 9.08273 13.3771C9.27413 13.1893 9.50284 13.0955 9.76886 13.0955C10.0316 13.0955 10.2587 13.1893 10.4501 13.3771C10.6448 13.5617 10.7421 13.7844 10.7421 14.0453C10.7421 14.2204 10.6967 14.3811 10.6058 14.5274C10.5182 14.6706 10.4015 14.7852 10.2555 14.8711C10.1095 14.957 9.94728 15 9.76886 15Z",
|
|
10692
|
+
fill: "#161616"
|
|
10693
|
+
}
|
|
10694
|
+
)
|
|
10695
|
+
]
|
|
10994
10696
|
}
|
|
10995
|
-
),
|
|
10996
|
-
/* @__PURE__ */
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
11016
|
-
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
/* @__PURE__ */ jsx34("b", { children: merchantName || "merchant" }),
|
|
11022
|
-
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11023
|
-
] }) })
|
|
11024
|
-
] })
|
|
11025
|
-
] }) })
|
|
10697
|
+
) }),
|
|
10698
|
+
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
10699
|
+
"If checked, I agree to give the ",
|
|
10700
|
+
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10701
|
+
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
10702
|
+
] }) })
|
|
10703
|
+
] })
|
|
10704
|
+
] }) })
|
|
10705
|
+
] }),
|
|
10706
|
+
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx32("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount ? formatUSD((_f = Number(partialAmount)) == null ? void 0 : _f.toFixed(2)) : formatUSD((_g = Number(amount)) == null ? void 0 : _g.toFixed(2)) }) })
|
|
10707
|
+
] }) : /* @__PURE__ */ jsxs19("form", { id: "PaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
10708
|
+
if (e.key === "Enter" && loading) {
|
|
10709
|
+
e.preventDefault();
|
|
10710
|
+
e.stopPropagation();
|
|
10711
|
+
}
|
|
10712
|
+
}, children: [
|
|
10713
|
+
/* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
10714
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10715
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
10716
|
+
/* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
10717
|
+
const value = e.target.value;
|
|
10718
|
+
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
10719
|
+
handleCardChange("cardName", value);
|
|
10720
|
+
}
|
|
10721
|
+
} }),
|
|
10722
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11026
10723
|
] }),
|
|
11027
|
-
/* @__PURE__ */
|
|
11028
|
-
|
|
11029
|
-
|
|
11030
|
-
|
|
11031
|
-
|
|
11032
|
-
|
|
11033
|
-
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11044
|
-
] }),
|
|
11045
|
-
/* @__PURE__ */ jsx34("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx34(
|
|
11046
|
-
DataCapFields,
|
|
10724
|
+
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx32(
|
|
10725
|
+
DataCapFields,
|
|
10726
|
+
{
|
|
10727
|
+
isOpen: show || autoTrigger,
|
|
10728
|
+
tokenKey: dcToken,
|
|
10729
|
+
setLoader: activeinCard === "form" ? setLoadingIframe : null
|
|
10730
|
+
}
|
|
10731
|
+
) }),
|
|
10732
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10733
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "zip", children: "ZIP" }),
|
|
10734
|
+
/* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_h = cardData == null ? void 0 : cardData.zipCode) != null ? _h : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
|
|
10735
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
|
|
10736
|
+
] }),
|
|
10737
|
+
customerId && /* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
10738
|
+
/* @__PURE__ */ jsx32(
|
|
10739
|
+
"input",
|
|
11047
10740
|
{
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
|
|
10741
|
+
type: "checkbox",
|
|
10742
|
+
id: "save_card",
|
|
10743
|
+
className: "toggle-checkbox",
|
|
10744
|
+
checked: saveCardInfo,
|
|
10745
|
+
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11052
10746
|
}
|
|
11053
|
-
)
|
|
11054
|
-
/* @__PURE__ */
|
|
11055
|
-
|
|
11056
|
-
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
"Credit cards include a fee amount of ",
|
|
11060
|
-
/* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11061
|
-
"."
|
|
11062
|
-
] })
|
|
11063
|
-
] }),
|
|
11064
|
-
customerId && /* @__PURE__ */ jsx34("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
11065
|
-
/* @__PURE__ */ jsx34(
|
|
11066
|
-
"input",
|
|
10747
|
+
),
|
|
10748
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
10749
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
10750
|
+
/* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
|
|
10751
|
+
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
|
|
10752
|
+
"svg",
|
|
11067
10753
|
{
|
|
11068
|
-
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
10754
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10755
|
+
width: "20",
|
|
10756
|
+
height: "20",
|
|
10757
|
+
viewBox: "0 0 20 20",
|
|
10758
|
+
fill: "none",
|
|
10759
|
+
children: [
|
|
10760
|
+
/* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
10761
|
+
/* @__PURE__ */ jsx32(
|
|
10762
|
+
"path",
|
|
10763
|
+
{
|
|
10764
|
+
d: "M9.03406 12.0979V12.0072C9.04055 11.4153 9.10057 10.9443 9.21411 10.5943C9.3309 10.2442 9.49635 9.96102 9.71046 9.74463C9.92457 9.52824 10.1825 9.33095 10.4842 9.15274C10.6788 9.03182 10.854 8.89658 11.0097 8.74702C11.1655 8.59745 11.2887 8.42562 11.3796 8.2315C11.4704 8.03739 11.5158 7.82259 11.5158 7.58711C11.5158 7.3039 11.4477 7.05887 11.3114 6.85203C11.1752 6.64519 10.9935 6.48608 10.7664 6.3747C10.5426 6.26014 10.2928 6.20286 10.017 6.20286C9.76723 6.20286 9.52879 6.25378 9.3017 6.35561C9.07461 6.45744 8.88646 6.61655 8.73723 6.83294C8.588 7.04614 8.50203 7.3214 8.47932 7.65871H7C7.02271 7.08592 7.17032 6.60223 7.44282 6.20764C7.71533 5.80986 8.07543 5.50915 8.52311 5.30549C8.97405 5.10183 9.47202 5 10.017 5C10.6139 5 11.1363 5.10979 11.5839 5.32936C12.0316 5.54574 12.3788 5.84964 12.6253 6.24105C12.8751 6.62928 13 7.08274 13 7.60143C13 7.95784 12.9432 8.27924 12.8297 8.56563C12.7161 8.84885 12.5539 9.10183 12.3431 9.32458C12.1354 9.54733 11.8856 9.74463 11.5937 9.91647C11.3179 10.0851 11.0941 10.2601 10.9221 10.4415C10.7534 10.6229 10.6302 10.8377 10.5523 11.0859C10.4745 11.3341 10.4323 11.6412 10.4258 12.0072V12.0979H9.03406ZM9.76886 15C9.50284 15 9.27413 14.9077 9.08273 14.7232C8.89132 14.5354 8.79562 14.3095 8.79562 14.0453C8.79562 13.7844 8.89132 13.5617 9.08273 13.3771C9.27413 13.1893 9.50284 13.0955 9.76886 13.0955C10.0316 13.0955 10.2587 13.1893 10.4501 13.3771C10.6448 13.5617 10.7421 13.7844 10.7421 14.0453C10.7421 14.2204 10.6967 14.3811 10.6058 14.5274C10.5182 14.6706 10.4015 14.7852 10.2555 14.8711C10.1095 14.957 9.94728 15 9.76886 15Z",
|
|
10765
|
+
fill: "#161616"
|
|
10766
|
+
}
|
|
10767
|
+
)
|
|
10768
|
+
]
|
|
11073
10769
|
}
|
|
11074
|
-
),
|
|
11075
|
-
/* @__PURE__ */
|
|
11076
|
-
|
|
11077
|
-
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
|
|
11081
|
-
|
|
11082
|
-
width: "20",
|
|
11083
|
-
height: "20",
|
|
11084
|
-
viewBox: "0 0 20 20",
|
|
11085
|
-
fill: "none",
|
|
11086
|
-
children: [
|
|
11087
|
-
/* @__PURE__ */ jsx34("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11088
|
-
/* @__PURE__ */ jsx34(
|
|
11089
|
-
"path",
|
|
11090
|
-
{
|
|
11091
|
-
d: "M9.03406 12.0979V12.0072C9.04055 11.4153 9.10057 10.9443 9.21411 10.5943C9.3309 10.2442 9.49635 9.96102 9.71046 9.74463C9.92457 9.52824 10.1825 9.33095 10.4842 9.15274C10.6788 9.03182 10.854 8.89658 11.0097 8.74702C11.1655 8.59745 11.2887 8.42562 11.3796 8.2315C11.4704 8.03739 11.5158 7.82259 11.5158 7.58711C11.5158 7.3039 11.4477 7.05887 11.3114 6.85203C11.1752 6.64519 10.9935 6.48608 10.7664 6.3747C10.5426 6.26014 10.2928 6.20286 10.017 6.20286C9.76723 6.20286 9.52879 6.25378 9.3017 6.35561C9.07461 6.45744 8.88646 6.61655 8.73723 6.83294C8.588 7.04614 8.50203 7.3214 8.47932 7.65871H7C7.02271 7.08592 7.17032 6.60223 7.44282 6.20764C7.71533 5.80986 8.07543 5.50915 8.52311 5.30549C8.97405 5.10183 9.47202 5 10.017 5C10.6139 5 11.1363 5.10979 11.5839 5.32936C12.0316 5.54574 12.3788 5.84964 12.6253 6.24105C12.8751 6.62928 13 7.08274 13 7.60143C13 7.95784 12.9432 8.27924 12.8297 8.56563C12.7161 8.84885 12.5539 9.10183 12.3431 9.32458C12.1354 9.54733 11.8856 9.74463 11.5937 9.91647C11.3179 10.0851 11.0941 10.2601 10.9221 10.4415C10.7534 10.6229 10.6302 10.8377 10.5523 11.0859C10.4745 11.3341 10.4323 11.6412 10.4258 12.0072V12.0979H9.03406ZM9.76886 15C9.50284 15 9.27413 14.9077 9.08273 14.7232C8.89132 14.5354 8.79562 14.3095 8.79562 14.0453C8.79562 13.7844 8.89132 13.5617 9.08273 13.3771C9.27413 13.1893 9.50284 13.0955 9.76886 13.0955C10.0316 13.0955 10.2587 13.1893 10.4501 13.3771C10.6448 13.5617 10.7421 13.7844 10.7421 14.0453C10.7421 14.2204 10.6967 14.3811 10.6058 14.5274C10.5182 14.6706 10.4015 14.7852 10.2555 14.8711C10.1095 14.957 9.94728 15 9.76886 15Z",
|
|
11092
|
-
fill: "#161616"
|
|
11093
|
-
}
|
|
11094
|
-
)
|
|
11095
|
-
]
|
|
11096
|
-
}
|
|
11097
|
-
) }),
|
|
11098
|
-
/* @__PURE__ */ jsx34("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
|
|
11099
|
-
"If checked, I agree to give the ",
|
|
11100
|
-
/* @__PURE__ */ jsx34("b", { children: merchantName || "merchant" }),
|
|
11101
|
-
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11102
|
-
] }) })
|
|
11103
|
-
] })
|
|
11104
|
-
] }) })
|
|
11105
|
-
] }),
|
|
11106
|
-
/* @__PURE__ */ jsx34("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx34("button", { type: "submit", style: { margin: 0, display: onSubmit ? "none" : "block" }, className: "pay-button", children: partialAmount ? formatUSD((_k = Number(partialAmount)) == null ? void 0 : _k.toFixed(2)) : formatUSD((_l = Number(amount)) == null ? void 0 : _l.toFixed(2)) }) })
|
|
11107
|
-
] })
|
|
11108
|
-
] }),
|
|
11109
|
-
/* @__PURE__ */ jsx34("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11110
|
-
!onSubmit && /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
|
|
11111
|
-
/* @__PURE__ */ jsx34("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs20("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
|
|
11112
|
-
" ",
|
|
11113
|
-
/* @__PURE__ */ jsx34(IoArrowBack4, {})
|
|
11114
|
-
] }) }),
|
|
11115
|
-
/* @__PURE__ */ jsx34("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
|
|
10770
|
+
) }),
|
|
10771
|
+
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
10772
|
+
"If checked, I agree to give the ",
|
|
10773
|
+
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10774
|
+
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
10775
|
+
] }) })
|
|
10776
|
+
] })
|
|
10777
|
+
] }) })
|
|
11116
10778
|
] }),
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
10779
|
+
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx32("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount ? formatUSD((_i = Number(partialAmount)) == null ? void 0 : _i.toFixed(2)) : formatUSD((_j = Number(amount)) == null ? void 0 : _j.toFixed(2)) }) })
|
|
10780
|
+
] })
|
|
10781
|
+
] }),
|
|
10782
|
+
/* @__PURE__ */ jsx32("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10783
|
+
/* @__PURE__ */ jsxs19("div", { className: "frac-heading-card-wrap", children: [
|
|
10784
|
+
/* @__PURE__ */ jsx32("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs19("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
|
|
10785
|
+
" ",
|
|
10786
|
+
/* @__PURE__ */ jsx32(IoArrowBack4, {})
|
|
10787
|
+
] }) }),
|
|
10788
|
+
/* @__PURE__ */ jsx32("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
|
|
10789
|
+
] }),
|
|
10790
|
+
activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10791
|
+
/* @__PURE__ */ jsx32(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
|
|
10792
|
+
setActiveinBank("form");
|
|
10793
|
+
} }),
|
|
10794
|
+
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", style: { padding: "0" }, children: /* @__PURE__ */ jsx32("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_k = Number(bankAmount)) == null ? void 0 : _k.toFixed(2)) }) })
|
|
10795
|
+
] }) : /* @__PURE__ */ jsxs19("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
|
|
10796
|
+
if (e.key === "Enter" && loading) {
|
|
10797
|
+
e.preventDefault();
|
|
10798
|
+
e.stopPropagation();
|
|
10799
|
+
}
|
|
10800
|
+
}, children: [
|
|
10801
|
+
/* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: {
|
|
10802
|
+
minHeight: "444px",
|
|
10803
|
+
maxHeight: "444px"
|
|
11127
10804
|
}, children: [
|
|
11128
|
-
/* @__PURE__ */
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11133
|
-
/* @__PURE__ */ jsx34("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
11134
|
-
/* @__PURE__ */ jsx34("input", { type: "text", id: "nameonaccount", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", name: "name", value: (_n = achData == null ? void 0 : achData.name) != null ? _n : "", onChange: handleChangeAch }),
|
|
11135
|
-
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
11136
|
-
] }),
|
|
11137
|
-
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11138
|
-
/* @__PURE__ */ jsx34("label", { htmlFor: "routingnumber", children: "Routing number" }),
|
|
11139
|
-
/* @__PURE__ */ jsx34(
|
|
11140
|
-
"input",
|
|
11141
|
-
{
|
|
11142
|
-
type: "text",
|
|
11143
|
-
id: "routingnumber",
|
|
11144
|
-
className: "form-control-frac",
|
|
11145
|
-
maxLength: 9,
|
|
11146
|
-
placeholder: "000000000",
|
|
11147
|
-
name: "routingNumber",
|
|
11148
|
-
value: (_o = achData == null ? void 0 : achData.routingNumber) != null ? _o : "",
|
|
11149
|
-
onChange: handleChangeAch
|
|
11150
|
-
}
|
|
11151
|
-
),
|
|
11152
|
-
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
|
|
11153
|
-
] }),
|
|
11154
|
-
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11155
|
-
/* @__PURE__ */ jsx34("label", { htmlFor: "accountnumber", children: "Account number" }),
|
|
11156
|
-
/* @__PURE__ */ jsx34(
|
|
11157
|
-
"input",
|
|
11158
|
-
{
|
|
11159
|
-
type: "text",
|
|
11160
|
-
id: "accountnumber",
|
|
11161
|
-
className: "form-control-frac",
|
|
11162
|
-
maxLength: 16,
|
|
11163
|
-
placeholder: "0000000000",
|
|
11164
|
-
name: "accountNumber",
|
|
11165
|
-
value: (_p = achData == null ? void 0 : achData.accountNumber) != null ? _p : "",
|
|
11166
|
-
onChange: handleChangeAch
|
|
11167
|
-
}
|
|
11168
|
-
),
|
|
11169
|
-
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
|
|
11170
|
-
] }),
|
|
11171
|
-
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11172
|
-
/* @__PURE__ */ jsx34("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
|
|
11173
|
-
/* @__PURE__ */ jsx34(
|
|
11174
|
-
"input",
|
|
11175
|
-
{
|
|
11176
|
-
type: "text",
|
|
11177
|
-
id: "confirmaccountnumber",
|
|
11178
|
-
className: "form-control-frac",
|
|
11179
|
-
maxLength: 16,
|
|
11180
|
-
placeholder: "0000000000",
|
|
11181
|
-
name: "confirmAccountNumber",
|
|
11182
|
-
value: (_q = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _q : "",
|
|
11183
|
-
onChange: handleChangeAch
|
|
11184
|
-
}
|
|
11185
|
-
),
|
|
11186
|
-
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
|
|
11187
|
-
] }),
|
|
11188
|
-
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11189
|
-
/* @__PURE__ */ jsx34("label", { htmlFor: "bankname", children: "Bank name" }),
|
|
11190
|
-
/* @__PURE__ */ jsx34(
|
|
11191
|
-
"input",
|
|
11192
|
-
{
|
|
11193
|
-
type: "text",
|
|
11194
|
-
id: "bankname",
|
|
11195
|
-
className: "form-control-frac",
|
|
11196
|
-
maxLength: 100,
|
|
11197
|
-
placeholder: "My Bank",
|
|
11198
|
-
name: "bankName",
|
|
11199
|
-
value: (_r = achData == null ? void 0 : achData.bankName) != null ? _r : "",
|
|
11200
|
-
onChange: handleChangeAch
|
|
11201
|
-
}
|
|
11202
|
-
),
|
|
11203
|
-
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
|
|
11204
|
-
] }),
|
|
11205
|
-
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11206
|
-
/* @__PURE__ */ jsx34("label", { htmlFor: "companyName", children: "Company name" }),
|
|
11207
|
-
/* @__PURE__ */ jsx34(
|
|
11208
|
-
"input",
|
|
11209
|
-
{
|
|
11210
|
-
type: "text",
|
|
11211
|
-
id: "companyName",
|
|
11212
|
-
className: "form-control-frac",
|
|
11213
|
-
maxLength: 100,
|
|
11214
|
-
placeholder: "My Company",
|
|
11215
|
-
name: "companyName",
|
|
11216
|
-
value: (_s = achData == null ? void 0 : achData.companyName) != null ? _s : "",
|
|
11217
|
-
onChange: handleChangeAch
|
|
11218
|
-
}
|
|
11219
|
-
),
|
|
11220
|
-
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
|
|
11221
|
-
] }),
|
|
11222
|
-
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11223
|
-
/* @__PURE__ */ jsx34("label", { htmlFor: "accounttype", children: "Select account type" }),
|
|
11224
|
-
/* @__PURE__ */ jsxs20("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
|
|
11225
|
-
/* @__PURE__ */ jsx34("option", { value: "", children: "Select account" }),
|
|
11226
|
-
accountTypes.map((type) => /* @__PURE__ */ jsx34("option", { value: type.value, children: type.label }, type.value))
|
|
11227
|
-
] }),
|
|
11228
|
-
bankFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
|
|
11229
|
-
"There is a processing fee of ",
|
|
11230
|
-
/* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
|
|
11231
|
-
"."
|
|
11232
|
-
] })
|
|
11233
|
-
] }),
|
|
11234
|
-
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11235
|
-
/* @__PURE__ */ jsx34("input", { type: "checkbox", id: "achconsent", className: "", maxLength: 100, placeholder: "My Bank" }),
|
|
11236
|
-
/* @__PURE__ */ jsx34("label", { className: "saveachlabel", htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${merchantName || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
|
|
11237
|
-
] }),
|
|
11238
|
-
customerId && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11239
|
-
/* @__PURE__ */ jsx34("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
11240
|
-
/* @__PURE__ */ jsx34("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
|
|
11241
|
-
] }),
|
|
11242
|
-
saveACHinfo && /* @__PURE__ */ jsx34("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs20("p", { children: [
|
|
11243
|
-
"If checked, I agree to give the ",
|
|
11244
|
-
/* @__PURE__ */ jsx34("b", { children: merchantName || "merchant" }),
|
|
11245
|
-
" permission to charge this bank account for agreed-upon purchases in the future."
|
|
11246
|
-
] }) })
|
|
10805
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10806
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
10807
|
+
/* @__PURE__ */ jsx32("input", { type: "text", id: "nameonaccount", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", name: "name", value: (_l = achData == null ? void 0 : achData.name) != null ? _l : "", onChange: handleChangeAch }),
|
|
10808
|
+
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
11247
10809
|
] }),
|
|
11248
|
-
/* @__PURE__ */
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
10810
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10811
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "routingnumber", children: "Routing number" }),
|
|
10812
|
+
/* @__PURE__ */ jsx32(
|
|
10813
|
+
"input",
|
|
10814
|
+
{
|
|
10815
|
+
type: "text",
|
|
10816
|
+
id: "routingnumber",
|
|
10817
|
+
className: "form-control-frac",
|
|
10818
|
+
maxLength: 9,
|
|
10819
|
+
placeholder: "000000000",
|
|
10820
|
+
name: "routingNumber",
|
|
10821
|
+
value: (_m = achData == null ? void 0 : achData.routingNumber) != null ? _m : "",
|
|
10822
|
+
onChange: handleChangeAch
|
|
10823
|
+
}
|
|
10824
|
+
),
|
|
10825
|
+
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
|
|
10826
|
+
] }),
|
|
10827
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10828
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "accountnumber", children: "Account number" }),
|
|
10829
|
+
/* @__PURE__ */ jsx32(
|
|
10830
|
+
"input",
|
|
10831
|
+
{
|
|
10832
|
+
type: "text",
|
|
10833
|
+
id: "accountnumber",
|
|
10834
|
+
className: "form-control-frac",
|
|
10835
|
+
maxLength: 16,
|
|
10836
|
+
placeholder: "0000000000",
|
|
10837
|
+
name: "accountNumber",
|
|
10838
|
+
value: (_n = achData == null ? void 0 : achData.accountNumber) != null ? _n : "",
|
|
10839
|
+
onChange: handleChangeAch
|
|
10840
|
+
}
|
|
10841
|
+
),
|
|
10842
|
+
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
|
|
10843
|
+
] }),
|
|
10844
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10845
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
|
|
10846
|
+
/* @__PURE__ */ jsx32(
|
|
10847
|
+
"input",
|
|
10848
|
+
{
|
|
10849
|
+
type: "text",
|
|
10850
|
+
id: "confirmaccountnumber",
|
|
10851
|
+
className: "form-control-frac",
|
|
10852
|
+
maxLength: 16,
|
|
10853
|
+
placeholder: "0000000000",
|
|
10854
|
+
name: "confirmAccountNumber",
|
|
10855
|
+
value: (_o = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _o : "",
|
|
10856
|
+
onChange: handleChangeAch
|
|
10857
|
+
}
|
|
10858
|
+
),
|
|
10859
|
+
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
|
|
10860
|
+
] }),
|
|
10861
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10862
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "bankname", children: "Bank name" }),
|
|
10863
|
+
/* @__PURE__ */ jsx32(
|
|
10864
|
+
"input",
|
|
10865
|
+
{
|
|
10866
|
+
type: "text",
|
|
10867
|
+
id: "bankname",
|
|
10868
|
+
className: "form-control-frac",
|
|
10869
|
+
maxLength: 100,
|
|
10870
|
+
placeholder: "My Bank",
|
|
10871
|
+
name: "bankName",
|
|
10872
|
+
value: (_p = achData == null ? void 0 : achData.bankName) != null ? _p : "",
|
|
10873
|
+
onChange: handleChangeAch
|
|
10874
|
+
}
|
|
10875
|
+
),
|
|
10876
|
+
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
|
|
10877
|
+
] }),
|
|
10878
|
+
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10879
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "companyName", children: "Company name" }),
|
|
10880
|
+
/* @__PURE__ */ jsx32(
|
|
10881
|
+
"input",
|
|
10882
|
+
{
|
|
10883
|
+
type: "text",
|
|
10884
|
+
id: "companyName",
|
|
10885
|
+
className: "form-control-frac",
|
|
10886
|
+
maxLength: 100,
|
|
10887
|
+
placeholder: "My Company",
|
|
10888
|
+
name: "companyName",
|
|
10889
|
+
value: (_q = achData == null ? void 0 : achData.companyName) != null ? _q : "",
|
|
10890
|
+
onChange: handleChangeAch
|
|
10891
|
+
}
|
|
10892
|
+
),
|
|
10893
|
+
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
|
|
10894
|
+
] }),
|
|
10895
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10896
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "accounttype", children: "Select account type" }),
|
|
10897
|
+
/* @__PURE__ */ jsxs19("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_r = achData == null ? void 0 : achData.accountType) != null ? _r : "", onChange: handleChangeAch, children: [
|
|
10898
|
+
/* @__PURE__ */ jsx32("option", { value: "", children: "Select account" }),
|
|
10899
|
+
accountTypes.map((type) => /* @__PURE__ */ jsx32("option", { value: type.value, children: type.label }, type.value))
|
|
10900
|
+
] })
|
|
10901
|
+
] }),
|
|
10902
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
10903
|
+
/* @__PURE__ */ jsx32("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
|
|
10904
|
+
setIsBankConsentChecked(e.target.checked);
|
|
10905
|
+
if (e.target.checked) {
|
|
10906
|
+
setErrorBankConsent("");
|
|
10907
|
+
}
|
|
10908
|
+
} }),
|
|
10909
|
+
/* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${merchantName || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
|
|
10910
|
+
] }),
|
|
10911
|
+
errorBankConsent && /* @__PURE__ */ jsx32("span", { className: "error-span", children: errorBankConsent }),
|
|
10912
|
+
customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
10913
|
+
/* @__PURE__ */ jsx32("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
10914
|
+
/* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
|
|
10915
|
+
] }),
|
|
10916
|
+
saveACHinfo && /* @__PURE__ */ jsx32("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
10917
|
+
"If checked, I agree to give the ",
|
|
10918
|
+
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10919
|
+
" permission to charge this bank account for agreed-upon purchases in the future."
|
|
10920
|
+
] }) })
|
|
10921
|
+
] }),
|
|
10922
|
+
/* @__PURE__ */ jsx32("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx32("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: formatUSD((_s = Number(bankAmount)) == null ? void 0 : _s.toFixed(2)) }) })
|
|
10923
|
+
] })
|
|
10924
|
+
] }) })
|
|
10925
|
+
] }) }) }) })
|
|
11253
10926
|
] })
|
|
11254
10927
|
] })
|
|
11255
10928
|
] })
|
|
@@ -11260,7 +10933,7 @@ var ModelContentSky_default = ModelContentSky;
|
|
|
11260
10933
|
|
|
11261
10934
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
11262
10935
|
import axios10 from "axios";
|
|
11263
|
-
import { Fragment as
|
|
10936
|
+
import { Fragment as Fragment19, jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
11264
10937
|
var PaymentWidget = ({
|
|
11265
10938
|
amount,
|
|
11266
10939
|
bankAmount,
|
|
@@ -11371,510 +11044,24 @@ var PaymentWidget = ({
|
|
|
11371
11044
|
getskyosOrderDetails();
|
|
11372
11045
|
}
|
|
11373
11046
|
}, [show, isPartial, partialRef]);
|
|
11374
|
-
return /* @__PURE__ */
|
|
11375
|
-
/* @__PURE__ */
|
|
11376
|
-
/* @__PURE__ */
|
|
11377
|
-
/* @__PURE__ */
|
|
11378
|
-
/* @__PURE__ */
|
|
11379
|
-
/* @__PURE__ */
|
|
11380
|
-
/* @__PURE__ */
|
|
11381
|
-
/* @__PURE__ */
|
|
11382
|
-
!autoTrigger && /* @__PURE__ */
|
|
11383
|
-
submitBtnText,
|
|
11384
|
-
submitBtnIcon
|
|
11385
|
-
] }),
|
|
11386
|
-
!autoTrigger ? /* @__PURE__ */ jsx35(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx35(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx35(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
|
|
11387
|
-
] });
|
|
11388
|
-
};
|
|
11389
|
-
|
|
11390
|
-
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
11391
|
-
import { useEffect as useEffect17, useState as useState12, useMemo as useMemo2 } from "react";
|
|
11392
|
-
import axios11 from "axios";
|
|
11393
|
-
|
|
11394
|
-
// src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
|
|
11395
|
-
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
11396
|
-
function EmbeddedCheckoutStyles({ extraCustomCSS }) {
|
|
11397
|
-
return /* @__PURE__ */ jsx36("style", { children: `
|
|
11398
|
-
|
|
11399
|
-
.pay-amount-conatiner{
|
|
11400
|
-
margin-top: 20px !important;
|
|
11401
|
-
margin-bottom: 20px !important ;
|
|
11402
|
-
}
|
|
11403
|
-
|
|
11404
|
-
.frac-pay-container.pay-container {
|
|
11405
|
-
grid-template-columns:1fr;
|
|
11406
|
-
}
|
|
11407
|
-
|
|
11408
|
-
|
|
11409
|
-
/* Card */
|
|
11410
|
-
.plan-card {
|
|
11411
|
-
width: 100%;
|
|
11412
|
-
font-family: Inter, sans-serif;
|
|
11413
|
-
background: #fff;
|
|
11414
|
-
}
|
|
11415
|
-
|
|
11416
|
-
/* Header */
|
|
11417
|
-
.card-header {
|
|
11418
|
-
padding: 12px 0 0 0;
|
|
11419
|
-
}
|
|
11420
|
-
|
|
11421
|
-
/* Button */
|
|
11422
|
-
.collapse-btn {
|
|
11423
|
-
width: 100%;
|
|
11424
|
-
background: none;
|
|
11425
|
-
border: none;
|
|
11426
|
-
display: flex;
|
|
11427
|
-
justify-content: space-between;
|
|
11428
|
-
align-items: center;
|
|
11429
|
-
cursor: pointer;
|
|
11430
|
-
font-size: 15px;
|
|
11431
|
-
padding: 0;
|
|
11432
|
-
}
|
|
11433
|
-
|
|
11434
|
-
/* Arrow */
|
|
11435
|
-
.arrow {
|
|
11436
|
-
transition: transform 0.3s ease;
|
|
11437
|
-
height: 8px;
|
|
11438
|
-
}
|
|
11439
|
-
|
|
11440
|
-
/* Open State */
|
|
11441
|
-
.collapse-btn.open .arrow {
|
|
11442
|
-
transform: rotate(180deg); /* Down */
|
|
11443
|
-
}
|
|
11444
|
-
|
|
11445
|
-
/* Body */
|
|
11446
|
-
.card-body {
|
|
11447
|
-
padding: 0;
|
|
11448
|
-
}
|
|
11449
|
-
|
|
11450
|
-
/* Plan Header */
|
|
11451
|
-
.plan-header {
|
|
11452
|
-
font-size: 15px;
|
|
11453
|
-
font-weight: 600;
|
|
11454
|
-
}
|
|
11455
|
-
|
|
11456
|
-
/* Scrollable List */
|
|
11457
|
-
.plan-list {
|
|
11458
|
-
max-height: 200px;
|
|
11459
|
-
overflow-y: auto;
|
|
11460
|
-
padding-right: 6px;
|
|
11461
|
-
}
|
|
11462
|
-
|
|
11463
|
-
/* Items */
|
|
11464
|
-
.plan-item {
|
|
11465
|
-
display: flex;
|
|
11466
|
-
justify-content: space-between;
|
|
11467
|
-
padding: 6px 0;
|
|
11468
|
-
font-size: 14px;
|
|
11469
|
-
}
|
|
11470
|
-
|
|
11471
|
-
/* Badges */
|
|
11472
|
-
.badge {
|
|
11473
|
-
padding: 4px 10px;
|
|
11474
|
-
border-radius: 12px;
|
|
11475
|
-
font-size: 12px;
|
|
11476
|
-
font-weight: 500;
|
|
11477
|
-
}
|
|
11478
|
-
|
|
11479
|
-
.badge-included {
|
|
11480
|
-
background: #f1f3f5;
|
|
11481
|
-
color: #495057;
|
|
11482
|
-
}
|
|
11483
|
-
|
|
11484
|
-
.badge-available {
|
|
11485
|
-
background: #f8f9fa;
|
|
11486
|
-
color: #212529;
|
|
11487
|
-
}
|
|
11488
|
-
|
|
11489
|
-
/* Helpers */
|
|
11490
|
-
.row-between {
|
|
11491
|
-
display: flex;
|
|
11492
|
-
justify-content: space-between;
|
|
11493
|
-
}
|
|
11494
|
-
|
|
11495
|
-
.text-end {
|
|
11496
|
-
text-align: right;
|
|
11497
|
-
}
|
|
11498
|
-
|
|
11499
|
-
.text-muted {
|
|
11500
|
-
color: #6c757d;
|
|
11501
|
-
font-size: 12px;
|
|
11502
|
-
}
|
|
11503
|
-
|
|
11504
|
-
.fw-semibold {
|
|
11505
|
-
font-weight: 600;
|
|
11506
|
-
}
|
|
11507
|
-
|
|
11508
|
-
.mb-2 {
|
|
11509
|
-
margin-bottom: 8px;
|
|
11510
|
-
}
|
|
11511
|
-
|
|
11512
|
-
/* Divider */
|
|
11513
|
-
.divider {
|
|
11514
|
-
height: 1px;
|
|
11515
|
-
background: #e5e7eb;
|
|
11516
|
-
margin: 8px 0;
|
|
11517
|
-
}
|
|
11518
|
-
|
|
11519
|
-
/* Collapse Animation */
|
|
11520
|
-
.collapse {
|
|
11521
|
-
max-height: 0;
|
|
11522
|
-
overflow: hidden;
|
|
11523
|
-
transition: max-height 0.3s ease;
|
|
11524
|
-
}
|
|
11525
|
-
|
|
11526
|
-
.collapse.show {
|
|
11527
|
-
max-height: 1000px;
|
|
11528
|
-
}
|
|
11529
|
-
.frac-pay-container.pay-container {
|
|
11530
|
-
grid-template-columns:1fr;
|
|
11531
|
-
}
|
|
11532
|
-
.frac-payment-form-div .amt-pay-con {
|
|
11533
|
-
padding-right: 0px;
|
|
11534
|
-
}
|
|
11535
|
-
.frac-payment-form-div .ach-scrl {
|
|
11536
|
-
padding-right: 0px;
|
|
11537
|
-
gap: 10px;
|
|
11538
|
-
max-height: fit-content !important;
|
|
11539
|
-
min-height: fit-content !important;
|
|
11540
|
-
overflow: hidden !important;
|
|
11541
|
-
}
|
|
11542
|
-
.frac-payment-form-div .frac-card-bank-radio-main {
|
|
11543
|
-
display: flex;
|
|
11544
|
-
flex-direction: row;
|
|
11545
|
-
align-items: flex-start;
|
|
11546
|
-
align-self: stretch;
|
|
11547
|
-
border-radius: 14px;
|
|
11548
|
-
border: none;
|
|
11549
|
-
overflow: visible;
|
|
11550
|
-
gap: 10px;
|
|
11551
|
-
}
|
|
11552
|
-
.frac-payment-form-div .frac-card-bank-radio {
|
|
11553
|
-
display: flex;
|
|
11554
|
-
padding: 12px 16px;
|
|
11555
|
-
justify-content: space-between;
|
|
11556
|
-
align-items: center;
|
|
11557
|
-
align-self: stretch;
|
|
11558
|
-
width: 50%;
|
|
11559
|
-
border: 1px solid #E0DFE2;
|
|
11560
|
-
border-radius: 10px;
|
|
11561
|
-
box-shadow: rgba(149, 157, 165, 0.2) 0px 1px 4px;
|
|
11562
|
-
}
|
|
11563
|
-
.frac-payment-form-div .frac-card-bank-radio.frac-active {
|
|
11564
|
-
background: #fff;
|
|
11565
|
-
border: 2px solid #004eab !important;
|
|
11566
|
-
}
|
|
11567
|
-
|
|
11568
|
-
.frac-payment-form-div .form-control-frac {
|
|
11569
|
-
border: 1px solid #dee2e6 !important;
|
|
11570
|
-
border-radius: 0.375rem !important;
|
|
11571
|
-
background-color: #F6F6F7;
|
|
11572
|
-
box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
|
|
11573
|
-
}
|
|
11574
|
-
.frac-payment-form-div .form-control-frac:focus {
|
|
11575
|
-
border: 1px solid #004eab !important;
|
|
11576
|
-
}
|
|
11577
|
-
.frac-payment-form-div .card-expiry-new {
|
|
11578
|
-
border: none;
|
|
11579
|
-
gap: 10px;
|
|
11580
|
-
}
|
|
11581
|
-
.frac-payment-form-div .exp-date-year-container {
|
|
11582
|
-
gap: 10px;
|
|
11583
|
-
width: 100%;
|
|
11584
|
-
}
|
|
11585
|
-
.frac-payment-form-div .card-type-logo-wrap{
|
|
11586
|
-
position: absolute;
|
|
11587
|
-
right: 10px;
|
|
11588
|
-
max-width: 30px;
|
|
11589
|
-
}
|
|
11590
|
-
.detials-wrap.detials-wrap-1 {
|
|
11591
|
-
display: flex;
|
|
11592
|
-
flex-wrap: wrap;
|
|
11593
|
-
}
|
|
11594
|
-
@media screen and (max-width: 1280px) {
|
|
11595
|
-
.frac-pay-container.pay-container {
|
|
11596
|
-
grid-template-columns: 1fr;
|
|
11597
|
-
border: none;
|
|
11598
|
-
}
|
|
11599
|
-
}
|
|
11600
|
-
@media screen and (max-width: 899px) {
|
|
11601
|
-
.detials-wrap {
|
|
11602
|
-
grid-template-columns: 1fr !important;
|
|
11603
|
-
}
|
|
11604
|
-
.frac-payment-form-div .exp-date-year-container{
|
|
11605
|
-
width: 100%;}
|
|
11606
|
-
|
|
11607
|
-
}
|
|
11608
|
-
@media screen and (max-width: 575px) {
|
|
11609
|
-
.frac-payment-form-div .card-type-logo-wrap{
|
|
11610
|
-
max-width: 30px;
|
|
11611
|
-
}
|
|
11612
|
-
form#ACHPaymentForm .ach-scrl {
|
|
11613
|
-
grid-template-columns: 1fr !important;
|
|
11614
|
-
}
|
|
11615
|
-
@media screen and (max-width: 375px) {
|
|
11616
|
-
.frac-payment-form-div .exp-date-year-container {
|
|
11617
|
-
flex-direction: column;
|
|
11618
|
-
}
|
|
11619
|
-
.parent-pay-container {
|
|
11620
|
-
padding: 10px;
|
|
11621
|
-
}
|
|
11622
|
-
}
|
|
11623
|
-
}
|
|
11624
|
-
.box-inner-card-text{
|
|
11625
|
-
display: flex;
|
|
11626
|
-
gap: 0px;
|
|
11627
|
-
flex-direction: column;
|
|
11628
|
-
}
|
|
11629
|
-
.box-inner-card-text .frac-payment-type-logo {
|
|
11630
|
-
width: 17px;
|
|
11631
|
-
height: 17px;
|
|
11632
|
-
aspect-ratio: 1/1;
|
|
11633
|
-
}
|
|
11634
|
-
.exp-date-year-wrap.form-control-frac input {
|
|
11635
|
-
background: transparent;
|
|
11636
|
-
border: none;
|
|
11637
|
-
outline: none;
|
|
11638
|
-
font-size: 1rem;
|
|
11639
|
-
font-weight: 400;
|
|
11640
|
-
}
|
|
11641
|
-
.exp-date-year-wrap.form-control-frac {
|
|
11642
|
-
display: flex;
|
|
11643
|
-
gap: 2px;
|
|
11644
|
-
}
|
|
11645
|
-
.exp-date-year-wrap input.exp-month {
|
|
11646
|
-
width: 32px;
|
|
11647
|
-
}
|
|
11648
|
-
.detials-wrap {
|
|
11649
|
-
display: grid;
|
|
11650
|
-
grid-template-columns: 1fr 1fr;
|
|
11651
|
-
gap: 10px;
|
|
11652
|
-
}
|
|
11653
|
-
.detials-wrap.detials-wrap-2{
|
|
11654
|
-
grid-template-columns: 1fr 1fr;
|
|
11655
|
-
}
|
|
11656
|
-
form#ACHPaymentForm .ach-scrl {
|
|
11657
|
-
display: grid;
|
|
11658
|
-
grid-gap: 0px 10px;
|
|
11659
|
-
grid-template-columns: 1fr;
|
|
11660
|
-
}
|
|
11661
|
-
.plan-list {
|
|
11662
|
-
max-height: 130px;
|
|
11663
|
-
min-height: 130px;
|
|
11664
|
-
overflow-y: auto;
|
|
11665
|
-
padding-right: 6px;
|
|
11666
|
-
}
|
|
11667
|
-
.plan-list::-webkit-scrollbar {
|
|
11668
|
-
width: 3px;
|
|
11669
|
-
background-color: #F5F5F5;
|
|
11670
|
-
}
|
|
11671
|
-
.plan-list::-webkit-scrollbar-thumb {
|
|
11672
|
-
background-color: #35254D;
|
|
11673
|
-
}
|
|
11674
|
-
div#cvv {
|
|
11675
|
-
border-top-left-radius: 0;
|
|
11676
|
-
border-bottom-left-radius: 0;
|
|
11677
|
-
border-top: 0;
|
|
11678
|
-
border-bottom: 0;
|
|
11679
|
-
border-right: 0;
|
|
11680
|
-
}
|
|
11681
|
-
div#exp_year {
|
|
11682
|
-
height: 36px;
|
|
11683
|
-
width: calc(100% + 1px);
|
|
11684
|
-
border-radius: 0;
|
|
11685
|
-
border-top: 0;
|
|
11686
|
-
border-bottom: 0;
|
|
11687
|
-
border-right: 1px solid #dee2e6;
|
|
11688
|
-
}
|
|
11689
|
-
div#exp_month {
|
|
11690
|
-
width: calc(100% + 1px);
|
|
11691
|
-
border-top-right-radius: 0;
|
|
11692
|
-
border-bottom-right-radius: 0;
|
|
11693
|
-
border: 0;
|
|
11694
|
-
border-right: 1px solid #dee2e6;
|
|
11695
|
-
}
|
|
11696
|
-
.exp-date-year-container .form-group {
|
|
11697
|
-
flex: 1;
|
|
11698
|
-
}
|
|
11699
|
-
.input-main-wrap-frac{
|
|
11700
|
-
margin:0px !important;
|
|
11701
|
-
padding:0px !important;
|
|
11702
|
-
}
|
|
11703
|
-
.toggle-num-wrapper.toggle-num-wrapper-new {
|
|
11704
|
-
border: 1px solid #dee2e6 !important;
|
|
11705
|
-
border-radius: 0.375rem !important;
|
|
11706
|
-
background-color: #F6F6F7;
|
|
11707
|
-
box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
|
|
11708
|
-
}
|
|
11709
|
-
.toggle-num-wrapper-new div#card_number {
|
|
11710
|
-
padding: 0px 10px;
|
|
11711
|
-
border: none;
|
|
11712
|
-
border-bottom: 1px solid #dee2e6;
|
|
11713
|
-
}
|
|
11714
|
-
.toggle-num-wrapper-new .card-crdi.card-expiry-new {
|
|
11715
|
-
padding: 0px 10px;
|
|
11716
|
-
}
|
|
11717
|
-
.toggle-num-wrapper-new .input-main-wrap-frac {
|
|
11718
|
-
height: 36px;
|
|
11719
|
-
}
|
|
11720
|
-
.toggle-num-wrapper-new:focus {
|
|
11721
|
-
border: 1px solid #004eab !important;
|
|
11722
|
-
}
|
|
11723
|
-
.frac-card-title-main {
|
|
11724
|
-
display: flex;
|
|
11725
|
-
align-items: start;
|
|
11726
|
-
gap: 4px;
|
|
11727
|
-
flex-direction: column;
|
|
11728
|
-
}
|
|
11729
|
-
.parent-pay-container {
|
|
11730
|
-
padding: 24px;
|
|
11731
|
-
background-color: #ffffff !important;
|
|
11732
|
-
border-radius: 15px;
|
|
11733
|
-
min-width: 300px;
|
|
11734
|
-
}
|
|
11735
|
-
|
|
11736
|
-
|
|
11737
|
-
${extraCustomCSS}
|
|
11738
|
-
|
|
11739
|
-
` });
|
|
11740
|
-
}
|
|
11741
|
-
|
|
11742
|
-
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
11743
|
-
import { Fragment as Fragment21, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
11744
|
-
var EmbeddedCheckout = ({
|
|
11745
|
-
amount,
|
|
11746
|
-
bankAmount,
|
|
11747
|
-
submitBtnText = "Pay",
|
|
11748
|
-
session_token,
|
|
11749
|
-
customerId,
|
|
11750
|
-
callback,
|
|
11751
|
-
merchantName = "merchant",
|
|
11752
|
-
isPreAuth,
|
|
11753
|
-
surcharge = "0",
|
|
11754
|
-
submitBtnClass,
|
|
11755
|
-
submitBtnIcon,
|
|
11756
|
-
isRequest,
|
|
11757
|
-
pass_fee,
|
|
11758
|
-
pass_fee_amount,
|
|
11759
|
-
require3ds = false,
|
|
11760
|
-
autoTrigger = false,
|
|
11761
|
-
isPartial,
|
|
11762
|
-
bankSurcharge,
|
|
11763
|
-
partialRef,
|
|
11764
|
-
onSubmit,
|
|
11765
|
-
onLoad,
|
|
11766
|
-
customCSS: customCSS2
|
|
11767
|
-
}) => {
|
|
11768
|
-
const [show, setShow] = useState12(false);
|
|
11769
|
-
const [loading, setLoading] = useState12(false);
|
|
11770
|
-
const [childHandleClose, setChildHandleClose] = useState12(() => () => {
|
|
11771
|
-
});
|
|
11772
|
-
const [orderGuid, setOrderGuid] = useState12(null);
|
|
11773
|
-
const [remainingAmount, setRemainingAmount] = useState12(null);
|
|
11774
|
-
const initialCommonProps = useMemo2(
|
|
11775
|
-
() => ({
|
|
11776
|
-
amount,
|
|
11777
|
-
bankAmount,
|
|
11778
|
-
submitBtnText,
|
|
11779
|
-
session_token,
|
|
11780
|
-
customerId,
|
|
11781
|
-
callback,
|
|
11782
|
-
merchantName,
|
|
11783
|
-
isPreAuth,
|
|
11784
|
-
surcharge,
|
|
11785
|
-
submitBtnClass,
|
|
11786
|
-
submitBtnIcon,
|
|
11787
|
-
isRequest,
|
|
11788
|
-
pass_fee,
|
|
11789
|
-
pass_fee_amount,
|
|
11790
|
-
require3ds,
|
|
11791
|
-
autoTrigger,
|
|
11792
|
-
setShow,
|
|
11793
|
-
setHandleCloseRef: setChildHandleClose,
|
|
11794
|
-
isPartial,
|
|
11795
|
-
bankSurcharge,
|
|
11796
|
-
partialRef
|
|
11797
|
-
}),
|
|
11798
|
-
[
|
|
11799
|
-
amount,
|
|
11800
|
-
bankAmount,
|
|
11801
|
-
submitBtnText,
|
|
11802
|
-
session_token,
|
|
11803
|
-
customerId,
|
|
11804
|
-
callback,
|
|
11805
|
-
merchantName,
|
|
11806
|
-
isPreAuth,
|
|
11807
|
-
surcharge,
|
|
11808
|
-
submitBtnClass,
|
|
11809
|
-
submitBtnIcon,
|
|
11810
|
-
isRequest,
|
|
11811
|
-
pass_fee,
|
|
11812
|
-
pass_fee_amount,
|
|
11813
|
-
require3ds,
|
|
11814
|
-
autoTrigger,
|
|
11815
|
-
isPartial,
|
|
11816
|
-
bankSurcharge,
|
|
11817
|
-
partialRef
|
|
11818
|
-
]
|
|
11819
|
-
);
|
|
11820
|
-
const [commonProps, setCommonProps] = useState12(initialCommonProps);
|
|
11821
|
-
useEffect17(() => {
|
|
11822
|
-
if (show) {
|
|
11823
|
-
setCommonProps(initialCommonProps);
|
|
11824
|
-
}
|
|
11825
|
-
}, [show, initialCommonProps]);
|
|
11826
|
-
const getskyosOrderDetails = async () => {
|
|
11827
|
-
var _a;
|
|
11828
|
-
setLoading(true);
|
|
11829
|
-
try {
|
|
11830
|
-
const res = await axios11.get(
|
|
11831
|
-
`${masterBaseUrl}api/v1/gateway/get-order-details/${session_token}`,
|
|
11832
|
-
{ params: { isPartial, partialRef } }
|
|
11833
|
-
);
|
|
11834
|
-
if ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.result) {
|
|
11835
|
-
const data = res.data.data;
|
|
11836
|
-
if (data == null ? void 0 : data.orderGuid) {
|
|
11837
|
-
setOrderGuid(data == null ? void 0 : data.orderGuid);
|
|
11838
|
-
setRemainingAmount(data == null ? void 0 : data.remainingAmount);
|
|
11839
|
-
}
|
|
11840
|
-
setCommonProps((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
11841
|
-
amount: data.amount,
|
|
11842
|
-
pass_fee_amount: data.pass_fee_amount,
|
|
11843
|
-
pass_fee: data.pass_fee
|
|
11844
|
-
}));
|
|
11845
|
-
}
|
|
11846
|
-
} catch (error) {
|
|
11847
|
-
console.log("error while getting skyosorderdeatils", error);
|
|
11848
|
-
} finally {
|
|
11849
|
-
setLoading(false);
|
|
11850
|
-
}
|
|
11851
|
-
};
|
|
11852
|
-
useEffect17(() => {
|
|
11853
|
-
if (show && isPartial && partialRef) {
|
|
11854
|
-
getskyosOrderDetails();
|
|
11855
|
-
}
|
|
11856
|
-
}, [show, isPartial, partialRef]);
|
|
11857
|
-
console.log(onLoad, "onLoad");
|
|
11858
|
-
return /* @__PURE__ */ jsxs22(Fragment21, { children: [
|
|
11859
|
-
/* @__PURE__ */ jsx37("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
11860
|
-
/* @__PURE__ */ jsx37(DataScript, {}),
|
|
11861
|
-
/* @__PURE__ */ jsx37(FractalTokenizerScript, {}),
|
|
11862
|
-
/* @__PURE__ */ jsx37(SkyChargewidgetstyles, {}),
|
|
11863
|
-
/* @__PURE__ */ jsx37(CardBankRadioStyles, {}),
|
|
11864
|
-
/* @__PURE__ */ jsx37(CustomModal2styles_default, {}),
|
|
11865
|
-
/* @__PURE__ */ jsx37(DataCapScriptLoader, {}),
|
|
11866
|
-
/* @__PURE__ */ jsx37(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
|
|
11867
|
-
!autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
11047
|
+
return /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11048
|
+
/* @__PURE__ */ jsx33("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
11049
|
+
/* @__PURE__ */ jsx33(DataScript, {}),
|
|
11050
|
+
/* @__PURE__ */ jsx33(FractalTokenizerScript, {}),
|
|
11051
|
+
/* @__PURE__ */ jsx33(SkyChargewidgetstyles, {}),
|
|
11052
|
+
/* @__PURE__ */ jsx33(CardBankRadioStyles, {}),
|
|
11053
|
+
/* @__PURE__ */ jsx33(CustomModal2styles_default, {}),
|
|
11054
|
+
/* @__PURE__ */ jsx33(DataCapScriptLoader, {}),
|
|
11055
|
+
!autoTrigger && /* @__PURE__ */ jsxs20("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
11868
11056
|
submitBtnText,
|
|
11869
11057
|
submitBtnIcon
|
|
11870
11058
|
] }),
|
|
11871
|
-
!autoTrigger ? /* @__PURE__ */
|
|
11059
|
+
!autoTrigger ? /* @__PURE__ */ jsx33(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx33(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx33(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
|
|
11872
11060
|
] });
|
|
11873
11061
|
};
|
|
11874
11062
|
export {
|
|
11875
11063
|
AddCardEasyPay as AddCard,
|
|
11876
11064
|
CardOnFile,
|
|
11877
|
-
EmbeddedCheckout,
|
|
11878
11065
|
GetPaymentPage,
|
|
11879
11066
|
PartialPayment,
|
|
11880
11067
|
PaymentWidget,
|