@fractalpay/fractalpay-next-dev 0.0.254 → 0.0.256
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 -16
- package/dist/index.js +1849 -523
- 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.256",
|
|
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", {}),
|
|
@@ -218,41 +236,65 @@ var Loader_default = Loader;
|
|
|
218
236
|
var { name } = require_package();
|
|
219
237
|
var S3Url = "https://fractal-userdata-upload.s3.us-east-1.amazonaws.com/";
|
|
220
238
|
if (name === "@fractalpay/fractalpay-next-dev") {
|
|
221
|
-
|
|
222
|
-
|
|
239
|
+
masterBaseUrl = "https://dev-sky-node.fractalpay.com/";
|
|
240
|
+
baseUrl = "https://dev-widget.fractalpay.com/";
|
|
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 = {
|
|
@@ -2908,7 +2950,7 @@ function ErrorCardMszStyle() {
|
|
|
2908
2950
|
|
|
2909
2951
|
// src/app/components/ErrorCardMessage/ErrorCardMessage.tsx
|
|
2910
2952
|
import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2911
|
-
var ErrorCardMessage = ({ onClose, error }) => {
|
|
2953
|
+
var ErrorCardMessage = ({ onClose, error, autoTrigger = false }) => {
|
|
2912
2954
|
return /* @__PURE__ */ jsxs6(Fragment6, { children: [
|
|
2913
2955
|
/* @__PURE__ */ jsx12(ErrorCardMszStyle, {}),
|
|
2914
2956
|
/* @__PURE__ */ jsx12("div", { className: "card-error", children: /* @__PURE__ */ jsx12("div", { className: "payment-error-container", children: /* @__PURE__ */ jsxs6("div", { className: "error-icon", children: [
|
|
@@ -2917,7 +2959,7 @@ var ErrorCardMessage = ({ onClose, error }) => {
|
|
|
2917
2959
|
/* @__PURE__ */ jsx12("div", { className: "payment-error-text", children: error }),
|
|
2918
2960
|
/* @__PURE__ */ jsx12("div", { className: "thank-you-text", children: "Try again later " })
|
|
2919
2961
|
] }),
|
|
2920
|
-
/* @__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" }) })
|
|
2921
2963
|
] }) }) })
|
|
2922
2964
|
] });
|
|
2923
2965
|
};
|
|
@@ -2934,14 +2976,28 @@ var socketClient_default = socket;
|
|
|
2934
2976
|
|
|
2935
2977
|
// src/app/components/Atoms/CardBankRadio/CardBankRadio.tsx
|
|
2936
2978
|
import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2937
|
-
var CardBankRadio = (
|
|
2938
|
-
|
|
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(
|
|
2939
2983
|
"div",
|
|
2940
2984
|
{
|
|
2941
2985
|
className: `frac-card-bank-radio ${props.activetab === props.value ? "frac-active" : ""}`,
|
|
2942
2986
|
onClick: () => props.onChange(props.value),
|
|
2943
2987
|
role: "radio",
|
|
2944
|
-
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: [
|
|
2945
3001
|
/* @__PURE__ */ jsxs7("div", { className: "frac-card-title-main", children: [
|
|
2946
3002
|
/* @__PURE__ */ jsx13("img", { src: props.label.toLowerCase() === "card" ? defaultcard : props.label.toLowerCase() === "reader" ? pax : bankNew, className: "frac-payment-type-logo", alt: "" }),
|
|
2947
3003
|
/* @__PURE__ */ jsxs7("div", { className: "frac-card-label", children: [
|
|
@@ -2949,10 +3005,11 @@ var CardBankRadio = (props) => {
|
|
|
2949
3005
|
/* @__PURE__ */ jsx13("div", { className: "frac-card-label-amount", children: formatUSD(props.amount) })
|
|
2950
3006
|
] })
|
|
2951
3007
|
] }),
|
|
3008
|
+
savingsText ? /* @__PURE__ */ jsx13("button", { type: "button", className: savingsBadgeClass, children: savingsText }) : null,
|
|
2952
3009
|
/* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsx13("input", { name: "paymenttype", checked: props.activetab === props.value, type: "radio", value: props.value, onChange: (e) => {
|
|
2953
3010
|
props.onChange(e.target.value);
|
|
2954
3011
|
} }) })
|
|
2955
|
-
]
|
|
3012
|
+
] })
|
|
2956
3013
|
}
|
|
2957
3014
|
) });
|
|
2958
3015
|
};
|
|
@@ -2977,6 +3034,7 @@ function CardBankRadioStyles({}) {
|
|
|
2977
3034
|
justify-content: space-between;
|
|
2978
3035
|
align-items: center;
|
|
2979
3036
|
align-self: stretch;
|
|
3037
|
+
position: relative;
|
|
2980
3038
|
}
|
|
2981
3039
|
|
|
2982
3040
|
input[type="radio"] {
|
|
@@ -3034,6 +3092,28 @@ function CardBankRadioStyles({}) {
|
|
|
3034
3092
|
.frac-card-bank-radio.frac-active {
|
|
3035
3093
|
background: #F6F6F7;
|
|
3036
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
|
+
}
|
|
3037
3117
|
` });
|
|
3038
3118
|
}
|
|
3039
3119
|
|
|
@@ -3211,7 +3291,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3211
3291
|
{
|
|
3212
3292
|
id: "card_number",
|
|
3213
3293
|
className: "form-control card-number-new",
|
|
3214
|
-
style: { height: `${isSky ? "36px" : "46px"}
|
|
3294
|
+
style: { height: `${isSky ? "36px" : "46px"}` }
|
|
3215
3295
|
}
|
|
3216
3296
|
),
|
|
3217
3297
|
/* @__PURE__ */ jsx17("div", { className: "card-crdi card-expiry-new", children: /* @__PURE__ */ jsxs10("div", { className: "exp-date-year-container", children: [
|
|
@@ -3220,7 +3300,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3220
3300
|
{
|
|
3221
3301
|
id: "exp_month",
|
|
3222
3302
|
className: "form-control required card-cvv-in",
|
|
3223
|
-
style: { height: "36px", display: "
|
|
3303
|
+
style: { height: "36px", display: "block", minHeight: "36px" }
|
|
3224
3304
|
}
|
|
3225
3305
|
) }),
|
|
3226
3306
|
/* @__PURE__ */ jsx17("div", { className: "exp-year form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
@@ -3228,7 +3308,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3228
3308
|
{
|
|
3229
3309
|
id: "exp_year",
|
|
3230
3310
|
className: "form-control required card-cvv-in",
|
|
3231
|
-
style: { height: "36px", display: "
|
|
3311
|
+
style: { height: "36px", display: "block", minHeight: "36px" }
|
|
3232
3312
|
}
|
|
3233
3313
|
) }),
|
|
3234
3314
|
/* @__PURE__ */ jsx17("div", { className: "security-digit form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
@@ -3236,7 +3316,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3236
3316
|
{
|
|
3237
3317
|
id: "cvv",
|
|
3238
3318
|
className: "form-control card-cvv-in required",
|
|
3239
|
-
style: { height: "36px", display: "
|
|
3319
|
+
style: { height: "36px", display: "block", minHeight: "36px" }
|
|
3240
3320
|
}
|
|
3241
3321
|
) })
|
|
3242
3322
|
] }) })
|
|
@@ -3359,7 +3439,8 @@ var DataCapFields = ({
|
|
|
3359
3439
|
isOpen,
|
|
3360
3440
|
tokenKey,
|
|
3361
3441
|
setLoader,
|
|
3362
|
-
isAddCard
|
|
3442
|
+
isAddCard,
|
|
3443
|
+
isEmbedded
|
|
3363
3444
|
}) => {
|
|
3364
3445
|
const iframeId = "datacap-iframe";
|
|
3365
3446
|
const resolverRef = useRef2(null);
|
|
@@ -3385,6 +3466,20 @@ var DataCapFields = ({
|
|
|
3385
3466
|
|
|
3386
3467
|
`;
|
|
3387
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
|
+
}
|
|
3388
3483
|
const initialize = async () => {
|
|
3389
3484
|
setLoader == null ? void 0 : setLoader(true);
|
|
3390
3485
|
setIframeReady(false);
|
|
@@ -3416,13 +3511,18 @@ var DataCapFields = ({
|
|
|
3416
3511
|
};
|
|
3417
3512
|
initialize();
|
|
3418
3513
|
}, [isOpen, tokenKey]);
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
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");
|
|
3426
3526
|
return /* @__PURE__ */ jsx18(
|
|
3427
3527
|
"iframe",
|
|
3428
3528
|
{
|
|
@@ -3684,7 +3784,7 @@ function GetPaymentPage(props) {
|
|
|
3684
3784
|
}
|
|
3685
3785
|
}
|
|
3686
3786
|
if (!isBankConsentChecked) {
|
|
3687
|
-
setErrorBankConsent("Above consent is
|
|
3787
|
+
setErrorBankConsent("Above consent is requied");
|
|
3688
3788
|
}
|
|
3689
3789
|
setAchError(errors);
|
|
3690
3790
|
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
@@ -7600,7 +7700,7 @@ function PartialPayment(props) {
|
|
|
7600
7700
|
}
|
|
7601
7701
|
}
|
|
7602
7702
|
if (!isBankConsentChecked) {
|
|
7603
|
-
setErrorBankConsent("Above consent is
|
|
7703
|
+
setErrorBankConsent("Above consent is requied");
|
|
7604
7704
|
}
|
|
7605
7705
|
setAchError(errors);
|
|
7606
7706
|
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
@@ -8594,7 +8694,7 @@ function PartialPayment(props) {
|
|
|
8594
8694
|
}
|
|
8595
8695
|
|
|
8596
8696
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
8597
|
-
import { useEffect as
|
|
8697
|
+
import { useEffect as useEffect19, useState as useState12, useMemo } from "react";
|
|
8598
8698
|
|
|
8599
8699
|
// src/app/components/Skysystemz/SkyChargewidgetstyles.tsx
|
|
8600
8700
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -8830,6 +8930,17 @@ function SkyChargewidgetstyles() {
|
|
|
8830
8930
|
text-align : left !important;
|
|
8831
8931
|
text-transform: uppercase !important;
|
|
8832
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
|
+
}
|
|
8833
8944
|
.form-control-frac{
|
|
8834
8945
|
display: block;
|
|
8835
8946
|
width: 100%;
|
|
@@ -8864,7 +8975,7 @@ function SkyChargewidgetstyles() {
|
|
|
8864
8975
|
}
|
|
8865
8976
|
.exp-date-year-container .form-group {
|
|
8866
8977
|
flex: 1;
|
|
8867
|
-
padding-left:.75rem;
|
|
8978
|
+
padding-left:.75rem !important;
|
|
8868
8979
|
}
|
|
8869
8980
|
.card-crdi {
|
|
8870
8981
|
display: flex;
|
|
@@ -8881,7 +8992,7 @@ function SkyChargewidgetstyles() {
|
|
|
8881
8992
|
}
|
|
8882
8993
|
.exp-date-year-container .form-group-frac{
|
|
8883
8994
|
flex:1;
|
|
8884
|
-
padding: 0px !important
|
|
8995
|
+
// padding: 0px !important
|
|
8885
8996
|
|
|
8886
8997
|
}
|
|
8887
8998
|
|
|
@@ -9382,13 +9493,54 @@ margin:0px !important;
|
|
|
9382
9493
|
padding:0px !important;
|
|
9383
9494
|
}
|
|
9384
9495
|
|
|
9385
|
-
|
|
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
|
+
|
|
9386
9538
|
|
|
9387
9539
|
` });
|
|
9388
9540
|
}
|
|
9389
9541
|
|
|
9390
9542
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9391
|
-
import { useCallback, useEffect as
|
|
9543
|
+
import { useCallback, useEffect as useEffect18, useRef as useRef12, useState as useState11 } from "react";
|
|
9392
9544
|
import axios9 from "axios";
|
|
9393
9545
|
import Swal5 from "sweetalert2";
|
|
9394
9546
|
|
|
@@ -9529,113 +9681,604 @@ function CheckoutWrapper({ clientSecret, onSuccess, showLoader, setError, sessio
|
|
|
9529
9681
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9530
9682
|
import { IoArrowBack as IoArrowBack4 } from "react-icons/io5";
|
|
9531
9683
|
import { NumericFormat as NumericFormat2 } from "react-number-format";
|
|
9532
|
-
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9562
|
-
|
|
9563
|
-
|
|
9564
|
-
|
|
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
|
-
|
|
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
|
+
|
|
9834
|
+
// src/app/components/Atoms/Googlepay/GooglePayScriptLoader.tsx
|
|
9835
|
+
import { useEffect as useEffect15 } from "react";
|
|
9836
|
+
var googlePayScriptLoaded = false;
|
|
9837
|
+
var GooglePayScriptLoader = ({
|
|
9838
|
+
onLoad
|
|
9839
|
+
}) => {
|
|
9840
|
+
useEffect15(() => {
|
|
9841
|
+
if (googlePayScriptLoaded) {
|
|
9842
|
+
onLoad == null ? void 0 : onLoad();
|
|
9843
|
+
return;
|
|
9844
|
+
}
|
|
9845
|
+
const existingScript = document.querySelector(
|
|
9846
|
+
`script[src="https://pay.google.com/gp/p/js/pay.js"]`
|
|
9847
|
+
);
|
|
9848
|
+
if (!existingScript) {
|
|
9849
|
+
const script2 = document.createElement("script");
|
|
9850
|
+
script2.src = "https://pay.google.com/gp/p/js/pay.js";
|
|
9851
|
+
script2.async = true;
|
|
9852
|
+
script2.onload = () => {
|
|
9853
|
+
console.log("\u2705 Google Pay script loaded");
|
|
9854
|
+
googlePayScriptLoaded = true;
|
|
9855
|
+
console.log("google:", window.google);
|
|
9856
|
+
onLoad == null ? void 0 : onLoad();
|
|
9857
|
+
};
|
|
9858
|
+
script2.onerror = (err) => {
|
|
9859
|
+
console.error("\u274C Google Pay script failed", err);
|
|
9860
|
+
};
|
|
9861
|
+
document.head.appendChild(script2);
|
|
9862
|
+
} else {
|
|
9863
|
+
googlePayScriptLoaded = true;
|
|
9864
|
+
onLoad == null ? void 0 : onLoad();
|
|
9865
|
+
}
|
|
9866
|
+
}, []);
|
|
9867
|
+
return null;
|
|
9868
|
+
};
|
|
9869
|
+
|
|
9870
|
+
// src/app/components/Atoms/Googlepay/Googlepay.tsx
|
|
9871
|
+
import { Fragment as Fragment19, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
9872
|
+
function GooglePayComponent({
|
|
9873
|
+
amount,
|
|
9874
|
+
googlePayEnvironment: googlePayEnvironment2,
|
|
9875
|
+
googlePayGatewayMerchantId: googlePayGatewayMerchantId2,
|
|
9876
|
+
googlePayMerchantId: googlePayMerchantId2,
|
|
9877
|
+
googlePayMerchantName,
|
|
9878
|
+
require3ds = false,
|
|
9879
|
+
completeFractalFlow,
|
|
9880
|
+
setLoading
|
|
9881
|
+
}) {
|
|
9882
|
+
const containerRef = useRef10(null);
|
|
9883
|
+
const paymentsClientRef = useRef10(null);
|
|
9884
|
+
const baseRequest = {
|
|
9885
|
+
apiVersion: 2,
|
|
9886
|
+
apiVersionMinor: 0
|
|
9593
9887
|
};
|
|
9594
|
-
const
|
|
9595
|
-
const
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
"padding": "0px",
|
|
9602
|
-
"appearance": "none",
|
|
9603
|
-
"outline": "none",
|
|
9604
|
-
"border": "none",
|
|
9605
|
-
"box-shadow": "none"
|
|
9606
|
-
},
|
|
9607
|
-
":focus": {
|
|
9608
|
-
"color": "#212529",
|
|
9609
|
-
"outline": "none",
|
|
9610
|
-
"border": "none"
|
|
9611
|
-
},
|
|
9612
|
-
"::placeholder": {
|
|
9613
|
-
"color": "#212529"
|
|
9888
|
+
const allowedCardNetworks = ["AMEX", "DISCOVER", "MASTERCARD", "VISA"];
|
|
9889
|
+
const allowedCardAuthMethods = require3ds ? ["CRYPTOGRAM_3DS"] : ["PAN_ONLY", "CRYPTOGRAM_3DS"];
|
|
9890
|
+
const baseCardPaymentMethod = {
|
|
9891
|
+
type: "CARD",
|
|
9892
|
+
parameters: {
|
|
9893
|
+
allowedAuthMethods: allowedCardAuthMethods,
|
|
9894
|
+
allowedCardNetworks
|
|
9614
9895
|
}
|
|
9615
9896
|
};
|
|
9616
|
-
const
|
|
9617
|
-
|
|
9897
|
+
const cardPaymentMethod = __spreadProps(__spreadValues({}, baseCardPaymentMethod), {
|
|
9898
|
+
tokenizationSpecification: {
|
|
9899
|
+
type: "PAYMENT_GATEWAY",
|
|
9900
|
+
parameters: {
|
|
9901
|
+
gateway: googlePayGatewayMerchantId2,
|
|
9902
|
+
gatewayMerchantId: googlePayGatewayMerchantId2
|
|
9903
|
+
}
|
|
9904
|
+
}
|
|
9905
|
+
});
|
|
9906
|
+
const handlePaymentAuthorization = async (paymentData) => {
|
|
9907
|
+
var _a, _b;
|
|
9618
9908
|
try {
|
|
9619
|
-
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
}
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
9909
|
+
const token = (_b = (_a = paymentData == null ? void 0 : paymentData.paymentMethodData) == null ? void 0 : _a.tokenizationData) == null ? void 0 : _b.token;
|
|
9910
|
+
if (!token) throw new Error("Missing token");
|
|
9911
|
+
const parsed = JSON.parse(token);
|
|
9912
|
+
console.log(parsed, "parsed token");
|
|
9913
|
+
setLoading(true);
|
|
9914
|
+
completeFractalFlow(parsed, null, "google_pay");
|
|
9915
|
+
return {
|
|
9916
|
+
transactionState: "SUCCESS"
|
|
9917
|
+
// ✅ CLOSES GOOGLE PAY POPUP
|
|
9918
|
+
};
|
|
9919
|
+
} catch (err) {
|
|
9920
|
+
console.error("Payment failed:", err);
|
|
9921
|
+
return {
|
|
9922
|
+
transactionState: "ERROR",
|
|
9923
|
+
// ❌ CLOSES WITH ERROR UI
|
|
9924
|
+
error: {
|
|
9925
|
+
intent: "PAYMENT_AUTHORIZATION",
|
|
9926
|
+
message: "Payment failed",
|
|
9927
|
+
reason: "PAYMENT_DATA_INVALID"
|
|
9634
9928
|
}
|
|
9635
|
-
}
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9929
|
+
};
|
|
9930
|
+
}
|
|
9931
|
+
};
|
|
9932
|
+
const getPaymentsClient = () => {
|
|
9933
|
+
if (!paymentsClientRef.current && typeof window !== "undefined") {
|
|
9934
|
+
const google = window.google;
|
|
9935
|
+
if (!google) return null;
|
|
9936
|
+
paymentsClientRef.current = new google.payments.api.PaymentsClient({
|
|
9937
|
+
environment: googlePayEnvironment2,
|
|
9938
|
+
// ✅ ADD THIS
|
|
9939
|
+
paymentDataCallbacks: {
|
|
9940
|
+
onPaymentAuthorized: handlePaymentAuthorization
|
|
9941
|
+
}
|
|
9942
|
+
});
|
|
9943
|
+
}
|
|
9944
|
+
return paymentsClientRef.current;
|
|
9945
|
+
};
|
|
9946
|
+
const getIsReadyToPayRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
|
|
9947
|
+
allowedPaymentMethods: [baseCardPaymentMethod]
|
|
9948
|
+
});
|
|
9949
|
+
const getTransactionInfo = () => ({
|
|
9950
|
+
countryCode: "US",
|
|
9951
|
+
currencyCode: "USD",
|
|
9952
|
+
totalPriceStatus: "FINAL",
|
|
9953
|
+
totalPrice: amount,
|
|
9954
|
+
checkoutOption: "COMPLETE_IMMEDIATE_PURCHASE"
|
|
9955
|
+
});
|
|
9956
|
+
const getPaymentDataRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
|
|
9957
|
+
allowedPaymentMethods: [cardPaymentMethod],
|
|
9958
|
+
transactionInfo: getTransactionInfo(),
|
|
9959
|
+
merchantInfo: {
|
|
9960
|
+
merchantId: googlePayMerchantId2,
|
|
9961
|
+
merchantName: googlePayMerchantName
|
|
9962
|
+
},
|
|
9963
|
+
// ✅ ADD THIS
|
|
9964
|
+
callbackIntents: ["PAYMENT_AUTHORIZATION"]
|
|
9965
|
+
});
|
|
9966
|
+
const initializeGooglePay = async () => {
|
|
9967
|
+
try {
|
|
9968
|
+
const client = getPaymentsClient();
|
|
9969
|
+
if (!client) {
|
|
9970
|
+
console.error("Google Pay client not ready");
|
|
9971
|
+
return;
|
|
9972
|
+
}
|
|
9973
|
+
const response = await client.isReadyToPay(
|
|
9974
|
+
getIsReadyToPayRequest()
|
|
9975
|
+
);
|
|
9976
|
+
if (response.result && containerRef.current) {
|
|
9977
|
+
const button = client.createButton({
|
|
9978
|
+
onClick: onGooglePayClick,
|
|
9979
|
+
allowedPaymentMethods: [baseCardPaymentMethod],
|
|
9980
|
+
buttonType: "pay",
|
|
9981
|
+
buttonColor: "black",
|
|
9982
|
+
buttonRadius: 8
|
|
9983
|
+
});
|
|
9984
|
+
if (containerRef.current) {
|
|
9985
|
+
containerRef.current.innerHTML = "";
|
|
9986
|
+
}
|
|
9987
|
+
containerRef.current.appendChild(button);
|
|
9988
|
+
}
|
|
9989
|
+
} catch (err) {
|
|
9990
|
+
console.error("Google Pay init error:", err);
|
|
9991
|
+
}
|
|
9992
|
+
};
|
|
9993
|
+
const onGooglePayClick = async () => {
|
|
9994
|
+
const client = getPaymentsClient();
|
|
9995
|
+
if (!client) {
|
|
9996
|
+
console.error("Google Pay client not ready");
|
|
9997
|
+
return;
|
|
9998
|
+
}
|
|
9999
|
+
try {
|
|
10000
|
+
await client.loadPaymentData(getPaymentDataRequest());
|
|
10001
|
+
} catch (err) {
|
|
10002
|
+
if ((err == null ? void 0 : err.statusCode) !== "CANCELED") {
|
|
10003
|
+
console.error(err);
|
|
10004
|
+
}
|
|
10005
|
+
}
|
|
10006
|
+
};
|
|
10007
|
+
const onScriptLoad = () => {
|
|
10008
|
+
if (!googlePayEnvironment2 || !googlePayGatewayMerchantId2 || !amount || !googlePayMerchantId2) {
|
|
10009
|
+
console.error("Missing Google Pay config");
|
|
10010
|
+
return;
|
|
10011
|
+
}
|
|
10012
|
+
setTimeout(() => {
|
|
10013
|
+
initializeGooglePay();
|
|
10014
|
+
}, 0);
|
|
10015
|
+
};
|
|
10016
|
+
return /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
10017
|
+
/* @__PURE__ */ jsx34("div", { ref: containerRef, className: "text-center" }),
|
|
10018
|
+
/* @__PURE__ */ jsx34(GooglePayScriptLoader, { onLoad: onScriptLoad })
|
|
10019
|
+
] });
|
|
10020
|
+
}
|
|
10021
|
+
|
|
10022
|
+
// src/app/components/Atoms/Applepay/ApplePayButton.tsx
|
|
10023
|
+
import { useEffect as useEffect17, useRef as useRef11 } from "react";
|
|
10024
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
10025
|
+
function ApplePayButton({
|
|
10026
|
+
applePayMerchantId: applePayMerchantId2,
|
|
10027
|
+
applePayAmount,
|
|
10028
|
+
applePayMerchantName,
|
|
10029
|
+
showLoader,
|
|
10030
|
+
completeFractalFlow
|
|
10031
|
+
}) {
|
|
10032
|
+
const applePayRef = useRef11(null);
|
|
10033
|
+
const paymentRequestMethods = [
|
|
10034
|
+
{
|
|
10035
|
+
supportedMethods: "https://apple.com/apple-pay",
|
|
10036
|
+
data: {
|
|
10037
|
+
version: 3,
|
|
10038
|
+
merchantIdentifier: applePayMerchantId2,
|
|
10039
|
+
// ✅ FIXED
|
|
10040
|
+
merchantCapabilities: ["supports3DS"],
|
|
10041
|
+
supportedNetworks: ["amex", "discover", "mastercard", "visa"],
|
|
10042
|
+
// ✅ FIXED
|
|
10043
|
+
countryCode: "US"
|
|
10044
|
+
}
|
|
10045
|
+
}
|
|
10046
|
+
];
|
|
10047
|
+
const paymentRequestOptions = {
|
|
10048
|
+
requestPayerName: false,
|
|
10049
|
+
requestPayerEmail: false,
|
|
10050
|
+
requestPayerPhone: false,
|
|
10051
|
+
requestShipping: false
|
|
10052
|
+
};
|
|
10053
|
+
function buildPaymentDetails() {
|
|
10054
|
+
return {
|
|
10055
|
+
total: {
|
|
10056
|
+
label: applePayMerchantName,
|
|
10057
|
+
amount: {
|
|
10058
|
+
currency: "USD",
|
|
10059
|
+
value: applePayAmount
|
|
10060
|
+
}
|
|
10061
|
+
}
|
|
10062
|
+
};
|
|
10063
|
+
}
|
|
10064
|
+
async function validateMerchant(event) {
|
|
10065
|
+
var _a;
|
|
10066
|
+
console.log("\u{1F7E1} STEP 1: Merchant validation started");
|
|
10067
|
+
try {
|
|
10068
|
+
console.log("Validation URL:", event.validationURL);
|
|
10069
|
+
console.log("Domain:", window.location.hostname);
|
|
10070
|
+
const res = await fetch(
|
|
10071
|
+
`${masterBaseUrl}api/v1/widget/generate-apple-pay-session`,
|
|
10072
|
+
{
|
|
10073
|
+
method: "POST",
|
|
10074
|
+
headers: {
|
|
10075
|
+
"Content-Type": "application/json"
|
|
10076
|
+
},
|
|
10077
|
+
body: JSON.stringify({
|
|
10078
|
+
validationUrl: event.validationURL,
|
|
10079
|
+
applePayMerchantId: applePayMerchantId2,
|
|
10080
|
+
applepayDisplayName: applePayMerchantName,
|
|
10081
|
+
requestDomain: window.location.hostname
|
|
10082
|
+
// ✅ IMPORTANT
|
|
10083
|
+
})
|
|
10084
|
+
}
|
|
10085
|
+
);
|
|
10086
|
+
console.log("\u{1F7E1} STEP 2: Response status:", res.status);
|
|
10087
|
+
const data = await res.json();
|
|
10088
|
+
console.log("RAW session response:", JSON.stringify(data));
|
|
10089
|
+
console.log("\u{1F7E2} STEP 3: Session response:", data);
|
|
10090
|
+
const merchantSession = (_a = data == null ? void 0 : data.data) != null ? _a : data;
|
|
10091
|
+
console.log("\u{1F7E2} STEP 3: Session response:2", merchantSession);
|
|
10092
|
+
if (!merchantSession || typeof merchantSession !== "object") {
|
|
10093
|
+
console.error("\u274C Bad session shape");
|
|
10094
|
+
event.complete(null);
|
|
10095
|
+
return;
|
|
10096
|
+
}
|
|
10097
|
+
console.log("\u{1F7E2} STEP 4: Completing merchant validation");
|
|
10098
|
+
event.complete(merchantSession);
|
|
10099
|
+
} catch (err) {
|
|
10100
|
+
console.log("\u274C Merchant validation failed:", err == null ? void 0 : err.message);
|
|
10101
|
+
event.complete(null);
|
|
10102
|
+
}
|
|
10103
|
+
}
|
|
10104
|
+
async function authorizePayment(paymentResponse) {
|
|
10105
|
+
console.log("\u{1F7E1} STEP 5: Authorizing payment");
|
|
10106
|
+
try {
|
|
10107
|
+
const token = paymentResponse.details.token.paymentData;
|
|
10108
|
+
console.log("\u{1F7E2} STEP 6: Got token");
|
|
10109
|
+
await completeFractalFlow(token, null, "apple_pay");
|
|
10110
|
+
await paymentResponse.complete("success");
|
|
10111
|
+
console.log("\u2705 Payment completed successfully");
|
|
10112
|
+
} catch (err) {
|
|
10113
|
+
console.log("\u274C Authorization failed:", err == null ? void 0 : err.message);
|
|
10114
|
+
await paymentResponse.complete("fail");
|
|
10115
|
+
}
|
|
10116
|
+
}
|
|
10117
|
+
async function handleApplePayClick() {
|
|
10118
|
+
console.log("\u{1F7E1} STEP A: Click detected");
|
|
10119
|
+
try {
|
|
10120
|
+
const request = new PaymentRequest(
|
|
10121
|
+
paymentRequestMethods,
|
|
10122
|
+
buildPaymentDetails(),
|
|
10123
|
+
paymentRequestOptions
|
|
10124
|
+
);
|
|
10125
|
+
request.onmerchantvalidation = validateMerchant;
|
|
10126
|
+
console.log("\u{1F7E1} STEP B: Calling show()");
|
|
10127
|
+
const response = await request.show();
|
|
10128
|
+
console.log("\u{1F7E2} STEP C: Payment sheet opened");
|
|
10129
|
+
await authorizePayment(response);
|
|
10130
|
+
} catch (err) {
|
|
10131
|
+
console.log("\u274C Apple Pay flow failed:", err == null ? void 0 : err.message);
|
|
10132
|
+
}
|
|
10133
|
+
}
|
|
10134
|
+
useEffect17(() => {
|
|
10135
|
+
if (window.ApplePaySession && window.ApplePaySession.canMakePayments()) {
|
|
10136
|
+
console.log("\u2705 Apple Pay is available");
|
|
10137
|
+
} else {
|
|
10138
|
+
console.log("\u274C Apple Pay NOT available");
|
|
10139
|
+
}
|
|
10140
|
+
}, []);
|
|
10141
|
+
useEffect17(() => {
|
|
10142
|
+
const btn = applePayRef.current;
|
|
10143
|
+
if (!btn) return;
|
|
10144
|
+
const handleClick = () => handleApplePayClick();
|
|
10145
|
+
btn.addEventListener("click", handleClick);
|
|
10146
|
+
return () => btn.removeEventListener("click", handleClick);
|
|
10147
|
+
}, [applePayMerchantId2, applePayAmount, applePayMerchantName]);
|
|
10148
|
+
return /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
|
|
10149
|
+
"apple-pay-button",
|
|
10150
|
+
{
|
|
10151
|
+
ref: applePayRef,
|
|
10152
|
+
buttonstyle: "black",
|
|
10153
|
+
type: "pay",
|
|
10154
|
+
locale: "en-US",
|
|
10155
|
+
style: { width: "100%" }
|
|
10156
|
+
}
|
|
10157
|
+
) });
|
|
10158
|
+
}
|
|
10159
|
+
|
|
10160
|
+
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
10161
|
+
import { Fragment as Fragment20, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
10162
|
+
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 }) => {
|
|
10163
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
10164
|
+
const hasRunRef = useRef12(false);
|
|
10165
|
+
const cardFormRef = useRef12(null);
|
|
10166
|
+
const bankFormRef = useRef12(null);
|
|
10167
|
+
const expiryYearRef = useRef12(null);
|
|
10168
|
+
const expiryMonthRef = useRef12(null);
|
|
10169
|
+
const cardListRunRef = useRef12(false);
|
|
10170
|
+
const threeDSContainerRef = useRef12(null);
|
|
10171
|
+
const [activetab, setActive] = useState11("card");
|
|
10172
|
+
const [activeList, setActiveList] = useState11("card");
|
|
10173
|
+
const [cardData, setCardData] = useState11();
|
|
10174
|
+
const [cardError, setCardError] = useState11({});
|
|
10175
|
+
const [achData, setAchData] = useState11();
|
|
10176
|
+
const [achError, setAchError] = useState11({});
|
|
10177
|
+
const [saveACHinfo, setSaveACHinfo] = useState11(false);
|
|
10178
|
+
const [saveCardInfo, setSaveCardInfo] = useState11(false);
|
|
10179
|
+
const [error, setError] = useState11("");
|
|
10180
|
+
const [errorIframe, setErrorIframe] = useState11("");
|
|
10181
|
+
const [success, setSuccess] = useState11(false);
|
|
10182
|
+
let [tranId, setTranId] = useState11("");
|
|
10183
|
+
const [loading, setLoading] = useState11(false);
|
|
10184
|
+
const [loading2, setLoading2] = useState11(false);
|
|
10185
|
+
const [loadingIframe, setLoadingIframe] = useState11(false);
|
|
10186
|
+
const [cardList, setCardList] = useState11([]);
|
|
10187
|
+
const [bankList, setBankList] = useState11([]);
|
|
10188
|
+
const [selectedCard, setSelectedCard] = useState11();
|
|
10189
|
+
const [cashDiscount, setCashDiscount] = useState11(Number(amount));
|
|
10190
|
+
const [activeinCard, setActiveinCard] = useState11("form");
|
|
10191
|
+
const [activeinBank, setActiveinBank] = useState11("form");
|
|
10192
|
+
const [isBankActive, setIsBankActive] = useState11(false);
|
|
10193
|
+
const [processingFee, setProcessingFee] = useState11(0);
|
|
10194
|
+
const [clientSecret, setClientSecret] = useState11("");
|
|
10195
|
+
const [errorMessage, setErrorMessage] = useState11(null);
|
|
10196
|
+
const [initialLoader, setInitialLoader] = useState11(false);
|
|
10197
|
+
const [is3DSEnable, setIs3DSEnable] = useState11(false);
|
|
10198
|
+
const [stripeResponse, setStripeResponse] = useState11(null);
|
|
10199
|
+
const [orderLoader, setOrderLoader] = useState11(false);
|
|
10200
|
+
const [orderGuid, setOrderGuid] = useState11(ordGuid || null);
|
|
10201
|
+
const [partialAmount, setPartialAmount] = useState11("");
|
|
10202
|
+
const [partialError, setPartialError] = useState11("");
|
|
10203
|
+
const [remainingAmount, setRemainingAmount] = useState11("");
|
|
10204
|
+
const [paymentGateway, setPaymentGateway] = useState11();
|
|
10205
|
+
const [dcToken, setDCToken] = useState11();
|
|
10206
|
+
const [isBankConsentChecked, setIsBankConsentChecked] = useState11(false);
|
|
10207
|
+
const [errorBankConsent, setErrorBankConsent] = useState11("");
|
|
10208
|
+
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
10209
|
+
let visa2 = S3Url + "widget/visa-img.svg";
|
|
10210
|
+
let americanexp2 = S3Url + "widget/ae-img.svg";
|
|
10211
|
+
let discover2 = S3Url + "widget/discover-img.svg";
|
|
10212
|
+
let defaultcard2 = S3Url + "widget/card.svg";
|
|
10213
|
+
let trash2 = S3Url + "widget/Trash.svg";
|
|
10214
|
+
let bank2 = S3Url + "widget/bank.svg";
|
|
10215
|
+
let secure2 = S3Url + "widget/secure-img.png";
|
|
10216
|
+
let pov2 = S3Url + "widget/pov-by.png";
|
|
10217
|
+
let pax2 = S3Url + "widget/pax.svg";
|
|
10218
|
+
let cardicon = S3Url + "widget/cardicon.svg";
|
|
10219
|
+
let bankicon = S3Url + "widget/bankicon.svg";
|
|
10220
|
+
let defualtcardborder = S3Url + "widget/defualtcardborder.svg";
|
|
10221
|
+
let unionicon = S3Url + "widget/unionpay.svg";
|
|
10222
|
+
let dinersicon = S3Url + "widget/diners.svg";
|
|
10223
|
+
let jcbicon = S3Url + "widget/jcb.svg";
|
|
10224
|
+
const showLoader = () => setLoading(true);
|
|
10225
|
+
const hideLoader = () => setLoading(false);
|
|
10226
|
+
const CalculateCashDiscount = (amount2, surcharge2) => {
|
|
10227
|
+
const surchargeVal = (parseFloat(surcharge2) || 0) / 100;
|
|
10228
|
+
const originalAmount = amount2 / (1 + surchargeVal);
|
|
10229
|
+
return Math.round(originalAmount * 100) / 100;
|
|
10230
|
+
};
|
|
10231
|
+
const cardFeeAmount = Number(pass_fee_amount || 0);
|
|
10232
|
+
const bankFeeAmount = Number(bankSurcharge || 0);
|
|
10233
|
+
const bankSavingsAmount = Math.max(bankFeeAmount > 0 ? cardFeeAmount - bankFeeAmount : cardFeeAmount, 0);
|
|
10234
|
+
const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
|
|
10235
|
+
const tokenizerRef = useRef12(null);
|
|
10236
|
+
const fractalStyles = {
|
|
10237
|
+
input: {
|
|
10238
|
+
"font-family": "'Inter', sans-serif",
|
|
10239
|
+
"font-size": "16px",
|
|
10240
|
+
"color": "#212529",
|
|
10241
|
+
"background-color": "transparent",
|
|
10242
|
+
"padding": "0px",
|
|
10243
|
+
"appearance": "none",
|
|
10244
|
+
"outline": "none",
|
|
10245
|
+
"border": "none",
|
|
10246
|
+
"box-shadow": "none"
|
|
10247
|
+
},
|
|
10248
|
+
":focus": {
|
|
10249
|
+
"color": "#212529",
|
|
10250
|
+
"outline": "none",
|
|
10251
|
+
"border": "none"
|
|
10252
|
+
},
|
|
10253
|
+
"::placeholder": {
|
|
10254
|
+
"color": "#212529"
|
|
10255
|
+
}
|
|
10256
|
+
};
|
|
10257
|
+
const handleCharge = async (data) => {
|
|
10258
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
10259
|
+
try {
|
|
10260
|
+
let dataObj = __spreadValues(__spreadValues({
|
|
10261
|
+
pass_fee_amount: Number(amount) - cashDiscount,
|
|
10262
|
+
pass_fee,
|
|
10263
|
+
Token: data == null ? void 0 : data.Token,
|
|
10264
|
+
amount: partialAmount ? partialAmount : amount,
|
|
10265
|
+
postal_code: data == null ? void 0 : data.postalCode,
|
|
10266
|
+
require3ds,
|
|
10267
|
+
isPartial,
|
|
10268
|
+
orderGuid: orderGuid || ordGuid
|
|
10269
|
+
}, saveCardInfo ? {
|
|
10270
|
+
card: {
|
|
10271
|
+
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
10272
|
+
customer_id: customerId,
|
|
10273
|
+
gateway_token: (data == null ? void 0 : data.Token) || (data == null ? void 0 : data.gateway_token),
|
|
10274
|
+
name: cardData == null ? void 0 : cardData.cardName
|
|
10275
|
+
}
|
|
10276
|
+
} : null), (data == null ? void 0 : data.typeoftoken) ? {
|
|
10277
|
+
typeoftoken: data == null ? void 0 : data.typeoftoken
|
|
10278
|
+
} : null);
|
|
10279
|
+
if (require3ds && (data == null ? void 0 : data.stripe_3ds_auth_id)) {
|
|
10280
|
+
dataObj.stripe_3ds_auth_id = data == null ? void 0 : data.stripe_3ds_auth_id;
|
|
10281
|
+
}
|
|
9639
10282
|
const chargeResponse = await axios9.post(`${masterBaseUrl}api/v1/gateway/charge/${session_token}`, dataObj);
|
|
9640
10283
|
if ((_a2 = chargeResponse == null ? void 0 : chargeResponse.data) == null ? void 0 : _a2.result) {
|
|
9641
10284
|
let callbackdata = {
|
|
@@ -9756,19 +10399,28 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9756
10399
|
}
|
|
9757
10400
|
}
|
|
9758
10401
|
if (!isBankConsentChecked) {
|
|
9759
|
-
setErrorBankConsent("Above consent is
|
|
10402
|
+
setErrorBankConsent("Above consent is requied");
|
|
9760
10403
|
}
|
|
9761
10404
|
setAchError(errors);
|
|
9762
10405
|
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
9763
10406
|
};
|
|
9764
|
-
const completeFractalFlow = async (tokenizeData, intentid) => {
|
|
10407
|
+
const completeFractalFlow = async (tokenizeData, intentid, typeoftoken) => {
|
|
9765
10408
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
9766
10409
|
try {
|
|
10410
|
+
if (typeoftoken == "google_pay") {
|
|
10411
|
+
handleCharge({
|
|
10412
|
+
Token: tokenizeData,
|
|
10413
|
+
postalCode: cardData == null ? void 0 : cardData.zipCode,
|
|
10414
|
+
typeoftoken
|
|
10415
|
+
});
|
|
10416
|
+
return;
|
|
10417
|
+
}
|
|
9767
10418
|
let token = tokenizeData;
|
|
9768
10419
|
let verifyandsaveresp = await axios9.post(`${masterBaseUrl}api/v1/gateway/verify-and-save/${session_token}`, {
|
|
9769
10420
|
token,
|
|
9770
10421
|
require3ds,
|
|
9771
|
-
pass_fee
|
|
10422
|
+
pass_fee,
|
|
10423
|
+
typeoftoken
|
|
9772
10424
|
});
|
|
9773
10425
|
if ((verifyandsaveresp == null ? void 0 : verifyandsaveresp.status) == 200) {
|
|
9774
10426
|
let responsetemp = (_a2 = verifyandsaveresp == null ? void 0 : verifyandsaveresp.data) == null ? void 0 : _a2.data;
|
|
@@ -9800,7 +10452,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9800
10452
|
}
|
|
9801
10453
|
};
|
|
9802
10454
|
const handleFractalTokenFlow = async () => {
|
|
9803
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2,
|
|
10455
|
+
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;
|
|
9804
10456
|
try {
|
|
9805
10457
|
const requestOptions = {
|
|
9806
10458
|
method: "POST",
|
|
@@ -9841,17 +10493,29 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9841
10493
|
three_ds_data
|
|
9842
10494
|
);
|
|
9843
10495
|
} catch (error2) {
|
|
9844
|
-
|
|
10496
|
+
console.log(error2, "error in tokenization");
|
|
10497
|
+
let readableMessage = "Something went wrong!";
|
|
10498
|
+
try {
|
|
10499
|
+
const rawError = ((_n2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _n2.data) || (error2 == null ? void 0 : error2.message) || "";
|
|
10500
|
+
const errorText = typeof rawError === "string" ? rawError : JSON.stringify(rawError);
|
|
10501
|
+
const lines = ((_p2 = (_o2 = errorText.split) == null ? void 0 : _o2.call(errorText, "\n")) == null ? void 0 : _p2.filter(Boolean)) || [];
|
|
10502
|
+
const lastLine = lines.at(-1) || "";
|
|
10503
|
+
const parts = (_q2 = lastLine.split) == null ? void 0 : _q2.call(lastLine, ": ");
|
|
10504
|
+
readableMessage = (parts == null ? void 0 : parts.length) > 1 ? parts.pop().trim() : lastLine.trim() || readableMessage;
|
|
10505
|
+
} catch (e) {
|
|
10506
|
+
readableMessage = "Something went wrong!";
|
|
10507
|
+
}
|
|
10508
|
+
setErrorIframe(readableMessage);
|
|
9845
10509
|
hideLoader();
|
|
9846
10510
|
}
|
|
9847
10511
|
if (tokenizeData == null ? void 0 : tokenizeData.token) {
|
|
9848
10512
|
let ThreedsData = tokenizeData == null ? void 0 : tokenizeData.stripe_three_ds_response;
|
|
9849
|
-
if (require3ds && !ThreedsData && (ThreedsData == null ? void 0 : ThreedsData.status) === "200 OK" && ((
|
|
10513
|
+
if (require3ds && !ThreedsData && (ThreedsData == null ? void 0 : ThreedsData.status) === "200 OK" && ((_r2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _r2.challenge_url)) {
|
|
9850
10514
|
setError("Something went wrong. Please try again later.");
|
|
9851
10515
|
}
|
|
9852
10516
|
if (require3ds) {
|
|
9853
|
-
if (!((
|
|
9854
|
-
completeFractalFlow(tokenizeData == null ? void 0 : tokenizeData.token, (
|
|
10517
|
+
if (!((_s2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _s2.challenge_url)) {
|
|
10518
|
+
completeFractalFlow(tokenizeData == null ? void 0 : tokenizeData.token, (_t2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _t2.id);
|
|
9855
10519
|
} else {
|
|
9856
10520
|
hideLoader();
|
|
9857
10521
|
setStripeResponse(__spreadProps(__spreadValues({}, ThreedsData == null ? void 0 : ThreedsData.data), {
|
|
@@ -9867,11 +10531,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9867
10531
|
console.log(error2, "error");
|
|
9868
10532
|
let readableMessage = "Something went wrong!";
|
|
9869
10533
|
try {
|
|
9870
|
-
const rawError = ((
|
|
10534
|
+
const rawError = ((_u2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _u2.data) || (error2 == null ? void 0 : error2.message) || "";
|
|
9871
10535
|
const errorText = typeof rawError === "string" ? rawError : JSON.stringify(rawError);
|
|
9872
|
-
const lines = ((
|
|
10536
|
+
const lines = ((_w = (_v = errorText.split) == null ? void 0 : _v.call(errorText, "\n")) == null ? void 0 : _w.filter(Boolean)) || [];
|
|
9873
10537
|
const lastLine = lines.at(-1) || "";
|
|
9874
|
-
const parts = (
|
|
10538
|
+
const parts = (_x = lastLine.split) == null ? void 0 : _x.call(lastLine, ": ");
|
|
9875
10539
|
readableMessage = (parts == null ? void 0 : parts.length) > 1 ? parts.pop().trim() : lastLine.trim() || readableMessage;
|
|
9876
10540
|
} catch (e) {
|
|
9877
10541
|
readableMessage = "Something went wrong!";
|
|
@@ -9879,8 +10543,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9879
10543
|
setError(readableMessage);
|
|
9880
10544
|
callback({
|
|
9881
10545
|
error: readableMessage,
|
|
9882
|
-
result: (
|
|
9883
|
-
statusCode: (
|
|
10546
|
+
result: (_z = (_y = error2 == null ? void 0 : error2.response) == null ? void 0 : _y.data) == null ? void 0 : _z.result,
|
|
10547
|
+
statusCode: (_A = error2 == null ? void 0 : error2.response) == null ? void 0 : _A.status
|
|
9884
10548
|
});
|
|
9885
10549
|
}
|
|
9886
10550
|
};
|
|
@@ -10297,8 +10961,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10297
10961
|
});
|
|
10298
10962
|
};
|
|
10299
10963
|
const handlechargeCustomer = async (e) => {
|
|
10300
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2
|
|
10301
|
-
e.currentTarget.blur();
|
|
10964
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
10965
|
+
e == null ? void 0 : e.currentTarget.blur();
|
|
10302
10966
|
if (loading) return;
|
|
10303
10967
|
let customer_id = customerId;
|
|
10304
10968
|
let card_id = selectedCard == null ? void 0 : selectedCard.id;
|
|
@@ -10345,7 +11009,6 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10345
11009
|
statusCode: (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.status
|
|
10346
11010
|
});
|
|
10347
11011
|
hideLoader();
|
|
10348
|
-
setError(((_i2 = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.message) || "Something went wrong!");
|
|
10349
11012
|
}
|
|
10350
11013
|
} else {
|
|
10351
11014
|
setError("Please Select A Card/Bank");
|
|
@@ -10421,21 +11084,21 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10421
11084
|
setOrderLoader(false);
|
|
10422
11085
|
}
|
|
10423
11086
|
};
|
|
10424
|
-
|
|
11087
|
+
useEffect18(() => {
|
|
10425
11088
|
if (!show && !autoTrigger) {
|
|
10426
11089
|
hasRunRef.current = false;
|
|
10427
11090
|
cardListRunRef.current = false;
|
|
10428
11091
|
}
|
|
10429
11092
|
}, [show, autoTrigger]);
|
|
10430
|
-
|
|
10431
|
-
if (!hasRunRef.current && (show || autoTrigger)) {
|
|
11093
|
+
useEffect18(() => {
|
|
11094
|
+
if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
|
|
10432
11095
|
getPaymentDetails();
|
|
10433
11096
|
if (isPartial && !partialRef) {
|
|
10434
11097
|
crateOrderFrac();
|
|
10435
11098
|
}
|
|
10436
11099
|
}
|
|
10437
|
-
}, [show, autoTrigger, isPartial]);
|
|
10438
|
-
|
|
11100
|
+
}, [show, autoTrigger, isPartial, onLoad]);
|
|
11101
|
+
useEffect18(() => {
|
|
10439
11102
|
if ((show || autoTrigger) && pass_fee_amount) {
|
|
10440
11103
|
let cashdisc = Number(amount) - Number(pass_fee_amount);
|
|
10441
11104
|
if (cashdisc && !isNaN(cashdisc)) {
|
|
@@ -10497,7 +11160,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10497
11160
|
console.error("3DS Auth failed \u274C", status);
|
|
10498
11161
|
setError(`3DS Authentication ${status}`);
|
|
10499
11162
|
};
|
|
10500
|
-
|
|
11163
|
+
useEffect18(() => {
|
|
10501
11164
|
if (setHandleCloseRef) {
|
|
10502
11165
|
setHandleCloseRef(() => handleClose);
|
|
10503
11166
|
}
|
|
@@ -10515,24 +11178,95 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10515
11178
|
setPartialError("");
|
|
10516
11179
|
}
|
|
10517
11180
|
};
|
|
10518
|
-
|
|
11181
|
+
useEffect18(() => {
|
|
10519
11182
|
if (typeof FractalTokenizer === "undefined") return;
|
|
10520
11183
|
const tokenizer = new FractalTokenizer({
|
|
10521
11184
|
styles: {}
|
|
10522
11185
|
});
|
|
10523
11186
|
}, []);
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
11187
|
+
const stateRef = useRef12({
|
|
11188
|
+
activeinBank,
|
|
11189
|
+
activeinCard,
|
|
11190
|
+
activetab
|
|
11191
|
+
});
|
|
11192
|
+
useEffect18(() => {
|
|
11193
|
+
stateRef.current = {
|
|
11194
|
+
activeinBank,
|
|
11195
|
+
activeinCard,
|
|
11196
|
+
activetab
|
|
11197
|
+
};
|
|
11198
|
+
}, [activeinBank, activeinCard, activetab]);
|
|
11199
|
+
const submit = useCallback(() => {
|
|
11200
|
+
var _a2, _b2;
|
|
11201
|
+
const { activeinBank: activeinBank2, activeinCard: activeinCard2, activetab: activetab2 } = stateRef.current;
|
|
11202
|
+
if (activetab2 === "card") {
|
|
11203
|
+
if (activeinCard2 === "form") {
|
|
11204
|
+
(_a2 = cardFormRef.current) == null ? void 0 : _a2.requestSubmit();
|
|
11205
|
+
} else if (activeinCard2 === "list") {
|
|
11206
|
+
handlechargeCustomer();
|
|
11207
|
+
}
|
|
11208
|
+
} else if (activetab2 === "ach") {
|
|
11209
|
+
if (activeinBank2 === "form") {
|
|
11210
|
+
(_b2 = bankFormRef.current) == null ? void 0 : _b2.requestSubmit();
|
|
11211
|
+
} else if (activeinBank2 === "list") {
|
|
11212
|
+
handlechargeCustomer();
|
|
11213
|
+
}
|
|
11214
|
+
}
|
|
11215
|
+
}, []);
|
|
11216
|
+
useEffect18(() => {
|
|
11217
|
+
onSubmit == null ? void 0 : onSubmit(submit);
|
|
11218
|
+
}, [onSubmit, submit]);
|
|
11219
|
+
function detectCardType(cardinput) {
|
|
11220
|
+
if (!cardinput) return null;
|
|
11221
|
+
const number = cardinput.replace(/\D/g, "");
|
|
11222
|
+
const patterns = {
|
|
11223
|
+
visa: /^4/,
|
|
11224
|
+
mastercard: /^(5[1-5]|2[2-7][0-9]{2})/,
|
|
11225
|
+
amex: /^3[47]/,
|
|
11226
|
+
discover: /^(6011|65|64[4-9])/,
|
|
11227
|
+
diners: /^(30[0-5]|36|38)/,
|
|
11228
|
+
jcb: /^(35[2-8][0-9])/,
|
|
11229
|
+
unionpay: /^62/
|
|
11230
|
+
};
|
|
11231
|
+
for (const [type, regex] of Object.entries(patterns)) {
|
|
11232
|
+
if (regex.test(number)) {
|
|
11233
|
+
return type;
|
|
11234
|
+
}
|
|
11235
|
+
}
|
|
11236
|
+
return "unknown";
|
|
11237
|
+
}
|
|
11238
|
+
function getCardImage(cardInput) {
|
|
11239
|
+
const cardType = detectCardType(cardInput);
|
|
11240
|
+
switch (cardType) {
|
|
11241
|
+
case "visa":
|
|
11242
|
+
return /* @__PURE__ */ jsx36("img", { src: visa2, alt: "visa", width: 33 });
|
|
11243
|
+
case "mastercard":
|
|
11244
|
+
return /* @__PURE__ */ jsx36("img", { src: mastercard2, width: 33, alt: "mastercard" });
|
|
11245
|
+
case "amex":
|
|
11246
|
+
return /* @__PURE__ */ jsx36("img", { src: americanexp2, alt: "amex", width: 33 });
|
|
11247
|
+
case "discover":
|
|
11248
|
+
return /* @__PURE__ */ jsx36("img", { src: discover2, width: 33, alt: "discover" });
|
|
11249
|
+
case "diners":
|
|
11250
|
+
return /* @__PURE__ */ jsx36("img", { src: dinersicon, alt: "Diners Club" });
|
|
11251
|
+
case "jcb":
|
|
11252
|
+
return /* @__PURE__ */ jsx36("img", { src: jcbicon, alt: "JCB" });
|
|
11253
|
+
case "unionpay":
|
|
11254
|
+
return /* @__PURE__ */ jsx36("img", { src: unionicon, alt: "UnionPay" });
|
|
11255
|
+
default:
|
|
11256
|
+
return /* @__PURE__ */ jsx36("img", { src: defualtcardborder, alt: "card" });
|
|
11257
|
+
}
|
|
11258
|
+
}
|
|
11259
|
+
return /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11260
|
+
(initialLoader || !onLoad) && /* @__PURE__ */ jsx36(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
|
|
11261
|
+
error && /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
|
|
11262
|
+
errorIframe && /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
|
|
10529
11263
|
setErrorIframe("");
|
|
10530
|
-
} }) }),
|
|
10531
|
-
|
|
10532
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */
|
|
10533
|
-
/* @__PURE__ */
|
|
10534
|
-
/* @__PURE__ */
|
|
10535
|
-
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */
|
|
11264
|
+
}, autoTrigger: onSubmit ? !onSubmit : autoTrigger }) }),
|
|
11265
|
+
/* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11266
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx36(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
|
|
11267
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
|
|
11268
|
+
/* @__PURE__ */ jsx36("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
|
|
11269
|
+
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx36(
|
|
10536
11270
|
ThreeDSChallenge,
|
|
10537
11271
|
{
|
|
10538
11272
|
containerRef: threeDSContainerRef,
|
|
@@ -10542,40 +11276,33 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10542
11276
|
onSuccess: handleSuccess,
|
|
10543
11277
|
onError: handleError
|
|
10544
11278
|
}
|
|
10545
|
-
) : /* @__PURE__ */
|
|
10546
|
-
/* @__PURE__ */
|
|
10547
|
-
/* @__PURE__ */
|
|
10548
|
-
/* @__PURE__ */
|
|
11279
|
+
) : /* @__PURE__ */ jsxs21("div", { className: "parent-pay-container", children: [
|
|
11280
|
+
/* @__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: [
|
|
11281
|
+
/* @__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" }) }),
|
|
11282
|
+
/* @__PURE__ */ jsx36("defs", { children: /* @__PURE__ */ jsx36("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx36("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
10549
11283
|
] }) }),
|
|
10550
|
-
/* @__PURE__ */
|
|
10551
|
-
/* @__PURE__ */
|
|
10552
|
-
/* @__PURE__ */
|
|
10553
|
-
/* @__PURE__ */
|
|
10554
|
-
/* @__PURE__ */
|
|
10555
|
-
/* @__PURE__ */
|
|
10556
|
-
/* @__PURE__ */
|
|
10557
|
-
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */
|
|
11284
|
+
/* @__PURE__ */ jsx36("div", { className: "pay-main-logo-res" }),
|
|
11285
|
+
/* @__PURE__ */ jsxs21("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
|
|
11286
|
+
!onSubmit && /* @__PURE__ */ jsxs21("div", { className: "pay-header pay-conatiner-one", children: [
|
|
11287
|
+
/* @__PURE__ */ jsxs21("div", { className: "pay-conatiner-one-first", children: [
|
|
11288
|
+
/* @__PURE__ */ jsxs21("div", { className: "pay-logo-container", children: [
|
|
11289
|
+
/* @__PURE__ */ jsx36("div", { className: "pay-main-logo" }),
|
|
11290
|
+
/* @__PURE__ */ jsx36("h1", { className: "pay-heading", children: "Pay" }),
|
|
11291
|
+
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs21("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
|
|
10558
11292
|
" ",
|
|
10559
|
-
/* @__PURE__ */
|
|
11293
|
+
/* @__PURE__ */ jsx36(IoArrowBack4, {}),
|
|
10560
11294
|
" Back"
|
|
10561
11295
|
] })
|
|
10562
11296
|
] }),
|
|
10563
|
-
/* @__PURE__ */
|
|
10564
|
-
/* @__PURE__ */
|
|
10565
|
-
/* @__PURE__ */
|
|
10566
|
-
/* @__PURE__ */
|
|
10567
|
-
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */
|
|
11297
|
+
/* @__PURE__ */ jsx36("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs21("div", { className: "pay-amount-conatiner", children: [
|
|
11298
|
+
/* @__PURE__ */ jsx36("small", { className: "pay-payment-amount", children: "Select payment type" }),
|
|
11299
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-card-bank-radio-main", children: [
|
|
11300
|
+
/* @__PURE__ */ jsx36(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
11301
|
+
!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 })
|
|
10568
11302
|
] }),
|
|
10569
|
-
|
|
10570
|
-
/* @__PURE__ */
|
|
10571
|
-
|
|
10572
|
-
" "
|
|
10573
|
-
] }),
|
|
10574
|
-
/* @__PURE__ */ jsx32("p", { children: formatUSD((Number(amount) - Number(cashDiscount)).toFixed(2)) })
|
|
10575
|
-
] }) : null,
|
|
10576
|
-
isPartial && /* @__PURE__ */ jsxs19("div", { className: "frac-partial-payment-input", children: [
|
|
10577
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
10578
|
-
/* @__PURE__ */ jsx32(
|
|
11303
|
+
isPartial && /* @__PURE__ */ jsxs21("div", { className: "frac-partial-payment-input", children: [
|
|
11304
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11305
|
+
/* @__PURE__ */ jsx36(
|
|
10579
11306
|
NumericFormat2,
|
|
10580
11307
|
{
|
|
10581
11308
|
prefix: "$",
|
|
@@ -10599,331 +11326,403 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10599
11326
|
}
|
|
10600
11327
|
}
|
|
10601
11328
|
),
|
|
10602
|
-
partialError && /* @__PURE__ */
|
|
11329
|
+
partialError && /* @__PURE__ */ jsx36("span", { className: "error-span", children: partialError })
|
|
10603
11330
|
] })
|
|
10604
11331
|
] }) })
|
|
10605
11332
|
] }),
|
|
10606
|
-
/* @__PURE__ */
|
|
10607
|
-
/* @__PURE__ */
|
|
10608
|
-
/* @__PURE__ */
|
|
11333
|
+
/* @__PURE__ */ jsxs21("div", { className: "pay-conatiner-one-last", children: [
|
|
11334
|
+
/* @__PURE__ */ jsx36("img", { src: secure2, alt: "" }),
|
|
11335
|
+
/* @__PURE__ */ jsx36("img", { src: pov2, alt: "" }),
|
|
10609
11336
|
"Secure payments powered by Fractal"
|
|
10610
11337
|
] })
|
|
10611
11338
|
] }),
|
|
10612
|
-
/* @__PURE__ */
|
|
10613
|
-
/* @__PURE__ */
|
|
10614
|
-
/* @__PURE__ */
|
|
10615
|
-
/* @__PURE__ */
|
|
10616
|
-
|
|
10617
|
-
/* @__PURE__ */ jsx32(IoArrowBack4, {})
|
|
10618
|
-
] }) }),
|
|
10619
|
-
/* @__PURE__ */ jsx32("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
11339
|
+
/* @__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: [
|
|
11340
|
+
onSubmit && /* @__PURE__ */ jsx36("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs21("div", { className: "pay-amount-conatiner", children: [
|
|
11341
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-card-bank-radio-main", children: [
|
|
11342
|
+
/* @__PURE__ */ jsx36(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
11343
|
+
!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 })
|
|
10620
11344
|
] }),
|
|
10621
|
-
/* @__PURE__ */
|
|
10622
|
-
/* @__PURE__ */
|
|
10623
|
-
/* @__PURE__ */
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
(
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
/* @__PURE__ */
|
|
10652
|
-
FractalFields_default,
|
|
10653
|
-
{
|
|
10654
|
-
fractalStyles,
|
|
10655
|
-
tokenizerRef,
|
|
10656
|
-
isSky: true
|
|
10657
|
-
}
|
|
10658
|
-
) })
|
|
10659
|
-
] }),
|
|
10660
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10661
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "zip", children: "ZIP" }),
|
|
10662
|
-
/* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_e = cardData == null ? void 0 : cardData.zipCode) != null ? _e : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
|
|
10663
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
|
|
11345
|
+
isPartial && /* @__PURE__ */ jsxs21("div", { className: "frac-partial-payment-input", children: [
|
|
11346
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11347
|
+
/* @__PURE__ */ jsx36(
|
|
11348
|
+
NumericFormat2,
|
|
11349
|
+
{
|
|
11350
|
+
prefix: "$",
|
|
11351
|
+
className: "form-control-frac",
|
|
11352
|
+
value: partialAmount,
|
|
11353
|
+
onValueChange: (values) => {
|
|
11354
|
+
handlePartialChange(values);
|
|
11355
|
+
},
|
|
11356
|
+
thousandSeparator: true,
|
|
11357
|
+
placeholder: "Enter partial amount",
|
|
11358
|
+
allowNegative: false,
|
|
11359
|
+
allowLeadingZeros: false,
|
|
11360
|
+
decimalScale: 2,
|
|
11361
|
+
fixedDecimalScale: true
|
|
11362
|
+
}
|
|
11363
|
+
),
|
|
11364
|
+
partialError && /* @__PURE__ */ jsx36("span", { className: "error-span", children: partialError })
|
|
11365
|
+
] })
|
|
11366
|
+
] }) }),
|
|
11367
|
+
is3DSEnable ? clientSecret && /* @__PURE__ */ jsx36(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11368
|
+
/* @__PURE__ */ jsxs21("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
|
|
11369
|
+
!onSubmit && /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11370
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
|
|
11371
|
+
/* @__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: [
|
|
11372
|
+
" ",
|
|
11373
|
+
/* @__PURE__ */ jsx36(IoArrowBack4, {})
|
|
11374
|
+
] }) }),
|
|
11375
|
+
/* @__PURE__ */ jsx36("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
10664
11376
|
] }),
|
|
10665
|
-
|
|
10666
|
-
/* @__PURE__ */
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
className: "toggle-checkbox",
|
|
10672
|
-
checked: saveCardInfo,
|
|
10673
|
-
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
10674
|
-
}
|
|
10675
|
-
),
|
|
10676
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
10677
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
10678
|
-
/* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
|
|
10679
|
-
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
|
|
10680
|
-
"svg",
|
|
10681
|
-
{
|
|
10682
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
10683
|
-
width: "20",
|
|
10684
|
-
height: "20",
|
|
10685
|
-
viewBox: "0 0 20 20",
|
|
10686
|
-
fill: "none",
|
|
10687
|
-
children: [
|
|
10688
|
-
/* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
10689
|
-
/* @__PURE__ */ jsx32(
|
|
10690
|
-
"path",
|
|
10691
|
-
{
|
|
10692
|
-
d: "M9.03406 12.0979V12.0072C9.04055 11.4153 9.10057 10.9443 9.21411 10.5943C9.3309 10.2442 9.49635 9.96102 9.71046 9.74463C9.92457 9.52824 10.1825 9.33095 10.4842 9.15274C10.6788 9.03182 10.854 8.89658 11.0097 8.74702C11.1655 8.59745 11.2887 8.42562 11.3796 8.2315C11.4704 8.03739 11.5158 7.82259 11.5158 7.58711C11.5158 7.3039 11.4477 7.05887 11.3114 6.85203C11.1752 6.64519 10.9935 6.48608 10.7664 6.3747C10.5426 6.26014 10.2928 6.20286 10.017 6.20286C9.76723 6.20286 9.52879 6.25378 9.3017 6.35561C9.07461 6.45744 8.88646 6.61655 8.73723 6.83294C8.588 7.04614 8.50203 7.3214 8.47932 7.65871H7C7.02271 7.08592 7.17032 6.60223 7.44282 6.20764C7.71533 5.80986 8.07543 5.50915 8.52311 5.30549C8.97405 5.10183 9.47202 5 10.017 5C10.6139 5 11.1363 5.10979 11.5839 5.32936C12.0316 5.54574 12.3788 5.84964 12.6253 6.24105C12.8751 6.62928 13 7.08274 13 7.60143C13 7.95784 12.9432 8.27924 12.8297 8.56563C12.7161 8.84885 12.5539 9.10183 12.3431 9.32458C12.1354 9.54733 11.8856 9.74463 11.5937 9.91647C11.3179 10.0851 11.0941 10.2601 10.9221 10.4415C10.7534 10.6229 10.6302 10.8377 10.5523 11.0859C10.4745 11.3341 10.4323 11.6412 10.4258 12.0072V12.0979H9.03406ZM9.76886 15C9.50284 15 9.27413 14.9077 9.08273 14.7232C8.89132 14.5354 8.79562 14.3095 8.79562 14.0453C8.79562 13.7844 8.89132 13.5617 9.08273 13.3771C9.27413 13.1893 9.50284 13.0955 9.76886 13.0955C10.0316 13.0955 10.2587 13.1893 10.4501 13.3771C10.6448 13.5617 10.7421 13.7844 10.7421 14.0453C10.7421 14.2204 10.6967 14.3811 10.6058 14.5274C10.5182 14.6706 10.4015 14.7852 10.2555 14.8711C10.1095 14.957 9.94728 15 9.76886 15Z",
|
|
10693
|
-
fill: "#161616"
|
|
10694
|
-
}
|
|
10695
|
-
)
|
|
10696
|
-
]
|
|
10697
|
-
}
|
|
10698
|
-
) }),
|
|
10699
|
-
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
10700
|
-
"If checked, I agree to give the ",
|
|
10701
|
-
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10702
|
-
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
10703
|
-
] }) })
|
|
10704
|
-
] })
|
|
10705
|
-
] }) })
|
|
11377
|
+
/* @__PURE__ */ jsxs21("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
|
|
11378
|
+
/* @__PURE__ */ jsx36("img", { src: visa2, alt: "", width: 33 }),
|
|
11379
|
+
/* @__PURE__ */ jsx36("img", { src: mastercard2, width: 33, alt: "" }),
|
|
11380
|
+
/* @__PURE__ */ jsx36("img", { src: americanexp2, alt: "", width: 33 }),
|
|
11381
|
+
/* @__PURE__ */ jsx36("img", { src: discover2, width: 33, alt: "" })
|
|
11382
|
+
] })
|
|
10706
11383
|
] }),
|
|
10707
|
-
|
|
10708
|
-
|
|
10709
|
-
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
}
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10716
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
10717
|
-
/* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
10718
|
-
const value = e.target.value;
|
|
10719
|
-
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
10720
|
-
handleCardChange("cardName", value);
|
|
10721
|
-
}
|
|
10722
|
-
} }),
|
|
10723
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
10724
|
-
] }),
|
|
10725
|
-
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx32(
|
|
10726
|
-
DataCapFields,
|
|
11384
|
+
activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11385
|
+
/* @__PURE__ */ jsx36(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
|
|
11386
|
+
setActiveinCard("form");
|
|
11387
|
+
} }),
|
|
11388
|
+
/* @__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)) }) })
|
|
11389
|
+
] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11390
|
+
/* @__PURE__ */ jsx36(
|
|
11391
|
+
ApplePayButton,
|
|
10727
11392
|
{
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
11393
|
+
applePayAmount: partialAmount ? partialAmount : amount,
|
|
11394
|
+
applePayMerchantId,
|
|
11395
|
+
applePayMerchantName: merchantName,
|
|
11396
|
+
completeFractalFlow,
|
|
11397
|
+
showLoader
|
|
10731
11398
|
}
|
|
10732
|
-
)
|
|
10733
|
-
/* @__PURE__ */
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
|
|
11399
|
+
),
|
|
11400
|
+
/* @__PURE__ */ jsx36(
|
|
11401
|
+
GooglePayComponent,
|
|
11402
|
+
{
|
|
11403
|
+
amount: partialAmount ? partialAmount : amount,
|
|
11404
|
+
googlePayEnvironment,
|
|
11405
|
+
googlePayGatewayMerchantId,
|
|
11406
|
+
googlePayMerchantId,
|
|
11407
|
+
googlePayMerchantName: merchantName,
|
|
11408
|
+
completeFractalFlow,
|
|
11409
|
+
setLoading
|
|
11410
|
+
}
|
|
11411
|
+
),
|
|
11412
|
+
/* @__PURE__ */ jsx36("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx36("span", { children: "or" }) }),
|
|
11413
|
+
/* @__PURE__ */ jsxs21("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11414
|
+
if (e.key === "Enter" && loading) {
|
|
11415
|
+
e.preventDefault();
|
|
11416
|
+
e.stopPropagation();
|
|
11417
|
+
}
|
|
11418
|
+
}, children: [
|
|
11419
|
+
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11420
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11421
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11422
|
+
/* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11423
|
+
const value = e.target.value;
|
|
11424
|
+
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11425
|
+
handleCardChange("cardName", value);
|
|
11426
|
+
}
|
|
11427
|
+
} }),
|
|
11428
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11429
|
+
] }),
|
|
11430
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11431
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
|
|
11432
|
+
/* @__PURE__ */ jsx36("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx36(
|
|
11433
|
+
FractalFields_default,
|
|
11434
|
+
{
|
|
11435
|
+
fractalStyles,
|
|
11436
|
+
tokenizerRef,
|
|
11437
|
+
isSky: true
|
|
11438
|
+
}
|
|
11439
|
+
) })
|
|
11440
|
+
] }),
|
|
11441
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11442
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11443
|
+
/* @__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) }),
|
|
11444
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11445
|
+
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11446
|
+
"Credit cards include a fee amount of ",
|
|
11447
|
+
/* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11448
|
+
"."
|
|
11449
|
+
] })
|
|
11450
|
+
] }),
|
|
11451
|
+
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: [
|
|
11452
|
+
/* @__PURE__ */ jsx36(
|
|
11453
|
+
"input",
|
|
11454
|
+
{
|
|
11455
|
+
type: "checkbox",
|
|
11456
|
+
id: "save_card",
|
|
11457
|
+
className: "toggle-checkbox",
|
|
11458
|
+
checked: saveCardInfo,
|
|
11459
|
+
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11460
|
+
}
|
|
11461
|
+
),
|
|
11462
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11463
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11464
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
|
|
11465
|
+
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
|
|
11466
|
+
"svg",
|
|
11467
|
+
{
|
|
11468
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11469
|
+
width: "20",
|
|
11470
|
+
height: "20",
|
|
11471
|
+
viewBox: "0 0 20 20",
|
|
11472
|
+
fill: "none",
|
|
11473
|
+
children: [
|
|
11474
|
+
/* @__PURE__ */ jsx36("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11475
|
+
/* @__PURE__ */ jsx36(
|
|
11476
|
+
"path",
|
|
11477
|
+
{
|
|
11478
|
+
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",
|
|
11479
|
+
fill: "#161616"
|
|
11480
|
+
}
|
|
11481
|
+
)
|
|
11482
|
+
]
|
|
11483
|
+
}
|
|
11484
|
+
) }),
|
|
11485
|
+
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11486
|
+
"If checked, I agree to give the ",
|
|
11487
|
+
/* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
|
|
11488
|
+
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11489
|
+
] }) })
|
|
11490
|
+
] })
|
|
11491
|
+
] }) })
|
|
11492
|
+
] }),
|
|
11493
|
+
/* @__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)) }) })
|
|
11494
|
+
] })
|
|
11495
|
+
] }) : /* @__PURE__ */ jsxs21("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11496
|
+
if (e.key === "Enter" && loading) {
|
|
11497
|
+
e.preventDefault();
|
|
11498
|
+
e.stopPropagation();
|
|
11499
|
+
}
|
|
11500
|
+
}, children: [
|
|
11501
|
+
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11502
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11503
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11504
|
+
/* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11505
|
+
const value = e.target.value;
|
|
11506
|
+
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11507
|
+
handleCardChange("cardName", value);
|
|
11508
|
+
}
|
|
11509
|
+
} }),
|
|
11510
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11511
|
+
] }),
|
|
11512
|
+
/* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx36(
|
|
11513
|
+
DataCapFields,
|
|
10741
11514
|
{
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11515
|
+
isOpen: show || autoTrigger,
|
|
11516
|
+
tokenKey: dcToken,
|
|
11517
|
+
setLoader: activeinCard === "form" ? setLoadingIframe : null,
|
|
11518
|
+
isEmbedded: onSubmit ? true : false
|
|
10747
11519
|
}
|
|
10748
|
-
),
|
|
10749
|
-
/* @__PURE__ */
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
/* @__PURE__ */
|
|
10753
|
-
|
|
11520
|
+
) }),
|
|
11521
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11522
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11523
|
+
/* @__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) }),
|
|
11524
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11525
|
+
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11526
|
+
"Credit cards include a fee amount of ",
|
|
11527
|
+
/* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11528
|
+
"."
|
|
11529
|
+
] })
|
|
11530
|
+
] }),
|
|
11531
|
+
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: [
|
|
11532
|
+
/* @__PURE__ */ jsx36(
|
|
11533
|
+
"input",
|
|
10754
11534
|
{
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
children: [
|
|
10761
|
-
/* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
10762
|
-
/* @__PURE__ */ jsx32(
|
|
10763
|
-
"path",
|
|
10764
|
-
{
|
|
10765
|
-
d: "M9.03406 12.0979V12.0072C9.04055 11.4153 9.10057 10.9443 9.21411 10.5943C9.3309 10.2442 9.49635 9.96102 9.71046 9.74463C9.92457 9.52824 10.1825 9.33095 10.4842 9.15274C10.6788 9.03182 10.854 8.89658 11.0097 8.74702C11.1655 8.59745 11.2887 8.42562 11.3796 8.2315C11.4704 8.03739 11.5158 7.82259 11.5158 7.58711C11.5158 7.3039 11.4477 7.05887 11.3114 6.85203C11.1752 6.64519 10.9935 6.48608 10.7664 6.3747C10.5426 6.26014 10.2928 6.20286 10.017 6.20286C9.76723 6.20286 9.52879 6.25378 9.3017 6.35561C9.07461 6.45744 8.88646 6.61655 8.73723 6.83294C8.588 7.04614 8.50203 7.3214 8.47932 7.65871H7C7.02271 7.08592 7.17032 6.60223 7.44282 6.20764C7.71533 5.80986 8.07543 5.50915 8.52311 5.30549C8.97405 5.10183 9.47202 5 10.017 5C10.6139 5 11.1363 5.10979 11.5839 5.32936C12.0316 5.54574 12.3788 5.84964 12.6253 6.24105C12.8751 6.62928 13 7.08274 13 7.60143C13 7.95784 12.9432 8.27924 12.8297 8.56563C12.7161 8.84885 12.5539 9.10183 12.3431 9.32458C12.1354 9.54733 11.8856 9.74463 11.5937 9.91647C11.3179 10.0851 11.0941 10.2601 10.9221 10.4415C10.7534 10.6229 10.6302 10.8377 10.5523 11.0859C10.4745 11.3341 10.4323 11.6412 10.4258 12.0072V12.0979H9.03406ZM9.76886 15C9.50284 15 9.27413 14.9077 9.08273 14.7232C8.89132 14.5354 8.79562 14.3095 8.79562 14.0453C8.79562 13.7844 8.89132 13.5617 9.08273 13.3771C9.27413 13.1893 9.50284 13.0955 9.76886 13.0955C10.0316 13.0955 10.2587 13.1893 10.4501 13.3771C10.6448 13.5617 10.7421 13.7844 10.7421 14.0453C10.7421 14.2204 10.6967 14.3811 10.6058 14.5274C10.5182 14.6706 10.4015 14.7852 10.2555 14.8711C10.1095 14.957 9.94728 15 9.76886 15Z",
|
|
10766
|
-
fill: "#161616"
|
|
10767
|
-
}
|
|
10768
|
-
)
|
|
10769
|
-
]
|
|
11535
|
+
type: "checkbox",
|
|
11536
|
+
id: "save_card",
|
|
11537
|
+
className: "toggle-checkbox",
|
|
11538
|
+
checked: saveCardInfo,
|
|
11539
|
+
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
10770
11540
|
}
|
|
10771
|
-
)
|
|
10772
|
-
/* @__PURE__ */
|
|
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
|
-
/* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: {
|
|
10803
|
-
minHeight: "444px",
|
|
10804
|
-
maxHeight: "444px"
|
|
10805
|
-
}, children: [
|
|
10806
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10807
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
10808
|
-
/* @__PURE__ */ jsx32("input", { type: "text", id: "nameonaccount", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", name: "name", value: (_l = achData == null ? void 0 : achData.name) != null ? _l : "", onChange: handleChangeAch }),
|
|
10809
|
-
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
11541
|
+
),
|
|
11542
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11543
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11544
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
|
|
11545
|
+
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
|
|
11546
|
+
"svg",
|
|
11547
|
+
{
|
|
11548
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11549
|
+
width: "20",
|
|
11550
|
+
height: "20",
|
|
11551
|
+
viewBox: "0 0 20 20",
|
|
11552
|
+
fill: "none",
|
|
11553
|
+
children: [
|
|
11554
|
+
/* @__PURE__ */ jsx36("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11555
|
+
/* @__PURE__ */ jsx36(
|
|
11556
|
+
"path",
|
|
11557
|
+
{
|
|
11558
|
+
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",
|
|
11559
|
+
fill: "#161616"
|
|
11560
|
+
}
|
|
11561
|
+
)
|
|
11562
|
+
]
|
|
11563
|
+
}
|
|
11564
|
+
) }),
|
|
11565
|
+
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11566
|
+
"If checked, I agree to give the ",
|
|
11567
|
+
/* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
|
|
11568
|
+
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11569
|
+
] }) })
|
|
11570
|
+
] })
|
|
11571
|
+
] }) })
|
|
10810
11572
|
] }),
|
|
10811
|
-
/* @__PURE__ */
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
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
|
-
|
|
11573
|
+
/* @__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)) }) })
|
|
11574
|
+
] })
|
|
11575
|
+
] }),
|
|
11576
|
+
/* @__PURE__ */ jsx36("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11577
|
+
!onSubmit && /* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
|
|
11578
|
+
/* @__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: [
|
|
11579
|
+
" ",
|
|
11580
|
+
/* @__PURE__ */ jsx36(IoArrowBack4, {})
|
|
11581
|
+
] }) }),
|
|
11582
|
+
/* @__PURE__ */ jsx36("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
|
|
11583
|
+
] }),
|
|
11584
|
+
activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11585
|
+
/* @__PURE__ */ jsx36(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
|
|
11586
|
+
setActiveinBank("form");
|
|
11587
|
+
} }),
|
|
11588
|
+
/* @__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)) }) })
|
|
11589
|
+
] }) : /* @__PURE__ */ jsxs21("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
|
|
11590
|
+
if (e.key === "Enter" && loading) {
|
|
11591
|
+
e.preventDefault();
|
|
11592
|
+
e.stopPropagation();
|
|
11593
|
+
}
|
|
11594
|
+
}, children: [
|
|
11595
|
+
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: {
|
|
11596
|
+
minHeight: "444px",
|
|
11597
|
+
maxHeight: "444px"
|
|
11598
|
+
}, children: [
|
|
11599
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11600
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
11601
|
+
/* @__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 }),
|
|
11602
|
+
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
11603
|
+
] }),
|
|
11604
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11605
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "routingnumber", children: "Routing number" }),
|
|
11606
|
+
/* @__PURE__ */ jsx36(
|
|
11607
|
+
"input",
|
|
11608
|
+
{
|
|
11609
|
+
type: "text",
|
|
11610
|
+
id: "routingnumber",
|
|
11611
|
+
className: "form-control-frac",
|
|
11612
|
+
maxLength: 9,
|
|
11613
|
+
placeholder: "000000000",
|
|
11614
|
+
name: "routingNumber",
|
|
11615
|
+
value: (_o = achData == null ? void 0 : achData.routingNumber) != null ? _o : "",
|
|
11616
|
+
onChange: handleChangeAch
|
|
11617
|
+
}
|
|
11618
|
+
),
|
|
11619
|
+
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
|
|
11620
|
+
] }),
|
|
11621
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11622
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "accountnumber", children: "Account number" }),
|
|
11623
|
+
/* @__PURE__ */ jsx36(
|
|
11624
|
+
"input",
|
|
11625
|
+
{
|
|
11626
|
+
type: "text",
|
|
11627
|
+
id: "accountnumber",
|
|
11628
|
+
className: "form-control-frac",
|
|
11629
|
+
maxLength: 16,
|
|
11630
|
+
placeholder: "0000000000",
|
|
11631
|
+
name: "accountNumber",
|
|
11632
|
+
value: (_p = achData == null ? void 0 : achData.accountNumber) != null ? _p : "",
|
|
11633
|
+
onChange: handleChangeAch
|
|
11634
|
+
}
|
|
11635
|
+
),
|
|
11636
|
+
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
|
|
11637
|
+
] }),
|
|
11638
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11639
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
|
|
11640
|
+
/* @__PURE__ */ jsx36(
|
|
11641
|
+
"input",
|
|
11642
|
+
{
|
|
11643
|
+
type: "text",
|
|
11644
|
+
id: "confirmaccountnumber",
|
|
11645
|
+
className: "form-control-frac",
|
|
11646
|
+
maxLength: 16,
|
|
11647
|
+
placeholder: "0000000000",
|
|
11648
|
+
name: "confirmAccountNumber",
|
|
11649
|
+
value: (_q = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _q : "",
|
|
11650
|
+
onChange: handleChangeAch
|
|
11651
|
+
}
|
|
11652
|
+
),
|
|
11653
|
+
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
|
|
11654
|
+
] }),
|
|
11655
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11656
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "bankname", children: "Bank name" }),
|
|
11657
|
+
/* @__PURE__ */ jsx36(
|
|
11658
|
+
"input",
|
|
11659
|
+
{
|
|
11660
|
+
type: "text",
|
|
11661
|
+
id: "bankname",
|
|
11662
|
+
className: "form-control-frac",
|
|
11663
|
+
maxLength: 100,
|
|
11664
|
+
placeholder: "My Bank",
|
|
11665
|
+
name: "bankName",
|
|
11666
|
+
value: (_r = achData == null ? void 0 : achData.bankName) != null ? _r : "",
|
|
11667
|
+
onChange: handleChangeAch
|
|
11668
|
+
}
|
|
11669
|
+
),
|
|
11670
|
+
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
|
|
11671
|
+
] }),
|
|
11672
|
+
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11673
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "companyName", children: "Company name" }),
|
|
11674
|
+
/* @__PURE__ */ jsx36(
|
|
11675
|
+
"input",
|
|
11676
|
+
{
|
|
11677
|
+
type: "text",
|
|
11678
|
+
id: "companyName",
|
|
11679
|
+
className: "form-control-frac",
|
|
11680
|
+
maxLength: 100,
|
|
11681
|
+
placeholder: "My Company",
|
|
11682
|
+
name: "companyName",
|
|
11683
|
+
value: (_s = achData == null ? void 0 : achData.companyName) != null ? _s : "",
|
|
11684
|
+
onChange: handleChangeAch
|
|
11685
|
+
}
|
|
11686
|
+
),
|
|
11687
|
+
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
|
|
11688
|
+
] }),
|
|
11689
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11690
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "accounttype", children: "Select account type" }),
|
|
11691
|
+
/* @__PURE__ */ jsxs21("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
|
|
11692
|
+
/* @__PURE__ */ jsx36("option", { value: "", children: "Select account" }),
|
|
11693
|
+
accountTypes.map((type) => /* @__PURE__ */ jsx36("option", { value: type.value, children: type.label }, type.value))
|
|
11694
|
+
] }),
|
|
11695
|
+
bankFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11696
|
+
"There is a processing fee of ",
|
|
11697
|
+
/* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
|
|
11698
|
+
"."
|
|
11699
|
+
] }),
|
|
11700
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11701
|
+
/* @__PURE__ */ jsx36("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
|
|
11702
|
+
setIsBankConsentChecked(e.target.checked);
|
|
11703
|
+
if (e.target.checked) {
|
|
11704
|
+
setErrorBankConsent("");
|
|
11705
|
+
}
|
|
11706
|
+
} }),
|
|
11707
|
+
/* @__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.` })
|
|
11708
|
+
] }),
|
|
11709
|
+
errorBankConsent && /* @__PURE__ */ jsx36("span", { className: "error-span", children: errorBankConsent }),
|
|
11710
|
+
customerId && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11711
|
+
/* @__PURE__ */ jsx36("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
11712
|
+
/* @__PURE__ */ jsx36("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
|
|
11713
|
+
] }),
|
|
11714
|
+
saveACHinfo && /* @__PURE__ */ jsx36("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11715
|
+
"If checked, I agree to give the ",
|
|
11716
|
+
/* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
|
|
11717
|
+
" permission to charge this bank account for agreed-upon purchases in the future."
|
|
11718
|
+
] }) })
|
|
10901
11719
|
] })
|
|
10902
11720
|
] }),
|
|
10903
|
-
/* @__PURE__ */
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
}
|
|
10909
|
-
} }),
|
|
10910
|
-
/* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${merchantName || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
|
|
10911
|
-
] }),
|
|
10912
|
-
errorBankConsent && /* @__PURE__ */ jsx32("span", { className: "error-span", children: errorBankConsent }),
|
|
10913
|
-
customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
10914
|
-
/* @__PURE__ */ jsx32("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
10915
|
-
/* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
|
|
10916
|
-
] }),
|
|
10917
|
-
saveACHinfo && /* @__PURE__ */ jsx32("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
10918
|
-
"If checked, I agree to give the ",
|
|
10919
|
-
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10920
|
-
" permission to charge this bank account for agreed-upon purchases in the future."
|
|
10921
|
-
] }) })
|
|
10922
|
-
] }),
|
|
10923
|
-
/* @__PURE__ */ jsx32("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx32("button", { className: "pay-button", style: { margin: "20px 0 0" }, type: "submit", children: formatUSD((_s = Number(bankAmount)) == null ? void 0 : _s.toFixed(2)) }) })
|
|
10924
|
-
] })
|
|
10925
|
-
] }) })
|
|
10926
|
-
] }) }) }) })
|
|
11721
|
+
/* @__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)) }) })
|
|
11722
|
+
] })
|
|
11723
|
+
] }) })
|
|
11724
|
+
] })
|
|
11725
|
+
] }) }) })
|
|
10927
11726
|
] })
|
|
10928
11727
|
] })
|
|
10929
11728
|
] })
|
|
@@ -10934,7 +11733,7 @@ var ModelContentSky_default = ModelContentSky;
|
|
|
10934
11733
|
|
|
10935
11734
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
10936
11735
|
import axios10 from "axios";
|
|
10937
|
-
import { Fragment as
|
|
11736
|
+
import { Fragment as Fragment21, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
10938
11737
|
var PaymentWidget = ({
|
|
10939
11738
|
amount,
|
|
10940
11739
|
bankAmount,
|
|
@@ -10956,12 +11755,12 @@ var PaymentWidget = ({
|
|
|
10956
11755
|
bankSurcharge,
|
|
10957
11756
|
partialRef
|
|
10958
11757
|
}) => {
|
|
10959
|
-
const [show, setShow] =
|
|
10960
|
-
const [loading, setLoading] =
|
|
10961
|
-
const [childHandleClose, setChildHandleClose] =
|
|
11758
|
+
const [show, setShow] = useState12(autoTrigger || false);
|
|
11759
|
+
const [loading, setLoading] = useState12(false);
|
|
11760
|
+
const [childHandleClose, setChildHandleClose] = useState12(() => () => {
|
|
10962
11761
|
});
|
|
10963
|
-
const [orderGuid, setOrderGuid] =
|
|
10964
|
-
const [remainingAmount, setRemainingAmount] =
|
|
11762
|
+
const [orderGuid, setOrderGuid] = useState12(null);
|
|
11763
|
+
const [remainingAmount, setRemainingAmount] = useState12(null);
|
|
10965
11764
|
const initialCommonProps = useMemo(
|
|
10966
11765
|
() => ({
|
|
10967
11766
|
amount,
|
|
@@ -11008,8 +11807,8 @@ var PaymentWidget = ({
|
|
|
11008
11807
|
partialRef
|
|
11009
11808
|
]
|
|
11010
11809
|
);
|
|
11011
|
-
const [commonProps, setCommonProps] =
|
|
11012
|
-
|
|
11810
|
+
const [commonProps, setCommonProps] = useState12(initialCommonProps);
|
|
11811
|
+
useEffect19(() => {
|
|
11013
11812
|
if (show) {
|
|
11014
11813
|
setCommonProps(initialCommonProps);
|
|
11015
11814
|
}
|
|
@@ -11040,29 +11839,556 @@ var PaymentWidget = ({
|
|
|
11040
11839
|
setLoading(false);
|
|
11041
11840
|
}
|
|
11042
11841
|
};
|
|
11043
|
-
|
|
11842
|
+
useEffect19(() => {
|
|
11044
11843
|
if (show && isPartial && partialRef) {
|
|
11045
11844
|
getskyosOrderDetails();
|
|
11046
11845
|
}
|
|
11047
11846
|
}, [show, isPartial, partialRef]);
|
|
11048
|
-
return /* @__PURE__ */
|
|
11049
|
-
/* @__PURE__ */
|
|
11050
|
-
/* @__PURE__ */
|
|
11051
|
-
/* @__PURE__ */
|
|
11052
|
-
/* @__PURE__ */
|
|
11053
|
-
/* @__PURE__ */
|
|
11054
|
-
/* @__PURE__ */
|
|
11055
|
-
/* @__PURE__ */
|
|
11056
|
-
!autoTrigger && /* @__PURE__ */
|
|
11847
|
+
return /* @__PURE__ */ jsxs22(Fragment21, { children: [
|
|
11848
|
+
/* @__PURE__ */ jsx37("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
11849
|
+
/* @__PURE__ */ jsx37(DataScript, {}),
|
|
11850
|
+
/* @__PURE__ */ jsx37(FractalTokenizerScript, {}),
|
|
11851
|
+
/* @__PURE__ */ jsx37(SkyChargewidgetstyles, {}),
|
|
11852
|
+
/* @__PURE__ */ jsx37(CardBankRadioStyles, {}),
|
|
11853
|
+
/* @__PURE__ */ jsx37(CustomModal2styles_default, {}),
|
|
11854
|
+
/* @__PURE__ */ jsx37(DataCapScriptLoader, {}),
|
|
11855
|
+
!autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
11856
|
+
submitBtnText,
|
|
11857
|
+
submitBtnIcon
|
|
11858
|
+
] }),
|
|
11859
|
+
!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 }))
|
|
11860
|
+
] });
|
|
11861
|
+
};
|
|
11862
|
+
|
|
11863
|
+
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
11864
|
+
import { useEffect as useEffect21, useState as useState13, useMemo as useMemo2 } from "react";
|
|
11865
|
+
import axios11 from "axios";
|
|
11866
|
+
|
|
11867
|
+
// src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
|
|
11868
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
11869
|
+
function EmbeddedCheckoutStyles({ extraCustomCSS }) {
|
|
11870
|
+
return /* @__PURE__ */ jsx38("style", { children: `
|
|
11871
|
+
|
|
11872
|
+
.pay-amount-conatiner{
|
|
11873
|
+
margin-top: 20px !important;
|
|
11874
|
+
margin-bottom: 20px !important ;
|
|
11875
|
+
}
|
|
11876
|
+
|
|
11877
|
+
.frac-pay-container.pay-container {
|
|
11878
|
+
grid-template-columns:1fr;
|
|
11879
|
+
}
|
|
11880
|
+
|
|
11881
|
+
|
|
11882
|
+
/* Card */
|
|
11883
|
+
.plan-card {
|
|
11884
|
+
width: 100%;
|
|
11885
|
+
font-family: Inter, sans-serif;
|
|
11886
|
+
background: #fff;
|
|
11887
|
+
}
|
|
11888
|
+
|
|
11889
|
+
/* Header */
|
|
11890
|
+
.card-header {
|
|
11891
|
+
padding: 12px 0 0 0;
|
|
11892
|
+
}
|
|
11893
|
+
|
|
11894
|
+
/* Button */
|
|
11895
|
+
.collapse-btn {
|
|
11896
|
+
width: 100%;
|
|
11897
|
+
background: none;
|
|
11898
|
+
border: none;
|
|
11899
|
+
display: flex;
|
|
11900
|
+
justify-content: space-between;
|
|
11901
|
+
align-items: center;
|
|
11902
|
+
cursor: pointer;
|
|
11903
|
+
font-size: 15px;
|
|
11904
|
+
padding: 0;
|
|
11905
|
+
}
|
|
11906
|
+
|
|
11907
|
+
/* Arrow */
|
|
11908
|
+
.arrow {
|
|
11909
|
+
transition: transform 0.3s ease;
|
|
11910
|
+
height: 8px;
|
|
11911
|
+
}
|
|
11912
|
+
|
|
11913
|
+
/* Open State */
|
|
11914
|
+
.collapse-btn.open .arrow {
|
|
11915
|
+
transform: rotate(180deg); /* Down */
|
|
11916
|
+
}
|
|
11917
|
+
|
|
11918
|
+
/* Body */
|
|
11919
|
+
.card-body {
|
|
11920
|
+
padding: 0;
|
|
11921
|
+
}
|
|
11922
|
+
|
|
11923
|
+
/* Plan Header */
|
|
11924
|
+
.plan-header {
|
|
11925
|
+
font-size: 15px;
|
|
11926
|
+
font-weight: 600;
|
|
11927
|
+
}
|
|
11928
|
+
|
|
11929
|
+
/* Scrollable List */
|
|
11930
|
+
.plan-list {
|
|
11931
|
+
max-height: 200px;
|
|
11932
|
+
overflow-y: auto;
|
|
11933
|
+
padding-right: 6px;
|
|
11934
|
+
}
|
|
11935
|
+
|
|
11936
|
+
/* Items */
|
|
11937
|
+
.plan-item {
|
|
11938
|
+
display: flex;
|
|
11939
|
+
justify-content: space-between;
|
|
11940
|
+
padding: 6px 0;
|
|
11941
|
+
font-size: 14px;
|
|
11942
|
+
}
|
|
11943
|
+
|
|
11944
|
+
/* Badges */
|
|
11945
|
+
.badge {
|
|
11946
|
+
padding: 4px 10px;
|
|
11947
|
+
border-radius: 12px;
|
|
11948
|
+
font-size: 12px;
|
|
11949
|
+
font-weight: 500;
|
|
11950
|
+
}
|
|
11951
|
+
|
|
11952
|
+
.badge-included {
|
|
11953
|
+
background: #f1f3f5;
|
|
11954
|
+
color: #495057;
|
|
11955
|
+
}
|
|
11956
|
+
|
|
11957
|
+
.badge-available {
|
|
11958
|
+
background: #f8f9fa;
|
|
11959
|
+
color: #212529;
|
|
11960
|
+
}
|
|
11961
|
+
|
|
11962
|
+
/* Helpers */
|
|
11963
|
+
.row-between {
|
|
11964
|
+
display: flex;
|
|
11965
|
+
justify-content: space-between;
|
|
11966
|
+
}
|
|
11967
|
+
|
|
11968
|
+
.text-end {
|
|
11969
|
+
text-align: right;
|
|
11970
|
+
}
|
|
11971
|
+
|
|
11972
|
+
.text-muted {
|
|
11973
|
+
color: #6c757d;
|
|
11974
|
+
font-size: 12px;
|
|
11975
|
+
}
|
|
11976
|
+
|
|
11977
|
+
.fw-semibold {
|
|
11978
|
+
font-weight: 600;
|
|
11979
|
+
}
|
|
11980
|
+
|
|
11981
|
+
.mb-2 {
|
|
11982
|
+
margin-bottom: 8px;
|
|
11983
|
+
}
|
|
11984
|
+
|
|
11985
|
+
/* Divider */
|
|
11986
|
+
.divider {
|
|
11987
|
+
height: 1px;
|
|
11988
|
+
background: #e5e7eb;
|
|
11989
|
+
margin: 8px 0;
|
|
11990
|
+
}
|
|
11991
|
+
|
|
11992
|
+
/* Collapse Animation */
|
|
11993
|
+
.collapse {
|
|
11994
|
+
max-height: 0;
|
|
11995
|
+
overflow: hidden;
|
|
11996
|
+
transition: max-height 0.3s ease;
|
|
11997
|
+
}
|
|
11998
|
+
|
|
11999
|
+
.collapse.show {
|
|
12000
|
+
max-height: 1000px;
|
|
12001
|
+
}
|
|
12002
|
+
.frac-pay-container.pay-container {
|
|
12003
|
+
grid-template-columns:1fr;
|
|
12004
|
+
}
|
|
12005
|
+
.frac-payment-form-div .amt-pay-con {
|
|
12006
|
+
padding-right: 0px;
|
|
12007
|
+
}
|
|
12008
|
+
.frac-payment-form-div .ach-scrl {
|
|
12009
|
+
padding-right: 0px;
|
|
12010
|
+
gap: 10px;
|
|
12011
|
+
max-height: fit-content !important;
|
|
12012
|
+
min-height: fit-content !important;
|
|
12013
|
+
overflow: hidden !important;
|
|
12014
|
+
}
|
|
12015
|
+
.frac-payment-form-div .frac-card-bank-radio-main {
|
|
12016
|
+
display: flex;
|
|
12017
|
+
flex-direction: row;
|
|
12018
|
+
align-items: flex-start;
|
|
12019
|
+
align-self: stretch;
|
|
12020
|
+
border-radius: 14px;
|
|
12021
|
+
border: none;
|
|
12022
|
+
overflow: visible;
|
|
12023
|
+
gap: 10px;
|
|
12024
|
+
}
|
|
12025
|
+
.frac-payment-form-div .frac-card-bank-radio {
|
|
12026
|
+
display: flex;
|
|
12027
|
+
padding: 12px 16px;
|
|
12028
|
+
justify-content: space-between;
|
|
12029
|
+
align-items: center;
|
|
12030
|
+
align-self: stretch;
|
|
12031
|
+
width: 50%;
|
|
12032
|
+
border: 1px solid #E0DFE2;
|
|
12033
|
+
border-radius: 10px;
|
|
12034
|
+
box-shadow: rgba(149, 157, 165, 0.2) 0px 1px 4px;
|
|
12035
|
+
}
|
|
12036
|
+
.frac-payment-form-div .frac-card-bank-radio.frac-active {
|
|
12037
|
+
background: #fff;
|
|
12038
|
+
border: 2px solid #004eab !important;
|
|
12039
|
+
}
|
|
12040
|
+
|
|
12041
|
+
.frac-payment-form-div .form-control-frac {
|
|
12042
|
+
border: 1px solid #dee2e6 !important;
|
|
12043
|
+
border-radius: 0.375rem !important;
|
|
12044
|
+
background-color: #F6F6F7;
|
|
12045
|
+
box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
|
|
12046
|
+
}
|
|
12047
|
+
.frac-payment-form-div .form-control-frac:focus {
|
|
12048
|
+
border: 1px solid #004eab !important;
|
|
12049
|
+
}
|
|
12050
|
+
.frac-payment-form-div .card-expiry-new {
|
|
12051
|
+
border: none;
|
|
12052
|
+
gap: 10px;
|
|
12053
|
+
}
|
|
12054
|
+
.frac-payment-form-div .exp-date-year-container {
|
|
12055
|
+
gap: 10px;
|
|
12056
|
+
width: 100%;
|
|
12057
|
+
}
|
|
12058
|
+
.frac-payment-form-div .card-type-logo-wrap{
|
|
12059
|
+
position: absolute;
|
|
12060
|
+
right: 10px;
|
|
12061
|
+
max-width: 30px;
|
|
12062
|
+
}
|
|
12063
|
+
.detials-wrap.detials-wrap-1 {
|
|
12064
|
+
display: flex;
|
|
12065
|
+
flex-wrap: wrap;
|
|
12066
|
+
}
|
|
12067
|
+
@media screen and (max-width: 1280px) {
|
|
12068
|
+
.frac-pay-container.pay-container {
|
|
12069
|
+
grid-template-columns: 1fr;
|
|
12070
|
+
border: none;
|
|
12071
|
+
}
|
|
12072
|
+
}
|
|
12073
|
+
@media screen and (max-width: 899px) {
|
|
12074
|
+
.detials-wrap {
|
|
12075
|
+
grid-template-columns: 1fr !important;
|
|
12076
|
+
}
|
|
12077
|
+
.frac-payment-form-div .exp-date-year-container{
|
|
12078
|
+
width: 100%;}
|
|
12079
|
+
|
|
12080
|
+
}
|
|
12081
|
+
@media screen and (max-width: 575px) {
|
|
12082
|
+
.frac-payment-form-div .card-type-logo-wrap{
|
|
12083
|
+
max-width: 30px;
|
|
12084
|
+
}
|
|
12085
|
+
form#ACHPaymentForm .ach-scrl {
|
|
12086
|
+
grid-template-columns: 1fr !important;
|
|
12087
|
+
}
|
|
12088
|
+
@media screen and (max-width: 375px) {
|
|
12089
|
+
.frac-payment-form-div .exp-date-year-container {
|
|
12090
|
+
flex-direction: column;
|
|
12091
|
+
}
|
|
12092
|
+
.parent-pay-container {
|
|
12093
|
+
padding: 10px;
|
|
12094
|
+
}
|
|
12095
|
+
}
|
|
12096
|
+
}
|
|
12097
|
+
.box-inner-card-text{
|
|
12098
|
+
display: flex;
|
|
12099
|
+
gap: 0px;
|
|
12100
|
+
flex-direction: column;
|
|
12101
|
+
}
|
|
12102
|
+
.box-inner-card-text .frac-payment-type-logo {
|
|
12103
|
+
width: 17px;
|
|
12104
|
+
height: 17px;
|
|
12105
|
+
aspect-ratio: 1/1;
|
|
12106
|
+
}
|
|
12107
|
+
.exp-date-year-wrap.form-control-frac input {
|
|
12108
|
+
background: transparent;
|
|
12109
|
+
border: none;
|
|
12110
|
+
outline: none;
|
|
12111
|
+
font-size: 1rem;
|
|
12112
|
+
font-weight: 400;
|
|
12113
|
+
}
|
|
12114
|
+
.exp-date-year-wrap.form-control-frac {
|
|
12115
|
+
display: flex;
|
|
12116
|
+
gap: 2px;
|
|
12117
|
+
}
|
|
12118
|
+
.exp-date-year-wrap input.exp-month {
|
|
12119
|
+
width: 32px;
|
|
12120
|
+
}
|
|
12121
|
+
.detials-wrap {
|
|
12122
|
+
display: grid;
|
|
12123
|
+
grid-template-columns: 1fr 1fr;
|
|
12124
|
+
gap: 10px;
|
|
12125
|
+
}
|
|
12126
|
+
.detials-wrap.detials-wrap-2{
|
|
12127
|
+
grid-template-columns: 1fr 1fr;
|
|
12128
|
+
}
|
|
12129
|
+
form#ACHPaymentForm .ach-scrl {
|
|
12130
|
+
display: grid;
|
|
12131
|
+
grid-gap: 0px 10px;
|
|
12132
|
+
grid-template-columns: 1fr;
|
|
12133
|
+
}
|
|
12134
|
+
.plan-list {
|
|
12135
|
+
max-height: 130px;
|
|
12136
|
+
min-height: 130px;
|
|
12137
|
+
overflow-y: auto;
|
|
12138
|
+
padding-right: 6px;
|
|
12139
|
+
}
|
|
12140
|
+
.plan-list::-webkit-scrollbar {
|
|
12141
|
+
width: 3px;
|
|
12142
|
+
background-color: #F5F5F5;
|
|
12143
|
+
}
|
|
12144
|
+
.plan-list::-webkit-scrollbar-thumb {
|
|
12145
|
+
background-color: #35254D;
|
|
12146
|
+
}
|
|
12147
|
+
div#cvv {
|
|
12148
|
+
border-top-left-radius: 0;
|
|
12149
|
+
border-bottom-left-radius: 0;
|
|
12150
|
+
border-top: 0;
|
|
12151
|
+
border-bottom: 0;
|
|
12152
|
+
border-right: 0;
|
|
12153
|
+
}
|
|
12154
|
+
div#exp_year {
|
|
12155
|
+
height: 36px;
|
|
12156
|
+
width: calc(100% + 1px);
|
|
12157
|
+
border-radius: 0;
|
|
12158
|
+
border-top: 0;
|
|
12159
|
+
border-bottom: 0;
|
|
12160
|
+
border-right: 1px solid #dee2e6;
|
|
12161
|
+
}
|
|
12162
|
+
div#exp_month {
|
|
12163
|
+
width: calc(100% + 1px);
|
|
12164
|
+
border-top-right-radius: 0;
|
|
12165
|
+
border-bottom-right-radius: 0;
|
|
12166
|
+
border: 0;
|
|
12167
|
+
border-right: 1px solid #dee2e6;
|
|
12168
|
+
}
|
|
12169
|
+
.exp-date-year-container .form-group {
|
|
12170
|
+
flex: 1;
|
|
12171
|
+
}
|
|
12172
|
+
.input-main-wrap-frac{
|
|
12173
|
+
margin:0px !important;
|
|
12174
|
+
padding:0px !important;
|
|
12175
|
+
}
|
|
12176
|
+
.toggle-num-wrapper.toggle-num-wrapper-new {
|
|
12177
|
+
border: 1px solid #dee2e6 !important;
|
|
12178
|
+
border-radius: 0.375rem !important;
|
|
12179
|
+
background-color: #F6F6F7;
|
|
12180
|
+
box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
|
|
12181
|
+
}
|
|
12182
|
+
.toggle-num-wrapper-new div#card_number {
|
|
12183
|
+
padding: 0px 10px;
|
|
12184
|
+
border: none;
|
|
12185
|
+
border-bottom: 1px solid #dee2e6;
|
|
12186
|
+
}
|
|
12187
|
+
.toggle-num-wrapper-new .card-crdi.card-expiry-new {
|
|
12188
|
+
padding: 0px 10px;
|
|
12189
|
+
}
|
|
12190
|
+
.toggle-num-wrapper-new .input-main-wrap-frac {
|
|
12191
|
+
height: 36px;
|
|
12192
|
+
}
|
|
12193
|
+
.toggle-num-wrapper-new:focus {
|
|
12194
|
+
border: 1px solid #004eab !important;
|
|
12195
|
+
}
|
|
12196
|
+
.frac-card-title-main {
|
|
12197
|
+
display: flex;
|
|
12198
|
+
align-items: start;
|
|
12199
|
+
gap: 4px;
|
|
12200
|
+
flex-direction: column;
|
|
12201
|
+
}
|
|
12202
|
+
.parent-pay-container {
|
|
12203
|
+
padding: 24px;
|
|
12204
|
+
background-color: #ffffff !important;
|
|
12205
|
+
border-radius: 15px;
|
|
12206
|
+
min-width: 300px;
|
|
12207
|
+
}
|
|
12208
|
+
|
|
12209
|
+
|
|
12210
|
+
${extraCustomCSS}
|
|
12211
|
+
|
|
12212
|
+
` });
|
|
12213
|
+
}
|
|
12214
|
+
|
|
12215
|
+
// src/app/components/Atoms/Applepay/ApplePayScriptLoader.tsx
|
|
12216
|
+
import { useEffect as useEffect20 } from "react";
|
|
12217
|
+
var applePayScriptLoaded = false;
|
|
12218
|
+
var ApplePayScriptLoader = () => {
|
|
12219
|
+
useEffect20(() => {
|
|
12220
|
+
if (applePayScriptLoaded) return;
|
|
12221
|
+
const existingScript = document.querySelector(
|
|
12222
|
+
`script[src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"]`
|
|
12223
|
+
);
|
|
12224
|
+
if (!existingScript) {
|
|
12225
|
+
const script2 = document.createElement("script");
|
|
12226
|
+
script2.src = "https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js";
|
|
12227
|
+
script2.async = true;
|
|
12228
|
+
script2.onload = () => {
|
|
12229
|
+
console.log("\u2705 Apple Pay script loaded");
|
|
12230
|
+
applePayScriptLoaded = true;
|
|
12231
|
+
console.log("ApplePaySession:", window.ApplePaySession);
|
|
12232
|
+
};
|
|
12233
|
+
script2.onerror = (err) => {
|
|
12234
|
+
console.error("\u274C Apple Pay script failed", err);
|
|
12235
|
+
};
|
|
12236
|
+
document.head.appendChild(script2);
|
|
12237
|
+
} else {
|
|
12238
|
+
applePayScriptLoaded = true;
|
|
12239
|
+
}
|
|
12240
|
+
}, []);
|
|
12241
|
+
return null;
|
|
12242
|
+
};
|
|
12243
|
+
|
|
12244
|
+
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
12245
|
+
import { Fragment as Fragment22, jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
12246
|
+
var EmbeddedCheckout = ({
|
|
12247
|
+
amount,
|
|
12248
|
+
bankAmount,
|
|
12249
|
+
submitBtnText = "Pay",
|
|
12250
|
+
session_token,
|
|
12251
|
+
customerId,
|
|
12252
|
+
callback,
|
|
12253
|
+
merchantName = "merchant",
|
|
12254
|
+
isPreAuth,
|
|
12255
|
+
surcharge = "0",
|
|
12256
|
+
submitBtnClass,
|
|
12257
|
+
submitBtnIcon,
|
|
12258
|
+
isRequest,
|
|
12259
|
+
pass_fee,
|
|
12260
|
+
pass_fee_amount,
|
|
12261
|
+
require3ds = false,
|
|
12262
|
+
autoTrigger = false,
|
|
12263
|
+
isPartial,
|
|
12264
|
+
bankSurcharge,
|
|
12265
|
+
partialRef,
|
|
12266
|
+
onSubmit,
|
|
12267
|
+
onLoad,
|
|
12268
|
+
customCSS: customCSS2
|
|
12269
|
+
}) => {
|
|
12270
|
+
const [show, setShow] = useState13(false);
|
|
12271
|
+
const [loading, setLoading] = useState13(false);
|
|
12272
|
+
const [childHandleClose, setChildHandleClose] = useState13(() => () => {
|
|
12273
|
+
});
|
|
12274
|
+
const [orderGuid, setOrderGuid] = useState13(null);
|
|
12275
|
+
const [remainingAmount, setRemainingAmount] = useState13(null);
|
|
12276
|
+
const initialCommonProps = useMemo2(
|
|
12277
|
+
() => ({
|
|
12278
|
+
amount,
|
|
12279
|
+
bankAmount,
|
|
12280
|
+
submitBtnText,
|
|
12281
|
+
session_token,
|
|
12282
|
+
customerId,
|
|
12283
|
+
callback,
|
|
12284
|
+
merchantName,
|
|
12285
|
+
isPreAuth,
|
|
12286
|
+
surcharge,
|
|
12287
|
+
submitBtnClass,
|
|
12288
|
+
submitBtnIcon,
|
|
12289
|
+
isRequest,
|
|
12290
|
+
pass_fee,
|
|
12291
|
+
pass_fee_amount,
|
|
12292
|
+
require3ds,
|
|
12293
|
+
autoTrigger,
|
|
12294
|
+
setShow,
|
|
12295
|
+
setHandleCloseRef: setChildHandleClose,
|
|
12296
|
+
isPartial,
|
|
12297
|
+
bankSurcharge,
|
|
12298
|
+
partialRef
|
|
12299
|
+
}),
|
|
12300
|
+
[
|
|
12301
|
+
amount,
|
|
12302
|
+
bankAmount,
|
|
12303
|
+
submitBtnText,
|
|
12304
|
+
session_token,
|
|
12305
|
+
customerId,
|
|
12306
|
+
callback,
|
|
12307
|
+
merchantName,
|
|
12308
|
+
isPreAuth,
|
|
12309
|
+
surcharge,
|
|
12310
|
+
submitBtnClass,
|
|
12311
|
+
submitBtnIcon,
|
|
12312
|
+
isRequest,
|
|
12313
|
+
pass_fee,
|
|
12314
|
+
pass_fee_amount,
|
|
12315
|
+
require3ds,
|
|
12316
|
+
autoTrigger,
|
|
12317
|
+
isPartial,
|
|
12318
|
+
bankSurcharge,
|
|
12319
|
+
partialRef
|
|
12320
|
+
]
|
|
12321
|
+
);
|
|
12322
|
+
const [commonProps, setCommonProps] = useState13(initialCommonProps);
|
|
12323
|
+
useEffect21(() => {
|
|
12324
|
+
if (show) {
|
|
12325
|
+
setCommonProps(initialCommonProps);
|
|
12326
|
+
}
|
|
12327
|
+
}, [show, initialCommonProps]);
|
|
12328
|
+
const getskyosOrderDetails = async () => {
|
|
12329
|
+
var _a;
|
|
12330
|
+
setLoading(true);
|
|
12331
|
+
try {
|
|
12332
|
+
const res = await axios11.get(
|
|
12333
|
+
`${masterBaseUrl}api/v1/gateway/get-order-details/${session_token}`,
|
|
12334
|
+
{ params: { isPartial, partialRef } }
|
|
12335
|
+
);
|
|
12336
|
+
if ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.result) {
|
|
12337
|
+
const data = res.data.data;
|
|
12338
|
+
if (data == null ? void 0 : data.orderGuid) {
|
|
12339
|
+
setOrderGuid(data == null ? void 0 : data.orderGuid);
|
|
12340
|
+
setRemainingAmount(data == null ? void 0 : data.remainingAmount);
|
|
12341
|
+
}
|
|
12342
|
+
setCommonProps((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
12343
|
+
amount: data.amount,
|
|
12344
|
+
pass_fee_amount: data.pass_fee_amount,
|
|
12345
|
+
pass_fee: data.pass_fee
|
|
12346
|
+
}));
|
|
12347
|
+
}
|
|
12348
|
+
} catch (error) {
|
|
12349
|
+
console.log("error while getting skyosorderdeatils", error);
|
|
12350
|
+
} finally {
|
|
12351
|
+
setLoading(false);
|
|
12352
|
+
}
|
|
12353
|
+
};
|
|
12354
|
+
useEffect21(() => {
|
|
12355
|
+
if (show && isPartial && partialRef) {
|
|
12356
|
+
getskyosOrderDetails();
|
|
12357
|
+
}
|
|
12358
|
+
}, [show, isPartial, partialRef]);
|
|
12359
|
+
console.log(onLoad, "onLoad");
|
|
12360
|
+
useEffect21(() => {
|
|
12361
|
+
const supported = !!window.ApplePaySession;
|
|
12362
|
+
let canPay = false;
|
|
12363
|
+
if (supported) {
|
|
12364
|
+
try {
|
|
12365
|
+
canPay = window.ApplePaySession.canMakePayments();
|
|
12366
|
+
} catch (e) {
|
|
12367
|
+
}
|
|
12368
|
+
}
|
|
12369
|
+
console.log(`ApplePaySession: ${supported}, canMakePayments: ${canPay}`);
|
|
12370
|
+
}, []);
|
|
12371
|
+
return /* @__PURE__ */ jsxs23(Fragment22, { children: [
|
|
12372
|
+
/* @__PURE__ */ jsx39("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
12373
|
+
/* @__PURE__ */ jsx39(DataScript, {}),
|
|
12374
|
+
/* @__PURE__ */ jsx39(FractalTokenizerScript, {}),
|
|
12375
|
+
/* @__PURE__ */ jsx39(SkyChargewidgetstyles, {}),
|
|
12376
|
+
/* @__PURE__ */ jsx39(CardBankRadioStyles, {}),
|
|
12377
|
+
/* @__PURE__ */ jsx39(CustomModal2styles_default, {}),
|
|
12378
|
+
/* @__PURE__ */ jsx39(DataCapScriptLoader, {}),
|
|
12379
|
+
/* @__PURE__ */ jsx39(ApplePayScriptLoader, {}),
|
|
12380
|
+
/* @__PURE__ */ jsx39(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
|
|
12381
|
+
!autoTrigger && /* @__PURE__ */ jsxs23("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
11057
12382
|
submitBtnText,
|
|
11058
12383
|
submitBtnIcon
|
|
11059
12384
|
] }),
|
|
11060
|
-
!autoTrigger ? /* @__PURE__ */
|
|
12385
|
+
!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 }))
|
|
11061
12386
|
] });
|
|
11062
12387
|
};
|
|
11063
12388
|
export {
|
|
11064
12389
|
AddCardEasyPay as AddCard,
|
|
11065
12390
|
CardOnFile,
|
|
12391
|
+
EmbeddedCheckout,
|
|
11066
12392
|
GetPaymentPage,
|
|
11067
12393
|
PartialPayment,
|
|
11068
12394
|
PaymentWidget,
|