@fractalpay/fractalpay-next-dev 0.0.250 → 0.0.252
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 +42 -17
- package/dist/index.js +1834 -570
- package/dist/index.js.map +1 -1
- package/global.d.ts +1 -0
- package/package.json +1 -1
- package/types/apple-pay.d.ts +18 -0
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.252",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -113,8 +113,25 @@ 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
|
-
|
|
116
|
+
|
|
117
|
+
.loader-light {
|
|
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 {
|
|
118
135
|
position: fixed; /* Fixed position to cover the viewport */
|
|
119
136
|
top: 0;
|
|
120
137
|
left: 0;
|
|
@@ -126,7 +143,7 @@ var LoaderStyle = (props) => {
|
|
|
126
143
|
/* background: rgba(255, 255, 0, 0.01); Adjust the blur effect */
|
|
127
144
|
background-color: rgba(31, 29, 29, 0.52); /* Semi-transparent black background */
|
|
128
145
|
|
|
129
|
-
backdrop-filter: blur(.5px); /* Blur effect */
|
|
146
|
+
backdrop-filter: blur(6.5px); /* Blur effect */
|
|
130
147
|
z-index: 999999999999 !important; /* Ensure it's on top of other elements */
|
|
131
148
|
transform: translate(0%, 0%) !important
|
|
132
149
|
}
|
|
@@ -201,10 +218,11 @@ var LoaderStyle_default = LoaderStyle;
|
|
|
201
218
|
|
|
202
219
|
// src/app/components/Loader/Loader.tsx
|
|
203
220
|
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
204
|
-
var Loader = (
|
|
221
|
+
var Loader = (_a) => {
|
|
222
|
+
var _b = _a, { intensity = "light" } = _b, props = __objRest(_b, ["intensity"]);
|
|
205
223
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
206
224
|
/* @__PURE__ */ jsx2(LoaderStyle_default, {}),
|
|
207
|
-
(props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className:
|
|
225
|
+
(props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: `loader-${intensity}`, children: /* @__PURE__ */ jsxs("div", { className: "lds-ellipsis", children: [
|
|
208
226
|
/* @__PURE__ */ jsx2("div", {}),
|
|
209
227
|
/* @__PURE__ */ jsx2("div", {}),
|
|
210
228
|
/* @__PURE__ */ jsx2("div", {}),
|
|
@@ -223,36 +241,60 @@ if (name === "@fractalpay/fractalpay-next-dev") {
|
|
|
223
241
|
fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
|
|
224
242
|
datacapUrl = "https://token-cert.dcap.com/v1/client";
|
|
225
243
|
threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
|
|
244
|
+
applePayMerchantId = "fractal";
|
|
245
|
+
googlePayMerchantId = "12345678901234567890";
|
|
246
|
+
googlePayEnvironment = "TEST";
|
|
247
|
+
googlePayGatewayMerchantId = "fractal";
|
|
226
248
|
} else if (name === "@fractalpay/fractalpay-next-test") {
|
|
227
249
|
masterBaseUrl = "https://testapi.fractalpay.com/";
|
|
228
250
|
baseUrl = "https://staging-widget.fractalpay.com/";
|
|
229
251
|
fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
|
|
230
252
|
datacapUrl = "https://token-cert.dcap.com/v1/client";
|
|
231
253
|
threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
|
|
254
|
+
applePayMerchantId = "fractal";
|
|
255
|
+
googlePayMerchantId = "12345678901234567890";
|
|
256
|
+
googlePayEnvironment = "TEST";
|
|
257
|
+
googlePayGatewayMerchantId = "fractal";
|
|
232
258
|
} else if (name === "@fractalpay/fractalpay-next-testprod") {
|
|
233
259
|
masterBaseUrl = "https://sky-node-prod.fractalpay.com/";
|
|
234
260
|
baseUrl = "https://widget-prod.fractalpay.com/";
|
|
235
261
|
fractalGatewayUrl = "https://api.merchant-trends.com/";
|
|
236
262
|
datacapUrl = "https://token.dcap.com/v1/client";
|
|
237
263
|
threedsSecurePublicKey = "pk_live_51RH5WXCZ90rBGeaYwqmjWqgUmudTgxL6uKOE1keu617jvRx9OvW2ke6zGf6SKgv4ixsBLcIPQ4sQIEhp8MgBX39500CqULxOPB";
|
|
264
|
+
applePayMerchantId = "fractal";
|
|
265
|
+
googlePayMerchantId = "BCR2DN4T6OC2TCQH";
|
|
266
|
+
googlePayEnvironment = "PRODUCTION";
|
|
267
|
+
googlePayGatewayMerchantId = "fractal";
|
|
238
268
|
} else if (name === "@fractalpay/fractalpay-next") {
|
|
239
269
|
masterBaseUrl = "https://api.fractalpay.com/";
|
|
240
270
|
baseUrl = "https://widget.fractalpay.com/";
|
|
241
271
|
fractalGatewayUrl = "https://api.merchant-trends.com/";
|
|
242
272
|
datacapUrl = "https://token.dcap.com/v1/client";
|
|
243
273
|
threedsSecurePublicKey = "pk_live_51RH5WXCZ90rBGeaYwqmjWqgUmudTgxL6uKOE1keu617jvRx9OvW2ke6zGf6SKgv4ixsBLcIPQ4sQIEhp8MgBX39500CqULxOPB";
|
|
274
|
+
applePayMerchantId = "fractal";
|
|
275
|
+
googlePayMerchantId = "BCR2DN4T6OC2TCQH";
|
|
276
|
+
googlePayEnvironment = "PRODUCTION";
|
|
277
|
+
googlePayGatewayMerchantId = "fractal";
|
|
244
278
|
} else {
|
|
245
279
|
baseUrl = "http://localhost:8082/";
|
|
246
280
|
masterBaseUrl = "http://localhost:8081/";
|
|
247
281
|
fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
|
|
248
282
|
datacapUrl = "https://token-cert.dcap.com/v1/client";
|
|
249
283
|
threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
|
|
284
|
+
applePayMerchantId = "fractal";
|
|
285
|
+
googlePayMerchantId = "12345678901234567890";
|
|
286
|
+
googlePayEnvironment = "TEST";
|
|
287
|
+
googlePayGatewayMerchantId = "fractal";
|
|
250
288
|
}
|
|
251
289
|
var masterBaseUrl;
|
|
252
290
|
var baseUrl;
|
|
253
291
|
var fractalGatewayUrl;
|
|
254
292
|
var datacapUrl;
|
|
255
293
|
var threedsSecurePublicKey;
|
|
294
|
+
var applePayMerchantId;
|
|
295
|
+
var googlePayMerchantId;
|
|
296
|
+
var googlePayEnvironment;
|
|
297
|
+
var googlePayGatewayMerchantId;
|
|
256
298
|
|
|
257
299
|
// src/app/components/Errortext.ts
|
|
258
300
|
var ErrorText = {
|
|
@@ -1016,10 +1058,9 @@ function RequestPayment(props) {
|
|
|
1016
1058
|
let cash_discount = CalculateCashDiscount(props == null ? void 0 : props.amount, props == null ? void 0 : props.surcharge);
|
|
1017
1059
|
setCashDiscount(cash_discount);
|
|
1018
1060
|
}
|
|
1019
|
-
}, [props == null ? void 0 : props.pass_fee
|
|
1061
|
+
}, [props == null ? void 0 : props.pass_fee]);
|
|
1020
1062
|
const handleClose = () => {
|
|
1021
1063
|
setShow(false);
|
|
1022
|
-
setCashDiscount(0);
|
|
1023
1064
|
setErrors({});
|
|
1024
1065
|
};
|
|
1025
1066
|
const handleShow = () => setShow(true);
|
|
@@ -2417,19 +2458,6 @@ position:relative;
|
|
|
2417
2458
|
border: 0;
|
|
2418
2459
|
border-right: 1px solid #dee2e6;
|
|
2419
2460
|
}
|
|
2420
|
-
|
|
2421
|
-
.frac-fee-text{
|
|
2422
|
-
display: block;
|
|
2423
|
-
padding: 10px 0 4px;
|
|
2424
|
-
font-family: 'IBM Plex Mono', monospace !important;
|
|
2425
|
-
color: #727272 !important;
|
|
2426
|
-
font-size: 12px;
|
|
2427
|
-
line-height: 1.4;
|
|
2428
|
-
}
|
|
2429
|
-
.frac-fee-amount{
|
|
2430
|
-
color: #c62828 !important;
|
|
2431
|
-
}
|
|
2432
|
-
|
|
2433
2461
|
` });
|
|
2434
2462
|
}
|
|
2435
2463
|
|
|
@@ -2922,7 +2950,7 @@ function ErrorCardMszStyle() {
|
|
|
2922
2950
|
|
|
2923
2951
|
// src/app/components/ErrorCardMessage/ErrorCardMessage.tsx
|
|
2924
2952
|
import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2925
|
-
var ErrorCardMessage = ({ onClose, error }) => {
|
|
2953
|
+
var ErrorCardMessage = ({ onClose, error, autoTrigger = false }) => {
|
|
2926
2954
|
return /* @__PURE__ */ jsxs6(Fragment6, { children: [
|
|
2927
2955
|
/* @__PURE__ */ jsx12(ErrorCardMszStyle, {}),
|
|
2928
2956
|
/* @__PURE__ */ jsx12("div", { className: "card-error", children: /* @__PURE__ */ jsx12("div", { className: "payment-error-container", children: /* @__PURE__ */ jsxs6("div", { className: "error-icon", children: [
|
|
@@ -2931,7 +2959,7 @@ var ErrorCardMessage = ({ onClose, error }) => {
|
|
|
2931
2959
|
/* @__PURE__ */ jsx12("div", { className: "payment-error-text", children: error }),
|
|
2932
2960
|
/* @__PURE__ */ jsx12("div", { className: "thank-you-text", children: "Try again later " })
|
|
2933
2961
|
] }),
|
|
2934
|
-
/* @__PURE__ */ jsx12("div", { className: "error-btn-div", children: /* @__PURE__ */ jsx12("button", { onClick: onClose, children: "OK" }) })
|
|
2962
|
+
!autoTrigger && /* @__PURE__ */ jsx12("div", { className: "error-btn-div", children: /* @__PURE__ */ jsx12("button", { onClick: onClose, children: "OK" }) })
|
|
2935
2963
|
] }) }) })
|
|
2936
2964
|
] });
|
|
2937
2965
|
};
|
|
@@ -2948,14 +2976,28 @@ var socketClient_default = socket;
|
|
|
2948
2976
|
|
|
2949
2977
|
// src/app/components/Atoms/CardBankRadio/CardBankRadio.tsx
|
|
2950
2978
|
import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2951
|
-
var CardBankRadio = (
|
|
2952
|
-
|
|
2979
|
+
var CardBankRadio = (_a) => {
|
|
2980
|
+
var _b = _a, { skydesign = false, savingsText } = _b, props = __objRest(_b, ["skydesign", "savingsText"]);
|
|
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(
|
|
2953
2983
|
"div",
|
|
2954
2984
|
{
|
|
2955
2985
|
className: `frac-card-bank-radio ${props.activetab === props.value ? "frac-active" : ""}`,
|
|
2956
2986
|
onClick: () => props.onChange(props.value),
|
|
2957
2987
|
role: "radio",
|
|
2958
|
-
children: [
|
|
2988
|
+
children: skydesign ? /* @__PURE__ */ jsxs7(Fragment7, { 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: [
|
|
2959
3001
|
/* @__PURE__ */ jsxs7("div", { className: "frac-card-title-main", children: [
|
|
2960
3002
|
/* @__PURE__ */ jsx13("img", { src: props.label.toLowerCase() === "card" ? defaultcard : props.label.toLowerCase() === "reader" ? pax : bankNew, className: "frac-payment-type-logo", alt: "" }),
|
|
2961
3003
|
/* @__PURE__ */ jsxs7("div", { className: "frac-card-label", children: [
|
|
@@ -2963,10 +3005,11 @@ var CardBankRadio = (props) => {
|
|
|
2963
3005
|
/* @__PURE__ */ jsx13("div", { className: "frac-card-label-amount", children: formatUSD(props.amount) })
|
|
2964
3006
|
] })
|
|
2965
3007
|
] }),
|
|
3008
|
+
savingsText ? /* @__PURE__ */ jsx13("button", { type: "button", className: savingsBadgeClass, children: savingsText }) : null,
|
|
2966
3009
|
/* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsx13("input", { name: "paymenttype", checked: props.activetab === props.value, type: "radio", value: props.value, onChange: (e) => {
|
|
2967
3010
|
props.onChange(e.target.value);
|
|
2968
3011
|
} }) })
|
|
2969
|
-
]
|
|
3012
|
+
] })
|
|
2970
3013
|
}
|
|
2971
3014
|
) });
|
|
2972
3015
|
};
|
|
@@ -2991,6 +3034,7 @@ function CardBankRadioStyles({}) {
|
|
|
2991
3034
|
justify-content: space-between;
|
|
2992
3035
|
align-items: center;
|
|
2993
3036
|
align-self: stretch;
|
|
3037
|
+
position: relative;
|
|
2994
3038
|
}
|
|
2995
3039
|
|
|
2996
3040
|
input[type="radio"] {
|
|
@@ -3048,6 +3092,28 @@ function CardBankRadioStyles({}) {
|
|
|
3048
3092
|
.frac-card-bank-radio.frac-active {
|
|
3049
3093
|
background: #F6F6F7;
|
|
3050
3094
|
}
|
|
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
|
+
}
|
|
3051
3117
|
` });
|
|
3052
3118
|
}
|
|
3053
3119
|
|
|
@@ -3225,7 +3291,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3225
3291
|
{
|
|
3226
3292
|
id: "card_number",
|
|
3227
3293
|
className: "form-control card-number-new",
|
|
3228
|
-
style: { height: `${isSky ? "36px" : "46px"}
|
|
3294
|
+
style: { height: `${isSky ? "36px" : "46px"}` }
|
|
3229
3295
|
}
|
|
3230
3296
|
),
|
|
3231
3297
|
/* @__PURE__ */ jsx17("div", { className: "card-crdi card-expiry-new", children: /* @__PURE__ */ jsxs10("div", { className: "exp-date-year-container", children: [
|
|
@@ -3234,7 +3300,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3234
3300
|
{
|
|
3235
3301
|
id: "exp_month",
|
|
3236
3302
|
className: "form-control required card-cvv-in",
|
|
3237
|
-
style: { height: "36px", display: "
|
|
3303
|
+
style: { height: "36px", display: "block", minHeight: "36px" }
|
|
3238
3304
|
}
|
|
3239
3305
|
) }),
|
|
3240
3306
|
/* @__PURE__ */ jsx17("div", { className: "exp-year form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
@@ -3242,7 +3308,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3242
3308
|
{
|
|
3243
3309
|
id: "exp_year",
|
|
3244
3310
|
className: "form-control required card-cvv-in",
|
|
3245
|
-
style: { height: "36px", display: "
|
|
3311
|
+
style: { height: "36px", display: "block", minHeight: "36px" }
|
|
3246
3312
|
}
|
|
3247
3313
|
) }),
|
|
3248
3314
|
/* @__PURE__ */ jsx17("div", { className: "security-digit form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
@@ -3250,7 +3316,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3250
3316
|
{
|
|
3251
3317
|
id: "cvv",
|
|
3252
3318
|
className: "form-control card-cvv-in required",
|
|
3253
|
-
style: { height: "36px", display: "
|
|
3319
|
+
style: { height: "36px", display: "block", minHeight: "36px" }
|
|
3254
3320
|
}
|
|
3255
3321
|
) })
|
|
3256
3322
|
] }) })
|
|
@@ -3373,7 +3439,8 @@ var DataCapFields = ({
|
|
|
3373
3439
|
isOpen,
|
|
3374
3440
|
tokenKey,
|
|
3375
3441
|
setLoader,
|
|
3376
|
-
isAddCard
|
|
3442
|
+
isAddCard,
|
|
3443
|
+
isEmbedded
|
|
3377
3444
|
}) => {
|
|
3378
3445
|
const iframeId = "datacap-iframe";
|
|
3379
3446
|
const resolverRef = useRef2(null);
|
|
@@ -3399,6 +3466,20 @@ var DataCapFields = ({
|
|
|
3399
3466
|
|
|
3400
3467
|
`;
|
|
3401
3468
|
}
|
|
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
|
+
}
|
|
3402
3483
|
const initialize = async () => {
|
|
3403
3484
|
setLoader == null ? void 0 : setLoader(true);
|
|
3404
3485
|
setIframeReady(false);
|
|
@@ -3430,13 +3511,18 @@ var DataCapFields = ({
|
|
|
3430
3511
|
};
|
|
3431
3512
|
initialize();
|
|
3432
3513
|
}, [isOpen, tokenKey]);
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3514
|
+
useEffect7(() => {
|
|
3515
|
+
window.requestDcToken = () => {
|
|
3516
|
+
return new Promise((resolve, reject) => {
|
|
3517
|
+
setLoader == null ? void 0 : setLoader(true);
|
|
3518
|
+
resolverRef.current = { resolve, reject };
|
|
3519
|
+
});
|
|
3520
|
+
};
|
|
3521
|
+
return () => {
|
|
3522
|
+
delete window.requestDcToken;
|
|
3523
|
+
};
|
|
3524
|
+
}, []);
|
|
3525
|
+
console.log(setLoader, "loadingIframe");
|
|
3440
3526
|
return /* @__PURE__ */ jsx18(
|
|
3441
3527
|
"iframe",
|
|
3442
3528
|
{
|
|
@@ -3497,8 +3583,6 @@ function GetPaymentPage(props) {
|
|
|
3497
3583
|
const [selectedCard, setSelectedCard] = useState4();
|
|
3498
3584
|
const [selectedReader, setSelectedReader] = useState4(void 0);
|
|
3499
3585
|
const [cashDiscount, setCashDiscount] = useState4(Number(props == null ? void 0 : props.amount));
|
|
3500
|
-
const [bankAmount, setBankAmount] = useState4(Number(props == null ? void 0 : props.amount));
|
|
3501
|
-
const [bankFeeAmount, setBankFeeAmount] = useState4(0);
|
|
3502
3586
|
const [paymentData, setPaymentData] = useState4();
|
|
3503
3587
|
let [tranId, setTranId] = useState4("");
|
|
3504
3588
|
const tokenizerRef = useRef3(null);
|
|
@@ -3533,25 +3617,7 @@ function GetPaymentPage(props) {
|
|
|
3533
3617
|
useEffect8(() => {
|
|
3534
3618
|
if (show) {
|
|
3535
3619
|
let cash_discount = CalculateCashDiscount(props == null ? void 0 : props.amount, (props == null ? void 0 : props.surcharge) || 0);
|
|
3536
|
-
let bankAmount2 = cash_discount;
|
|
3537
|
-
if ((props == null ? void 0 : props.bankFeeAmount) && Number(props == null ? void 0 : props.bankFeeAmount) > 0) {
|
|
3538
|
-
bankAmount2 = Number(cash_discount) + Number(props == null ? void 0 : props.bankFeeAmount);
|
|
3539
|
-
}
|
|
3540
|
-
setBankAmount(bankAmount2);
|
|
3541
3620
|
setCashDiscount(cash_discount);
|
|
3542
|
-
const cardFeeAmount = Number((Number(props == null ? void 0 : props.amount) - Number(cash_discount || 0)).toFixed(2));
|
|
3543
|
-
const bankFeeAmount2 = Number((props == null ? void 0 : props.bankFeeAmount) || 0);
|
|
3544
|
-
const bankSavingsAmount = Math.max(bankFeeAmount2 > 0 ? cardFeeAmount - bankFeeAmount2 : cardFeeAmount, 0);
|
|
3545
|
-
const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
|
|
3546
|
-
setBankFeeAmount(bankFeeAmount2);
|
|
3547
|
-
console.log({
|
|
3548
|
-
cash_discount,
|
|
3549
|
-
bankAmount: bankAmount2,
|
|
3550
|
-
cardFeeAmount,
|
|
3551
|
-
bankFeeAmount: bankFeeAmount2,
|
|
3552
|
-
bankSavingsAmount,
|
|
3553
|
-
bankSavingsText
|
|
3554
|
-
});
|
|
3555
3621
|
}
|
|
3556
3622
|
}, [show, props == null ? void 0 : props.pass_fee, props == null ? void 0 : props.amount, props == null ? void 0 : props.surcharge]);
|
|
3557
3623
|
const handleClose = () => {
|
|
@@ -3718,7 +3784,7 @@ function GetPaymentPage(props) {
|
|
|
3718
3784
|
}
|
|
3719
3785
|
}
|
|
3720
3786
|
if (!isBankConsentChecked) {
|
|
3721
|
-
setErrorBankConsent("Above consent is
|
|
3787
|
+
setErrorBankConsent("Above consent is requied");
|
|
3722
3788
|
}
|
|
3723
3789
|
setAchError(errors);
|
|
3724
3790
|
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
@@ -3891,7 +3957,7 @@ function GetPaymentPage(props) {
|
|
|
3891
3957
|
routing_number: achData == null ? void 0 : achData.routingNumber,
|
|
3892
3958
|
bank_name: achData == null ? void 0 : achData.bankName,
|
|
3893
3959
|
account_type: achData == null ? void 0 : achData.accountType,
|
|
3894
|
-
amount: String(
|
|
3960
|
+
amount: String(cashDiscount || 0),
|
|
3895
3961
|
isSaveAch: saveACHinfo,
|
|
3896
3962
|
customer_id: props == null ? void 0 : props.customerId,
|
|
3897
3963
|
order_id: props == null ? void 0 : props.orderID,
|
|
@@ -3973,11 +4039,11 @@ function GetPaymentPage(props) {
|
|
|
3973
4039
|
let amount = String(props == null ? void 0 : props.amount);
|
|
3974
4040
|
let card_id = selectedCard == null ? void 0 : selectedCard.id;
|
|
3975
4041
|
let card_type = selectedCard == null ? void 0 : selectedCard.card_type;
|
|
3976
|
-
if (fractalpayPublicKey && order_id && amount &&
|
|
4042
|
+
if (fractalpayPublicKey && order_id && amount && cashDiscount) {
|
|
3977
4043
|
if (customer_id) {
|
|
3978
4044
|
if (card_id) {
|
|
3979
4045
|
let chargeobj = __spreadValues({
|
|
3980
|
-
amount: card_type === "Bank" ? `${
|
|
4046
|
+
amount: card_type === "Bank" ? `${cashDiscount}` : amount,
|
|
3981
4047
|
order_id,
|
|
3982
4048
|
customer_id,
|
|
3983
4049
|
card_id,
|
|
@@ -4216,21 +4282,22 @@ function GetPaymentPage(props) {
|
|
|
4216
4282
|
/* @__PURE__ */ jsx19("div", { className: "pay-amount-conatiner", children: /* @__PURE__ */ jsx19("small", { className: "pay-payment-amount", children: "Select paymet type" }) }),
|
|
4217
4283
|
/* @__PURE__ */ jsxs11("div", { className: "frac-card-bank-radio-main", children: [
|
|
4218
4284
|
/* @__PURE__ */ jsx19(CardBankRadio, { label: "Card", amount: (_a = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
4219
|
-
(paymentData == null ? void 0 : paymentData.isSkyFiAccount) && /* @__PURE__ */ jsx19(CardBankRadio, { label: "Bank", amount: (_b = Number(
|
|
4285
|
+
(paymentData == null ? void 0 : paymentData.isSkyFiAccount) && /* @__PURE__ */ jsx19(CardBankRadio, { label: "Bank", amount: (_b = Number(cashDiscount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab }),
|
|
4220
4286
|
(props == null ? void 0 : props.isReader) && (paymentData == null ? void 0 : paymentData.paymentDeviceList) && ((_c = paymentData == null ? void 0 : paymentData.paymentDeviceList) == null ? void 0 : _c.length) > 0 && /* @__PURE__ */ jsx19(CardBankRadio, { label: "Reader", amount: (_d = Number(props == null ? void 0 : props.amount)) == null ? void 0 : _d.toFixed(2), value: "reader", onChange: handletabchange, activetab })
|
|
4221
4287
|
] }),
|
|
4222
|
-
!loading && /* @__PURE__ */ jsxs11("div", { className: "", children: [
|
|
4223
|
-
|
|
4224
|
-
"
|
|
4225
|
-
|
|
4226
|
-
"."
|
|
4288
|
+
!loading && (numberToBoolean(paymentData == null ? void 0 : paymentData.showSurcharge) ? cashDiscount && cashDiscount > 0 && (props == null ? void 0 : props.pass_fee) ? /* @__PURE__ */ jsxs11("div", { className: "frac-cash-discount-fee", children: [
|
|
4289
|
+
/* @__PURE__ */ jsxs11("small", { children: [
|
|
4290
|
+
activetab === "card" || activetab === "reader" ? "Cash Discount" : "Cash Discount Savings",
|
|
4291
|
+
" "
|
|
4227
4292
|
] }),
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
"
|
|
4232
|
-
|
|
4233
|
-
|
|
4293
|
+
/* @__PURE__ */ jsx19("p", { children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) })
|
|
4294
|
+
] }) : null : cashDiscount && cashDiscount > 0 && (props == null ? void 0 : props.pass_fee) && (activetab === "card" || activetab === "reader") ? /* @__PURE__ */ jsxs11("div", { className: "frac-cash-discount-fee", children: [
|
|
4295
|
+
/* @__PURE__ */ jsxs11("small", { children: [
|
|
4296
|
+
activetab === "card" || activetab === "reader" ? "Surcharge" : null,
|
|
4297
|
+
" "
|
|
4298
|
+
] }),
|
|
4299
|
+
/* @__PURE__ */ jsx19("p", { children: formatUSD((Number(props.amount) - cashDiscount).toFixed(2)) })
|
|
4300
|
+
] }) : null)
|
|
4234
4301
|
] })
|
|
4235
4302
|
] }),
|
|
4236
4303
|
/* @__PURE__ */ jsxs11("div", { className: "pay-conatiner-one-last", children: [
|
|
@@ -4535,7 +4602,7 @@ function GetPaymentPage(props) {
|
|
|
4535
4602
|
/* @__PURE__ */ jsx19(CardList, { listHeading: "Banks", paymentGateway: paymentData == null ? void 0 : paymentData.paymentGateway, ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
|
|
4536
4603
|
setActiveinBank("form");
|
|
4537
4604
|
} }),
|
|
4538
|
-
/* @__PURE__ */ jsx19("div", { className: "form-group", style: { padding: "0" }, children: /* @__PURE__ */ jsx19("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlepayment, children: formatUSD((_n = Number(
|
|
4605
|
+
/* @__PURE__ */ jsx19("div", { className: "form-group", style: { padding: "0" }, children: /* @__PURE__ */ jsx19("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlepayment, children: formatUSD((_n = Number(cashDiscount)) == null ? void 0 : _n.toFixed(2)) }) })
|
|
4539
4606
|
] }) : /* @__PURE__ */ jsxs11("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
|
|
4540
4607
|
if (e.key === "Enter" && loading2) {
|
|
4541
4608
|
e.preventDefault();
|
|
@@ -4663,7 +4730,7 @@ function GetPaymentPage(props) {
|
|
|
4663
4730
|
" to have my permission to charge this bank account for agreed upon purchases in the future."
|
|
4664
4731
|
] }) })
|
|
4665
4732
|
] }),
|
|
4666
|
-
/* @__PURE__ */ jsx19("div", { className: "form-group ", children: /* @__PURE__ */ jsx19("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: formatUSD((_v = Number(
|
|
4733
|
+
/* @__PURE__ */ jsx19("div", { className: "form-group ", children: /* @__PURE__ */ jsx19("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: formatUSD((_v = Number(cashDiscount)) == null ? void 0 : _v.toFixed(2)) }) })
|
|
4667
4734
|
] })
|
|
4668
4735
|
] }),
|
|
4669
4736
|
/* @__PURE__ */ jsxs11("div", { id: "reader", style: { display: activetab === "reader" ? "block" : "none" }, className: "tabcontent", children: [
|
|
@@ -7633,7 +7700,7 @@ function PartialPayment(props) {
|
|
|
7633
7700
|
}
|
|
7634
7701
|
}
|
|
7635
7702
|
if (!isBankConsentChecked) {
|
|
7636
|
-
setErrorBankConsent("Above consent is
|
|
7703
|
+
setErrorBankConsent("Above consent is requied");
|
|
7637
7704
|
}
|
|
7638
7705
|
setAchError(errors);
|
|
7639
7706
|
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
@@ -8627,7 +8694,7 @@ function PartialPayment(props) {
|
|
|
8627
8694
|
}
|
|
8628
8695
|
|
|
8629
8696
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
8630
|
-
import { useEffect as
|
|
8697
|
+
import { useEffect as useEffect18, useState as useState12, useMemo } from "react";
|
|
8631
8698
|
|
|
8632
8699
|
// src/app/components/Skysystemz/SkyChargewidgetstyles.tsx
|
|
8633
8700
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -8863,6 +8930,17 @@ function SkyChargewidgetstyles() {
|
|
|
8863
8930
|
text-align : left !important;
|
|
8864
8931
|
text-transform: uppercase !important;
|
|
8865
8932
|
}
|
|
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
|
+
}
|
|
8866
8944
|
.form-control-frac{
|
|
8867
8945
|
display: block;
|
|
8868
8946
|
width: 100%;
|
|
@@ -8897,7 +8975,7 @@ function SkyChargewidgetstyles() {
|
|
|
8897
8975
|
}
|
|
8898
8976
|
.exp-date-year-container .form-group {
|
|
8899
8977
|
flex: 1;
|
|
8900
|
-
padding-left:.75rem;
|
|
8978
|
+
padding-left:.75rem !important;
|
|
8901
8979
|
}
|
|
8902
8980
|
.card-crdi {
|
|
8903
8981
|
display: flex;
|
|
@@ -8914,7 +8992,7 @@ function SkyChargewidgetstyles() {
|
|
|
8914
8992
|
}
|
|
8915
8993
|
.exp-date-year-container .form-group-frac{
|
|
8916
8994
|
flex:1;
|
|
8917
|
-
padding: 0px !important
|
|
8995
|
+
// padding: 0px !important
|
|
8918
8996
|
|
|
8919
8997
|
}
|
|
8920
8998
|
|
|
@@ -9415,13 +9493,54 @@ margin:0px !important;
|
|
|
9415
9493
|
padding:0px !important;
|
|
9416
9494
|
}
|
|
9417
9495
|
|
|
9418
|
-
|
|
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
|
+
|
|
9419
9538
|
|
|
9420
9539
|
` });
|
|
9421
9540
|
}
|
|
9422
9541
|
|
|
9423
9542
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9424
|
-
import { useCallback, useEffect as
|
|
9543
|
+
import { useCallback, useEffect as useEffect17, useRef as useRef12, useState as useState11 } from "react";
|
|
9425
9544
|
import axios9 from "axios";
|
|
9426
9545
|
import Swal5 from "sweetalert2";
|
|
9427
9546
|
|
|
@@ -9562,109 +9681,571 @@ function CheckoutWrapper({ clientSecret, onSuccess, showLoader, setError, sessio
|
|
|
9562
9681
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9563
9682
|
import { IoArrowBack as IoArrowBack4 } from "react-icons/io5";
|
|
9564
9683
|
import { NumericFormat as NumericFormat2 } from "react-number-format";
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9619
|
-
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9684
|
+
|
|
9685
|
+
// src/app/components/ErrorCardMessage/ErrorCardOverlaystyle.tsx
|
|
9686
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
9687
|
+
function ErrorCardOverlayStyle() {
|
|
9688
|
+
return /* @__PURE__ */ jsx32("style", { children: `
|
|
9689
|
+
.card-error-overlay .logo-container {
|
|
9690
|
+
display: flex;
|
|
9691
|
+
justify-content: center;
|
|
9692
|
+
align-items: center;
|
|
9693
|
+
margin-bottom: -50px; /* Adjust this to overlap the content */
|
|
9694
|
+
z-index: 10;
|
|
9695
|
+
}
|
|
9696
|
+
|
|
9697
|
+
.card-error-overlay .client-logo {
|
|
9698
|
+
max-width: 100px;
|
|
9699
|
+
height: auto;
|
|
9700
|
+
object-fit: contain;
|
|
9701
|
+
display: block;
|
|
9702
|
+
}
|
|
9703
|
+
|
|
9704
|
+
|
|
9705
|
+
.card-error-overlay .error-icon-overlay {
|
|
9706
|
+
display: flex;
|
|
9707
|
+
flex-direction: column;
|
|
9708
|
+
align-items: center;
|
|
9709
|
+
gap: 12px;
|
|
9710
|
+
min-height: 116px;
|
|
9711
|
+
z-index: 2;
|
|
9712
|
+
}
|
|
9713
|
+
|
|
9714
|
+
.card-error-overlay .circle {
|
|
9715
|
+
width: 50px;
|
|
9716
|
+
height: 50px;
|
|
9717
|
+
border: 1px solid red;
|
|
9718
|
+
border-radius: 50%;
|
|
9719
|
+
display: flex;
|
|
9720
|
+
justify-content: center;
|
|
9721
|
+
align-items: center;
|
|
9722
|
+
margin-bottom:20px
|
|
9723
|
+
}
|
|
9724
|
+
|
|
9725
|
+
.card-error-overlay .circle .fa-times {
|
|
9726
|
+
font-size: 30px;
|
|
9727
|
+
color: red;
|
|
9728
|
+
}
|
|
9729
|
+
|
|
9730
|
+
.card-error-overlay .error-text-overlay {
|
|
9731
|
+
display: flex;
|
|
9732
|
+
flex-direction: column;
|
|
9733
|
+
justify-content: center;
|
|
9734
|
+
align-items: center;
|
|
9735
|
+
gap: 4px;
|
|
9736
|
+
// width: 227px;
|
|
9737
|
+
}
|
|
9738
|
+
|
|
9739
|
+
.card-error-overlay .payment-error-text-overlay {
|
|
9740
|
+
font-family: 'Inter', sans-serif;
|
|
9741
|
+
font-weight: 500;
|
|
9742
|
+
font-size: 18px;
|
|
9743
|
+
line-height: 21px;
|
|
9744
|
+
text-align: center;
|
|
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
|
|
9626
9850
|
};
|
|
9627
|
-
const
|
|
9628
|
-
const
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
"padding": "0px",
|
|
9635
|
-
"appearance": "none",
|
|
9636
|
-
"outline": "none",
|
|
9637
|
-
"border": "none",
|
|
9638
|
-
"box-shadow": "none"
|
|
9639
|
-
},
|
|
9640
|
-
":focus": {
|
|
9641
|
-
"color": "#212529",
|
|
9642
|
-
"outline": "none",
|
|
9643
|
-
"border": "none"
|
|
9644
|
-
},
|
|
9645
|
-
"::placeholder": {
|
|
9646
|
-
"color": "#212529"
|
|
9851
|
+
const allowedCardNetworks = ["AMEX", "DISCOVER", "MASTERCARD", "VISA"];
|
|
9852
|
+
const allowedCardAuthMethods = require3ds ? ["CRYPTOGRAM_3DS"] : ["PAN_ONLY", "CRYPTOGRAM_3DS"];
|
|
9853
|
+
const baseCardPaymentMethod = {
|
|
9854
|
+
type: "CARD",
|
|
9855
|
+
parameters: {
|
|
9856
|
+
allowedAuthMethods: allowedCardAuthMethods,
|
|
9857
|
+
allowedCardNetworks
|
|
9647
9858
|
}
|
|
9648
9859
|
};
|
|
9649
|
-
const
|
|
9650
|
-
|
|
9860
|
+
const cardPaymentMethod = __spreadProps(__spreadValues({}, baseCardPaymentMethod), {
|
|
9861
|
+
tokenizationSpecification: {
|
|
9862
|
+
type: "PAYMENT_GATEWAY",
|
|
9863
|
+
parameters: {
|
|
9864
|
+
gateway: googlePayGatewayMerchantId2,
|
|
9865
|
+
gatewayMerchantId: googlePayGatewayMerchantId2
|
|
9866
|
+
}
|
|
9867
|
+
}
|
|
9868
|
+
});
|
|
9869
|
+
const handlePaymentAuthorization = async (paymentData) => {
|
|
9870
|
+
var _a, _b;
|
|
9651
9871
|
try {
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
}
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9872
|
+
const token = (_b = (_a = paymentData == null ? void 0 : paymentData.paymentMethodData) == null ? void 0 : _a.tokenizationData) == null ? void 0 : _b.token;
|
|
9873
|
+
if (!token) throw new Error("Missing token");
|
|
9874
|
+
const parsed = JSON.parse(token);
|
|
9875
|
+
console.log(parsed, "parsed token");
|
|
9876
|
+
setLoading(true);
|
|
9877
|
+
completeFractalFlow(parsed, null, "google_pay");
|
|
9878
|
+
return {
|
|
9879
|
+
transactionState: "SUCCESS"
|
|
9880
|
+
// ✅ CLOSES GOOGLE PAY POPUP
|
|
9881
|
+
};
|
|
9882
|
+
} catch (err) {
|
|
9883
|
+
console.error("Payment failed:", err);
|
|
9884
|
+
return {
|
|
9885
|
+
transactionState: "ERROR",
|
|
9886
|
+
// ❌ CLOSES WITH ERROR UI
|
|
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
|
|
9904
|
+
}
|
|
9905
|
+
});
|
|
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
|
|
9668
10249
|
} : null);
|
|
9669
10250
|
if (require3ds && (data == null ? void 0 : data.stripe_3ds_auth_id)) {
|
|
9670
10251
|
dataObj.stripe_3ds_auth_id = data == null ? void 0 : data.stripe_3ds_auth_id;
|
|
@@ -9789,19 +10370,28 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9789
10370
|
}
|
|
9790
10371
|
}
|
|
9791
10372
|
if (!isBankConsentChecked) {
|
|
9792
|
-
setErrorBankConsent("Above consent is
|
|
10373
|
+
setErrorBankConsent("Above consent is requied");
|
|
9793
10374
|
}
|
|
9794
10375
|
setAchError(errors);
|
|
9795
10376
|
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
9796
10377
|
};
|
|
9797
|
-
const completeFractalFlow = async (tokenizeData, intentid) => {
|
|
10378
|
+
const completeFractalFlow = async (tokenizeData, intentid, typeoftoken) => {
|
|
9798
10379
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
9799
10380
|
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
|
+
}
|
|
9800
10389
|
let token = tokenizeData;
|
|
9801
10390
|
let verifyandsaveresp = await axios9.post(`${masterBaseUrl}api/v1/gateway/verify-and-save/${session_token}`, {
|
|
9802
10391
|
token,
|
|
9803
10392
|
require3ds,
|
|
9804
|
-
pass_fee
|
|
10393
|
+
pass_fee,
|
|
10394
|
+
typeoftoken
|
|
9805
10395
|
});
|
|
9806
10396
|
if ((verifyandsaveresp == null ? void 0 : verifyandsaveresp.status) == 200) {
|
|
9807
10397
|
let responsetemp = (_a2 = verifyandsaveresp == null ? void 0 : verifyandsaveresp.data) == null ? void 0 : _a2.data;
|
|
@@ -9833,7 +10423,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9833
10423
|
}
|
|
9834
10424
|
};
|
|
9835
10425
|
const handleFractalTokenFlow = async () => {
|
|
9836
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2,
|
|
10426
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v, _w, _x, _y, _z, _A;
|
|
9837
10427
|
try {
|
|
9838
10428
|
const requestOptions = {
|
|
9839
10429
|
method: "POST",
|
|
@@ -9874,17 +10464,29 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9874
10464
|
three_ds_data
|
|
9875
10465
|
);
|
|
9876
10466
|
} catch (error2) {
|
|
9877
|
-
|
|
10467
|
+
console.log(error2, "error in tokenization");
|
|
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);
|
|
9878
10480
|
hideLoader();
|
|
9879
10481
|
}
|
|
9880
10482
|
if (tokenizeData == null ? void 0 : tokenizeData.token) {
|
|
9881
10483
|
let ThreedsData = tokenizeData == null ? void 0 : tokenizeData.stripe_three_ds_response;
|
|
9882
|
-
if (require3ds && !ThreedsData && (ThreedsData == null ? void 0 : ThreedsData.status) === "200 OK" && ((
|
|
10484
|
+
if (require3ds && !ThreedsData && (ThreedsData == null ? void 0 : ThreedsData.status) === "200 OK" && ((_r2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _r2.challenge_url)) {
|
|
9883
10485
|
setError("Something went wrong. Please try again later.");
|
|
9884
10486
|
}
|
|
9885
10487
|
if (require3ds) {
|
|
9886
|
-
if (!((
|
|
9887
|
-
completeFractalFlow(tokenizeData == null ? void 0 : tokenizeData.token, (
|
|
10488
|
+
if (!((_s2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _s2.challenge_url)) {
|
|
10489
|
+
completeFractalFlow(tokenizeData == null ? void 0 : tokenizeData.token, (_t2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _t2.id);
|
|
9888
10490
|
} else {
|
|
9889
10491
|
hideLoader();
|
|
9890
10492
|
setStripeResponse(__spreadProps(__spreadValues({}, ThreedsData == null ? void 0 : ThreedsData.data), {
|
|
@@ -9900,11 +10502,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9900
10502
|
console.log(error2, "error");
|
|
9901
10503
|
let readableMessage = "Something went wrong!";
|
|
9902
10504
|
try {
|
|
9903
|
-
const rawError = ((
|
|
10505
|
+
const rawError = ((_u2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _u2.data) || (error2 == null ? void 0 : error2.message) || "";
|
|
9904
10506
|
const errorText = typeof rawError === "string" ? rawError : JSON.stringify(rawError);
|
|
9905
|
-
const lines = ((
|
|
10507
|
+
const lines = ((_w = (_v = errorText.split) == null ? void 0 : _v.call(errorText, "\n")) == null ? void 0 : _w.filter(Boolean)) || [];
|
|
9906
10508
|
const lastLine = lines.at(-1) || "";
|
|
9907
|
-
const parts = (
|
|
10509
|
+
const parts = (_x = lastLine.split) == null ? void 0 : _x.call(lastLine, ": ");
|
|
9908
10510
|
readableMessage = (parts == null ? void 0 : parts.length) > 1 ? parts.pop().trim() : lastLine.trim() || readableMessage;
|
|
9909
10511
|
} catch (e) {
|
|
9910
10512
|
readableMessage = "Something went wrong!";
|
|
@@ -9912,8 +10514,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9912
10514
|
setError(readableMessage);
|
|
9913
10515
|
callback({
|
|
9914
10516
|
error: readableMessage,
|
|
9915
|
-
result: (
|
|
9916
|
-
statusCode: (
|
|
10517
|
+
result: (_z = (_y = error2 == null ? void 0 : error2.response) == null ? void 0 : _y.data) == null ? void 0 : _z.result,
|
|
10518
|
+
statusCode: (_A = error2 == null ? void 0 : error2.response) == null ? void 0 : _A.status
|
|
9917
10519
|
});
|
|
9918
10520
|
}
|
|
9919
10521
|
};
|
|
@@ -10330,8 +10932,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10330
10932
|
});
|
|
10331
10933
|
};
|
|
10332
10934
|
const handlechargeCustomer = async (e) => {
|
|
10333
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2
|
|
10334
|
-
e.currentTarget.blur();
|
|
10935
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
10936
|
+
e == null ? void 0 : e.currentTarget.blur();
|
|
10335
10937
|
if (loading) return;
|
|
10336
10938
|
let customer_id = customerId;
|
|
10337
10939
|
let card_id = selectedCard == null ? void 0 : selectedCard.id;
|
|
@@ -10378,7 +10980,6 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10378
10980
|
statusCode: (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.status
|
|
10379
10981
|
});
|
|
10380
10982
|
hideLoader();
|
|
10381
|
-
setError(((_i2 = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.message) || "Something went wrong!");
|
|
10382
10983
|
}
|
|
10383
10984
|
} else {
|
|
10384
10985
|
setError("Please Select A Card/Bank");
|
|
@@ -10454,21 +11055,21 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10454
11055
|
setOrderLoader(false);
|
|
10455
11056
|
}
|
|
10456
11057
|
};
|
|
10457
|
-
|
|
11058
|
+
useEffect17(() => {
|
|
10458
11059
|
if (!show && !autoTrigger) {
|
|
10459
11060
|
hasRunRef.current = false;
|
|
10460
11061
|
cardListRunRef.current = false;
|
|
10461
11062
|
}
|
|
10462
11063
|
}, [show, autoTrigger]);
|
|
10463
|
-
|
|
10464
|
-
if (!hasRunRef.current && (show || autoTrigger)) {
|
|
11064
|
+
useEffect17(() => {
|
|
11065
|
+
if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
|
|
10465
11066
|
getPaymentDetails();
|
|
10466
11067
|
if (isPartial && !partialRef) {
|
|
10467
11068
|
crateOrderFrac();
|
|
10468
11069
|
}
|
|
10469
11070
|
}
|
|
10470
|
-
}, [show, autoTrigger, isPartial]);
|
|
10471
|
-
|
|
11071
|
+
}, [show, autoTrigger, isPartial, onLoad]);
|
|
11072
|
+
useEffect17(() => {
|
|
10472
11073
|
if ((show || autoTrigger) && pass_fee_amount) {
|
|
10473
11074
|
let cashdisc = Number(amount) - Number(pass_fee_amount);
|
|
10474
11075
|
if (cashdisc && !isNaN(cashdisc)) {
|
|
@@ -10530,7 +11131,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10530
11131
|
console.error("3DS Auth failed \u274C", status);
|
|
10531
11132
|
setError(`3DS Authentication ${status}`);
|
|
10532
11133
|
};
|
|
10533
|
-
|
|
11134
|
+
useEffect17(() => {
|
|
10534
11135
|
if (setHandleCloseRef) {
|
|
10535
11136
|
setHandleCloseRef(() => handleClose);
|
|
10536
11137
|
}
|
|
@@ -10548,24 +11149,95 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10548
11149
|
setPartialError("");
|
|
10549
11150
|
}
|
|
10550
11151
|
};
|
|
10551
|
-
|
|
11152
|
+
useEffect17(() => {
|
|
10552
11153
|
if (typeof FractalTokenizer === "undefined") return;
|
|
10553
11154
|
const tokenizer = new FractalTokenizer({
|
|
10554
11155
|
styles: {}
|
|
10555
11156
|
});
|
|
10556
11157
|
}, []);
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
11158
|
+
const stateRef = useRef12({
|
|
11159
|
+
activeinBank,
|
|
11160
|
+
activeinCard,
|
|
11161
|
+
activetab
|
|
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: () => {
|
|
10562
11234
|
setErrorIframe("");
|
|
10563
|
-
} }) }),
|
|
10564
|
-
|
|
10565
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */
|
|
10566
|
-
/* @__PURE__ */
|
|
10567
|
-
/* @__PURE__ */
|
|
10568
|
-
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */
|
|
11235
|
+
}, autoTrigger: onSubmit ? !onSubmit : autoTrigger }) }),
|
|
11236
|
+
/* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11237
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx36(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
|
|
11238
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
|
|
11239
|
+
/* @__PURE__ */ jsx36("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
|
|
11240
|
+
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx36(
|
|
10569
11241
|
ThreeDSChallenge,
|
|
10570
11242
|
{
|
|
10571
11243
|
containerRef: threeDSContainerRef,
|
|
@@ -10575,40 +11247,33 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10575
11247
|
onSuccess: handleSuccess,
|
|
10576
11248
|
onError: handleError
|
|
10577
11249
|
}
|
|
10578
|
-
) : /* @__PURE__ */
|
|
10579
|
-
/* @__PURE__ */
|
|
10580
|
-
/* @__PURE__ */
|
|
10581
|
-
/* @__PURE__ */
|
|
11250
|
+
) : /* @__PURE__ */ jsxs21("div", { className: "parent-pay-container", children: [
|
|
11251
|
+
/* @__PURE__ */ jsx36("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs21("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
11252
|
+
/* @__PURE__ */ jsx36("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx36("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" }) }),
|
|
11253
|
+
/* @__PURE__ */ jsx36("defs", { children: /* @__PURE__ */ jsx36("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx36("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
10582
11254
|
] }) }),
|
|
10583
|
-
/* @__PURE__ */
|
|
10584
|
-
/* @__PURE__ */
|
|
10585
|
-
/* @__PURE__ */
|
|
10586
|
-
/* @__PURE__ */
|
|
10587
|
-
/* @__PURE__ */
|
|
10588
|
-
/* @__PURE__ */
|
|
10589
|
-
/* @__PURE__ */
|
|
10590
|
-
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */
|
|
11255
|
+
/* @__PURE__ */ jsx36("div", { className: "pay-main-logo-res" }),
|
|
11256
|
+
/* @__PURE__ */ jsxs21("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
|
|
11257
|
+
!onSubmit && /* @__PURE__ */ jsxs21("div", { className: "pay-header pay-conatiner-one", children: [
|
|
11258
|
+
/* @__PURE__ */ jsxs21("div", { className: "pay-conatiner-one-first", children: [
|
|
11259
|
+
/* @__PURE__ */ jsxs21("div", { className: "pay-logo-container", children: [
|
|
11260
|
+
/* @__PURE__ */ jsx36("div", { className: "pay-main-logo" }),
|
|
11261
|
+
/* @__PURE__ */ jsx36("h1", { className: "pay-heading", children: "Pay" }),
|
|
11262
|
+
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs21("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
|
|
10591
11263
|
" ",
|
|
10592
|
-
/* @__PURE__ */
|
|
11264
|
+
/* @__PURE__ */ jsx36(IoArrowBack4, {}),
|
|
10593
11265
|
" Back"
|
|
10594
11266
|
] })
|
|
10595
11267
|
] }),
|
|
10596
|
-
/* @__PURE__ */
|
|
10597
|
-
/* @__PURE__ */
|
|
10598
|
-
/* @__PURE__ */
|
|
10599
|
-
/* @__PURE__ */
|
|
10600
|
-
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */
|
|
11268
|
+
/* @__PURE__ */ jsx36("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs21("div", { className: "pay-amount-conatiner", children: [
|
|
11269
|
+
/* @__PURE__ */ jsx36("small", { className: "pay-payment-amount", children: "Select payment type" }),
|
|
11270
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-card-bank-radio-main", children: [
|
|
11271
|
+
/* @__PURE__ */ jsx36(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
11272
|
+
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx36(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
|
|
10601
11273
|
] }),
|
|
10602
|
-
|
|
10603
|
-
/* @__PURE__ */
|
|
10604
|
-
|
|
10605
|
-
" "
|
|
10606
|
-
] }),
|
|
10607
|
-
/* @__PURE__ */ jsx32("p", { children: formatUSD((Number(amount) - Number(cashDiscount)).toFixed(2)) })
|
|
10608
|
-
] }) : null,
|
|
10609
|
-
isPartial && /* @__PURE__ */ jsxs19("div", { className: "frac-partial-payment-input", children: [
|
|
10610
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
10611
|
-
/* @__PURE__ */ jsx32(
|
|
11274
|
+
isPartial && /* @__PURE__ */ jsxs21("div", { className: "frac-partial-payment-input", children: [
|
|
11275
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11276
|
+
/* @__PURE__ */ jsx36(
|
|
10612
11277
|
NumericFormat2,
|
|
10613
11278
|
{
|
|
10614
11279
|
prefix: "$",
|
|
@@ -10632,331 +11297,403 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10632
11297
|
}
|
|
10633
11298
|
}
|
|
10634
11299
|
),
|
|
10635
|
-
partialError && /* @__PURE__ */
|
|
11300
|
+
partialError && /* @__PURE__ */ jsx36("span", { className: "error-span", children: partialError })
|
|
10636
11301
|
] })
|
|
10637
11302
|
] }) })
|
|
10638
11303
|
] }),
|
|
10639
|
-
/* @__PURE__ */
|
|
10640
|
-
/* @__PURE__ */
|
|
10641
|
-
/* @__PURE__ */
|
|
11304
|
+
/* @__PURE__ */ jsxs21("div", { className: "pay-conatiner-one-last", children: [
|
|
11305
|
+
/* @__PURE__ */ jsx36("img", { src: secure2, alt: "" }),
|
|
11306
|
+
/* @__PURE__ */ jsx36("img", { src: pov2, alt: "" }),
|
|
10642
11307
|
"Secure payments powered by Fractal"
|
|
10643
11308
|
] })
|
|
10644
11309
|
] }),
|
|
10645
|
-
/* @__PURE__ */
|
|
10646
|
-
/* @__PURE__ */
|
|
10647
|
-
/* @__PURE__ */
|
|
10648
|
-
/* @__PURE__ */
|
|
10649
|
-
|
|
10650
|
-
/* @__PURE__ */ jsx32(IoArrowBack4, {})
|
|
10651
|
-
] }) }),
|
|
10652
|
-
/* @__PURE__ */ jsx32("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
10653
|
-
] }),
|
|
10654
|
-
/* @__PURE__ */ jsxs19("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
|
|
10655
|
-
/* @__PURE__ */ jsx32("img", { src: visa2, alt: "", width: 33 }),
|
|
10656
|
-
/* @__PURE__ */ jsx32("img", { src: mastercard2, width: 33, alt: "" }),
|
|
10657
|
-
/* @__PURE__ */ jsx32("img", { src: americanexp2, alt: "", width: 33 }),
|
|
10658
|
-
/* @__PURE__ */ jsx32("img", { src: discover2, width: 33, alt: "" })
|
|
11310
|
+
/* @__PURE__ */ jsx36("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx36("div", { className: "col-md-12", children: /* @__PURE__ */ jsxs21("div", { id: "payment-form-div ", className: onSubmit ? "frac-payment-form-div" : "", children: [
|
|
11311
|
+
onSubmit && /* @__PURE__ */ jsx36("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs21("div", { className: "pay-amount-conatiner", children: [
|
|
11312
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-card-bank-radio-main", children: [
|
|
11313
|
+
/* @__PURE__ */ jsx36(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
11314
|
+
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx36(CardBankRadio, { skydesign: true, label: "Bank", amount: (_d = Number(bankAmount)) == null ? void 0 : _d.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
|
|
10659
11315
|
] }),
|
|
10660
|
-
|
|
10661
|
-
/* @__PURE__ */
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
|
|
10680
|
-
|
|
10681
|
-
|
|
10682
|
-
|
|
10683
|
-
|
|
10684
|
-
|
|
10685
|
-
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10689
|
-
|
|
10690
|
-
|
|
10691
|
-
) })
|
|
10692
|
-
] }),
|
|
10693
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10694
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "zip", children: "ZIP" }),
|
|
10695
|
-
/* @__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) }),
|
|
10696
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
|
|
11316
|
+
isPartial && /* @__PURE__ */ jsxs21("div", { className: "frac-partial-payment-input", children: [
|
|
11317
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11318
|
+
/* @__PURE__ */ jsx36(
|
|
11319
|
+
NumericFormat2,
|
|
11320
|
+
{
|
|
11321
|
+
prefix: "$",
|
|
11322
|
+
className: "form-control-frac",
|
|
11323
|
+
value: partialAmount,
|
|
11324
|
+
onValueChange: (values) => {
|
|
11325
|
+
handlePartialChange(values);
|
|
11326
|
+
},
|
|
11327
|
+
thousandSeparator: true,
|
|
11328
|
+
placeholder: "Enter partial amount",
|
|
11329
|
+
allowNegative: false,
|
|
11330
|
+
allowLeadingZeros: false,
|
|
11331
|
+
decimalScale: 2,
|
|
11332
|
+
fixedDecimalScale: true
|
|
11333
|
+
}
|
|
11334
|
+
),
|
|
11335
|
+
partialError && /* @__PURE__ */ jsx36("span", { className: "error-span", children: partialError })
|
|
11336
|
+
] })
|
|
11337
|
+
] }) }),
|
|
11338
|
+
is3DSEnable ? clientSecret && /* @__PURE__ */ jsx36(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11339
|
+
/* @__PURE__ */ jsxs21("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
|
|
11340
|
+
!onSubmit && /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11341
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
|
|
11342
|
+
/* @__PURE__ */ jsx36("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs21("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
|
|
11343
|
+
" ",
|
|
11344
|
+
/* @__PURE__ */ jsx36(IoArrowBack4, {})
|
|
11345
|
+
] }) }),
|
|
11346
|
+
/* @__PURE__ */ jsx36("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
10697
11347
|
] }),
|
|
10698
|
-
|
|
10699
|
-
/* @__PURE__ */
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
|
|
10703
|
-
|
|
10704
|
-
className: "toggle-checkbox",
|
|
10705
|
-
checked: saveCardInfo,
|
|
10706
|
-
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
10707
|
-
}
|
|
10708
|
-
),
|
|
10709
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
10710
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
10711
|
-
/* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
|
|
10712
|
-
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
|
|
10713
|
-
"svg",
|
|
10714
|
-
{
|
|
10715
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
10716
|
-
width: "20",
|
|
10717
|
-
height: "20",
|
|
10718
|
-
viewBox: "0 0 20 20",
|
|
10719
|
-
fill: "none",
|
|
10720
|
-
children: [
|
|
10721
|
-
/* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
10722
|
-
/* @__PURE__ */ jsx32(
|
|
10723
|
-
"path",
|
|
10724
|
-
{
|
|
10725
|
-
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",
|
|
10726
|
-
fill: "#161616"
|
|
10727
|
-
}
|
|
10728
|
-
)
|
|
10729
|
-
]
|
|
10730
|
-
}
|
|
10731
|
-
) }),
|
|
10732
|
-
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
10733
|
-
"If checked, I agree to give the ",
|
|
10734
|
-
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10735
|
-
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
10736
|
-
] }) })
|
|
10737
|
-
] })
|
|
10738
|
-
] }) })
|
|
11348
|
+
/* @__PURE__ */ jsxs21("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
|
|
11349
|
+
/* @__PURE__ */ jsx36("img", { src: visa2, alt: "", width: 33 }),
|
|
11350
|
+
/* @__PURE__ */ jsx36("img", { src: mastercard2, width: 33, alt: "" }),
|
|
11351
|
+
/* @__PURE__ */ jsx36("img", { src: americanexp2, alt: "", width: 33 }),
|
|
11352
|
+
/* @__PURE__ */ jsx36("img", { src: discover2, width: 33, alt: "" })
|
|
11353
|
+
] })
|
|
10739
11354
|
] }),
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
}
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10749
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
10750
|
-
/* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
10751
|
-
const value = e.target.value;
|
|
10752
|
-
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
10753
|
-
handleCardChange("cardName", value);
|
|
10754
|
-
}
|
|
10755
|
-
} }),
|
|
10756
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
10757
|
-
] }),
|
|
10758
|
-
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx32(
|
|
10759
|
-
DataCapFields,
|
|
11355
|
+
activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11356
|
+
/* @__PURE__ */ jsx36(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
|
|
11357
|
+
setActiveinCard("form");
|
|
11358
|
+
} }),
|
|
11359
|
+
/* @__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: partialAmount ? formatUSD((_e = Number(partialAmount)) == null ? void 0 : _e.toFixed(2)) : formatUSD((_f = Number(amount)) == null ? void 0 : _f.toFixed(2)) }) })
|
|
11360
|
+
] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11361
|
+
/* @__PURE__ */ jsx36(
|
|
11362
|
+
ApplePayButton,
|
|
10760
11363
|
{
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
|
|
11364
|
+
applePayAmount: partialAmount ? partialAmount : amount,
|
|
11365
|
+
applePayMerchantId,
|
|
11366
|
+
applePayMerchantName: merchantName,
|
|
11367
|
+
completeFractalFlow,
|
|
11368
|
+
showLoader
|
|
10764
11369
|
}
|
|
10765
|
-
)
|
|
10766
|
-
/* @__PURE__ */
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
{
|
|
10788
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
|
|
10800
|
-
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
11370
|
+
),
|
|
11371
|
+
/* @__PURE__ */ jsx36(
|
|
11372
|
+
GooglePayComponent,
|
|
11373
|
+
{
|
|
11374
|
+
amount: partialAmount ? partialAmount : amount,
|
|
11375
|
+
googlePayEnvironment,
|
|
11376
|
+
googlePayGatewayMerchantId,
|
|
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();
|
|
11388
|
+
}
|
|
11389
|
+
}, children: [
|
|
11390
|
+
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11391
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11392
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11393
|
+
/* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11394
|
+
const value = e.target.value;
|
|
11395
|
+
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11396
|
+
handleCardChange("cardName", value);
|
|
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
|
+
] })
|
|
10809
11462
|
] }) })
|
|
10810
|
-
] })
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
/* @__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: [
|
|
10819
|
-
" ",
|
|
10820
|
-
/* @__PURE__ */ jsx32(IoArrowBack4, {})
|
|
10821
|
-
] }) }),
|
|
10822
|
-
/* @__PURE__ */ jsx32("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
|
|
10823
|
-
] }),
|
|
10824
|
-
activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10825
|
-
/* @__PURE__ */ jsx32(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
|
|
10826
|
-
setActiveinBank("form");
|
|
10827
|
-
} }),
|
|
10828
|
-
/* @__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)) }) })
|
|
10829
|
-
] }) : /* @__PURE__ */ jsxs19("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
|
|
10830
|
-
if (e.key === "Enter" && loading) {
|
|
10831
|
-
e.preventDefault();
|
|
10832
|
-
e.stopPropagation();
|
|
10833
|
-
}
|
|
10834
|
-
}, children: [
|
|
10835
|
-
/* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: {
|
|
10836
|
-
minHeight: "444px",
|
|
10837
|
-
maxHeight: "444px"
|
|
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
|
+
}
|
|
10838
11471
|
}, children: [
|
|
10839
|
-
/* @__PURE__ */
|
|
10840
|
-
/* @__PURE__ */
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
{
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
maxLength: 9,
|
|
10853
|
-
placeholder: "000000000",
|
|
10854
|
-
name: "routingNumber",
|
|
10855
|
-
value: (_m = achData == null ? void 0 : achData.routingNumber) != null ? _m : "",
|
|
10856
|
-
onChange: handleChangeAch
|
|
10857
|
-
}
|
|
10858
|
-
),
|
|
10859
|
-
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
|
|
10860
|
-
] }),
|
|
10861
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10862
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "accountnumber", children: "Account number" }),
|
|
10863
|
-
/* @__PURE__ */ jsx32(
|
|
10864
|
-
"input",
|
|
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,
|
|
10865
11485
|
{
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
placeholder: "0000000000",
|
|
10871
|
-
name: "accountNumber",
|
|
10872
|
-
value: (_n = achData == null ? void 0 : achData.accountNumber) != null ? _n : "",
|
|
10873
|
-
onChange: handleChangeAch
|
|
11486
|
+
isOpen: show || autoTrigger,
|
|
11487
|
+
tokenKey: dcToken,
|
|
11488
|
+
setLoader: activeinCard === "form" ? setLoadingIframe : null,
|
|
11489
|
+
isEmbedded: onSubmit ? true : false
|
|
10874
11490
|
}
|
|
10875
|
-
),
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
"
|
|
10899
|
-
{
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
}
|
|
10926
|
-
)
|
|
10927
|
-
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
|
|
11491
|
+
) }),
|
|
11492
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11493
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11494
|
+
/* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_j = cardData == null ? void 0 : cardData.zipCode) != null ? _j : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
|
|
11495
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11496
|
+
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
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",
|
|
11505
|
+
{
|
|
11506
|
+
type: "checkbox",
|
|
11507
|
+
id: "save_card",
|
|
11508
|
+
className: "toggle-checkbox",
|
|
11509
|
+
checked: saveCardInfo,
|
|
11510
|
+
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11511
|
+
}
|
|
11512
|
+
),
|
|
11513
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
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
|
+
] }) })
|
|
10928
11543
|
] }),
|
|
10929
|
-
/* @__PURE__ */
|
|
10930
|
-
|
|
10931
|
-
|
|
10932
|
-
|
|
10933
|
-
|
|
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: [
|
|
11686
|
+
"If checked, I agree to give the ",
|
|
11687
|
+
/* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
|
|
11688
|
+
" permission to charge this bank account for agreed-upon purchases in the future."
|
|
11689
|
+
] }) })
|
|
10934
11690
|
] })
|
|
10935
11691
|
] }),
|
|
10936
|
-
/* @__PURE__ */
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
}
|
|
10942
|
-
} }),
|
|
10943
|
-
/* @__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.` })
|
|
10944
|
-
] }),
|
|
10945
|
-
errorBankConsent && /* @__PURE__ */ jsx32("span", { className: "error-span", children: errorBankConsent }),
|
|
10946
|
-
customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
10947
|
-
/* @__PURE__ */ jsx32("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
10948
|
-
/* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
|
|
10949
|
-
] }),
|
|
10950
|
-
saveACHinfo && /* @__PURE__ */ jsx32("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
10951
|
-
"If checked, I agree to give the ",
|
|
10952
|
-
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10953
|
-
" permission to charge this bank account for agreed-upon purchases in the future."
|
|
10954
|
-
] }) })
|
|
10955
|
-
] }),
|
|
10956
|
-
/* @__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)) }) })
|
|
10957
|
-
] })
|
|
10958
|
-
] }) })
|
|
10959
|
-
] }) }) }) })
|
|
11692
|
+
/* @__PURE__ */ jsx36("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx36("button", { className: "pay-button", style: { margin: "20px 0 0", display: onSubmit ? "none" : "block" }, type: "submit", children: formatUSD((_u = Number(bankAmount)) == null ? void 0 : _u.toFixed(2)) }) })
|
|
11693
|
+
] })
|
|
11694
|
+
] }) })
|
|
11695
|
+
] })
|
|
11696
|
+
] }) }) })
|
|
10960
11697
|
] })
|
|
10961
11698
|
] })
|
|
10962
11699
|
] })
|
|
@@ -10967,7 +11704,7 @@ var ModelContentSky_default = ModelContentSky;
|
|
|
10967
11704
|
|
|
10968
11705
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
10969
11706
|
import axios10 from "axios";
|
|
10970
|
-
import { Fragment as
|
|
11707
|
+
import { Fragment as Fragment21, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
10971
11708
|
var PaymentWidget = ({
|
|
10972
11709
|
amount,
|
|
10973
11710
|
bankAmount,
|
|
@@ -10989,12 +11726,12 @@ var PaymentWidget = ({
|
|
|
10989
11726
|
bankSurcharge,
|
|
10990
11727
|
partialRef
|
|
10991
11728
|
}) => {
|
|
10992
|
-
const [show, setShow] =
|
|
10993
|
-
const [loading, setLoading] =
|
|
10994
|
-
const [childHandleClose, setChildHandleClose] =
|
|
11729
|
+
const [show, setShow] = useState12(autoTrigger || false);
|
|
11730
|
+
const [loading, setLoading] = useState12(false);
|
|
11731
|
+
const [childHandleClose, setChildHandleClose] = useState12(() => () => {
|
|
10995
11732
|
});
|
|
10996
|
-
const [orderGuid, setOrderGuid] =
|
|
10997
|
-
const [remainingAmount, setRemainingAmount] =
|
|
11733
|
+
const [orderGuid, setOrderGuid] = useState12(null);
|
|
11734
|
+
const [remainingAmount, setRemainingAmount] = useState12(null);
|
|
10998
11735
|
const initialCommonProps = useMemo(
|
|
10999
11736
|
() => ({
|
|
11000
11737
|
amount,
|
|
@@ -11041,8 +11778,8 @@ var PaymentWidget = ({
|
|
|
11041
11778
|
partialRef
|
|
11042
11779
|
]
|
|
11043
11780
|
);
|
|
11044
|
-
const [commonProps, setCommonProps] =
|
|
11045
|
-
|
|
11781
|
+
const [commonProps, setCommonProps] = useState12(initialCommonProps);
|
|
11782
|
+
useEffect18(() => {
|
|
11046
11783
|
if (show) {
|
|
11047
11784
|
setCommonProps(initialCommonProps);
|
|
11048
11785
|
}
|
|
@@ -11073,29 +11810,556 @@ var PaymentWidget = ({
|
|
|
11073
11810
|
setLoading(false);
|
|
11074
11811
|
}
|
|
11075
11812
|
};
|
|
11076
|
-
|
|
11813
|
+
useEffect18(() => {
|
|
11077
11814
|
if (show && isPartial && partialRef) {
|
|
11078
11815
|
getskyosOrderDetails();
|
|
11079
11816
|
}
|
|
11080
11817
|
}, [show, isPartial, partialRef]);
|
|
11081
|
-
return /* @__PURE__ */
|
|
11082
|
-
/* @__PURE__ */
|
|
11083
|
-
/* @__PURE__ */
|
|
11084
|
-
/* @__PURE__ */
|
|
11085
|
-
/* @__PURE__ */
|
|
11086
|
-
/* @__PURE__ */
|
|
11087
|
-
/* @__PURE__ */
|
|
11088
|
-
/* @__PURE__ */
|
|
11089
|
-
!autoTrigger && /* @__PURE__ */
|
|
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(() => {
|
|
12326
|
+
if (show && isPartial && partialRef) {
|
|
12327
|
+
getskyosOrderDetails();
|
|
12328
|
+
}
|
|
12329
|
+
}, [show, isPartial, partialRef]);
|
|
12330
|
+
console.log(onLoad, "onLoad");
|
|
12331
|
+
useEffect20(() => {
|
|
12332
|
+
const supported = !!window.ApplePaySession;
|
|
12333
|
+
let canPay = false;
|
|
12334
|
+
if (supported) {
|
|
12335
|
+
try {
|
|
12336
|
+
canPay = window.ApplePaySession.canMakePayments();
|
|
12337
|
+
} catch (e) {
|
|
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: [
|
|
11090
12353
|
submitBtnText,
|
|
11091
12354
|
submitBtnIcon
|
|
11092
12355
|
] }),
|
|
11093
|
-
!autoTrigger ? /* @__PURE__ */
|
|
12356
|
+
!autoTrigger ? /* @__PURE__ */ jsx39(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx39(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx39(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
|
|
11094
12357
|
] });
|
|
11095
12358
|
};
|
|
11096
12359
|
export {
|
|
11097
12360
|
AddCardEasyPay as AddCard,
|
|
11098
12361
|
CardOnFile,
|
|
12362
|
+
EmbeddedCheckout,
|
|
11099
12363
|
GetPaymentPage,
|
|
11100
12364
|
PartialPayment,
|
|
11101
12365
|
PaymentWidget,
|