@fractalpay/fractalpay-next-dev 0.0.287 → 0.0.289
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +337 -823
- 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.289",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -212,21 +212,6 @@ var LoaderStyle = (props) => {
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
|
|
216
|
-
.loader-text {
|
|
217
|
-
margin-top: 8px;
|
|
218
|
-
color: #1A1226;
|
|
219
|
-
text-transform: uppercase;
|
|
220
|
-
font-weight: 600;
|
|
221
|
-
font-family: 'IBM Plex Mono', monospace;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.loader-content {
|
|
225
|
-
display: flex;
|
|
226
|
-
flex-direction: column;
|
|
227
|
-
align-items: center;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
215
|
` });
|
|
231
216
|
};
|
|
232
217
|
var LoaderStyle_default = LoaderStyle;
|
|
@@ -234,17 +219,14 @@ var LoaderStyle_default = LoaderStyle;
|
|
|
234
219
|
// src/app/components/Loader/Loader.tsx
|
|
235
220
|
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
236
221
|
var Loader = (_a) => {
|
|
237
|
-
var _b = _a, { intensity = "light"
|
|
222
|
+
var _b = _a, { intensity = "light" } = _b, props = __objRest(_b, ["intensity"]);
|
|
238
223
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
239
224
|
/* @__PURE__ */ jsx2(LoaderStyle_default, {}),
|
|
240
|
-
(props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: `loader-${intensity}`, children: /* @__PURE__ */ jsxs("div", { className: "
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
/* @__PURE__ */ jsx2("div", {})
|
|
246
|
-
] }),
|
|
247
|
-
loaderText && /* @__PURE__ */ jsx2("div", { className: "loader-text", children: loaderText })
|
|
225
|
+
(props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: `loader-${intensity}`, children: /* @__PURE__ */ jsxs("div", { className: "lds-ellipsis", children: [
|
|
226
|
+
/* @__PURE__ */ jsx2("div", {}),
|
|
227
|
+
/* @__PURE__ */ jsx2("div", {}),
|
|
228
|
+
/* @__PURE__ */ jsx2("div", {}),
|
|
229
|
+
/* @__PURE__ */ jsx2("div", {})
|
|
248
230
|
] }) })
|
|
249
231
|
] });
|
|
250
232
|
};
|
|
@@ -254,8 +236,8 @@ var Loader_default = Loader;
|
|
|
254
236
|
var { name } = require_package();
|
|
255
237
|
var S3Url = "https://fractal-userdata-upload.s3.us-east-1.amazonaws.com/";
|
|
256
238
|
if (name === "@fractalpay/fractalpay-next-dev") {
|
|
257
|
-
|
|
258
|
-
|
|
239
|
+
masterBaseUrl = "https://api.dev.fractalpay.com/";
|
|
240
|
+
baseUrl = "https://widget.dev.fractalpay.com/";
|
|
259
241
|
fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
|
|
260
242
|
datacapUrl = "https://token-cert.dcap.com/v1/client";
|
|
261
243
|
threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
|
|
@@ -2491,22 +2473,6 @@ position:relative;
|
|
|
2491
2473
|
color: #c62828 !important;
|
|
2492
2474
|
}
|
|
2493
2475
|
|
|
2494
|
-
.surcharge-program-notice-text{
|
|
2495
|
-
margin: 10px 0 4px;
|
|
2496
|
-
padding: 8px 12px;
|
|
2497
|
-
background: #f6f6f7;
|
|
2498
|
-
border-radius: 8px;
|
|
2499
|
-
font-family: 'Inter', sans-serif;
|
|
2500
|
-
font-size: 12px;
|
|
2501
|
-
color: #727272;
|
|
2502
|
-
line-height: 1.5;
|
|
2503
|
-
}
|
|
2504
|
-
|
|
2505
|
-
.surcharge-program-notice-text-att {
|
|
2506
|
-
font-weight: 700;
|
|
2507
|
-
color: #161616;
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
2476
|
` });
|
|
2511
2477
|
}
|
|
2512
2478
|
|
|
@@ -2711,17 +2677,7 @@ function SuccessMszStyle() {
|
|
|
2711
2677
|
gap: 6px;
|
|
2712
2678
|
background-color: #161616;
|
|
2713
2679
|
color: #fff;
|
|
2714
|
-
}
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
#receipt-debit-note {
|
|
2718
|
-
font-family: 'Inter', sans-serif;
|
|
2719
|
-
font-size: 11px;
|
|
2720
|
-
color: #49B182;
|
|
2721
|
-
margin-top: 2px;
|
|
2722
|
-
}
|
|
2723
|
-
|
|
2724
|
-
` });
|
|
2680
|
+
}` });
|
|
2725
2681
|
}
|
|
2726
2682
|
|
|
2727
2683
|
// src/app/components/SuccessMessage/HandleSubmit.tsx
|
|
@@ -2745,7 +2701,7 @@ function HandleSubmit(event, key, tranId) {
|
|
|
2745
2701
|
|
|
2746
2702
|
// src/app/components/SuccessMessage/SuccessMsz.tsx
|
|
2747
2703
|
import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2748
|
-
function SuccessMsz({ onClose, tranId
|
|
2704
|
+
function SuccessMsz({ onClose, tranId }) {
|
|
2749
2705
|
return /* @__PURE__ */ jsxs5(Fragment5, { children: [
|
|
2750
2706
|
/* @__PURE__ */ jsx10(SuccessMszStyle, {}),
|
|
2751
2707
|
/* @__PURE__ */ jsxs5("div", { className: "payment-msg-container", children: [
|
|
@@ -2772,20 +2728,7 @@ function SuccessMsz({ onClose, tranId, isDebitAdjusted = false }) {
|
|
|
2772
2728
|
/* @__PURE__ */ jsx10("br", {}),
|
|
2773
2729
|
"was successful"
|
|
2774
2730
|
] }),
|
|
2775
|
-
/* @__PURE__ */
|
|
2776
|
-
"We\u2019ve processed your charge",
|
|
2777
|
-
isDebitAdjusted && /* @__PURE__ */ jsxs5(Fragment5, { children: [
|
|
2778
|
-
/* @__PURE__ */ jsx10("br", {}),
|
|
2779
|
-
/* @__PURE__ */ jsx10(
|
|
2780
|
-
"span",
|
|
2781
|
-
{
|
|
2782
|
-
id: "receipt-debit-note",
|
|
2783
|
-
className: "charge-payment-success-subtext",
|
|
2784
|
-
children: "No surcharge \u2014 debit card"
|
|
2785
|
-
}
|
|
2786
|
-
)
|
|
2787
|
-
] })
|
|
2788
|
-
] }),
|
|
2731
|
+
/* @__PURE__ */ jsx10("h6", { className: "charge-payment-success-subtext", children: "We\u2019ve processed your charge" }),
|
|
2789
2732
|
/* @__PURE__ */ jsxs5("div", { className: "charge-success-payment-button-div", children: [
|
|
2790
2733
|
/* @__PURE__ */ jsxs5("button", { className: "charge-success-btn1", onClick: (e) => HandleSubmit(e, "print", tranId), children: [
|
|
2791
2734
|
/* @__PURE__ */ jsxs5(
|
|
@@ -3647,7 +3590,6 @@ function GetPaymentPage(props) {
|
|
|
3647
3590
|
const [errorBankConsent, setErrorBankConsent] = useState4("");
|
|
3648
3591
|
const [saveACHConsent1, setSaveACHConsent1] = useState4(false);
|
|
3649
3592
|
const [errorBankConsentOther, setErrorBankConsentOther] = useState4("");
|
|
3650
|
-
const [loaderText, setLoderText] = useState4("");
|
|
3651
3593
|
const fractalpayClientKey = props.merchantPublicKey;
|
|
3652
3594
|
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
3653
3595
|
let visa2 = S3Url + "widget/visa-img.svg";
|
|
@@ -3672,7 +3614,6 @@ function GetPaymentPage(props) {
|
|
|
3672
3614
|
const [bankFeeAmount, setBankFeeAmount] = useState4(0);
|
|
3673
3615
|
const [paymentData, setPaymentData] = useState4();
|
|
3674
3616
|
let [tranId, setTranId] = useState4("");
|
|
3675
|
-
let [isDebitAdjusted, setIsDebitAdjusted] = useState4(false);
|
|
3676
3617
|
const tokenizerRef = useRef3(null);
|
|
3677
3618
|
const fractalStyles = {
|
|
3678
3619
|
input: {
|
|
@@ -3792,8 +3733,6 @@ function GetPaymentPage(props) {
|
|
|
3792
3733
|
setErrorBankConsent("");
|
|
3793
3734
|
setSaveACHConsent1(false);
|
|
3794
3735
|
setErrorBankConsentOther("");
|
|
3795
|
-
setLoderText("");
|
|
3796
|
-
setIsDebitAdjusted(false);
|
|
3797
3736
|
};
|
|
3798
3737
|
const handleShow = () => setShow(true);
|
|
3799
3738
|
const handletabchange = (id) => {
|
|
@@ -3903,7 +3842,7 @@ function GetPaymentPage(props) {
|
|
|
3903
3842
|
return Object.keys(errors).length > 0;
|
|
3904
3843
|
};
|
|
3905
3844
|
const submitFunc = async (e) => {
|
|
3906
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2
|
|
3845
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
|
|
3907
3846
|
e.preventDefault();
|
|
3908
3847
|
const el = document.activeElement;
|
|
3909
3848
|
if (el instanceof HTMLElement) {
|
|
@@ -3991,20 +3930,15 @@ function GetPaymentPage(props) {
|
|
|
3991
3930
|
setErrorIframe(((_h2 = (_g2 = err == null ? void 0 : err.response) == null ? void 0 : _g2.data) == null ? void 0 : _h2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
3992
3931
|
setLoading2(false);
|
|
3993
3932
|
}
|
|
3994
|
-
const card_issue_type = ((_i2 = tokenizeData == null ? void 0 : tokenizeData.bin_lookup_result) == null ? void 0 : _i2.card_issue_type) || null;
|
|
3995
|
-
if (card_issue_type === "Debit" && (props == null ? void 0 : props.pass_fee) && (paymentData == null ? void 0 : paymentData.surchargeProgram) == 1) {
|
|
3996
|
-
setLoderText("Processing Debit card without fee");
|
|
3997
|
-
}
|
|
3998
3933
|
console.log(tokenizeData, "tokenizeData");
|
|
3999
3934
|
const reqData = JSON.stringify(__spreadProps(__spreadValues({}, tokenizeData), {
|
|
4000
3935
|
isSaveCardChecked: saveCardInfo,
|
|
4001
3936
|
name: cardData == null ? void 0 : cardData.cardName,
|
|
4002
3937
|
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
4003
|
-
customer_id: props == null ? void 0 : props.customerId
|
|
4004
|
-
card_issue_type
|
|
3938
|
+
customer_id: props == null ? void 0 : props.customerId
|
|
4005
3939
|
}));
|
|
4006
3940
|
const reqData2 = JSON.stringify({
|
|
4007
|
-
"pre_sales_id": `${(
|
|
3941
|
+
"pre_sales_id": `${(_j2 = (_i2 = result == null ? void 0 : result.data) == null ? void 0 : _i2.data) == null ? void 0 : _j2.posSalesIdEncode}`,
|
|
4008
3942
|
"token": `${tokenizeData == null ? void 0 : tokenizeData.token}`,
|
|
4009
3943
|
"json_response": `${reqData}`
|
|
4010
3944
|
});
|
|
@@ -4020,13 +3954,11 @@ function GetPaymentPage(props) {
|
|
|
4020
3954
|
};
|
|
4021
3955
|
socketClient_default.emit("sendMessage", requestOptions2);
|
|
4022
3956
|
socketClient_default.on("chargeviafractalgateway", (data) => {
|
|
4023
|
-
var _a3
|
|
3957
|
+
var _a3;
|
|
4024
3958
|
if (isValidJson(data == null ? void 0 : data.data)) {
|
|
4025
3959
|
let paymentRes = JSON.parse(data == null ? void 0 : data.data);
|
|
4026
|
-
console.log(paymentRes, "paymentRes");
|
|
4027
3960
|
if (paymentRes == null ? void 0 : paymentRes.result) {
|
|
4028
3961
|
setTranId((_a3 = paymentRes == null ? void 0 : paymentRes.data) == null ? void 0 : _a3.transactionId);
|
|
4029
|
-
setIsDebitAdjusted((_b3 = paymentRes == null ? void 0 : paymentRes.data) == null ? void 0 : _b3.is_debit_adjusted);
|
|
4030
3962
|
setSuccess(true);
|
|
4031
3963
|
setLoading2(false);
|
|
4032
3964
|
} else {
|
|
@@ -4039,11 +3971,11 @@ function GetPaymentPage(props) {
|
|
|
4039
3971
|
});
|
|
4040
3972
|
} catch (err) {
|
|
4041
3973
|
setLoading2(false);
|
|
4042
|
-
setError(((
|
|
3974
|
+
setError(((_l2 = (_k2 = err == null ? void 0 : err.response) == null ? void 0 : _k2.data) == null ? void 0 : _l2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
4043
3975
|
}
|
|
4044
3976
|
} catch (err) {
|
|
4045
3977
|
setLoading2(false);
|
|
4046
|
-
setError(((
|
|
3978
|
+
setError(((_n2 = (_m2 = err == null ? void 0 : err.response) == null ? void 0 : _m2.data) == null ? void 0 : _n2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
4047
3979
|
}
|
|
4048
3980
|
} else {
|
|
4049
3981
|
try {
|
|
@@ -4061,7 +3993,7 @@ function GetPaymentPage(props) {
|
|
|
4061
3993
|
}
|
|
4062
3994
|
} catch (err) {
|
|
4063
3995
|
setLoading2(false);
|
|
4064
|
-
setError(((
|
|
3996
|
+
setError(((_p2 = (_o2 = err == null ? void 0 : err.response) == null ? void 0 : _o2.data) == null ? void 0 : _p2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
4065
3997
|
}
|
|
4066
3998
|
}
|
|
4067
3999
|
}
|
|
@@ -4154,7 +4086,6 @@ function GetPaymentPage(props) {
|
|
|
4154
4086
|
}
|
|
4155
4087
|
};
|
|
4156
4088
|
const handlechargeCustomer = async (e) => {
|
|
4157
|
-
var _a2, _b2;
|
|
4158
4089
|
e.currentTarget.blur();
|
|
4159
4090
|
if (loading2) return;
|
|
4160
4091
|
let customer_id = props == null ? void 0 : props.customerId;
|
|
@@ -4166,32 +4097,10 @@ function GetPaymentPage(props) {
|
|
|
4166
4097
|
let amount = String(props == null ? void 0 : props.amount);
|
|
4167
4098
|
let card_id = selectedCard == null ? void 0 : selectedCard.id;
|
|
4168
4099
|
let card_type = selectedCard == null ? void 0 : selectedCard.card_type;
|
|
4169
|
-
let card_issue_type = selectedCard == null ? void 0 : selectedCard.card_issue_type;
|
|
4170
4100
|
if (fractalpayPublicKey && order_id && amount && bankAmount) {
|
|
4171
4101
|
if (customer_id) {
|
|
4172
4102
|
if (card_id) {
|
|
4173
|
-
|
|
4174
|
-
if (card_issue_type == "Debit" && (props == null ? void 0 : props.pass_fee) && (paymentData == null ? void 0 : paymentData.surchargeProgram) == 1) {
|
|
4175
|
-
setLoderText("Processing Debit card without fee");
|
|
4176
|
-
}
|
|
4177
|
-
let resultofOrderCreate;
|
|
4178
|
-
if (!(card_type === "Bank")) {
|
|
4179
|
-
const formData = {
|
|
4180
|
-
amount: `${props.amount || 0}`,
|
|
4181
|
-
fractalpayPublicKey: fractalpayClientKey,
|
|
4182
|
-
orderId: props == null ? void 0 : props.orderID,
|
|
4183
|
-
customer_id: props == null ? void 0 : props.customerId,
|
|
4184
|
-
discount: props == null ? void 0 : props.discount,
|
|
4185
|
-
surcharge: props == null ? void 0 : props.surcharge,
|
|
4186
|
-
tax: props == null ? void 0 : props.tax,
|
|
4187
|
-
pass_fee: props == null ? void 0 : props.pass_fee
|
|
4188
|
-
};
|
|
4189
|
-
resultofOrderCreate = await axios3.post(`${baseUrl}create-widget-order`, formData, {
|
|
4190
|
-
headers: __spreadValues({}, (props == null ? void 0 : props.sessionToken) && { "X-Session-Token": props.sessionToken })
|
|
4191
|
-
});
|
|
4192
|
-
console.log(resultofOrderCreate, "vfndsjkfvhg", resultofOrderCreate == null ? void 0 : resultofOrderCreate.data.data.posSalesIdEncode);
|
|
4193
|
-
}
|
|
4194
|
-
let chargeobj = __spreadValues(__spreadValues({
|
|
4103
|
+
let chargeobj = __spreadValues({
|
|
4195
4104
|
amount: card_type === "Bank" ? `${bankAmount}` : amount,
|
|
4196
4105
|
order_id,
|
|
4197
4106
|
customer_id,
|
|
@@ -4203,19 +4112,19 @@ function GetPaymentPage(props) {
|
|
|
4203
4112
|
tax,
|
|
4204
4113
|
pass_fee: props == null ? void 0 : props.pass_fee,
|
|
4205
4114
|
require3ds: false
|
|
4206
|
-
}, (props == null ? void 0 : props.sessionToken) && { sessionToken: props.sessionToken })
|
|
4207
|
-
let
|
|
4115
|
+
}, (props == null ? void 0 : props.sessionToken) && { sessionToken: props.sessionToken });
|
|
4116
|
+
let _a2 = chargeobj, { isCardSave, pass_fee, require3ds } = _a2, rest = __objRest(_a2, ["isCardSave", "pass_fee", "require3ds"]);
|
|
4208
4117
|
let endpoint = card_type === "Bank" ? "charge-ach" : "charge-by-card";
|
|
4209
4118
|
let chargeurl = baseUrl + endpoint;
|
|
4210
4119
|
const headers = {
|
|
4211
4120
|
"Content-Type": "application/json"
|
|
4212
4121
|
};
|
|
4122
|
+
setLoading2(true);
|
|
4213
4123
|
socketClient_default.emit("sendMessage", { url: chargeurl, body: card_type == "Bank" ? rest : chargeobj, isChargebycard: true });
|
|
4214
4124
|
socketClient_default.on("charge-by-card", (response) => {
|
|
4215
|
-
var _a3
|
|
4125
|
+
var _a3;
|
|
4216
4126
|
if ((response == null ? void 0 : response.result) == true || (response == null ? void 0 : response.status) == true) {
|
|
4217
|
-
|
|
4218
|
-
setTranId((_b3 = response.data) == null ? void 0 : _b3.transaction_id);
|
|
4127
|
+
setTranId((_a3 = response.data) == null ? void 0 : _a3.transaction_id);
|
|
4219
4128
|
setSuccess(true);
|
|
4220
4129
|
setLoading2(false);
|
|
4221
4130
|
} else {
|
|
@@ -4407,9 +4316,9 @@ function GetPaymentPage(props) {
|
|
|
4407
4316
|
errorIframe && /* @__PURE__ */ jsx19("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx19(ErrorCardMessage_default, { error: errorIframe, onClose: () => {
|
|
4408
4317
|
setErrorIframe("");
|
|
4409
4318
|
} }) }),
|
|
4410
|
-
success && /* @__PURE__ */ jsx19(SuccessMsz, { onClose: handleClose, tranId
|
|
4319
|
+
success && /* @__PURE__ */ jsx19(SuccessMsz, { onClose: handleClose, tranId }),
|
|
4411
4320
|
!error && !errorIframe && !success && /* @__PURE__ */ jsxs11(Fragment11, { children: [
|
|
4412
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx19(Loader_default, { loading: loading || loading2 || loadingIframe
|
|
4321
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx19(Loader_default, { loading: loading || loading2 || loadingIframe }),
|
|
4413
4322
|
/* @__PURE__ */ jsx19("div", { className: "frac-card-payment-page frac-form", children: /* @__PURE__ */ jsxs11("div", { className: "parent-pay-container", children: [
|
|
4414
4323
|
/* @__PURE__ */ jsx19("span", { className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs11("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
4415
4324
|
/* @__PURE__ */ jsx19("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx19("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" }) }),
|
|
@@ -4428,44 +4337,23 @@ function GetPaymentPage(props) {
|
|
|
4428
4337
|
] })
|
|
4429
4338
|
] }),
|
|
4430
4339
|
/* @__PURE__ */ jsxs11("div", { className: "amt-pay-con", children: [
|
|
4431
|
-
/* @__PURE__ */ jsx19("div", { className: "pay-amount-conatiner", children: /* @__PURE__ */ jsx19("small", { className: "pay-payment-amount", children: "Select
|
|
4340
|
+
/* @__PURE__ */ jsx19("div", { className: "pay-amount-conatiner", children: /* @__PURE__ */ jsx19("small", { className: "pay-payment-amount", children: "Select paymet type" }) }),
|
|
4432
4341
|
/* @__PURE__ */ jsxs11("div", { className: "frac-card-bank-radio-main", children: [
|
|
4433
4342
|
/* @__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 }),
|
|
4434
4343
|
(paymentData == null ? void 0 : paymentData.isSkyFiAccount) && /* @__PURE__ */ jsx19(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab }),
|
|
4435
4344
|
(props == null ? void 0 : props.isReader) && (paymentData == null ? void 0 : paymentData.paymentDeviceList) && ((_c = paymentData == null ? void 0 : paymentData.paymentDeviceList) == null ? void 0 : _c.length) > 0 && /* @__PURE__ */ jsx19(CardBankRadio, { label: "Reader", amount: (_d = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _d.toFixed(2), value: "reader", onChange: handletabchange, activetab })
|
|
4436
4345
|
] }),
|
|
4437
|
-
!loading &&
|
|
4438
|
-
/* @__PURE__ */ jsx19("small", { children: (paymentData == null ? void 0 : paymentData.surchargeProgram) == 1 ? "Surcharge" : (paymentData == null ? void 0 : paymentData.showSurcharge) ? "3% Card Fee" : "Cash Discount" }),
|
|
4439
|
-
/* @__PURE__ */ jsx19("p", { children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) })
|
|
4440
|
-
] }),
|
|
4441
|
-
!loading && activetab === "ach" && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs11("div", { className: "frac-cash-discount-fee", children: [
|
|
4442
|
-
/* @__PURE__ */ jsx19("small", { children: (paymentData == null ? void 0 : paymentData.surchargeProgram) == 1 ? "Savings" : "Cash Discount Savings" }),
|
|
4443
|
-
/* @__PURE__ */ jsx19("p", { children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) })
|
|
4444
|
-
] }),
|
|
4445
|
-
!loading && (props == null ? void 0 : props.pass_fee) && /* @__PURE__ */ jsxs11("div", { className: "", children: [
|
|
4346
|
+
!loading && /* @__PURE__ */ jsxs11("div", { className: "", children: [
|
|
4446
4347
|
activetab == "ach" && bankFeeAmount > 0 && /* @__PURE__ */ jsxs11("small", { className: "frac-fee-text", children: [
|
|
4447
4348
|
"There is a processing fee of ",
|
|
4448
4349
|
/* @__PURE__ */ jsx19("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
|
|
4449
4350
|
"."
|
|
4450
4351
|
] }),
|
|
4451
|
-
(activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs11(
|
|
4452
|
-
"
|
|
4453
|
-
{
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
children: [
|
|
4457
|
-
"A 3% processing surcharge is applied to all credit card transactions. Debit card payments are processed for",
|
|
4458
|
-
" ",
|
|
4459
|
-
/* @__PURE__ */ jsxs11("span", { className: "surcharge-program-notice-text-att", children: [
|
|
4460
|
-
"$",
|
|
4461
|
-
Number(cashDiscount).toLocaleString("en-US", {
|
|
4462
|
-
minimumFractionDigits: 2,
|
|
4463
|
-
maximumFractionDigits: 2
|
|
4464
|
-
})
|
|
4465
|
-
] })
|
|
4466
|
-
]
|
|
4467
|
-
}
|
|
4468
|
-
)
|
|
4352
|
+
(activetab === "card" || activetab === "reader") && (props == null ? void 0 : props.pass_fee) && cashDiscount && cashDiscount > 0 && /* @__PURE__ */ jsxs11("small", { className: "frac-fee-text", children: [
|
|
4353
|
+
"Cards include a fee amount of ",
|
|
4354
|
+
/* @__PURE__ */ jsx19("span", { className: "frac-fee-amount", children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) }),
|
|
4355
|
+
"."
|
|
4356
|
+
] })
|
|
4469
4357
|
] })
|
|
4470
4358
|
] })
|
|
4471
4359
|
] }),
|
|
@@ -5536,7 +5424,7 @@ function PreAuthPayment(_a) {
|
|
|
5536
5424
|
/* @__PURE__ */ jsxs12("div", { className: "pay-conatiner-one-first", children: [
|
|
5537
5425
|
/* @__PURE__ */ jsx20("div", { className: "pay-logo-container", children: /* @__PURE__ */ jsx20("div", { className: "pay-main-logo", children: /* @__PURE__ */ jsx20("img", { src: paymentData == null ? void 0 : paymentData.logo, id: "pay-logos" }) }) }),
|
|
5538
5426
|
/* @__PURE__ */ jsxs12("div", { className: "amt-pay-con", children: [
|
|
5539
|
-
/* @__PURE__ */ jsx20("div", { className: "pay-amount-conatiner", children: /* @__PURE__ */ jsx20("small", { className: "pay-payment-amount", children: "Select
|
|
5427
|
+
/* @__PURE__ */ jsx20("div", { className: "pay-amount-conatiner", children: /* @__PURE__ */ jsx20("small", { className: "pay-payment-amount", children: "Select paymet type" }) }),
|
|
5540
5428
|
/* @__PURE__ */ jsxs12("div", { className: "frac-card-bank-radio-main", children: [
|
|
5541
5429
|
/* @__PURE__ */ jsx20(CardBankRadio, { label: "Card", amount: (_a2 = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _a2.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
5542
5430
|
(props == null ? void 0 : props.isReader) && (paymentData == null ? void 0 : paymentData.paymentDeviceList) && ((_b2 = paymentData == null ? void 0 : paymentData.paymentDeviceList) == null ? void 0 : _b2.length) > 0 && /* @__PURE__ */ jsx20(CardBankRadio, { label: "Reader", amount: (_c = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _c.toFixed(2), value: "reader", onChange: handletabchange, activetab })
|
|
@@ -7678,8 +7566,6 @@ function PartialPayment(props) {
|
|
|
7678
7566
|
const [errorBankConsent, setErrorBankConsent] = useState8("");
|
|
7679
7567
|
const [saveACHConsent1, setSaveACHConsent1] = useState8(false);
|
|
7680
7568
|
const [errorBankConsentOther, setErrorBankConsentOther] = useState8("");
|
|
7681
|
-
const [loaderText, setLoderText] = useState8("");
|
|
7682
|
-
let [isDebitAdjusted, setIsDebitAdjusted] = useState8(false);
|
|
7683
7569
|
const tokenizerRef = useRef8(null);
|
|
7684
7570
|
const fractalStyles = {
|
|
7685
7571
|
input: {
|
|
@@ -7795,7 +7681,6 @@ function PartialPayment(props) {
|
|
|
7795
7681
|
setErrorBankConsent("");
|
|
7796
7682
|
setSaveACHConsent1(false);
|
|
7797
7683
|
setErrorBankConsentOther("");
|
|
7798
|
-
setLoderText("");
|
|
7799
7684
|
};
|
|
7800
7685
|
const handleShow = () => setShow(true);
|
|
7801
7686
|
const handletabchange = (id) => {
|
|
@@ -7906,7 +7791,7 @@ function PartialPayment(props) {
|
|
|
7906
7791
|
return Object.keys(errors).length > 0;
|
|
7907
7792
|
};
|
|
7908
7793
|
const submitFunc = async (e) => {
|
|
7909
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2
|
|
7794
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
|
|
7910
7795
|
e.preventDefault();
|
|
7911
7796
|
const el = document.activeElement;
|
|
7912
7797
|
if (el instanceof HTMLElement) {
|
|
@@ -7981,20 +7866,15 @@ function PartialPayment(props) {
|
|
|
7981
7866
|
public_key_pem: ((_b2 = (_a2 = sesionResult == null ? void 0 : sesionResult.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.publicKeyPem) || ((_d2 = (_c2 = sesionResult == null ? void 0 : sesionResult.data) == null ? void 0 : _c2.data) == null ? void 0 : _d2.public_key_pem),
|
|
7982
7867
|
session_key: (_f2 = (_e2 = sesionResult == null ? void 0 : sesionResult.data) == null ? void 0 : _e2.data) == null ? void 0 : _f2.session_key
|
|
7983
7868
|
});
|
|
7984
|
-
const card_issue_type = ((_g2 = tokenizeData == null ? void 0 : tokenizeData.bin_lookup_result) == null ? void 0 : _g2.card_issue_type) || null;
|
|
7985
|
-
if (card_issue_type === "Debit" && (props == null ? void 0 : props.pass_fee) && (paymentData == null ? void 0 : paymentData.surchargeProgram) == 1) {
|
|
7986
|
-
setLoderText("Processing Debit card without fee");
|
|
7987
|
-
}
|
|
7988
7869
|
const reqData = JSON.stringify(__spreadProps(__spreadValues({}, tokenizeData), {
|
|
7989
7870
|
isSaveCardChecked: saveCardInfo,
|
|
7990
7871
|
name: cardData == null ? void 0 : cardData.cardName,
|
|
7991
7872
|
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
7992
7873
|
customer_id: props == null ? void 0 : props.customerId,
|
|
7993
|
-
partial_amount: partialAmount && !partialError ? partialAmount : aftertaxAmount
|
|
7994
|
-
card_issue_type
|
|
7874
|
+
partial_amount: partialAmount && !partialError ? partialAmount : aftertaxAmount
|
|
7995
7875
|
}));
|
|
7996
7876
|
const reqData2 = JSON.stringify({
|
|
7997
|
-
"pre_sales_id": `${(
|
|
7877
|
+
"pre_sales_id": `${(_g2 = paymentData == null ? void 0 : paymentData.orderDetails) == null ? void 0 : _g2.orderId}`,
|
|
7998
7878
|
"token": `${tokenizeData == null ? void 0 : tokenizeData.token}`,
|
|
7999
7879
|
"json_response": `${reqData}`
|
|
8000
7880
|
});
|
|
@@ -8027,11 +7907,11 @@ function PartialPayment(props) {
|
|
|
8027
7907
|
});
|
|
8028
7908
|
} catch (err) {
|
|
8029
7909
|
setLoading2(false);
|
|
8030
|
-
setError(((
|
|
7910
|
+
setError(((_i2 = (_h2 = err == null ? void 0 : err.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
8031
7911
|
}
|
|
8032
7912
|
} catch (err) {
|
|
8033
7913
|
setLoading2(false);
|
|
8034
|
-
setError(((
|
|
7914
|
+
setError(((_k2 = (_j2 = err == null ? void 0 : err.response) == null ? void 0 : _j2.data) == null ? void 0 : _k2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
8035
7915
|
}
|
|
8036
7916
|
} else {
|
|
8037
7917
|
try {
|
|
@@ -8048,7 +7928,7 @@ function PartialPayment(props) {
|
|
|
8048
7928
|
}
|
|
8049
7929
|
} catch (err) {
|
|
8050
7930
|
setLoading2(false);
|
|
8051
|
-
setError(((
|
|
7931
|
+
setError(((_m2 = (_l2 = err == null ? void 0 : err.response) == null ? void 0 : _l2.data) == null ? void 0 : _m2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
8052
7932
|
}
|
|
8053
7933
|
}
|
|
8054
7934
|
}
|
|
@@ -8153,7 +8033,6 @@ function PartialPayment(props) {
|
|
|
8153
8033
|
let amount = partialAmount && !partialError ? partialAmount : String(aftertaxAmount);
|
|
8154
8034
|
let card_id = selectedCard == null ? void 0 : selectedCard.id;
|
|
8155
8035
|
let card_type = selectedCard == null ? void 0 : selectedCard.card_type;
|
|
8156
|
-
let card_issue_type = selectedCard == null ? void 0 : selectedCard.card_issue_type;
|
|
8157
8036
|
if (partialError) {
|
|
8158
8037
|
return;
|
|
8159
8038
|
}
|
|
@@ -8192,15 +8071,11 @@ function PartialPayment(props) {
|
|
|
8192
8071
|
"Content-Type": "application/json"
|
|
8193
8072
|
};
|
|
8194
8073
|
setLoading2(true);
|
|
8195
|
-
if (card_issue_type == "Debit" && (props == null ? void 0 : props.pass_fee) && (paymentData == null ? void 0 : paymentData.surchargeProgram) == 1) {
|
|
8196
|
-
setLoderText("Processing Debit card without fee");
|
|
8197
|
-
}
|
|
8198
8074
|
socketClient_default.emit("sendMessage", { url: chargeurl, body: card_type == "Bank" ? rest : chargeobj, isChargebycard: true });
|
|
8199
8075
|
socketClient_default.on("charge-by-card", (response) => {
|
|
8200
|
-
var _a3
|
|
8076
|
+
var _a3;
|
|
8201
8077
|
if ((response == null ? void 0 : response.result) == true || (response == null ? void 0 : response.status) == true) {
|
|
8202
|
-
|
|
8203
|
-
setTranId((_b2 = response.data) == null ? void 0 : _b2.transaction_id);
|
|
8078
|
+
setTranId((_a3 = response.data) == null ? void 0 : _a3.transaction_id);
|
|
8204
8079
|
setSuccess(true);
|
|
8205
8080
|
setLoading2(false);
|
|
8206
8081
|
} else {
|
|
@@ -8418,9 +8293,9 @@ function PartialPayment(props) {
|
|
|
8418
8293
|
errorIframe && /* @__PURE__ */ jsx28("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx28(ErrorCardMessage_default, { error: errorIframe, onClose: () => {
|
|
8419
8294
|
setErrorIframe("");
|
|
8420
8295
|
} }) }),
|
|
8421
|
-
success && /* @__PURE__ */ jsx28(SuccessMsz, { onClose: handleClose, tranId
|
|
8296
|
+
success && /* @__PURE__ */ jsx28(SuccessMsz, { onClose: handleClose, tranId }),
|
|
8422
8297
|
!error && !success && !errorIframe && /* @__PURE__ */ jsxs17(Fragment17, { children: [
|
|
8423
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx28(Loader_default, { loading: loading || loading2 || loadingIframe
|
|
8298
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx28(Loader_default, { loading: loading || loading2 || loadingIframe }),
|
|
8424
8299
|
/* @__PURE__ */ jsx28("div", { className: "frac-card-payment-page frac-form", children: /* @__PURE__ */ jsxs17("div", { className: "parent-pay-container", children: [
|
|
8425
8300
|
/* @__PURE__ */ jsx28("span", { className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs17("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
8426
8301
|
/* @__PURE__ */ jsx28("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx28("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" }) }),
|
|
@@ -8441,28 +8316,19 @@ function PartialPayment(props) {
|
|
|
8441
8316
|
/* @__PURE__ */ jsxs17("div", { className: "amt-pay-con", children: [
|
|
8442
8317
|
/* @__PURE__ */ jsx28("div", { className: "pay-amount-conatiner", children: /* @__PURE__ */ jsx28("small", { className: "pay-payment-amount", children: "Select payment type" }) }),
|
|
8443
8318
|
/* @__PURE__ */ jsx28("div", { className: "frac-card-bank-radio-main", children: /* @__PURE__ */ jsx28(CardBankRadio, { label: "Card", amount: (_a = Number(aftertaxAmount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }) }),
|
|
8444
|
-
|
|
8445
|
-
/* @__PURE__ */
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
"
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
"$",
|
|
8458
|
-
Number(cashDiscount).toLocaleString("en-US", {
|
|
8459
|
-
minimumFractionDigits: 2,
|
|
8460
|
-
maximumFractionDigits: 2
|
|
8461
|
-
})
|
|
8462
|
-
] })
|
|
8463
|
-
]
|
|
8464
|
-
}
|
|
8465
|
-
) }),
|
|
8319
|
+
numberToBoolean(paymentData == null ? void 0 : paymentData.showSurcharge) ? cashDiscount && cashDiscount > 0 && (props == null ? void 0 : props.pass_fee) ? /* @__PURE__ */ jsxs17("div", { className: "frac-cash-discount-fee", children: [
|
|
8320
|
+
/* @__PURE__ */ jsxs17("small", { children: [
|
|
8321
|
+
activetab === "card" ? "Cash Discount" : "Cash Discount Savings",
|
|
8322
|
+
" "
|
|
8323
|
+
] }),
|
|
8324
|
+
/* @__PURE__ */ jsx28("p", { children: formatUSD((Number(aftertaxAmount) - cashDiscount).toFixed(2)) })
|
|
8325
|
+
] }) : null : cashDiscount && cashDiscount > 0 && (props == null ? void 0 : props.pass_fee) && activetab === "card" ? /* @__PURE__ */ jsxs17("div", { className: "frac-cash-discount-fee", children: [
|
|
8326
|
+
/* @__PURE__ */ jsxs17("small", { children: [
|
|
8327
|
+
activetab === "card" ? "Surcharge" : null,
|
|
8328
|
+
" "
|
|
8329
|
+
] }),
|
|
8330
|
+
/* @__PURE__ */ jsx28("p", { children: formatUSD((Number(aftertaxAmount) - cashDiscount).toFixed(2)) })
|
|
8331
|
+
] }) : null,
|
|
8466
8332
|
(props == null ? void 0 : props.allowPartial) && /* @__PURE__ */ jsxs17("div", { className: "frac-partial-payment-input", children: [
|
|
8467
8333
|
/* @__PURE__ */ jsx28("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
8468
8334
|
/* @__PURE__ */ jsx28(
|
|
@@ -8929,7 +8795,7 @@ function PartialPayment(props) {
|
|
|
8929
8795
|
}
|
|
8930
8796
|
|
|
8931
8797
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
8932
|
-
import { useEffect as
|
|
8798
|
+
import { useEffect as useEffect16, useState as useState11, useMemo } from "react";
|
|
8933
8799
|
|
|
8934
8800
|
// src/app/components/Skysystemz/SkyChargewidgetstyles.tsx
|
|
8935
8801
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -9775,7 +9641,7 @@ padding:0px !important;
|
|
|
9775
9641
|
}
|
|
9776
9642
|
|
|
9777
9643
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9778
|
-
import { useCallback, useEffect as
|
|
9644
|
+
import { useCallback, useEffect as useEffect15, useRef as useRef10, useState as useState10 } from "react";
|
|
9779
9645
|
import axios9 from "axios";
|
|
9780
9646
|
import Swal5 from "sweetalert2";
|
|
9781
9647
|
|
|
@@ -10061,385 +9927,56 @@ var ErrorCardOverlay = ({ onClose, error, autoTrigger = false }) => {
|
|
|
10061
9927
|
};
|
|
10062
9928
|
var ErrorCardOverlay_default = ErrorCardOverlay;
|
|
10063
9929
|
|
|
10064
|
-
// src/app/components/Atoms/Googlepay/Googlepay.tsx
|
|
10065
|
-
import { useRef as useRef10 } from "react";
|
|
10066
|
-
|
|
10067
|
-
// src/app/components/Atoms/Googlepay/GooglePayScriptLoader.tsx
|
|
10068
|
-
import { useEffect as useEffect15 } from "react";
|
|
10069
|
-
var googlePayScriptLoaded = false;
|
|
10070
|
-
var GooglePayScriptLoader = ({
|
|
10071
|
-
onLoad
|
|
10072
|
-
}) => {
|
|
10073
|
-
useEffect15(() => {
|
|
10074
|
-
if (googlePayScriptLoaded) {
|
|
10075
|
-
onLoad == null ? void 0 : onLoad();
|
|
10076
|
-
return;
|
|
10077
|
-
}
|
|
10078
|
-
const existingScript = document.querySelector(
|
|
10079
|
-
`script[src="https://pay.google.com/gp/p/js/pay.js"]`
|
|
10080
|
-
);
|
|
10081
|
-
if (!existingScript) {
|
|
10082
|
-
const script2 = document.createElement("script");
|
|
10083
|
-
script2.src = "https://pay.google.com/gp/p/js/pay.js";
|
|
10084
|
-
script2.async = true;
|
|
10085
|
-
script2.onload = () => {
|
|
10086
|
-
console.log("\u2705 Google Pay script loaded");
|
|
10087
|
-
googlePayScriptLoaded = true;
|
|
10088
|
-
console.log("google:", window.google);
|
|
10089
|
-
onLoad == null ? void 0 : onLoad();
|
|
10090
|
-
};
|
|
10091
|
-
script2.onerror = (err) => {
|
|
10092
|
-
console.error("\u274C Google Pay script failed", err);
|
|
10093
|
-
};
|
|
10094
|
-
document.head.appendChild(script2);
|
|
10095
|
-
} else {
|
|
10096
|
-
googlePayScriptLoaded = true;
|
|
10097
|
-
onLoad == null ? void 0 : onLoad();
|
|
10098
|
-
}
|
|
10099
|
-
}, []);
|
|
10100
|
-
return null;
|
|
10101
|
-
};
|
|
10102
|
-
|
|
10103
|
-
// src/app/components/Atoms/Googlepay/Googlepay.tsx
|
|
10104
|
-
import { Fragment as Fragment19, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
10105
|
-
function GooglePayComponent({
|
|
10106
|
-
amount,
|
|
10107
|
-
googlePayEnvironment: googlePayEnvironment2,
|
|
10108
|
-
googlePayGatewayMerchantId: googlePayGatewayMerchantId2,
|
|
10109
|
-
googlePayMerchantId: googlePayMerchantId2,
|
|
10110
|
-
googlePayMerchantName,
|
|
10111
|
-
require3ds = false,
|
|
10112
|
-
completeFractalFlow,
|
|
10113
|
-
setLoading
|
|
10114
|
-
}) {
|
|
10115
|
-
const containerRef = useRef10(null);
|
|
10116
|
-
const paymentsClientRef = useRef10(null);
|
|
10117
|
-
const baseRequest = {
|
|
10118
|
-
apiVersion: 2,
|
|
10119
|
-
apiVersionMinor: 0
|
|
10120
|
-
};
|
|
10121
|
-
const allowedCardNetworks = ["AMEX", "DISCOVER", "MASTERCARD", "VISA"];
|
|
10122
|
-
const allowedCardAuthMethods = require3ds ? ["CRYPTOGRAM_3DS"] : ["PAN_ONLY", "CRYPTOGRAM_3DS"];
|
|
10123
|
-
const baseCardPaymentMethod = {
|
|
10124
|
-
type: "CARD",
|
|
10125
|
-
parameters: {
|
|
10126
|
-
allowedAuthMethods: allowedCardAuthMethods,
|
|
10127
|
-
allowedCardNetworks
|
|
10128
|
-
}
|
|
10129
|
-
};
|
|
10130
|
-
const cardPaymentMethod = __spreadProps(__spreadValues({}, baseCardPaymentMethod), {
|
|
10131
|
-
tokenizationSpecification: {
|
|
10132
|
-
type: "PAYMENT_GATEWAY",
|
|
10133
|
-
parameters: {
|
|
10134
|
-
gateway: googlePayGatewayMerchantId2,
|
|
10135
|
-
gatewayMerchantId: googlePayGatewayMerchantId2
|
|
10136
|
-
}
|
|
10137
|
-
}
|
|
10138
|
-
});
|
|
10139
|
-
const handlePaymentAuthorization = async (paymentData) => {
|
|
10140
|
-
var _a, _b;
|
|
10141
|
-
try {
|
|
10142
|
-
const token = (_b = (_a = paymentData == null ? void 0 : paymentData.paymentMethodData) == null ? void 0 : _a.tokenizationData) == null ? void 0 : _b.token;
|
|
10143
|
-
if (!token) throw new Error("Missing token");
|
|
10144
|
-
const parsed = JSON.parse(token);
|
|
10145
|
-
console.log(parsed, "parsed token");
|
|
10146
|
-
setLoading(true);
|
|
10147
|
-
completeFractalFlow(parsed, null, "google_pay");
|
|
10148
|
-
return {
|
|
10149
|
-
transactionState: "SUCCESS"
|
|
10150
|
-
// ✅ CLOSES GOOGLE PAY POPUP
|
|
10151
|
-
};
|
|
10152
|
-
} catch (err) {
|
|
10153
|
-
console.error("Payment failed:", err);
|
|
10154
|
-
return {
|
|
10155
|
-
transactionState: "ERROR",
|
|
10156
|
-
// ❌ CLOSES WITH ERROR UI
|
|
10157
|
-
error: {
|
|
10158
|
-
intent: "PAYMENT_AUTHORIZATION",
|
|
10159
|
-
message: "Payment failed",
|
|
10160
|
-
reason: "PAYMENT_DATA_INVALID"
|
|
10161
|
-
}
|
|
10162
|
-
};
|
|
10163
|
-
}
|
|
10164
|
-
};
|
|
10165
|
-
const getPaymentsClient = () => {
|
|
10166
|
-
if (!paymentsClientRef.current && typeof window !== "undefined") {
|
|
10167
|
-
const google = window.google;
|
|
10168
|
-
if (!google) return null;
|
|
10169
|
-
paymentsClientRef.current = new google.payments.api.PaymentsClient({
|
|
10170
|
-
environment: googlePayEnvironment2,
|
|
10171
|
-
// ✅ ADD THIS
|
|
10172
|
-
paymentDataCallbacks: {
|
|
10173
|
-
onPaymentAuthorized: handlePaymentAuthorization
|
|
10174
|
-
}
|
|
10175
|
-
});
|
|
10176
|
-
}
|
|
10177
|
-
return paymentsClientRef.current;
|
|
10178
|
-
};
|
|
10179
|
-
const getIsReadyToPayRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
|
|
10180
|
-
allowedPaymentMethods: [baseCardPaymentMethod]
|
|
10181
|
-
});
|
|
10182
|
-
const getTransactionInfo = () => ({
|
|
10183
|
-
countryCode: "US",
|
|
10184
|
-
currencyCode: "USD",
|
|
10185
|
-
totalPriceStatus: "FINAL",
|
|
10186
|
-
totalPrice: amount,
|
|
10187
|
-
checkoutOption: "COMPLETE_IMMEDIATE_PURCHASE"
|
|
10188
|
-
});
|
|
10189
|
-
const getPaymentDataRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
|
|
10190
|
-
allowedPaymentMethods: [cardPaymentMethod],
|
|
10191
|
-
transactionInfo: getTransactionInfo(),
|
|
10192
|
-
merchantInfo: {
|
|
10193
|
-
merchantId: googlePayMerchantId2,
|
|
10194
|
-
merchantName: googlePayMerchantName
|
|
10195
|
-
},
|
|
10196
|
-
// ✅ ADD THIS
|
|
10197
|
-
callbackIntents: ["PAYMENT_AUTHORIZATION"]
|
|
10198
|
-
});
|
|
10199
|
-
const initializeGooglePay = async () => {
|
|
10200
|
-
try {
|
|
10201
|
-
const client = getPaymentsClient();
|
|
10202
|
-
if (!client) {
|
|
10203
|
-
console.error("Google Pay client not ready");
|
|
10204
|
-
return;
|
|
10205
|
-
}
|
|
10206
|
-
const response = await client.isReadyToPay(
|
|
10207
|
-
getIsReadyToPayRequest()
|
|
10208
|
-
);
|
|
10209
|
-
if (response.result && containerRef.current) {
|
|
10210
|
-
const button = client.createButton({
|
|
10211
|
-
onClick: onGooglePayClick,
|
|
10212
|
-
allowedPaymentMethods: [baseCardPaymentMethod],
|
|
10213
|
-
buttonType: "pay",
|
|
10214
|
-
buttonColor: "black",
|
|
10215
|
-
buttonRadius: 8
|
|
10216
|
-
});
|
|
10217
|
-
if (containerRef.current) {
|
|
10218
|
-
containerRef.current.innerHTML = "";
|
|
10219
|
-
}
|
|
10220
|
-
containerRef.current.appendChild(button);
|
|
10221
|
-
}
|
|
10222
|
-
} catch (err) {
|
|
10223
|
-
console.error("Google Pay init error:", err);
|
|
10224
|
-
}
|
|
10225
|
-
};
|
|
10226
|
-
const onGooglePayClick = async () => {
|
|
10227
|
-
const client = getPaymentsClient();
|
|
10228
|
-
if (!client) {
|
|
10229
|
-
console.error("Google Pay client not ready");
|
|
10230
|
-
return;
|
|
10231
|
-
}
|
|
10232
|
-
try {
|
|
10233
|
-
await client.loadPaymentData(getPaymentDataRequest());
|
|
10234
|
-
} catch (err) {
|
|
10235
|
-
if ((err == null ? void 0 : err.statusCode) !== "CANCELED") {
|
|
10236
|
-
console.error(err);
|
|
10237
|
-
}
|
|
10238
|
-
}
|
|
10239
|
-
};
|
|
10240
|
-
const onScriptLoad = () => {
|
|
10241
|
-
if (!googlePayEnvironment2 || !googlePayGatewayMerchantId2 || !amount || !googlePayMerchantId2) {
|
|
10242
|
-
console.error("Missing Google Pay config");
|
|
10243
|
-
return;
|
|
10244
|
-
}
|
|
10245
|
-
setTimeout(() => {
|
|
10246
|
-
initializeGooglePay();
|
|
10247
|
-
}, 0);
|
|
10248
|
-
};
|
|
10249
|
-
return /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
10250
|
-
/* @__PURE__ */ jsx34("div", { ref: containerRef, className: "text-center" }),
|
|
10251
|
-
/* @__PURE__ */ jsx34(GooglePayScriptLoader, { onLoad: onScriptLoad })
|
|
10252
|
-
] });
|
|
10253
|
-
}
|
|
10254
|
-
|
|
10255
|
-
// src/app/components/Atoms/Applepay/ApplePayButton.tsx
|
|
10256
|
-
import { useEffect as useEffect17, useRef as useRef11 } from "react";
|
|
10257
|
-
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
10258
|
-
function ApplePayButton({
|
|
10259
|
-
applePayMerchantId: applePayMerchantId2,
|
|
10260
|
-
applePayAmount,
|
|
10261
|
-
applePayMerchantName,
|
|
10262
|
-
showLoader,
|
|
10263
|
-
completeFractalFlow
|
|
10264
|
-
}) {
|
|
10265
|
-
const applePayRef = useRef11(null);
|
|
10266
|
-
const paymentRequestMethods = [
|
|
10267
|
-
{
|
|
10268
|
-
supportedMethods: "https://apple.com/apple-pay",
|
|
10269
|
-
data: {
|
|
10270
|
-
version: 3,
|
|
10271
|
-
merchantIdentifier: applePayMerchantId2,
|
|
10272
|
-
// ✅ FIXED
|
|
10273
|
-
merchantCapabilities: ["supports3DS"],
|
|
10274
|
-
supportedNetworks: ["amex", "discover", "mastercard", "visa"],
|
|
10275
|
-
// ✅ FIXED
|
|
10276
|
-
countryCode: "US"
|
|
10277
|
-
}
|
|
10278
|
-
}
|
|
10279
|
-
];
|
|
10280
|
-
const paymentRequestOptions = {
|
|
10281
|
-
requestPayerName: false,
|
|
10282
|
-
requestPayerEmail: false,
|
|
10283
|
-
requestPayerPhone: false,
|
|
10284
|
-
requestShipping: false
|
|
10285
|
-
};
|
|
10286
|
-
function buildPaymentDetails() {
|
|
10287
|
-
return {
|
|
10288
|
-
total: {
|
|
10289
|
-
label: applePayMerchantName,
|
|
10290
|
-
amount: {
|
|
10291
|
-
currency: "USD",
|
|
10292
|
-
value: applePayAmount
|
|
10293
|
-
}
|
|
10294
|
-
}
|
|
10295
|
-
};
|
|
10296
|
-
}
|
|
10297
|
-
async function validateMerchant(event) {
|
|
10298
|
-
var _a;
|
|
10299
|
-
console.log("\u{1F7E1} STEP 1: Merchant validation started");
|
|
10300
|
-
try {
|
|
10301
|
-
console.log("Validation URL:", event.validationURL);
|
|
10302
|
-
console.log("Domain:", window.location.hostname);
|
|
10303
|
-
const res = await fetch(
|
|
10304
|
-
`${masterBaseUrl}api/v1/widget/generate-apple-pay-session`,
|
|
10305
|
-
{
|
|
10306
|
-
method: "POST",
|
|
10307
|
-
headers: {
|
|
10308
|
-
"Content-Type": "application/json"
|
|
10309
|
-
},
|
|
10310
|
-
body: JSON.stringify({
|
|
10311
|
-
validationUrl: event.validationURL,
|
|
10312
|
-
applePayMerchantId: applePayMerchantId2,
|
|
10313
|
-
applepayDisplayName: applePayMerchantName,
|
|
10314
|
-
requestDomain: window.location.hostname
|
|
10315
|
-
// ✅ IMPORTANT
|
|
10316
|
-
})
|
|
10317
|
-
}
|
|
10318
|
-
);
|
|
10319
|
-
console.log("\u{1F7E1} STEP 2: Response status:", res.status);
|
|
10320
|
-
const data = await res.json();
|
|
10321
|
-
console.log("RAW session response:", JSON.stringify(data));
|
|
10322
|
-
console.log("\u{1F7E2} STEP 3: Session response: data fetched");
|
|
10323
|
-
const merchantSession = (_a = data == null ? void 0 : data.data) != null ? _a : data;
|
|
10324
|
-
if (!merchantSession || typeof merchantSession !== "object") {
|
|
10325
|
-
console.error("\u274C Bad session shape");
|
|
10326
|
-
event.complete(null);
|
|
10327
|
-
return;
|
|
10328
|
-
}
|
|
10329
|
-
console.log("\u{1F7E2} STEP 4.1: Completing merchant validation");
|
|
10330
|
-
event.complete(merchantSession);
|
|
10331
|
-
console.log("\u{1F7E2} STEP 4.2: Completed merchant validation");
|
|
10332
|
-
} catch (err) {
|
|
10333
|
-
console.log("\u274C Merchant validation failed:", err == null ? void 0 : err.message);
|
|
10334
|
-
event.complete(null);
|
|
10335
|
-
}
|
|
10336
|
-
}
|
|
10337
|
-
async function authorizePayment(paymentResponse) {
|
|
10338
|
-
console.log("\u{1F7E1} STEP 5: Authorizing payment");
|
|
10339
|
-
try {
|
|
10340
|
-
const token = paymentResponse.details.token.paymentData;
|
|
10341
|
-
console.log("\u{1F7E2} STEP 6: Got token");
|
|
10342
|
-
await completeFractalFlow(token, null, "apple_pay");
|
|
10343
|
-
await paymentResponse.complete("success");
|
|
10344
|
-
console.log("\u2705 Payment completed successfully");
|
|
10345
|
-
} catch (err) {
|
|
10346
|
-
console.log("\u274C Authorization failed:", err == null ? void 0 : err.message);
|
|
10347
|
-
await paymentResponse.complete("fail");
|
|
10348
|
-
}
|
|
10349
|
-
}
|
|
10350
|
-
async function handleApplePayClick() {
|
|
10351
|
-
console.log("\u{1F7E1} STEP A: Click detected");
|
|
10352
|
-
try {
|
|
10353
|
-
const request = new PaymentRequest(
|
|
10354
|
-
paymentRequestMethods,
|
|
10355
|
-
buildPaymentDetails(),
|
|
10356
|
-
paymentRequestOptions
|
|
10357
|
-
);
|
|
10358
|
-
request.onmerchantvalidation = validateMerchant;
|
|
10359
|
-
console.log("\u{1F7E1} STEP B: Calling show()");
|
|
10360
|
-
const response = await request.show();
|
|
10361
|
-
console.log("\u{1F7E2} STEP C: Payment sheet opened");
|
|
10362
|
-
await authorizePayment(response);
|
|
10363
|
-
} catch (err) {
|
|
10364
|
-
console.log("\u274C Apple Pay flow failed:", err == null ? void 0 : err.message);
|
|
10365
|
-
}
|
|
10366
|
-
}
|
|
10367
|
-
useEffect17(() => {
|
|
10368
|
-
if (window.ApplePaySession && window.ApplePaySession.canMakePayments()) {
|
|
10369
|
-
console.log("\u2705 Apple Pay is available");
|
|
10370
|
-
} else {
|
|
10371
|
-
console.log("\u274C Apple Pay NOT available");
|
|
10372
|
-
}
|
|
10373
|
-
}, []);
|
|
10374
|
-
useEffect17(() => {
|
|
10375
|
-
const btn = applePayRef.current;
|
|
10376
|
-
if (!btn) return;
|
|
10377
|
-
const handleClick = () => handleApplePayClick();
|
|
10378
|
-
btn.addEventListener("click", handleClick);
|
|
10379
|
-
return () => btn.removeEventListener("click", handleClick);
|
|
10380
|
-
}, [applePayMerchantId2, applePayAmount, applePayMerchantName]);
|
|
10381
|
-
return /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
|
|
10382
|
-
"apple-pay-button",
|
|
10383
|
-
{
|
|
10384
|
-
ref: applePayRef,
|
|
10385
|
-
buttonstyle: "black",
|
|
10386
|
-
type: "pay",
|
|
10387
|
-
locale: "en-US",
|
|
10388
|
-
style: { width: "100%" }
|
|
10389
|
-
}
|
|
10390
|
-
) });
|
|
10391
|
-
}
|
|
10392
|
-
|
|
10393
9930
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
10394
|
-
import { Fragment as
|
|
9931
|
+
import { Fragment as Fragment19, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
10395
9932
|
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 }) => {
|
|
10396
9933
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
10397
|
-
const hasRunRef =
|
|
10398
|
-
const cardFormRef =
|
|
10399
|
-
const bankFormRef =
|
|
10400
|
-
const expiryYearRef =
|
|
10401
|
-
const expiryMonthRef =
|
|
10402
|
-
const cardListRunRef =
|
|
10403
|
-
const threeDSContainerRef =
|
|
10404
|
-
const [activetab, setActive] =
|
|
10405
|
-
const [activeList, setActiveList] =
|
|
10406
|
-
const [cardData, setCardData] =
|
|
10407
|
-
const [cardError, setCardError] =
|
|
10408
|
-
const [achData, setAchData] =
|
|
10409
|
-
const [achError, setAchError] =
|
|
10410
|
-
const [saveACHinfo, setSaveACHinfo] =
|
|
10411
|
-
const [saveACHConsent1, setSaveACHConsent1] =
|
|
10412
|
-
const [saveCardInfo, setSaveCardInfo] =
|
|
10413
|
-
const [error, setError] =
|
|
10414
|
-
const [errorIframe, setErrorIframe] =
|
|
10415
|
-
const [success, setSuccess] =
|
|
10416
|
-
let [tranId, setTranId] =
|
|
10417
|
-
const [loading, setLoading] =
|
|
10418
|
-
const [loading2, setLoading2] =
|
|
10419
|
-
const [loadingIframe, setLoadingIframe] =
|
|
10420
|
-
const [cardList, setCardList] =
|
|
10421
|
-
const [bankList, setBankList] =
|
|
10422
|
-
const [selectedCard, setSelectedCard] =
|
|
10423
|
-
const [cashDiscount, setCashDiscount] =
|
|
10424
|
-
const [activeinCard, setActiveinCard] =
|
|
10425
|
-
const [activeinBank, setActiveinBank] =
|
|
10426
|
-
const [isBankActive, setIsBankActive] =
|
|
10427
|
-
const [processingFee, setProcessingFee] =
|
|
10428
|
-
const [clientSecret, setClientSecret] =
|
|
10429
|
-
const [errorMessage, setErrorMessage] =
|
|
10430
|
-
const [initialLoader, setInitialLoader] =
|
|
10431
|
-
const [is3DSEnable, setIs3DSEnable] =
|
|
10432
|
-
const [stripeResponse, setStripeResponse] =
|
|
10433
|
-
const [orderLoader, setOrderLoader] =
|
|
10434
|
-
const [orderGuid, setOrderGuid] =
|
|
10435
|
-
const [partialAmount, setPartialAmount] =
|
|
10436
|
-
const [partialError, setPartialError] =
|
|
10437
|
-
const [remainingAmount, setRemainingAmount] =
|
|
10438
|
-
const [paymentGateway, setPaymentGateway] =
|
|
10439
|
-
const [dcToken, setDCToken] =
|
|
10440
|
-
const [isBankConsentChecked, setIsBankConsentChecked] =
|
|
10441
|
-
const [errorBankConsent, setErrorBankConsent] =
|
|
10442
|
-
const [errorBankConsentOther, setErrorBankConsentOther] =
|
|
9934
|
+
const hasRunRef = useRef10(false);
|
|
9935
|
+
const cardFormRef = useRef10(null);
|
|
9936
|
+
const bankFormRef = useRef10(null);
|
|
9937
|
+
const expiryYearRef = useRef10(null);
|
|
9938
|
+
const expiryMonthRef = useRef10(null);
|
|
9939
|
+
const cardListRunRef = useRef10(false);
|
|
9940
|
+
const threeDSContainerRef = useRef10(null);
|
|
9941
|
+
const [activetab, setActive] = useState10("card");
|
|
9942
|
+
const [activeList, setActiveList] = useState10("card");
|
|
9943
|
+
const [cardData, setCardData] = useState10();
|
|
9944
|
+
const [cardError, setCardError] = useState10({});
|
|
9945
|
+
const [achData, setAchData] = useState10();
|
|
9946
|
+
const [achError, setAchError] = useState10({});
|
|
9947
|
+
const [saveACHinfo, setSaveACHinfo] = useState10(false);
|
|
9948
|
+
const [saveACHConsent1, setSaveACHConsent1] = useState10(false);
|
|
9949
|
+
const [saveCardInfo, setSaveCardInfo] = useState10(false);
|
|
9950
|
+
const [error, setError] = useState10("");
|
|
9951
|
+
const [errorIframe, setErrorIframe] = useState10("");
|
|
9952
|
+
const [success, setSuccess] = useState10(false);
|
|
9953
|
+
let [tranId, setTranId] = useState10("");
|
|
9954
|
+
const [loading, setLoading] = useState10(false);
|
|
9955
|
+
const [loading2, setLoading2] = useState10(false);
|
|
9956
|
+
const [loadingIframe, setLoadingIframe] = useState10(false);
|
|
9957
|
+
const [cardList, setCardList] = useState10([]);
|
|
9958
|
+
const [bankList, setBankList] = useState10([]);
|
|
9959
|
+
const [selectedCard, setSelectedCard] = useState10();
|
|
9960
|
+
const [cashDiscount, setCashDiscount] = useState10(Number(amount));
|
|
9961
|
+
const [activeinCard, setActiveinCard] = useState10("form");
|
|
9962
|
+
const [activeinBank, setActiveinBank] = useState10("form");
|
|
9963
|
+
const [isBankActive, setIsBankActive] = useState10(false);
|
|
9964
|
+
const [processingFee, setProcessingFee] = useState10(0);
|
|
9965
|
+
const [clientSecret, setClientSecret] = useState10("");
|
|
9966
|
+
const [errorMessage, setErrorMessage] = useState10(null);
|
|
9967
|
+
const [initialLoader, setInitialLoader] = useState10(false);
|
|
9968
|
+
const [is3DSEnable, setIs3DSEnable] = useState10(false);
|
|
9969
|
+
const [stripeResponse, setStripeResponse] = useState10(null);
|
|
9970
|
+
const [orderLoader, setOrderLoader] = useState10(false);
|
|
9971
|
+
const [orderGuid, setOrderGuid] = useState10(ordGuid || null);
|
|
9972
|
+
const [partialAmount, setPartialAmount] = useState10("");
|
|
9973
|
+
const [partialError, setPartialError] = useState10("");
|
|
9974
|
+
const [remainingAmount, setRemainingAmount] = useState10("");
|
|
9975
|
+
const [paymentGateway, setPaymentGateway] = useState10();
|
|
9976
|
+
const [dcToken, setDCToken] = useState10();
|
|
9977
|
+
const [isBankConsentChecked, setIsBankConsentChecked] = useState10(false);
|
|
9978
|
+
const [errorBankConsent, setErrorBankConsent] = useState10("");
|
|
9979
|
+
const [errorBankConsentOther, setErrorBankConsentOther] = useState10("");
|
|
10443
9980
|
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
10444
9981
|
let visa2 = S3Url + "widget/visa-img.svg";
|
|
10445
9982
|
let americanexp2 = S3Url + "widget/ae-img.svg";
|
|
@@ -10467,7 +10004,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10467
10004
|
const bankFeeAmount = Number(bankSurcharge || 0);
|
|
10468
10005
|
const bankSavingsAmount = Math.max(bankFeeAmount > 0 ? cardFeeAmount - bankFeeAmount : cardFeeAmount, 0);
|
|
10469
10006
|
const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
|
|
10470
|
-
const tokenizerRef =
|
|
10007
|
+
const tokenizerRef = useRef10(null);
|
|
10471
10008
|
const fractalStyles = {
|
|
10472
10009
|
input: {
|
|
10473
10010
|
"font-family": "'Inter', sans-serif",
|
|
@@ -10540,7 +10077,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10540
10077
|
let dataObj = __spreadValues({
|
|
10541
10078
|
Token: data == null ? void 0 : data.Token,
|
|
10542
10079
|
amount,
|
|
10543
|
-
postal_code: data == null ? void 0 : data.postalCode
|
|
10080
|
+
postal_code: data == null ? void 0 : data.postalCode,
|
|
10081
|
+
require3ds
|
|
10544
10082
|
}, saveCardInfo ? {
|
|
10545
10083
|
card: {
|
|
10546
10084
|
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
@@ -11332,13 +10870,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11332
10870
|
setOrderLoader(false);
|
|
11333
10871
|
}
|
|
11334
10872
|
};
|
|
11335
|
-
|
|
10873
|
+
useEffect15(() => {
|
|
11336
10874
|
if (!show && !autoTrigger) {
|
|
11337
10875
|
hasRunRef.current = false;
|
|
11338
10876
|
cardListRunRef.current = false;
|
|
11339
10877
|
}
|
|
11340
10878
|
}, [show, autoTrigger]);
|
|
11341
|
-
|
|
10879
|
+
useEffect15(() => {
|
|
11342
10880
|
if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
|
|
11343
10881
|
getPaymentDetails();
|
|
11344
10882
|
if (isPartial && !partialRef) {
|
|
@@ -11346,7 +10884,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11346
10884
|
}
|
|
11347
10885
|
}
|
|
11348
10886
|
}, [show, autoTrigger, isPartial, onLoad]);
|
|
11349
|
-
|
|
10887
|
+
useEffect15(() => {
|
|
11350
10888
|
if ((show || autoTrigger) && pass_fee_amount) {
|
|
11351
10889
|
let cashdisc = Number(amount) - Number(pass_fee_amount);
|
|
11352
10890
|
if (cashdisc && !isNaN(cashdisc)) {
|
|
@@ -11408,7 +10946,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11408
10946
|
console.error("3DS Auth failed \u274C", status);
|
|
11409
10947
|
setError(`3DS Authentication ${status}`);
|
|
11410
10948
|
};
|
|
11411
|
-
|
|
10949
|
+
useEffect15(() => {
|
|
11412
10950
|
if (setHandleCloseRef) {
|
|
11413
10951
|
setHandleCloseRef(() => handleClose);
|
|
11414
10952
|
}
|
|
@@ -11426,18 +10964,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11426
10964
|
setPartialError("");
|
|
11427
10965
|
}
|
|
11428
10966
|
};
|
|
11429
|
-
|
|
10967
|
+
useEffect15(() => {
|
|
11430
10968
|
if (typeof FractalTokenizer === "undefined") return;
|
|
11431
10969
|
const tokenizer = new FractalTokenizer({
|
|
11432
10970
|
styles: {}
|
|
11433
10971
|
});
|
|
11434
10972
|
}, []);
|
|
11435
|
-
const stateRef =
|
|
10973
|
+
const stateRef = useRef10({
|
|
11436
10974
|
activeinBank,
|
|
11437
10975
|
activeinCard,
|
|
11438
10976
|
activetab
|
|
11439
10977
|
});
|
|
11440
|
-
|
|
10978
|
+
useEffect15(() => {
|
|
11441
10979
|
stateRef.current = {
|
|
11442
10980
|
activeinBank,
|
|
11443
10981
|
activeinCard,
|
|
@@ -11461,7 +10999,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11461
10999
|
}
|
|
11462
11000
|
}
|
|
11463
11001
|
}, []);
|
|
11464
|
-
|
|
11002
|
+
useEffect15(() => {
|
|
11465
11003
|
onSubmit == null ? void 0 : onSubmit(submit);
|
|
11466
11004
|
}, [onSubmit, submit]);
|
|
11467
11005
|
function detectCardType(cardinput) {
|
|
@@ -11487,34 +11025,34 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11487
11025
|
const cardType = detectCardType(cardInput);
|
|
11488
11026
|
switch (cardType) {
|
|
11489
11027
|
case "visa":
|
|
11490
|
-
return /* @__PURE__ */
|
|
11028
|
+
return /* @__PURE__ */ jsx34("img", { src: visa2, alt: "visa", width: 33 });
|
|
11491
11029
|
case "mastercard":
|
|
11492
|
-
return /* @__PURE__ */
|
|
11030
|
+
return /* @__PURE__ */ jsx34("img", { src: mastercard2, width: 33, alt: "mastercard" });
|
|
11493
11031
|
case "amex":
|
|
11494
|
-
return /* @__PURE__ */
|
|
11032
|
+
return /* @__PURE__ */ jsx34("img", { src: americanexp2, alt: "amex", width: 33 });
|
|
11495
11033
|
case "discover":
|
|
11496
|
-
return /* @__PURE__ */
|
|
11034
|
+
return /* @__PURE__ */ jsx34("img", { src: discover2, width: 33, alt: "discover" });
|
|
11497
11035
|
case "diners":
|
|
11498
|
-
return /* @__PURE__ */
|
|
11036
|
+
return /* @__PURE__ */ jsx34("img", { src: dinersicon, alt: "Diners Club" });
|
|
11499
11037
|
case "jcb":
|
|
11500
|
-
return /* @__PURE__ */
|
|
11038
|
+
return /* @__PURE__ */ jsx34("img", { src: jcbicon, alt: "JCB" });
|
|
11501
11039
|
case "unionpay":
|
|
11502
|
-
return /* @__PURE__ */
|
|
11040
|
+
return /* @__PURE__ */ jsx34("img", { src: unionicon, alt: "UnionPay" });
|
|
11503
11041
|
default:
|
|
11504
|
-
return /* @__PURE__ */
|
|
11042
|
+
return /* @__PURE__ */ jsx34("img", { src: defualtcardborder, alt: "card" });
|
|
11505
11043
|
}
|
|
11506
11044
|
}
|
|
11507
|
-
return /* @__PURE__ */
|
|
11508
|
-
(initialLoader || !onLoad) && /* @__PURE__ */
|
|
11509
|
-
error && /* @__PURE__ */
|
|
11510
|
-
errorIframe && /* @__PURE__ */
|
|
11045
|
+
return /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11046
|
+
(initialLoader || !onLoad) && /* @__PURE__ */ jsx34(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
|
|
11047
|
+
error && /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
|
|
11048
|
+
errorIframe && /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
|
|
11511
11049
|
setErrorIframe("");
|
|
11512
11050
|
}, autoTrigger: onSubmit ? !onSubmit : autoTrigger }) }),
|
|
11513
|
-
/* @__PURE__ */
|
|
11514
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */
|
|
11515
|
-
/* @__PURE__ */
|
|
11516
|
-
/* @__PURE__ */
|
|
11517
|
-
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */
|
|
11051
|
+
/* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11052
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx34(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
|
|
11053
|
+
/* @__PURE__ */ jsxs20("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
|
|
11054
|
+
/* @__PURE__ */ jsx34("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
|
|
11055
|
+
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx34(
|
|
11518
11056
|
ThreeDSChallenge,
|
|
11519
11057
|
{
|
|
11520
11058
|
containerRef: threeDSContainerRef,
|
|
@@ -11524,33 +11062,33 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11524
11062
|
onSuccess: handleSuccess,
|
|
11525
11063
|
onError: handleError
|
|
11526
11064
|
}
|
|
11527
|
-
) : /* @__PURE__ */
|
|
11528
|
-
/* @__PURE__ */
|
|
11529
|
-
/* @__PURE__ */
|
|
11530
|
-
/* @__PURE__ */
|
|
11065
|
+
) : /* @__PURE__ */ jsxs20("div", { className: "parent-pay-container", children: [
|
|
11066
|
+
/* @__PURE__ */ jsx34("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs20("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
11067
|
+
/* @__PURE__ */ jsx34("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx34("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" }) }),
|
|
11068
|
+
/* @__PURE__ */ jsx34("defs", { children: /* @__PURE__ */ jsx34("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx34("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
11531
11069
|
] }) }),
|
|
11532
|
-
/* @__PURE__ */
|
|
11533
|
-
/* @__PURE__ */
|
|
11534
|
-
!onSubmit && /* @__PURE__ */
|
|
11535
|
-
/* @__PURE__ */
|
|
11536
|
-
/* @__PURE__ */
|
|
11537
|
-
/* @__PURE__ */
|
|
11538
|
-
/* @__PURE__ */
|
|
11539
|
-
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */
|
|
11070
|
+
/* @__PURE__ */ jsx34("div", { className: "pay-main-logo-res" }),
|
|
11071
|
+
/* @__PURE__ */ jsxs20("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
|
|
11072
|
+
!onSubmit && /* @__PURE__ */ jsxs20("div", { className: "pay-header pay-conatiner-one", children: [
|
|
11073
|
+
/* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-first", children: [
|
|
11074
|
+
/* @__PURE__ */ jsxs20("div", { className: "pay-logo-container", children: [
|
|
11075
|
+
/* @__PURE__ */ jsx34("div", { className: "pay-main-logo" }),
|
|
11076
|
+
/* @__PURE__ */ jsx34("h1", { className: "pay-heading", children: "Pay" }),
|
|
11077
|
+
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs20("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
|
|
11540
11078
|
" ",
|
|
11541
|
-
/* @__PURE__ */
|
|
11079
|
+
/* @__PURE__ */ jsx34(IoArrowBack4, {}),
|
|
11542
11080
|
" Back"
|
|
11543
11081
|
] })
|
|
11544
11082
|
] }),
|
|
11545
|
-
/* @__PURE__ */
|
|
11546
|
-
/* @__PURE__ */
|
|
11547
|
-
/* @__PURE__ */
|
|
11548
|
-
/* @__PURE__ */
|
|
11549
|
-
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */
|
|
11083
|
+
/* @__PURE__ */ jsx34("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
|
|
11084
|
+
/* @__PURE__ */ jsx34("small", { className: "pay-payment-amount", children: "Select payment type" }),
|
|
11085
|
+
/* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
|
|
11086
|
+
/* @__PURE__ */ jsx34(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
11087
|
+
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx34(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
|
|
11550
11088
|
] }),
|
|
11551
|
-
isPartial && /* @__PURE__ */
|
|
11552
|
-
/* @__PURE__ */
|
|
11553
|
-
/* @__PURE__ */
|
|
11089
|
+
isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
|
|
11090
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11091
|
+
/* @__PURE__ */ jsx34(
|
|
11554
11092
|
NumericFormat2,
|
|
11555
11093
|
{
|
|
11556
11094
|
prefix: "$",
|
|
@@ -11574,25 +11112,25 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11574
11112
|
}
|
|
11575
11113
|
}
|
|
11576
11114
|
),
|
|
11577
|
-
partialError && /* @__PURE__ */
|
|
11115
|
+
partialError && /* @__PURE__ */ jsx34("span", { className: "error-span", children: partialError })
|
|
11578
11116
|
] })
|
|
11579
11117
|
] }) })
|
|
11580
11118
|
] }),
|
|
11581
|
-
/* @__PURE__ */
|
|
11582
|
-
/* @__PURE__ */
|
|
11583
|
-
/* @__PURE__ */
|
|
11119
|
+
/* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-last", children: [
|
|
11120
|
+
/* @__PURE__ */ jsx34("img", { src: secure2, alt: "" }),
|
|
11121
|
+
/* @__PURE__ */ jsx34("img", { src: pov2, alt: "" }),
|
|
11584
11122
|
"Secure payments powered by Fractal"
|
|
11585
11123
|
] })
|
|
11586
11124
|
] }),
|
|
11587
|
-
/* @__PURE__ */
|
|
11588
|
-
onSubmit && /* @__PURE__ */
|
|
11589
|
-
/* @__PURE__ */
|
|
11590
|
-
/* @__PURE__ */
|
|
11591
|
-
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */
|
|
11125
|
+
/* @__PURE__ */ jsx34("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx34("div", { className: "col-md-12", children: /* @__PURE__ */ jsxs20("div", { id: "payment-form-div ", className: onSubmit ? "frac-payment-form-div" : "", children: [
|
|
11126
|
+
onSubmit && /* @__PURE__ */ jsx34("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
|
|
11127
|
+
/* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
|
|
11128
|
+
/* @__PURE__ */ jsx34(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
11129
|
+
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx34(CardBankRadio, { skydesign: true, label: "Bank", amount: (_d = Number(bankAmount)) == null ? void 0 : _d.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
|
|
11592
11130
|
] }),
|
|
11593
|
-
isPartial && /* @__PURE__ */
|
|
11594
|
-
/* @__PURE__ */
|
|
11595
|
-
/* @__PURE__ */
|
|
11131
|
+
isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
|
|
11132
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11133
|
+
/* @__PURE__ */ jsx34(
|
|
11596
11134
|
NumericFormat2,
|
|
11597
11135
|
{
|
|
11598
11136
|
prefix: "$",
|
|
@@ -11609,77 +11147,53 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11609
11147
|
fixedDecimalScale: true
|
|
11610
11148
|
}
|
|
11611
11149
|
),
|
|
11612
|
-
partialError && /* @__PURE__ */
|
|
11150
|
+
partialError && /* @__PURE__ */ jsx34("span", { className: "error-span", children: partialError })
|
|
11613
11151
|
] })
|
|
11614
11152
|
] }) }),
|
|
11615
|
-
is3DSEnable ? clientSecret && /* @__PURE__ */
|
|
11616
|
-
/* @__PURE__ */
|
|
11617
|
-
!onSubmit && /* @__PURE__ */
|
|
11618
|
-
/* @__PURE__ */
|
|
11619
|
-
/* @__PURE__ */
|
|
11153
|
+
is3DSEnable ? clientSecret && /* @__PURE__ */ jsx34(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11154
|
+
/* @__PURE__ */ jsxs20("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
|
|
11155
|
+
!onSubmit && /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11156
|
+
/* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
|
|
11157
|
+
/* @__PURE__ */ jsx34("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs20("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
|
|
11620
11158
|
" ",
|
|
11621
|
-
/* @__PURE__ */
|
|
11159
|
+
/* @__PURE__ */ jsx34(IoArrowBack4, {})
|
|
11622
11160
|
] }) }),
|
|
11623
|
-
/* @__PURE__ */
|
|
11161
|
+
/* @__PURE__ */ jsx34("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
11624
11162
|
] }),
|
|
11625
|
-
/* @__PURE__ */
|
|
11626
|
-
/* @__PURE__ */
|
|
11627
|
-
/* @__PURE__ */
|
|
11628
|
-
/* @__PURE__ */
|
|
11629
|
-
/* @__PURE__ */
|
|
11163
|
+
/* @__PURE__ */ jsxs20("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
|
|
11164
|
+
/* @__PURE__ */ jsx34("img", { src: visa2, alt: "", width: 33 }),
|
|
11165
|
+
/* @__PURE__ */ jsx34("img", { src: mastercard2, width: 33, alt: "" }),
|
|
11166
|
+
/* @__PURE__ */ jsx34("img", { src: americanexp2, alt: "", width: 33 }),
|
|
11167
|
+
/* @__PURE__ */ jsx34("img", { src: discover2, width: 33, alt: "" })
|
|
11630
11168
|
] })
|
|
11631
11169
|
] }),
|
|
11632
|
-
activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */
|
|
11633
|
-
/* @__PURE__ */
|
|
11170
|
+
activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11171
|
+
/* @__PURE__ */ jsx34(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
|
|
11634
11172
|
setActiveinCard("form");
|
|
11635
11173
|
} }),
|
|
11636
|
-
/* @__PURE__ */
|
|
11637
|
-
] }) : paymentGateway == 32 ? /* @__PURE__ */
|
|
11638
|
-
onSubmit && /* @__PURE__ */
|
|
11639
|
-
|
|
11640
|
-
ApplePayButton,
|
|
11641
|
-
{
|
|
11642
|
-
applePayAmount: partialAmount ? partialAmount : amount,
|
|
11643
|
-
applePayMerchantId,
|
|
11644
|
-
applePayMerchantName: merchantName,
|
|
11645
|
-
completeFractalFlow,
|
|
11646
|
-
showLoader
|
|
11647
|
-
}
|
|
11648
|
-
),
|
|
11649
|
-
/* @__PURE__ */ jsx36(
|
|
11650
|
-
GooglePayComponent,
|
|
11651
|
-
{
|
|
11652
|
-
amount: partialAmount ? partialAmount : amount,
|
|
11653
|
-
googlePayEnvironment,
|
|
11654
|
-
googlePayGatewayMerchantId,
|
|
11655
|
-
googlePayMerchantId,
|
|
11656
|
-
googlePayMerchantName: merchantName,
|
|
11657
|
-
completeFractalFlow,
|
|
11658
|
-
setLoading
|
|
11659
|
-
}
|
|
11660
|
-
),
|
|
11661
|
-
/* @__PURE__ */ jsx36("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx36("span", { children: "or" }) })
|
|
11662
|
-
] }),
|
|
11663
|
-
/* @__PURE__ */ jsxs21("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11174
|
+
/* @__PURE__ */ jsx34("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx34("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)) }) })
|
|
11175
|
+
] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11176
|
+
onSubmit && /* @__PURE__ */ jsx34(Fragment19, {}),
|
|
11177
|
+
/* @__PURE__ */ jsxs20("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11664
11178
|
if (e.key === "Enter" && loading) {
|
|
11665
11179
|
e.preventDefault();
|
|
11666
11180
|
e.stopPropagation();
|
|
11667
11181
|
}
|
|
11668
11182
|
}, children: [
|
|
11669
|
-
/* @__PURE__ */
|
|
11670
|
-
/* @__PURE__ */
|
|
11671
|
-
/* @__PURE__ */
|
|
11672
|
-
/* @__PURE__ */
|
|
11183
|
+
/* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11184
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11185
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11186
|
+
/* @__PURE__ */ jsx34("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11673
11187
|
const value = e.target.value;
|
|
11674
11188
|
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11675
11189
|
handleCardChange("cardName", value);
|
|
11676
11190
|
}
|
|
11677
11191
|
} }),
|
|
11678
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */
|
|
11192
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11679
11193
|
] }),
|
|
11680
|
-
/* @__PURE__ */
|
|
11681
|
-
/* @__PURE__ */
|
|
11682
|
-
/* @__PURE__ */
|
|
11194
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11195
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
|
|
11196
|
+
/* @__PURE__ */ jsx34("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx34(
|
|
11683
11197
|
FractalFields_default,
|
|
11684
11198
|
{
|
|
11685
11199
|
fractalStyles,
|
|
@@ -11688,18 +11202,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11688
11202
|
}
|
|
11689
11203
|
) })
|
|
11690
11204
|
] }),
|
|
11691
|
-
/* @__PURE__ */
|
|
11692
|
-
/* @__PURE__ */
|
|
11693
|
-
/* @__PURE__ */
|
|
11694
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */
|
|
11695
|
-
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */
|
|
11205
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11206
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11207
|
+
/* @__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) }),
|
|
11208
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11209
|
+
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
|
|
11696
11210
|
"Cards include a fee amount of ",
|
|
11697
|
-
/* @__PURE__ */
|
|
11211
|
+
/* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11698
11212
|
"."
|
|
11699
11213
|
] })
|
|
11700
11214
|
] }),
|
|
11701
|
-
customerId && /* @__PURE__ */
|
|
11702
|
-
/* @__PURE__ */
|
|
11215
|
+
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: [
|
|
11216
|
+
/* @__PURE__ */ jsx34(
|
|
11703
11217
|
"input",
|
|
11704
11218
|
{
|
|
11705
11219
|
type: "checkbox",
|
|
@@ -11709,10 +11223,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11709
11223
|
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11710
11224
|
}
|
|
11711
11225
|
),
|
|
11712
|
-
/* @__PURE__ */
|
|
11713
|
-
/* @__PURE__ */
|
|
11714
|
-
/* @__PURE__ */
|
|
11715
|
-
/* @__PURE__ */
|
|
11226
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11227
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11228
|
+
/* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
|
|
11229
|
+
/* @__PURE__ */ jsx34("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
|
|
11716
11230
|
"svg",
|
|
11717
11231
|
{
|
|
11718
11232
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11721,8 +11235,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11721
11235
|
viewBox: "0 0 20 20",
|
|
11722
11236
|
fill: "none",
|
|
11723
11237
|
children: [
|
|
11724
|
-
/* @__PURE__ */
|
|
11725
|
-
/* @__PURE__ */
|
|
11238
|
+
/* @__PURE__ */ jsx34("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11239
|
+
/* @__PURE__ */ jsx34(
|
|
11726
11240
|
"path",
|
|
11727
11241
|
{
|
|
11728
11242
|
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",
|
|
@@ -11732,34 +11246,34 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11732
11246
|
]
|
|
11733
11247
|
}
|
|
11734
11248
|
) }),
|
|
11735
|
-
/* @__PURE__ */
|
|
11249
|
+
/* @__PURE__ */ jsx34("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
|
|
11736
11250
|
"If checked, I agree to give the ",
|
|
11737
|
-
/* @__PURE__ */
|
|
11251
|
+
/* @__PURE__ */ jsx34("b", { children: merchantName || "merchant" }),
|
|
11738
11252
|
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11739
11253
|
] }) })
|
|
11740
11254
|
] })
|
|
11741
11255
|
] }) })
|
|
11742
11256
|
] }),
|
|
11743
|
-
/* @__PURE__ */
|
|
11257
|
+
/* @__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((_h = Number(partialAmount)) == null ? void 0 : _h.toFixed(2)) : formatUSD((_i = Number(amount)) == null ? void 0 : _i.toFixed(2)) }) })
|
|
11744
11258
|
] })
|
|
11745
|
-
] }) : /* @__PURE__ */
|
|
11259
|
+
] }) : /* @__PURE__ */ jsxs20("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11746
11260
|
if (e.key === "Enter" && loading) {
|
|
11747
11261
|
e.preventDefault();
|
|
11748
11262
|
e.stopPropagation();
|
|
11749
11263
|
}
|
|
11750
11264
|
}, children: [
|
|
11751
|
-
/* @__PURE__ */
|
|
11752
|
-
/* @__PURE__ */
|
|
11753
|
-
/* @__PURE__ */
|
|
11754
|
-
/* @__PURE__ */
|
|
11265
|
+
/* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11266
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11267
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11268
|
+
/* @__PURE__ */ jsx34("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11755
11269
|
const value = e.target.value;
|
|
11756
11270
|
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11757
11271
|
handleCardChange("cardName", value);
|
|
11758
11272
|
}
|
|
11759
11273
|
} }),
|
|
11760
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */
|
|
11274
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11761
11275
|
] }),
|
|
11762
|
-
/* @__PURE__ */
|
|
11276
|
+
/* @__PURE__ */ jsx34("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx34(
|
|
11763
11277
|
DataCapFields,
|
|
11764
11278
|
{
|
|
11765
11279
|
isOpen: show || autoTrigger,
|
|
@@ -11769,18 +11283,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11769
11283
|
customCSS: customCSS2
|
|
11770
11284
|
}
|
|
11771
11285
|
) }),
|
|
11772
|
-
/* @__PURE__ */
|
|
11773
|
-
/* @__PURE__ */
|
|
11774
|
-
/* @__PURE__ */
|
|
11775
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */
|
|
11776
|
-
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */
|
|
11286
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11287
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11288
|
+
/* @__PURE__ */ jsx34("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) }),
|
|
11289
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11290
|
+
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
|
|
11777
11291
|
"Cards include a fee amount of ",
|
|
11778
|
-
/* @__PURE__ */
|
|
11292
|
+
/* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11779
11293
|
"."
|
|
11780
11294
|
] })
|
|
11781
11295
|
] }),
|
|
11782
|
-
customerId && /* @__PURE__ */
|
|
11783
|
-
/* @__PURE__ */
|
|
11296
|
+
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: [
|
|
11297
|
+
/* @__PURE__ */ jsx34(
|
|
11784
11298
|
"input",
|
|
11785
11299
|
{
|
|
11786
11300
|
type: "checkbox",
|
|
@@ -11790,10 +11304,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11790
11304
|
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11791
11305
|
}
|
|
11792
11306
|
),
|
|
11793
|
-
/* @__PURE__ */
|
|
11794
|
-
/* @__PURE__ */
|
|
11795
|
-
/* @__PURE__ */
|
|
11796
|
-
/* @__PURE__ */
|
|
11307
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11308
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11309
|
+
/* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
|
|
11310
|
+
/* @__PURE__ */ jsx34("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
|
|
11797
11311
|
"svg",
|
|
11798
11312
|
{
|
|
11799
11313
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11802,8 +11316,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11802
11316
|
viewBox: "0 0 20 20",
|
|
11803
11317
|
fill: "none",
|
|
11804
11318
|
children: [
|
|
11805
|
-
/* @__PURE__ */
|
|
11806
|
-
/* @__PURE__ */
|
|
11319
|
+
/* @__PURE__ */ jsx34("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11320
|
+
/* @__PURE__ */ jsx34(
|
|
11807
11321
|
"path",
|
|
11808
11322
|
{
|
|
11809
11323
|
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",
|
|
@@ -11813,48 +11327,48 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11813
11327
|
]
|
|
11814
11328
|
}
|
|
11815
11329
|
) }),
|
|
11816
|
-
/* @__PURE__ */
|
|
11330
|
+
/* @__PURE__ */ jsx34("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
|
|
11817
11331
|
"If checked, I agree to give the ",
|
|
11818
|
-
/* @__PURE__ */
|
|
11332
|
+
/* @__PURE__ */ jsx34("b", { children: merchantName || "merchant" }),
|
|
11819
11333
|
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11820
11334
|
] }) })
|
|
11821
11335
|
] })
|
|
11822
11336
|
] }) })
|
|
11823
11337
|
] }),
|
|
11824
|
-
/* @__PURE__ */
|
|
11338
|
+
/* @__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)) }) })
|
|
11825
11339
|
] })
|
|
11826
11340
|
] }),
|
|
11827
|
-
/* @__PURE__ */
|
|
11828
|
-
!onSubmit && /* @__PURE__ */
|
|
11829
|
-
/* @__PURE__ */
|
|
11341
|
+
/* @__PURE__ */ jsx34("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11342
|
+
!onSubmit && /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
|
|
11343
|
+
/* @__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: [
|
|
11830
11344
|
" ",
|
|
11831
|
-
/* @__PURE__ */
|
|
11345
|
+
/* @__PURE__ */ jsx34(IoArrowBack4, {})
|
|
11832
11346
|
] }) }),
|
|
11833
|
-
/* @__PURE__ */
|
|
11347
|
+
/* @__PURE__ */ jsx34("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
|
|
11834
11348
|
] }),
|
|
11835
|
-
activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */
|
|
11836
|
-
/* @__PURE__ */
|
|
11349
|
+
activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11350
|
+
/* @__PURE__ */ jsx34(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
|
|
11837
11351
|
setActiveinBank("form");
|
|
11838
11352
|
} }),
|
|
11839
|
-
/* @__PURE__ */
|
|
11840
|
-
] }) : /* @__PURE__ */
|
|
11353
|
+
/* @__PURE__ */ jsx34("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx34("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_m = Number(bankAmount)) == null ? void 0 : _m.toFixed(2)) }) })
|
|
11354
|
+
] }) : /* @__PURE__ */ jsxs20("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
|
|
11841
11355
|
if (e.key === "Enter" && loading) {
|
|
11842
11356
|
e.preventDefault();
|
|
11843
11357
|
e.stopPropagation();
|
|
11844
11358
|
}
|
|
11845
11359
|
}, children: [
|
|
11846
|
-
/* @__PURE__ */
|
|
11360
|
+
/* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: {
|
|
11847
11361
|
minHeight: "444px",
|
|
11848
11362
|
maxHeight: "444px"
|
|
11849
11363
|
}, children: [
|
|
11850
|
-
/* @__PURE__ */
|
|
11851
|
-
/* @__PURE__ */
|
|
11852
|
-
/* @__PURE__ */
|
|
11853
|
-
(achError == null ? void 0 : achError.name) && /* @__PURE__ */
|
|
11364
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11365
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
11366
|
+
/* @__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 }),
|
|
11367
|
+
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
11854
11368
|
] }),
|
|
11855
|
-
/* @__PURE__ */
|
|
11856
|
-
/* @__PURE__ */
|
|
11857
|
-
/* @__PURE__ */
|
|
11369
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11370
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "routingnumber", children: "Routing number" }),
|
|
11371
|
+
/* @__PURE__ */ jsx34(
|
|
11858
11372
|
"input",
|
|
11859
11373
|
{
|
|
11860
11374
|
type: "text",
|
|
@@ -11867,11 +11381,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11867
11381
|
onChange: handleChangeAch
|
|
11868
11382
|
}
|
|
11869
11383
|
),
|
|
11870
|
-
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */
|
|
11384
|
+
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
|
|
11871
11385
|
] }),
|
|
11872
|
-
/* @__PURE__ */
|
|
11873
|
-
/* @__PURE__ */
|
|
11874
|
-
/* @__PURE__ */
|
|
11386
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11387
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "accountnumber", children: "Account number" }),
|
|
11388
|
+
/* @__PURE__ */ jsx34(
|
|
11875
11389
|
"input",
|
|
11876
11390
|
{
|
|
11877
11391
|
type: "text",
|
|
@@ -11884,11 +11398,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11884
11398
|
onChange: handleChangeAch
|
|
11885
11399
|
}
|
|
11886
11400
|
),
|
|
11887
|
-
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */
|
|
11401
|
+
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
|
|
11888
11402
|
] }),
|
|
11889
|
-
/* @__PURE__ */
|
|
11890
|
-
/* @__PURE__ */
|
|
11891
|
-
/* @__PURE__ */
|
|
11403
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11404
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
|
|
11405
|
+
/* @__PURE__ */ jsx34(
|
|
11892
11406
|
"input",
|
|
11893
11407
|
{
|
|
11894
11408
|
type: "text",
|
|
@@ -11901,11 +11415,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11901
11415
|
onChange: handleChangeAch
|
|
11902
11416
|
}
|
|
11903
11417
|
),
|
|
11904
|
-
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */
|
|
11418
|
+
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
|
|
11905
11419
|
] }),
|
|
11906
|
-
/* @__PURE__ */
|
|
11907
|
-
/* @__PURE__ */
|
|
11908
|
-
/* @__PURE__ */
|
|
11420
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11421
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "bankname", children: "Bank name" }),
|
|
11422
|
+
/* @__PURE__ */ jsx34(
|
|
11909
11423
|
"input",
|
|
11910
11424
|
{
|
|
11911
11425
|
type: "text",
|
|
@@ -11918,11 +11432,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11918
11432
|
onChange: handleChangeAch
|
|
11919
11433
|
}
|
|
11920
11434
|
),
|
|
11921
|
-
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */
|
|
11435
|
+
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
|
|
11922
11436
|
] }),
|
|
11923
|
-
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */
|
|
11924
|
-
/* @__PURE__ */
|
|
11925
|
-
/* @__PURE__ */
|
|
11437
|
+
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11438
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "companyName", children: "Company name" }),
|
|
11439
|
+
/* @__PURE__ */ jsx34(
|
|
11926
11440
|
"input",
|
|
11927
11441
|
{
|
|
11928
11442
|
type: "text",
|
|
@@ -11935,60 +11449,60 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11935
11449
|
onChange: handleChangeAch
|
|
11936
11450
|
}
|
|
11937
11451
|
),
|
|
11938
|
-
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */
|
|
11452
|
+
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx34("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
|
|
11939
11453
|
] }),
|
|
11940
|
-
/* @__PURE__ */
|
|
11941
|
-
/* @__PURE__ */
|
|
11942
|
-
/* @__PURE__ */
|
|
11943
|
-
/* @__PURE__ */
|
|
11944
|
-
accountTypes.map((type) => /* @__PURE__ */
|
|
11454
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11455
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "accounttype", children: "Select account type" }),
|
|
11456
|
+
/* @__PURE__ */ jsxs20("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
|
|
11457
|
+
/* @__PURE__ */ jsx34("option", { value: "", children: "Select account" }),
|
|
11458
|
+
accountTypes.map((type) => /* @__PURE__ */ jsx34("option", { value: type.value, children: type.label }, type.value))
|
|
11945
11459
|
] }),
|
|
11946
|
-
bankFeeAmount > 0 && /* @__PURE__ */
|
|
11460
|
+
bankFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
|
|
11947
11461
|
"There is a processing fee of ",
|
|
11948
|
-
/* @__PURE__ */
|
|
11462
|
+
/* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
|
|
11949
11463
|
"."
|
|
11950
11464
|
] }),
|
|
11951
|
-
!saveACHinfo && /* @__PURE__ */
|
|
11952
|
-
/* @__PURE__ */
|
|
11953
|
-
/* @__PURE__ */
|
|
11465
|
+
!saveACHinfo && /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11466
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11467
|
+
/* @__PURE__ */ jsx34("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
|
|
11954
11468
|
setIsBankConsentChecked(e.target.checked);
|
|
11955
11469
|
if (e.target.checked) {
|
|
11956
11470
|
setErrorBankConsent("");
|
|
11957
11471
|
}
|
|
11958
11472
|
} }),
|
|
11959
|
-
/* @__PURE__ */
|
|
11473
|
+
/* @__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.` })
|
|
11960
11474
|
] }),
|
|
11961
|
-
errorBankConsent && /* @__PURE__ */
|
|
11475
|
+
errorBankConsent && /* @__PURE__ */ jsx34("span", { className: "error-span", children: errorBankConsent })
|
|
11962
11476
|
] }),
|
|
11963
|
-
customerId && /* @__PURE__ */
|
|
11964
|
-
/* @__PURE__ */
|
|
11477
|
+
customerId && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11478
|
+
/* @__PURE__ */ jsx34("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
|
|
11965
11479
|
setSaveACHinfo(e.target.checked);
|
|
11966
11480
|
if (!e.target.checked) {
|
|
11967
11481
|
setSaveACHConsent1(false);
|
|
11968
11482
|
setErrorBankConsentOther("");
|
|
11969
11483
|
}
|
|
11970
11484
|
} }),
|
|
11971
|
-
/* @__PURE__ */
|
|
11485
|
+
/* @__PURE__ */ jsx34("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save for future use" })
|
|
11972
11486
|
] }),
|
|
11973
|
-
saveACHinfo && /* @__PURE__ */
|
|
11974
|
-
/* @__PURE__ */
|
|
11975
|
-
/* @__PURE__ */
|
|
11487
|
+
saveACHinfo && /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11488
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11489
|
+
/* @__PURE__ */ jsx34("input", { type: "checkbox", id: "saveACHConsent1", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHConsent1, onChange: (e) => {
|
|
11976
11490
|
setSaveACHConsent1(e.target.checked);
|
|
11977
11491
|
if (e.target.checked) {
|
|
11978
11492
|
setErrorBankConsentOther("");
|
|
11979
11493
|
}
|
|
11980
11494
|
} }),
|
|
11981
|
-
/* @__PURE__ */
|
|
11495
|
+
/* @__PURE__ */ jsxs20("label", { className: "saveachlabel", htmlFor: "saveACHConsent1", children: [
|
|
11982
11496
|
"By providing my bank account information and selecting \u2018Save for future payments\u2019, I authorize ",
|
|
11983
11497
|
merchantName || "merchant",
|
|
11984
11498
|
" 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."
|
|
11985
11499
|
] })
|
|
11986
11500
|
] }),
|
|
11987
|
-
errorBankConsentOther && /* @__PURE__ */
|
|
11501
|
+
errorBankConsentOther && /* @__PURE__ */ jsx34("span", { className: "error-span", children: errorBankConsentOther })
|
|
11988
11502
|
] })
|
|
11989
11503
|
] })
|
|
11990
11504
|
] }),
|
|
11991
|
-
/* @__PURE__ */
|
|
11505
|
+
/* @__PURE__ */ jsx34("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx34("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)) }) })
|
|
11992
11506
|
] })
|
|
11993
11507
|
] }) })
|
|
11994
11508
|
] })
|
|
@@ -12003,7 +11517,7 @@ var ModelContentSky_default = ModelContentSky;
|
|
|
12003
11517
|
|
|
12004
11518
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
12005
11519
|
import axios10 from "axios";
|
|
12006
|
-
import { Fragment as
|
|
11520
|
+
import { Fragment as Fragment20, jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
12007
11521
|
var PaymentWidget = ({
|
|
12008
11522
|
amount,
|
|
12009
11523
|
bankAmount,
|
|
@@ -12027,12 +11541,12 @@ var PaymentWidget = ({
|
|
|
12027
11541
|
customCSS: customCSS2,
|
|
12028
11542
|
disableSubmitBtn = false
|
|
12029
11543
|
}) => {
|
|
12030
|
-
const [show, setShow] =
|
|
12031
|
-
const [loading, setLoading] =
|
|
12032
|
-
const [childHandleClose, setChildHandleClose] =
|
|
11544
|
+
const [show, setShow] = useState11(autoTrigger || false);
|
|
11545
|
+
const [loading, setLoading] = useState11(false);
|
|
11546
|
+
const [childHandleClose, setChildHandleClose] = useState11(() => () => {
|
|
12033
11547
|
});
|
|
12034
|
-
const [orderGuid, setOrderGuid] =
|
|
12035
|
-
const [remainingAmount, setRemainingAmount] =
|
|
11548
|
+
const [orderGuid, setOrderGuid] = useState11(null);
|
|
11549
|
+
const [remainingAmount, setRemainingAmount] = useState11(null);
|
|
12036
11550
|
const initialCommonProps = useMemo(
|
|
12037
11551
|
() => ({
|
|
12038
11552
|
amount,
|
|
@@ -12082,8 +11596,8 @@ var PaymentWidget = ({
|
|
|
12082
11596
|
disableSubmitBtn
|
|
12083
11597
|
]
|
|
12084
11598
|
);
|
|
12085
|
-
const [commonProps, setCommonProps] =
|
|
12086
|
-
|
|
11599
|
+
const [commonProps, setCommonProps] = useState11(initialCommonProps);
|
|
11600
|
+
useEffect16(() => {
|
|
12087
11601
|
if (show) {
|
|
12088
11602
|
setCommonProps(initialCommonProps);
|
|
12089
11603
|
}
|
|
@@ -12114,35 +11628,35 @@ var PaymentWidget = ({
|
|
|
12114
11628
|
setLoading(false);
|
|
12115
11629
|
}
|
|
12116
11630
|
};
|
|
12117
|
-
|
|
11631
|
+
useEffect16(() => {
|
|
12118
11632
|
if (show && isPartial && partialRef) {
|
|
12119
11633
|
getskyosOrderDetails();
|
|
12120
11634
|
}
|
|
12121
11635
|
}, [show, isPartial, partialRef]);
|
|
12122
|
-
return /* @__PURE__ */
|
|
12123
|
-
/* @__PURE__ */
|
|
12124
|
-
/* @__PURE__ */
|
|
12125
|
-
/* @__PURE__ */
|
|
12126
|
-
/* @__PURE__ */
|
|
12127
|
-
/* @__PURE__ */
|
|
12128
|
-
/* @__PURE__ */
|
|
12129
|
-
/* @__PURE__ */
|
|
12130
|
-
!autoTrigger && /* @__PURE__ */
|
|
11636
|
+
return /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11637
|
+
/* @__PURE__ */ jsx35("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
11638
|
+
/* @__PURE__ */ jsx35(DataScript, {}),
|
|
11639
|
+
/* @__PURE__ */ jsx35(FractalTokenizerScript, {}),
|
|
11640
|
+
/* @__PURE__ */ jsx35(SkyChargewidgetstyles, {}),
|
|
11641
|
+
/* @__PURE__ */ jsx35(CardBankRadioStyles, {}),
|
|
11642
|
+
/* @__PURE__ */ jsx35(CustomModal2styles_default, {}),
|
|
11643
|
+
/* @__PURE__ */ jsx35(DataCapScriptLoader, {}),
|
|
11644
|
+
!autoTrigger && /* @__PURE__ */ jsxs21("button", { className: submitBtnClass || "paymentBtn", disabled: disableSubmitBtn, onClick: () => setShow(true), children: [
|
|
12131
11645
|
submitBtnText,
|
|
12132
11646
|
submitBtnIcon
|
|
12133
11647
|
] }),
|
|
12134
|
-
!autoTrigger ? /* @__PURE__ */
|
|
11648
|
+
!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 }))
|
|
12135
11649
|
] });
|
|
12136
11650
|
};
|
|
12137
11651
|
|
|
12138
11652
|
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
12139
|
-
import { useEffect as
|
|
11653
|
+
import { useEffect as useEffect18, useState as useState12, useMemo as useMemo2 } from "react";
|
|
12140
11654
|
import axios11 from "axios";
|
|
12141
11655
|
|
|
12142
11656
|
// src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
|
|
12143
|
-
import { jsx as
|
|
11657
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
12144
11658
|
function EmbeddedCheckoutStyles({ extraCustomCSS }) {
|
|
12145
|
-
return /* @__PURE__ */
|
|
11659
|
+
return /* @__PURE__ */ jsx36("style", { children: `
|
|
12146
11660
|
|
|
12147
11661
|
.pay-amount-conatiner{
|
|
12148
11662
|
margin-top: 20px !important;
|
|
@@ -12488,10 +12002,10 @@ padding:0px !important;
|
|
|
12488
12002
|
}
|
|
12489
12003
|
|
|
12490
12004
|
// src/app/components/Atoms/Applepay/ApplePayScriptLoader.tsx
|
|
12491
|
-
import { useEffect as
|
|
12005
|
+
import { useEffect as useEffect17 } from "react";
|
|
12492
12006
|
var applePayScriptLoaded = false;
|
|
12493
12007
|
var ApplePayScriptLoader = () => {
|
|
12494
|
-
|
|
12008
|
+
useEffect17(() => {
|
|
12495
12009
|
if (applePayScriptLoaded) return;
|
|
12496
12010
|
const existingScript = document.querySelector(
|
|
12497
12011
|
`script[src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"]`
|
|
@@ -12517,7 +12031,7 @@ var ApplePayScriptLoader = () => {
|
|
|
12517
12031
|
};
|
|
12518
12032
|
|
|
12519
12033
|
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
12520
|
-
import { Fragment as
|
|
12034
|
+
import { Fragment as Fragment21, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
12521
12035
|
var EmbeddedCheckout = ({
|
|
12522
12036
|
amount,
|
|
12523
12037
|
bankAmount,
|
|
@@ -12542,12 +12056,12 @@ var EmbeddedCheckout = ({
|
|
|
12542
12056
|
onLoad,
|
|
12543
12057
|
customCSS: customCSS2
|
|
12544
12058
|
}) => {
|
|
12545
|
-
const [show, setShow] =
|
|
12546
|
-
const [loading, setLoading] =
|
|
12547
|
-
const [childHandleClose, setChildHandleClose] =
|
|
12059
|
+
const [show, setShow] = useState12(false);
|
|
12060
|
+
const [loading, setLoading] = useState12(false);
|
|
12061
|
+
const [childHandleClose, setChildHandleClose] = useState12(() => () => {
|
|
12548
12062
|
});
|
|
12549
|
-
const [orderGuid, setOrderGuid] =
|
|
12550
|
-
const [remainingAmount, setRemainingAmount] =
|
|
12063
|
+
const [orderGuid, setOrderGuid] = useState12(null);
|
|
12064
|
+
const [remainingAmount, setRemainingAmount] = useState12(null);
|
|
12551
12065
|
const initialCommonProps = useMemo2(
|
|
12552
12066
|
() => ({
|
|
12553
12067
|
amount,
|
|
@@ -12594,8 +12108,8 @@ var EmbeddedCheckout = ({
|
|
|
12594
12108
|
partialRef
|
|
12595
12109
|
]
|
|
12596
12110
|
);
|
|
12597
|
-
const [commonProps, setCommonProps] =
|
|
12598
|
-
|
|
12111
|
+
const [commonProps, setCommonProps] = useState12(initialCommonProps);
|
|
12112
|
+
useEffect18(() => {
|
|
12599
12113
|
if (show) {
|
|
12600
12114
|
setCommonProps(initialCommonProps);
|
|
12601
12115
|
}
|
|
@@ -12626,13 +12140,13 @@ var EmbeddedCheckout = ({
|
|
|
12626
12140
|
setLoading(false);
|
|
12627
12141
|
}
|
|
12628
12142
|
};
|
|
12629
|
-
|
|
12143
|
+
useEffect18(() => {
|
|
12630
12144
|
if (show && isPartial && partialRef) {
|
|
12631
12145
|
getskyosOrderDetails();
|
|
12632
12146
|
}
|
|
12633
12147
|
}, [show, isPartial, partialRef]);
|
|
12634
12148
|
console.log(onLoad, "onLoad");
|
|
12635
|
-
|
|
12149
|
+
useEffect18(() => {
|
|
12636
12150
|
const supported = !!window.ApplePaySession;
|
|
12637
12151
|
let canPay = false;
|
|
12638
12152
|
if (supported) {
|
|
@@ -12643,21 +12157,21 @@ var EmbeddedCheckout = ({
|
|
|
12643
12157
|
}
|
|
12644
12158
|
console.log(`ApplePaySession: ${supported}, canMakePayments: ${canPay}`);
|
|
12645
12159
|
}, []);
|
|
12646
|
-
return /* @__PURE__ */
|
|
12647
|
-
/* @__PURE__ */
|
|
12648
|
-
/* @__PURE__ */
|
|
12649
|
-
/* @__PURE__ */
|
|
12650
|
-
/* @__PURE__ */
|
|
12651
|
-
/* @__PURE__ */
|
|
12652
|
-
/* @__PURE__ */
|
|
12653
|
-
/* @__PURE__ */
|
|
12654
|
-
/* @__PURE__ */
|
|
12655
|
-
/* @__PURE__ */
|
|
12656
|
-
!autoTrigger && /* @__PURE__ */
|
|
12160
|
+
return /* @__PURE__ */ jsxs22(Fragment21, { children: [
|
|
12161
|
+
/* @__PURE__ */ jsx37("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
12162
|
+
/* @__PURE__ */ jsx37(DataScript, {}),
|
|
12163
|
+
/* @__PURE__ */ jsx37(FractalTokenizerScript, {}),
|
|
12164
|
+
/* @__PURE__ */ jsx37(SkyChargewidgetstyles, {}),
|
|
12165
|
+
/* @__PURE__ */ jsx37(CardBankRadioStyles, {}),
|
|
12166
|
+
/* @__PURE__ */ jsx37(CustomModal2styles_default, {}),
|
|
12167
|
+
/* @__PURE__ */ jsx37(DataCapScriptLoader, {}),
|
|
12168
|
+
/* @__PURE__ */ jsx37(ApplePayScriptLoader, {}),
|
|
12169
|
+
/* @__PURE__ */ jsx37(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
|
|
12170
|
+
!autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
12657
12171
|
submitBtnText,
|
|
12658
12172
|
submitBtnIcon
|
|
12659
12173
|
] }),
|
|
12660
|
-
!autoTrigger ? /* @__PURE__ */
|
|
12174
|
+
!autoTrigger ? /* @__PURE__ */ jsx37(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx37(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx37(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
|
|
12661
12175
|
] });
|
|
12662
12176
|
};
|
|
12663
12177
|
export {
|