@fractalpay/fractalpay-next-dev 0.0.288 → 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 +321 -699
- 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: {
|
|
@@ -2811,25 +2811,25 @@ import { IoArrowBack } from "react-icons/io5";
|
|
|
2811
2811
|
import { useEffect as useEffect3 } from "react";
|
|
2812
2812
|
function DataScript() {
|
|
2813
2813
|
useEffect3(() => {
|
|
2814
|
-
const
|
|
2814
|
+
const src2 = datacapUrl;
|
|
2815
2815
|
if (typeof window === "undefined") return;
|
|
2816
2816
|
if (window.DatacapWebToken) {
|
|
2817
2817
|
return;
|
|
2818
2818
|
}
|
|
2819
|
-
if (!document.querySelector(`script[src="${
|
|
2820
|
-
const
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2819
|
+
if (!document.querySelector(`script[src="${src2}"]`)) {
|
|
2820
|
+
const script2 = document.createElement("script");
|
|
2821
|
+
script2.src = src2;
|
|
2822
|
+
script2.async = true;
|
|
2823
|
+
script2.onload = () => {
|
|
2824
2824
|
if (window.DatacapWebToken) {
|
|
2825
2825
|
} else {
|
|
2826
2826
|
console.warn("\u26A0\uFE0F Script loaded, but DatacapWebToken not found");
|
|
2827
2827
|
}
|
|
2828
2828
|
};
|
|
2829
|
-
|
|
2829
|
+
script2.onerror = (err) => {
|
|
2830
2830
|
console.error("\u274C Failed to load Datacap script", err);
|
|
2831
2831
|
};
|
|
2832
|
-
document.head.appendChild(
|
|
2832
|
+
document.head.appendChild(script2);
|
|
2833
2833
|
} else {
|
|
2834
2834
|
}
|
|
2835
2835
|
}, []);
|
|
@@ -3209,31 +3209,21 @@ var PaxList = ({ listHeading = "Readers", ListItems, selectedPax, setSlectedPax,
|
|
|
3209
3209
|
|
|
3210
3210
|
// src/app/components/FractalTokenizer.tsx
|
|
3211
3211
|
import { useEffect as useEffect4 } from "react";
|
|
3212
|
-
function FractalTokenizerScript(
|
|
3212
|
+
function FractalTokenizerScript() {
|
|
3213
3213
|
useEffect4(() => {
|
|
3214
3214
|
const src = `${fractalGatewayUrl}tokenizer/static/js/fractal_tokenizer.js`;
|
|
3215
|
-
if (
|
|
3216
|
-
onLoad == null ? void 0 : onLoad();
|
|
3217
|
-
return;
|
|
3218
|
-
}
|
|
3219
|
-
const existing = document.querySelector(`script[src="${src}"]`);
|
|
3220
|
-
if (existing) {
|
|
3221
|
-
existing.addEventListener("load", () => onLoad == null ? void 0 : onLoad());
|
|
3222
|
-
return;
|
|
3223
|
-
}
|
|
3215
|
+
if (document.querySelector(`script[src="${src}"]`)) return;
|
|
3224
3216
|
const script = document.createElement("script");
|
|
3225
3217
|
script.src = src;
|
|
3226
3218
|
script.async = true;
|
|
3227
3219
|
script.onload = () => {
|
|
3228
3220
|
try {
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
} else {
|
|
3233
|
-
console.error("FractalTokenizer not defined in global scope");
|
|
3221
|
+
const TokenizerClass = eval("FractalTokenizer");
|
|
3222
|
+
if (TokenizerClass) {
|
|
3223
|
+
window.FractalTokenizer = TokenizerClass;
|
|
3234
3224
|
}
|
|
3235
3225
|
} catch (err) {
|
|
3236
|
-
console.error(err);
|
|
3226
|
+
console.error("FractalTokenizer not accessible:", err);
|
|
3237
3227
|
}
|
|
3238
3228
|
};
|
|
3239
3229
|
document.head.appendChild(script);
|
|
@@ -3247,12 +3237,8 @@ import { Fragment as Fragment10, jsx as jsx17, jsxs as jsxs10 } from "react/jsx-
|
|
|
3247
3237
|
var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = false }) => {
|
|
3248
3238
|
const instanceRef = useRef(null);
|
|
3249
3239
|
useEffect5(() => {
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
console.error("Tokenizer not available");
|
|
3253
|
-
return;
|
|
3254
|
-
}
|
|
3255
|
-
const instance = new Tokenizer({
|
|
3240
|
+
if (!window.FractalTokenizer) return;
|
|
3241
|
+
const instance = new window.FractalTokenizer({
|
|
3256
3242
|
styles: fractalStyles
|
|
3257
3243
|
});
|
|
3258
3244
|
instanceRef.current = instance;
|
|
@@ -3364,17 +3350,17 @@ var DataCapScriptLoader = () => {
|
|
|
3364
3350
|
);
|
|
3365
3351
|
console.log("\u{1F535} existingScript found:", !!existingScript);
|
|
3366
3352
|
if (!existingScript) {
|
|
3367
|
-
const
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3353
|
+
const script2 = document.createElement("script");
|
|
3354
|
+
script2.src = `${datacapUrl}/hosted`;
|
|
3355
|
+
script2.async = true;
|
|
3356
|
+
script2.onload = () => {
|
|
3371
3357
|
console.log("\u2705 DataCap script loaded successfully");
|
|
3372
3358
|
scriptLoaded = true;
|
|
3373
3359
|
};
|
|
3374
|
-
|
|
3360
|
+
script2.onerror = (err) => {
|
|
3375
3361
|
console.error("\u274C DataCap script failed to load", err);
|
|
3376
3362
|
};
|
|
3377
|
-
document.head.appendChild(
|
|
3363
|
+
document.head.appendChild(script2);
|
|
3378
3364
|
} else {
|
|
3379
3365
|
scriptLoaded = true;
|
|
3380
3366
|
}
|
|
@@ -3604,7 +3590,6 @@ function GetPaymentPage(props) {
|
|
|
3604
3590
|
const [errorBankConsent, setErrorBankConsent] = useState4("");
|
|
3605
3591
|
const [saveACHConsent1, setSaveACHConsent1] = useState4(false);
|
|
3606
3592
|
const [errorBankConsentOther, setErrorBankConsentOther] = useState4("");
|
|
3607
|
-
const [isTokenizerReady, setTokenizerReady] = useState4(false);
|
|
3608
3593
|
const fractalpayClientKey = props.merchantPublicKey;
|
|
3609
3594
|
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
3610
3595
|
let visa2 = S3Url + "widget/visa-img.svg";
|
|
@@ -4308,7 +4293,7 @@ function GetPaymentPage(props) {
|
|
|
4308
4293
|
}, []);
|
|
4309
4294
|
return /* @__PURE__ */ jsxs11(Fragment11, { children: [
|
|
4310
4295
|
/* @__PURE__ */ jsx19(DataScript, {}),
|
|
4311
|
-
/* @__PURE__ */ jsx19(FractalTokenizerScript, {
|
|
4296
|
+
/* @__PURE__ */ jsx19(FractalTokenizerScript, {}),
|
|
4312
4297
|
/* @__PURE__ */ jsx19(DataCapScriptLoader, {}),
|
|
4313
4298
|
/* @__PURE__ */ jsx19(Chargewidgetstyles, {}),
|
|
4314
4299
|
/* @__PURE__ */ jsx19(CardBankRadioStyles, {}),
|
|
@@ -4513,7 +4498,7 @@ function GetPaymentPage(props) {
|
|
|
4513
4498
|
] }),
|
|
4514
4499
|
/* @__PURE__ */ jsxs11("div", { className: "form-group", children: [
|
|
4515
4500
|
/* @__PURE__ */ jsx19("label", { children: "CARD NUMBER" }),
|
|
4516
|
-
/* @__PURE__ */ jsx19("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 &&
|
|
4501
|
+
/* @__PURE__ */ jsx19("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx19(
|
|
4517
4502
|
FractalFields_default,
|
|
4518
4503
|
{
|
|
4519
4504
|
fractalStyles,
|
|
@@ -4867,7 +4852,6 @@ function PreAuthPayment(_a) {
|
|
|
4867
4852
|
const [activeinCard, setActiveinCard] = useState5("form");
|
|
4868
4853
|
const fractalpayClientKey = props.merchantPublicKey;
|
|
4869
4854
|
const [selectedReader, setSelectedReader] = useState5(void 0);
|
|
4870
|
-
const [isTokenizerReady, setTokenizerReady] = useState5(false);
|
|
4871
4855
|
const tokenizerRef = useRef4(null);
|
|
4872
4856
|
const fractalStyles = {
|
|
4873
4857
|
input: {
|
|
@@ -5404,7 +5388,7 @@ function PreAuthPayment(_a) {
|
|
|
5404
5388
|
}, []);
|
|
5405
5389
|
return /* @__PURE__ */ jsxs12(Fragment12, { children: [
|
|
5406
5390
|
/* @__PURE__ */ jsx20(DataScript, {}),
|
|
5407
|
-
/* @__PURE__ */ jsx20(FractalTokenizerScript, {
|
|
5391
|
+
/* @__PURE__ */ jsx20(FractalTokenizerScript, {}),
|
|
5408
5392
|
/* @__PURE__ */ jsx20(Chargewidgetstyles, {}),
|
|
5409
5393
|
/* @__PURE__ */ jsx20(CardBankRadioStyles, {}),
|
|
5410
5394
|
/* @__PURE__ */ jsx20(DataCapScriptLoader, {}),
|
|
@@ -5560,7 +5544,7 @@ function PreAuthPayment(_a) {
|
|
|
5560
5544
|
] }),
|
|
5561
5545
|
/* @__PURE__ */ jsxs12("div", { className: "form-group", children: [
|
|
5562
5546
|
/* @__PURE__ */ jsx20("label", { children: "CARD NUMBER" }),
|
|
5563
|
-
/* @__PURE__ */ jsx20("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 &&
|
|
5547
|
+
/* @__PURE__ */ jsx20("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx20(
|
|
5564
5548
|
FractalFields_default,
|
|
5565
5549
|
{
|
|
5566
5550
|
fractalStyles,
|
|
@@ -6152,7 +6136,6 @@ function AddCardEasyPay(props) {
|
|
|
6152
6136
|
const exp_year_ref = useRef5(null);
|
|
6153
6137
|
const cvv_ref = useRef5(null);
|
|
6154
6138
|
const name_ref = useRef5(null);
|
|
6155
|
-
const [isTokenizerReady, setTokenizerReady] = useState6(false);
|
|
6156
6139
|
const tokenizerRef = useRef5(null);
|
|
6157
6140
|
const fractalStyles = {
|
|
6158
6141
|
input: {
|
|
@@ -6425,7 +6408,7 @@ function AddCardEasyPay(props) {
|
|
|
6425
6408
|
}, []);
|
|
6426
6409
|
return /* @__PURE__ */ jsxs14(Fragment14, { children: [
|
|
6427
6410
|
/* @__PURE__ */ jsx24(DataScript, {}),
|
|
6428
|
-
/* @__PURE__ */ jsx24(FractalTokenizerScript, {
|
|
6411
|
+
/* @__PURE__ */ jsx24(FractalTokenizerScript, {}),
|
|
6429
6412
|
/* @__PURE__ */ jsx24(DataCapScriptLoader, {}),
|
|
6430
6413
|
/* @__PURE__ */ jsx24(AddCardStyle, {}),
|
|
6431
6414
|
/* @__PURE__ */ jsx24(Loader_default, { loading: loading || loadingIframe }),
|
|
@@ -6455,7 +6438,7 @@ function AddCardEasyPay(props) {
|
|
|
6455
6438
|
/* @__PURE__ */ jsxs14("div", { style: { maxHeight: "350px", minHeight: "0" }, className: "card-scrl", children: [
|
|
6456
6439
|
/* @__PURE__ */ jsxs14("div", { className: "form-group", style: { marginTop: "0", marginBottom: "10px" }, children: [
|
|
6457
6440
|
/* @__PURE__ */ jsx24("label", { htmlFor: "cardNumber", children: "Card Number" }),
|
|
6458
|
-
(paymentData == null ? void 0 : paymentData.paymentGateway) === 32 &&
|
|
6441
|
+
(paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx24(
|
|
6459
6442
|
FractalFields_default,
|
|
6460
6443
|
{
|
|
6461
6444
|
fractalStyles,
|
|
@@ -6809,12 +6792,8 @@ import { Fragment as Fragment15, jsx as jsx26, jsxs as jsxs15 } from "react/jsx-
|
|
|
6809
6792
|
var FractalFieldsAddCardSky = ({ fractalStyles, tokenizerRef, extraInputs }) => {
|
|
6810
6793
|
const instanceRef = useRef6(null);
|
|
6811
6794
|
useEffect11(() => {
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
console.error("Tokenizer not available");
|
|
6815
|
-
return;
|
|
6816
|
-
}
|
|
6817
|
-
const instance = new Tokenizer({
|
|
6795
|
+
if (!window.FractalTokenizer) return;
|
|
6796
|
+
const instance = new window.FractalTokenizer({
|
|
6818
6797
|
styles: fractalStyles
|
|
6819
6798
|
});
|
|
6820
6799
|
instanceRef.current = instance;
|
|
@@ -6914,7 +6893,6 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
|
|
|
6914
6893
|
const [paymentGateway, setPaymentGateway] = useState7();
|
|
6915
6894
|
const [dcToken, setDCToken] = useState7();
|
|
6916
6895
|
const tokenizerRef = useRef7(null);
|
|
6917
|
-
const [isTokenizerReady, setTokenizerReady] = useState7(false);
|
|
6918
6896
|
const fractalStyles = {
|
|
6919
6897
|
input: {
|
|
6920
6898
|
"font-family": "'Inter', sans-serif",
|
|
@@ -7177,7 +7155,7 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
|
|
|
7177
7155
|
}, []);
|
|
7178
7156
|
return /* @__PURE__ */ jsxs16(Fragment16, { children: [
|
|
7179
7157
|
/* @__PURE__ */ jsx27(DataScript, {}),
|
|
7180
|
-
/* @__PURE__ */ jsx27(FractalTokenizerScript, {
|
|
7158
|
+
/* @__PURE__ */ jsx27(FractalTokenizerScript, {}),
|
|
7181
7159
|
/* @__PURE__ */ jsx27(DataCapScriptLoader, {}),
|
|
7182
7160
|
/* @__PURE__ */ jsx27(AddCardSkyStyle, {}),
|
|
7183
7161
|
/* @__PURE__ */ jsx27(Loader_default, { loading: loading || isloading || loadingIframe }),
|
|
@@ -7239,7 +7217,7 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
|
|
|
7239
7217
|
(cardError == null ? void 0 : cardError.lastName) && /* @__PURE__ */ jsx27("small", { className: "error", children: cardError == null ? void 0 : cardError.lastName })
|
|
7240
7218
|
] })
|
|
7241
7219
|
] }),
|
|
7242
|
-
|
|
7220
|
+
/* @__PURE__ */ jsx27(
|
|
7243
7221
|
FractalFieldsAddCardSky_default,
|
|
7244
7222
|
{
|
|
7245
7223
|
fractalStyles,
|
|
@@ -7588,7 +7566,6 @@ function PartialPayment(props) {
|
|
|
7588
7566
|
const [errorBankConsent, setErrorBankConsent] = useState8("");
|
|
7589
7567
|
const [saveACHConsent1, setSaveACHConsent1] = useState8(false);
|
|
7590
7568
|
const [errorBankConsentOther, setErrorBankConsentOther] = useState8("");
|
|
7591
|
-
const [isTokenizerReady, setTokenizerReady] = useState8(false);
|
|
7592
7569
|
const tokenizerRef = useRef8(null);
|
|
7593
7570
|
const fractalStyles = {
|
|
7594
7571
|
input: {
|
|
@@ -8302,7 +8279,7 @@ function PartialPayment(props) {
|
|
|
8302
8279
|
/* @__PURE__ */ jsx28(DataScript, {}),
|
|
8303
8280
|
/* @__PURE__ */ jsx28(Chargewidgetstyles, {}),
|
|
8304
8281
|
/* @__PURE__ */ jsx28(CardBankRadioStyles, {}),
|
|
8305
|
-
/* @__PURE__ */ jsx28(FractalTokenizerScript, {
|
|
8282
|
+
/* @__PURE__ */ jsx28(FractalTokenizerScript, {}),
|
|
8306
8283
|
/* @__PURE__ */ jsx28(DataCapScriptLoader, {}),
|
|
8307
8284
|
/* @__PURE__ */ jsxs17(Fragment17, { children: [
|
|
8308
8285
|
/* @__PURE__ */ jsx28("button", { ref: buttonRef, style: { display: "none" }, className: "paymentBtn", onClick: handleShow, children: "Pay" }),
|
|
@@ -8510,7 +8487,7 @@ function PartialPayment(props) {
|
|
|
8510
8487
|
] }),
|
|
8511
8488
|
/* @__PURE__ */ jsxs17("div", { className: "form-group", children: [
|
|
8512
8489
|
/* @__PURE__ */ jsx28("label", { children: "CARD NUMBER" }),
|
|
8513
|
-
/* @__PURE__ */ jsx28("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 &&
|
|
8490
|
+
/* @__PURE__ */ jsx28("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx28(
|
|
8514
8491
|
FractalFields_default,
|
|
8515
8492
|
{
|
|
8516
8493
|
fractalStyles,
|
|
@@ -8818,7 +8795,7 @@ function PartialPayment(props) {
|
|
|
8818
8795
|
}
|
|
8819
8796
|
|
|
8820
8797
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
8821
|
-
import { useEffect as
|
|
8798
|
+
import { useEffect as useEffect16, useState as useState11, useMemo } from "react";
|
|
8822
8799
|
|
|
8823
8800
|
// src/app/components/Skysystemz/SkyChargewidgetstyles.tsx
|
|
8824
8801
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -9664,7 +9641,7 @@ padding:0px !important;
|
|
|
9664
9641
|
}
|
|
9665
9642
|
|
|
9666
9643
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9667
|
-
import { useCallback, useEffect as
|
|
9644
|
+
import { useCallback, useEffect as useEffect15, useRef as useRef10, useState as useState10 } from "react";
|
|
9668
9645
|
import axios9 from "axios";
|
|
9669
9646
|
import Swal5 from "sweetalert2";
|
|
9670
9647
|
|
|
@@ -9950,385 +9927,56 @@ var ErrorCardOverlay = ({ onClose, error, autoTrigger = false }) => {
|
|
|
9950
9927
|
};
|
|
9951
9928
|
var ErrorCardOverlay_default = ErrorCardOverlay;
|
|
9952
9929
|
|
|
9953
|
-
// src/app/components/Atoms/Googlepay/Googlepay.tsx
|
|
9954
|
-
import { useRef as useRef10 } from "react";
|
|
9955
|
-
|
|
9956
|
-
// src/app/components/Atoms/Googlepay/GooglePayScriptLoader.tsx
|
|
9957
|
-
import { useEffect as useEffect15 } from "react";
|
|
9958
|
-
var googlePayScriptLoaded = false;
|
|
9959
|
-
var GooglePayScriptLoader = ({
|
|
9960
|
-
onLoad
|
|
9961
|
-
}) => {
|
|
9962
|
-
useEffect15(() => {
|
|
9963
|
-
if (googlePayScriptLoaded) {
|
|
9964
|
-
onLoad == null ? void 0 : onLoad();
|
|
9965
|
-
return;
|
|
9966
|
-
}
|
|
9967
|
-
const existingScript = document.querySelector(
|
|
9968
|
-
`script[src="https://pay.google.com/gp/p/js/pay.js"]`
|
|
9969
|
-
);
|
|
9970
|
-
if (!existingScript) {
|
|
9971
|
-
const script = document.createElement("script");
|
|
9972
|
-
script.src = "https://pay.google.com/gp/p/js/pay.js";
|
|
9973
|
-
script.async = true;
|
|
9974
|
-
script.onload = () => {
|
|
9975
|
-
console.log("\u2705 Google Pay script loaded");
|
|
9976
|
-
googlePayScriptLoaded = true;
|
|
9977
|
-
console.log("google:", window.google);
|
|
9978
|
-
onLoad == null ? void 0 : onLoad();
|
|
9979
|
-
};
|
|
9980
|
-
script.onerror = (err) => {
|
|
9981
|
-
console.error("\u274C Google Pay script failed", err);
|
|
9982
|
-
};
|
|
9983
|
-
document.head.appendChild(script);
|
|
9984
|
-
} else {
|
|
9985
|
-
googlePayScriptLoaded = true;
|
|
9986
|
-
onLoad == null ? void 0 : onLoad();
|
|
9987
|
-
}
|
|
9988
|
-
}, []);
|
|
9989
|
-
return null;
|
|
9990
|
-
};
|
|
9991
|
-
|
|
9992
|
-
// src/app/components/Atoms/Googlepay/Googlepay.tsx
|
|
9993
|
-
import { Fragment as Fragment19, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
9994
|
-
function GooglePayComponent({
|
|
9995
|
-
amount,
|
|
9996
|
-
googlePayEnvironment: googlePayEnvironment2,
|
|
9997
|
-
googlePayGatewayMerchantId: googlePayGatewayMerchantId2,
|
|
9998
|
-
googlePayMerchantId: googlePayMerchantId2,
|
|
9999
|
-
googlePayMerchantName,
|
|
10000
|
-
require3ds = false,
|
|
10001
|
-
completeFractalFlow,
|
|
10002
|
-
setLoading
|
|
10003
|
-
}) {
|
|
10004
|
-
const containerRef = useRef10(null);
|
|
10005
|
-
const paymentsClientRef = useRef10(null);
|
|
10006
|
-
const baseRequest = {
|
|
10007
|
-
apiVersion: 2,
|
|
10008
|
-
apiVersionMinor: 0
|
|
10009
|
-
};
|
|
10010
|
-
const allowedCardNetworks = ["AMEX", "DISCOVER", "MASTERCARD", "VISA"];
|
|
10011
|
-
const allowedCardAuthMethods = require3ds ? ["CRYPTOGRAM_3DS"] : ["PAN_ONLY", "CRYPTOGRAM_3DS"];
|
|
10012
|
-
const baseCardPaymentMethod = {
|
|
10013
|
-
type: "CARD",
|
|
10014
|
-
parameters: {
|
|
10015
|
-
allowedAuthMethods: allowedCardAuthMethods,
|
|
10016
|
-
allowedCardNetworks
|
|
10017
|
-
}
|
|
10018
|
-
};
|
|
10019
|
-
const cardPaymentMethod = __spreadProps(__spreadValues({}, baseCardPaymentMethod), {
|
|
10020
|
-
tokenizationSpecification: {
|
|
10021
|
-
type: "PAYMENT_GATEWAY",
|
|
10022
|
-
parameters: {
|
|
10023
|
-
gateway: googlePayGatewayMerchantId2,
|
|
10024
|
-
gatewayMerchantId: googlePayGatewayMerchantId2
|
|
10025
|
-
}
|
|
10026
|
-
}
|
|
10027
|
-
});
|
|
10028
|
-
const handlePaymentAuthorization = async (paymentData) => {
|
|
10029
|
-
var _a, _b;
|
|
10030
|
-
try {
|
|
10031
|
-
const token = (_b = (_a = paymentData == null ? void 0 : paymentData.paymentMethodData) == null ? void 0 : _a.tokenizationData) == null ? void 0 : _b.token;
|
|
10032
|
-
if (!token) throw new Error("Missing token");
|
|
10033
|
-
const parsed = JSON.parse(token);
|
|
10034
|
-
console.log(parsed, "parsed token");
|
|
10035
|
-
setLoading(true);
|
|
10036
|
-
completeFractalFlow(parsed, null, "google_pay");
|
|
10037
|
-
return {
|
|
10038
|
-
transactionState: "SUCCESS"
|
|
10039
|
-
// ✅ CLOSES GOOGLE PAY POPUP
|
|
10040
|
-
};
|
|
10041
|
-
} catch (err) {
|
|
10042
|
-
console.error("Payment failed:", err);
|
|
10043
|
-
return {
|
|
10044
|
-
transactionState: "ERROR",
|
|
10045
|
-
// ❌ CLOSES WITH ERROR UI
|
|
10046
|
-
error: {
|
|
10047
|
-
intent: "PAYMENT_AUTHORIZATION",
|
|
10048
|
-
message: "Payment failed",
|
|
10049
|
-
reason: "PAYMENT_DATA_INVALID"
|
|
10050
|
-
}
|
|
10051
|
-
};
|
|
10052
|
-
}
|
|
10053
|
-
};
|
|
10054
|
-
const getPaymentsClient = () => {
|
|
10055
|
-
if (!paymentsClientRef.current && typeof window !== "undefined") {
|
|
10056
|
-
const google = window.google;
|
|
10057
|
-
if (!google) return null;
|
|
10058
|
-
paymentsClientRef.current = new google.payments.api.PaymentsClient({
|
|
10059
|
-
environment: googlePayEnvironment2,
|
|
10060
|
-
// ✅ ADD THIS
|
|
10061
|
-
paymentDataCallbacks: {
|
|
10062
|
-
onPaymentAuthorized: handlePaymentAuthorization
|
|
10063
|
-
}
|
|
10064
|
-
});
|
|
10065
|
-
}
|
|
10066
|
-
return paymentsClientRef.current;
|
|
10067
|
-
};
|
|
10068
|
-
const getIsReadyToPayRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
|
|
10069
|
-
allowedPaymentMethods: [baseCardPaymentMethod]
|
|
10070
|
-
});
|
|
10071
|
-
const getTransactionInfo = () => ({
|
|
10072
|
-
countryCode: "US",
|
|
10073
|
-
currencyCode: "USD",
|
|
10074
|
-
totalPriceStatus: "FINAL",
|
|
10075
|
-
totalPrice: amount,
|
|
10076
|
-
checkoutOption: "COMPLETE_IMMEDIATE_PURCHASE"
|
|
10077
|
-
});
|
|
10078
|
-
const getPaymentDataRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
|
|
10079
|
-
allowedPaymentMethods: [cardPaymentMethod],
|
|
10080
|
-
transactionInfo: getTransactionInfo(),
|
|
10081
|
-
merchantInfo: {
|
|
10082
|
-
merchantId: googlePayMerchantId2,
|
|
10083
|
-
merchantName: googlePayMerchantName
|
|
10084
|
-
},
|
|
10085
|
-
// ✅ ADD THIS
|
|
10086
|
-
callbackIntents: ["PAYMENT_AUTHORIZATION"]
|
|
10087
|
-
});
|
|
10088
|
-
const initializeGooglePay = async () => {
|
|
10089
|
-
try {
|
|
10090
|
-
const client = getPaymentsClient();
|
|
10091
|
-
if (!client) {
|
|
10092
|
-
console.error("Google Pay client not ready");
|
|
10093
|
-
return;
|
|
10094
|
-
}
|
|
10095
|
-
const response = await client.isReadyToPay(
|
|
10096
|
-
getIsReadyToPayRequest()
|
|
10097
|
-
);
|
|
10098
|
-
if (response.result && containerRef.current) {
|
|
10099
|
-
const button = client.createButton({
|
|
10100
|
-
onClick: onGooglePayClick,
|
|
10101
|
-
allowedPaymentMethods: [baseCardPaymentMethod],
|
|
10102
|
-
buttonType: "pay",
|
|
10103
|
-
buttonColor: "black",
|
|
10104
|
-
buttonRadius: 8
|
|
10105
|
-
});
|
|
10106
|
-
if (containerRef.current) {
|
|
10107
|
-
containerRef.current.innerHTML = "";
|
|
10108
|
-
}
|
|
10109
|
-
containerRef.current.appendChild(button);
|
|
10110
|
-
}
|
|
10111
|
-
} catch (err) {
|
|
10112
|
-
console.error("Google Pay init error:", err);
|
|
10113
|
-
}
|
|
10114
|
-
};
|
|
10115
|
-
const onGooglePayClick = async () => {
|
|
10116
|
-
const client = getPaymentsClient();
|
|
10117
|
-
if (!client) {
|
|
10118
|
-
console.error("Google Pay client not ready");
|
|
10119
|
-
return;
|
|
10120
|
-
}
|
|
10121
|
-
try {
|
|
10122
|
-
await client.loadPaymentData(getPaymentDataRequest());
|
|
10123
|
-
} catch (err) {
|
|
10124
|
-
if ((err == null ? void 0 : err.statusCode) !== "CANCELED") {
|
|
10125
|
-
console.error(err);
|
|
10126
|
-
}
|
|
10127
|
-
}
|
|
10128
|
-
};
|
|
10129
|
-
const onScriptLoad = () => {
|
|
10130
|
-
if (!googlePayEnvironment2 || !googlePayGatewayMerchantId2 || !amount || !googlePayMerchantId2) {
|
|
10131
|
-
console.error("Missing Google Pay config");
|
|
10132
|
-
return;
|
|
10133
|
-
}
|
|
10134
|
-
setTimeout(() => {
|
|
10135
|
-
initializeGooglePay();
|
|
10136
|
-
}, 0);
|
|
10137
|
-
};
|
|
10138
|
-
return /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
10139
|
-
/* @__PURE__ */ jsx34("div", { ref: containerRef, className: "text-center" }),
|
|
10140
|
-
/* @__PURE__ */ jsx34(GooglePayScriptLoader, { onLoad: onScriptLoad })
|
|
10141
|
-
] });
|
|
10142
|
-
}
|
|
10143
|
-
|
|
10144
|
-
// src/app/components/Atoms/Applepay/ApplePayButton.tsx
|
|
10145
|
-
import { useEffect as useEffect17, useRef as useRef11 } from "react";
|
|
10146
|
-
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
10147
|
-
function ApplePayButton({
|
|
10148
|
-
applePayMerchantId: applePayMerchantId2,
|
|
10149
|
-
applePayAmount,
|
|
10150
|
-
applePayMerchantName,
|
|
10151
|
-
showLoader,
|
|
10152
|
-
completeFractalFlow
|
|
10153
|
-
}) {
|
|
10154
|
-
const applePayRef = useRef11(null);
|
|
10155
|
-
const paymentRequestMethods = [
|
|
10156
|
-
{
|
|
10157
|
-
supportedMethods: "https://apple.com/apple-pay",
|
|
10158
|
-
data: {
|
|
10159
|
-
version: 3,
|
|
10160
|
-
merchantIdentifier: applePayMerchantId2,
|
|
10161
|
-
// ✅ FIXED
|
|
10162
|
-
merchantCapabilities: ["supports3DS"],
|
|
10163
|
-
supportedNetworks: ["amex", "discover", "mastercard", "visa"],
|
|
10164
|
-
// ✅ FIXED
|
|
10165
|
-
countryCode: "US"
|
|
10166
|
-
}
|
|
10167
|
-
}
|
|
10168
|
-
];
|
|
10169
|
-
const paymentRequestOptions = {
|
|
10170
|
-
requestPayerName: false,
|
|
10171
|
-
requestPayerEmail: false,
|
|
10172
|
-
requestPayerPhone: false,
|
|
10173
|
-
requestShipping: false
|
|
10174
|
-
};
|
|
10175
|
-
function buildPaymentDetails() {
|
|
10176
|
-
return {
|
|
10177
|
-
total: {
|
|
10178
|
-
label: applePayMerchantName,
|
|
10179
|
-
amount: {
|
|
10180
|
-
currency: "USD",
|
|
10181
|
-
value: applePayAmount
|
|
10182
|
-
}
|
|
10183
|
-
}
|
|
10184
|
-
};
|
|
10185
|
-
}
|
|
10186
|
-
async function validateMerchant(event) {
|
|
10187
|
-
var _a;
|
|
10188
|
-
console.log("\u{1F7E1} STEP 1: Merchant validation started");
|
|
10189
|
-
try {
|
|
10190
|
-
console.log("Validation URL:", event.validationURL);
|
|
10191
|
-
console.log("Domain:", window.location.hostname);
|
|
10192
|
-
const res = await fetch(
|
|
10193
|
-
`${masterBaseUrl}api/v1/widget/generate-apple-pay-session`,
|
|
10194
|
-
{
|
|
10195
|
-
method: "POST",
|
|
10196
|
-
headers: {
|
|
10197
|
-
"Content-Type": "application/json"
|
|
10198
|
-
},
|
|
10199
|
-
body: JSON.stringify({
|
|
10200
|
-
validationUrl: event.validationURL,
|
|
10201
|
-
applePayMerchantId: applePayMerchantId2,
|
|
10202
|
-
applepayDisplayName: applePayMerchantName,
|
|
10203
|
-
requestDomain: window.location.hostname
|
|
10204
|
-
// ✅ IMPORTANT
|
|
10205
|
-
})
|
|
10206
|
-
}
|
|
10207
|
-
);
|
|
10208
|
-
console.log("\u{1F7E1} STEP 2: Response status:", res.status);
|
|
10209
|
-
const data = await res.json();
|
|
10210
|
-
console.log("RAW session response:", JSON.stringify(data));
|
|
10211
|
-
console.log("\u{1F7E2} STEP 3: Session response: data fetched");
|
|
10212
|
-
const merchantSession = (_a = data == null ? void 0 : data.data) != null ? _a : data;
|
|
10213
|
-
if (!merchantSession || typeof merchantSession !== "object") {
|
|
10214
|
-
console.error("\u274C Bad session shape");
|
|
10215
|
-
event.complete(null);
|
|
10216
|
-
return;
|
|
10217
|
-
}
|
|
10218
|
-
console.log("\u{1F7E2} STEP 4.1: Completing merchant validation");
|
|
10219
|
-
event.complete(merchantSession);
|
|
10220
|
-
console.log("\u{1F7E2} STEP 4.2: Completed merchant validation");
|
|
10221
|
-
} catch (err) {
|
|
10222
|
-
console.log("\u274C Merchant validation failed:", err == null ? void 0 : err.message);
|
|
10223
|
-
event.complete(null);
|
|
10224
|
-
}
|
|
10225
|
-
}
|
|
10226
|
-
async function authorizePayment(paymentResponse) {
|
|
10227
|
-
console.log("\u{1F7E1} STEP 5: Authorizing payment");
|
|
10228
|
-
try {
|
|
10229
|
-
const token = paymentResponse.details.token.paymentData;
|
|
10230
|
-
console.log("\u{1F7E2} STEP 6: Got token");
|
|
10231
|
-
await completeFractalFlow(token, null, "apple_pay");
|
|
10232
|
-
await paymentResponse.complete("success");
|
|
10233
|
-
console.log("\u2705 Payment completed successfully");
|
|
10234
|
-
} catch (err) {
|
|
10235
|
-
console.log("\u274C Authorization failed:", err == null ? void 0 : err.message);
|
|
10236
|
-
await paymentResponse.complete("fail");
|
|
10237
|
-
}
|
|
10238
|
-
}
|
|
10239
|
-
async function handleApplePayClick() {
|
|
10240
|
-
console.log("\u{1F7E1} STEP A: Click detected");
|
|
10241
|
-
try {
|
|
10242
|
-
const request = new PaymentRequest(
|
|
10243
|
-
paymentRequestMethods,
|
|
10244
|
-
buildPaymentDetails(),
|
|
10245
|
-
paymentRequestOptions
|
|
10246
|
-
);
|
|
10247
|
-
request.onmerchantvalidation = validateMerchant;
|
|
10248
|
-
console.log("\u{1F7E1} STEP B: Calling show()");
|
|
10249
|
-
const response = await request.show();
|
|
10250
|
-
console.log("\u{1F7E2} STEP C: Payment sheet opened");
|
|
10251
|
-
await authorizePayment(response);
|
|
10252
|
-
} catch (err) {
|
|
10253
|
-
console.log("\u274C Apple Pay flow failed:", err == null ? void 0 : err.message);
|
|
10254
|
-
}
|
|
10255
|
-
}
|
|
10256
|
-
useEffect17(() => {
|
|
10257
|
-
if (window.ApplePaySession && window.ApplePaySession.canMakePayments()) {
|
|
10258
|
-
console.log("\u2705 Apple Pay is available");
|
|
10259
|
-
} else {
|
|
10260
|
-
console.log("\u274C Apple Pay NOT available");
|
|
10261
|
-
}
|
|
10262
|
-
}, []);
|
|
10263
|
-
useEffect17(() => {
|
|
10264
|
-
const btn = applePayRef.current;
|
|
10265
|
-
if (!btn) return;
|
|
10266
|
-
const handleClick = () => handleApplePayClick();
|
|
10267
|
-
btn.addEventListener("click", handleClick);
|
|
10268
|
-
return () => btn.removeEventListener("click", handleClick);
|
|
10269
|
-
}, [applePayMerchantId2, applePayAmount, applePayMerchantName]);
|
|
10270
|
-
return /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
|
|
10271
|
-
"apple-pay-button",
|
|
10272
|
-
{
|
|
10273
|
-
ref: applePayRef,
|
|
10274
|
-
buttonstyle: "black",
|
|
10275
|
-
type: "pay",
|
|
10276
|
-
locale: "en-US",
|
|
10277
|
-
style: { width: "100%" }
|
|
10278
|
-
}
|
|
10279
|
-
) });
|
|
10280
|
-
}
|
|
10281
|
-
|
|
10282
9930
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
10283
|
-
import { Fragment as
|
|
10284
|
-
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
|
|
9931
|
+
import { Fragment as Fragment19, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
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 }) => {
|
|
10285
9933
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
10286
|
-
const hasRunRef =
|
|
10287
|
-
const cardFormRef =
|
|
10288
|
-
const bankFormRef =
|
|
10289
|
-
const expiryYearRef =
|
|
10290
|
-
const expiryMonthRef =
|
|
10291
|
-
const cardListRunRef =
|
|
10292
|
-
const threeDSContainerRef =
|
|
10293
|
-
const [activetab, setActive] =
|
|
10294
|
-
const [activeList, setActiveList] =
|
|
10295
|
-
const [cardData, setCardData] =
|
|
10296
|
-
const [cardError, setCardError] =
|
|
10297
|
-
const [achData, setAchData] =
|
|
10298
|
-
const [achError, setAchError] =
|
|
10299
|
-
const [saveACHinfo, setSaveACHinfo] =
|
|
10300
|
-
const [saveACHConsent1, setSaveACHConsent1] =
|
|
10301
|
-
const [saveCardInfo, setSaveCardInfo] =
|
|
10302
|
-
const [error, setError] =
|
|
10303
|
-
const [errorIframe, setErrorIframe] =
|
|
10304
|
-
const [success, setSuccess] =
|
|
10305
|
-
let [tranId, setTranId] =
|
|
10306
|
-
const [loading, setLoading] =
|
|
10307
|
-
const [loading2, setLoading2] =
|
|
10308
|
-
const [loadingIframe, setLoadingIframe] =
|
|
10309
|
-
const [cardList, setCardList] =
|
|
10310
|
-
const [bankList, setBankList] =
|
|
10311
|
-
const [selectedCard, setSelectedCard] =
|
|
10312
|
-
const [cashDiscount, setCashDiscount] =
|
|
10313
|
-
const [activeinCard, setActiveinCard] =
|
|
10314
|
-
const [activeinBank, setActiveinBank] =
|
|
10315
|
-
const [isBankActive, setIsBankActive] =
|
|
10316
|
-
const [processingFee, setProcessingFee] =
|
|
10317
|
-
const [clientSecret, setClientSecret] =
|
|
10318
|
-
const [errorMessage, setErrorMessage] =
|
|
10319
|
-
const [initialLoader, setInitialLoader] =
|
|
10320
|
-
const [is3DSEnable, setIs3DSEnable] =
|
|
10321
|
-
const [stripeResponse, setStripeResponse] =
|
|
10322
|
-
const [orderLoader, setOrderLoader] =
|
|
10323
|
-
const [orderGuid, setOrderGuid] =
|
|
10324
|
-
const [partialAmount, setPartialAmount] =
|
|
10325
|
-
const [partialError, setPartialError] =
|
|
10326
|
-
const [remainingAmount, setRemainingAmount] =
|
|
10327
|
-
const [paymentGateway, setPaymentGateway] =
|
|
10328
|
-
const [dcToken, setDCToken] =
|
|
10329
|
-
const [isBankConsentChecked, setIsBankConsentChecked] =
|
|
10330
|
-
const [errorBankConsent, setErrorBankConsent] =
|
|
10331
|
-
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("");
|
|
10332
9980
|
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
10333
9981
|
let visa2 = S3Url + "widget/visa-img.svg";
|
|
10334
9982
|
let americanexp2 = S3Url + "widget/ae-img.svg";
|
|
@@ -10356,7 +10004,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10356
10004
|
const bankFeeAmount = Number(bankSurcharge || 0);
|
|
10357
10005
|
const bankSavingsAmount = Math.max(bankFeeAmount > 0 ? cardFeeAmount - bankFeeAmount : cardFeeAmount, 0);
|
|
10358
10006
|
const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
|
|
10359
|
-
const tokenizerRef =
|
|
10007
|
+
const tokenizerRef = useRef10(null);
|
|
10360
10008
|
const fractalStyles = {
|
|
10361
10009
|
input: {
|
|
10362
10010
|
"font-family": "'Inter', sans-serif",
|
|
@@ -10429,7 +10077,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10429
10077
|
let dataObj = __spreadValues({
|
|
10430
10078
|
Token: data == null ? void 0 : data.Token,
|
|
10431
10079
|
amount,
|
|
10432
|
-
postal_code: data == null ? void 0 : data.postalCode
|
|
10080
|
+
postal_code: data == null ? void 0 : data.postalCode,
|
|
10081
|
+
require3ds
|
|
10433
10082
|
}, saveCardInfo ? {
|
|
10434
10083
|
card: {
|
|
10435
10084
|
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
@@ -11221,13 +10870,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11221
10870
|
setOrderLoader(false);
|
|
11222
10871
|
}
|
|
11223
10872
|
};
|
|
11224
|
-
|
|
10873
|
+
useEffect15(() => {
|
|
11225
10874
|
if (!show && !autoTrigger) {
|
|
11226
10875
|
hasRunRef.current = false;
|
|
11227
10876
|
cardListRunRef.current = false;
|
|
11228
10877
|
}
|
|
11229
10878
|
}, [show, autoTrigger]);
|
|
11230
|
-
|
|
10879
|
+
useEffect15(() => {
|
|
11231
10880
|
if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
|
|
11232
10881
|
getPaymentDetails();
|
|
11233
10882
|
if (isPartial && !partialRef) {
|
|
@@ -11235,7 +10884,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11235
10884
|
}
|
|
11236
10885
|
}
|
|
11237
10886
|
}, [show, autoTrigger, isPartial, onLoad]);
|
|
11238
|
-
|
|
10887
|
+
useEffect15(() => {
|
|
11239
10888
|
if ((show || autoTrigger) && pass_fee_amount) {
|
|
11240
10889
|
let cashdisc = Number(amount) - Number(pass_fee_amount);
|
|
11241
10890
|
if (cashdisc && !isNaN(cashdisc)) {
|
|
@@ -11297,7 +10946,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11297
10946
|
console.error("3DS Auth failed \u274C", status);
|
|
11298
10947
|
setError(`3DS Authentication ${status}`);
|
|
11299
10948
|
};
|
|
11300
|
-
|
|
10949
|
+
useEffect15(() => {
|
|
11301
10950
|
if (setHandleCloseRef) {
|
|
11302
10951
|
setHandleCloseRef(() => handleClose);
|
|
11303
10952
|
}
|
|
@@ -11315,18 +10964,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11315
10964
|
setPartialError("");
|
|
11316
10965
|
}
|
|
11317
10966
|
};
|
|
11318
|
-
|
|
10967
|
+
useEffect15(() => {
|
|
11319
10968
|
if (typeof FractalTokenizer === "undefined") return;
|
|
11320
10969
|
const tokenizer = new FractalTokenizer({
|
|
11321
10970
|
styles: {}
|
|
11322
10971
|
});
|
|
11323
10972
|
}, []);
|
|
11324
|
-
const stateRef =
|
|
10973
|
+
const stateRef = useRef10({
|
|
11325
10974
|
activeinBank,
|
|
11326
10975
|
activeinCard,
|
|
11327
10976
|
activetab
|
|
11328
10977
|
});
|
|
11329
|
-
|
|
10978
|
+
useEffect15(() => {
|
|
11330
10979
|
stateRef.current = {
|
|
11331
10980
|
activeinBank,
|
|
11332
10981
|
activeinCard,
|
|
@@ -11350,7 +10999,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11350
10999
|
}
|
|
11351
11000
|
}
|
|
11352
11001
|
}, []);
|
|
11353
|
-
|
|
11002
|
+
useEffect15(() => {
|
|
11354
11003
|
onSubmit == null ? void 0 : onSubmit(submit);
|
|
11355
11004
|
}, [onSubmit, submit]);
|
|
11356
11005
|
function detectCardType(cardinput) {
|
|
@@ -11376,34 +11025,34 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11376
11025
|
const cardType = detectCardType(cardInput);
|
|
11377
11026
|
switch (cardType) {
|
|
11378
11027
|
case "visa":
|
|
11379
|
-
return /* @__PURE__ */
|
|
11028
|
+
return /* @__PURE__ */ jsx34("img", { src: visa2, alt: "visa", width: 33 });
|
|
11380
11029
|
case "mastercard":
|
|
11381
|
-
return /* @__PURE__ */
|
|
11030
|
+
return /* @__PURE__ */ jsx34("img", { src: mastercard2, width: 33, alt: "mastercard" });
|
|
11382
11031
|
case "amex":
|
|
11383
|
-
return /* @__PURE__ */
|
|
11032
|
+
return /* @__PURE__ */ jsx34("img", { src: americanexp2, alt: "amex", width: 33 });
|
|
11384
11033
|
case "discover":
|
|
11385
|
-
return /* @__PURE__ */
|
|
11034
|
+
return /* @__PURE__ */ jsx34("img", { src: discover2, width: 33, alt: "discover" });
|
|
11386
11035
|
case "diners":
|
|
11387
|
-
return /* @__PURE__ */
|
|
11036
|
+
return /* @__PURE__ */ jsx34("img", { src: dinersicon, alt: "Diners Club" });
|
|
11388
11037
|
case "jcb":
|
|
11389
|
-
return /* @__PURE__ */
|
|
11038
|
+
return /* @__PURE__ */ jsx34("img", { src: jcbicon, alt: "JCB" });
|
|
11390
11039
|
case "unionpay":
|
|
11391
|
-
return /* @__PURE__ */
|
|
11040
|
+
return /* @__PURE__ */ jsx34("img", { src: unionicon, alt: "UnionPay" });
|
|
11392
11041
|
default:
|
|
11393
|
-
return /* @__PURE__ */
|
|
11042
|
+
return /* @__PURE__ */ jsx34("img", { src: defualtcardborder, alt: "card" });
|
|
11394
11043
|
}
|
|
11395
11044
|
}
|
|
11396
|
-
return /* @__PURE__ */
|
|
11397
|
-
(initialLoader || !onLoad) && /* @__PURE__ */
|
|
11398
|
-
error && /* @__PURE__ */
|
|
11399
|
-
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: () => {
|
|
11400
11049
|
setErrorIframe("");
|
|
11401
11050
|
}, autoTrigger: onSubmit ? !onSubmit : autoTrigger }) }),
|
|
11402
|
-
/* @__PURE__ */
|
|
11403
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */
|
|
11404
|
-
/* @__PURE__ */
|
|
11405
|
-
/* @__PURE__ */
|
|
11406
|
-
(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(
|
|
11407
11056
|
ThreeDSChallenge,
|
|
11408
11057
|
{
|
|
11409
11058
|
containerRef: threeDSContainerRef,
|
|
@@ -11413,33 +11062,33 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11413
11062
|
onSuccess: handleSuccess,
|
|
11414
11063
|
onError: handleError
|
|
11415
11064
|
}
|
|
11416
|
-
) : /* @__PURE__ */
|
|
11417
|
-
/* @__PURE__ */
|
|
11418
|
-
/* @__PURE__ */
|
|
11419
|
-
/* @__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" }) }) })
|
|
11420
11069
|
] }) }),
|
|
11421
|
-
/* @__PURE__ */
|
|
11422
|
-
/* @__PURE__ */
|
|
11423
|
-
!onSubmit && /* @__PURE__ */
|
|
11424
|
-
/* @__PURE__ */
|
|
11425
|
-
/* @__PURE__ */
|
|
11426
|
-
/* @__PURE__ */
|
|
11427
|
-
/* @__PURE__ */
|
|
11428
|
-
(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: [
|
|
11429
11078
|
" ",
|
|
11430
|
-
/* @__PURE__ */
|
|
11079
|
+
/* @__PURE__ */ jsx34(IoArrowBack4, {}),
|
|
11431
11080
|
" Back"
|
|
11432
11081
|
] })
|
|
11433
11082
|
] }),
|
|
11434
|
-
/* @__PURE__ */
|
|
11435
|
-
/* @__PURE__ */
|
|
11436
|
-
/* @__PURE__ */
|
|
11437
|
-
/* @__PURE__ */
|
|
11438
|
-
!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 })
|
|
11439
11088
|
] }),
|
|
11440
|
-
isPartial && /* @__PURE__ */
|
|
11441
|
-
/* @__PURE__ */
|
|
11442
|
-
/* @__PURE__ */
|
|
11089
|
+
isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
|
|
11090
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11091
|
+
/* @__PURE__ */ jsx34(
|
|
11443
11092
|
NumericFormat2,
|
|
11444
11093
|
{
|
|
11445
11094
|
prefix: "$",
|
|
@@ -11463,25 +11112,25 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11463
11112
|
}
|
|
11464
11113
|
}
|
|
11465
11114
|
),
|
|
11466
|
-
partialError && /* @__PURE__ */
|
|
11115
|
+
partialError && /* @__PURE__ */ jsx34("span", { className: "error-span", children: partialError })
|
|
11467
11116
|
] })
|
|
11468
11117
|
] }) })
|
|
11469
11118
|
] }),
|
|
11470
|
-
/* @__PURE__ */
|
|
11471
|
-
/* @__PURE__ */
|
|
11472
|
-
/* @__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: "" }),
|
|
11473
11122
|
"Secure payments powered by Fractal"
|
|
11474
11123
|
] })
|
|
11475
11124
|
] }),
|
|
11476
|
-
/* @__PURE__ */
|
|
11477
|
-
onSubmit && /* @__PURE__ */
|
|
11478
|
-
/* @__PURE__ */
|
|
11479
|
-
/* @__PURE__ */
|
|
11480
|
-
!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 })
|
|
11481
11130
|
] }),
|
|
11482
|
-
isPartial && /* @__PURE__ */
|
|
11483
|
-
/* @__PURE__ */
|
|
11484
|
-
/* @__PURE__ */
|
|
11131
|
+
isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
|
|
11132
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11133
|
+
/* @__PURE__ */ jsx34(
|
|
11485
11134
|
NumericFormat2,
|
|
11486
11135
|
{
|
|
11487
11136
|
prefix: "$",
|
|
@@ -11498,77 +11147,53 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11498
11147
|
fixedDecimalScale: true
|
|
11499
11148
|
}
|
|
11500
11149
|
),
|
|
11501
|
-
partialError && /* @__PURE__ */
|
|
11150
|
+
partialError && /* @__PURE__ */ jsx34("span", { className: "error-span", children: partialError })
|
|
11502
11151
|
] })
|
|
11503
11152
|
] }) }),
|
|
11504
|
-
is3DSEnable ? clientSecret && /* @__PURE__ */
|
|
11505
|
-
/* @__PURE__ */
|
|
11506
|
-
!onSubmit && /* @__PURE__ */
|
|
11507
|
-
/* @__PURE__ */
|
|
11508
|
-
/* @__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: [
|
|
11509
11158
|
" ",
|
|
11510
|
-
/* @__PURE__ */
|
|
11159
|
+
/* @__PURE__ */ jsx34(IoArrowBack4, {})
|
|
11511
11160
|
] }) }),
|
|
11512
|
-
/* @__PURE__ */
|
|
11161
|
+
/* @__PURE__ */ jsx34("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
11513
11162
|
] }),
|
|
11514
|
-
/* @__PURE__ */
|
|
11515
|
-
/* @__PURE__ */
|
|
11516
|
-
/* @__PURE__ */
|
|
11517
|
-
/* @__PURE__ */
|
|
11518
|
-
/* @__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: "" })
|
|
11519
11168
|
] })
|
|
11520
11169
|
] }),
|
|
11521
|
-
activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */
|
|
11522
|
-
/* @__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: () => {
|
|
11523
11172
|
setActiveinCard("form");
|
|
11524
11173
|
} }),
|
|
11525
|
-
/* @__PURE__ */
|
|
11526
|
-
] }) : paymentGateway == 32 ? /* @__PURE__ */
|
|
11527
|
-
onSubmit && /* @__PURE__ */
|
|
11528
|
-
|
|
11529
|
-
ApplePayButton,
|
|
11530
|
-
{
|
|
11531
|
-
applePayAmount: partialAmount ? partialAmount : amount,
|
|
11532
|
-
applePayMerchantId,
|
|
11533
|
-
applePayMerchantName: merchantName,
|
|
11534
|
-
completeFractalFlow,
|
|
11535
|
-
showLoader
|
|
11536
|
-
}
|
|
11537
|
-
),
|
|
11538
|
-
/* @__PURE__ */ jsx36(
|
|
11539
|
-
GooglePayComponent,
|
|
11540
|
-
{
|
|
11541
|
-
amount: partialAmount ? partialAmount : amount,
|
|
11542
|
-
googlePayEnvironment,
|
|
11543
|
-
googlePayGatewayMerchantId,
|
|
11544
|
-
googlePayMerchantId,
|
|
11545
|
-
googlePayMerchantName: merchantName,
|
|
11546
|
-
completeFractalFlow,
|
|
11547
|
-
setLoading
|
|
11548
|
-
}
|
|
11549
|
-
),
|
|
11550
|
-
/* @__PURE__ */ jsx36("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx36("span", { children: "or" }) })
|
|
11551
|
-
] }),
|
|
11552
|
-
/* @__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) => {
|
|
11553
11178
|
if (e.key === "Enter" && loading) {
|
|
11554
11179
|
e.preventDefault();
|
|
11555
11180
|
e.stopPropagation();
|
|
11556
11181
|
}
|
|
11557
11182
|
}, children: [
|
|
11558
|
-
/* @__PURE__ */
|
|
11559
|
-
/* @__PURE__ */
|
|
11560
|
-
/* @__PURE__ */
|
|
11561
|
-
/* @__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) => {
|
|
11562
11187
|
const value = e.target.value;
|
|
11563
11188
|
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11564
11189
|
handleCardChange("cardName", value);
|
|
11565
11190
|
}
|
|
11566
11191
|
} }),
|
|
11567
|
-
(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 })
|
|
11568
11193
|
] }),
|
|
11569
|
-
/* @__PURE__ */
|
|
11570
|
-
/* @__PURE__ */
|
|
11571
|
-
/* @__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(
|
|
11572
11197
|
FractalFields_default,
|
|
11573
11198
|
{
|
|
11574
11199
|
fractalStyles,
|
|
@@ -11577,18 +11202,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11577
11202
|
}
|
|
11578
11203
|
) })
|
|
11579
11204
|
] }),
|
|
11580
|
-
/* @__PURE__ */
|
|
11581
|
-
/* @__PURE__ */
|
|
11582
|
-
/* @__PURE__ */
|
|
11583
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */
|
|
11584
|
-
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: [
|
|
11585
11210
|
"Cards include a fee amount of ",
|
|
11586
|
-
/* @__PURE__ */
|
|
11211
|
+
/* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11587
11212
|
"."
|
|
11588
11213
|
] })
|
|
11589
11214
|
] }),
|
|
11590
|
-
customerId && /* @__PURE__ */
|
|
11591
|
-
/* @__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(
|
|
11592
11217
|
"input",
|
|
11593
11218
|
{
|
|
11594
11219
|
type: "checkbox",
|
|
@@ -11598,10 +11223,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11598
11223
|
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11599
11224
|
}
|
|
11600
11225
|
),
|
|
11601
|
-
/* @__PURE__ */
|
|
11602
|
-
/* @__PURE__ */
|
|
11603
|
-
/* @__PURE__ */
|
|
11604
|
-
/* @__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(
|
|
11605
11230
|
"svg",
|
|
11606
11231
|
{
|
|
11607
11232
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11610,8 +11235,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11610
11235
|
viewBox: "0 0 20 20",
|
|
11611
11236
|
fill: "none",
|
|
11612
11237
|
children: [
|
|
11613
|
-
/* @__PURE__ */
|
|
11614
|
-
/* @__PURE__ */
|
|
11238
|
+
/* @__PURE__ */ jsx34("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11239
|
+
/* @__PURE__ */ jsx34(
|
|
11615
11240
|
"path",
|
|
11616
11241
|
{
|
|
11617
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",
|
|
@@ -11621,34 +11246,34 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11621
11246
|
]
|
|
11622
11247
|
}
|
|
11623
11248
|
) }),
|
|
11624
|
-
/* @__PURE__ */
|
|
11249
|
+
/* @__PURE__ */ jsx34("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
|
|
11625
11250
|
"If checked, I agree to give the ",
|
|
11626
|
-
/* @__PURE__ */
|
|
11251
|
+
/* @__PURE__ */ jsx34("b", { children: merchantName || "merchant" }),
|
|
11627
11252
|
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11628
11253
|
] }) })
|
|
11629
11254
|
] })
|
|
11630
11255
|
] }) })
|
|
11631
11256
|
] }),
|
|
11632
|
-
/* @__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)) }) })
|
|
11633
11258
|
] })
|
|
11634
|
-
] }) : /* @__PURE__ */
|
|
11259
|
+
] }) : /* @__PURE__ */ jsxs20("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11635
11260
|
if (e.key === "Enter" && loading) {
|
|
11636
11261
|
e.preventDefault();
|
|
11637
11262
|
e.stopPropagation();
|
|
11638
11263
|
}
|
|
11639
11264
|
}, children: [
|
|
11640
|
-
/* @__PURE__ */
|
|
11641
|
-
/* @__PURE__ */
|
|
11642
|
-
/* @__PURE__ */
|
|
11643
|
-
/* @__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) => {
|
|
11644
11269
|
const value = e.target.value;
|
|
11645
11270
|
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11646
11271
|
handleCardChange("cardName", value);
|
|
11647
11272
|
}
|
|
11648
11273
|
} }),
|
|
11649
|
-
(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 })
|
|
11650
11275
|
] }),
|
|
11651
|
-
/* @__PURE__ */
|
|
11276
|
+
/* @__PURE__ */ jsx34("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx34(
|
|
11652
11277
|
DataCapFields,
|
|
11653
11278
|
{
|
|
11654
11279
|
isOpen: show || autoTrigger,
|
|
@@ -11658,18 +11283,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11658
11283
|
customCSS: customCSS2
|
|
11659
11284
|
}
|
|
11660
11285
|
) }),
|
|
11661
|
-
/* @__PURE__ */
|
|
11662
|
-
/* @__PURE__ */
|
|
11663
|
-
/* @__PURE__ */
|
|
11664
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */
|
|
11665
|
-
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: [
|
|
11666
11291
|
"Cards include a fee amount of ",
|
|
11667
|
-
/* @__PURE__ */
|
|
11292
|
+
/* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11668
11293
|
"."
|
|
11669
11294
|
] })
|
|
11670
11295
|
] }),
|
|
11671
|
-
customerId && /* @__PURE__ */
|
|
11672
|
-
/* @__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(
|
|
11673
11298
|
"input",
|
|
11674
11299
|
{
|
|
11675
11300
|
type: "checkbox",
|
|
@@ -11679,10 +11304,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11679
11304
|
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11680
11305
|
}
|
|
11681
11306
|
),
|
|
11682
|
-
/* @__PURE__ */
|
|
11683
|
-
/* @__PURE__ */
|
|
11684
|
-
/* @__PURE__ */
|
|
11685
|
-
/* @__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(
|
|
11686
11311
|
"svg",
|
|
11687
11312
|
{
|
|
11688
11313
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11691,8 +11316,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11691
11316
|
viewBox: "0 0 20 20",
|
|
11692
11317
|
fill: "none",
|
|
11693
11318
|
children: [
|
|
11694
|
-
/* @__PURE__ */
|
|
11695
|
-
/* @__PURE__ */
|
|
11319
|
+
/* @__PURE__ */ jsx34("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11320
|
+
/* @__PURE__ */ jsx34(
|
|
11696
11321
|
"path",
|
|
11697
11322
|
{
|
|
11698
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",
|
|
@@ -11702,48 +11327,48 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11702
11327
|
]
|
|
11703
11328
|
}
|
|
11704
11329
|
) }),
|
|
11705
|
-
/* @__PURE__ */
|
|
11330
|
+
/* @__PURE__ */ jsx34("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
|
|
11706
11331
|
"If checked, I agree to give the ",
|
|
11707
|
-
/* @__PURE__ */
|
|
11332
|
+
/* @__PURE__ */ jsx34("b", { children: merchantName || "merchant" }),
|
|
11708
11333
|
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11709
11334
|
] }) })
|
|
11710
11335
|
] })
|
|
11711
11336
|
] }) })
|
|
11712
11337
|
] }),
|
|
11713
|
-
/* @__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)) }) })
|
|
11714
11339
|
] })
|
|
11715
11340
|
] }),
|
|
11716
|
-
/* @__PURE__ */
|
|
11717
|
-
!onSubmit && /* @__PURE__ */
|
|
11718
|
-
/* @__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: [
|
|
11719
11344
|
" ",
|
|
11720
|
-
/* @__PURE__ */
|
|
11345
|
+
/* @__PURE__ */ jsx34(IoArrowBack4, {})
|
|
11721
11346
|
] }) }),
|
|
11722
|
-
/* @__PURE__ */
|
|
11347
|
+
/* @__PURE__ */ jsx34("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
|
|
11723
11348
|
] }),
|
|
11724
|
-
activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */
|
|
11725
|
-
/* @__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: () => {
|
|
11726
11351
|
setActiveinBank("form");
|
|
11727
11352
|
} }),
|
|
11728
|
-
/* @__PURE__ */
|
|
11729
|
-
] }) : /* @__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) => {
|
|
11730
11355
|
if (e.key === "Enter" && loading) {
|
|
11731
11356
|
e.preventDefault();
|
|
11732
11357
|
e.stopPropagation();
|
|
11733
11358
|
}
|
|
11734
11359
|
}, children: [
|
|
11735
|
-
/* @__PURE__ */
|
|
11360
|
+
/* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: {
|
|
11736
11361
|
minHeight: "444px",
|
|
11737
11362
|
maxHeight: "444px"
|
|
11738
11363
|
}, children: [
|
|
11739
|
-
/* @__PURE__ */
|
|
11740
|
-
/* @__PURE__ */
|
|
11741
|
-
/* @__PURE__ */
|
|
11742
|
-
(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 })
|
|
11743
11368
|
] }),
|
|
11744
|
-
/* @__PURE__ */
|
|
11745
|
-
/* @__PURE__ */
|
|
11746
|
-
/* @__PURE__ */
|
|
11369
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11370
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "routingnumber", children: "Routing number" }),
|
|
11371
|
+
/* @__PURE__ */ jsx34(
|
|
11747
11372
|
"input",
|
|
11748
11373
|
{
|
|
11749
11374
|
type: "text",
|
|
@@ -11756,11 +11381,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11756
11381
|
onChange: handleChangeAch
|
|
11757
11382
|
}
|
|
11758
11383
|
),
|
|
11759
|
-
(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 })
|
|
11760
11385
|
] }),
|
|
11761
|
-
/* @__PURE__ */
|
|
11762
|
-
/* @__PURE__ */
|
|
11763
|
-
/* @__PURE__ */
|
|
11386
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11387
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "accountnumber", children: "Account number" }),
|
|
11388
|
+
/* @__PURE__ */ jsx34(
|
|
11764
11389
|
"input",
|
|
11765
11390
|
{
|
|
11766
11391
|
type: "text",
|
|
@@ -11773,11 +11398,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11773
11398
|
onChange: handleChangeAch
|
|
11774
11399
|
}
|
|
11775
11400
|
),
|
|
11776
|
-
(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 })
|
|
11777
11402
|
] }),
|
|
11778
|
-
/* @__PURE__ */
|
|
11779
|
-
/* @__PURE__ */
|
|
11780
|
-
/* @__PURE__ */
|
|
11403
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11404
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
|
|
11405
|
+
/* @__PURE__ */ jsx34(
|
|
11781
11406
|
"input",
|
|
11782
11407
|
{
|
|
11783
11408
|
type: "text",
|
|
@@ -11790,11 +11415,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11790
11415
|
onChange: handleChangeAch
|
|
11791
11416
|
}
|
|
11792
11417
|
),
|
|
11793
|
-
(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 })
|
|
11794
11419
|
] }),
|
|
11795
|
-
/* @__PURE__ */
|
|
11796
|
-
/* @__PURE__ */
|
|
11797
|
-
/* @__PURE__ */
|
|
11420
|
+
/* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
|
|
11421
|
+
/* @__PURE__ */ jsx34("label", { htmlFor: "bankname", children: "Bank name" }),
|
|
11422
|
+
/* @__PURE__ */ jsx34(
|
|
11798
11423
|
"input",
|
|
11799
11424
|
{
|
|
11800
11425
|
type: "text",
|
|
@@ -11807,11 +11432,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11807
11432
|
onChange: handleChangeAch
|
|
11808
11433
|
}
|
|
11809
11434
|
),
|
|
11810
|
-
(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 })
|
|
11811
11436
|
] }),
|
|
11812
|
-
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */
|
|
11813
|
-
/* @__PURE__ */
|
|
11814
|
-
/* @__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(
|
|
11815
11440
|
"input",
|
|
11816
11441
|
{
|
|
11817
11442
|
type: "text",
|
|
@@ -11824,60 +11449,60 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11824
11449
|
onChange: handleChangeAch
|
|
11825
11450
|
}
|
|
11826
11451
|
),
|
|
11827
|
-
(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 })
|
|
11828
11453
|
] }),
|
|
11829
|
-
/* @__PURE__ */
|
|
11830
|
-
/* @__PURE__ */
|
|
11831
|
-
/* @__PURE__ */
|
|
11832
|
-
/* @__PURE__ */
|
|
11833
|
-
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))
|
|
11834
11459
|
] }),
|
|
11835
|
-
bankFeeAmount > 0 && /* @__PURE__ */
|
|
11460
|
+
bankFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
|
|
11836
11461
|
"There is a processing fee of ",
|
|
11837
|
-
/* @__PURE__ */
|
|
11462
|
+
/* @__PURE__ */ jsx34("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
|
|
11838
11463
|
"."
|
|
11839
11464
|
] }),
|
|
11840
|
-
!saveACHinfo && /* @__PURE__ */
|
|
11841
|
-
/* @__PURE__ */
|
|
11842
|
-
/* @__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) => {
|
|
11843
11468
|
setIsBankConsentChecked(e.target.checked);
|
|
11844
11469
|
if (e.target.checked) {
|
|
11845
11470
|
setErrorBankConsent("");
|
|
11846
11471
|
}
|
|
11847
11472
|
} }),
|
|
11848
|
-
/* @__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.` })
|
|
11849
11474
|
] }),
|
|
11850
|
-
errorBankConsent && /* @__PURE__ */
|
|
11475
|
+
errorBankConsent && /* @__PURE__ */ jsx34("span", { className: "error-span", children: errorBankConsent })
|
|
11851
11476
|
] }),
|
|
11852
|
-
customerId && /* @__PURE__ */
|
|
11853
|
-
/* @__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) => {
|
|
11854
11479
|
setSaveACHinfo(e.target.checked);
|
|
11855
11480
|
if (!e.target.checked) {
|
|
11856
11481
|
setSaveACHConsent1(false);
|
|
11857
11482
|
setErrorBankConsentOther("");
|
|
11858
11483
|
}
|
|
11859
11484
|
} }),
|
|
11860
|
-
/* @__PURE__ */
|
|
11485
|
+
/* @__PURE__ */ jsx34("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save for future use" })
|
|
11861
11486
|
] }),
|
|
11862
|
-
saveACHinfo && /* @__PURE__ */
|
|
11863
|
-
/* @__PURE__ */
|
|
11864
|
-
/* @__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) => {
|
|
11865
11490
|
setSaveACHConsent1(e.target.checked);
|
|
11866
11491
|
if (e.target.checked) {
|
|
11867
11492
|
setErrorBankConsentOther("");
|
|
11868
11493
|
}
|
|
11869
11494
|
} }),
|
|
11870
|
-
/* @__PURE__ */
|
|
11495
|
+
/* @__PURE__ */ jsxs20("label", { className: "saveachlabel", htmlFor: "saveACHConsent1", children: [
|
|
11871
11496
|
"By providing my bank account information and selecting \u2018Save for future payments\u2019, I authorize ",
|
|
11872
11497
|
merchantName || "merchant",
|
|
11873
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."
|
|
11874
11499
|
] })
|
|
11875
11500
|
] }),
|
|
11876
|
-
errorBankConsentOther && /* @__PURE__ */
|
|
11501
|
+
errorBankConsentOther && /* @__PURE__ */ jsx34("span", { className: "error-span", children: errorBankConsentOther })
|
|
11877
11502
|
] })
|
|
11878
11503
|
] })
|
|
11879
11504
|
] }),
|
|
11880
|
-
/* @__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)) }) })
|
|
11881
11506
|
] })
|
|
11882
11507
|
] }) })
|
|
11883
11508
|
] })
|
|
@@ -11892,7 +11517,7 @@ var ModelContentSky_default = ModelContentSky;
|
|
|
11892
11517
|
|
|
11893
11518
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
11894
11519
|
import axios10 from "axios";
|
|
11895
|
-
import { Fragment as
|
|
11520
|
+
import { Fragment as Fragment20, jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
11896
11521
|
var PaymentWidget = ({
|
|
11897
11522
|
amount,
|
|
11898
11523
|
bankAmount,
|
|
@@ -11916,13 +11541,12 @@ var PaymentWidget = ({
|
|
|
11916
11541
|
customCSS: customCSS2,
|
|
11917
11542
|
disableSubmitBtn = false
|
|
11918
11543
|
}) => {
|
|
11919
|
-
const [show, setShow] =
|
|
11920
|
-
const [loading, setLoading] =
|
|
11921
|
-
const [childHandleClose, setChildHandleClose] =
|
|
11544
|
+
const [show, setShow] = useState11(autoTrigger || false);
|
|
11545
|
+
const [loading, setLoading] = useState11(false);
|
|
11546
|
+
const [childHandleClose, setChildHandleClose] = useState11(() => () => {
|
|
11922
11547
|
});
|
|
11923
|
-
const [orderGuid, setOrderGuid] =
|
|
11924
|
-
const [remainingAmount, setRemainingAmount] =
|
|
11925
|
-
const [isTokenizerReady, setTokenizerReady] = useState12(false);
|
|
11548
|
+
const [orderGuid, setOrderGuid] = useState11(null);
|
|
11549
|
+
const [remainingAmount, setRemainingAmount] = useState11(null);
|
|
11926
11550
|
const initialCommonProps = useMemo(
|
|
11927
11551
|
() => ({
|
|
11928
11552
|
amount,
|
|
@@ -11972,8 +11596,8 @@ var PaymentWidget = ({
|
|
|
11972
11596
|
disableSubmitBtn
|
|
11973
11597
|
]
|
|
11974
11598
|
);
|
|
11975
|
-
const [commonProps, setCommonProps] =
|
|
11976
|
-
|
|
11599
|
+
const [commonProps, setCommonProps] = useState11(initialCommonProps);
|
|
11600
|
+
useEffect16(() => {
|
|
11977
11601
|
if (show) {
|
|
11978
11602
|
setCommonProps(initialCommonProps);
|
|
11979
11603
|
}
|
|
@@ -12004,36 +11628,35 @@ var PaymentWidget = ({
|
|
|
12004
11628
|
setLoading(false);
|
|
12005
11629
|
}
|
|
12006
11630
|
};
|
|
12007
|
-
|
|
11631
|
+
useEffect16(() => {
|
|
12008
11632
|
if (show && isPartial && partialRef) {
|
|
12009
11633
|
getskyosOrderDetails();
|
|
12010
11634
|
}
|
|
12011
11635
|
}, [show, isPartial, partialRef]);
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
/* @__PURE__ */
|
|
12015
|
-
/* @__PURE__ */
|
|
12016
|
-
/* @__PURE__ */
|
|
12017
|
-
/* @__PURE__ */
|
|
12018
|
-
/* @__PURE__ */
|
|
12019
|
-
/* @__PURE__ */
|
|
12020
|
-
/* @__PURE__ */
|
|
12021
|
-
!autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", disabled: disableSubmitBtn, onClick: () => setShow(true), children: [
|
|
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: [
|
|
12022
11645
|
submitBtnText,
|
|
12023
11646
|
submitBtnIcon
|
|
12024
11647
|
] }),
|
|
12025
|
-
!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 }))
|
|
12026
11649
|
] });
|
|
12027
11650
|
};
|
|
12028
11651
|
|
|
12029
11652
|
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
12030
|
-
import { useEffect as
|
|
11653
|
+
import { useEffect as useEffect18, useState as useState12, useMemo as useMemo2 } from "react";
|
|
12031
11654
|
import axios11 from "axios";
|
|
12032
11655
|
|
|
12033
11656
|
// src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
|
|
12034
|
-
import { jsx as
|
|
11657
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
12035
11658
|
function EmbeddedCheckoutStyles({ extraCustomCSS }) {
|
|
12036
|
-
return /* @__PURE__ */
|
|
11659
|
+
return /* @__PURE__ */ jsx36("style", { children: `
|
|
12037
11660
|
|
|
12038
11661
|
.pay-amount-conatiner{
|
|
12039
11662
|
margin-top: 20px !important;
|
|
@@ -12379,27 +12002,27 @@ padding:0px !important;
|
|
|
12379
12002
|
}
|
|
12380
12003
|
|
|
12381
12004
|
// src/app/components/Atoms/Applepay/ApplePayScriptLoader.tsx
|
|
12382
|
-
import { useEffect as
|
|
12005
|
+
import { useEffect as useEffect17 } from "react";
|
|
12383
12006
|
var applePayScriptLoaded = false;
|
|
12384
12007
|
var ApplePayScriptLoader = () => {
|
|
12385
|
-
|
|
12008
|
+
useEffect17(() => {
|
|
12386
12009
|
if (applePayScriptLoaded) return;
|
|
12387
12010
|
const existingScript = document.querySelector(
|
|
12388
12011
|
`script[src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"]`
|
|
12389
12012
|
);
|
|
12390
12013
|
if (!existingScript) {
|
|
12391
|
-
const
|
|
12392
|
-
|
|
12393
|
-
|
|
12394
|
-
|
|
12014
|
+
const script2 = document.createElement("script");
|
|
12015
|
+
script2.src = "https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js";
|
|
12016
|
+
script2.async = true;
|
|
12017
|
+
script2.onload = () => {
|
|
12395
12018
|
console.log("\u2705 Apple Pay script loaded");
|
|
12396
12019
|
applePayScriptLoaded = true;
|
|
12397
12020
|
console.log("ApplePaySession:", window.ApplePaySession);
|
|
12398
12021
|
};
|
|
12399
|
-
|
|
12022
|
+
script2.onerror = (err) => {
|
|
12400
12023
|
console.error("\u274C Apple Pay script failed", err);
|
|
12401
12024
|
};
|
|
12402
|
-
document.head.appendChild(
|
|
12025
|
+
document.head.appendChild(script2);
|
|
12403
12026
|
} else {
|
|
12404
12027
|
applePayScriptLoaded = true;
|
|
12405
12028
|
}
|
|
@@ -12408,7 +12031,7 @@ var ApplePayScriptLoader = () => {
|
|
|
12408
12031
|
};
|
|
12409
12032
|
|
|
12410
12033
|
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
12411
|
-
import { Fragment as
|
|
12034
|
+
import { Fragment as Fragment21, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
12412
12035
|
var EmbeddedCheckout = ({
|
|
12413
12036
|
amount,
|
|
12414
12037
|
bankAmount,
|
|
@@ -12433,13 +12056,12 @@ var EmbeddedCheckout = ({
|
|
|
12433
12056
|
onLoad,
|
|
12434
12057
|
customCSS: customCSS2
|
|
12435
12058
|
}) => {
|
|
12436
|
-
const [show, setShow] =
|
|
12437
|
-
const [loading, setLoading] =
|
|
12438
|
-
const [childHandleClose, setChildHandleClose] =
|
|
12059
|
+
const [show, setShow] = useState12(false);
|
|
12060
|
+
const [loading, setLoading] = useState12(false);
|
|
12061
|
+
const [childHandleClose, setChildHandleClose] = useState12(() => () => {
|
|
12439
12062
|
});
|
|
12440
|
-
const [orderGuid, setOrderGuid] =
|
|
12441
|
-
const [remainingAmount, setRemainingAmount] =
|
|
12442
|
-
const [isTokenizerReady, setTokenizerReady] = useState13(false);
|
|
12063
|
+
const [orderGuid, setOrderGuid] = useState12(null);
|
|
12064
|
+
const [remainingAmount, setRemainingAmount] = useState12(null);
|
|
12443
12065
|
const initialCommonProps = useMemo2(
|
|
12444
12066
|
() => ({
|
|
12445
12067
|
amount,
|
|
@@ -12486,8 +12108,8 @@ var EmbeddedCheckout = ({
|
|
|
12486
12108
|
partialRef
|
|
12487
12109
|
]
|
|
12488
12110
|
);
|
|
12489
|
-
const [commonProps, setCommonProps] =
|
|
12490
|
-
|
|
12111
|
+
const [commonProps, setCommonProps] = useState12(initialCommonProps);
|
|
12112
|
+
useEffect18(() => {
|
|
12491
12113
|
if (show) {
|
|
12492
12114
|
setCommonProps(initialCommonProps);
|
|
12493
12115
|
}
|
|
@@ -12518,13 +12140,13 @@ var EmbeddedCheckout = ({
|
|
|
12518
12140
|
setLoading(false);
|
|
12519
12141
|
}
|
|
12520
12142
|
};
|
|
12521
|
-
|
|
12143
|
+
useEffect18(() => {
|
|
12522
12144
|
if (show && isPartial && partialRef) {
|
|
12523
12145
|
getskyosOrderDetails();
|
|
12524
12146
|
}
|
|
12525
12147
|
}, [show, isPartial, partialRef]);
|
|
12526
12148
|
console.log(onLoad, "onLoad");
|
|
12527
|
-
|
|
12149
|
+
useEffect18(() => {
|
|
12528
12150
|
const supported = !!window.ApplePaySession;
|
|
12529
12151
|
let canPay = false;
|
|
12530
12152
|
if (supported) {
|
|
@@ -12535,21 +12157,21 @@ var EmbeddedCheckout = ({
|
|
|
12535
12157
|
}
|
|
12536
12158
|
console.log(`ApplePaySession: ${supported}, canMakePayments: ${canPay}`);
|
|
12537
12159
|
}, []);
|
|
12538
|
-
return /* @__PURE__ */
|
|
12539
|
-
/* @__PURE__ */
|
|
12540
|
-
/* @__PURE__ */
|
|
12541
|
-
/* @__PURE__ */
|
|
12542
|
-
/* @__PURE__ */
|
|
12543
|
-
/* @__PURE__ */
|
|
12544
|
-
/* @__PURE__ */
|
|
12545
|
-
/* @__PURE__ */
|
|
12546
|
-
/* @__PURE__ */
|
|
12547
|
-
/* @__PURE__ */
|
|
12548
|
-
!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: [
|
|
12549
12171
|
submitBtnText,
|
|
12550
12172
|
submitBtnIcon
|
|
12551
12173
|
] }),
|
|
12552
|
-
!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 }))
|
|
12553
12175
|
] });
|
|
12554
12176
|
};
|
|
12555
12177
|
export {
|