@fractalpay/fractalpay-next-test 0.0.38 → 0.0.40
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 +1 -0
- package/dist/index.js +262 -374
- package/dist/index.js.map +1 -1
- package/next.config.ts +1 -0
- package/package.json +8 -3
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-test",
|
|
42
|
-
version: "0.0.
|
|
42
|
+
version: "0.0.40",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -97,7 +97,12 @@ var require_package = __commonJS({
|
|
|
97
97
|
},
|
|
98
98
|
author: "Mukul",
|
|
99
99
|
license: "MIT",
|
|
100
|
-
keywords: [
|
|
100
|
+
keywords: [
|
|
101
|
+
"nextjs",
|
|
102
|
+
"next",
|
|
103
|
+
"typescript",
|
|
104
|
+
"tailwindcss"
|
|
105
|
+
],
|
|
101
106
|
publishConfig: {
|
|
102
107
|
access: "public"
|
|
103
108
|
}
|
|
@@ -236,8 +241,8 @@ var Loader_default = Loader;
|
|
|
236
241
|
var { name } = require_package();
|
|
237
242
|
var S3Url = "https://fractal-userdata-upload.s3.us-east-1.amazonaws.com/";
|
|
238
243
|
if (name === "@fractalpay/fractalpay-next-dev") {
|
|
239
|
-
masterBaseUrl = "https://dev
|
|
240
|
-
baseUrl = "https://
|
|
244
|
+
masterBaseUrl = "https://api.dev.fractalpay.com/";
|
|
245
|
+
baseUrl = "https://widget.dev.fractalpay.com/";
|
|
241
246
|
fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
|
|
242
247
|
datacapUrl = "https://token-cert.dcap.com/v1/client";
|
|
243
248
|
threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
|
|
@@ -1058,9 +1063,10 @@ function RequestPayment(props) {
|
|
|
1058
1063
|
let cash_discount = CalculateCashDiscount(props == null ? void 0 : props.amount, props == null ? void 0 : props.surcharge);
|
|
1059
1064
|
setCashDiscount(cash_discount);
|
|
1060
1065
|
}
|
|
1061
|
-
}, [props == null ? void 0 : props.pass_fee]);
|
|
1066
|
+
}, [props == null ? void 0 : props.pass_fee, show]);
|
|
1062
1067
|
const handleClose = () => {
|
|
1063
1068
|
setShow(false);
|
|
1069
|
+
setCashDiscount(0);
|
|
1064
1070
|
setErrors({});
|
|
1065
1071
|
};
|
|
1066
1072
|
const handleShow = () => setShow(true);
|
|
@@ -2458,6 +2464,20 @@ position:relative;
|
|
|
2458
2464
|
border: 0;
|
|
2459
2465
|
border-right: 1px solid #dee2e6;
|
|
2460
2466
|
}
|
|
2467
|
+
|
|
2468
|
+
.frac-fee-text{
|
|
2469
|
+
display: block;
|
|
2470
|
+
padding: 10px 0 4px;
|
|
2471
|
+
font-family: 'IBM Plex Mono', monospace !important;
|
|
2472
|
+
color: #727272 !important;
|
|
2473
|
+
font-size: 12px;
|
|
2474
|
+
line-height: 1.4;
|
|
2475
|
+
text-align: start !important;
|
|
2476
|
+
}
|
|
2477
|
+
.frac-fee-amount{
|
|
2478
|
+
color: #c62828 !important;
|
|
2479
|
+
}
|
|
2480
|
+
|
|
2461
2481
|
` });
|
|
2462
2482
|
}
|
|
2463
2483
|
|
|
@@ -3298,7 +3318,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3298
3318
|
{
|
|
3299
3319
|
id: "exp_month",
|
|
3300
3320
|
className: "form-control required card-cvv-in",
|
|
3301
|
-
style: { height: "
|
|
3321
|
+
style: { height: "46px", display: "block", minHeight: "46px" }
|
|
3302
3322
|
}
|
|
3303
3323
|
) }),
|
|
3304
3324
|
/* @__PURE__ */ jsx17("div", { className: "exp-year form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
@@ -3306,7 +3326,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3306
3326
|
{
|
|
3307
3327
|
id: "exp_year",
|
|
3308
3328
|
className: "form-control required card-cvv-in",
|
|
3309
|
-
style: { height: "
|
|
3329
|
+
style: { height: "46px", display: "block", minHeight: "46px" }
|
|
3310
3330
|
}
|
|
3311
3331
|
) }),
|
|
3312
3332
|
/* @__PURE__ */ jsx17("div", { className: "security-digit form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
@@ -3314,7 +3334,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3314
3334
|
{
|
|
3315
3335
|
id: "cvv",
|
|
3316
3336
|
className: "form-control card-cvv-in required",
|
|
3317
|
-
style: { height: "
|
|
3337
|
+
style: { height: "46px", display: "block", minHeight: "46px" }
|
|
3318
3338
|
}
|
|
3319
3339
|
) })
|
|
3320
3340
|
] }) })
|
|
@@ -3595,6 +3615,8 @@ function GetPaymentPage(props) {
|
|
|
3595
3615
|
const [selectedCard, setSelectedCard] = useState4();
|
|
3596
3616
|
const [selectedReader, setSelectedReader] = useState4(void 0);
|
|
3597
3617
|
const [cashDiscount, setCashDiscount] = useState4(Number(props == null ? void 0 : props.amount));
|
|
3618
|
+
const [bankAmount, setBankAmount] = useState4(Number(props == null ? void 0 : props.amount));
|
|
3619
|
+
const [bankFeeAmount, setBankFeeAmount] = useState4(0);
|
|
3598
3620
|
const [paymentData, setPaymentData] = useState4();
|
|
3599
3621
|
let [tranId, setTranId] = useState4("");
|
|
3600
3622
|
const tokenizerRef = useRef3(null);
|
|
@@ -3629,7 +3651,25 @@ function GetPaymentPage(props) {
|
|
|
3629
3651
|
useEffect8(() => {
|
|
3630
3652
|
if (show) {
|
|
3631
3653
|
let cash_discount = CalculateCashDiscount(props == null ? void 0 : props.amount, (props == null ? void 0 : props.surcharge) || 0);
|
|
3654
|
+
let bankAmount2 = cash_discount;
|
|
3655
|
+
if ((props == null ? void 0 : props.bankFeeAmount) && Number(props == null ? void 0 : props.bankFeeAmount) > 0) {
|
|
3656
|
+
bankAmount2 = Number(cash_discount) + Number(props == null ? void 0 : props.bankFeeAmount);
|
|
3657
|
+
}
|
|
3658
|
+
setBankAmount(bankAmount2);
|
|
3632
3659
|
setCashDiscount(cash_discount);
|
|
3660
|
+
const cardFeeAmount = Number((Number(props == null ? void 0 : props.amount) - Number(cash_discount || 0)).toFixed(2));
|
|
3661
|
+
const bankFeeAmount2 = Number((props == null ? void 0 : props.bankFeeAmount) || 0);
|
|
3662
|
+
const bankSavingsAmount = Math.max(bankFeeAmount2 > 0 ? cardFeeAmount - bankFeeAmount2 : cardFeeAmount, 0);
|
|
3663
|
+
const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
|
|
3664
|
+
setBankFeeAmount(bankFeeAmount2);
|
|
3665
|
+
console.log({
|
|
3666
|
+
cash_discount,
|
|
3667
|
+
bankAmount: bankAmount2,
|
|
3668
|
+
cardFeeAmount,
|
|
3669
|
+
bankFeeAmount: bankFeeAmount2,
|
|
3670
|
+
bankSavingsAmount,
|
|
3671
|
+
bankSavingsText
|
|
3672
|
+
});
|
|
3633
3673
|
}
|
|
3634
3674
|
}, [show, props == null ? void 0 : props.pass_fee, props == null ? void 0 : props.amount, props == null ? void 0 : props.surcharge]);
|
|
3635
3675
|
const handleClose = () => {
|
|
@@ -3980,7 +4020,7 @@ function GetPaymentPage(props) {
|
|
|
3980
4020
|
routing_number: achData == null ? void 0 : achData.routingNumber,
|
|
3981
4021
|
bank_name: achData == null ? void 0 : achData.bankName,
|
|
3982
4022
|
account_type: achData == null ? void 0 : achData.accountType,
|
|
3983
|
-
amount: String(
|
|
4023
|
+
amount: String(bankAmount || 0),
|
|
3984
4024
|
isSaveAch: saveACHinfo,
|
|
3985
4025
|
customer_id: props == null ? void 0 : props.customerId,
|
|
3986
4026
|
order_id: props == null ? void 0 : props.orderID,
|
|
@@ -4062,11 +4102,11 @@ function GetPaymentPage(props) {
|
|
|
4062
4102
|
let amount = String(props == null ? void 0 : props.amount);
|
|
4063
4103
|
let card_id = selectedCard == null ? void 0 : selectedCard.id;
|
|
4064
4104
|
let card_type = selectedCard == null ? void 0 : selectedCard.card_type;
|
|
4065
|
-
if (fractalpayPublicKey && order_id && amount &&
|
|
4105
|
+
if (fractalpayPublicKey && order_id && amount && bankAmount) {
|
|
4066
4106
|
if (customer_id) {
|
|
4067
4107
|
if (card_id) {
|
|
4068
4108
|
let chargeobj = __spreadValues({
|
|
4069
|
-
amount: card_type === "Bank" ? `${
|
|
4109
|
+
amount: card_type === "Bank" ? `${bankAmount}` : amount,
|
|
4070
4110
|
order_id,
|
|
4071
4111
|
customer_id,
|
|
4072
4112
|
card_id,
|
|
@@ -4305,22 +4345,21 @@ function GetPaymentPage(props) {
|
|
|
4305
4345
|
/* @__PURE__ */ jsx19("div", { className: "pay-amount-conatiner", children: /* @__PURE__ */ jsx19("small", { className: "pay-payment-amount", children: "Select paymet type" }) }),
|
|
4306
4346
|
/* @__PURE__ */ jsxs11("div", { className: "frac-card-bank-radio-main", children: [
|
|
4307
4347
|
/* @__PURE__ */ jsx19(CardBankRadio, { label: "Card", amount: (_a = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
4308
|
-
(paymentData == null ? void 0 : paymentData.isSkyFiAccount) && /* @__PURE__ */ jsx19(CardBankRadio, { label: "Bank", amount: (_b = Number(
|
|
4348
|
+
(paymentData == null ? void 0 : paymentData.isSkyFiAccount) && /* @__PURE__ */ jsx19(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab }),
|
|
4309
4349
|
(props == null ? void 0 : props.isReader) && (paymentData == null ? void 0 : paymentData.paymentDeviceList) && ((_c = paymentData == null ? void 0 : paymentData.paymentDeviceList) == null ? void 0 : _c.length) > 0 && /* @__PURE__ */ jsx19(CardBankRadio, { label: "Reader", amount: (_d = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _d.toFixed(2), value: "reader", onChange: handletabchange, activetab })
|
|
4310
4350
|
] }),
|
|
4311
|
-
!loading &&
|
|
4312
|
-
/* @__PURE__ */ jsxs11("small", { children: [
|
|
4313
|
-
|
|
4314
|
-
"
|
|
4315
|
-
|
|
4316
|
-
/* @__PURE__ */ jsx19("p", { children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) })
|
|
4317
|
-
] }) : null : cashDiscount && cashDiscount > 0 && (props == null ? void 0 : props.pass_fee) && (activetab === "card" || activetab === "reader") ? /* @__PURE__ */ jsxs11("div", { className: "frac-cash-discount-fee", children: [
|
|
4318
|
-
/* @__PURE__ */ jsxs11("small", { children: [
|
|
4319
|
-
activetab === "card" || activetab === "reader" ? "Surcharge" : null,
|
|
4320
|
-
" "
|
|
4351
|
+
!loading && /* @__PURE__ */ jsxs11("div", { className: "", children: [
|
|
4352
|
+
activetab == "ach" && bankFeeAmount > 0 && /* @__PURE__ */ jsxs11("small", { className: "frac-fee-text", children: [
|
|
4353
|
+
"There is a processing fee of ",
|
|
4354
|
+
/* @__PURE__ */ jsx19("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
|
|
4355
|
+
"."
|
|
4321
4356
|
] }),
|
|
4322
|
-
/* @__PURE__ */
|
|
4323
|
-
|
|
4357
|
+
(activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs11("small", { className: "frac-fee-text", children: [
|
|
4358
|
+
"Cards include a fee amount of ",
|
|
4359
|
+
/* @__PURE__ */ jsx19("span", { className: "frac-fee-amount", children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) }),
|
|
4360
|
+
"."
|
|
4361
|
+
] })
|
|
4362
|
+
] })
|
|
4324
4363
|
] })
|
|
4325
4364
|
] }),
|
|
4326
4365
|
/* @__PURE__ */ jsxs11("div", { className: "pay-conatiner-one-last", children: [
|
|
@@ -4625,7 +4664,7 @@ function GetPaymentPage(props) {
|
|
|
4625
4664
|
/* @__PURE__ */ jsx19(CardList, { listHeading: "Banks", paymentGateway: paymentData == null ? void 0 : paymentData.paymentGateway, ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
|
|
4626
4665
|
setActiveinBank("form");
|
|
4627
4666
|
} }),
|
|
4628
|
-
/* @__PURE__ */ jsx19("div", { className: "form-group", style: { padding: "0" }, children: /* @__PURE__ */ jsx19("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlepayment, children: formatUSD((_n = Number(
|
|
4667
|
+
/* @__PURE__ */ jsx19("div", { className: "form-group", style: { padding: "0" }, children: /* @__PURE__ */ jsx19("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlepayment, children: formatUSD((_n = Number(bankAmount)) == null ? void 0 : _n.toFixed(2)) }) })
|
|
4629
4668
|
] }) : /* @__PURE__ */ jsxs11("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
|
|
4630
4669
|
if (e.key === "Enter" && loading2) {
|
|
4631
4670
|
e.preventDefault();
|
|
@@ -4772,7 +4811,7 @@ function GetPaymentPage(props) {
|
|
|
4772
4811
|
errorBankConsentOther && /* @__PURE__ */ jsx19("span", { className: "error-span", children: errorBankConsentOther })
|
|
4773
4812
|
] })
|
|
4774
4813
|
] }),
|
|
4775
|
-
/* @__PURE__ */ jsx19("div", { className: "form-group ", children: /* @__PURE__ */ jsx19("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: formatUSD((_v = Number(
|
|
4814
|
+
/* @__PURE__ */ jsx19("div", { className: "form-group ", children: /* @__PURE__ */ jsx19("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: formatUSD((_v = Number(bankAmount)) == null ? void 0 : _v.toFixed(2)) }) })
|
|
4776
4815
|
] })
|
|
4777
4816
|
] }),
|
|
4778
4817
|
/* @__PURE__ */ jsxs11("div", { id: "reader", style: { display: activetab === "reader" ? "block" : "none" }, className: "tabcontent", children: [
|
|
@@ -7482,7 +7521,7 @@ import { IoArrowBack as IoArrowBack3 } from "react-icons/io5";
|
|
|
7482
7521
|
import { NumericFormat } from "react-number-format";
|
|
7483
7522
|
import { Fragment as Fragment17, jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
7484
7523
|
function PartialPayment(props) {
|
|
7485
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z
|
|
7524
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
7486
7525
|
const buttonRef = useRef8(null);
|
|
7487
7526
|
useEffect13(() => {
|
|
7488
7527
|
if (props.onTriggerPay) {
|
|
@@ -8281,10 +8320,7 @@ function PartialPayment(props) {
|
|
|
8281
8320
|
] }),
|
|
8282
8321
|
/* @__PURE__ */ jsxs17("div", { className: "amt-pay-con", children: [
|
|
8283
8322
|
/* @__PURE__ */ jsx28("div", { className: "pay-amount-conatiner", children: /* @__PURE__ */ jsx28("small", { className: "pay-payment-amount", children: "Select payment type" }) }),
|
|
8284
|
-
/* @__PURE__ */
|
|
8285
|
-
/* @__PURE__ */ jsx28(CardBankRadio, { label: "Card", amount: (_a = Number(aftertaxAmount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
8286
|
-
(paymentData == null ? void 0 : paymentData.isSkyFiAccount) && /* @__PURE__ */ jsx28(CardBankRadio, { label: "Bank", amount: (_b = Number(cashDiscount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab })
|
|
8287
|
-
] }),
|
|
8323
|
+
/* @__PURE__ */ jsx28("div", { className: "frac-card-bank-radio-main", children: /* @__PURE__ */ jsx28(CardBankRadio, { label: "Card", amount: (_a = Number(aftertaxAmount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }) }),
|
|
8288
8324
|
numberToBoolean(paymentData == null ? void 0 : paymentData.showSurcharge) ? cashDiscount && cashDiscount > 0 && (props == null ? void 0 : props.pass_fee) ? /* @__PURE__ */ jsxs17("div", { className: "frac-cash-discount-fee", children: [
|
|
8289
8325
|
/* @__PURE__ */ jsxs17("small", { children: [
|
|
8290
8326
|
activetab === "card" ? "Cash Discount" : "Cash Discount Savings",
|
|
@@ -8353,7 +8389,7 @@ function PartialPayment(props) {
|
|
|
8353
8389
|
/* @__PURE__ */ jsx28("small", { className: "pay-payment-amount", children: "Payment Amount" }),
|
|
8354
8390
|
/* @__PURE__ */ jsxs17("strong", { className: "pay-amount", children: [
|
|
8355
8391
|
"$",
|
|
8356
|
-
(
|
|
8392
|
+
(_b = Number(aftertaxAmount)) == null ? void 0 : _b.toFixed(2)
|
|
8357
8393
|
] })
|
|
8358
8394
|
] }),
|
|
8359
8395
|
activetab != "ach" && /* @__PURE__ */ jsxs17("div", { children: [
|
|
@@ -8395,7 +8431,7 @@ function PartialPayment(props) {
|
|
|
8395
8431
|
/* @__PURE__ */ jsx28("small", { className: "pay-payment-amount", children: "Payment Amount" }),
|
|
8396
8432
|
/* @__PURE__ */ jsxs17("strong", { className: "pay-amount", children: [
|
|
8397
8433
|
"$",
|
|
8398
|
-
(
|
|
8434
|
+
(_c = Number(aftertaxAmount)) == null ? void 0 : _c.toFixed(2)
|
|
8399
8435
|
] })
|
|
8400
8436
|
] }),
|
|
8401
8437
|
/* @__PURE__ */ jsxs17("div", { children: [
|
|
@@ -8430,7 +8466,7 @@ function PartialPayment(props) {
|
|
|
8430
8466
|
/* @__PURE__ */ jsx28(CardList, { listHeading: "Cards", paymentGateway: paymentData == null ? void 0 : paymentData.paymentGateway, ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
|
|
8431
8467
|
setActiveinCard("form");
|
|
8432
8468
|
} }),
|
|
8433
|
-
/* @__PURE__ */ jsx28("div", { className: "form-group", style: { padding: "0" }, children: /* @__PURE__ */ jsx28("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlepayment, children: partialAmount && !partialError ? formatUSD((
|
|
8469
|
+
/* @__PURE__ */ jsx28("div", { className: "form-group", style: { padding: "0" }, children: /* @__PURE__ */ jsx28("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlepayment, children: partialAmount && !partialError ? formatUSD((_d = Number(partialAmount)) == null ? void 0 : _d.toFixed(2)) : formatUSD((_e = Number(aftertaxAmount)) == null ? void 0 : _e.toFixed(2)) }) })
|
|
8434
8470
|
] }) : (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 ? /* @__PURE__ */ jsxs17(
|
|
8435
8471
|
"form",
|
|
8436
8472
|
{
|
|
@@ -8474,14 +8510,14 @@ function PartialPayment(props) {
|
|
|
8474
8510
|
maxLength: 100,
|
|
8475
8511
|
placeholder: "Order Id",
|
|
8476
8512
|
disabled: true,
|
|
8477
|
-
value: (
|
|
8513
|
+
value: (_f = props == null ? void 0 : props.orderID) != null ? _f : "",
|
|
8478
8514
|
style: { background: "#F6F6F7", color: "#727272" }
|
|
8479
8515
|
}
|
|
8480
8516
|
)
|
|
8481
8517
|
] }),
|
|
8482
8518
|
/* @__PURE__ */ jsxs17("div", { className: "form-group", children: [
|
|
8483
8519
|
/* @__PURE__ */ jsx28("label", { htmlFor: "zip", children: "ZIP" }),
|
|
8484
|
-
/* @__PURE__ */ jsx28("input", { type: "text", className: "form-control", maxLength: 100, placeholder: "000000", value: (
|
|
8520
|
+
/* @__PURE__ */ jsx28("input", { type: "text", className: "form-control", maxLength: 100, placeholder: "000000", value: (_g = cardData == null ? void 0 : cardData.zipCode) != null ? _g : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
|
|
8485
8521
|
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx28("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
|
|
8486
8522
|
] }),
|
|
8487
8523
|
(props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsx28("div", { className: "form-group", children: /* @__PURE__ */ jsxs17("div", { style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
@@ -8508,8 +8544,8 @@ function PartialPayment(props) {
|
|
|
8508
8544
|
] }) })
|
|
8509
8545
|
] }),
|
|
8510
8546
|
/* @__PURE__ */ jsxs17("div", { className: "form-group", style: { marginTop: "20px", padding: "0" }, children: [
|
|
8511
|
-
(paymentData == null ? void 0 : paymentData.paymentDeviceList) && ((
|
|
8512
|
-
/* @__PURE__ */ jsx28("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount && !partialError ? formatUSD((
|
|
8547
|
+
(paymentData == null ? void 0 : paymentData.paymentDeviceList) && ((_h = paymentData == null ? void 0 : paymentData.paymentDeviceList) == null ? void 0 : _h.length) > 0 && /* @__PURE__ */ jsx28("button", { type: "button", style: { marginBottom: "10px" }, className: "pay-button", onClick: () => setActiveForm(!activeForm), children: activeForm ? "Pay With Reader" : "Pay With Card" }),
|
|
8548
|
+
/* @__PURE__ */ jsx28("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount && !partialError ? formatUSD((_i = Number(partialAmount)) == null ? void 0 : _i.toFixed(2)) : formatUSD((_j = Number(aftertaxAmount)) == null ? void 0 : _j.toFixed(2)) })
|
|
8513
8549
|
] })
|
|
8514
8550
|
]
|
|
8515
8551
|
}
|
|
@@ -8548,14 +8584,14 @@ function PartialPayment(props) {
|
|
|
8548
8584
|
maxLength: 100,
|
|
8549
8585
|
placeholder: "Order Id",
|
|
8550
8586
|
disabled: true,
|
|
8551
|
-
value: (
|
|
8587
|
+
value: (_k = props == null ? void 0 : props.orderID) != null ? _k : "",
|
|
8552
8588
|
style: { background: "#F6F6F7", color: "#727272" }
|
|
8553
8589
|
}
|
|
8554
8590
|
)
|
|
8555
8591
|
] }),
|
|
8556
8592
|
/* @__PURE__ */ jsxs17("div", { className: "form-group", children: [
|
|
8557
8593
|
/* @__PURE__ */ jsx28("label", { htmlFor: "zip", children: "ZIP" }),
|
|
8558
|
-
/* @__PURE__ */ jsx28("input", { type: "text", className: "form-control", maxLength: 100, placeholder: "000000", value: (
|
|
8594
|
+
/* @__PURE__ */ jsx28("input", { type: "text", className: "form-control", maxLength: 100, placeholder: "000000", value: (_l = cardData == null ? void 0 : cardData.zipCode) != null ? _l : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
|
|
8559
8595
|
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx28("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
|
|
8560
8596
|
] }),
|
|
8561
8597
|
(props == null ? void 0 : props.customerId) && /* @__PURE__ */ jsx28("div", { className: "form-group", children: /* @__PURE__ */ jsxs17("div", { style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
@@ -8582,8 +8618,8 @@ function PartialPayment(props) {
|
|
|
8582
8618
|
] }) })
|
|
8583
8619
|
] }),
|
|
8584
8620
|
/* @__PURE__ */ jsxs17("div", { className: "form-group", style: { marginTop: "20px", padding: "0" }, children: [
|
|
8585
|
-
(paymentData == null ? void 0 : paymentData.paymentDeviceList) && ((
|
|
8586
|
-
/* @__PURE__ */ jsx28("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount && !partialError ? formatUSD((
|
|
8621
|
+
(paymentData == null ? void 0 : paymentData.paymentDeviceList) && ((_m = paymentData == null ? void 0 : paymentData.paymentDeviceList) == null ? void 0 : _m.length) > 0 && /* @__PURE__ */ jsx28("button", { type: "button", style: { marginBottom: "10px" }, className: "pay-button", onClick: () => setActiveForm(!activeForm), children: activeForm ? "Pay With Reader" : "Pay With Card" }),
|
|
8622
|
+
/* @__PURE__ */ jsx28("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount && !partialError ? formatUSD((_n = Number(partialAmount)) == null ? void 0 : _n.toFixed(2)) : formatUSD((_o = Number(aftertaxAmount)) == null ? void 0 : _o.toFixed(2)) })
|
|
8587
8623
|
] })
|
|
8588
8624
|
] })
|
|
8589
8625
|
] }),
|
|
@@ -8599,7 +8635,7 @@ function PartialPayment(props) {
|
|
|
8599
8635
|
/* @__PURE__ */ jsx28(CardList, { listHeading: "Banks", paymentGateway: paymentData == null ? void 0 : paymentData.paymentGateway, ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
|
|
8600
8636
|
setActiveinBank("form");
|
|
8601
8637
|
} }),
|
|
8602
|
-
/* @__PURE__ */ jsx28("div", { className: "form-group", style: { padding: "0" }, children: /* @__PURE__ */ jsx28("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlepayment, children: partialAmount && !partialError ? formatUSD((
|
|
8638
|
+
/* @__PURE__ */ jsx28("div", { className: "form-group", style: { padding: "0" }, children: /* @__PURE__ */ jsx28("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlepayment, children: partialAmount && !partialError ? formatUSD((_p = Number(partialAmount)) == null ? void 0 : _p.toFixed(2)) : formatUSD((_q = Number(cashDiscount)) == null ? void 0 : _q.toFixed(2)) }) })
|
|
8603
8639
|
] }) : /* @__PURE__ */ jsxs17("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
|
|
8604
8640
|
if (e.key === "Enter" && loading2) {
|
|
8605
8641
|
e.preventDefault();
|
|
@@ -8612,7 +8648,7 @@ function PartialPayment(props) {
|
|
|
8612
8648
|
}, children: [
|
|
8613
8649
|
/* @__PURE__ */ jsxs17("div", { className: "form-group mb-4", children: [
|
|
8614
8650
|
/* @__PURE__ */ jsx28("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
8615
|
-
/* @__PURE__ */ jsx28("input", { type: "text", id: "nameonaccount", className: "form-control", maxLength: 100, placeholder: "John Doe", name: "name", value: (
|
|
8651
|
+
/* @__PURE__ */ jsx28("input", { type: "text", id: "nameonaccount", className: "form-control", maxLength: 100, placeholder: "John Doe", name: "name", value: (_r = achData == null ? void 0 : achData.name) != null ? _r : "", onChange: handleChangeAch }),
|
|
8616
8652
|
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx28("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
8617
8653
|
] }),
|
|
8618
8654
|
/* @__PURE__ */ jsxs17("div", { className: "form-group mb-4", children: [
|
|
@@ -8626,7 +8662,7 @@ function PartialPayment(props) {
|
|
|
8626
8662
|
maxLength: 9,
|
|
8627
8663
|
placeholder: "000000000",
|
|
8628
8664
|
name: "routingNumber",
|
|
8629
|
-
value: (
|
|
8665
|
+
value: (_s = achData == null ? void 0 : achData.routingNumber) != null ? _s : "",
|
|
8630
8666
|
onChange: handleChangeAch
|
|
8631
8667
|
}
|
|
8632
8668
|
),
|
|
@@ -8643,7 +8679,7 @@ function PartialPayment(props) {
|
|
|
8643
8679
|
maxLength: 16,
|
|
8644
8680
|
placeholder: "0000000000",
|
|
8645
8681
|
name: "accountNumber",
|
|
8646
|
-
value: (
|
|
8682
|
+
value: (_t = achData == null ? void 0 : achData.accountNumber) != null ? _t : "",
|
|
8647
8683
|
onChange: handleChangeAch
|
|
8648
8684
|
}
|
|
8649
8685
|
),
|
|
@@ -8660,7 +8696,7 @@ function PartialPayment(props) {
|
|
|
8660
8696
|
maxLength: 16,
|
|
8661
8697
|
placeholder: "0000000000",
|
|
8662
8698
|
name: "confirmAccountNumber",
|
|
8663
|
-
value: (
|
|
8699
|
+
value: (_u = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _u : "",
|
|
8664
8700
|
onChange: handleChangeAch
|
|
8665
8701
|
}
|
|
8666
8702
|
),
|
|
@@ -8677,7 +8713,7 @@ function PartialPayment(props) {
|
|
|
8677
8713
|
maxLength: 100,
|
|
8678
8714
|
placeholder: "My Bank",
|
|
8679
8715
|
name: "bankName",
|
|
8680
|
-
value: (
|
|
8716
|
+
value: (_v = achData == null ? void 0 : achData.bankName) != null ? _v : "",
|
|
8681
8717
|
onChange: handleChangeAch
|
|
8682
8718
|
}
|
|
8683
8719
|
),
|
|
@@ -8694,7 +8730,7 @@ function PartialPayment(props) {
|
|
|
8694
8730
|
maxLength: 100,
|
|
8695
8731
|
placeholder: "My Company",
|
|
8696
8732
|
name: "companyName",
|
|
8697
|
-
value: (
|
|
8733
|
+
value: (_w = achData == null ? void 0 : achData.companyName) != null ? _w : "",
|
|
8698
8734
|
onChange: handleChangeAch
|
|
8699
8735
|
}
|
|
8700
8736
|
),
|
|
@@ -8702,7 +8738,7 @@ function PartialPayment(props) {
|
|
|
8702
8738
|
] }),
|
|
8703
8739
|
/* @__PURE__ */ jsxs17("div", { className: "form-group mb-4", children: [
|
|
8704
8740
|
/* @__PURE__ */ jsx28("label", { htmlFor: "accounttype", children: "Select account type" }),
|
|
8705
|
-
/* @__PURE__ */ jsxs17("select", { name: "accountType", id: "accounttype", className: "form-control", value: (
|
|
8741
|
+
/* @__PURE__ */ jsxs17("select", { name: "accountType", id: "accounttype", className: "form-control", value: (_x = achData == null ? void 0 : achData.accountType) != null ? _x : "", onChange: handleChangeAch, children: [
|
|
8706
8742
|
/* @__PURE__ */ jsx28("option", { value: "", children: "Select account" }),
|
|
8707
8743
|
accountTypes.map((type) => /* @__PURE__ */ jsx28("option", { value: type.value, children: type.label }, type.value))
|
|
8708
8744
|
] })
|
|
@@ -8749,7 +8785,7 @@ function PartialPayment(props) {
|
|
|
8749
8785
|
errorBankConsentOther && /* @__PURE__ */ jsx28("span", { className: "error-span", children: errorBankConsentOther })
|
|
8750
8786
|
] })
|
|
8751
8787
|
] }),
|
|
8752
|
-
/* @__PURE__ */ jsx28("div", { className: "form-group ", children: /* @__PURE__ */ jsx28("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: partialAmount && !partialError ? formatUSD((
|
|
8788
|
+
/* @__PURE__ */ jsx28("div", { className: "form-group ", children: /* @__PURE__ */ jsx28("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: partialAmount && !partialError ? formatUSD((_y = Number(partialAmount)) == null ? void 0 : _y.toFixed(2)) : formatUSD((_z = Number(cashDiscount)) == null ? void 0 : _z.toFixed(2)) }) })
|
|
8753
8789
|
] })
|
|
8754
8790
|
] })
|
|
8755
8791
|
] }) }) })
|
|
@@ -8764,7 +8800,7 @@ function PartialPayment(props) {
|
|
|
8764
8800
|
}
|
|
8765
8801
|
|
|
8766
8802
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
8767
|
-
import { useEffect as
|
|
8803
|
+
import { useEffect as useEffect18, useState as useState12, useMemo } from "react";
|
|
8768
8804
|
|
|
8769
8805
|
// src/app/components/Skysystemz/SkyChargewidgetstyles.tsx
|
|
8770
8806
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -9610,7 +9646,7 @@ padding:0px !important;
|
|
|
9610
9646
|
}
|
|
9611
9647
|
|
|
9612
9648
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9613
|
-
import { useCallback, useEffect as
|
|
9649
|
+
import { useCallback, useEffect as useEffect17, useRef as useRef11, useState as useState11 } from "react";
|
|
9614
9650
|
import axios9 from "axios";
|
|
9615
9651
|
import Swal5 from "sweetalert2";
|
|
9616
9652
|
|
|
@@ -10089,155 +10125,17 @@ function GooglePayComponent({
|
|
|
10089
10125
|
] });
|
|
10090
10126
|
}
|
|
10091
10127
|
|
|
10092
|
-
// src/app/components/Atoms/Applepay/ApplePayButton.tsx
|
|
10093
|
-
import { useEffect as useEffect17, useRef as useRef11 } from "react";
|
|
10094
|
-
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
10095
|
-
function ApplePayButton({
|
|
10096
|
-
applePayMerchantId: applePayMerchantId2,
|
|
10097
|
-
applePayAmount,
|
|
10098
|
-
applePayMerchantName,
|
|
10099
|
-
showLoader,
|
|
10100
|
-
completeFractalFlow
|
|
10101
|
-
}) {
|
|
10102
|
-
const applePayRef = useRef11(null);
|
|
10103
|
-
const paymentRequestMethods = [
|
|
10104
|
-
{
|
|
10105
|
-
supportedMethods: "https://apple.com/apple-pay",
|
|
10106
|
-
data: {
|
|
10107
|
-
version: 3,
|
|
10108
|
-
merchantIdentifier: applePayMerchantId2,
|
|
10109
|
-
// ✅ FIXED
|
|
10110
|
-
merchantCapabilities: ["supports3DS"],
|
|
10111
|
-
supportedNetworks: ["amex", "discover", "mastercard", "visa"],
|
|
10112
|
-
// ✅ FIXED
|
|
10113
|
-
countryCode: "US"
|
|
10114
|
-
}
|
|
10115
|
-
}
|
|
10116
|
-
];
|
|
10117
|
-
const paymentRequestOptions = {
|
|
10118
|
-
requestPayerName: false,
|
|
10119
|
-
requestPayerEmail: false,
|
|
10120
|
-
requestPayerPhone: false,
|
|
10121
|
-
requestShipping: false
|
|
10122
|
-
};
|
|
10123
|
-
function buildPaymentDetails() {
|
|
10124
|
-
return {
|
|
10125
|
-
total: {
|
|
10126
|
-
label: applePayMerchantName,
|
|
10127
|
-
amount: {
|
|
10128
|
-
currency: "USD",
|
|
10129
|
-
value: applePayAmount
|
|
10130
|
-
}
|
|
10131
|
-
}
|
|
10132
|
-
};
|
|
10133
|
-
}
|
|
10134
|
-
async function validateMerchant(event) {
|
|
10135
|
-
var _a;
|
|
10136
|
-
console.log("\u{1F7E1} STEP 1: Merchant validation started");
|
|
10137
|
-
try {
|
|
10138
|
-
console.log("Validation URL:", event.validationURL);
|
|
10139
|
-
console.log("Domain:", window.location.hostname);
|
|
10140
|
-
const res = await fetch(
|
|
10141
|
-
`${masterBaseUrl}api/v1/widget/generate-apple-pay-session`,
|
|
10142
|
-
{
|
|
10143
|
-
method: "POST",
|
|
10144
|
-
headers: {
|
|
10145
|
-
"Content-Type": "application/json"
|
|
10146
|
-
},
|
|
10147
|
-
body: JSON.stringify({
|
|
10148
|
-
validationUrl: event.validationURL,
|
|
10149
|
-
applePayMerchantId: applePayMerchantId2,
|
|
10150
|
-
applepayDisplayName: applePayMerchantName,
|
|
10151
|
-
requestDomain: window.location.hostname
|
|
10152
|
-
// ✅ IMPORTANT
|
|
10153
|
-
})
|
|
10154
|
-
}
|
|
10155
|
-
);
|
|
10156
|
-
console.log("\u{1F7E1} STEP 2: Response status:", res.status);
|
|
10157
|
-
const data = await res.json();
|
|
10158
|
-
console.log("RAW session response:", JSON.stringify(data));
|
|
10159
|
-
console.log("\u{1F7E2} STEP 3: Session response: data fetched");
|
|
10160
|
-
const merchantSession = (_a = data == null ? void 0 : data.data) != null ? _a : data;
|
|
10161
|
-
if (!merchantSession || typeof merchantSession !== "object") {
|
|
10162
|
-
console.error("\u274C Bad session shape");
|
|
10163
|
-
event.complete(null);
|
|
10164
|
-
return;
|
|
10165
|
-
}
|
|
10166
|
-
console.log("\u{1F7E2} STEP 4.1: Completing merchant validation");
|
|
10167
|
-
event.complete(merchantSession);
|
|
10168
|
-
console.log("\u{1F7E2} STEP 4.2: Completed merchant validation");
|
|
10169
|
-
} catch (err) {
|
|
10170
|
-
console.log("\u274C Merchant validation failed:", err == null ? void 0 : err.message);
|
|
10171
|
-
event.complete(null);
|
|
10172
|
-
}
|
|
10173
|
-
}
|
|
10174
|
-
async function authorizePayment(paymentResponse) {
|
|
10175
|
-
console.log("\u{1F7E1} STEP 5: Authorizing payment");
|
|
10176
|
-
try {
|
|
10177
|
-
const token = paymentResponse.details.token.paymentData;
|
|
10178
|
-
console.log("\u{1F7E2} STEP 6: Got token");
|
|
10179
|
-
await completeFractalFlow(token, null, "apple_pay");
|
|
10180
|
-
await paymentResponse.complete("success");
|
|
10181
|
-
console.log("\u2705 Payment completed successfully");
|
|
10182
|
-
} catch (err) {
|
|
10183
|
-
console.log("\u274C Authorization failed:", err == null ? void 0 : err.message);
|
|
10184
|
-
await paymentResponse.complete("fail");
|
|
10185
|
-
}
|
|
10186
|
-
}
|
|
10187
|
-
async function handleApplePayClick() {
|
|
10188
|
-
console.log("\u{1F7E1} STEP A: Click detected");
|
|
10189
|
-
try {
|
|
10190
|
-
const request = new PaymentRequest(
|
|
10191
|
-
paymentRequestMethods,
|
|
10192
|
-
buildPaymentDetails(),
|
|
10193
|
-
paymentRequestOptions
|
|
10194
|
-
);
|
|
10195
|
-
request.onmerchantvalidation = validateMerchant;
|
|
10196
|
-
console.log("\u{1F7E1} STEP B: Calling show()");
|
|
10197
|
-
const response = await request.show();
|
|
10198
|
-
console.log("\u{1F7E2} STEP C: Payment sheet opened");
|
|
10199
|
-
await authorizePayment(response);
|
|
10200
|
-
} catch (err) {
|
|
10201
|
-
console.log("\u274C Apple Pay flow failed:", err == null ? void 0 : err.message);
|
|
10202
|
-
}
|
|
10203
|
-
}
|
|
10204
|
-
useEffect17(() => {
|
|
10205
|
-
if (window.ApplePaySession && window.ApplePaySession.canMakePayments()) {
|
|
10206
|
-
console.log("\u2705 Apple Pay is available");
|
|
10207
|
-
} else {
|
|
10208
|
-
console.log("\u274C Apple Pay NOT available");
|
|
10209
|
-
}
|
|
10210
|
-
}, []);
|
|
10211
|
-
useEffect17(() => {
|
|
10212
|
-
const btn = applePayRef.current;
|
|
10213
|
-
if (!btn) return;
|
|
10214
|
-
const handleClick = () => handleApplePayClick();
|
|
10215
|
-
btn.addEventListener("click", handleClick);
|
|
10216
|
-
return () => btn.removeEventListener("click", handleClick);
|
|
10217
|
-
}, [applePayMerchantId2, applePayAmount, applePayMerchantName]);
|
|
10218
|
-
return /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
|
|
10219
|
-
"apple-pay-button",
|
|
10220
|
-
{
|
|
10221
|
-
ref: applePayRef,
|
|
10222
|
-
buttonstyle: "black",
|
|
10223
|
-
type: "pay",
|
|
10224
|
-
locale: "en-US",
|
|
10225
|
-
style: { width: "100%" }
|
|
10226
|
-
}
|
|
10227
|
-
) });
|
|
10228
|
-
}
|
|
10229
|
-
|
|
10230
10128
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
10231
|
-
import { Fragment as Fragment20, jsx as
|
|
10129
|
+
import { Fragment as Fragment20, jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
10232
10130
|
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, customCSS: customCSS2 }) => {
|
|
10233
10131
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
10234
|
-
const hasRunRef =
|
|
10235
|
-
const cardFormRef =
|
|
10236
|
-
const bankFormRef =
|
|
10237
|
-
const expiryYearRef =
|
|
10238
|
-
const expiryMonthRef =
|
|
10239
|
-
const cardListRunRef =
|
|
10240
|
-
const threeDSContainerRef =
|
|
10132
|
+
const hasRunRef = useRef11(false);
|
|
10133
|
+
const cardFormRef = useRef11(null);
|
|
10134
|
+
const bankFormRef = useRef11(null);
|
|
10135
|
+
const expiryYearRef = useRef11(null);
|
|
10136
|
+
const expiryMonthRef = useRef11(null);
|
|
10137
|
+
const cardListRunRef = useRef11(false);
|
|
10138
|
+
const threeDSContainerRef = useRef11(null);
|
|
10241
10139
|
const [activetab, setActive] = useState11("card");
|
|
10242
10140
|
const [activeList, setActiveList] = useState11("card");
|
|
10243
10141
|
const [cardData, setCardData] = useState11();
|
|
@@ -10304,7 +10202,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10304
10202
|
const bankFeeAmount = Number(bankSurcharge || 0);
|
|
10305
10203
|
const bankSavingsAmount = Math.max(bankFeeAmount > 0 ? cardFeeAmount - bankFeeAmount : cardFeeAmount, 0);
|
|
10306
10204
|
const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
|
|
10307
|
-
const tokenizerRef =
|
|
10205
|
+
const tokenizerRef = useRef11(null);
|
|
10308
10206
|
const fractalStyles = {
|
|
10309
10207
|
input: {
|
|
10310
10208
|
"font-family": "'Inter', sans-serif",
|
|
@@ -11166,13 +11064,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11166
11064
|
setOrderLoader(false);
|
|
11167
11065
|
}
|
|
11168
11066
|
};
|
|
11169
|
-
|
|
11067
|
+
useEffect17(() => {
|
|
11170
11068
|
if (!show && !autoTrigger) {
|
|
11171
11069
|
hasRunRef.current = false;
|
|
11172
11070
|
cardListRunRef.current = false;
|
|
11173
11071
|
}
|
|
11174
11072
|
}, [show, autoTrigger]);
|
|
11175
|
-
|
|
11073
|
+
useEffect17(() => {
|
|
11176
11074
|
if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
|
|
11177
11075
|
getPaymentDetails();
|
|
11178
11076
|
if (isPartial && !partialRef) {
|
|
@@ -11180,7 +11078,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11180
11078
|
}
|
|
11181
11079
|
}
|
|
11182
11080
|
}, [show, autoTrigger, isPartial, onLoad]);
|
|
11183
|
-
|
|
11081
|
+
useEffect17(() => {
|
|
11184
11082
|
if ((show || autoTrigger) && pass_fee_amount) {
|
|
11185
11083
|
let cashdisc = Number(amount) - Number(pass_fee_amount);
|
|
11186
11084
|
if (cashdisc && !isNaN(cashdisc)) {
|
|
@@ -11242,7 +11140,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11242
11140
|
console.error("3DS Auth failed \u274C", status);
|
|
11243
11141
|
setError(`3DS Authentication ${status}`);
|
|
11244
11142
|
};
|
|
11245
|
-
|
|
11143
|
+
useEffect17(() => {
|
|
11246
11144
|
if (setHandleCloseRef) {
|
|
11247
11145
|
setHandleCloseRef(() => handleClose);
|
|
11248
11146
|
}
|
|
@@ -11260,18 +11158,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11260
11158
|
setPartialError("");
|
|
11261
11159
|
}
|
|
11262
11160
|
};
|
|
11263
|
-
|
|
11161
|
+
useEffect17(() => {
|
|
11264
11162
|
if (typeof FractalTokenizer === "undefined") return;
|
|
11265
11163
|
const tokenizer = new FractalTokenizer({
|
|
11266
11164
|
styles: {}
|
|
11267
11165
|
});
|
|
11268
11166
|
}, []);
|
|
11269
|
-
const stateRef =
|
|
11167
|
+
const stateRef = useRef11({
|
|
11270
11168
|
activeinBank,
|
|
11271
11169
|
activeinCard,
|
|
11272
11170
|
activetab
|
|
11273
11171
|
});
|
|
11274
|
-
|
|
11172
|
+
useEffect17(() => {
|
|
11275
11173
|
stateRef.current = {
|
|
11276
11174
|
activeinBank,
|
|
11277
11175
|
activeinCard,
|
|
@@ -11295,7 +11193,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11295
11193
|
}
|
|
11296
11194
|
}
|
|
11297
11195
|
}, []);
|
|
11298
|
-
|
|
11196
|
+
useEffect17(() => {
|
|
11299
11197
|
onSubmit == null ? void 0 : onSubmit(submit);
|
|
11300
11198
|
}, [onSubmit, submit]);
|
|
11301
11199
|
function detectCardType(cardinput) {
|
|
@@ -11321,34 +11219,34 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11321
11219
|
const cardType = detectCardType(cardInput);
|
|
11322
11220
|
switch (cardType) {
|
|
11323
11221
|
case "visa":
|
|
11324
|
-
return /* @__PURE__ */
|
|
11222
|
+
return /* @__PURE__ */ jsx35("img", { src: visa2, alt: "visa", width: 33 });
|
|
11325
11223
|
case "mastercard":
|
|
11326
|
-
return /* @__PURE__ */
|
|
11224
|
+
return /* @__PURE__ */ jsx35("img", { src: mastercard2, width: 33, alt: "mastercard" });
|
|
11327
11225
|
case "amex":
|
|
11328
|
-
return /* @__PURE__ */
|
|
11226
|
+
return /* @__PURE__ */ jsx35("img", { src: americanexp2, alt: "amex", width: 33 });
|
|
11329
11227
|
case "discover":
|
|
11330
|
-
return /* @__PURE__ */
|
|
11228
|
+
return /* @__PURE__ */ jsx35("img", { src: discover2, width: 33, alt: "discover" });
|
|
11331
11229
|
case "diners":
|
|
11332
|
-
return /* @__PURE__ */
|
|
11230
|
+
return /* @__PURE__ */ jsx35("img", { src: dinersicon, alt: "Diners Club" });
|
|
11333
11231
|
case "jcb":
|
|
11334
|
-
return /* @__PURE__ */
|
|
11232
|
+
return /* @__PURE__ */ jsx35("img", { src: jcbicon, alt: "JCB" });
|
|
11335
11233
|
case "unionpay":
|
|
11336
|
-
return /* @__PURE__ */
|
|
11234
|
+
return /* @__PURE__ */ jsx35("img", { src: unionicon, alt: "UnionPay" });
|
|
11337
11235
|
default:
|
|
11338
|
-
return /* @__PURE__ */
|
|
11236
|
+
return /* @__PURE__ */ jsx35("img", { src: defualtcardborder, alt: "card" });
|
|
11339
11237
|
}
|
|
11340
11238
|
}
|
|
11341
11239
|
return /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11342
|
-
(initialLoader || !onLoad) && /* @__PURE__ */
|
|
11343
|
-
error && /* @__PURE__ */
|
|
11344
|
-
errorIframe && /* @__PURE__ */
|
|
11240
|
+
(initialLoader || !onLoad) && /* @__PURE__ */ jsx35(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
|
|
11241
|
+
error && /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
|
|
11242
|
+
errorIframe && /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
|
|
11345
11243
|
setErrorIframe("");
|
|
11346
11244
|
}, autoTrigger: onSubmit ? !onSubmit : autoTrigger }) }),
|
|
11347
11245
|
/* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11348
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */
|
|
11246
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx35(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
|
|
11349
11247
|
/* @__PURE__ */ jsxs21("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
|
|
11350
|
-
/* @__PURE__ */
|
|
11351
|
-
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */
|
|
11248
|
+
/* @__PURE__ */ jsx35("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
|
|
11249
|
+
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx35(
|
|
11352
11250
|
ThreeDSChallenge,
|
|
11353
11251
|
{
|
|
11354
11252
|
containerRef: threeDSContainerRef,
|
|
@@ -11359,32 +11257,32 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11359
11257
|
onError: handleError
|
|
11360
11258
|
}
|
|
11361
11259
|
) : /* @__PURE__ */ jsxs21("div", { className: "parent-pay-container", children: [
|
|
11362
|
-
/* @__PURE__ */
|
|
11363
|
-
/* @__PURE__ */
|
|
11364
|
-
/* @__PURE__ */
|
|
11260
|
+
/* @__PURE__ */ jsx35("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs21("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
11261
|
+
/* @__PURE__ */ jsx35("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx35("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" }) }),
|
|
11262
|
+
/* @__PURE__ */ jsx35("defs", { children: /* @__PURE__ */ jsx35("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx35("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
11365
11263
|
] }) }),
|
|
11366
|
-
/* @__PURE__ */
|
|
11264
|
+
/* @__PURE__ */ jsx35("div", { className: "pay-main-logo-res" }),
|
|
11367
11265
|
/* @__PURE__ */ jsxs21("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
|
|
11368
11266
|
!onSubmit && /* @__PURE__ */ jsxs21("div", { className: "pay-header pay-conatiner-one", children: [
|
|
11369
11267
|
/* @__PURE__ */ jsxs21("div", { className: "pay-conatiner-one-first", children: [
|
|
11370
11268
|
/* @__PURE__ */ jsxs21("div", { className: "pay-logo-container", children: [
|
|
11371
|
-
/* @__PURE__ */
|
|
11372
|
-
/* @__PURE__ */
|
|
11269
|
+
/* @__PURE__ */ jsx35("div", { className: "pay-main-logo" }),
|
|
11270
|
+
/* @__PURE__ */ jsx35("h1", { className: "pay-heading", children: "Pay" }),
|
|
11373
11271
|
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs21("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
|
|
11374
11272
|
" ",
|
|
11375
|
-
/* @__PURE__ */
|
|
11273
|
+
/* @__PURE__ */ jsx35(IoArrowBack4, {}),
|
|
11376
11274
|
" Back"
|
|
11377
11275
|
] })
|
|
11378
11276
|
] }),
|
|
11379
|
-
/* @__PURE__ */
|
|
11380
|
-
/* @__PURE__ */
|
|
11277
|
+
/* @__PURE__ */ jsx35("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs21("div", { className: "pay-amount-conatiner", children: [
|
|
11278
|
+
/* @__PURE__ */ jsx35("small", { className: "pay-payment-amount", children: "Select payment type" }),
|
|
11381
11279
|
/* @__PURE__ */ jsxs21("div", { className: "frac-card-bank-radio-main", children: [
|
|
11382
|
-
/* @__PURE__ */
|
|
11383
|
-
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */
|
|
11280
|
+
/* @__PURE__ */ jsx35(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
11281
|
+
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx35(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
|
|
11384
11282
|
] }),
|
|
11385
11283
|
isPartial && /* @__PURE__ */ jsxs21("div", { className: "frac-partial-payment-input", children: [
|
|
11386
|
-
/* @__PURE__ */
|
|
11387
|
-
/* @__PURE__ */
|
|
11284
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11285
|
+
/* @__PURE__ */ jsx35(
|
|
11388
11286
|
NumericFormat2,
|
|
11389
11287
|
{
|
|
11390
11288
|
prefix: "$",
|
|
@@ -11408,25 +11306,25 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11408
11306
|
}
|
|
11409
11307
|
}
|
|
11410
11308
|
),
|
|
11411
|
-
partialError && /* @__PURE__ */
|
|
11309
|
+
partialError && /* @__PURE__ */ jsx35("span", { className: "error-span", children: partialError })
|
|
11412
11310
|
] })
|
|
11413
11311
|
] }) })
|
|
11414
11312
|
] }),
|
|
11415
11313
|
/* @__PURE__ */ jsxs21("div", { className: "pay-conatiner-one-last", children: [
|
|
11416
|
-
/* @__PURE__ */
|
|
11417
|
-
/* @__PURE__ */
|
|
11314
|
+
/* @__PURE__ */ jsx35("img", { src: secure2, alt: "" }),
|
|
11315
|
+
/* @__PURE__ */ jsx35("img", { src: pov2, alt: "" }),
|
|
11418
11316
|
"Secure payments powered by Fractal"
|
|
11419
11317
|
] })
|
|
11420
11318
|
] }),
|
|
11421
|
-
/* @__PURE__ */
|
|
11422
|
-
onSubmit && /* @__PURE__ */
|
|
11319
|
+
/* @__PURE__ */ jsx35("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx35("div", { className: "col-md-12", children: /* @__PURE__ */ jsxs21("div", { id: "payment-form-div ", className: onSubmit ? "frac-payment-form-div" : "", children: [
|
|
11320
|
+
onSubmit && /* @__PURE__ */ jsx35("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs21("div", { className: "pay-amount-conatiner", children: [
|
|
11423
11321
|
/* @__PURE__ */ jsxs21("div", { className: "frac-card-bank-radio-main", children: [
|
|
11424
|
-
/* @__PURE__ */
|
|
11425
|
-
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */
|
|
11322
|
+
/* @__PURE__ */ jsx35(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
11323
|
+
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx35(CardBankRadio, { skydesign: true, label: "Bank", amount: (_d = Number(bankAmount)) == null ? void 0 : _d.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
|
|
11426
11324
|
] }),
|
|
11427
11325
|
isPartial && /* @__PURE__ */ jsxs21("div", { className: "frac-partial-payment-input", children: [
|
|
11428
|
-
/* @__PURE__ */
|
|
11429
|
-
/* @__PURE__ */
|
|
11326
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11327
|
+
/* @__PURE__ */ jsx35(
|
|
11430
11328
|
NumericFormat2,
|
|
11431
11329
|
{
|
|
11432
11330
|
prefix: "$",
|
|
@@ -11443,44 +11341,34 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11443
11341
|
fixedDecimalScale: true
|
|
11444
11342
|
}
|
|
11445
11343
|
),
|
|
11446
|
-
partialError && /* @__PURE__ */
|
|
11344
|
+
partialError && /* @__PURE__ */ jsx35("span", { className: "error-span", children: partialError })
|
|
11447
11345
|
] })
|
|
11448
11346
|
] }) }),
|
|
11449
|
-
is3DSEnable ? clientSecret && /* @__PURE__ */
|
|
11347
|
+
is3DSEnable ? clientSecret && /* @__PURE__ */ jsx35(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11450
11348
|
/* @__PURE__ */ jsxs21("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
|
|
11451
11349
|
!onSubmit && /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11452
11350
|
/* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
|
|
11453
|
-
/* @__PURE__ */
|
|
11351
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs21("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
|
|
11454
11352
|
" ",
|
|
11455
|
-
/* @__PURE__ */
|
|
11353
|
+
/* @__PURE__ */ jsx35(IoArrowBack4, {})
|
|
11456
11354
|
] }) }),
|
|
11457
|
-
/* @__PURE__ */
|
|
11355
|
+
/* @__PURE__ */ jsx35("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
11458
11356
|
] }),
|
|
11459
11357
|
/* @__PURE__ */ jsxs21("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
|
|
11460
|
-
/* @__PURE__ */
|
|
11461
|
-
/* @__PURE__ */
|
|
11462
|
-
/* @__PURE__ */
|
|
11463
|
-
/* @__PURE__ */
|
|
11358
|
+
/* @__PURE__ */ jsx35("img", { src: visa2, alt: "", width: 33 }),
|
|
11359
|
+
/* @__PURE__ */ jsx35("img", { src: mastercard2, width: 33, alt: "" }),
|
|
11360
|
+
/* @__PURE__ */ jsx35("img", { src: americanexp2, alt: "", width: 33 }),
|
|
11361
|
+
/* @__PURE__ */ jsx35("img", { src: discover2, width: 33, alt: "" })
|
|
11464
11362
|
] })
|
|
11465
11363
|
] }),
|
|
11466
11364
|
activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11467
|
-
/* @__PURE__ */
|
|
11365
|
+
/* @__PURE__ */ jsx35(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
|
|
11468
11366
|
setActiveinCard("form");
|
|
11469
11367
|
} }),
|
|
11470
|
-
/* @__PURE__ */
|
|
11368
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx35("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: partialAmount ? formatUSD((_e = Number(partialAmount)) == null ? void 0 : _e.toFixed(2)) : formatUSD((_f = Number(amount)) == null ? void 0 : _f.toFixed(2)) }) })
|
|
11471
11369
|
] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11472
11370
|
onSubmit && /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11473
|
-
/* @__PURE__ */
|
|
11474
|
-
ApplePayButton,
|
|
11475
|
-
{
|
|
11476
|
-
applePayAmount: partialAmount ? partialAmount : amount,
|
|
11477
|
-
applePayMerchantId,
|
|
11478
|
-
applePayMerchantName: merchantName,
|
|
11479
|
-
completeFractalFlow,
|
|
11480
|
-
showLoader
|
|
11481
|
-
}
|
|
11482
|
-
),
|
|
11483
|
-
/* @__PURE__ */ jsx36(
|
|
11371
|
+
/* @__PURE__ */ jsx35(
|
|
11484
11372
|
GooglePayComponent,
|
|
11485
11373
|
{
|
|
11486
11374
|
amount: partialAmount ? partialAmount : amount,
|
|
@@ -11492,7 +11380,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11492
11380
|
setLoading
|
|
11493
11381
|
}
|
|
11494
11382
|
),
|
|
11495
|
-
/* @__PURE__ */
|
|
11383
|
+
/* @__PURE__ */ jsx35("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx35("span", { children: "or" }) })
|
|
11496
11384
|
] }),
|
|
11497
11385
|
/* @__PURE__ */ jsxs21("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11498
11386
|
if (e.key === "Enter" && loading) {
|
|
@@ -11502,18 +11390,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11502
11390
|
}, children: [
|
|
11503
11391
|
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11504
11392
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11505
|
-
/* @__PURE__ */
|
|
11506
|
-
/* @__PURE__ */
|
|
11393
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11394
|
+
/* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11507
11395
|
const value = e.target.value;
|
|
11508
11396
|
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11509
11397
|
handleCardChange("cardName", value);
|
|
11510
11398
|
}
|
|
11511
11399
|
} }),
|
|
11512
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */
|
|
11400
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11513
11401
|
] }),
|
|
11514
11402
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11515
|
-
/* @__PURE__ */
|
|
11516
|
-
/* @__PURE__ */
|
|
11403
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
|
|
11404
|
+
/* @__PURE__ */ jsx35("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx35(
|
|
11517
11405
|
FractalFields_default,
|
|
11518
11406
|
{
|
|
11519
11407
|
fractalStyles,
|
|
@@ -11523,17 +11411,17 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11523
11411
|
) })
|
|
11524
11412
|
] }),
|
|
11525
11413
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11526
|
-
/* @__PURE__ */
|
|
11527
|
-
/* @__PURE__ */
|
|
11528
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */
|
|
11414
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11415
|
+
/* @__PURE__ */ jsx35("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) }),
|
|
11416
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11529
11417
|
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11530
|
-
"
|
|
11531
|
-
/* @__PURE__ */
|
|
11418
|
+
"Cards include a fee amount of ",
|
|
11419
|
+
/* @__PURE__ */ jsx35("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11532
11420
|
"."
|
|
11533
11421
|
] })
|
|
11534
11422
|
] }),
|
|
11535
|
-
customerId && /* @__PURE__ */
|
|
11536
|
-
/* @__PURE__ */
|
|
11423
|
+
customerId && /* @__PURE__ */ jsx35("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
11424
|
+
/* @__PURE__ */ jsx35(
|
|
11537
11425
|
"input",
|
|
11538
11426
|
{
|
|
11539
11427
|
type: "checkbox",
|
|
@@ -11543,10 +11431,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11543
11431
|
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11544
11432
|
}
|
|
11545
11433
|
),
|
|
11546
|
-
/* @__PURE__ */
|
|
11547
|
-
/* @__PURE__ */
|
|
11434
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11435
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11548
11436
|
/* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
|
|
11549
|
-
/* @__PURE__ */
|
|
11437
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
|
|
11550
11438
|
"svg",
|
|
11551
11439
|
{
|
|
11552
11440
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11555,8 +11443,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11555
11443
|
viewBox: "0 0 20 20",
|
|
11556
11444
|
fill: "none",
|
|
11557
11445
|
children: [
|
|
11558
|
-
/* @__PURE__ */
|
|
11559
|
-
/* @__PURE__ */
|
|
11446
|
+
/* @__PURE__ */ jsx35("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11447
|
+
/* @__PURE__ */ jsx35(
|
|
11560
11448
|
"path",
|
|
11561
11449
|
{
|
|
11562
11450
|
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",
|
|
@@ -11566,15 +11454,15 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11566
11454
|
]
|
|
11567
11455
|
}
|
|
11568
11456
|
) }),
|
|
11569
|
-
/* @__PURE__ */
|
|
11457
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11570
11458
|
"If checked, I agree to give the ",
|
|
11571
|
-
/* @__PURE__ */
|
|
11459
|
+
/* @__PURE__ */ jsx35("b", { children: merchantName || "merchant" }),
|
|
11572
11460
|
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11573
11461
|
] }) })
|
|
11574
11462
|
] })
|
|
11575
11463
|
] }) })
|
|
11576
11464
|
] }),
|
|
11577
|
-
/* @__PURE__ */
|
|
11465
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx35("button", { type: "submit", style: { margin: 0, display: onSubmit ? "none" : "block" }, className: "pay-button", children: partialAmount ? formatUSD((_h = Number(partialAmount)) == null ? void 0 : _h.toFixed(2)) : formatUSD((_i = Number(amount)) == null ? void 0 : _i.toFixed(2)) }) })
|
|
11578
11466
|
] })
|
|
11579
11467
|
] }) : /* @__PURE__ */ jsxs21("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11580
11468
|
if (e.key === "Enter" && loading) {
|
|
@@ -11584,16 +11472,16 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11584
11472
|
}, children: [
|
|
11585
11473
|
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11586
11474
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11587
|
-
/* @__PURE__ */
|
|
11588
|
-
/* @__PURE__ */
|
|
11475
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11476
|
+
/* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11589
11477
|
const value = e.target.value;
|
|
11590
11478
|
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11591
11479
|
handleCardChange("cardName", value);
|
|
11592
11480
|
}
|
|
11593
11481
|
} }),
|
|
11594
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */
|
|
11482
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11595
11483
|
] }),
|
|
11596
|
-
/* @__PURE__ */
|
|
11484
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx35(
|
|
11597
11485
|
DataCapFields,
|
|
11598
11486
|
{
|
|
11599
11487
|
isOpen: show || autoTrigger,
|
|
@@ -11604,17 +11492,17 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11604
11492
|
}
|
|
11605
11493
|
) }),
|
|
11606
11494
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11607
|
-
/* @__PURE__ */
|
|
11608
|
-
/* @__PURE__ */
|
|
11609
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */
|
|
11495
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11496
|
+
/* @__PURE__ */ jsx35("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_j = cardData == null ? void 0 : cardData.zipCode) != null ? _j : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
|
|
11497
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11610
11498
|
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11611
|
-
"
|
|
11612
|
-
/* @__PURE__ */
|
|
11499
|
+
"Cards include a fee amount of ",
|
|
11500
|
+
/* @__PURE__ */ jsx35("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11613
11501
|
"."
|
|
11614
11502
|
] })
|
|
11615
11503
|
] }),
|
|
11616
|
-
customerId && /* @__PURE__ */
|
|
11617
|
-
/* @__PURE__ */
|
|
11504
|
+
customerId && /* @__PURE__ */ jsx35("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
11505
|
+
/* @__PURE__ */ jsx35(
|
|
11618
11506
|
"input",
|
|
11619
11507
|
{
|
|
11620
11508
|
type: "checkbox",
|
|
@@ -11624,10 +11512,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11624
11512
|
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11625
11513
|
}
|
|
11626
11514
|
),
|
|
11627
|
-
/* @__PURE__ */
|
|
11628
|
-
/* @__PURE__ */
|
|
11515
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11516
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11629
11517
|
/* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
|
|
11630
|
-
/* @__PURE__ */
|
|
11518
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
|
|
11631
11519
|
"svg",
|
|
11632
11520
|
{
|
|
11633
11521
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11636,8 +11524,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11636
11524
|
viewBox: "0 0 20 20",
|
|
11637
11525
|
fill: "none",
|
|
11638
11526
|
children: [
|
|
11639
|
-
/* @__PURE__ */
|
|
11640
|
-
/* @__PURE__ */
|
|
11527
|
+
/* @__PURE__ */ jsx35("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11528
|
+
/* @__PURE__ */ jsx35(
|
|
11641
11529
|
"path",
|
|
11642
11530
|
{
|
|
11643
11531
|
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",
|
|
@@ -11647,30 +11535,30 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11647
11535
|
]
|
|
11648
11536
|
}
|
|
11649
11537
|
) }),
|
|
11650
|
-
/* @__PURE__ */
|
|
11538
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11651
11539
|
"If checked, I agree to give the ",
|
|
11652
|
-
/* @__PURE__ */
|
|
11540
|
+
/* @__PURE__ */ jsx35("b", { children: merchantName || "merchant" }),
|
|
11653
11541
|
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11654
11542
|
] }) })
|
|
11655
11543
|
] })
|
|
11656
11544
|
] }) })
|
|
11657
11545
|
] }),
|
|
11658
|
-
/* @__PURE__ */
|
|
11546
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx35("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)) }) })
|
|
11659
11547
|
] })
|
|
11660
11548
|
] }),
|
|
11661
|
-
/* @__PURE__ */
|
|
11549
|
+
/* @__PURE__ */ jsx35("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11662
11550
|
!onSubmit && /* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
|
|
11663
|
-
/* @__PURE__ */
|
|
11551
|
+
/* @__PURE__ */ jsx35("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs21("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
|
|
11664
11552
|
" ",
|
|
11665
|
-
/* @__PURE__ */
|
|
11553
|
+
/* @__PURE__ */ jsx35(IoArrowBack4, {})
|
|
11666
11554
|
] }) }),
|
|
11667
|
-
/* @__PURE__ */
|
|
11555
|
+
/* @__PURE__ */ jsx35("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
|
|
11668
11556
|
] }),
|
|
11669
11557
|
activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11670
|
-
/* @__PURE__ */
|
|
11558
|
+
/* @__PURE__ */ jsx35(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
|
|
11671
11559
|
setActiveinBank("form");
|
|
11672
11560
|
} }),
|
|
11673
|
-
/* @__PURE__ */
|
|
11561
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx35("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_m = Number(bankAmount)) == null ? void 0 : _m.toFixed(2)) }) })
|
|
11674
11562
|
] }) : /* @__PURE__ */ jsxs21("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
|
|
11675
11563
|
if (e.key === "Enter" && loading) {
|
|
11676
11564
|
e.preventDefault();
|
|
@@ -11682,13 +11570,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11682
11570
|
maxHeight: "444px"
|
|
11683
11571
|
}, children: [
|
|
11684
11572
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11685
|
-
/* @__PURE__ */
|
|
11686
|
-
/* @__PURE__ */
|
|
11687
|
-
(achError == null ? void 0 : achError.name) && /* @__PURE__ */
|
|
11573
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
11574
|
+
/* @__PURE__ */ jsx35("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 }),
|
|
11575
|
+
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
11688
11576
|
] }),
|
|
11689
11577
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11690
|
-
/* @__PURE__ */
|
|
11691
|
-
/* @__PURE__ */
|
|
11578
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "routingnumber", children: "Routing number" }),
|
|
11579
|
+
/* @__PURE__ */ jsx35(
|
|
11692
11580
|
"input",
|
|
11693
11581
|
{
|
|
11694
11582
|
type: "text",
|
|
@@ -11701,11 +11589,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11701
11589
|
onChange: handleChangeAch
|
|
11702
11590
|
}
|
|
11703
11591
|
),
|
|
11704
|
-
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */
|
|
11592
|
+
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
|
|
11705
11593
|
] }),
|
|
11706
11594
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11707
|
-
/* @__PURE__ */
|
|
11708
|
-
/* @__PURE__ */
|
|
11595
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "accountnumber", children: "Account number" }),
|
|
11596
|
+
/* @__PURE__ */ jsx35(
|
|
11709
11597
|
"input",
|
|
11710
11598
|
{
|
|
11711
11599
|
type: "text",
|
|
@@ -11718,11 +11606,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11718
11606
|
onChange: handleChangeAch
|
|
11719
11607
|
}
|
|
11720
11608
|
),
|
|
11721
|
-
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */
|
|
11609
|
+
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
|
|
11722
11610
|
] }),
|
|
11723
11611
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11724
|
-
/* @__PURE__ */
|
|
11725
|
-
/* @__PURE__ */
|
|
11612
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
|
|
11613
|
+
/* @__PURE__ */ jsx35(
|
|
11726
11614
|
"input",
|
|
11727
11615
|
{
|
|
11728
11616
|
type: "text",
|
|
@@ -11735,11 +11623,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11735
11623
|
onChange: handleChangeAch
|
|
11736
11624
|
}
|
|
11737
11625
|
),
|
|
11738
|
-
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */
|
|
11626
|
+
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
|
|
11739
11627
|
] }),
|
|
11740
11628
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11741
|
-
/* @__PURE__ */
|
|
11742
|
-
/* @__PURE__ */
|
|
11629
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "bankname", children: "Bank name" }),
|
|
11630
|
+
/* @__PURE__ */ jsx35(
|
|
11743
11631
|
"input",
|
|
11744
11632
|
{
|
|
11745
11633
|
type: "text",
|
|
@@ -11752,11 +11640,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11752
11640
|
onChange: handleChangeAch
|
|
11753
11641
|
}
|
|
11754
11642
|
),
|
|
11755
|
-
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */
|
|
11643
|
+
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
|
|
11756
11644
|
] }),
|
|
11757
11645
|
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11758
|
-
/* @__PURE__ */
|
|
11759
|
-
/* @__PURE__ */
|
|
11646
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "companyName", children: "Company name" }),
|
|
11647
|
+
/* @__PURE__ */ jsx35(
|
|
11760
11648
|
"input",
|
|
11761
11649
|
{
|
|
11762
11650
|
type: "text",
|
|
@@ -11769,44 +11657,44 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11769
11657
|
onChange: handleChangeAch
|
|
11770
11658
|
}
|
|
11771
11659
|
),
|
|
11772
|
-
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */
|
|
11660
|
+
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx35("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
|
|
11773
11661
|
] }),
|
|
11774
11662
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11775
|
-
/* @__PURE__ */
|
|
11663
|
+
/* @__PURE__ */ jsx35("label", { htmlFor: "accounttype", children: "Select account type" }),
|
|
11776
11664
|
/* @__PURE__ */ jsxs21("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
|
|
11777
|
-
/* @__PURE__ */
|
|
11778
|
-
accountTypes.map((type) => /* @__PURE__ */
|
|
11665
|
+
/* @__PURE__ */ jsx35("option", { value: "", children: "Select account" }),
|
|
11666
|
+
accountTypes.map((type) => /* @__PURE__ */ jsx35("option", { value: type.value, children: type.label }, type.value))
|
|
11779
11667
|
] }),
|
|
11780
11668
|
bankFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11781
11669
|
"There is a processing fee of ",
|
|
11782
|
-
/* @__PURE__ */
|
|
11670
|
+
/* @__PURE__ */ jsx35("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
|
|
11783
11671
|
"."
|
|
11784
11672
|
] }),
|
|
11785
11673
|
!saveACHinfo && /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11786
11674
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11787
|
-
/* @__PURE__ */
|
|
11675
|
+
/* @__PURE__ */ jsx35("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
|
|
11788
11676
|
setIsBankConsentChecked(e.target.checked);
|
|
11789
11677
|
if (e.target.checked) {
|
|
11790
11678
|
setErrorBankConsent("");
|
|
11791
11679
|
}
|
|
11792
11680
|
} }),
|
|
11793
|
-
/* @__PURE__ */
|
|
11681
|
+
/* @__PURE__ */ jsx35("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.` })
|
|
11794
11682
|
] }),
|
|
11795
|
-
errorBankConsent && /* @__PURE__ */
|
|
11683
|
+
errorBankConsent && /* @__PURE__ */ jsx35("span", { className: "error-span", children: errorBankConsent })
|
|
11796
11684
|
] }),
|
|
11797
11685
|
customerId && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11798
|
-
/* @__PURE__ */
|
|
11686
|
+
/* @__PURE__ */ jsx35("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
|
|
11799
11687
|
setSaveACHinfo(e.target.checked);
|
|
11800
11688
|
if (!e.target.checked) {
|
|
11801
11689
|
setSaveACHConsent1(false);
|
|
11802
11690
|
setErrorBankConsentOther("");
|
|
11803
11691
|
}
|
|
11804
11692
|
} }),
|
|
11805
|
-
/* @__PURE__ */
|
|
11693
|
+
/* @__PURE__ */ jsx35("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save for future use" })
|
|
11806
11694
|
] }),
|
|
11807
11695
|
saveACHinfo && /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11808
11696
|
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11809
|
-
/* @__PURE__ */
|
|
11697
|
+
/* @__PURE__ */ jsx35("input", { type: "checkbox", id: "saveACHConsent1", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHConsent1, onChange: (e) => {
|
|
11810
11698
|
setSaveACHConsent1(e.target.checked);
|
|
11811
11699
|
if (e.target.checked) {
|
|
11812
11700
|
setErrorBankConsentOther("");
|
|
@@ -11818,11 +11706,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11818
11706
|
" to store my bank account details for future ACH payments. I understand that future payments may be initiated using this saved account in accordance with my instructions. I confirm I am authorized to use this bank account."
|
|
11819
11707
|
] })
|
|
11820
11708
|
] }),
|
|
11821
|
-
errorBankConsentOther && /* @__PURE__ */
|
|
11709
|
+
errorBankConsentOther && /* @__PURE__ */ jsx35("span", { className: "error-span", children: errorBankConsentOther })
|
|
11822
11710
|
] })
|
|
11823
11711
|
] })
|
|
11824
11712
|
] }),
|
|
11825
|
-
/* @__PURE__ */
|
|
11713
|
+
/* @__PURE__ */ jsx35("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx35("button", { className: "pay-button", style: { margin: "20px 0 0", display: onSubmit ? "none" : "block" }, type: "submit", children: formatUSD((_u = Number(bankAmount)) == null ? void 0 : _u.toFixed(2)) }) })
|
|
11826
11714
|
] })
|
|
11827
11715
|
] }) })
|
|
11828
11716
|
] })
|
|
@@ -11837,7 +11725,7 @@ var ModelContentSky_default = ModelContentSky;
|
|
|
11837
11725
|
|
|
11838
11726
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
11839
11727
|
import axios10 from "axios";
|
|
11840
|
-
import { Fragment as Fragment21, jsx as
|
|
11728
|
+
import { Fragment as Fragment21, jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
11841
11729
|
var PaymentWidget = ({
|
|
11842
11730
|
amount,
|
|
11843
11731
|
bankAmount,
|
|
@@ -11917,7 +11805,7 @@ var PaymentWidget = ({
|
|
|
11917
11805
|
]
|
|
11918
11806
|
);
|
|
11919
11807
|
const [commonProps, setCommonProps] = useState12(initialCommonProps);
|
|
11920
|
-
|
|
11808
|
+
useEffect18(() => {
|
|
11921
11809
|
if (show) {
|
|
11922
11810
|
setCommonProps(initialCommonProps);
|
|
11923
11811
|
}
|
|
@@ -11948,35 +11836,35 @@ var PaymentWidget = ({
|
|
|
11948
11836
|
setLoading(false);
|
|
11949
11837
|
}
|
|
11950
11838
|
};
|
|
11951
|
-
|
|
11839
|
+
useEffect18(() => {
|
|
11952
11840
|
if (show && isPartial && partialRef) {
|
|
11953
11841
|
getskyosOrderDetails();
|
|
11954
11842
|
}
|
|
11955
11843
|
}, [show, isPartial, partialRef]);
|
|
11956
11844
|
return /* @__PURE__ */ jsxs22(Fragment21, { children: [
|
|
11957
|
-
/* @__PURE__ */
|
|
11958
|
-
/* @__PURE__ */
|
|
11959
|
-
/* @__PURE__ */
|
|
11960
|
-
/* @__PURE__ */
|
|
11961
|
-
/* @__PURE__ */
|
|
11962
|
-
/* @__PURE__ */
|
|
11963
|
-
/* @__PURE__ */
|
|
11845
|
+
/* @__PURE__ */ jsx36("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
11846
|
+
/* @__PURE__ */ jsx36(DataScript, {}),
|
|
11847
|
+
/* @__PURE__ */ jsx36(FractalTokenizerScript, {}),
|
|
11848
|
+
/* @__PURE__ */ jsx36(SkyChargewidgetstyles, {}),
|
|
11849
|
+
/* @__PURE__ */ jsx36(CardBankRadioStyles, {}),
|
|
11850
|
+
/* @__PURE__ */ jsx36(CustomModal2styles_default, {}),
|
|
11851
|
+
/* @__PURE__ */ jsx36(DataCapScriptLoader, {}),
|
|
11964
11852
|
!autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", disabled: disableSubmitBtn, onClick: () => setShow(true), children: [
|
|
11965
11853
|
submitBtnText,
|
|
11966
11854
|
submitBtnIcon
|
|
11967
11855
|
] }),
|
|
11968
|
-
!autoTrigger ? /* @__PURE__ */
|
|
11856
|
+
!autoTrigger ? /* @__PURE__ */ jsx36(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx36(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx36(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
|
|
11969
11857
|
] });
|
|
11970
11858
|
};
|
|
11971
11859
|
|
|
11972
11860
|
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
11973
|
-
import { useEffect as
|
|
11861
|
+
import { useEffect as useEffect20, useState as useState13, useMemo as useMemo2 } from "react";
|
|
11974
11862
|
import axios11 from "axios";
|
|
11975
11863
|
|
|
11976
11864
|
// src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
|
|
11977
|
-
import { jsx as
|
|
11865
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
11978
11866
|
function EmbeddedCheckoutStyles({ extraCustomCSS }) {
|
|
11979
|
-
return /* @__PURE__ */
|
|
11867
|
+
return /* @__PURE__ */ jsx37("style", { children: `
|
|
11980
11868
|
|
|
11981
11869
|
.pay-amount-conatiner{
|
|
11982
11870
|
margin-top: 20px !important;
|
|
@@ -12196,7 +12084,7 @@ form#ACHPaymentForm .ach-scrl {
|
|
|
12196
12084
|
}
|
|
12197
12085
|
@media screen and (max-width: 375px) {
|
|
12198
12086
|
.frac-payment-form-div .exp-date-year-container {
|
|
12199
|
-
flex-direction: column;
|
|
12087
|
+
// flex-direction: column;
|
|
12200
12088
|
}
|
|
12201
12089
|
.parent-pay-container {
|
|
12202
12090
|
padding: 10px;
|
|
@@ -12297,7 +12185,7 @@ padding:0px !important;
|
|
|
12297
12185
|
padding: 0px 10px;
|
|
12298
12186
|
}
|
|
12299
12187
|
.toggle-num-wrapper-new .input-main-wrap-frac {
|
|
12300
|
-
height:
|
|
12188
|
+
height: 38px;
|
|
12301
12189
|
}
|
|
12302
12190
|
.toggle-num-wrapper-new:focus {
|
|
12303
12191
|
border: 1px solid #004eab !important;
|
|
@@ -12322,10 +12210,10 @@ padding:0px !important;
|
|
|
12322
12210
|
}
|
|
12323
12211
|
|
|
12324
12212
|
// src/app/components/Atoms/Applepay/ApplePayScriptLoader.tsx
|
|
12325
|
-
import { useEffect as
|
|
12213
|
+
import { useEffect as useEffect19 } from "react";
|
|
12326
12214
|
var applePayScriptLoaded = false;
|
|
12327
12215
|
var ApplePayScriptLoader = () => {
|
|
12328
|
-
|
|
12216
|
+
useEffect19(() => {
|
|
12329
12217
|
if (applePayScriptLoaded) return;
|
|
12330
12218
|
const existingScript = document.querySelector(
|
|
12331
12219
|
`script[src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"]`
|
|
@@ -12351,7 +12239,7 @@ var ApplePayScriptLoader = () => {
|
|
|
12351
12239
|
};
|
|
12352
12240
|
|
|
12353
12241
|
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
12354
|
-
import { Fragment as Fragment22, jsx as
|
|
12242
|
+
import { Fragment as Fragment22, jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
12355
12243
|
var EmbeddedCheckout = ({
|
|
12356
12244
|
amount,
|
|
12357
12245
|
bankAmount,
|
|
@@ -12429,7 +12317,7 @@ var EmbeddedCheckout = ({
|
|
|
12429
12317
|
]
|
|
12430
12318
|
);
|
|
12431
12319
|
const [commonProps, setCommonProps] = useState13(initialCommonProps);
|
|
12432
|
-
|
|
12320
|
+
useEffect20(() => {
|
|
12433
12321
|
if (show) {
|
|
12434
12322
|
setCommonProps(initialCommonProps);
|
|
12435
12323
|
}
|
|
@@ -12460,13 +12348,13 @@ var EmbeddedCheckout = ({
|
|
|
12460
12348
|
setLoading(false);
|
|
12461
12349
|
}
|
|
12462
12350
|
};
|
|
12463
|
-
|
|
12351
|
+
useEffect20(() => {
|
|
12464
12352
|
if (show && isPartial && partialRef) {
|
|
12465
12353
|
getskyosOrderDetails();
|
|
12466
12354
|
}
|
|
12467
12355
|
}, [show, isPartial, partialRef]);
|
|
12468
12356
|
console.log(onLoad, "onLoad");
|
|
12469
|
-
|
|
12357
|
+
useEffect20(() => {
|
|
12470
12358
|
const supported = !!window.ApplePaySession;
|
|
12471
12359
|
let canPay = false;
|
|
12472
12360
|
if (supported) {
|
|
@@ -12478,20 +12366,20 @@ var EmbeddedCheckout = ({
|
|
|
12478
12366
|
console.log(`ApplePaySession: ${supported}, canMakePayments: ${canPay}`);
|
|
12479
12367
|
}, []);
|
|
12480
12368
|
return /* @__PURE__ */ jsxs23(Fragment22, { children: [
|
|
12481
|
-
/* @__PURE__ */
|
|
12482
|
-
/* @__PURE__ */
|
|
12483
|
-
/* @__PURE__ */
|
|
12484
|
-
/* @__PURE__ */
|
|
12485
|
-
/* @__PURE__ */
|
|
12486
|
-
/* @__PURE__ */
|
|
12487
|
-
/* @__PURE__ */
|
|
12488
|
-
/* @__PURE__ */
|
|
12489
|
-
/* @__PURE__ */
|
|
12369
|
+
/* @__PURE__ */ jsx38("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
12370
|
+
/* @__PURE__ */ jsx38(DataScript, {}),
|
|
12371
|
+
/* @__PURE__ */ jsx38(FractalTokenizerScript, {}),
|
|
12372
|
+
/* @__PURE__ */ jsx38(SkyChargewidgetstyles, {}),
|
|
12373
|
+
/* @__PURE__ */ jsx38(CardBankRadioStyles, {}),
|
|
12374
|
+
/* @__PURE__ */ jsx38(CustomModal2styles_default, {}),
|
|
12375
|
+
/* @__PURE__ */ jsx38(DataCapScriptLoader, {}),
|
|
12376
|
+
/* @__PURE__ */ jsx38(ApplePayScriptLoader, {}),
|
|
12377
|
+
/* @__PURE__ */ jsx38(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
|
|
12490
12378
|
!autoTrigger && /* @__PURE__ */ jsxs23("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
12491
12379
|
submitBtnText,
|
|
12492
12380
|
submitBtnIcon
|
|
12493
12381
|
] }),
|
|
12494
|
-
!autoTrigger ? /* @__PURE__ */
|
|
12382
|
+
!autoTrigger ? /* @__PURE__ */ jsx38(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx38(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx38(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
|
|
12495
12383
|
] });
|
|
12496
12384
|
};
|
|
12497
12385
|
export {
|