@fractalpay/fractalpay-next-dev 0.0.252 → 0.0.254
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +16 -42
- package/dist/index.js +539 -1836
- package/dist/index.js.map +1 -1
- package/global.d.ts +0 -1
- package/package.json +1 -1
- package/types/apple-pay.d.ts +0 -18
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.254",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -113,25 +113,8 @@ import { useState, useEffect } from "react";
|
|
|
113
113
|
import { jsx } from "react/jsx-runtime";
|
|
114
114
|
var LoaderStyle = (props) => {
|
|
115
115
|
return /* @__PURE__ */ jsx("style", { children: `
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
position: fixed; /* Fixed position to cover the viewport */
|
|
119
|
-
top: 0;
|
|
120
|
-
left: 0;
|
|
121
|
-
width: 100%;
|
|
122
|
-
height: 100%;
|
|
123
|
-
display: flex;
|
|
124
|
-
justify-content: center;
|
|
125
|
-
align-items: center;
|
|
126
|
-
/* background: rgba(255, 255, 0, 0.01); Adjust the blur effect */
|
|
127
|
-
background-color: rgba(31, 29, 29, 0.52); /* Semi-transparent black background */
|
|
128
|
-
|
|
129
|
-
backdrop-filter: blur(0.5px); /* Blur effect */
|
|
130
|
-
z-index: 999999999999 !important; /* Ensure it's on top of other elements */
|
|
131
|
-
transform: translate(0%, 0%) !important
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.loader-dark {
|
|
116
|
+
|
|
117
|
+
.loader {
|
|
135
118
|
position: fixed; /* Fixed position to cover the viewport */
|
|
136
119
|
top: 0;
|
|
137
120
|
left: 0;
|
|
@@ -143,7 +126,7 @@ var LoaderStyle = (props) => {
|
|
|
143
126
|
/* background: rgba(255, 255, 0, 0.01); Adjust the blur effect */
|
|
144
127
|
background-color: rgba(31, 29, 29, 0.52); /* Semi-transparent black background */
|
|
145
128
|
|
|
146
|
-
backdrop-filter: blur(
|
|
129
|
+
backdrop-filter: blur(.5px); /* Blur effect */
|
|
147
130
|
z-index: 999999999999 !important; /* Ensure it's on top of other elements */
|
|
148
131
|
transform: translate(0%, 0%) !important
|
|
149
132
|
}
|
|
@@ -218,11 +201,10 @@ var LoaderStyle_default = LoaderStyle;
|
|
|
218
201
|
|
|
219
202
|
// src/app/components/Loader/Loader.tsx
|
|
220
203
|
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
221
|
-
var Loader = (
|
|
222
|
-
var _b = _a, { intensity = "light" } = _b, props = __objRest(_b, ["intensity"]);
|
|
204
|
+
var Loader = (props) => {
|
|
223
205
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
224
206
|
/* @__PURE__ */ jsx2(LoaderStyle_default, {}),
|
|
225
|
-
(props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className:
|
|
207
|
+
(props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: "loader", children: /* @__PURE__ */ jsxs("div", { className: "lds-ellipsis", children: [
|
|
226
208
|
/* @__PURE__ */ jsx2("div", {}),
|
|
227
209
|
/* @__PURE__ */ jsx2("div", {}),
|
|
228
210
|
/* @__PURE__ */ jsx2("div", {}),
|
|
@@ -236,65 +218,41 @@ var Loader_default = Loader;
|
|
|
236
218
|
var { name } = require_package();
|
|
237
219
|
var S3Url = "https://fractal-userdata-upload.s3.us-east-1.amazonaws.com/";
|
|
238
220
|
if (name === "@fractalpay/fractalpay-next-dev") {
|
|
239
|
-
|
|
240
|
-
|
|
221
|
+
baseUrl = "http://192.168.1.64:8083/";
|
|
222
|
+
masterBaseUrl = "http://192.168.1.64:8082/";
|
|
241
223
|
fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
|
|
242
224
|
datacapUrl = "https://token-cert.dcap.com/v1/client";
|
|
243
225
|
threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
|
|
244
|
-
applePayMerchantId = "fractal";
|
|
245
|
-
googlePayMerchantId = "12345678901234567890";
|
|
246
|
-
googlePayEnvironment = "TEST";
|
|
247
|
-
googlePayGatewayMerchantId = "fractal";
|
|
248
226
|
} else if (name === "@fractalpay/fractalpay-next-test") {
|
|
249
227
|
masterBaseUrl = "https://testapi.fractalpay.com/";
|
|
250
228
|
baseUrl = "https://staging-widget.fractalpay.com/";
|
|
251
229
|
fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
|
|
252
230
|
datacapUrl = "https://token-cert.dcap.com/v1/client";
|
|
253
231
|
threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
|
|
254
|
-
applePayMerchantId = "fractal";
|
|
255
|
-
googlePayMerchantId = "12345678901234567890";
|
|
256
|
-
googlePayEnvironment = "TEST";
|
|
257
|
-
googlePayGatewayMerchantId = "fractal";
|
|
258
232
|
} else if (name === "@fractalpay/fractalpay-next-testprod") {
|
|
259
233
|
masterBaseUrl = "https://sky-node-prod.fractalpay.com/";
|
|
260
234
|
baseUrl = "https://widget-prod.fractalpay.com/";
|
|
261
235
|
fractalGatewayUrl = "https://api.merchant-trends.com/";
|
|
262
236
|
datacapUrl = "https://token.dcap.com/v1/client";
|
|
263
237
|
threedsSecurePublicKey = "pk_live_51RH5WXCZ90rBGeaYwqmjWqgUmudTgxL6uKOE1keu617jvRx9OvW2ke6zGf6SKgv4ixsBLcIPQ4sQIEhp8MgBX39500CqULxOPB";
|
|
264
|
-
applePayMerchantId = "fractal";
|
|
265
|
-
googlePayMerchantId = "BCR2DN4T6OC2TCQH";
|
|
266
|
-
googlePayEnvironment = "PRODUCTION";
|
|
267
|
-
googlePayGatewayMerchantId = "fractal";
|
|
268
238
|
} else if (name === "@fractalpay/fractalpay-next") {
|
|
269
239
|
masterBaseUrl = "https://api.fractalpay.com/";
|
|
270
240
|
baseUrl = "https://widget.fractalpay.com/";
|
|
271
241
|
fractalGatewayUrl = "https://api.merchant-trends.com/";
|
|
272
242
|
datacapUrl = "https://token.dcap.com/v1/client";
|
|
273
243
|
threedsSecurePublicKey = "pk_live_51RH5WXCZ90rBGeaYwqmjWqgUmudTgxL6uKOE1keu617jvRx9OvW2ke6zGf6SKgv4ixsBLcIPQ4sQIEhp8MgBX39500CqULxOPB";
|
|
274
|
-
applePayMerchantId = "fractal";
|
|
275
|
-
googlePayMerchantId = "BCR2DN4T6OC2TCQH";
|
|
276
|
-
googlePayEnvironment = "PRODUCTION";
|
|
277
|
-
googlePayGatewayMerchantId = "fractal";
|
|
278
244
|
} else {
|
|
279
245
|
baseUrl = "http://localhost:8082/";
|
|
280
246
|
masterBaseUrl = "http://localhost:8081/";
|
|
281
247
|
fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
|
|
282
248
|
datacapUrl = "https://token-cert.dcap.com/v1/client";
|
|
283
249
|
threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
|
|
284
|
-
applePayMerchantId = "fractal";
|
|
285
|
-
googlePayMerchantId = "12345678901234567890";
|
|
286
|
-
googlePayEnvironment = "TEST";
|
|
287
|
-
googlePayGatewayMerchantId = "fractal";
|
|
288
250
|
}
|
|
289
251
|
var masterBaseUrl;
|
|
290
252
|
var baseUrl;
|
|
291
253
|
var fractalGatewayUrl;
|
|
292
254
|
var datacapUrl;
|
|
293
255
|
var threedsSecurePublicKey;
|
|
294
|
-
var applePayMerchantId;
|
|
295
|
-
var googlePayMerchantId;
|
|
296
|
-
var googlePayEnvironment;
|
|
297
|
-
var googlePayGatewayMerchantId;
|
|
298
256
|
|
|
299
257
|
// src/app/components/Errortext.ts
|
|
300
258
|
var ErrorText = {
|
|
@@ -2950,7 +2908,7 @@ function ErrorCardMszStyle() {
|
|
|
2950
2908
|
|
|
2951
2909
|
// src/app/components/ErrorCardMessage/ErrorCardMessage.tsx
|
|
2952
2910
|
import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2953
|
-
var ErrorCardMessage = ({ onClose, error
|
|
2911
|
+
var ErrorCardMessage = ({ onClose, error }) => {
|
|
2954
2912
|
return /* @__PURE__ */ jsxs6(Fragment6, { children: [
|
|
2955
2913
|
/* @__PURE__ */ jsx12(ErrorCardMszStyle, {}),
|
|
2956
2914
|
/* @__PURE__ */ jsx12("div", { className: "card-error", children: /* @__PURE__ */ jsx12("div", { className: "payment-error-container", children: /* @__PURE__ */ jsxs6("div", { className: "error-icon", children: [
|
|
@@ -2959,7 +2917,7 @@ var ErrorCardMessage = ({ onClose, error, autoTrigger = false }) => {
|
|
|
2959
2917
|
/* @__PURE__ */ jsx12("div", { className: "payment-error-text", children: error }),
|
|
2960
2918
|
/* @__PURE__ */ jsx12("div", { className: "thank-you-text", children: "Try again later " })
|
|
2961
2919
|
] }),
|
|
2962
|
-
|
|
2920
|
+
/* @__PURE__ */ jsx12("div", { className: "error-btn-div", children: /* @__PURE__ */ jsx12("button", { onClick: onClose, children: "OK" }) })
|
|
2963
2921
|
] }) }) })
|
|
2964
2922
|
] });
|
|
2965
2923
|
};
|
|
@@ -2976,28 +2934,14 @@ var socketClient_default = socket;
|
|
|
2976
2934
|
|
|
2977
2935
|
// src/app/components/Atoms/CardBankRadio/CardBankRadio.tsx
|
|
2978
2936
|
import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2979
|
-
var CardBankRadio = (
|
|
2980
|
-
|
|
2981
|
-
const savingsBadgeClass = `frac-saving-badge ${skydesign ? "frac-saving-badge-corner" : "frac-saving-badge-corner frac-saving-badge-with-radio"}`;
|
|
2982
|
-
return /* @__PURE__ */ jsx13(Fragment7, { children: /* @__PURE__ */ jsx13(
|
|
2937
|
+
var CardBankRadio = (props) => {
|
|
2938
|
+
return /* @__PURE__ */ jsx13(Fragment7, { children: /* @__PURE__ */ jsxs7(
|
|
2983
2939
|
"div",
|
|
2984
2940
|
{
|
|
2985
2941
|
className: `frac-card-bank-radio ${props.activetab === props.value ? "frac-active" : ""}`,
|
|
2986
2942
|
onClick: () => props.onChange(props.value),
|
|
2987
2943
|
role: "radio",
|
|
2988
|
-
children:
|
|
2989
|
-
/* @__PURE__ */ jsxs7("div", { className: "frac-card-title-main", children: [
|
|
2990
|
-
/* @__PURE__ */ jsxs7("div", { className: "box-inner-card-text", children: [
|
|
2991
|
-
/* @__PURE__ */ jsx13("img", { src: props.label.toLowerCase() === "card" ? defaultcard : props.label.toLowerCase() === "reader" ? pax : bankNew, className: "frac-payment-type-logo", alt: "" }),
|
|
2992
|
-
/* @__PURE__ */ jsx13("div", { className: "frac-card-label-text", children: props.label })
|
|
2993
|
-
] }),
|
|
2994
|
-
/* @__PURE__ */ jsx13("div", { className: "frac-card-label", children: /* @__PURE__ */ jsx13("div", { className: "frac-card-label-amount", children: formatUSD(props.amount) }) })
|
|
2995
|
-
] }),
|
|
2996
|
-
savingsText ? /* @__PURE__ */ jsx13("button", { type: "button", className: savingsBadgeClass, children: savingsText }) : null,
|
|
2997
|
-
/* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsx13("input", { name: "paymenttype", checked: props.activetab === props.value, type: "hidden", value: props.value, onChange: (e) => {
|
|
2998
|
-
props.onChange(e.target.value);
|
|
2999
|
-
} }) })
|
|
3000
|
-
] }) : /* @__PURE__ */ jsxs7(Fragment7, { children: [
|
|
2944
|
+
children: [
|
|
3001
2945
|
/* @__PURE__ */ jsxs7("div", { className: "frac-card-title-main", children: [
|
|
3002
2946
|
/* @__PURE__ */ jsx13("img", { src: props.label.toLowerCase() === "card" ? defaultcard : props.label.toLowerCase() === "reader" ? pax : bankNew, className: "frac-payment-type-logo", alt: "" }),
|
|
3003
2947
|
/* @__PURE__ */ jsxs7("div", { className: "frac-card-label", children: [
|
|
@@ -3005,11 +2949,10 @@ var CardBankRadio = (_a) => {
|
|
|
3005
2949
|
/* @__PURE__ */ jsx13("div", { className: "frac-card-label-amount", children: formatUSD(props.amount) })
|
|
3006
2950
|
] })
|
|
3007
2951
|
] }),
|
|
3008
|
-
savingsText ? /* @__PURE__ */ jsx13("button", { type: "button", className: savingsBadgeClass, children: savingsText }) : null,
|
|
3009
2952
|
/* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsx13("input", { name: "paymenttype", checked: props.activetab === props.value, type: "radio", value: props.value, onChange: (e) => {
|
|
3010
2953
|
props.onChange(e.target.value);
|
|
3011
2954
|
} }) })
|
|
3012
|
-
]
|
|
2955
|
+
]
|
|
3013
2956
|
}
|
|
3014
2957
|
) });
|
|
3015
2958
|
};
|
|
@@ -3034,7 +2977,6 @@ function CardBankRadioStyles({}) {
|
|
|
3034
2977
|
justify-content: space-between;
|
|
3035
2978
|
align-items: center;
|
|
3036
2979
|
align-self: stretch;
|
|
3037
|
-
position: relative;
|
|
3038
2980
|
}
|
|
3039
2981
|
|
|
3040
2982
|
input[type="radio"] {
|
|
@@ -3092,28 +3034,6 @@ function CardBankRadioStyles({}) {
|
|
|
3092
3034
|
.frac-card-bank-radio.frac-active {
|
|
3093
3035
|
background: #F6F6F7;
|
|
3094
3036
|
}
|
|
3095
|
-
|
|
3096
|
-
.frac-saving-badge {
|
|
3097
|
-
padding: 1px 7px !important;
|
|
3098
|
-
border: 1px solid #9ad7ab;
|
|
3099
|
-
border-radius: 999px;
|
|
3100
|
-
background: #e8f8ec;
|
|
3101
|
-
color: #1e6a34;
|
|
3102
|
-
font-size: 10px;
|
|
3103
|
-
font-weight: 600;
|
|
3104
|
-
line-height: 15px;
|
|
3105
|
-
pointer-events: none;
|
|
3106
|
-
}
|
|
3107
|
-
|
|
3108
|
-
.frac-saving-badge-corner {
|
|
3109
|
-
position: absolute;
|
|
3110
|
-
top: 8px;
|
|
3111
|
-
right: 10px;
|
|
3112
|
-
}
|
|
3113
|
-
|
|
3114
|
-
.frac-saving-badge-with-radio {
|
|
3115
|
-
right: 34px;
|
|
3116
|
-
}
|
|
3117
3037
|
` });
|
|
3118
3038
|
}
|
|
3119
3039
|
|
|
@@ -3291,7 +3211,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3291
3211
|
{
|
|
3292
3212
|
id: "card_number",
|
|
3293
3213
|
className: "form-control card-number-new",
|
|
3294
|
-
style: { height: `${isSky ? "36px" : "46px"}
|
|
3214
|
+
style: { height: `${isSky ? "36px" : "46px"}`, display: "inline-block" }
|
|
3295
3215
|
}
|
|
3296
3216
|
),
|
|
3297
3217
|
/* @__PURE__ */ jsx17("div", { className: "card-crdi card-expiry-new", children: /* @__PURE__ */ jsxs10("div", { className: "exp-date-year-container", children: [
|
|
@@ -3300,7 +3220,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3300
3220
|
{
|
|
3301
3221
|
id: "exp_month",
|
|
3302
3222
|
className: "form-control required card-cvv-in",
|
|
3303
|
-
style: { height: "36px", display: "block"
|
|
3223
|
+
style: { height: "36px", display: "inline-block" }
|
|
3304
3224
|
}
|
|
3305
3225
|
) }),
|
|
3306
3226
|
/* @__PURE__ */ jsx17("div", { className: "exp-year form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
@@ -3308,7 +3228,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3308
3228
|
{
|
|
3309
3229
|
id: "exp_year",
|
|
3310
3230
|
className: "form-control required card-cvv-in",
|
|
3311
|
-
style: { height: "36px", display: "block"
|
|
3231
|
+
style: { height: "36px", display: "inline-block" }
|
|
3312
3232
|
}
|
|
3313
3233
|
) }),
|
|
3314
3234
|
/* @__PURE__ */ jsx17("div", { className: "security-digit form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
@@ -3316,7 +3236,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3316
3236
|
{
|
|
3317
3237
|
id: "cvv",
|
|
3318
3238
|
className: "form-control card-cvv-in required",
|
|
3319
|
-
style: { height: "36px", display: "block"
|
|
3239
|
+
style: { height: "36px", display: "inline-block" }
|
|
3320
3240
|
}
|
|
3321
3241
|
) })
|
|
3322
3242
|
] }) })
|
|
@@ -3439,8 +3359,7 @@ var DataCapFields = ({
|
|
|
3439
3359
|
isOpen,
|
|
3440
3360
|
tokenKey,
|
|
3441
3361
|
setLoader,
|
|
3442
|
-
isAddCard
|
|
3443
|
-
isEmbedded
|
|
3362
|
+
isAddCard
|
|
3444
3363
|
}) => {
|
|
3445
3364
|
const iframeId = "datacap-iframe";
|
|
3446
3365
|
const resolverRef = useRef2(null);
|
|
@@ -3466,20 +3385,6 @@ var DataCapFields = ({
|
|
|
3466
3385
|
|
|
3467
3386
|
`;
|
|
3468
3387
|
}
|
|
3469
|
-
if (isEmbedded) {
|
|
3470
|
-
customCSS += `
|
|
3471
|
-
|
|
3472
|
-
input {
|
|
3473
|
-
background-color: #F6F6F7;
|
|
3474
|
-
box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1;
|
|
3475
|
-
}
|
|
3476
|
-
|
|
3477
|
-
select {
|
|
3478
|
-
background-color: #F6F6F7;
|
|
3479
|
-
box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
|
|
3480
|
-
}
|
|
3481
|
-
`;
|
|
3482
|
-
}
|
|
3483
3388
|
const initialize = async () => {
|
|
3484
3389
|
setLoader == null ? void 0 : setLoader(true);
|
|
3485
3390
|
setIframeReady(false);
|
|
@@ -3511,18 +3416,13 @@ var DataCapFields = ({
|
|
|
3511
3416
|
};
|
|
3512
3417
|
initialize();
|
|
3513
3418
|
}, [isOpen, tokenKey]);
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
return () => {
|
|
3522
|
-
delete window.requestDcToken;
|
|
3523
|
-
};
|
|
3524
|
-
}, []);
|
|
3525
|
-
console.log(setLoader, "loadingIframe");
|
|
3419
|
+
window.requestDcToken = () => {
|
|
3420
|
+
return new Promise((resolve, reject) => {
|
|
3421
|
+
setLoader == null ? void 0 : setLoader(true);
|
|
3422
|
+
resolverRef.current = { resolve, reject };
|
|
3423
|
+
window.DatacapHostedWebToken.requestToken();
|
|
3424
|
+
});
|
|
3425
|
+
};
|
|
3526
3426
|
return /* @__PURE__ */ jsx18(
|
|
3527
3427
|
"iframe",
|
|
3528
3428
|
{
|
|
@@ -3784,7 +3684,7 @@ function GetPaymentPage(props) {
|
|
|
3784
3684
|
}
|
|
3785
3685
|
}
|
|
3786
3686
|
if (!isBankConsentChecked) {
|
|
3787
|
-
setErrorBankConsent("Above consent is
|
|
3687
|
+
setErrorBankConsent("Above consent is required");
|
|
3788
3688
|
}
|
|
3789
3689
|
setAchError(errors);
|
|
3790
3690
|
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
@@ -7700,7 +7600,7 @@ function PartialPayment(props) {
|
|
|
7700
7600
|
}
|
|
7701
7601
|
}
|
|
7702
7602
|
if (!isBankConsentChecked) {
|
|
7703
|
-
setErrorBankConsent("Above consent is
|
|
7603
|
+
setErrorBankConsent("Above consent is required");
|
|
7704
7604
|
}
|
|
7705
7605
|
setAchError(errors);
|
|
7706
7606
|
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
@@ -8694,7 +8594,7 @@ function PartialPayment(props) {
|
|
|
8694
8594
|
}
|
|
8695
8595
|
|
|
8696
8596
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
8697
|
-
import { useEffect as
|
|
8597
|
+
import { useEffect as useEffect16, useState as useState11, useMemo } from "react";
|
|
8698
8598
|
|
|
8699
8599
|
// src/app/components/Skysystemz/SkyChargewidgetstyles.tsx
|
|
8700
8600
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -8930,17 +8830,6 @@ function SkyChargewidgetstyles() {
|
|
|
8930
8830
|
text-align : left !important;
|
|
8931
8831
|
text-transform: uppercase !important;
|
|
8932
8832
|
}
|
|
8933
|
-
.frac-form .frac-fee-text{
|
|
8934
|
-
display: block;
|
|
8935
|
-
padding: 10px 0 4px;
|
|
8936
|
-
font-family: 'IBM Plex Mono', monospace !important;
|
|
8937
|
-
color: #727272 !important;
|
|
8938
|
-
font-size: 12px;
|
|
8939
|
-
line-height: 1.4;
|
|
8940
|
-
}
|
|
8941
|
-
.frac-form .frac-fee-amount{
|
|
8942
|
-
color: #c62828 !important;
|
|
8943
|
-
}
|
|
8944
8833
|
.form-control-frac{
|
|
8945
8834
|
display: block;
|
|
8946
8835
|
width: 100%;
|
|
@@ -8975,7 +8864,7 @@ function SkyChargewidgetstyles() {
|
|
|
8975
8864
|
}
|
|
8976
8865
|
.exp-date-year-container .form-group {
|
|
8977
8866
|
flex: 1;
|
|
8978
|
-
padding-left:.75rem
|
|
8867
|
+
padding-left:.75rem;
|
|
8979
8868
|
}
|
|
8980
8869
|
.card-crdi {
|
|
8981
8870
|
display: flex;
|
|
@@ -8992,7 +8881,7 @@ function SkyChargewidgetstyles() {
|
|
|
8992
8881
|
}
|
|
8993
8882
|
.exp-date-year-container .form-group-frac{
|
|
8994
8883
|
flex:1;
|
|
8995
|
-
|
|
8884
|
+
padding: 0px !important
|
|
8996
8885
|
|
|
8997
8886
|
}
|
|
8998
8887
|
|
|
@@ -9493,54 +9382,13 @@ margin:0px !important;
|
|
|
9493
9382
|
padding:0px !important;
|
|
9494
9383
|
}
|
|
9495
9384
|
|
|
9496
|
-
|
|
9497
|
-
.toggle-num-wrapper-new div#card_number {
|
|
9498
|
-
display: block !important;
|
|
9499
|
-
}
|
|
9500
|
-
.toggle-num-wrapper-new .input-main-wrap-frac {
|
|
9501
|
-
height: 36px;
|
|
9502
|
-
}
|
|
9503
|
-
.toggle-num-wrapper-new:focus {
|
|
9504
|
-
border: 1px solid #004eab !important;
|
|
9505
|
-
}
|
|
9506
|
-
.frac-or {
|
|
9507
|
-
position: relative;
|
|
9508
|
-
margin: 15px 0;
|
|
9509
|
-
text-align: center;
|
|
9510
|
-
}
|
|
9511
|
-
.frac-or:before {
|
|
9512
|
-
position: absolute;
|
|
9513
|
-
left: 0;
|
|
9514
|
-
transform: translateY(-50%);
|
|
9515
|
-
top: 50%;
|
|
9516
|
-
height: 1px;
|
|
9517
|
-
width: 100%;
|
|
9518
|
-
background: #E0DFE2;
|
|
9519
|
-
content: '';
|
|
9520
|
-
z-index: 1;
|
|
9521
|
-
}
|
|
9522
|
-
.frac-or span {
|
|
9523
|
-
background: transparent;
|
|
9524
|
-
font-size: 13px;
|
|
9525
|
-
margin: 0 auto;
|
|
9526
|
-
width: 15px;
|
|
9527
|
-
font-weight: 500;
|
|
9528
|
-
text-transform: uppercase;
|
|
9529
|
-
color: #727272;
|
|
9530
|
-
padding: 3px;
|
|
9531
|
-
position: relative;
|
|
9532
|
-
z-index: 3;
|
|
9533
|
-
}
|
|
9534
|
-
button#gpay-button-online-api-id{
|
|
9535
|
-
width: 100%;
|
|
9536
|
-
}
|
|
9537
|
-
|
|
9385
|
+
|
|
9538
9386
|
|
|
9539
9387
|
` });
|
|
9540
9388
|
}
|
|
9541
9389
|
|
|
9542
9390
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9543
|
-
import { useCallback, useEffect as
|
|
9391
|
+
import { useCallback, useEffect as useEffect15, useRef as useRef10, useState as useState10 } from "react";
|
|
9544
9392
|
import axios9 from "axios";
|
|
9545
9393
|
import Swal5 from "sweetalert2";
|
|
9546
9394
|
|
|
@@ -9681,593 +9529,131 @@ function CheckoutWrapper({ clientSecret, onSuccess, showLoader, setError, sessio
|
|
|
9681
9529
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9682
9530
|
import { IoArrowBack as IoArrowBack4 } from "react-icons/io5";
|
|
9683
9531
|
import { NumericFormat as NumericFormat2 } from "react-number-format";
|
|
9684
|
-
|
|
9685
|
-
|
|
9686
|
-
|
|
9687
|
-
|
|
9688
|
-
|
|
9689
|
-
|
|
9690
|
-
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
9722
|
-
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
letter-spacing: -0.02em;
|
|
9746
|
-
color: #161616;
|
|
9747
|
-
}
|
|
9748
|
-
|
|
9749
|
-
.card-error-overlay .thank-you-text-overlay {
|
|
9750
|
-
font-family: 'Inter', sans-serif;
|
|
9751
|
-
font-weight: 500;
|
|
9752
|
-
font-size: 16px;
|
|
9753
|
-
line-height: 18px;
|
|
9754
|
-
text-align: center;
|
|
9755
|
-
letter-spacing: -0.02em;
|
|
9756
|
-
color: #161616 !important;
|
|
9757
|
-
opacity: 0.5;
|
|
9758
|
-
padding-top:10px
|
|
9759
|
-
}
|
|
9760
|
-
|
|
9761
|
-
.card-error-overlay .error-btn-div-overlay{
|
|
9762
|
-
padding-top:20px;
|
|
9763
|
-
width: 100%;
|
|
9764
|
-
|
|
9765
|
-
}
|
|
9766
|
-
.card-error-overlay .error-btn-div-overlay button{
|
|
9767
|
-
outline: 0;
|
|
9768
|
-
height: 46px;
|
|
9769
|
-
font-size: 16px;
|
|
9770
|
-
background: #727272;
|
|
9771
|
-
border: none;
|
|
9772
|
-
display: block;
|
|
9773
|
-
color: #fff;
|
|
9774
|
-
width: 100%;
|
|
9775
|
-
border-radius: 180px;
|
|
9776
|
-
margin: 10px 0;
|
|
9777
|
-
text-decoration: none;
|
|
9778
|
-
}
|
|
9779
|
-
.card-error-overlay .error-btn-div-overlay button:hover, .card-error-overlay .error-btn-div-overlay button:focus {
|
|
9780
|
-
background: #222;
|
|
9781
|
-
color: #fff;
|
|
9782
|
-
cursor: pointer;
|
|
9783
|
-
}
|
|
9784
|
-
.payment-error-container-overlay {
|
|
9785
|
-
width: fit-content;
|
|
9786
|
-
position: relative;
|
|
9787
|
-
top: 50%;
|
|
9788
|
-
left: 50%;
|
|
9789
|
-
transform: translate(-50%, -50%);
|
|
9790
|
-
background: rgba(255, 255, 255, 0.15);
|
|
9791
|
-
backdrop-filter: blur(12px);
|
|
9792
|
-
-webkit-backdrop-filter: blur(12px);
|
|
9793
|
-
border-radius: 12px;
|
|
9794
|
-
z-index: 11111;
|
|
9795
|
-
max-width: 240px;
|
|
9796
|
-
min-width: 224px;
|
|
9797
|
-
padding: 20px;
|
|
9798
|
-
margin-left: 17px !important;
|
|
9799
|
-
}
|
|
9800
|
-
.card-error-overlay {
|
|
9801
|
-
position: absolute;
|
|
9802
|
-
top: 0;
|
|
9803
|
-
left: 0;
|
|
9804
|
-
width: 100%;
|
|
9805
|
-
height: 100%;
|
|
9806
|
-
background: rgb(87 87 87 / 15%);
|
|
9807
|
-
backdrop-filter: blur(2px);
|
|
9808
|
-
-webkit-backdrop-filter: blur(12px);
|
|
9809
|
-
z-index: 1111;
|
|
9810
|
-
}
|
|
9811
|
-
` });
|
|
9812
|
-
}
|
|
9813
|
-
|
|
9814
|
-
// src/app/components/ErrorCardMessage/ErrorCardOverlay.tsx
|
|
9815
|
-
import { Fragment as Fragment18, jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
9816
|
-
var ErrorCardOverlay = ({ onClose, error, autoTrigger = false }) => {
|
|
9817
|
-
return /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
9818
|
-
/* @__PURE__ */ jsx33(ErrorCardOverlayStyle, {}),
|
|
9819
|
-
/* @__PURE__ */ jsx33("div", { className: "card-error-overlay", children: /* @__PURE__ */ jsx33("div", { className: "payment-error-container-overlay", children: /* @__PURE__ */ jsxs19("div", { className: "error-icon-overlay", children: [
|
|
9820
|
-
/* @__PURE__ */ jsx33("div", { className: "circle", children: /* @__PURE__ */ jsx33("i", { className: "fa fa-times", "aria-hidden": "true" }) }),
|
|
9821
|
-
/* @__PURE__ */ jsxs19("div", { className: "error-text-overlay", children: [
|
|
9822
|
-
/* @__PURE__ */ jsx33("div", { className: "payment-error-text-overlay", children: error }),
|
|
9823
|
-
/* @__PURE__ */ jsx33("div", { className: "thank-you-text-overlay", children: "Try again later " })
|
|
9824
|
-
] }),
|
|
9825
|
-
!autoTrigger && /* @__PURE__ */ jsx33("div", { className: "error-btn-div-overlay", children: /* @__PURE__ */ jsx33("button", { onClick: onClose, children: "OK" }) })
|
|
9826
|
-
] }) }) })
|
|
9827
|
-
] });
|
|
9828
|
-
};
|
|
9829
|
-
var ErrorCardOverlay_default = ErrorCardOverlay;
|
|
9830
|
-
|
|
9831
|
-
// src/app/components/Atoms/Googlepay/Googlepay.tsx
|
|
9832
|
-
import { useRef as useRef10 } from "react";
|
|
9833
|
-
import Script from "next/script";
|
|
9834
|
-
import { Fragment as Fragment19, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
9835
|
-
function GooglePayComponent({
|
|
9836
|
-
amount,
|
|
9837
|
-
googlePayEnvironment: googlePayEnvironment2,
|
|
9838
|
-
googlePayGatewayMerchantId: googlePayGatewayMerchantId2,
|
|
9839
|
-
googlePayMerchantId: googlePayMerchantId2,
|
|
9840
|
-
googlePayMerchantName,
|
|
9841
|
-
require3ds = false,
|
|
9842
|
-
completeFractalFlow,
|
|
9843
|
-
setLoading
|
|
9844
|
-
}) {
|
|
9845
|
-
const containerRef = useRef10(null);
|
|
9846
|
-
const paymentsClientRef = useRef10(null);
|
|
9847
|
-
const baseRequest = {
|
|
9848
|
-
apiVersion: 2,
|
|
9849
|
-
apiVersionMinor: 0
|
|
9532
|
+
import { Fragment as Fragment18, jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
9533
|
+
var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_token, customerId, callback, merchantName = "merchant", isPreAuth, surcharge = "0", submitBtnClass, submitBtnIcon, isRequest, pass_fee, pass_fee_amount, require3ds = false, autoTrigger = false, show, setShow, setHandleCloseRef, isPartial, bankSurcharge, partialRef, loadingPrev = false, orderGuid: ordGuid, remainingAmount: remAmount }) => {
|
|
9534
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
9535
|
+
const hasRunRef = useRef10(false);
|
|
9536
|
+
const cardListRunRef = useRef10(false);
|
|
9537
|
+
const threeDSContainerRef = useRef10(null);
|
|
9538
|
+
const [activetab, setActive] = useState10("card");
|
|
9539
|
+
const [activeList, setActiveList] = useState10("card");
|
|
9540
|
+
const [cardData, setCardData] = useState10();
|
|
9541
|
+
const [cardError, setCardError] = useState10({});
|
|
9542
|
+
const [achData, setAchData] = useState10();
|
|
9543
|
+
const [achError, setAchError] = useState10({});
|
|
9544
|
+
const [saveACHinfo, setSaveACHinfo] = useState10(false);
|
|
9545
|
+
const [saveCardInfo, setSaveCardInfo] = useState10(false);
|
|
9546
|
+
const [error, setError] = useState10("");
|
|
9547
|
+
const [errorIframe, setErrorIframe] = useState10("");
|
|
9548
|
+
const [success, setSuccess] = useState10(false);
|
|
9549
|
+
let [tranId, setTranId] = useState10("");
|
|
9550
|
+
const [loading, setLoading] = useState10(false);
|
|
9551
|
+
const [loading2, setLoading2] = useState10(false);
|
|
9552
|
+
const [loadingIframe, setLoadingIframe] = useState10(false);
|
|
9553
|
+
const [cardList, setCardList] = useState10([]);
|
|
9554
|
+
const [bankList, setBankList] = useState10([]);
|
|
9555
|
+
const [selectedCard, setSelectedCard] = useState10();
|
|
9556
|
+
const [cashDiscount, setCashDiscount] = useState10(Number(amount));
|
|
9557
|
+
const [activeinCard, setActiveinCard] = useState10("form");
|
|
9558
|
+
const [activeinBank, setActiveinBank] = useState10("form");
|
|
9559
|
+
const [isBankActive, setIsBankActive] = useState10(false);
|
|
9560
|
+
const [processingFee, setProcessingFee] = useState10(0);
|
|
9561
|
+
const [clientSecret, setClientSecret] = useState10("");
|
|
9562
|
+
const [errorMessage, setErrorMessage] = useState10(null);
|
|
9563
|
+
const [initialLoader, setInitialLoader] = useState10(false);
|
|
9564
|
+
const [is3DSEnable, setIs3DSEnable] = useState10(false);
|
|
9565
|
+
const [stripeResponse, setStripeResponse] = useState10(null);
|
|
9566
|
+
const [orderLoader, setOrderLoader] = useState10(false);
|
|
9567
|
+
const [orderGuid, setOrderGuid] = useState10(ordGuid || null);
|
|
9568
|
+
const [partialAmount, setPartialAmount] = useState10("");
|
|
9569
|
+
const [partialError, setPartialError] = useState10("");
|
|
9570
|
+
const [remainingAmount, setRemainingAmount] = useState10("");
|
|
9571
|
+
const [paymentGateway, setPaymentGateway] = useState10();
|
|
9572
|
+
const [dcToken, setDCToken] = useState10();
|
|
9573
|
+
const [isBankConsentChecked, setIsBankConsentChecked] = useState10(false);
|
|
9574
|
+
const [errorBankConsent, setErrorBankConsent] = useState10("");
|
|
9575
|
+
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
9576
|
+
let visa2 = S3Url + "widget/visa-img.svg";
|
|
9577
|
+
let americanexp2 = S3Url + "widget/ae-img.svg";
|
|
9578
|
+
let discover2 = S3Url + "widget/discover-img.svg";
|
|
9579
|
+
let defaultcard2 = S3Url + "widget/card.svg";
|
|
9580
|
+
let trash2 = S3Url + "widget/Trash.svg";
|
|
9581
|
+
let bank2 = S3Url + "widget/bank.svg";
|
|
9582
|
+
let secure2 = S3Url + "widget/secure-img.png";
|
|
9583
|
+
let pov2 = S3Url + "widget/pov-by.png";
|
|
9584
|
+
let pax2 = S3Url + "widget/pax.svg";
|
|
9585
|
+
let cardicon = S3Url + "widget/cardicon.svg";
|
|
9586
|
+
let bankicon = S3Url + "widget/bankicon.svg";
|
|
9587
|
+
const showLoader = () => setLoading(true);
|
|
9588
|
+
const hideLoader = () => setLoading(false);
|
|
9589
|
+
const CalculateCashDiscount = (amount2, surcharge2) => {
|
|
9590
|
+
const surchargeVal = (parseFloat(surcharge2) || 0) / 100;
|
|
9591
|
+
const originalAmount = amount2 / (1 + surchargeVal);
|
|
9592
|
+
return Math.round(originalAmount * 100) / 100;
|
|
9850
9593
|
};
|
|
9851
|
-
const
|
|
9852
|
-
const
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
9594
|
+
const tokenizerRef = useRef10(null);
|
|
9595
|
+
const fractalStyles = {
|
|
9596
|
+
input: {
|
|
9597
|
+
"font-family": "'Inter', sans-serif",
|
|
9598
|
+
"font-size": "16px",
|
|
9599
|
+
"color": "#212529",
|
|
9600
|
+
"background-color": "transparent",
|
|
9601
|
+
"padding": "0px",
|
|
9602
|
+
"appearance": "none",
|
|
9603
|
+
"outline": "none",
|
|
9604
|
+
"border": "none",
|
|
9605
|
+
"box-shadow": "none"
|
|
9606
|
+
},
|
|
9607
|
+
":focus": {
|
|
9608
|
+
"color": "#212529",
|
|
9609
|
+
"outline": "none",
|
|
9610
|
+
"border": "none"
|
|
9611
|
+
},
|
|
9612
|
+
"::placeholder": {
|
|
9613
|
+
"color": "#212529"
|
|
9858
9614
|
}
|
|
9859
9615
|
};
|
|
9860
|
-
const
|
|
9861
|
-
|
|
9862
|
-
type: "PAYMENT_GATEWAY",
|
|
9863
|
-
parameters: {
|
|
9864
|
-
gateway: googlePayGatewayMerchantId2,
|
|
9865
|
-
gatewayMerchantId: googlePayGatewayMerchantId2
|
|
9866
|
-
}
|
|
9867
|
-
}
|
|
9868
|
-
});
|
|
9869
|
-
const handlePaymentAuthorization = async (paymentData) => {
|
|
9870
|
-
var _a, _b;
|
|
9616
|
+
const handleCharge = async (data) => {
|
|
9617
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
9871
9618
|
try {
|
|
9872
|
-
|
|
9873
|
-
|
|
9874
|
-
|
|
9875
|
-
|
|
9876
|
-
|
|
9877
|
-
|
|
9878
|
-
|
|
9879
|
-
|
|
9880
|
-
|
|
9881
|
-
}
|
|
9882
|
-
|
|
9883
|
-
|
|
9884
|
-
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
error: {
|
|
9888
|
-
intent: "PAYMENT_AUTHORIZATION",
|
|
9889
|
-
message: "Payment failed",
|
|
9890
|
-
reason: "PAYMENT_DATA_INVALID"
|
|
9891
|
-
}
|
|
9892
|
-
};
|
|
9893
|
-
}
|
|
9894
|
-
};
|
|
9895
|
-
const getPaymentsClient = () => {
|
|
9896
|
-
if (!paymentsClientRef.current && typeof window !== "undefined") {
|
|
9897
|
-
const google = window.google;
|
|
9898
|
-
if (!google) return null;
|
|
9899
|
-
paymentsClientRef.current = new google.payments.api.PaymentsClient({
|
|
9900
|
-
environment: googlePayEnvironment2,
|
|
9901
|
-
// ✅ ADD THIS
|
|
9902
|
-
paymentDataCallbacks: {
|
|
9903
|
-
onPaymentAuthorized: handlePaymentAuthorization
|
|
9619
|
+
let dataObj = __spreadValues({
|
|
9620
|
+
pass_fee_amount: Number(amount) - cashDiscount,
|
|
9621
|
+
pass_fee,
|
|
9622
|
+
Token: data == null ? void 0 : data.Token,
|
|
9623
|
+
amount: partialAmount ? partialAmount : amount,
|
|
9624
|
+
postal_code: data == null ? void 0 : data.postalCode,
|
|
9625
|
+
require3ds,
|
|
9626
|
+
isPartial,
|
|
9627
|
+
orderGuid: orderGuid || ordGuid
|
|
9628
|
+
}, saveCardInfo ? {
|
|
9629
|
+
card: {
|
|
9630
|
+
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
9631
|
+
customer_id: customerId,
|
|
9632
|
+
gateway_token: (data == null ? void 0 : data.Token) || (data == null ? void 0 : data.gateway_token),
|
|
9633
|
+
name: cardData == null ? void 0 : cardData.cardName
|
|
9904
9634
|
}
|
|
9635
|
+
} : null);
|
|
9636
|
+
if (require3ds && (data == null ? void 0 : data.stripe_3ds_auth_id)) {
|
|
9637
|
+
dataObj.stripe_3ds_auth_id = data == null ? void 0 : data.stripe_3ds_auth_id;
|
|
9638
|
+
}
|
|
9639
|
+
const chargeResponse = await axios9.post(`${masterBaseUrl}api/v1/gateway/charge/${session_token}`, dataObj);
|
|
9640
|
+
if ((_a2 = chargeResponse == null ? void 0 : chargeResponse.data) == null ? void 0 : _a2.result) {
|
|
9641
|
+
let callbackdata = {
|
|
9642
|
+
// cardDetails: { ...addCard, ...data },
|
|
9643
|
+
callback: __spreadProps(__spreadValues({}, (_b2 = chargeResponse == null ? void 0 : chargeResponse.data) == null ? void 0 : _b2.data), { name: cardData == null ? void 0 : cardData.cardName, isPreAuth })
|
|
9644
|
+
};
|
|
9645
|
+
callback(callbackdata);
|
|
9646
|
+
hideLoader();
|
|
9647
|
+
handleClose();
|
|
9648
|
+
}
|
|
9649
|
+
} catch (error2) {
|
|
9650
|
+
setError(((_d2 = (_c2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || "Something went wrong!");
|
|
9651
|
+
callback({
|
|
9652
|
+
error: ((_f2 = (_e2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _e2.data) == null ? void 0 : _f2.message) || "Something went wrong!",
|
|
9653
|
+
result: (_h2 = (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.data) == null ? void 0 : _h2.result,
|
|
9654
|
+
statusCode: (_i2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _i2.status
|
|
9905
9655
|
});
|
|
9906
|
-
|
|
9907
|
-
return paymentsClientRef.current;
|
|
9908
|
-
};
|
|
9909
|
-
const getIsReadyToPayRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
|
|
9910
|
-
allowedPaymentMethods: [baseCardPaymentMethod]
|
|
9911
|
-
});
|
|
9912
|
-
const getTransactionInfo = () => ({
|
|
9913
|
-
countryCode: "US",
|
|
9914
|
-
currencyCode: "USD",
|
|
9915
|
-
totalPriceStatus: "FINAL",
|
|
9916
|
-
totalPrice: amount,
|
|
9917
|
-
checkoutOption: "COMPLETE_IMMEDIATE_PURCHASE"
|
|
9918
|
-
});
|
|
9919
|
-
const getPaymentDataRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
|
|
9920
|
-
allowedPaymentMethods: [cardPaymentMethod],
|
|
9921
|
-
transactionInfo: getTransactionInfo(),
|
|
9922
|
-
merchantInfo: {
|
|
9923
|
-
merchantId: googlePayMerchantId2,
|
|
9924
|
-
merchantName: googlePayMerchantName
|
|
9925
|
-
},
|
|
9926
|
-
// ✅ ADD THIS
|
|
9927
|
-
callbackIntents: ["PAYMENT_AUTHORIZATION"]
|
|
9928
|
-
});
|
|
9929
|
-
const initializeGooglePay = async () => {
|
|
9930
|
-
try {
|
|
9931
|
-
const client = getPaymentsClient();
|
|
9932
|
-
const response = await client.isReadyToPay(
|
|
9933
|
-
getIsReadyToPayRequest()
|
|
9934
|
-
);
|
|
9935
|
-
if (response.result && containerRef.current) {
|
|
9936
|
-
const button = client.createButton({
|
|
9937
|
-
onClick: onGooglePayClick,
|
|
9938
|
-
allowedPaymentMethods: [baseCardPaymentMethod],
|
|
9939
|
-
buttonType: "pay",
|
|
9940
|
-
buttonColor: "black",
|
|
9941
|
-
buttonRadius: 8
|
|
9942
|
-
});
|
|
9943
|
-
containerRef.current.innerHTML = "";
|
|
9944
|
-
containerRef.current.appendChild(button);
|
|
9945
|
-
}
|
|
9946
|
-
} catch (err) {
|
|
9947
|
-
console.error("Google Pay init error:", err);
|
|
9948
|
-
}
|
|
9949
|
-
};
|
|
9950
|
-
const onGooglePayClick = async () => {
|
|
9951
|
-
const client = getPaymentsClient();
|
|
9952
|
-
try {
|
|
9953
|
-
await client.loadPaymentData(getPaymentDataRequest());
|
|
9954
|
-
} catch (err) {
|
|
9955
|
-
if ((err == null ? void 0 : err.statusCode) !== "CANCELED") {
|
|
9956
|
-
console.error(err);
|
|
9957
|
-
}
|
|
9958
|
-
}
|
|
9959
|
-
};
|
|
9960
|
-
const processPayment = async (paymentData) => {
|
|
9961
|
-
var _a, _b;
|
|
9962
|
-
console.log(paymentData, "paymentData");
|
|
9963
|
-
try {
|
|
9964
|
-
const token = (_b = (_a = paymentData == null ? void 0 : paymentData.paymentMethodData) == null ? void 0 : _a.tokenizationData) == null ? void 0 : _b.token;
|
|
9965
|
-
if (!token) throw new Error("Missing token");
|
|
9966
|
-
const parsed = JSON.parse(token);
|
|
9967
|
-
console.log(parsed, "pararararqr");
|
|
9968
|
-
alert("Payment successful!");
|
|
9969
|
-
} catch (err) {
|
|
9970
|
-
console.error("Processing error:", err);
|
|
9971
|
-
alert("Payment processing failed");
|
|
9972
|
-
} finally {
|
|
9973
|
-
setLoading(false);
|
|
9974
|
-
}
|
|
9975
|
-
};
|
|
9976
|
-
const onScriptLoad = () => {
|
|
9977
|
-
if (!googlePayEnvironment2 || !googlePayGatewayMerchantId2 || !amount || !googlePayMerchantId2) {
|
|
9978
|
-
console.error("Missing Google Pay config");
|
|
9979
|
-
return;
|
|
9980
|
-
}
|
|
9981
|
-
initializeGooglePay();
|
|
9982
|
-
};
|
|
9983
|
-
return /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
9984
|
-
/* @__PURE__ */ jsx34("div", { ref: containerRef, className: "text-center" }),
|
|
9985
|
-
/* @__PURE__ */ jsx34(
|
|
9986
|
-
Script,
|
|
9987
|
-
{
|
|
9988
|
-
src: "https://pay.google.com/gp/p/js/pay.js",
|
|
9989
|
-
strategy: "afterInteractive",
|
|
9990
|
-
onLoad: onScriptLoad
|
|
9991
|
-
}
|
|
9992
|
-
)
|
|
9993
|
-
] });
|
|
9994
|
-
}
|
|
9995
|
-
|
|
9996
|
-
// src/app/components/Atoms/Applepay/ApplePayButton.tsx
|
|
9997
|
-
import { useEffect as useEffect16, useRef as useRef11 } from "react";
|
|
9998
|
-
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
9999
|
-
function ApplePayButton({
|
|
10000
|
-
applePayMerchantId: applePayMerchantId2,
|
|
10001
|
-
applePayAmount,
|
|
10002
|
-
applePayMerchantName,
|
|
10003
|
-
showLoader,
|
|
10004
|
-
completeFractalFlow
|
|
10005
|
-
}) {
|
|
10006
|
-
const applePayRef = useRef11(null);
|
|
10007
|
-
const paymentRequestMethods = [
|
|
10008
|
-
{
|
|
10009
|
-
supportedMethods: "https://apple.com/apple-pay",
|
|
10010
|
-
data: {
|
|
10011
|
-
version: 3,
|
|
10012
|
-
merchantIdentifier: applePayMerchantId2,
|
|
10013
|
-
// ✅ FIXED
|
|
10014
|
-
merchantCapabilities: ["supports3DS"],
|
|
10015
|
-
supportedNetworks: ["amex", "discover", "mastercard", "visa"],
|
|
10016
|
-
// ✅ FIXED
|
|
10017
|
-
countryCode: "US"
|
|
10018
|
-
}
|
|
10019
|
-
}
|
|
10020
|
-
];
|
|
10021
|
-
const paymentRequestOptions = {
|
|
10022
|
-
requestPayerName: false,
|
|
10023
|
-
requestPayerEmail: false,
|
|
10024
|
-
requestPayerPhone: false,
|
|
10025
|
-
requestShipping: false
|
|
10026
|
-
};
|
|
10027
|
-
function buildPaymentDetails() {
|
|
10028
|
-
return {
|
|
10029
|
-
total: {
|
|
10030
|
-
label: applePayMerchantName,
|
|
10031
|
-
amount: {
|
|
10032
|
-
currency: "USD",
|
|
10033
|
-
value: applePayAmount
|
|
10034
|
-
}
|
|
10035
|
-
}
|
|
10036
|
-
};
|
|
10037
|
-
}
|
|
10038
|
-
async function validateMerchant(event) {
|
|
10039
|
-
console.log("\u{1F7E1} STEP 1: Merchant validation started");
|
|
10040
|
-
try {
|
|
10041
|
-
console.log("Validation URL:", event.validationURL);
|
|
10042
|
-
console.log("Domain:", window.location.hostname);
|
|
10043
|
-
const res = await fetch(
|
|
10044
|
-
`${masterBaseUrl}api/v1/widget/generate-apple-pay-session`,
|
|
10045
|
-
{
|
|
10046
|
-
method: "POST",
|
|
10047
|
-
headers: {
|
|
10048
|
-
"Content-Type": "application/json"
|
|
10049
|
-
},
|
|
10050
|
-
body: JSON.stringify({
|
|
10051
|
-
validationUrl: event.validationURL,
|
|
10052
|
-
applePayMerchantId: applePayMerchantId2,
|
|
10053
|
-
applepayDisplayName: applePayMerchantName,
|
|
10054
|
-
requestDomain: window.location.hostname
|
|
10055
|
-
// ✅ IMPORTANT
|
|
10056
|
-
})
|
|
10057
|
-
}
|
|
10058
|
-
);
|
|
10059
|
-
console.log("\u{1F7E1} STEP 2: Response status:", res.status);
|
|
10060
|
-
const data = await res.json();
|
|
10061
|
-
console.log("\u{1F7E2} STEP 3: Session response:", data);
|
|
10062
|
-
if (!data) {
|
|
10063
|
-
console.log("\u274C Invalid session data");
|
|
10064
|
-
event.complete(null);
|
|
10065
|
-
return;
|
|
10066
|
-
}
|
|
10067
|
-
console.log("\u{1F7E2} STEP 4: Completing merchant validation");
|
|
10068
|
-
event.complete(data);
|
|
10069
|
-
} catch (err) {
|
|
10070
|
-
console.log("\u274C Merchant validation failed:", err == null ? void 0 : err.message);
|
|
10071
|
-
event.complete(null);
|
|
10072
|
-
}
|
|
10073
|
-
}
|
|
10074
|
-
async function authorizePayment(paymentResponse) {
|
|
10075
|
-
console.log("\u{1F7E1} STEP 5: Authorizing payment");
|
|
10076
|
-
try {
|
|
10077
|
-
const token = paymentResponse.details.token.paymentData;
|
|
10078
|
-
console.log("\u{1F7E2} STEP 6: Got token");
|
|
10079
|
-
await completeFractalFlow(token, null, "apple_pay");
|
|
10080
|
-
await paymentResponse.complete("success");
|
|
10081
|
-
console.log("\u2705 Payment completed successfully");
|
|
10082
|
-
} catch (err) {
|
|
10083
|
-
console.log("\u274C Authorization failed:", err == null ? void 0 : err.message);
|
|
10084
|
-
await paymentResponse.complete("fail");
|
|
10085
|
-
}
|
|
10086
|
-
}
|
|
10087
|
-
async function handleApplePayClick() {
|
|
10088
|
-
console.log("\u{1F7E1} STEP A: Click detected");
|
|
10089
|
-
try {
|
|
10090
|
-
const request = new PaymentRequest(
|
|
10091
|
-
paymentRequestMethods,
|
|
10092
|
-
buildPaymentDetails(),
|
|
10093
|
-
paymentRequestOptions
|
|
10094
|
-
);
|
|
10095
|
-
request.onmerchantvalidation = validateMerchant;
|
|
10096
|
-
console.log("\u{1F7E1} STEP B: Calling show()");
|
|
10097
|
-
const response = await request.show();
|
|
10098
|
-
console.log("\u{1F7E2} STEP C: Payment sheet opened");
|
|
10099
|
-
await authorizePayment(response);
|
|
10100
|
-
} catch (err) {
|
|
10101
|
-
console.log("\u274C Apple Pay flow failed:", err == null ? void 0 : err.message);
|
|
10102
|
-
}
|
|
10103
|
-
}
|
|
10104
|
-
useEffect16(() => {
|
|
10105
|
-
if (window.ApplePaySession && window.ApplePaySession.canMakePayments()) {
|
|
10106
|
-
console.log("\u2705 Apple Pay is available");
|
|
10107
|
-
} else {
|
|
10108
|
-
console.log("\u274C Apple Pay NOT available");
|
|
10109
|
-
}
|
|
10110
|
-
}, []);
|
|
10111
|
-
useEffect16(() => {
|
|
10112
|
-
const btn = applePayRef.current;
|
|
10113
|
-
if (!btn) return;
|
|
10114
|
-
const handleClick = () => handleApplePayClick();
|
|
10115
|
-
btn.addEventListener("click", handleClick);
|
|
10116
|
-
return () => {
|
|
10117
|
-
btn.removeEventListener("click", handleClick);
|
|
10118
|
-
};
|
|
10119
|
-
}, []);
|
|
10120
|
-
return /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
|
|
10121
|
-
"apple-pay-button",
|
|
10122
|
-
{
|
|
10123
|
-
ref: applePayRef,
|
|
10124
|
-
buttonstyle: "black",
|
|
10125
|
-
type: "pay",
|
|
10126
|
-
locale: "en-US"
|
|
10127
|
-
}
|
|
10128
|
-
) });
|
|
10129
|
-
}
|
|
10130
|
-
|
|
10131
|
-
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
10132
|
-
import { Fragment as Fragment20, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
10133
|
-
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 }) => {
|
|
10134
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
10135
|
-
const hasRunRef = useRef12(false);
|
|
10136
|
-
const cardFormRef = useRef12(null);
|
|
10137
|
-
const bankFormRef = useRef12(null);
|
|
10138
|
-
const expiryYearRef = useRef12(null);
|
|
10139
|
-
const expiryMonthRef = useRef12(null);
|
|
10140
|
-
const cardListRunRef = useRef12(false);
|
|
10141
|
-
const threeDSContainerRef = useRef12(null);
|
|
10142
|
-
const [activetab, setActive] = useState11("card");
|
|
10143
|
-
const [activeList, setActiveList] = useState11("card");
|
|
10144
|
-
const [cardData, setCardData] = useState11();
|
|
10145
|
-
const [cardError, setCardError] = useState11({});
|
|
10146
|
-
const [achData, setAchData] = useState11();
|
|
10147
|
-
const [achError, setAchError] = useState11({});
|
|
10148
|
-
const [saveACHinfo, setSaveACHinfo] = useState11(false);
|
|
10149
|
-
const [saveCardInfo, setSaveCardInfo] = useState11(false);
|
|
10150
|
-
const [error, setError] = useState11("");
|
|
10151
|
-
const [errorIframe, setErrorIframe] = useState11("");
|
|
10152
|
-
const [success, setSuccess] = useState11(false);
|
|
10153
|
-
let [tranId, setTranId] = useState11("");
|
|
10154
|
-
const [loading, setLoading] = useState11(false);
|
|
10155
|
-
const [loading2, setLoading2] = useState11(false);
|
|
10156
|
-
const [loadingIframe, setLoadingIframe] = useState11(false);
|
|
10157
|
-
const [cardList, setCardList] = useState11([]);
|
|
10158
|
-
const [bankList, setBankList] = useState11([]);
|
|
10159
|
-
const [selectedCard, setSelectedCard] = useState11();
|
|
10160
|
-
const [cashDiscount, setCashDiscount] = useState11(Number(amount));
|
|
10161
|
-
const [activeinCard, setActiveinCard] = useState11("form");
|
|
10162
|
-
const [activeinBank, setActiveinBank] = useState11("form");
|
|
10163
|
-
const [isBankActive, setIsBankActive] = useState11(false);
|
|
10164
|
-
const [processingFee, setProcessingFee] = useState11(0);
|
|
10165
|
-
const [clientSecret, setClientSecret] = useState11("");
|
|
10166
|
-
const [errorMessage, setErrorMessage] = useState11(null);
|
|
10167
|
-
const [initialLoader, setInitialLoader] = useState11(false);
|
|
10168
|
-
const [is3DSEnable, setIs3DSEnable] = useState11(false);
|
|
10169
|
-
const [stripeResponse, setStripeResponse] = useState11(null);
|
|
10170
|
-
const [orderLoader, setOrderLoader] = useState11(false);
|
|
10171
|
-
const [orderGuid, setOrderGuid] = useState11(ordGuid || null);
|
|
10172
|
-
const [partialAmount, setPartialAmount] = useState11("");
|
|
10173
|
-
const [partialError, setPartialError] = useState11("");
|
|
10174
|
-
const [remainingAmount, setRemainingAmount] = useState11("");
|
|
10175
|
-
const [paymentGateway, setPaymentGateway] = useState11();
|
|
10176
|
-
const [dcToken, setDCToken] = useState11();
|
|
10177
|
-
const [isBankConsentChecked, setIsBankConsentChecked] = useState11(false);
|
|
10178
|
-
const [errorBankConsent, setErrorBankConsent] = useState11("");
|
|
10179
|
-
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
10180
|
-
let visa2 = S3Url + "widget/visa-img.svg";
|
|
10181
|
-
let americanexp2 = S3Url + "widget/ae-img.svg";
|
|
10182
|
-
let discover2 = S3Url + "widget/discover-img.svg";
|
|
10183
|
-
let defaultcard2 = S3Url + "widget/card.svg";
|
|
10184
|
-
let trash2 = S3Url + "widget/Trash.svg";
|
|
10185
|
-
let bank2 = S3Url + "widget/bank.svg";
|
|
10186
|
-
let secure2 = S3Url + "widget/secure-img.png";
|
|
10187
|
-
let pov2 = S3Url + "widget/pov-by.png";
|
|
10188
|
-
let pax2 = S3Url + "widget/pax.svg";
|
|
10189
|
-
let cardicon = S3Url + "widget/cardicon.svg";
|
|
10190
|
-
let bankicon = S3Url + "widget/bankicon.svg";
|
|
10191
|
-
let defualtcardborder = S3Url + "widget/defualtcardborder.svg";
|
|
10192
|
-
let unionicon = S3Url + "widget/unionpay.svg";
|
|
10193
|
-
let dinersicon = S3Url + "widget/diners.svg";
|
|
10194
|
-
let jcbicon = S3Url + "widget/jcb.svg";
|
|
10195
|
-
const showLoader = () => setLoading(true);
|
|
10196
|
-
const hideLoader = () => setLoading(false);
|
|
10197
|
-
const CalculateCashDiscount = (amount2, surcharge2) => {
|
|
10198
|
-
const surchargeVal = (parseFloat(surcharge2) || 0) / 100;
|
|
10199
|
-
const originalAmount = amount2 / (1 + surchargeVal);
|
|
10200
|
-
return Math.round(originalAmount * 100) / 100;
|
|
10201
|
-
};
|
|
10202
|
-
const cardFeeAmount = Number(pass_fee_amount || 0);
|
|
10203
|
-
const bankFeeAmount = Number(bankSurcharge || 0);
|
|
10204
|
-
const bankSavingsAmount = Math.max(bankFeeAmount > 0 ? cardFeeAmount - bankFeeAmount : cardFeeAmount, 0);
|
|
10205
|
-
const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
|
|
10206
|
-
const tokenizerRef = useRef12(null);
|
|
10207
|
-
const fractalStyles = {
|
|
10208
|
-
input: {
|
|
10209
|
-
"font-family": "'Inter', sans-serif",
|
|
10210
|
-
"font-size": "16px",
|
|
10211
|
-
"color": "#212529",
|
|
10212
|
-
"background-color": "transparent",
|
|
10213
|
-
"padding": "0px",
|
|
10214
|
-
"appearance": "none",
|
|
10215
|
-
"outline": "none",
|
|
10216
|
-
"border": "none",
|
|
10217
|
-
"box-shadow": "none"
|
|
10218
|
-
},
|
|
10219
|
-
":focus": {
|
|
10220
|
-
"color": "#212529",
|
|
10221
|
-
"outline": "none",
|
|
10222
|
-
"border": "none"
|
|
10223
|
-
},
|
|
10224
|
-
"::placeholder": {
|
|
10225
|
-
"color": "#212529"
|
|
10226
|
-
}
|
|
10227
|
-
};
|
|
10228
|
-
const handleCharge = async (data) => {
|
|
10229
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
10230
|
-
try {
|
|
10231
|
-
let dataObj = __spreadValues(__spreadValues({
|
|
10232
|
-
pass_fee_amount: Number(amount) - cashDiscount,
|
|
10233
|
-
pass_fee,
|
|
10234
|
-
Token: data == null ? void 0 : data.Token,
|
|
10235
|
-
amount: partialAmount ? partialAmount : amount,
|
|
10236
|
-
postal_code: data == null ? void 0 : data.postalCode,
|
|
10237
|
-
require3ds,
|
|
10238
|
-
isPartial,
|
|
10239
|
-
orderGuid: orderGuid || ordGuid
|
|
10240
|
-
}, saveCardInfo ? {
|
|
10241
|
-
card: {
|
|
10242
|
-
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
10243
|
-
customer_id: customerId,
|
|
10244
|
-
gateway_token: (data == null ? void 0 : data.Token) || (data == null ? void 0 : data.gateway_token),
|
|
10245
|
-
name: cardData == null ? void 0 : cardData.cardName
|
|
10246
|
-
}
|
|
10247
|
-
} : null), (data == null ? void 0 : data.typeoftoken) ? {
|
|
10248
|
-
typeoftoken: data == null ? void 0 : data.typeoftoken
|
|
10249
|
-
} : null);
|
|
10250
|
-
if (require3ds && (data == null ? void 0 : data.stripe_3ds_auth_id)) {
|
|
10251
|
-
dataObj.stripe_3ds_auth_id = data == null ? void 0 : data.stripe_3ds_auth_id;
|
|
10252
|
-
}
|
|
10253
|
-
const chargeResponse = await axios9.post(`${masterBaseUrl}api/v1/gateway/charge/${session_token}`, dataObj);
|
|
10254
|
-
if ((_a2 = chargeResponse == null ? void 0 : chargeResponse.data) == null ? void 0 : _a2.result) {
|
|
10255
|
-
let callbackdata = {
|
|
10256
|
-
// cardDetails: { ...addCard, ...data },
|
|
10257
|
-
callback: __spreadProps(__spreadValues({}, (_b2 = chargeResponse == null ? void 0 : chargeResponse.data) == null ? void 0 : _b2.data), { name: cardData == null ? void 0 : cardData.cardName, isPreAuth })
|
|
10258
|
-
};
|
|
10259
|
-
callback(callbackdata);
|
|
10260
|
-
hideLoader();
|
|
10261
|
-
handleClose();
|
|
10262
|
-
}
|
|
10263
|
-
} catch (error2) {
|
|
10264
|
-
setError(((_d2 = (_c2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || "Something went wrong!");
|
|
10265
|
-
callback({
|
|
10266
|
-
error: ((_f2 = (_e2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _e2.data) == null ? void 0 : _f2.message) || "Something went wrong!",
|
|
10267
|
-
result: (_h2 = (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.data) == null ? void 0 : _h2.result,
|
|
10268
|
-
statusCode: (_i2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _i2.status
|
|
10269
|
-
});
|
|
10270
|
-
hideLoader();
|
|
9656
|
+
hideLoader();
|
|
10271
9657
|
}
|
|
10272
9658
|
};
|
|
10273
9659
|
const handlePreAuth = async (data) => {
|
|
@@ -10370,28 +9756,19 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10370
9756
|
}
|
|
10371
9757
|
}
|
|
10372
9758
|
if (!isBankConsentChecked) {
|
|
10373
|
-
setErrorBankConsent("Above consent is
|
|
9759
|
+
setErrorBankConsent("Above consent is required");
|
|
10374
9760
|
}
|
|
10375
9761
|
setAchError(errors);
|
|
10376
9762
|
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
10377
9763
|
};
|
|
10378
|
-
const completeFractalFlow = async (tokenizeData, intentid
|
|
9764
|
+
const completeFractalFlow = async (tokenizeData, intentid) => {
|
|
10379
9765
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
10380
9766
|
try {
|
|
10381
|
-
if (typeoftoken == "google_pay") {
|
|
10382
|
-
handleCharge({
|
|
10383
|
-
Token: tokenizeData,
|
|
10384
|
-
postalCode: cardData == null ? void 0 : cardData.zipCode,
|
|
10385
|
-
typeoftoken
|
|
10386
|
-
});
|
|
10387
|
-
return;
|
|
10388
|
-
}
|
|
10389
9767
|
let token = tokenizeData;
|
|
10390
9768
|
let verifyandsaveresp = await axios9.post(`${masterBaseUrl}api/v1/gateway/verify-and-save/${session_token}`, {
|
|
10391
9769
|
token,
|
|
10392
9770
|
require3ds,
|
|
10393
|
-
pass_fee
|
|
10394
|
-
typeoftoken
|
|
9771
|
+
pass_fee
|
|
10395
9772
|
});
|
|
10396
9773
|
if ((verifyandsaveresp == null ? void 0 : verifyandsaveresp.status) == 200) {
|
|
10397
9774
|
let responsetemp = (_a2 = verifyandsaveresp == null ? void 0 : verifyandsaveresp.data) == null ? void 0 : _a2.data;
|
|
@@ -10423,7 +9800,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10423
9800
|
}
|
|
10424
9801
|
};
|
|
10425
9802
|
const handleFractalTokenFlow = async () => {
|
|
10426
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2,
|
|
9803
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t, _u, _v, _w;
|
|
10427
9804
|
try {
|
|
10428
9805
|
const requestOptions = {
|
|
10429
9806
|
method: "POST",
|
|
@@ -10464,29 +9841,17 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10464
9841
|
three_ds_data
|
|
10465
9842
|
);
|
|
10466
9843
|
} catch (error2) {
|
|
10467
|
-
|
|
10468
|
-
let readableMessage = "Something went wrong!";
|
|
10469
|
-
try {
|
|
10470
|
-
const rawError = ((_n2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _n2.data) || (error2 == null ? void 0 : error2.message) || "";
|
|
10471
|
-
const errorText = typeof rawError === "string" ? rawError : JSON.stringify(rawError);
|
|
10472
|
-
const lines = ((_p2 = (_o2 = errorText.split) == null ? void 0 : _o2.call(errorText, "\n")) == null ? void 0 : _p2.filter(Boolean)) || [];
|
|
10473
|
-
const lastLine = lines.at(-1) || "";
|
|
10474
|
-
const parts = (_q2 = lastLine.split) == null ? void 0 : _q2.call(lastLine, ": ");
|
|
10475
|
-
readableMessage = (parts == null ? void 0 : parts.length) > 1 ? parts.pop().trim() : lastLine.trim() || readableMessage;
|
|
10476
|
-
} catch (e) {
|
|
10477
|
-
readableMessage = "Something went wrong!";
|
|
10478
|
-
}
|
|
10479
|
-
setErrorIframe(readableMessage);
|
|
9844
|
+
setErrorIframe(error2);
|
|
10480
9845
|
hideLoader();
|
|
10481
9846
|
}
|
|
10482
9847
|
if (tokenizeData == null ? void 0 : tokenizeData.token) {
|
|
10483
9848
|
let ThreedsData = tokenizeData == null ? void 0 : tokenizeData.stripe_three_ds_response;
|
|
10484
|
-
if (require3ds && !ThreedsData && (ThreedsData == null ? void 0 : ThreedsData.status) === "200 OK" && ((
|
|
9849
|
+
if (require3ds && !ThreedsData && (ThreedsData == null ? void 0 : ThreedsData.status) === "200 OK" && ((_n2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _n2.challenge_url)) {
|
|
10485
9850
|
setError("Something went wrong. Please try again later.");
|
|
10486
9851
|
}
|
|
10487
9852
|
if (require3ds) {
|
|
10488
|
-
if (!((
|
|
10489
|
-
completeFractalFlow(tokenizeData == null ? void 0 : tokenizeData.token, (
|
|
9853
|
+
if (!((_o2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _o2.challenge_url)) {
|
|
9854
|
+
completeFractalFlow(tokenizeData == null ? void 0 : tokenizeData.token, (_p2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _p2.id);
|
|
10490
9855
|
} else {
|
|
10491
9856
|
hideLoader();
|
|
10492
9857
|
setStripeResponse(__spreadProps(__spreadValues({}, ThreedsData == null ? void 0 : ThreedsData.data), {
|
|
@@ -10502,11 +9867,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10502
9867
|
console.log(error2, "error");
|
|
10503
9868
|
let readableMessage = "Something went wrong!";
|
|
10504
9869
|
try {
|
|
10505
|
-
const rawError = ((
|
|
9870
|
+
const rawError = ((_q2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _q2.data) || (error2 == null ? void 0 : error2.message) || "";
|
|
10506
9871
|
const errorText = typeof rawError === "string" ? rawError : JSON.stringify(rawError);
|
|
10507
|
-
const lines = ((
|
|
9872
|
+
const lines = ((_s2 = (_r2 = errorText.split) == null ? void 0 : _r2.call(errorText, "\n")) == null ? void 0 : _s2.filter(Boolean)) || [];
|
|
10508
9873
|
const lastLine = lines.at(-1) || "";
|
|
10509
|
-
const parts = (
|
|
9874
|
+
const parts = (_t = lastLine.split) == null ? void 0 : _t.call(lastLine, ": ");
|
|
10510
9875
|
readableMessage = (parts == null ? void 0 : parts.length) > 1 ? parts.pop().trim() : lastLine.trim() || readableMessage;
|
|
10511
9876
|
} catch (e) {
|
|
10512
9877
|
readableMessage = "Something went wrong!";
|
|
@@ -10514,8 +9879,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10514
9879
|
setError(readableMessage);
|
|
10515
9880
|
callback({
|
|
10516
9881
|
error: readableMessage,
|
|
10517
|
-
result: (
|
|
10518
|
-
statusCode: (
|
|
9882
|
+
result: (_v = (_u = error2 == null ? void 0 : error2.response) == null ? void 0 : _u.data) == null ? void 0 : _v.result,
|
|
9883
|
+
statusCode: (_w = error2 == null ? void 0 : error2.response) == null ? void 0 : _w.status
|
|
10519
9884
|
});
|
|
10520
9885
|
}
|
|
10521
9886
|
};
|
|
@@ -10932,8 +10297,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10932
10297
|
});
|
|
10933
10298
|
};
|
|
10934
10299
|
const handlechargeCustomer = async (e) => {
|
|
10935
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
10936
|
-
e
|
|
10300
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
10301
|
+
e.currentTarget.blur();
|
|
10937
10302
|
if (loading) return;
|
|
10938
10303
|
let customer_id = customerId;
|
|
10939
10304
|
let card_id = selectedCard == null ? void 0 : selectedCard.id;
|
|
@@ -10980,6 +10345,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10980
10345
|
statusCode: (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.status
|
|
10981
10346
|
});
|
|
10982
10347
|
hideLoader();
|
|
10348
|
+
setError(((_i2 = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.message) || "Something went wrong!");
|
|
10983
10349
|
}
|
|
10984
10350
|
} else {
|
|
10985
10351
|
setError("Please Select A Card/Bank");
|
|
@@ -11055,21 +10421,21 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11055
10421
|
setOrderLoader(false);
|
|
11056
10422
|
}
|
|
11057
10423
|
};
|
|
11058
|
-
|
|
10424
|
+
useEffect15(() => {
|
|
11059
10425
|
if (!show && !autoTrigger) {
|
|
11060
10426
|
hasRunRef.current = false;
|
|
11061
10427
|
cardListRunRef.current = false;
|
|
11062
10428
|
}
|
|
11063
10429
|
}, [show, autoTrigger]);
|
|
11064
|
-
|
|
11065
|
-
if (!hasRunRef.current && (show || autoTrigger)
|
|
10430
|
+
useEffect15(() => {
|
|
10431
|
+
if (!hasRunRef.current && (show || autoTrigger)) {
|
|
11066
10432
|
getPaymentDetails();
|
|
11067
10433
|
if (isPartial && !partialRef) {
|
|
11068
10434
|
crateOrderFrac();
|
|
11069
10435
|
}
|
|
11070
10436
|
}
|
|
11071
|
-
}, [show, autoTrigger, isPartial
|
|
11072
|
-
|
|
10437
|
+
}, [show, autoTrigger, isPartial]);
|
|
10438
|
+
useEffect15(() => {
|
|
11073
10439
|
if ((show || autoTrigger) && pass_fee_amount) {
|
|
11074
10440
|
let cashdisc = Number(amount) - Number(pass_fee_amount);
|
|
11075
10441
|
if (cashdisc && !isNaN(cashdisc)) {
|
|
@@ -11131,7 +10497,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11131
10497
|
console.error("3DS Auth failed \u274C", status);
|
|
11132
10498
|
setError(`3DS Authentication ${status}`);
|
|
11133
10499
|
};
|
|
11134
|
-
|
|
10500
|
+
useEffect15(() => {
|
|
11135
10501
|
if (setHandleCloseRef) {
|
|
11136
10502
|
setHandleCloseRef(() => handleClose);
|
|
11137
10503
|
}
|
|
@@ -11149,95 +10515,24 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11149
10515
|
setPartialError("");
|
|
11150
10516
|
}
|
|
11151
10517
|
};
|
|
11152
|
-
|
|
10518
|
+
useEffect15(() => {
|
|
11153
10519
|
if (typeof FractalTokenizer === "undefined") return;
|
|
11154
10520
|
const tokenizer = new FractalTokenizer({
|
|
11155
10521
|
styles: {}
|
|
11156
10522
|
});
|
|
11157
10523
|
}, []);
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
useEffect17(() => {
|
|
11164
|
-
stateRef.current = {
|
|
11165
|
-
activeinBank,
|
|
11166
|
-
activeinCard,
|
|
11167
|
-
activetab
|
|
11168
|
-
};
|
|
11169
|
-
}, [activeinBank, activeinCard, activetab]);
|
|
11170
|
-
const submit = useCallback(() => {
|
|
11171
|
-
var _a2, _b2;
|
|
11172
|
-
const { activeinBank: activeinBank2, activeinCard: activeinCard2, activetab: activetab2 } = stateRef.current;
|
|
11173
|
-
if (activetab2 === "card") {
|
|
11174
|
-
if (activeinCard2 === "form") {
|
|
11175
|
-
(_a2 = cardFormRef.current) == null ? void 0 : _a2.requestSubmit();
|
|
11176
|
-
} else if (activeinCard2 === "list") {
|
|
11177
|
-
handlechargeCustomer();
|
|
11178
|
-
}
|
|
11179
|
-
} else if (activetab2 === "ach") {
|
|
11180
|
-
if (activeinBank2 === "form") {
|
|
11181
|
-
(_b2 = bankFormRef.current) == null ? void 0 : _b2.requestSubmit();
|
|
11182
|
-
} else if (activeinBank2 === "list") {
|
|
11183
|
-
handlechargeCustomer();
|
|
11184
|
-
}
|
|
11185
|
-
}
|
|
11186
|
-
}, []);
|
|
11187
|
-
useEffect17(() => {
|
|
11188
|
-
onSubmit == null ? void 0 : onSubmit(submit);
|
|
11189
|
-
}, [onSubmit, submit]);
|
|
11190
|
-
function detectCardType(cardinput) {
|
|
11191
|
-
if (!cardinput) return null;
|
|
11192
|
-
const number = cardinput.replace(/\D/g, "");
|
|
11193
|
-
const patterns = {
|
|
11194
|
-
visa: /^4/,
|
|
11195
|
-
mastercard: /^(5[1-5]|2[2-7][0-9]{2})/,
|
|
11196
|
-
amex: /^3[47]/,
|
|
11197
|
-
discover: /^(6011|65|64[4-9])/,
|
|
11198
|
-
diners: /^(30[0-5]|36|38)/,
|
|
11199
|
-
jcb: /^(35[2-8][0-9])/,
|
|
11200
|
-
unionpay: /^62/
|
|
11201
|
-
};
|
|
11202
|
-
for (const [type, regex] of Object.entries(patterns)) {
|
|
11203
|
-
if (regex.test(number)) {
|
|
11204
|
-
return type;
|
|
11205
|
-
}
|
|
11206
|
-
}
|
|
11207
|
-
return "unknown";
|
|
11208
|
-
}
|
|
11209
|
-
function getCardImage(cardInput) {
|
|
11210
|
-
const cardType = detectCardType(cardInput);
|
|
11211
|
-
switch (cardType) {
|
|
11212
|
-
case "visa":
|
|
11213
|
-
return /* @__PURE__ */ jsx36("img", { src: visa2, alt: "visa", width: 33 });
|
|
11214
|
-
case "mastercard":
|
|
11215
|
-
return /* @__PURE__ */ jsx36("img", { src: mastercard2, width: 33, alt: "mastercard" });
|
|
11216
|
-
case "amex":
|
|
11217
|
-
return /* @__PURE__ */ jsx36("img", { src: americanexp2, alt: "amex", width: 33 });
|
|
11218
|
-
case "discover":
|
|
11219
|
-
return /* @__PURE__ */ jsx36("img", { src: discover2, width: 33, alt: "discover" });
|
|
11220
|
-
case "diners":
|
|
11221
|
-
return /* @__PURE__ */ jsx36("img", { src: dinersicon, alt: "Diners Club" });
|
|
11222
|
-
case "jcb":
|
|
11223
|
-
return /* @__PURE__ */ jsx36("img", { src: jcbicon, alt: "JCB" });
|
|
11224
|
-
case "unionpay":
|
|
11225
|
-
return /* @__PURE__ */ jsx36("img", { src: unionicon, alt: "UnionPay" });
|
|
11226
|
-
default:
|
|
11227
|
-
return /* @__PURE__ */ jsx36("img", { src: defualtcardborder, alt: "card" });
|
|
11228
|
-
}
|
|
11229
|
-
}
|
|
11230
|
-
return /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11231
|
-
(initialLoader || !onLoad) && /* @__PURE__ */ jsx36(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
|
|
11232
|
-
error && /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
|
|
11233
|
-
errorIframe && /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
|
|
10524
|
+
console.log(activeinCard === "list", "activeinCard", activeList);
|
|
10525
|
+
return /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10526
|
+
initialLoader && /* @__PURE__ */ jsx32(Loader_default, { loading: initialLoader }),
|
|
10527
|
+
error && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error, onClose: handleClose }) }),
|
|
10528
|
+
errorIframe && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error: errorIframe, onClose: () => {
|
|
11234
10529
|
setErrorIframe("");
|
|
11235
|
-
}
|
|
11236
|
-
/* @__PURE__ */
|
|
11237
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */
|
|
11238
|
-
/* @__PURE__ */
|
|
11239
|
-
/* @__PURE__ */
|
|
11240
|
-
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */
|
|
10530
|
+
} }) }),
|
|
10531
|
+
!error && !errorIframe && /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10532
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx32(Loader_default, { loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
|
|
10533
|
+
/* @__PURE__ */ jsxs19("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
|
|
10534
|
+
/* @__PURE__ */ jsx32("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
|
|
10535
|
+
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx32(
|
|
11241
10536
|
ThreeDSChallenge,
|
|
11242
10537
|
{
|
|
11243
10538
|
containerRef: threeDSContainerRef,
|
|
@@ -11247,33 +10542,40 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11247
10542
|
onSuccess: handleSuccess,
|
|
11248
10543
|
onError: handleError
|
|
11249
10544
|
}
|
|
11250
|
-
) : /* @__PURE__ */
|
|
11251
|
-
/* @__PURE__ */
|
|
11252
|
-
/* @__PURE__ */
|
|
11253
|
-
/* @__PURE__ */
|
|
10545
|
+
) : /* @__PURE__ */ jsxs19("div", { className: "parent-pay-container", children: [
|
|
10546
|
+
/* @__PURE__ */ jsx32("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs19("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
10547
|
+
/* @__PURE__ */ jsx32("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx32("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" }) }),
|
|
10548
|
+
/* @__PURE__ */ jsx32("defs", { children: /* @__PURE__ */ jsx32("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx32("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
11254
10549
|
] }) }),
|
|
11255
|
-
/* @__PURE__ */
|
|
11256
|
-
/* @__PURE__ */
|
|
11257
|
-
|
|
11258
|
-
/* @__PURE__ */
|
|
11259
|
-
/* @__PURE__ */
|
|
11260
|
-
/* @__PURE__ */
|
|
11261
|
-
/* @__PURE__ */
|
|
11262
|
-
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */
|
|
10550
|
+
/* @__PURE__ */ jsx32("div", { className: "pay-main-logo-res" }),
|
|
10551
|
+
/* @__PURE__ */ jsxs19("div", { className: "pay-container", children: [
|
|
10552
|
+
/* @__PURE__ */ jsxs19("div", { className: "pay-header pay-conatiner-one", children: [
|
|
10553
|
+
/* @__PURE__ */ jsxs19("div", { className: "pay-conatiner-one-first", children: [
|
|
10554
|
+
/* @__PURE__ */ jsxs19("div", { className: "pay-logo-container", children: [
|
|
10555
|
+
/* @__PURE__ */ jsx32("div", { className: "pay-main-logo" }),
|
|
10556
|
+
/* @__PURE__ */ jsx32("h1", { className: "pay-heading", children: "Pay" }),
|
|
10557
|
+
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs19("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
|
|
11263
10558
|
" ",
|
|
11264
|
-
/* @__PURE__ */
|
|
10559
|
+
/* @__PURE__ */ jsx32(IoArrowBack4, {}),
|
|
11265
10560
|
" Back"
|
|
11266
10561
|
] })
|
|
11267
10562
|
] }),
|
|
11268
|
-
/* @__PURE__ */
|
|
11269
|
-
/* @__PURE__ */
|
|
11270
|
-
/* @__PURE__ */
|
|
11271
|
-
/* @__PURE__ */
|
|
11272
|
-
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */
|
|
10563
|
+
/* @__PURE__ */ jsx32("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs19("div", { className: "pay-amount-conatiner", children: [
|
|
10564
|
+
/* @__PURE__ */ jsx32("small", { className: "pay-payment-amount", children: "Select payment type" }),
|
|
10565
|
+
/* @__PURE__ */ jsxs19("div", { className: "frac-card-bank-radio-main", children: [
|
|
10566
|
+
/* @__PURE__ */ jsx32(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
10567
|
+
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx32(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab })
|
|
11273
10568
|
] }),
|
|
11274
|
-
|
|
11275
|
-
/* @__PURE__ */
|
|
11276
|
-
|
|
10569
|
+
pass_fee && activetab === "card" && cashDiscount && Number(amount) - Number(cashDiscount) > 0 ? /* @__PURE__ */ jsxs19("div", { className: "frac-cash-discount-fee", children: [
|
|
10570
|
+
/* @__PURE__ */ jsxs19("small", { children: [
|
|
10571
|
+
activetab === "card" ? "Cash Discount" : "Cash Discount Savings",
|
|
10572
|
+
" "
|
|
10573
|
+
] }),
|
|
10574
|
+
/* @__PURE__ */ jsx32("p", { children: formatUSD((Number(amount) - Number(cashDiscount)).toFixed(2)) })
|
|
10575
|
+
] }) : null,
|
|
10576
|
+
isPartial && /* @__PURE__ */ jsxs19("div", { className: "frac-partial-payment-input", children: [
|
|
10577
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
10578
|
+
/* @__PURE__ */ jsx32(
|
|
11277
10579
|
NumericFormat2,
|
|
11278
10580
|
{
|
|
11279
10581
|
prefix: "$",
|
|
@@ -11297,403 +10599,331 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
11297
10599
|
}
|
|
11298
10600
|
}
|
|
11299
10601
|
),
|
|
11300
|
-
partialError && /* @__PURE__ */
|
|
10602
|
+
partialError && /* @__PURE__ */ jsx32("span", { className: "error-span", children: partialError })
|
|
11301
10603
|
] })
|
|
11302
10604
|
] }) })
|
|
11303
10605
|
] }),
|
|
11304
|
-
/* @__PURE__ */
|
|
11305
|
-
/* @__PURE__ */
|
|
11306
|
-
/* @__PURE__ */
|
|
10606
|
+
/* @__PURE__ */ jsxs19("div", { className: "pay-conatiner-one-last", children: [
|
|
10607
|
+
/* @__PURE__ */ jsx32("img", { src: secure2, alt: "" }),
|
|
10608
|
+
/* @__PURE__ */ jsx32("img", { src: pov2, alt: "" }),
|
|
11307
10609
|
"Secure payments powered by Fractal"
|
|
11308
10610
|
] })
|
|
11309
10611
|
] }),
|
|
11310
|
-
/* @__PURE__ */
|
|
11311
|
-
|
|
11312
|
-
/* @__PURE__ */
|
|
11313
|
-
/* @__PURE__ */
|
|
11314
|
-
|
|
10612
|
+
/* @__PURE__ */ jsx32("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx32("div", { className: "col-md-12", children: /* @__PURE__ */ jsx32("div", { id: "payment-form-div", children: is3DSEnable ? clientSecret && /* @__PURE__ */ jsx32(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10613
|
+
/* @__PURE__ */ jsxs19("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
|
|
10614
|
+
/* @__PURE__ */ jsxs19("div", { className: "frac-heading-card-wrap", children: [
|
|
10615
|
+
/* @__PURE__ */ jsx32("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs19("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
|
|
10616
|
+
" ",
|
|
10617
|
+
/* @__PURE__ */ jsx32(IoArrowBack4, {})
|
|
10618
|
+
] }) }),
|
|
10619
|
+
/* @__PURE__ */ jsx32("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
11315
10620
|
] }),
|
|
11316
|
-
|
|
11317
|
-
/* @__PURE__ */
|
|
11318
|
-
/* @__PURE__ */
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
" ",
|
|
11344
|
-
/* @__PURE__ */ jsx36(IoArrowBack4, {})
|
|
11345
|
-
] }) }),
|
|
11346
|
-
/* @__PURE__ */ jsx36("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
10621
|
+
/* @__PURE__ */ jsxs19("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
|
|
10622
|
+
/* @__PURE__ */ jsx32("img", { src: visa2, alt: "", width: 33 }),
|
|
10623
|
+
/* @__PURE__ */ jsx32("img", { src: mastercard2, width: 33, alt: "" }),
|
|
10624
|
+
/* @__PURE__ */ jsx32("img", { src: americanexp2, alt: "", width: 33 }),
|
|
10625
|
+
/* @__PURE__ */ jsx32("img", { src: discover2, width: 33, alt: "" })
|
|
10626
|
+
] }),
|
|
10627
|
+
activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10628
|
+
/* @__PURE__ */ jsx32(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
|
|
10629
|
+
setActiveinCard("form");
|
|
10630
|
+
} }),
|
|
10631
|
+
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", style: { padding: "0" }, children: /* @__PURE__ */ jsx32("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: partialAmount ? formatUSD((_c = Number(partialAmount)) == null ? void 0 : _c.toFixed(2)) : formatUSD((_d = Number(amount)) == null ? void 0 : _d.toFixed(2)) }) })
|
|
10632
|
+
] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs19("form", { id: "paymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
10633
|
+
if (e.key === "Enter" && loading) {
|
|
10634
|
+
e.preventDefault();
|
|
10635
|
+
e.stopPropagation();
|
|
10636
|
+
}
|
|
10637
|
+
}, children: [
|
|
10638
|
+
/* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
10639
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10640
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
10641
|
+
/* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
10642
|
+
const value = e.target.value;
|
|
10643
|
+
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
10644
|
+
handleCardChange("cardName", value);
|
|
10645
|
+
}
|
|
10646
|
+
} }),
|
|
10647
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11347
10648
|
] }),
|
|
11348
|
-
/* @__PURE__ */
|
|
11349
|
-
/* @__PURE__ */
|
|
11350
|
-
/* @__PURE__ */
|
|
11351
|
-
|
|
11352
|
-
|
|
11353
|
-
|
|
10649
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10650
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
|
|
10651
|
+
/* @__PURE__ */ jsx32("div", { className: "toggle-num-wrapper", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx32(
|
|
10652
|
+
FractalFields_default,
|
|
10653
|
+
{
|
|
10654
|
+
fractalStyles,
|
|
10655
|
+
tokenizerRef,
|
|
10656
|
+
isSky: true
|
|
10657
|
+
}
|
|
10658
|
+
) })
|
|
10659
|
+
] }),
|
|
10660
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10661
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "zip", children: "ZIP" }),
|
|
10662
|
+
/* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_e = cardData == null ? void 0 : cardData.zipCode) != null ? _e : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
|
|
10663
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
|
|
10664
|
+
] }),
|
|
10665
|
+
customerId && /* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
10666
|
+
/* @__PURE__ */ jsx32(
|
|
10667
|
+
"input",
|
|
10668
|
+
{
|
|
10669
|
+
type: "checkbox",
|
|
10670
|
+
id: "save_card",
|
|
10671
|
+
className: "toggle-checkbox",
|
|
10672
|
+
checked: saveCardInfo,
|
|
10673
|
+
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
10674
|
+
}
|
|
10675
|
+
),
|
|
10676
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
10677
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
10678
|
+
/* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
|
|
10679
|
+
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
|
|
10680
|
+
"svg",
|
|
10681
|
+
{
|
|
10682
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10683
|
+
width: "20",
|
|
10684
|
+
height: "20",
|
|
10685
|
+
viewBox: "0 0 20 20",
|
|
10686
|
+
fill: "none",
|
|
10687
|
+
children: [
|
|
10688
|
+
/* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
10689
|
+
/* @__PURE__ */ jsx32(
|
|
10690
|
+
"path",
|
|
10691
|
+
{
|
|
10692
|
+
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",
|
|
10693
|
+
fill: "#161616"
|
|
10694
|
+
}
|
|
10695
|
+
)
|
|
10696
|
+
]
|
|
10697
|
+
}
|
|
10698
|
+
) }),
|
|
10699
|
+
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
10700
|
+
"If checked, I agree to give the ",
|
|
10701
|
+
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10702
|
+
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
10703
|
+
] }) })
|
|
10704
|
+
] })
|
|
10705
|
+
] }) })
|
|
11354
10706
|
] }),
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
10707
|
+
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx32("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount ? formatUSD((_f = Number(partialAmount)) == null ? void 0 : _f.toFixed(2)) : formatUSD((_g = Number(amount)) == null ? void 0 : _g.toFixed(2)) }) })
|
|
10708
|
+
] }) : /* @__PURE__ */ jsxs19("form", { id: "PaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
10709
|
+
if (e.key === "Enter" && loading) {
|
|
10710
|
+
e.preventDefault();
|
|
10711
|
+
e.stopPropagation();
|
|
10712
|
+
}
|
|
10713
|
+
}, children: [
|
|
10714
|
+
/* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
10715
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10716
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
10717
|
+
/* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
10718
|
+
const value = e.target.value;
|
|
10719
|
+
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
10720
|
+
handleCardChange("cardName", value);
|
|
10721
|
+
}
|
|
10722
|
+
} }),
|
|
10723
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
10724
|
+
] }),
|
|
10725
|
+
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx32(
|
|
10726
|
+
DataCapFields,
|
|
11373
10727
|
{
|
|
11374
|
-
|
|
11375
|
-
|
|
11376
|
-
|
|
11377
|
-
googlePayMerchantId,
|
|
11378
|
-
googlePayMerchantName: merchantName,
|
|
11379
|
-
completeFractalFlow,
|
|
11380
|
-
setLoading
|
|
11381
|
-
}
|
|
11382
|
-
),
|
|
11383
|
-
/* @__PURE__ */ jsx36("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx36("span", { children: "or" }) }),
|
|
11384
|
-
/* @__PURE__ */ jsxs21("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11385
|
-
if (e.key === "Enter" && loading) {
|
|
11386
|
-
e.preventDefault();
|
|
11387
|
-
e.stopPropagation();
|
|
10728
|
+
isOpen: show || autoTrigger,
|
|
10729
|
+
tokenKey: dcToken,
|
|
10730
|
+
setLoader: activeinCard === "form" ? setLoadingIframe : null
|
|
11388
10731
|
}
|
|
11389
|
-
},
|
|
11390
|
-
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
|
|
11394
|
-
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11398
|
-
} }),
|
|
11399
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11400
|
-
] }),
|
|
11401
|
-
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11402
|
-
/* @__PURE__ */ jsx36("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
|
|
11403
|
-
/* @__PURE__ */ jsx36("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx36(
|
|
11404
|
-
FractalFields_default,
|
|
11405
|
-
{
|
|
11406
|
-
fractalStyles,
|
|
11407
|
-
tokenizerRef,
|
|
11408
|
-
isSky: true
|
|
11409
|
-
}
|
|
11410
|
-
) })
|
|
11411
|
-
] }),
|
|
11412
|
-
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11413
|
-
/* @__PURE__ */ jsx36("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11414
|
-
/* @__PURE__ */ jsx36("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) }),
|
|
11415
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11416
|
-
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11417
|
-
"Credit cards include a fee amount of ",
|
|
11418
|
-
/* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11419
|
-
"."
|
|
11420
|
-
] })
|
|
11421
|
-
] }),
|
|
11422
|
-
customerId && /* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
11423
|
-
/* @__PURE__ */ jsx36(
|
|
11424
|
-
"input",
|
|
11425
|
-
{
|
|
11426
|
-
type: "checkbox",
|
|
11427
|
-
id: "save_card",
|
|
11428
|
-
className: "toggle-checkbox",
|
|
11429
|
-
checked: saveCardInfo,
|
|
11430
|
-
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11431
|
-
}
|
|
11432
|
-
),
|
|
11433
|
-
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11434
|
-
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11435
|
-
/* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
|
|
11436
|
-
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
|
|
11437
|
-
"svg",
|
|
11438
|
-
{
|
|
11439
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11440
|
-
width: "20",
|
|
11441
|
-
height: "20",
|
|
11442
|
-
viewBox: "0 0 20 20",
|
|
11443
|
-
fill: "none",
|
|
11444
|
-
children: [
|
|
11445
|
-
/* @__PURE__ */ jsx36("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11446
|
-
/* @__PURE__ */ jsx36(
|
|
11447
|
-
"path",
|
|
11448
|
-
{
|
|
11449
|
-
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",
|
|
11450
|
-
fill: "#161616"
|
|
11451
|
-
}
|
|
11452
|
-
)
|
|
11453
|
-
]
|
|
11454
|
-
}
|
|
11455
|
-
) }),
|
|
11456
|
-
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11457
|
-
"If checked, I agree to give the ",
|
|
11458
|
-
/* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
|
|
11459
|
-
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11460
|
-
] }) })
|
|
11461
|
-
] })
|
|
11462
|
-
] }) })
|
|
11463
|
-
] }),
|
|
11464
|
-
/* @__PURE__ */ jsx36("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx36("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)) }) })
|
|
11465
|
-
] })
|
|
11466
|
-
] }) : /* @__PURE__ */ jsxs21("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11467
|
-
if (e.key === "Enter" && loading) {
|
|
11468
|
-
e.preventDefault();
|
|
11469
|
-
e.stopPropagation();
|
|
11470
|
-
}
|
|
11471
|
-
}, children: [
|
|
11472
|
-
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11473
|
-
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11474
|
-
/* @__PURE__ */ jsx36("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11475
|
-
/* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11476
|
-
const value = e.target.value;
|
|
11477
|
-
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11478
|
-
handleCardChange("cardName", value);
|
|
11479
|
-
}
|
|
11480
|
-
} }),
|
|
11481
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11482
|
-
] }),
|
|
11483
|
-
/* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx36(
|
|
11484
|
-
DataCapFields,
|
|
10732
|
+
) }),
|
|
10733
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10734
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "zip", children: "ZIP" }),
|
|
10735
|
+
/* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_h = cardData == null ? void 0 : cardData.zipCode) != null ? _h : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
|
|
10736
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
|
|
10737
|
+
] }),
|
|
10738
|
+
customerId && /* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
10739
|
+
/* @__PURE__ */ jsx32(
|
|
10740
|
+
"input",
|
|
11485
10741
|
{
|
|
11486
|
-
|
|
11487
|
-
|
|
11488
|
-
|
|
11489
|
-
|
|
10742
|
+
type: "checkbox",
|
|
10743
|
+
id: "save_card",
|
|
10744
|
+
className: "toggle-checkbox",
|
|
10745
|
+
checked: saveCardInfo,
|
|
10746
|
+
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11490
10747
|
}
|
|
11491
|
-
)
|
|
11492
|
-
/* @__PURE__ */
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
"Credit cards include a fee amount of ",
|
|
11498
|
-
/* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11499
|
-
"."
|
|
11500
|
-
] })
|
|
11501
|
-
] }),
|
|
11502
|
-
customerId && /* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
11503
|
-
/* @__PURE__ */ jsx36(
|
|
11504
|
-
"input",
|
|
10748
|
+
),
|
|
10749
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
10750
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
10751
|
+
/* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
|
|
10752
|
+
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
|
|
10753
|
+
"svg",
|
|
11505
10754
|
{
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
10755
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10756
|
+
width: "20",
|
|
10757
|
+
height: "20",
|
|
10758
|
+
viewBox: "0 0 20 20",
|
|
10759
|
+
fill: "none",
|
|
10760
|
+
children: [
|
|
10761
|
+
/* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
10762
|
+
/* @__PURE__ */ jsx32(
|
|
10763
|
+
"path",
|
|
10764
|
+
{
|
|
10765
|
+
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",
|
|
10766
|
+
fill: "#161616"
|
|
10767
|
+
}
|
|
10768
|
+
)
|
|
10769
|
+
]
|
|
11511
10770
|
}
|
|
11512
|
-
),
|
|
11513
|
-
/* @__PURE__ */
|
|
11514
|
-
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11515
|
-
/* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
|
|
11516
|
-
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
|
|
11517
|
-
"svg",
|
|
11518
|
-
{
|
|
11519
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11520
|
-
width: "20",
|
|
11521
|
-
height: "20",
|
|
11522
|
-
viewBox: "0 0 20 20",
|
|
11523
|
-
fill: "none",
|
|
11524
|
-
children: [
|
|
11525
|
-
/* @__PURE__ */ jsx36("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11526
|
-
/* @__PURE__ */ jsx36(
|
|
11527
|
-
"path",
|
|
11528
|
-
{
|
|
11529
|
-
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",
|
|
11530
|
-
fill: "#161616"
|
|
11531
|
-
}
|
|
11532
|
-
)
|
|
11533
|
-
]
|
|
11534
|
-
}
|
|
11535
|
-
) }),
|
|
11536
|
-
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11537
|
-
"If checked, I agree to give the ",
|
|
11538
|
-
/* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
|
|
11539
|
-
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11540
|
-
] }) })
|
|
11541
|
-
] })
|
|
11542
|
-
] }) })
|
|
11543
|
-
] }),
|
|
11544
|
-
/* @__PURE__ */ jsx36("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx36("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)) }) })
|
|
11545
|
-
] })
|
|
11546
|
-
] }),
|
|
11547
|
-
/* @__PURE__ */ jsx36("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11548
|
-
!onSubmit && /* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
|
|
11549
|
-
/* @__PURE__ */ jsx36("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs21("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
|
|
11550
|
-
" ",
|
|
11551
|
-
/* @__PURE__ */ jsx36(IoArrowBack4, {})
|
|
11552
|
-
] }) }),
|
|
11553
|
-
/* @__PURE__ */ jsx36("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
|
|
11554
|
-
] }),
|
|
11555
|
-
activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11556
|
-
/* @__PURE__ */ jsx36(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
|
|
11557
|
-
setActiveinBank("form");
|
|
11558
|
-
} }),
|
|
11559
|
-
/* @__PURE__ */ jsx36("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx36("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_m = Number(bankAmount)) == null ? void 0 : _m.toFixed(2)) }) })
|
|
11560
|
-
] }) : /* @__PURE__ */ jsxs21("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
|
|
11561
|
-
if (e.key === "Enter" && loading) {
|
|
11562
|
-
e.preventDefault();
|
|
11563
|
-
e.stopPropagation();
|
|
11564
|
-
}
|
|
11565
|
-
}, children: [
|
|
11566
|
-
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: {
|
|
11567
|
-
minHeight: "444px",
|
|
11568
|
-
maxHeight: "444px"
|
|
11569
|
-
}, children: [
|
|
11570
|
-
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11571
|
-
/* @__PURE__ */ jsx36("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
11572
|
-
/* @__PURE__ */ jsx36("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 }),
|
|
11573
|
-
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
11574
|
-
] }),
|
|
11575
|
-
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11576
|
-
/* @__PURE__ */ jsx36("label", { htmlFor: "routingnumber", children: "Routing number" }),
|
|
11577
|
-
/* @__PURE__ */ jsx36(
|
|
11578
|
-
"input",
|
|
11579
|
-
{
|
|
11580
|
-
type: "text",
|
|
11581
|
-
id: "routingnumber",
|
|
11582
|
-
className: "form-control-frac",
|
|
11583
|
-
maxLength: 9,
|
|
11584
|
-
placeholder: "000000000",
|
|
11585
|
-
name: "routingNumber",
|
|
11586
|
-
value: (_o = achData == null ? void 0 : achData.routingNumber) != null ? _o : "",
|
|
11587
|
-
onChange: handleChangeAch
|
|
11588
|
-
}
|
|
11589
|
-
),
|
|
11590
|
-
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
|
|
11591
|
-
] }),
|
|
11592
|
-
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11593
|
-
/* @__PURE__ */ jsx36("label", { htmlFor: "accountnumber", children: "Account number" }),
|
|
11594
|
-
/* @__PURE__ */ jsx36(
|
|
11595
|
-
"input",
|
|
11596
|
-
{
|
|
11597
|
-
type: "text",
|
|
11598
|
-
id: "accountnumber",
|
|
11599
|
-
className: "form-control-frac",
|
|
11600
|
-
maxLength: 16,
|
|
11601
|
-
placeholder: "0000000000",
|
|
11602
|
-
name: "accountNumber",
|
|
11603
|
-
value: (_p = achData == null ? void 0 : achData.accountNumber) != null ? _p : "",
|
|
11604
|
-
onChange: handleChangeAch
|
|
11605
|
-
}
|
|
11606
|
-
),
|
|
11607
|
-
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
|
|
11608
|
-
] }),
|
|
11609
|
-
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11610
|
-
/* @__PURE__ */ jsx36("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
|
|
11611
|
-
/* @__PURE__ */ jsx36(
|
|
11612
|
-
"input",
|
|
11613
|
-
{
|
|
11614
|
-
type: "text",
|
|
11615
|
-
id: "confirmaccountnumber",
|
|
11616
|
-
className: "form-control-frac",
|
|
11617
|
-
maxLength: 16,
|
|
11618
|
-
placeholder: "0000000000",
|
|
11619
|
-
name: "confirmAccountNumber",
|
|
11620
|
-
value: (_q = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _q : "",
|
|
11621
|
-
onChange: handleChangeAch
|
|
11622
|
-
}
|
|
11623
|
-
),
|
|
11624
|
-
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
|
|
11625
|
-
] }),
|
|
11626
|
-
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11627
|
-
/* @__PURE__ */ jsx36("label", { htmlFor: "bankname", children: "Bank name" }),
|
|
11628
|
-
/* @__PURE__ */ jsx36(
|
|
11629
|
-
"input",
|
|
11630
|
-
{
|
|
11631
|
-
type: "text",
|
|
11632
|
-
id: "bankname",
|
|
11633
|
-
className: "form-control-frac",
|
|
11634
|
-
maxLength: 100,
|
|
11635
|
-
placeholder: "My Bank",
|
|
11636
|
-
name: "bankName",
|
|
11637
|
-
value: (_r = achData == null ? void 0 : achData.bankName) != null ? _r : "",
|
|
11638
|
-
onChange: handleChangeAch
|
|
11639
|
-
}
|
|
11640
|
-
),
|
|
11641
|
-
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
|
|
11642
|
-
] }),
|
|
11643
|
-
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11644
|
-
/* @__PURE__ */ jsx36("label", { htmlFor: "companyName", children: "Company name" }),
|
|
11645
|
-
/* @__PURE__ */ jsx36(
|
|
11646
|
-
"input",
|
|
11647
|
-
{
|
|
11648
|
-
type: "text",
|
|
11649
|
-
id: "companyName",
|
|
11650
|
-
className: "form-control-frac",
|
|
11651
|
-
maxLength: 100,
|
|
11652
|
-
placeholder: "My Company",
|
|
11653
|
-
name: "companyName",
|
|
11654
|
-
value: (_s = achData == null ? void 0 : achData.companyName) != null ? _s : "",
|
|
11655
|
-
onChange: handleChangeAch
|
|
11656
|
-
}
|
|
11657
|
-
),
|
|
11658
|
-
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
|
|
11659
|
-
] }),
|
|
11660
|
-
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11661
|
-
/* @__PURE__ */ jsx36("label", { htmlFor: "accounttype", children: "Select account type" }),
|
|
11662
|
-
/* @__PURE__ */ jsxs21("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
|
|
11663
|
-
/* @__PURE__ */ jsx36("option", { value: "", children: "Select account" }),
|
|
11664
|
-
accountTypes.map((type) => /* @__PURE__ */ jsx36("option", { value: type.value, children: type.label }, type.value))
|
|
11665
|
-
] }),
|
|
11666
|
-
bankFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11667
|
-
"There is a processing fee of ",
|
|
11668
|
-
/* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
|
|
11669
|
-
"."
|
|
11670
|
-
] }),
|
|
11671
|
-
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11672
|
-
/* @__PURE__ */ jsx36("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
|
|
11673
|
-
setIsBankConsentChecked(e.target.checked);
|
|
11674
|
-
if (e.target.checked) {
|
|
11675
|
-
setErrorBankConsent("");
|
|
11676
|
-
}
|
|
11677
|
-
} }),
|
|
11678
|
-
/* @__PURE__ */ jsx36("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.` })
|
|
11679
|
-
] }),
|
|
11680
|
-
errorBankConsent && /* @__PURE__ */ jsx36("span", { className: "error-span", children: errorBankConsent }),
|
|
11681
|
-
customerId && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11682
|
-
/* @__PURE__ */ jsx36("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
11683
|
-
/* @__PURE__ */ jsx36("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
|
|
11684
|
-
] }),
|
|
11685
|
-
saveACHinfo && /* @__PURE__ */ jsx36("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
10771
|
+
) }),
|
|
10772
|
+
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
11686
10773
|
"If checked, I agree to give the ",
|
|
11687
|
-
/* @__PURE__ */
|
|
11688
|
-
" permission to charge this
|
|
10774
|
+
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10775
|
+
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11689
10776
|
] }) })
|
|
11690
10777
|
] })
|
|
10778
|
+
] }) })
|
|
10779
|
+
] }),
|
|
10780
|
+
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx32("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount ? formatUSD((_i = Number(partialAmount)) == null ? void 0 : _i.toFixed(2)) : formatUSD((_j = Number(amount)) == null ? void 0 : _j.toFixed(2)) }) })
|
|
10781
|
+
] })
|
|
10782
|
+
] }),
|
|
10783
|
+
/* @__PURE__ */ jsx32("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10784
|
+
/* @__PURE__ */ jsxs19("div", { className: "frac-heading-card-wrap", children: [
|
|
10785
|
+
/* @__PURE__ */ jsx32("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs19("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
|
|
10786
|
+
" ",
|
|
10787
|
+
/* @__PURE__ */ jsx32(IoArrowBack4, {})
|
|
10788
|
+
] }) }),
|
|
10789
|
+
/* @__PURE__ */ jsx32("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
|
|
10790
|
+
] }),
|
|
10791
|
+
activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10792
|
+
/* @__PURE__ */ jsx32(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
|
|
10793
|
+
setActiveinBank("form");
|
|
10794
|
+
} }),
|
|
10795
|
+
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", style: { padding: "0" }, children: /* @__PURE__ */ jsx32("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_k = Number(bankAmount)) == null ? void 0 : _k.toFixed(2)) }) })
|
|
10796
|
+
] }) : /* @__PURE__ */ jsxs19("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
|
|
10797
|
+
if (e.key === "Enter" && loading) {
|
|
10798
|
+
e.preventDefault();
|
|
10799
|
+
e.stopPropagation();
|
|
10800
|
+
}
|
|
10801
|
+
}, children: [
|
|
10802
|
+
/* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: {
|
|
10803
|
+
minHeight: "444px",
|
|
10804
|
+
maxHeight: "444px"
|
|
10805
|
+
}, children: [
|
|
10806
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10807
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
10808
|
+
/* @__PURE__ */ jsx32("input", { type: "text", id: "nameonaccount", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", name: "name", value: (_l = achData == null ? void 0 : achData.name) != null ? _l : "", onChange: handleChangeAch }),
|
|
10809
|
+
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
11691
10810
|
] }),
|
|
11692
|
-
/* @__PURE__ */
|
|
11693
|
-
|
|
11694
|
-
|
|
11695
|
-
|
|
11696
|
-
|
|
10811
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10812
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "routingnumber", children: "Routing number" }),
|
|
10813
|
+
/* @__PURE__ */ jsx32(
|
|
10814
|
+
"input",
|
|
10815
|
+
{
|
|
10816
|
+
type: "text",
|
|
10817
|
+
id: "routingnumber",
|
|
10818
|
+
className: "form-control-frac",
|
|
10819
|
+
maxLength: 9,
|
|
10820
|
+
placeholder: "000000000",
|
|
10821
|
+
name: "routingNumber",
|
|
10822
|
+
value: (_m = achData == null ? void 0 : achData.routingNumber) != null ? _m : "",
|
|
10823
|
+
onChange: handleChangeAch
|
|
10824
|
+
}
|
|
10825
|
+
),
|
|
10826
|
+
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
|
|
10827
|
+
] }),
|
|
10828
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10829
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "accountnumber", children: "Account number" }),
|
|
10830
|
+
/* @__PURE__ */ jsx32(
|
|
10831
|
+
"input",
|
|
10832
|
+
{
|
|
10833
|
+
type: "text",
|
|
10834
|
+
id: "accountnumber",
|
|
10835
|
+
className: "form-control-frac",
|
|
10836
|
+
maxLength: 16,
|
|
10837
|
+
placeholder: "0000000000",
|
|
10838
|
+
name: "accountNumber",
|
|
10839
|
+
value: (_n = achData == null ? void 0 : achData.accountNumber) != null ? _n : "",
|
|
10840
|
+
onChange: handleChangeAch
|
|
10841
|
+
}
|
|
10842
|
+
),
|
|
10843
|
+
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
|
|
10844
|
+
] }),
|
|
10845
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10846
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
|
|
10847
|
+
/* @__PURE__ */ jsx32(
|
|
10848
|
+
"input",
|
|
10849
|
+
{
|
|
10850
|
+
type: "text",
|
|
10851
|
+
id: "confirmaccountnumber",
|
|
10852
|
+
className: "form-control-frac",
|
|
10853
|
+
maxLength: 16,
|
|
10854
|
+
placeholder: "0000000000",
|
|
10855
|
+
name: "confirmAccountNumber",
|
|
10856
|
+
value: (_o = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _o : "",
|
|
10857
|
+
onChange: handleChangeAch
|
|
10858
|
+
}
|
|
10859
|
+
),
|
|
10860
|
+
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
|
|
10861
|
+
] }),
|
|
10862
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10863
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "bankname", children: "Bank name" }),
|
|
10864
|
+
/* @__PURE__ */ jsx32(
|
|
10865
|
+
"input",
|
|
10866
|
+
{
|
|
10867
|
+
type: "text",
|
|
10868
|
+
id: "bankname",
|
|
10869
|
+
className: "form-control-frac",
|
|
10870
|
+
maxLength: 100,
|
|
10871
|
+
placeholder: "My Bank",
|
|
10872
|
+
name: "bankName",
|
|
10873
|
+
value: (_p = achData == null ? void 0 : achData.bankName) != null ? _p : "",
|
|
10874
|
+
onChange: handleChangeAch
|
|
10875
|
+
}
|
|
10876
|
+
),
|
|
10877
|
+
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
|
|
10878
|
+
] }),
|
|
10879
|
+
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10880
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "companyName", children: "Company name" }),
|
|
10881
|
+
/* @__PURE__ */ jsx32(
|
|
10882
|
+
"input",
|
|
10883
|
+
{
|
|
10884
|
+
type: "text",
|
|
10885
|
+
id: "companyName",
|
|
10886
|
+
className: "form-control-frac",
|
|
10887
|
+
maxLength: 100,
|
|
10888
|
+
placeholder: "My Company",
|
|
10889
|
+
name: "companyName",
|
|
10890
|
+
value: (_q = achData == null ? void 0 : achData.companyName) != null ? _q : "",
|
|
10891
|
+
onChange: handleChangeAch
|
|
10892
|
+
}
|
|
10893
|
+
),
|
|
10894
|
+
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
|
|
10895
|
+
] }),
|
|
10896
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10897
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: "accounttype", children: "Select account type" }),
|
|
10898
|
+
/* @__PURE__ */ jsxs19("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_r = achData == null ? void 0 : achData.accountType) != null ? _r : "", onChange: handleChangeAch, children: [
|
|
10899
|
+
/* @__PURE__ */ jsx32("option", { value: "", children: "Select account" }),
|
|
10900
|
+
accountTypes.map((type) => /* @__PURE__ */ jsx32("option", { value: type.value, children: type.label }, type.value))
|
|
10901
|
+
] })
|
|
10902
|
+
] }),
|
|
10903
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
10904
|
+
/* @__PURE__ */ jsx32("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
|
|
10905
|
+
setIsBankConsentChecked(e.target.checked);
|
|
10906
|
+
if (e.target.checked) {
|
|
10907
|
+
setErrorBankConsent("");
|
|
10908
|
+
}
|
|
10909
|
+
} }),
|
|
10910
|
+
/* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${merchantName || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
|
|
10911
|
+
] }),
|
|
10912
|
+
errorBankConsent && /* @__PURE__ */ jsx32("span", { className: "error-span", children: errorBankConsent }),
|
|
10913
|
+
customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
10914
|
+
/* @__PURE__ */ jsx32("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
10915
|
+
/* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
|
|
10916
|
+
] }),
|
|
10917
|
+
saveACHinfo && /* @__PURE__ */ jsx32("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
10918
|
+
"If checked, I agree to give the ",
|
|
10919
|
+
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10920
|
+
" permission to charge this bank account for agreed-upon purchases in the future."
|
|
10921
|
+
] }) })
|
|
10922
|
+
] }),
|
|
10923
|
+
/* @__PURE__ */ jsx32("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx32("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: formatUSD((_s = Number(bankAmount)) == null ? void 0 : _s.toFixed(2)) }) })
|
|
10924
|
+
] })
|
|
10925
|
+
] }) })
|
|
10926
|
+
] }) }) }) })
|
|
11697
10927
|
] })
|
|
11698
10928
|
] })
|
|
11699
10929
|
] })
|
|
@@ -11704,7 +10934,7 @@ var ModelContentSky_default = ModelContentSky;
|
|
|
11704
10934
|
|
|
11705
10935
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
11706
10936
|
import axios10 from "axios";
|
|
11707
|
-
import { Fragment as
|
|
10937
|
+
import { Fragment as Fragment19, jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
11708
10938
|
var PaymentWidget = ({
|
|
11709
10939
|
amount,
|
|
11710
10940
|
bankAmount,
|
|
@@ -11726,12 +10956,12 @@ var PaymentWidget = ({
|
|
|
11726
10956
|
bankSurcharge,
|
|
11727
10957
|
partialRef
|
|
11728
10958
|
}) => {
|
|
11729
|
-
const [show, setShow] =
|
|
11730
|
-
const [loading, setLoading] =
|
|
11731
|
-
const [childHandleClose, setChildHandleClose] =
|
|
10959
|
+
const [show, setShow] = useState11(autoTrigger || false);
|
|
10960
|
+
const [loading, setLoading] = useState11(false);
|
|
10961
|
+
const [childHandleClose, setChildHandleClose] = useState11(() => () => {
|
|
11732
10962
|
});
|
|
11733
|
-
const [orderGuid, setOrderGuid] =
|
|
11734
|
-
const [remainingAmount, setRemainingAmount] =
|
|
10963
|
+
const [orderGuid, setOrderGuid] = useState11(null);
|
|
10964
|
+
const [remainingAmount, setRemainingAmount] = useState11(null);
|
|
11735
10965
|
const initialCommonProps = useMemo(
|
|
11736
10966
|
() => ({
|
|
11737
10967
|
amount,
|
|
@@ -11778,8 +11008,8 @@ var PaymentWidget = ({
|
|
|
11778
11008
|
partialRef
|
|
11779
11009
|
]
|
|
11780
11010
|
);
|
|
11781
|
-
const [commonProps, setCommonProps] =
|
|
11782
|
-
|
|
11011
|
+
const [commonProps, setCommonProps] = useState11(initialCommonProps);
|
|
11012
|
+
useEffect16(() => {
|
|
11783
11013
|
if (show) {
|
|
11784
11014
|
setCommonProps(initialCommonProps);
|
|
11785
11015
|
}
|
|
@@ -11810,556 +11040,29 @@ var PaymentWidget = ({
|
|
|
11810
11040
|
setLoading(false);
|
|
11811
11041
|
}
|
|
11812
11042
|
};
|
|
11813
|
-
|
|
11814
|
-
if (show && isPartial && partialRef) {
|
|
11815
|
-
getskyosOrderDetails();
|
|
11816
|
-
}
|
|
11817
|
-
}, [show, isPartial, partialRef]);
|
|
11818
|
-
return /* @__PURE__ */ jsxs22(Fragment21, { children: [
|
|
11819
|
-
/* @__PURE__ */ jsx37("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
11820
|
-
/* @__PURE__ */ jsx37(DataScript, {}),
|
|
11821
|
-
/* @__PURE__ */ jsx37(FractalTokenizerScript, {}),
|
|
11822
|
-
/* @__PURE__ */ jsx37(SkyChargewidgetstyles, {}),
|
|
11823
|
-
/* @__PURE__ */ jsx37(CardBankRadioStyles, {}),
|
|
11824
|
-
/* @__PURE__ */ jsx37(CustomModal2styles_default, {}),
|
|
11825
|
-
/* @__PURE__ */ jsx37(DataCapScriptLoader, {}),
|
|
11826
|
-
!autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
11827
|
-
submitBtnText,
|
|
11828
|
-
submitBtnIcon
|
|
11829
|
-
] }),
|
|
11830
|
-
!autoTrigger ? /* @__PURE__ */ jsx37(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx37(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx37(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
|
|
11831
|
-
] });
|
|
11832
|
-
};
|
|
11833
|
-
|
|
11834
|
-
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
11835
|
-
import { useEffect as useEffect20, useState as useState13, useMemo as useMemo2 } from "react";
|
|
11836
|
-
import axios11 from "axios";
|
|
11837
|
-
|
|
11838
|
-
// src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
|
|
11839
|
-
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
11840
|
-
function EmbeddedCheckoutStyles({ extraCustomCSS }) {
|
|
11841
|
-
return /* @__PURE__ */ jsx38("style", { children: `
|
|
11842
|
-
|
|
11843
|
-
.pay-amount-conatiner{
|
|
11844
|
-
margin-top: 20px !important;
|
|
11845
|
-
margin-bottom: 20px !important ;
|
|
11846
|
-
}
|
|
11847
|
-
|
|
11848
|
-
.frac-pay-container.pay-container {
|
|
11849
|
-
grid-template-columns:1fr;
|
|
11850
|
-
}
|
|
11851
|
-
|
|
11852
|
-
|
|
11853
|
-
/* Card */
|
|
11854
|
-
.plan-card {
|
|
11855
|
-
width: 100%;
|
|
11856
|
-
font-family: Inter, sans-serif;
|
|
11857
|
-
background: #fff;
|
|
11858
|
-
}
|
|
11859
|
-
|
|
11860
|
-
/* Header */
|
|
11861
|
-
.card-header {
|
|
11862
|
-
padding: 12px 0 0 0;
|
|
11863
|
-
}
|
|
11864
|
-
|
|
11865
|
-
/* Button */
|
|
11866
|
-
.collapse-btn {
|
|
11867
|
-
width: 100%;
|
|
11868
|
-
background: none;
|
|
11869
|
-
border: none;
|
|
11870
|
-
display: flex;
|
|
11871
|
-
justify-content: space-between;
|
|
11872
|
-
align-items: center;
|
|
11873
|
-
cursor: pointer;
|
|
11874
|
-
font-size: 15px;
|
|
11875
|
-
padding: 0;
|
|
11876
|
-
}
|
|
11877
|
-
|
|
11878
|
-
/* Arrow */
|
|
11879
|
-
.arrow {
|
|
11880
|
-
transition: transform 0.3s ease;
|
|
11881
|
-
height: 8px;
|
|
11882
|
-
}
|
|
11883
|
-
|
|
11884
|
-
/* Open State */
|
|
11885
|
-
.collapse-btn.open .arrow {
|
|
11886
|
-
transform: rotate(180deg); /* Down */
|
|
11887
|
-
}
|
|
11888
|
-
|
|
11889
|
-
/* Body */
|
|
11890
|
-
.card-body {
|
|
11891
|
-
padding: 0;
|
|
11892
|
-
}
|
|
11893
|
-
|
|
11894
|
-
/* Plan Header */
|
|
11895
|
-
.plan-header {
|
|
11896
|
-
font-size: 15px;
|
|
11897
|
-
font-weight: 600;
|
|
11898
|
-
}
|
|
11899
|
-
|
|
11900
|
-
/* Scrollable List */
|
|
11901
|
-
.plan-list {
|
|
11902
|
-
max-height: 200px;
|
|
11903
|
-
overflow-y: auto;
|
|
11904
|
-
padding-right: 6px;
|
|
11905
|
-
}
|
|
11906
|
-
|
|
11907
|
-
/* Items */
|
|
11908
|
-
.plan-item {
|
|
11909
|
-
display: flex;
|
|
11910
|
-
justify-content: space-between;
|
|
11911
|
-
padding: 6px 0;
|
|
11912
|
-
font-size: 14px;
|
|
11913
|
-
}
|
|
11914
|
-
|
|
11915
|
-
/* Badges */
|
|
11916
|
-
.badge {
|
|
11917
|
-
padding: 4px 10px;
|
|
11918
|
-
border-radius: 12px;
|
|
11919
|
-
font-size: 12px;
|
|
11920
|
-
font-weight: 500;
|
|
11921
|
-
}
|
|
11922
|
-
|
|
11923
|
-
.badge-included {
|
|
11924
|
-
background: #f1f3f5;
|
|
11925
|
-
color: #495057;
|
|
11926
|
-
}
|
|
11927
|
-
|
|
11928
|
-
.badge-available {
|
|
11929
|
-
background: #f8f9fa;
|
|
11930
|
-
color: #212529;
|
|
11931
|
-
}
|
|
11932
|
-
|
|
11933
|
-
/* Helpers */
|
|
11934
|
-
.row-between {
|
|
11935
|
-
display: flex;
|
|
11936
|
-
justify-content: space-between;
|
|
11937
|
-
}
|
|
11938
|
-
|
|
11939
|
-
.text-end {
|
|
11940
|
-
text-align: right;
|
|
11941
|
-
}
|
|
11942
|
-
|
|
11943
|
-
.text-muted {
|
|
11944
|
-
color: #6c757d;
|
|
11945
|
-
font-size: 12px;
|
|
11946
|
-
}
|
|
11947
|
-
|
|
11948
|
-
.fw-semibold {
|
|
11949
|
-
font-weight: 600;
|
|
11950
|
-
}
|
|
11951
|
-
|
|
11952
|
-
.mb-2 {
|
|
11953
|
-
margin-bottom: 8px;
|
|
11954
|
-
}
|
|
11955
|
-
|
|
11956
|
-
/* Divider */
|
|
11957
|
-
.divider {
|
|
11958
|
-
height: 1px;
|
|
11959
|
-
background: #e5e7eb;
|
|
11960
|
-
margin: 8px 0;
|
|
11961
|
-
}
|
|
11962
|
-
|
|
11963
|
-
/* Collapse Animation */
|
|
11964
|
-
.collapse {
|
|
11965
|
-
max-height: 0;
|
|
11966
|
-
overflow: hidden;
|
|
11967
|
-
transition: max-height 0.3s ease;
|
|
11968
|
-
}
|
|
11969
|
-
|
|
11970
|
-
.collapse.show {
|
|
11971
|
-
max-height: 1000px;
|
|
11972
|
-
}
|
|
11973
|
-
.frac-pay-container.pay-container {
|
|
11974
|
-
grid-template-columns:1fr;
|
|
11975
|
-
}
|
|
11976
|
-
.frac-payment-form-div .amt-pay-con {
|
|
11977
|
-
padding-right: 0px;
|
|
11978
|
-
}
|
|
11979
|
-
.frac-payment-form-div .ach-scrl {
|
|
11980
|
-
padding-right: 0px;
|
|
11981
|
-
gap: 10px;
|
|
11982
|
-
max-height: fit-content !important;
|
|
11983
|
-
min-height: fit-content !important;
|
|
11984
|
-
overflow: hidden !important;
|
|
11985
|
-
}
|
|
11986
|
-
.frac-payment-form-div .frac-card-bank-radio-main {
|
|
11987
|
-
display: flex;
|
|
11988
|
-
flex-direction: row;
|
|
11989
|
-
align-items: flex-start;
|
|
11990
|
-
align-self: stretch;
|
|
11991
|
-
border-radius: 14px;
|
|
11992
|
-
border: none;
|
|
11993
|
-
overflow: visible;
|
|
11994
|
-
gap: 10px;
|
|
11995
|
-
}
|
|
11996
|
-
.frac-payment-form-div .frac-card-bank-radio {
|
|
11997
|
-
display: flex;
|
|
11998
|
-
padding: 12px 16px;
|
|
11999
|
-
justify-content: space-between;
|
|
12000
|
-
align-items: center;
|
|
12001
|
-
align-self: stretch;
|
|
12002
|
-
width: 50%;
|
|
12003
|
-
border: 1px solid #E0DFE2;
|
|
12004
|
-
border-radius: 10px;
|
|
12005
|
-
box-shadow: rgba(149, 157, 165, 0.2) 0px 1px 4px;
|
|
12006
|
-
}
|
|
12007
|
-
.frac-payment-form-div .frac-card-bank-radio.frac-active {
|
|
12008
|
-
background: #fff;
|
|
12009
|
-
border: 2px solid #004eab !important;
|
|
12010
|
-
}
|
|
12011
|
-
|
|
12012
|
-
.frac-payment-form-div .form-control-frac {
|
|
12013
|
-
border: 1px solid #dee2e6 !important;
|
|
12014
|
-
border-radius: 0.375rem !important;
|
|
12015
|
-
background-color: #F6F6F7;
|
|
12016
|
-
box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
|
|
12017
|
-
}
|
|
12018
|
-
.frac-payment-form-div .form-control-frac:focus {
|
|
12019
|
-
border: 1px solid #004eab !important;
|
|
12020
|
-
}
|
|
12021
|
-
.frac-payment-form-div .card-expiry-new {
|
|
12022
|
-
border: none;
|
|
12023
|
-
gap: 10px;
|
|
12024
|
-
}
|
|
12025
|
-
.frac-payment-form-div .exp-date-year-container {
|
|
12026
|
-
gap: 10px;
|
|
12027
|
-
width: 100%;
|
|
12028
|
-
}
|
|
12029
|
-
.frac-payment-form-div .card-type-logo-wrap{
|
|
12030
|
-
position: absolute;
|
|
12031
|
-
right: 10px;
|
|
12032
|
-
max-width: 30px;
|
|
12033
|
-
}
|
|
12034
|
-
.detials-wrap.detials-wrap-1 {
|
|
12035
|
-
display: flex;
|
|
12036
|
-
flex-wrap: wrap;
|
|
12037
|
-
}
|
|
12038
|
-
@media screen and (max-width: 1280px) {
|
|
12039
|
-
.frac-pay-container.pay-container {
|
|
12040
|
-
grid-template-columns: 1fr;
|
|
12041
|
-
border: none;
|
|
12042
|
-
}
|
|
12043
|
-
}
|
|
12044
|
-
@media screen and (max-width: 899px) {
|
|
12045
|
-
.detials-wrap {
|
|
12046
|
-
grid-template-columns: 1fr !important;
|
|
12047
|
-
}
|
|
12048
|
-
.frac-payment-form-div .exp-date-year-container{
|
|
12049
|
-
width: 100%;}
|
|
12050
|
-
|
|
12051
|
-
}
|
|
12052
|
-
@media screen and (max-width: 575px) {
|
|
12053
|
-
.frac-payment-form-div .card-type-logo-wrap{
|
|
12054
|
-
max-width: 30px;
|
|
12055
|
-
}
|
|
12056
|
-
form#ACHPaymentForm .ach-scrl {
|
|
12057
|
-
grid-template-columns: 1fr !important;
|
|
12058
|
-
}
|
|
12059
|
-
@media screen and (max-width: 375px) {
|
|
12060
|
-
.frac-payment-form-div .exp-date-year-container {
|
|
12061
|
-
flex-direction: column;
|
|
12062
|
-
}
|
|
12063
|
-
.parent-pay-container {
|
|
12064
|
-
padding: 10px;
|
|
12065
|
-
}
|
|
12066
|
-
}
|
|
12067
|
-
}
|
|
12068
|
-
.box-inner-card-text{
|
|
12069
|
-
display: flex;
|
|
12070
|
-
gap: 0px;
|
|
12071
|
-
flex-direction: column;
|
|
12072
|
-
}
|
|
12073
|
-
.box-inner-card-text .frac-payment-type-logo {
|
|
12074
|
-
width: 17px;
|
|
12075
|
-
height: 17px;
|
|
12076
|
-
aspect-ratio: 1/1;
|
|
12077
|
-
}
|
|
12078
|
-
.exp-date-year-wrap.form-control-frac input {
|
|
12079
|
-
background: transparent;
|
|
12080
|
-
border: none;
|
|
12081
|
-
outline: none;
|
|
12082
|
-
font-size: 1rem;
|
|
12083
|
-
font-weight: 400;
|
|
12084
|
-
}
|
|
12085
|
-
.exp-date-year-wrap.form-control-frac {
|
|
12086
|
-
display: flex;
|
|
12087
|
-
gap: 2px;
|
|
12088
|
-
}
|
|
12089
|
-
.exp-date-year-wrap input.exp-month {
|
|
12090
|
-
width: 32px;
|
|
12091
|
-
}
|
|
12092
|
-
.detials-wrap {
|
|
12093
|
-
display: grid;
|
|
12094
|
-
grid-template-columns: 1fr 1fr;
|
|
12095
|
-
gap: 10px;
|
|
12096
|
-
}
|
|
12097
|
-
.detials-wrap.detials-wrap-2{
|
|
12098
|
-
grid-template-columns: 1fr 1fr;
|
|
12099
|
-
}
|
|
12100
|
-
form#ACHPaymentForm .ach-scrl {
|
|
12101
|
-
display: grid;
|
|
12102
|
-
grid-gap: 0px 10px;
|
|
12103
|
-
grid-template-columns: 1fr;
|
|
12104
|
-
}
|
|
12105
|
-
.plan-list {
|
|
12106
|
-
max-height: 130px;
|
|
12107
|
-
min-height: 130px;
|
|
12108
|
-
overflow-y: auto;
|
|
12109
|
-
padding-right: 6px;
|
|
12110
|
-
}
|
|
12111
|
-
.plan-list::-webkit-scrollbar {
|
|
12112
|
-
width: 3px;
|
|
12113
|
-
background-color: #F5F5F5;
|
|
12114
|
-
}
|
|
12115
|
-
.plan-list::-webkit-scrollbar-thumb {
|
|
12116
|
-
background-color: #35254D;
|
|
12117
|
-
}
|
|
12118
|
-
div#cvv {
|
|
12119
|
-
border-top-left-radius: 0;
|
|
12120
|
-
border-bottom-left-radius: 0;
|
|
12121
|
-
border-top: 0;
|
|
12122
|
-
border-bottom: 0;
|
|
12123
|
-
border-right: 0;
|
|
12124
|
-
}
|
|
12125
|
-
div#exp_year {
|
|
12126
|
-
height: 36px;
|
|
12127
|
-
width: calc(100% + 1px);
|
|
12128
|
-
border-radius: 0;
|
|
12129
|
-
border-top: 0;
|
|
12130
|
-
border-bottom: 0;
|
|
12131
|
-
border-right: 1px solid #dee2e6;
|
|
12132
|
-
}
|
|
12133
|
-
div#exp_month {
|
|
12134
|
-
width: calc(100% + 1px);
|
|
12135
|
-
border-top-right-radius: 0;
|
|
12136
|
-
border-bottom-right-radius: 0;
|
|
12137
|
-
border: 0;
|
|
12138
|
-
border-right: 1px solid #dee2e6;
|
|
12139
|
-
}
|
|
12140
|
-
.exp-date-year-container .form-group {
|
|
12141
|
-
flex: 1;
|
|
12142
|
-
}
|
|
12143
|
-
.input-main-wrap-frac{
|
|
12144
|
-
margin:0px !important;
|
|
12145
|
-
padding:0px !important;
|
|
12146
|
-
}
|
|
12147
|
-
.toggle-num-wrapper.toggle-num-wrapper-new {
|
|
12148
|
-
border: 1px solid #dee2e6 !important;
|
|
12149
|
-
border-radius: 0.375rem !important;
|
|
12150
|
-
background-color: #F6F6F7;
|
|
12151
|
-
box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
|
|
12152
|
-
}
|
|
12153
|
-
.toggle-num-wrapper-new div#card_number {
|
|
12154
|
-
padding: 0px 10px;
|
|
12155
|
-
border: none;
|
|
12156
|
-
border-bottom: 1px solid #dee2e6;
|
|
12157
|
-
}
|
|
12158
|
-
.toggle-num-wrapper-new .card-crdi.card-expiry-new {
|
|
12159
|
-
padding: 0px 10px;
|
|
12160
|
-
}
|
|
12161
|
-
.toggle-num-wrapper-new .input-main-wrap-frac {
|
|
12162
|
-
height: 36px;
|
|
12163
|
-
}
|
|
12164
|
-
.toggle-num-wrapper-new:focus {
|
|
12165
|
-
border: 1px solid #004eab !important;
|
|
12166
|
-
}
|
|
12167
|
-
.frac-card-title-main {
|
|
12168
|
-
display: flex;
|
|
12169
|
-
align-items: start;
|
|
12170
|
-
gap: 4px;
|
|
12171
|
-
flex-direction: column;
|
|
12172
|
-
}
|
|
12173
|
-
.parent-pay-container {
|
|
12174
|
-
padding: 24px;
|
|
12175
|
-
background-color: #ffffff !important;
|
|
12176
|
-
border-radius: 15px;
|
|
12177
|
-
min-width: 300px;
|
|
12178
|
-
}
|
|
12179
|
-
|
|
12180
|
-
|
|
12181
|
-
${extraCustomCSS}
|
|
12182
|
-
|
|
12183
|
-
` });
|
|
12184
|
-
}
|
|
12185
|
-
|
|
12186
|
-
// src/app/components/Atoms/Applepay/ApplePayScriptLoader.tsx
|
|
12187
|
-
import { useEffect as useEffect19 } from "react";
|
|
12188
|
-
var applePayScriptLoaded = false;
|
|
12189
|
-
var ApplePayScriptLoader = () => {
|
|
12190
|
-
useEffect19(() => {
|
|
12191
|
-
if (applePayScriptLoaded) return;
|
|
12192
|
-
const existingScript = document.querySelector(
|
|
12193
|
-
`script[src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"]`
|
|
12194
|
-
);
|
|
12195
|
-
if (!existingScript) {
|
|
12196
|
-
const script2 = document.createElement("script");
|
|
12197
|
-
script2.src = "https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js";
|
|
12198
|
-
script2.async = true;
|
|
12199
|
-
script2.onload = () => {
|
|
12200
|
-
console.log("\u2705 Apple Pay script loaded");
|
|
12201
|
-
applePayScriptLoaded = true;
|
|
12202
|
-
console.log("ApplePaySession:", window.ApplePaySession);
|
|
12203
|
-
};
|
|
12204
|
-
script2.onerror = (err) => {
|
|
12205
|
-
console.error("\u274C Apple Pay script failed", err);
|
|
12206
|
-
};
|
|
12207
|
-
document.head.appendChild(script2);
|
|
12208
|
-
} else {
|
|
12209
|
-
applePayScriptLoaded = true;
|
|
12210
|
-
}
|
|
12211
|
-
}, []);
|
|
12212
|
-
return null;
|
|
12213
|
-
};
|
|
12214
|
-
|
|
12215
|
-
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
12216
|
-
import { Fragment as Fragment22, jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
12217
|
-
var EmbeddedCheckout = ({
|
|
12218
|
-
amount,
|
|
12219
|
-
bankAmount,
|
|
12220
|
-
submitBtnText = "Pay",
|
|
12221
|
-
session_token,
|
|
12222
|
-
customerId,
|
|
12223
|
-
callback,
|
|
12224
|
-
merchantName = "merchant",
|
|
12225
|
-
isPreAuth,
|
|
12226
|
-
surcharge = "0",
|
|
12227
|
-
submitBtnClass,
|
|
12228
|
-
submitBtnIcon,
|
|
12229
|
-
isRequest,
|
|
12230
|
-
pass_fee,
|
|
12231
|
-
pass_fee_amount,
|
|
12232
|
-
require3ds = false,
|
|
12233
|
-
autoTrigger = false,
|
|
12234
|
-
isPartial,
|
|
12235
|
-
bankSurcharge,
|
|
12236
|
-
partialRef,
|
|
12237
|
-
onSubmit,
|
|
12238
|
-
onLoad,
|
|
12239
|
-
customCSS: customCSS2
|
|
12240
|
-
}) => {
|
|
12241
|
-
const [show, setShow] = useState13(false);
|
|
12242
|
-
const [loading, setLoading] = useState13(false);
|
|
12243
|
-
const [childHandleClose, setChildHandleClose] = useState13(() => () => {
|
|
12244
|
-
});
|
|
12245
|
-
const [orderGuid, setOrderGuid] = useState13(null);
|
|
12246
|
-
const [remainingAmount, setRemainingAmount] = useState13(null);
|
|
12247
|
-
const initialCommonProps = useMemo2(
|
|
12248
|
-
() => ({
|
|
12249
|
-
amount,
|
|
12250
|
-
bankAmount,
|
|
12251
|
-
submitBtnText,
|
|
12252
|
-
session_token,
|
|
12253
|
-
customerId,
|
|
12254
|
-
callback,
|
|
12255
|
-
merchantName,
|
|
12256
|
-
isPreAuth,
|
|
12257
|
-
surcharge,
|
|
12258
|
-
submitBtnClass,
|
|
12259
|
-
submitBtnIcon,
|
|
12260
|
-
isRequest,
|
|
12261
|
-
pass_fee,
|
|
12262
|
-
pass_fee_amount,
|
|
12263
|
-
require3ds,
|
|
12264
|
-
autoTrigger,
|
|
12265
|
-
setShow,
|
|
12266
|
-
setHandleCloseRef: setChildHandleClose,
|
|
12267
|
-
isPartial,
|
|
12268
|
-
bankSurcharge,
|
|
12269
|
-
partialRef
|
|
12270
|
-
}),
|
|
12271
|
-
[
|
|
12272
|
-
amount,
|
|
12273
|
-
bankAmount,
|
|
12274
|
-
submitBtnText,
|
|
12275
|
-
session_token,
|
|
12276
|
-
customerId,
|
|
12277
|
-
callback,
|
|
12278
|
-
merchantName,
|
|
12279
|
-
isPreAuth,
|
|
12280
|
-
surcharge,
|
|
12281
|
-
submitBtnClass,
|
|
12282
|
-
submitBtnIcon,
|
|
12283
|
-
isRequest,
|
|
12284
|
-
pass_fee,
|
|
12285
|
-
pass_fee_amount,
|
|
12286
|
-
require3ds,
|
|
12287
|
-
autoTrigger,
|
|
12288
|
-
isPartial,
|
|
12289
|
-
bankSurcharge,
|
|
12290
|
-
partialRef
|
|
12291
|
-
]
|
|
12292
|
-
);
|
|
12293
|
-
const [commonProps, setCommonProps] = useState13(initialCommonProps);
|
|
12294
|
-
useEffect20(() => {
|
|
12295
|
-
if (show) {
|
|
12296
|
-
setCommonProps(initialCommonProps);
|
|
12297
|
-
}
|
|
12298
|
-
}, [show, initialCommonProps]);
|
|
12299
|
-
const getskyosOrderDetails = async () => {
|
|
12300
|
-
var _a;
|
|
12301
|
-
setLoading(true);
|
|
12302
|
-
try {
|
|
12303
|
-
const res = await axios11.get(
|
|
12304
|
-
`${masterBaseUrl}api/v1/gateway/get-order-details/${session_token}`,
|
|
12305
|
-
{ params: { isPartial, partialRef } }
|
|
12306
|
-
);
|
|
12307
|
-
if ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.result) {
|
|
12308
|
-
const data = res.data.data;
|
|
12309
|
-
if (data == null ? void 0 : data.orderGuid) {
|
|
12310
|
-
setOrderGuid(data == null ? void 0 : data.orderGuid);
|
|
12311
|
-
setRemainingAmount(data == null ? void 0 : data.remainingAmount);
|
|
12312
|
-
}
|
|
12313
|
-
setCommonProps((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
12314
|
-
amount: data.amount,
|
|
12315
|
-
pass_fee_amount: data.pass_fee_amount,
|
|
12316
|
-
pass_fee: data.pass_fee
|
|
12317
|
-
}));
|
|
12318
|
-
}
|
|
12319
|
-
} catch (error) {
|
|
12320
|
-
console.log("error while getting skyosorderdeatils", error);
|
|
12321
|
-
} finally {
|
|
12322
|
-
setLoading(false);
|
|
12323
|
-
}
|
|
12324
|
-
};
|
|
12325
|
-
useEffect20(() => {
|
|
11043
|
+
useEffect16(() => {
|
|
12326
11044
|
if (show && isPartial && partialRef) {
|
|
12327
11045
|
getskyosOrderDetails();
|
|
12328
11046
|
}
|
|
12329
11047
|
}, [show, isPartial, partialRef]);
|
|
12330
|
-
|
|
12331
|
-
|
|
12332
|
-
|
|
12333
|
-
|
|
12334
|
-
|
|
12335
|
-
|
|
12336
|
-
|
|
12337
|
-
|
|
12338
|
-
|
|
12339
|
-
}
|
|
12340
|
-
console.log(`ApplePaySession: ${supported}, canMakePayments: ${canPay}`);
|
|
12341
|
-
}, []);
|
|
12342
|
-
return /* @__PURE__ */ jsxs23(Fragment22, { children: [
|
|
12343
|
-
/* @__PURE__ */ jsx39("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
12344
|
-
/* @__PURE__ */ jsx39(DataScript, {}),
|
|
12345
|
-
/* @__PURE__ */ jsx39(FractalTokenizerScript, {}),
|
|
12346
|
-
/* @__PURE__ */ jsx39(SkyChargewidgetstyles, {}),
|
|
12347
|
-
/* @__PURE__ */ jsx39(CardBankRadioStyles, {}),
|
|
12348
|
-
/* @__PURE__ */ jsx39(CustomModal2styles_default, {}),
|
|
12349
|
-
/* @__PURE__ */ jsx39(DataCapScriptLoader, {}),
|
|
12350
|
-
/* @__PURE__ */ jsx39(ApplePayScriptLoader, {}),
|
|
12351
|
-
/* @__PURE__ */ jsx39(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
|
|
12352
|
-
!autoTrigger && /* @__PURE__ */ jsxs23("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
11048
|
+
return /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
11049
|
+
/* @__PURE__ */ jsx33("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
11050
|
+
/* @__PURE__ */ jsx33(DataScript, {}),
|
|
11051
|
+
/* @__PURE__ */ jsx33(FractalTokenizerScript, {}),
|
|
11052
|
+
/* @__PURE__ */ jsx33(SkyChargewidgetstyles, {}),
|
|
11053
|
+
/* @__PURE__ */ jsx33(CardBankRadioStyles, {}),
|
|
11054
|
+
/* @__PURE__ */ jsx33(CustomModal2styles_default, {}),
|
|
11055
|
+
/* @__PURE__ */ jsx33(DataCapScriptLoader, {}),
|
|
11056
|
+
!autoTrigger && /* @__PURE__ */ jsxs20("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
12353
11057
|
submitBtnText,
|
|
12354
11058
|
submitBtnIcon
|
|
12355
11059
|
] }),
|
|
12356
|
-
!autoTrigger ? /* @__PURE__ */
|
|
11060
|
+
!autoTrigger ? /* @__PURE__ */ jsx33(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx33(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx33(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
|
|
12357
11061
|
] });
|
|
12358
11062
|
};
|
|
12359
11063
|
export {
|
|
12360
11064
|
AddCardEasyPay as AddCard,
|
|
12361
11065
|
CardOnFile,
|
|
12362
|
-
EmbeddedCheckout,
|
|
12363
11066
|
GetPaymentPage,
|
|
12364
11067
|
PartialPayment,
|
|
12365
11068
|
PaymentWidget,
|