@fractalpay/fractalpay-next-dev 0.0.259 → 0.0.261
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 +44 -16
- package/dist/index.js +1854 -524
- 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.261",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -113,8 +113,25 @@ import { useState, useEffect } from "react";
|
|
|
113
113
|
import { jsx } from "react/jsx-runtime";
|
|
114
114
|
var LoaderStyle = (props) => {
|
|
115
115
|
return /* @__PURE__ */ jsx("style", { children: `
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
|
|
117
|
+
.loader-light {
|
|
118
|
+
position: fixed; /* Fixed position to cover the viewport */
|
|
119
|
+
top: 0;
|
|
120
|
+
left: 0;
|
|
121
|
+
width: 100%;
|
|
122
|
+
height: 100%;
|
|
123
|
+
display: flex;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
align-items: center;
|
|
126
|
+
/* background: rgba(255, 255, 0, 0.01); Adjust the blur effect */
|
|
127
|
+
background-color: rgba(31, 29, 29, 0.52); /* Semi-transparent black background */
|
|
128
|
+
|
|
129
|
+
backdrop-filter: blur(0.5px); /* Blur effect */
|
|
130
|
+
z-index: 999999999999 !important; /* Ensure it's on top of other elements */
|
|
131
|
+
transform: translate(0%, 0%) !important
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.loader-dark {
|
|
118
135
|
position: fixed; /* Fixed position to cover the viewport */
|
|
119
136
|
top: 0;
|
|
120
137
|
left: 0;
|
|
@@ -126,7 +143,7 @@ var LoaderStyle = (props) => {
|
|
|
126
143
|
/* background: rgba(255, 255, 0, 0.01); Adjust the blur effect */
|
|
127
144
|
background-color: rgba(31, 29, 29, 0.52); /* Semi-transparent black background */
|
|
128
145
|
|
|
129
|
-
backdrop-filter: blur(.5px); /* Blur effect */
|
|
146
|
+
backdrop-filter: blur(6.5px); /* Blur effect */
|
|
130
147
|
z-index: 999999999999 !important; /* Ensure it's on top of other elements */
|
|
131
148
|
transform: translate(0%, 0%) !important
|
|
132
149
|
}
|
|
@@ -201,10 +218,11 @@ var LoaderStyle_default = LoaderStyle;
|
|
|
201
218
|
|
|
202
219
|
// src/app/components/Loader/Loader.tsx
|
|
203
220
|
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
204
|
-
var Loader = (
|
|
221
|
+
var Loader = (_a) => {
|
|
222
|
+
var _b = _a, { intensity = "light" } = _b, props = __objRest(_b, ["intensity"]);
|
|
205
223
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
206
224
|
/* @__PURE__ */ jsx2(LoaderStyle_default, {}),
|
|
207
|
-
(props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className:
|
|
225
|
+
(props == null ? void 0 : props.loading) && /* @__PURE__ */ jsx2("div", { className: `loader-${intensity}`, children: /* @__PURE__ */ jsxs("div", { className: "lds-ellipsis", children: [
|
|
208
226
|
/* @__PURE__ */ jsx2("div", {}),
|
|
209
227
|
/* @__PURE__ */ jsx2("div", {}),
|
|
210
228
|
/* @__PURE__ */ jsx2("div", {}),
|
|
@@ -223,36 +241,60 @@ if (name === "@fractalpay/fractalpay-next-dev") {
|
|
|
223
241
|
fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
|
|
224
242
|
datacapUrl = "https://token-cert.dcap.com/v1/client";
|
|
225
243
|
threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
|
|
244
|
+
applePayMerchantId = "fractal";
|
|
245
|
+
googlePayMerchantId = "12345678901234567890";
|
|
246
|
+
googlePayEnvironment = "TEST";
|
|
247
|
+
googlePayGatewayMerchantId = "fractal";
|
|
226
248
|
} else if (name === "@fractalpay/fractalpay-next-test") {
|
|
227
249
|
masterBaseUrl = "https://testapi.fractalpay.com/";
|
|
228
250
|
baseUrl = "https://staging-widget.fractalpay.com/";
|
|
229
251
|
fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
|
|
230
252
|
datacapUrl = "https://token-cert.dcap.com/v1/client";
|
|
231
253
|
threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
|
|
254
|
+
applePayMerchantId = "fractal";
|
|
255
|
+
googlePayMerchantId = "12345678901234567890";
|
|
256
|
+
googlePayEnvironment = "TEST";
|
|
257
|
+
googlePayGatewayMerchantId = "fractal";
|
|
232
258
|
} else if (name === "@fractalpay/fractalpay-next-testprod") {
|
|
233
259
|
masterBaseUrl = "https://sky-node-prod.fractalpay.com/";
|
|
234
260
|
baseUrl = "https://widget-prod.fractalpay.com/";
|
|
235
261
|
fractalGatewayUrl = "https://api.merchant-trends.com/";
|
|
236
262
|
datacapUrl = "https://token.dcap.com/v1/client";
|
|
237
263
|
threedsSecurePublicKey = "pk_live_51RH5WXCZ90rBGeaYwqmjWqgUmudTgxL6uKOE1keu617jvRx9OvW2ke6zGf6SKgv4ixsBLcIPQ4sQIEhp8MgBX39500CqULxOPB";
|
|
264
|
+
applePayMerchantId = "fractal";
|
|
265
|
+
googlePayMerchantId = "BCR2DN4T6OC2TCQH";
|
|
266
|
+
googlePayEnvironment = "PRODUCTION";
|
|
267
|
+
googlePayGatewayMerchantId = "fractal";
|
|
238
268
|
} else if (name === "@fractalpay/fractalpay-next") {
|
|
239
269
|
masterBaseUrl = "https://api.fractalpay.com/";
|
|
240
270
|
baseUrl = "https://widget.fractalpay.com/";
|
|
241
271
|
fractalGatewayUrl = "https://api.merchant-trends.com/";
|
|
242
272
|
datacapUrl = "https://token.dcap.com/v1/client";
|
|
243
273
|
threedsSecurePublicKey = "pk_live_51RH5WXCZ90rBGeaYwqmjWqgUmudTgxL6uKOE1keu617jvRx9OvW2ke6zGf6SKgv4ixsBLcIPQ4sQIEhp8MgBX39500CqULxOPB";
|
|
274
|
+
applePayMerchantId = "fractal";
|
|
275
|
+
googlePayMerchantId = "BCR2DN4T6OC2TCQH";
|
|
276
|
+
googlePayEnvironment = "PRODUCTION";
|
|
277
|
+
googlePayGatewayMerchantId = "fractal";
|
|
244
278
|
} else {
|
|
245
279
|
baseUrl = "http://localhost:8082/";
|
|
246
280
|
masterBaseUrl = "http://localhost:8081/";
|
|
247
281
|
fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
|
|
248
282
|
datacapUrl = "https://token-cert.dcap.com/v1/client";
|
|
249
283
|
threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
|
|
284
|
+
applePayMerchantId = "fractal";
|
|
285
|
+
googlePayMerchantId = "12345678901234567890";
|
|
286
|
+
googlePayEnvironment = "TEST";
|
|
287
|
+
googlePayGatewayMerchantId = "fractal";
|
|
250
288
|
}
|
|
251
289
|
var masterBaseUrl;
|
|
252
290
|
var baseUrl;
|
|
253
291
|
var fractalGatewayUrl;
|
|
254
292
|
var datacapUrl;
|
|
255
293
|
var threedsSecurePublicKey;
|
|
294
|
+
var applePayMerchantId;
|
|
295
|
+
var googlePayMerchantId;
|
|
296
|
+
var googlePayEnvironment;
|
|
297
|
+
var googlePayGatewayMerchantId;
|
|
256
298
|
|
|
257
299
|
// src/app/components/Errortext.ts
|
|
258
300
|
var ErrorText = {
|
|
@@ -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,27 @@ 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
|
+
/* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsx13("input", { name: "paymenttype", checked: props.activetab === props.value, type: "hidden", value: props.value, onChange: (e) => {
|
|
2997
|
+
props.onChange(e.target.value);
|
|
2998
|
+
} }) })
|
|
2999
|
+
] }) : /* @__PURE__ */ jsxs7(Fragment7, { children: [
|
|
2945
3000
|
/* @__PURE__ */ jsxs7("div", { className: "frac-card-title-main", children: [
|
|
2946
3001
|
/* @__PURE__ */ jsx13("img", { src: props.label.toLowerCase() === "card" ? defaultcard : props.label.toLowerCase() === "reader" ? pax : bankNew, className: "frac-payment-type-logo", alt: "" }),
|
|
2947
3002
|
/* @__PURE__ */ jsxs7("div", { className: "frac-card-label", children: [
|
|
@@ -2952,7 +3007,7 @@ var CardBankRadio = (props) => {
|
|
|
2952
3007
|
/* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsx13("input", { name: "paymenttype", checked: props.activetab === props.value, type: "radio", value: props.value, onChange: (e) => {
|
|
2953
3008
|
props.onChange(e.target.value);
|
|
2954
3009
|
} }) })
|
|
2955
|
-
]
|
|
3010
|
+
] })
|
|
2956
3011
|
}
|
|
2957
3012
|
) });
|
|
2958
3013
|
};
|
|
@@ -2977,6 +3032,7 @@ function CardBankRadioStyles({}) {
|
|
|
2977
3032
|
justify-content: space-between;
|
|
2978
3033
|
align-items: center;
|
|
2979
3034
|
align-self: stretch;
|
|
3035
|
+
position: relative;
|
|
2980
3036
|
}
|
|
2981
3037
|
|
|
2982
3038
|
input[type="radio"] {
|
|
@@ -3034,6 +3090,28 @@ function CardBankRadioStyles({}) {
|
|
|
3034
3090
|
.frac-card-bank-radio.frac-active {
|
|
3035
3091
|
background: #F6F6F7;
|
|
3036
3092
|
}
|
|
3093
|
+
|
|
3094
|
+
.frac-saving-badge {
|
|
3095
|
+
padding: 1px 7px !important;
|
|
3096
|
+
border: 1px solid #9ad7ab;
|
|
3097
|
+
border-radius: 999px;
|
|
3098
|
+
background: #e8f8ec;
|
|
3099
|
+
color: #1e6a34;
|
|
3100
|
+
font-size: 10px;
|
|
3101
|
+
font-weight: 600;
|
|
3102
|
+
line-height: 15px;
|
|
3103
|
+
pointer-events: none;
|
|
3104
|
+
}
|
|
3105
|
+
|
|
3106
|
+
.frac-saving-badge-corner {
|
|
3107
|
+
position: absolute;
|
|
3108
|
+
top: 8px;
|
|
3109
|
+
right: 10px;
|
|
3110
|
+
}
|
|
3111
|
+
|
|
3112
|
+
.frac-saving-badge-with-radio {
|
|
3113
|
+
right: 34px;
|
|
3114
|
+
}
|
|
3037
3115
|
` });
|
|
3038
3116
|
}
|
|
3039
3117
|
|
|
@@ -3211,7 +3289,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3211
3289
|
{
|
|
3212
3290
|
id: "card_number",
|
|
3213
3291
|
className: "form-control card-number-new",
|
|
3214
|
-
style: { height: `${isSky ? "36px" : "46px"}
|
|
3292
|
+
style: { height: `${isSky ? "36px" : "46px"}` }
|
|
3215
3293
|
}
|
|
3216
3294
|
),
|
|
3217
3295
|
/* @__PURE__ */ jsx17("div", { className: "card-crdi card-expiry-new", children: /* @__PURE__ */ jsxs10("div", { className: "exp-date-year-container", children: [
|
|
@@ -3220,7 +3298,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3220
3298
|
{
|
|
3221
3299
|
id: "exp_month",
|
|
3222
3300
|
className: "form-control required card-cvv-in",
|
|
3223
|
-
style: { height: "36px", display: "
|
|
3301
|
+
style: { height: "36px", display: "block", minHeight: "36px" }
|
|
3224
3302
|
}
|
|
3225
3303
|
) }),
|
|
3226
3304
|
/* @__PURE__ */ jsx17("div", { className: "exp-year form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
@@ -3228,7 +3306,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3228
3306
|
{
|
|
3229
3307
|
id: "exp_year",
|
|
3230
3308
|
className: "form-control required card-cvv-in",
|
|
3231
|
-
style: { height: "36px", display: "
|
|
3309
|
+
style: { height: "36px", display: "block", minHeight: "36px" }
|
|
3232
3310
|
}
|
|
3233
3311
|
) }),
|
|
3234
3312
|
/* @__PURE__ */ jsx17("div", { className: "security-digit form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
@@ -3236,7 +3314,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3236
3314
|
{
|
|
3237
3315
|
id: "cvv",
|
|
3238
3316
|
className: "form-control card-cvv-in required",
|
|
3239
|
-
style: { height: "36px", display: "
|
|
3317
|
+
style: { height: "36px", display: "block", minHeight: "36px" }
|
|
3240
3318
|
}
|
|
3241
3319
|
) })
|
|
3242
3320
|
] }) })
|
|
@@ -3360,7 +3438,9 @@ var DataCapFields = ({
|
|
|
3360
3438
|
tokenKey,
|
|
3361
3439
|
setLoader,
|
|
3362
3440
|
isAddCard,
|
|
3363
|
-
|
|
3441
|
+
isEmbedded,
|
|
3442
|
+
customCSS: extraCss,
|
|
3443
|
+
height
|
|
3364
3444
|
}) => {
|
|
3365
3445
|
const iframeId = "datacap-iframe";
|
|
3366
3446
|
const resolverRef = useRef2(null);
|
|
@@ -3386,10 +3466,24 @@ var DataCapFields = ({
|
|
|
3386
3466
|
|
|
3387
3467
|
`;
|
|
3388
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
|
+
}
|
|
3389
3483
|
if (extraCss) {
|
|
3390
3484
|
customCSS += extraCss;
|
|
3391
3485
|
}
|
|
3392
|
-
console.log(customCSS, "
|
|
3486
|
+
console.log(customCSS, "customCSS1555");
|
|
3393
3487
|
const initialize = async () => {
|
|
3394
3488
|
setLoader == null ? void 0 : setLoader(true);
|
|
3395
3489
|
setIframeReady(false);
|
|
@@ -3421,13 +3515,18 @@ var DataCapFields = ({
|
|
|
3421
3515
|
};
|
|
3422
3516
|
initialize();
|
|
3423
3517
|
}, [isOpen, tokenKey]);
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3518
|
+
useEffect7(() => {
|
|
3519
|
+
window.requestDcToken = () => {
|
|
3520
|
+
return new Promise((resolve, reject) => {
|
|
3521
|
+
setLoader == null ? void 0 : setLoader(true);
|
|
3522
|
+
resolverRef.current = { resolve, reject };
|
|
3523
|
+
});
|
|
3524
|
+
};
|
|
3525
|
+
return () => {
|
|
3526
|
+
delete window.requestDcToken;
|
|
3527
|
+
};
|
|
3528
|
+
}, []);
|
|
3529
|
+
console.log(setLoader, "loadingIframe");
|
|
3431
3530
|
return /* @__PURE__ */ jsx18(
|
|
3432
3531
|
"iframe",
|
|
3433
3532
|
{
|
|
@@ -3439,7 +3538,7 @@ var DataCapFields = ({
|
|
|
3439
3538
|
},
|
|
3440
3539
|
style: {
|
|
3441
3540
|
width: "100%",
|
|
3442
|
-
height: "250px"
|
|
3541
|
+
height: `${height || "250px"}`,
|
|
3443
3542
|
border: "none",
|
|
3444
3543
|
opacity: iframeReady ? 1 : 0,
|
|
3445
3544
|
transition: "opacity 0.3s ease"
|
|
@@ -6707,7 +6806,7 @@ var FractalFieldsAddCardSky_default = FractalFieldsAddCardSky;
|
|
|
6707
6806
|
|
|
6708
6807
|
// src/app/components/AddCard/AddCardSky.tsx
|
|
6709
6808
|
import { Fragment as Fragment16, jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6710
|
-
function CardOnFile({ session_token, callback, isloading, onCancel, showChecks, merchantName, signCheckbox, checkedSignCheckbox, onCheckSign, cancelbtnClass, savebtnClass, inputClass, isDual, customCSS: customCSS2 }) {
|
|
6809
|
+
function CardOnFile({ session_token, callback, isloading, onCancel, showChecks, merchantName, signCheckbox, checkedSignCheckbox, onCheckSign, cancelbtnClass, savebtnClass, inputClass, isDual, customCSS: customCSS2, height }) {
|
|
6711
6810
|
var _a, _b;
|
|
6712
6811
|
const [loading, setLoading] = useState7(false);
|
|
6713
6812
|
const [errorIframe, setErrorIframe] = useState7("");
|
|
@@ -7221,7 +7320,8 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
|
|
|
7221
7320
|
isOpen: true,
|
|
7222
7321
|
tokenKey: dcToken,
|
|
7223
7322
|
setLoader: setLoadingIframe,
|
|
7224
|
-
customCSS: customCSS2
|
|
7323
|
+
customCSS: customCSS2,
|
|
7324
|
+
height
|
|
7225
7325
|
}
|
|
7226
7326
|
) }),
|
|
7227
7327
|
/* @__PURE__ */ jsxs16("div", { className: "form-group", children: [
|
|
@@ -8600,7 +8700,7 @@ function PartialPayment(props) {
|
|
|
8600
8700
|
}
|
|
8601
8701
|
|
|
8602
8702
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
8603
|
-
import { useEffect as
|
|
8703
|
+
import { useEffect as useEffect19, useState as useState12, useMemo } from "react";
|
|
8604
8704
|
|
|
8605
8705
|
// src/app/components/Skysystemz/SkyChargewidgetstyles.tsx
|
|
8606
8706
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -8836,6 +8936,17 @@ function SkyChargewidgetstyles() {
|
|
|
8836
8936
|
text-align : left !important;
|
|
8837
8937
|
text-transform: uppercase !important;
|
|
8838
8938
|
}
|
|
8939
|
+
.frac-form .frac-fee-text{
|
|
8940
|
+
display: block;
|
|
8941
|
+
padding: 10px 0 4px;
|
|
8942
|
+
font-family: 'IBM Plex Mono', monospace !important;
|
|
8943
|
+
color: #727272 !important;
|
|
8944
|
+
font-size: 12px;
|
|
8945
|
+
line-height: 1.4;
|
|
8946
|
+
}
|
|
8947
|
+
.frac-form .frac-fee-amount{
|
|
8948
|
+
color: #c62828 !important;
|
|
8949
|
+
}
|
|
8839
8950
|
.form-control-frac{
|
|
8840
8951
|
display: block;
|
|
8841
8952
|
width: 100%;
|
|
@@ -8870,7 +8981,7 @@ function SkyChargewidgetstyles() {
|
|
|
8870
8981
|
}
|
|
8871
8982
|
.exp-date-year-container .form-group {
|
|
8872
8983
|
flex: 1;
|
|
8873
|
-
padding-left:.75rem;
|
|
8984
|
+
padding-left:.75rem !important;
|
|
8874
8985
|
}
|
|
8875
8986
|
.card-crdi {
|
|
8876
8987
|
display: flex;
|
|
@@ -8887,7 +8998,7 @@ function SkyChargewidgetstyles() {
|
|
|
8887
8998
|
}
|
|
8888
8999
|
.exp-date-year-container .form-group-frac{
|
|
8889
9000
|
flex:1;
|
|
8890
|
-
padding: 0px !important
|
|
9001
|
+
// padding: 0px !important
|
|
8891
9002
|
|
|
8892
9003
|
}
|
|
8893
9004
|
|
|
@@ -9388,13 +9499,54 @@ margin:0px !important;
|
|
|
9388
9499
|
padding:0px !important;
|
|
9389
9500
|
}
|
|
9390
9501
|
|
|
9391
|
-
|
|
9502
|
+
|
|
9503
|
+
.toggle-num-wrapper-new div#card_number {
|
|
9504
|
+
display: block !important;
|
|
9505
|
+
}
|
|
9506
|
+
.toggle-num-wrapper-new .input-main-wrap-frac {
|
|
9507
|
+
height: 36px;
|
|
9508
|
+
}
|
|
9509
|
+
.toggle-num-wrapper-new:focus {
|
|
9510
|
+
border: 1px solid #004eab !important;
|
|
9511
|
+
}
|
|
9512
|
+
.frac-or {
|
|
9513
|
+
position: relative;
|
|
9514
|
+
margin: 15px 0;
|
|
9515
|
+
text-align: center;
|
|
9516
|
+
}
|
|
9517
|
+
.frac-or:before {
|
|
9518
|
+
position: absolute;
|
|
9519
|
+
left: 0;
|
|
9520
|
+
transform: translateY(-50%);
|
|
9521
|
+
top: 50%;
|
|
9522
|
+
height: 1px;
|
|
9523
|
+
width: 100%;
|
|
9524
|
+
background: #E0DFE2;
|
|
9525
|
+
content: '';
|
|
9526
|
+
z-index: 1;
|
|
9527
|
+
}
|
|
9528
|
+
.frac-or span {
|
|
9529
|
+
background: transparent;
|
|
9530
|
+
font-size: 13px;
|
|
9531
|
+
margin: 0 auto;
|
|
9532
|
+
width: 15px;
|
|
9533
|
+
font-weight: 500;
|
|
9534
|
+
text-transform: uppercase;
|
|
9535
|
+
color: #727272;
|
|
9536
|
+
padding: 3px;
|
|
9537
|
+
position: relative;
|
|
9538
|
+
z-index: 3;
|
|
9539
|
+
}
|
|
9540
|
+
button#gpay-button-online-api-id{
|
|
9541
|
+
width: 100%;
|
|
9542
|
+
}
|
|
9543
|
+
|
|
9392
9544
|
|
|
9393
9545
|
` });
|
|
9394
9546
|
}
|
|
9395
9547
|
|
|
9396
9548
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9397
|
-
import { useCallback, useEffect as
|
|
9549
|
+
import { useCallback, useEffect as useEffect18, useRef as useRef12, useState as useState11 } from "react";
|
|
9398
9550
|
import axios9 from "axios";
|
|
9399
9551
|
import Swal5 from "sweetalert2";
|
|
9400
9552
|
|
|
@@ -9535,113 +9687,604 @@ function CheckoutWrapper({ clientSecret, onSuccess, showLoader, setError, sessio
|
|
|
9535
9687
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9536
9688
|
import { IoArrowBack as IoArrowBack4 } from "react-icons/io5";
|
|
9537
9689
|
import { NumericFormat as NumericFormat2 } from "react-number-format";
|
|
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
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9690
|
+
|
|
9691
|
+
// src/app/components/ErrorCardMessage/ErrorCardOverlaystyle.tsx
|
|
9692
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
9693
|
+
function ErrorCardOverlayStyle() {
|
|
9694
|
+
return /* @__PURE__ */ jsx32("style", { children: `
|
|
9695
|
+
.card-error-overlay .logo-container {
|
|
9696
|
+
display: flex;
|
|
9697
|
+
justify-content: center;
|
|
9698
|
+
align-items: center;
|
|
9699
|
+
margin-bottom: -50px; /* Adjust this to overlap the content */
|
|
9700
|
+
z-index: 10;
|
|
9701
|
+
}
|
|
9702
|
+
|
|
9703
|
+
.card-error-overlay .client-logo {
|
|
9704
|
+
max-width: 100px;
|
|
9705
|
+
height: auto;
|
|
9706
|
+
object-fit: contain;
|
|
9707
|
+
display: block;
|
|
9708
|
+
}
|
|
9709
|
+
|
|
9710
|
+
|
|
9711
|
+
.card-error-overlay .error-icon-overlay {
|
|
9712
|
+
display: flex;
|
|
9713
|
+
flex-direction: column;
|
|
9714
|
+
align-items: center;
|
|
9715
|
+
gap: 12px;
|
|
9716
|
+
min-height: 116px;
|
|
9717
|
+
z-index: 2;
|
|
9718
|
+
}
|
|
9719
|
+
|
|
9720
|
+
.card-error-overlay .circle {
|
|
9721
|
+
width: 50px;
|
|
9722
|
+
height: 50px;
|
|
9723
|
+
border: 1px solid red;
|
|
9724
|
+
border-radius: 50%;
|
|
9725
|
+
display: flex;
|
|
9726
|
+
justify-content: center;
|
|
9727
|
+
align-items: center;
|
|
9728
|
+
margin-bottom:20px
|
|
9729
|
+
}
|
|
9730
|
+
|
|
9731
|
+
.card-error-overlay .circle .fa-times {
|
|
9732
|
+
font-size: 30px;
|
|
9733
|
+
color: red;
|
|
9734
|
+
}
|
|
9735
|
+
|
|
9736
|
+
.card-error-overlay .error-text-overlay {
|
|
9737
|
+
display: flex;
|
|
9738
|
+
flex-direction: column;
|
|
9739
|
+
justify-content: center;
|
|
9740
|
+
align-items: center;
|
|
9741
|
+
gap: 4px;
|
|
9742
|
+
// width: 227px;
|
|
9743
|
+
}
|
|
9744
|
+
|
|
9745
|
+
.card-error-overlay .payment-error-text-overlay {
|
|
9746
|
+
font-family: 'Inter', sans-serif;
|
|
9747
|
+
font-weight: 500;
|
|
9748
|
+
font-size: 18px;
|
|
9749
|
+
line-height: 21px;
|
|
9750
|
+
text-align: center;
|
|
9751
|
+
letter-spacing: -0.02em;
|
|
9752
|
+
color: #161616;
|
|
9753
|
+
}
|
|
9754
|
+
|
|
9755
|
+
.card-error-overlay .thank-you-text-overlay {
|
|
9756
|
+
font-family: 'Inter', sans-serif;
|
|
9757
|
+
font-weight: 500;
|
|
9758
|
+
font-size: 16px;
|
|
9759
|
+
line-height: 18px;
|
|
9760
|
+
text-align: center;
|
|
9761
|
+
letter-spacing: -0.02em;
|
|
9762
|
+
color: #161616 !important;
|
|
9763
|
+
opacity: 0.5;
|
|
9764
|
+
padding-top:10px
|
|
9765
|
+
}
|
|
9766
|
+
|
|
9767
|
+
.card-error-overlay .error-btn-div-overlay{
|
|
9768
|
+
padding-top:20px;
|
|
9769
|
+
width: 100%;
|
|
9770
|
+
|
|
9771
|
+
}
|
|
9772
|
+
.card-error-overlay .error-btn-div-overlay button{
|
|
9773
|
+
outline: 0;
|
|
9774
|
+
height: 46px;
|
|
9775
|
+
font-size: 16px;
|
|
9776
|
+
background: #727272;
|
|
9777
|
+
border: none;
|
|
9778
|
+
display: block;
|
|
9779
|
+
color: #fff;
|
|
9780
|
+
width: 100%;
|
|
9781
|
+
border-radius: 180px;
|
|
9782
|
+
margin: 10px 0;
|
|
9783
|
+
text-decoration: none;
|
|
9784
|
+
}
|
|
9785
|
+
.card-error-overlay .error-btn-div-overlay button:hover, .card-error-overlay .error-btn-div-overlay button:focus {
|
|
9786
|
+
background: #222;
|
|
9787
|
+
color: #fff;
|
|
9788
|
+
cursor: pointer;
|
|
9789
|
+
}
|
|
9790
|
+
.payment-error-container-overlay {
|
|
9791
|
+
width: fit-content;
|
|
9792
|
+
position: relative;
|
|
9793
|
+
top: 50%;
|
|
9794
|
+
left: 50%;
|
|
9795
|
+
transform: translate(-50%, -50%);
|
|
9796
|
+
background: rgba(255, 255, 255, 0.15);
|
|
9797
|
+
backdrop-filter: blur(12px);
|
|
9798
|
+
-webkit-backdrop-filter: blur(12px);
|
|
9799
|
+
border-radius: 12px;
|
|
9800
|
+
z-index: 11111;
|
|
9801
|
+
max-width: 240px;
|
|
9802
|
+
min-width: 224px;
|
|
9803
|
+
padding: 20px;
|
|
9804
|
+
margin-left: 17px !important;
|
|
9805
|
+
}
|
|
9806
|
+
.card-error-overlay {
|
|
9807
|
+
position: absolute;
|
|
9808
|
+
top: 0;
|
|
9809
|
+
left: 0;
|
|
9810
|
+
width: 100%;
|
|
9811
|
+
height: 100%;
|
|
9812
|
+
background: rgb(87 87 87 / 15%);
|
|
9813
|
+
backdrop-filter: blur(2px);
|
|
9814
|
+
-webkit-backdrop-filter: blur(12px);
|
|
9815
|
+
z-index: 1111;
|
|
9816
|
+
}
|
|
9817
|
+
` });
|
|
9818
|
+
}
|
|
9819
|
+
|
|
9820
|
+
// src/app/components/ErrorCardMessage/ErrorCardOverlay.tsx
|
|
9821
|
+
import { Fragment as Fragment18, jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
9822
|
+
var ErrorCardOverlay = ({ onClose, error, autoTrigger = false }) => {
|
|
9823
|
+
return /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
9824
|
+
/* @__PURE__ */ jsx33(ErrorCardOverlayStyle, {}),
|
|
9825
|
+
/* @__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: [
|
|
9826
|
+
/* @__PURE__ */ jsx33("div", { className: "circle", children: /* @__PURE__ */ jsx33("i", { className: "fa fa-times", "aria-hidden": "true" }) }),
|
|
9827
|
+
/* @__PURE__ */ jsxs19("div", { className: "error-text-overlay", children: [
|
|
9828
|
+
/* @__PURE__ */ jsx33("div", { className: "payment-error-text-overlay", children: error }),
|
|
9829
|
+
/* @__PURE__ */ jsx33("div", { className: "thank-you-text-overlay", children: "Try again later " })
|
|
9830
|
+
] }),
|
|
9831
|
+
!autoTrigger && /* @__PURE__ */ jsx33("div", { className: "error-btn-div-overlay", children: /* @__PURE__ */ jsx33("button", { onClick: onClose, children: "OK" }) })
|
|
9832
|
+
] }) }) })
|
|
9833
|
+
] });
|
|
9834
|
+
};
|
|
9835
|
+
var ErrorCardOverlay_default = ErrorCardOverlay;
|
|
9836
|
+
|
|
9837
|
+
// src/app/components/Atoms/Googlepay/Googlepay.tsx
|
|
9838
|
+
import { useRef as useRef10 } from "react";
|
|
9839
|
+
|
|
9840
|
+
// src/app/components/Atoms/Googlepay/GooglePayScriptLoader.tsx
|
|
9841
|
+
import { useEffect as useEffect15 } from "react";
|
|
9842
|
+
var googlePayScriptLoaded = false;
|
|
9843
|
+
var GooglePayScriptLoader = ({
|
|
9844
|
+
onLoad
|
|
9845
|
+
}) => {
|
|
9846
|
+
useEffect15(() => {
|
|
9847
|
+
if (googlePayScriptLoaded) {
|
|
9848
|
+
onLoad == null ? void 0 : onLoad();
|
|
9849
|
+
return;
|
|
9850
|
+
}
|
|
9851
|
+
const existingScript = document.querySelector(
|
|
9852
|
+
`script[src="https://pay.google.com/gp/p/js/pay.js"]`
|
|
9853
|
+
);
|
|
9854
|
+
if (!existingScript) {
|
|
9855
|
+
const script2 = document.createElement("script");
|
|
9856
|
+
script2.src = "https://pay.google.com/gp/p/js/pay.js";
|
|
9857
|
+
script2.async = true;
|
|
9858
|
+
script2.onload = () => {
|
|
9859
|
+
console.log("\u2705 Google Pay script loaded");
|
|
9860
|
+
googlePayScriptLoaded = true;
|
|
9861
|
+
console.log("google:", window.google);
|
|
9862
|
+
onLoad == null ? void 0 : onLoad();
|
|
9863
|
+
};
|
|
9864
|
+
script2.onerror = (err) => {
|
|
9865
|
+
console.error("\u274C Google Pay script failed", err);
|
|
9866
|
+
};
|
|
9867
|
+
document.head.appendChild(script2);
|
|
9868
|
+
} else {
|
|
9869
|
+
googlePayScriptLoaded = true;
|
|
9870
|
+
onLoad == null ? void 0 : onLoad();
|
|
9871
|
+
}
|
|
9872
|
+
}, []);
|
|
9873
|
+
return null;
|
|
9874
|
+
};
|
|
9875
|
+
|
|
9876
|
+
// src/app/components/Atoms/Googlepay/Googlepay.tsx
|
|
9877
|
+
import { Fragment as Fragment19, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
9878
|
+
function GooglePayComponent({
|
|
9879
|
+
amount,
|
|
9880
|
+
googlePayEnvironment: googlePayEnvironment2,
|
|
9881
|
+
googlePayGatewayMerchantId: googlePayGatewayMerchantId2,
|
|
9882
|
+
googlePayMerchantId: googlePayMerchantId2,
|
|
9883
|
+
googlePayMerchantName,
|
|
9884
|
+
require3ds = false,
|
|
9885
|
+
completeFractalFlow,
|
|
9886
|
+
setLoading
|
|
9887
|
+
}) {
|
|
9888
|
+
const containerRef = useRef10(null);
|
|
9889
|
+
const paymentsClientRef = useRef10(null);
|
|
9890
|
+
const baseRequest = {
|
|
9891
|
+
apiVersion: 2,
|
|
9892
|
+
apiVersionMinor: 0
|
|
9599
9893
|
};
|
|
9600
|
-
const
|
|
9601
|
-
const
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
"padding": "0px",
|
|
9608
|
-
"appearance": "none",
|
|
9609
|
-
"outline": "none",
|
|
9610
|
-
"border": "none",
|
|
9611
|
-
"box-shadow": "none"
|
|
9612
|
-
},
|
|
9613
|
-
":focus": {
|
|
9614
|
-
"color": "#212529",
|
|
9615
|
-
"outline": "none",
|
|
9616
|
-
"border": "none"
|
|
9617
|
-
},
|
|
9618
|
-
"::placeholder": {
|
|
9619
|
-
"color": "#212529"
|
|
9894
|
+
const allowedCardNetworks = ["AMEX", "DISCOVER", "MASTERCARD", "VISA"];
|
|
9895
|
+
const allowedCardAuthMethods = require3ds ? ["CRYPTOGRAM_3DS"] : ["PAN_ONLY", "CRYPTOGRAM_3DS"];
|
|
9896
|
+
const baseCardPaymentMethod = {
|
|
9897
|
+
type: "CARD",
|
|
9898
|
+
parameters: {
|
|
9899
|
+
allowedAuthMethods: allowedCardAuthMethods,
|
|
9900
|
+
allowedCardNetworks
|
|
9620
9901
|
}
|
|
9621
9902
|
};
|
|
9622
|
-
const
|
|
9623
|
-
|
|
9903
|
+
const cardPaymentMethod = __spreadProps(__spreadValues({}, baseCardPaymentMethod), {
|
|
9904
|
+
tokenizationSpecification: {
|
|
9905
|
+
type: "PAYMENT_GATEWAY",
|
|
9906
|
+
parameters: {
|
|
9907
|
+
gateway: googlePayGatewayMerchantId2,
|
|
9908
|
+
gatewayMerchantId: googlePayGatewayMerchantId2
|
|
9909
|
+
}
|
|
9910
|
+
}
|
|
9911
|
+
});
|
|
9912
|
+
const handlePaymentAuthorization = async (paymentData) => {
|
|
9913
|
+
var _a, _b;
|
|
9624
9914
|
try {
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
}
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9915
|
+
const token = (_b = (_a = paymentData == null ? void 0 : paymentData.paymentMethodData) == null ? void 0 : _a.tokenizationData) == null ? void 0 : _b.token;
|
|
9916
|
+
if (!token) throw new Error("Missing token");
|
|
9917
|
+
const parsed = JSON.parse(token);
|
|
9918
|
+
console.log(parsed, "parsed token");
|
|
9919
|
+
setLoading(true);
|
|
9920
|
+
completeFractalFlow(parsed, null, "google_pay");
|
|
9921
|
+
return {
|
|
9922
|
+
transactionState: "SUCCESS"
|
|
9923
|
+
// ✅ CLOSES GOOGLE PAY POPUP
|
|
9924
|
+
};
|
|
9925
|
+
} catch (err) {
|
|
9926
|
+
console.error("Payment failed:", err);
|
|
9927
|
+
return {
|
|
9928
|
+
transactionState: "ERROR",
|
|
9929
|
+
// ❌ CLOSES WITH ERROR UI
|
|
9930
|
+
error: {
|
|
9931
|
+
intent: "PAYMENT_AUTHORIZATION",
|
|
9932
|
+
message: "Payment failed",
|
|
9933
|
+
reason: "PAYMENT_DATA_INVALID"
|
|
9640
9934
|
}
|
|
9641
|
-
}
|
|
9642
|
-
|
|
9643
|
-
|
|
9644
|
-
|
|
9935
|
+
};
|
|
9936
|
+
}
|
|
9937
|
+
};
|
|
9938
|
+
const getPaymentsClient = () => {
|
|
9939
|
+
if (!paymentsClientRef.current && typeof window !== "undefined") {
|
|
9940
|
+
const google = window.google;
|
|
9941
|
+
if (!google) return null;
|
|
9942
|
+
paymentsClientRef.current = new google.payments.api.PaymentsClient({
|
|
9943
|
+
environment: googlePayEnvironment2,
|
|
9944
|
+
// ✅ ADD THIS
|
|
9945
|
+
paymentDataCallbacks: {
|
|
9946
|
+
onPaymentAuthorized: handlePaymentAuthorization
|
|
9947
|
+
}
|
|
9948
|
+
});
|
|
9949
|
+
}
|
|
9950
|
+
return paymentsClientRef.current;
|
|
9951
|
+
};
|
|
9952
|
+
const getIsReadyToPayRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
|
|
9953
|
+
allowedPaymentMethods: [baseCardPaymentMethod]
|
|
9954
|
+
});
|
|
9955
|
+
const getTransactionInfo = () => ({
|
|
9956
|
+
countryCode: "US",
|
|
9957
|
+
currencyCode: "USD",
|
|
9958
|
+
totalPriceStatus: "FINAL",
|
|
9959
|
+
totalPrice: amount,
|
|
9960
|
+
checkoutOption: "COMPLETE_IMMEDIATE_PURCHASE"
|
|
9961
|
+
});
|
|
9962
|
+
const getPaymentDataRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
|
|
9963
|
+
allowedPaymentMethods: [cardPaymentMethod],
|
|
9964
|
+
transactionInfo: getTransactionInfo(),
|
|
9965
|
+
merchantInfo: {
|
|
9966
|
+
merchantId: googlePayMerchantId2,
|
|
9967
|
+
merchantName: googlePayMerchantName
|
|
9968
|
+
},
|
|
9969
|
+
// ✅ ADD THIS
|
|
9970
|
+
callbackIntents: ["PAYMENT_AUTHORIZATION"]
|
|
9971
|
+
});
|
|
9972
|
+
const initializeGooglePay = async () => {
|
|
9973
|
+
try {
|
|
9974
|
+
const client = getPaymentsClient();
|
|
9975
|
+
if (!client) {
|
|
9976
|
+
console.error("Google Pay client not ready");
|
|
9977
|
+
return;
|
|
9978
|
+
}
|
|
9979
|
+
const response = await client.isReadyToPay(
|
|
9980
|
+
getIsReadyToPayRequest()
|
|
9981
|
+
);
|
|
9982
|
+
if (response.result && containerRef.current) {
|
|
9983
|
+
const button = client.createButton({
|
|
9984
|
+
onClick: onGooglePayClick,
|
|
9985
|
+
allowedPaymentMethods: [baseCardPaymentMethod],
|
|
9986
|
+
buttonType: "pay",
|
|
9987
|
+
buttonColor: "black",
|
|
9988
|
+
buttonRadius: 8
|
|
9989
|
+
});
|
|
9990
|
+
if (containerRef.current) {
|
|
9991
|
+
containerRef.current.innerHTML = "";
|
|
9992
|
+
}
|
|
9993
|
+
containerRef.current.appendChild(button);
|
|
9994
|
+
}
|
|
9995
|
+
} catch (err) {
|
|
9996
|
+
console.error("Google Pay init error:", err);
|
|
9997
|
+
}
|
|
9998
|
+
};
|
|
9999
|
+
const onGooglePayClick = async () => {
|
|
10000
|
+
const client = getPaymentsClient();
|
|
10001
|
+
if (!client) {
|
|
10002
|
+
console.error("Google Pay client not ready");
|
|
10003
|
+
return;
|
|
10004
|
+
}
|
|
10005
|
+
try {
|
|
10006
|
+
await client.loadPaymentData(getPaymentDataRequest());
|
|
10007
|
+
} catch (err) {
|
|
10008
|
+
if ((err == null ? void 0 : err.statusCode) !== "CANCELED") {
|
|
10009
|
+
console.error(err);
|
|
10010
|
+
}
|
|
10011
|
+
}
|
|
10012
|
+
};
|
|
10013
|
+
const onScriptLoad = () => {
|
|
10014
|
+
if (!googlePayEnvironment2 || !googlePayGatewayMerchantId2 || !amount || !googlePayMerchantId2) {
|
|
10015
|
+
console.error("Missing Google Pay config");
|
|
10016
|
+
return;
|
|
10017
|
+
}
|
|
10018
|
+
setTimeout(() => {
|
|
10019
|
+
initializeGooglePay();
|
|
10020
|
+
}, 0);
|
|
10021
|
+
};
|
|
10022
|
+
return /* @__PURE__ */ jsxs20(Fragment19, { children: [
|
|
10023
|
+
/* @__PURE__ */ jsx34("div", { ref: containerRef, className: "text-center" }),
|
|
10024
|
+
/* @__PURE__ */ jsx34(GooglePayScriptLoader, { onLoad: onScriptLoad })
|
|
10025
|
+
] });
|
|
10026
|
+
}
|
|
10027
|
+
|
|
10028
|
+
// src/app/components/Atoms/Applepay/ApplePayButton.tsx
|
|
10029
|
+
import { useEffect as useEffect17, useRef as useRef11 } from "react";
|
|
10030
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
10031
|
+
function ApplePayButton({
|
|
10032
|
+
applePayMerchantId: applePayMerchantId2,
|
|
10033
|
+
applePayAmount,
|
|
10034
|
+
applePayMerchantName,
|
|
10035
|
+
showLoader,
|
|
10036
|
+
completeFractalFlow
|
|
10037
|
+
}) {
|
|
10038
|
+
const applePayRef = useRef11(null);
|
|
10039
|
+
const paymentRequestMethods = [
|
|
10040
|
+
{
|
|
10041
|
+
supportedMethods: "https://apple.com/apple-pay",
|
|
10042
|
+
data: {
|
|
10043
|
+
version: 3,
|
|
10044
|
+
merchantIdentifier: applePayMerchantId2,
|
|
10045
|
+
// ✅ FIXED
|
|
10046
|
+
merchantCapabilities: ["supports3DS"],
|
|
10047
|
+
supportedNetworks: ["amex", "discover", "mastercard", "visa"],
|
|
10048
|
+
// ✅ FIXED
|
|
10049
|
+
countryCode: "US"
|
|
10050
|
+
}
|
|
10051
|
+
}
|
|
10052
|
+
];
|
|
10053
|
+
const paymentRequestOptions = {
|
|
10054
|
+
requestPayerName: false,
|
|
10055
|
+
requestPayerEmail: false,
|
|
10056
|
+
requestPayerPhone: false,
|
|
10057
|
+
requestShipping: false
|
|
10058
|
+
};
|
|
10059
|
+
function buildPaymentDetails() {
|
|
10060
|
+
return {
|
|
10061
|
+
total: {
|
|
10062
|
+
label: applePayMerchantName,
|
|
10063
|
+
amount: {
|
|
10064
|
+
currency: "USD",
|
|
10065
|
+
value: applePayAmount
|
|
10066
|
+
}
|
|
10067
|
+
}
|
|
10068
|
+
};
|
|
10069
|
+
}
|
|
10070
|
+
async function validateMerchant(event) {
|
|
10071
|
+
var _a;
|
|
10072
|
+
console.log("\u{1F7E1} STEP 1: Merchant validation started");
|
|
10073
|
+
try {
|
|
10074
|
+
console.log("Validation URL:", event.validationURL);
|
|
10075
|
+
console.log("Domain:", window.location.hostname);
|
|
10076
|
+
const res = await fetch(
|
|
10077
|
+
`${masterBaseUrl}api/v1/widget/generate-apple-pay-session`,
|
|
10078
|
+
{
|
|
10079
|
+
method: "POST",
|
|
10080
|
+
headers: {
|
|
10081
|
+
"Content-Type": "application/json"
|
|
10082
|
+
},
|
|
10083
|
+
body: JSON.stringify({
|
|
10084
|
+
validationUrl: event.validationURL,
|
|
10085
|
+
applePayMerchantId: applePayMerchantId2,
|
|
10086
|
+
applepayDisplayName: applePayMerchantName,
|
|
10087
|
+
requestDomain: window.location.hostname
|
|
10088
|
+
// ✅ IMPORTANT
|
|
10089
|
+
})
|
|
10090
|
+
}
|
|
10091
|
+
);
|
|
10092
|
+
console.log("\u{1F7E1} STEP 2: Response status:", res.status);
|
|
10093
|
+
const data = await res.json();
|
|
10094
|
+
console.log("RAW session response:", JSON.stringify(data));
|
|
10095
|
+
console.log("\u{1F7E2} STEP 3: Session response: data fetched");
|
|
10096
|
+
const merchantSession = (_a = data == null ? void 0 : data.data) != null ? _a : data;
|
|
10097
|
+
if (!merchantSession || typeof merchantSession !== "object") {
|
|
10098
|
+
console.error("\u274C Bad session shape");
|
|
10099
|
+
event.complete(null);
|
|
10100
|
+
return;
|
|
10101
|
+
}
|
|
10102
|
+
console.log("\u{1F7E2} STEP 4.1: Completing merchant validation");
|
|
10103
|
+
event.complete(merchantSession);
|
|
10104
|
+
console.log("\u{1F7E2} STEP 4.2: Completed merchant validation");
|
|
10105
|
+
} catch (err) {
|
|
10106
|
+
console.log("\u274C Merchant validation failed:", err == null ? void 0 : err.message);
|
|
10107
|
+
event.complete(null);
|
|
10108
|
+
}
|
|
10109
|
+
}
|
|
10110
|
+
async function authorizePayment(paymentResponse) {
|
|
10111
|
+
console.log("\u{1F7E1} STEP 5: Authorizing payment");
|
|
10112
|
+
try {
|
|
10113
|
+
const token = paymentResponse.details.token.paymentData;
|
|
10114
|
+
console.log("\u{1F7E2} STEP 6: Got token");
|
|
10115
|
+
await completeFractalFlow(token, null, "apple_pay");
|
|
10116
|
+
await paymentResponse.complete("success");
|
|
10117
|
+
console.log("\u2705 Payment completed successfully");
|
|
10118
|
+
} catch (err) {
|
|
10119
|
+
console.log("\u274C Authorization failed:", err == null ? void 0 : err.message);
|
|
10120
|
+
await paymentResponse.complete("fail");
|
|
10121
|
+
}
|
|
10122
|
+
}
|
|
10123
|
+
async function handleApplePayClick() {
|
|
10124
|
+
console.log("\u{1F7E1} STEP A: Click detected");
|
|
10125
|
+
try {
|
|
10126
|
+
const request = new PaymentRequest(
|
|
10127
|
+
paymentRequestMethods,
|
|
10128
|
+
buildPaymentDetails(),
|
|
10129
|
+
paymentRequestOptions
|
|
10130
|
+
);
|
|
10131
|
+
request.onmerchantvalidation = validateMerchant;
|
|
10132
|
+
console.log("\u{1F7E1} STEP B: Calling show()");
|
|
10133
|
+
const response = await request.show();
|
|
10134
|
+
console.log("\u{1F7E2} STEP C: Payment sheet opened");
|
|
10135
|
+
await authorizePayment(response);
|
|
10136
|
+
} catch (err) {
|
|
10137
|
+
console.log("\u274C Apple Pay flow failed:", err == null ? void 0 : err.message);
|
|
10138
|
+
}
|
|
10139
|
+
}
|
|
10140
|
+
useEffect17(() => {
|
|
10141
|
+
if (window.ApplePaySession && window.ApplePaySession.canMakePayments()) {
|
|
10142
|
+
console.log("\u2705 Apple Pay is available");
|
|
10143
|
+
} else {
|
|
10144
|
+
console.log("\u274C Apple Pay NOT available");
|
|
10145
|
+
}
|
|
10146
|
+
}, []);
|
|
10147
|
+
useEffect17(() => {
|
|
10148
|
+
const btn = applePayRef.current;
|
|
10149
|
+
if (!btn) return;
|
|
10150
|
+
const handleClick = () => handleApplePayClick();
|
|
10151
|
+
btn.addEventListener("click", handleClick);
|
|
10152
|
+
return () => btn.removeEventListener("click", handleClick);
|
|
10153
|
+
}, [applePayMerchantId2, applePayAmount, applePayMerchantName]);
|
|
10154
|
+
return /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
|
|
10155
|
+
"apple-pay-button",
|
|
10156
|
+
{
|
|
10157
|
+
ref: applePayRef,
|
|
10158
|
+
buttonstyle: "black",
|
|
10159
|
+
type: "pay",
|
|
10160
|
+
locale: "en-US",
|
|
10161
|
+
style: { width: "100%" }
|
|
10162
|
+
}
|
|
10163
|
+
) });
|
|
10164
|
+
}
|
|
10165
|
+
|
|
10166
|
+
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
10167
|
+
import { Fragment as Fragment20, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
10168
|
+
var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_token, customerId, callback, merchantName = "merchant", isPreAuth, surcharge = "0", submitBtnClass, submitBtnIcon, isRequest, pass_fee, pass_fee_amount, require3ds = false, autoTrigger = false, show, setShow, setHandleCloseRef, isPartial, bankSurcharge, partialRef, loadingPrev = false, orderGuid: ordGuid, remainingAmount: remAmount, onSubmit, onLoad = true, customCSS: customCSS2 }) => {
|
|
10169
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
10170
|
+
const hasRunRef = useRef12(false);
|
|
10171
|
+
const cardFormRef = useRef12(null);
|
|
10172
|
+
const bankFormRef = useRef12(null);
|
|
10173
|
+
const expiryYearRef = useRef12(null);
|
|
10174
|
+
const expiryMonthRef = useRef12(null);
|
|
10175
|
+
const cardListRunRef = useRef12(false);
|
|
10176
|
+
const threeDSContainerRef = useRef12(null);
|
|
10177
|
+
const [activetab, setActive] = useState11("card");
|
|
10178
|
+
const [activeList, setActiveList] = useState11("card");
|
|
10179
|
+
const [cardData, setCardData] = useState11();
|
|
10180
|
+
const [cardError, setCardError] = useState11({});
|
|
10181
|
+
const [achData, setAchData] = useState11();
|
|
10182
|
+
const [achError, setAchError] = useState11({});
|
|
10183
|
+
const [saveACHinfo, setSaveACHinfo] = useState11(false);
|
|
10184
|
+
const [saveCardInfo, setSaveCardInfo] = useState11(false);
|
|
10185
|
+
const [error, setError] = useState11("");
|
|
10186
|
+
const [errorIframe, setErrorIframe] = useState11("");
|
|
10187
|
+
const [success, setSuccess] = useState11(false);
|
|
10188
|
+
let [tranId, setTranId] = useState11("");
|
|
10189
|
+
const [loading, setLoading] = useState11(false);
|
|
10190
|
+
const [loading2, setLoading2] = useState11(false);
|
|
10191
|
+
const [loadingIframe, setLoadingIframe] = useState11(false);
|
|
10192
|
+
const [cardList, setCardList] = useState11([]);
|
|
10193
|
+
const [bankList, setBankList] = useState11([]);
|
|
10194
|
+
const [selectedCard, setSelectedCard] = useState11();
|
|
10195
|
+
const [cashDiscount, setCashDiscount] = useState11(Number(amount));
|
|
10196
|
+
const [activeinCard, setActiveinCard] = useState11("form");
|
|
10197
|
+
const [activeinBank, setActiveinBank] = useState11("form");
|
|
10198
|
+
const [isBankActive, setIsBankActive] = useState11(false);
|
|
10199
|
+
const [processingFee, setProcessingFee] = useState11(0);
|
|
10200
|
+
const [clientSecret, setClientSecret] = useState11("");
|
|
10201
|
+
const [errorMessage, setErrorMessage] = useState11(null);
|
|
10202
|
+
const [initialLoader, setInitialLoader] = useState11(false);
|
|
10203
|
+
const [is3DSEnable, setIs3DSEnable] = useState11(false);
|
|
10204
|
+
const [stripeResponse, setStripeResponse] = useState11(null);
|
|
10205
|
+
const [orderLoader, setOrderLoader] = useState11(false);
|
|
10206
|
+
const [orderGuid, setOrderGuid] = useState11(ordGuid || null);
|
|
10207
|
+
const [partialAmount, setPartialAmount] = useState11("");
|
|
10208
|
+
const [partialError, setPartialError] = useState11("");
|
|
10209
|
+
const [remainingAmount, setRemainingAmount] = useState11("");
|
|
10210
|
+
const [paymentGateway, setPaymentGateway] = useState11();
|
|
10211
|
+
const [dcToken, setDCToken] = useState11();
|
|
10212
|
+
const [isBankConsentChecked, setIsBankConsentChecked] = useState11(false);
|
|
10213
|
+
const [errorBankConsent, setErrorBankConsent] = useState11("");
|
|
10214
|
+
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
10215
|
+
let visa2 = S3Url + "widget/visa-img.svg";
|
|
10216
|
+
let americanexp2 = S3Url + "widget/ae-img.svg";
|
|
10217
|
+
let discover2 = S3Url + "widget/discover-img.svg";
|
|
10218
|
+
let defaultcard2 = S3Url + "widget/card.svg";
|
|
10219
|
+
let trash2 = S3Url + "widget/Trash.svg";
|
|
10220
|
+
let bank2 = S3Url + "widget/bank.svg";
|
|
10221
|
+
let secure2 = S3Url + "widget/secure-img.png";
|
|
10222
|
+
let pov2 = S3Url + "widget/pov-by.png";
|
|
10223
|
+
let pax2 = S3Url + "widget/pax.svg";
|
|
10224
|
+
let cardicon = S3Url + "widget/cardicon.svg";
|
|
10225
|
+
let bankicon = S3Url + "widget/bankicon.svg";
|
|
10226
|
+
let defualtcardborder = S3Url + "widget/defualtcardborder.svg";
|
|
10227
|
+
let unionicon = S3Url + "widget/unionpay.svg";
|
|
10228
|
+
let dinersicon = S3Url + "widget/diners.svg";
|
|
10229
|
+
let jcbicon = S3Url + "widget/jcb.svg";
|
|
10230
|
+
const showLoader = () => setLoading(true);
|
|
10231
|
+
const hideLoader = () => setLoading(false);
|
|
10232
|
+
const CalculateCashDiscount = (amount2, surcharge2) => {
|
|
10233
|
+
const surchargeVal = (parseFloat(surcharge2) || 0) / 100;
|
|
10234
|
+
const originalAmount = amount2 / (1 + surchargeVal);
|
|
10235
|
+
return Math.round(originalAmount * 100) / 100;
|
|
10236
|
+
};
|
|
10237
|
+
const cardFeeAmount = Number(pass_fee_amount || 0);
|
|
10238
|
+
const bankFeeAmount = Number(bankSurcharge || 0);
|
|
10239
|
+
const bankSavingsAmount = Math.max(bankFeeAmount > 0 ? cardFeeAmount - bankFeeAmount : cardFeeAmount, 0);
|
|
10240
|
+
const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
|
|
10241
|
+
const tokenizerRef = useRef12(null);
|
|
10242
|
+
const fractalStyles = {
|
|
10243
|
+
input: {
|
|
10244
|
+
"font-family": "'Inter', sans-serif",
|
|
10245
|
+
"font-size": "16px",
|
|
10246
|
+
"color": "#212529",
|
|
10247
|
+
"background-color": "transparent",
|
|
10248
|
+
"padding": "0px",
|
|
10249
|
+
"appearance": "none",
|
|
10250
|
+
"outline": "none",
|
|
10251
|
+
"border": "none",
|
|
10252
|
+
"box-shadow": "none"
|
|
10253
|
+
},
|
|
10254
|
+
":focus": {
|
|
10255
|
+
"color": "#212529",
|
|
10256
|
+
"outline": "none",
|
|
10257
|
+
"border": "none"
|
|
10258
|
+
},
|
|
10259
|
+
"::placeholder": {
|
|
10260
|
+
"color": "#212529"
|
|
10261
|
+
}
|
|
10262
|
+
};
|
|
10263
|
+
const handleCharge = async (data) => {
|
|
10264
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
10265
|
+
try {
|
|
10266
|
+
let dataObj = __spreadValues(__spreadValues({
|
|
10267
|
+
pass_fee_amount: Number(amount) - cashDiscount,
|
|
10268
|
+
pass_fee,
|
|
10269
|
+
Token: data == null ? void 0 : data.Token,
|
|
10270
|
+
amount: partialAmount ? partialAmount : amount,
|
|
10271
|
+
postal_code: data == null ? void 0 : data.postalCode,
|
|
10272
|
+
require3ds,
|
|
10273
|
+
isPartial,
|
|
10274
|
+
orderGuid: orderGuid || ordGuid
|
|
10275
|
+
}, saveCardInfo ? {
|
|
10276
|
+
card: {
|
|
10277
|
+
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
10278
|
+
customer_id: customerId,
|
|
10279
|
+
gateway_token: (data == null ? void 0 : data.Token) || (data == null ? void 0 : data.gateway_token),
|
|
10280
|
+
name: cardData == null ? void 0 : cardData.cardName
|
|
10281
|
+
}
|
|
10282
|
+
} : null), (data == null ? void 0 : data.typeoftoken) ? {
|
|
10283
|
+
typeoftoken: data == null ? void 0 : data.typeoftoken
|
|
10284
|
+
} : null);
|
|
10285
|
+
if (require3ds && (data == null ? void 0 : data.stripe_3ds_auth_id)) {
|
|
10286
|
+
dataObj.stripe_3ds_auth_id = data == null ? void 0 : data.stripe_3ds_auth_id;
|
|
10287
|
+
}
|
|
9645
10288
|
const chargeResponse = await axios9.post(`${masterBaseUrl}api/v1/gateway/charge/${session_token}`, dataObj);
|
|
9646
10289
|
if ((_a2 = chargeResponse == null ? void 0 : chargeResponse.data) == null ? void 0 : _a2.result) {
|
|
9647
10290
|
let callbackdata = {
|
|
@@ -9767,14 +10410,23 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9767
10410
|
setAchError(errors);
|
|
9768
10411
|
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
9769
10412
|
};
|
|
9770
|
-
const completeFractalFlow = async (tokenizeData, intentid) => {
|
|
10413
|
+
const completeFractalFlow = async (tokenizeData, intentid, typeoftoken) => {
|
|
9771
10414
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
9772
10415
|
try {
|
|
10416
|
+
if (typeoftoken == "google_pay" || typeoftoken == "apple_pay") {
|
|
10417
|
+
handleCharge({
|
|
10418
|
+
Token: tokenizeData,
|
|
10419
|
+
postalCode: cardData == null ? void 0 : cardData.zipCode,
|
|
10420
|
+
typeoftoken
|
|
10421
|
+
});
|
|
10422
|
+
return;
|
|
10423
|
+
}
|
|
9773
10424
|
let token = tokenizeData;
|
|
9774
10425
|
let verifyandsaveresp = await axios9.post(`${masterBaseUrl}api/v1/gateway/verify-and-save/${session_token}`, {
|
|
9775
10426
|
token,
|
|
9776
10427
|
require3ds,
|
|
9777
|
-
pass_fee
|
|
10428
|
+
pass_fee,
|
|
10429
|
+
typeoftoken
|
|
9778
10430
|
});
|
|
9779
10431
|
if ((verifyandsaveresp == null ? void 0 : verifyandsaveresp.status) == 200) {
|
|
9780
10432
|
let responsetemp = (_a2 = verifyandsaveresp == null ? void 0 : verifyandsaveresp.data) == null ? void 0 : _a2.data;
|
|
@@ -9806,7 +10458,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9806
10458
|
}
|
|
9807
10459
|
};
|
|
9808
10460
|
const handleFractalTokenFlow = async () => {
|
|
9809
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2,
|
|
10461
|
+
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;
|
|
9810
10462
|
try {
|
|
9811
10463
|
const requestOptions = {
|
|
9812
10464
|
method: "POST",
|
|
@@ -9847,17 +10499,29 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9847
10499
|
three_ds_data
|
|
9848
10500
|
);
|
|
9849
10501
|
} catch (error2) {
|
|
9850
|
-
|
|
10502
|
+
console.log(error2, "error in tokenization");
|
|
10503
|
+
let readableMessage = "Something went wrong!";
|
|
10504
|
+
try {
|
|
10505
|
+
const rawError = ((_n2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _n2.data) || (error2 == null ? void 0 : error2.message) || "";
|
|
10506
|
+
const errorText = typeof rawError === "string" ? rawError : JSON.stringify(rawError);
|
|
10507
|
+
const lines = ((_p2 = (_o2 = errorText.split) == null ? void 0 : _o2.call(errorText, "\n")) == null ? void 0 : _p2.filter(Boolean)) || [];
|
|
10508
|
+
const lastLine = lines.at(-1) || "";
|
|
10509
|
+
const parts = (_q2 = lastLine.split) == null ? void 0 : _q2.call(lastLine, ": ");
|
|
10510
|
+
readableMessage = (parts == null ? void 0 : parts.length) > 1 ? parts.pop().trim() : lastLine.trim() || readableMessage;
|
|
10511
|
+
} catch (e) {
|
|
10512
|
+
readableMessage = "Something went wrong!";
|
|
10513
|
+
}
|
|
10514
|
+
setErrorIframe(readableMessage);
|
|
9851
10515
|
hideLoader();
|
|
9852
10516
|
}
|
|
9853
10517
|
if (tokenizeData == null ? void 0 : tokenizeData.token) {
|
|
9854
10518
|
let ThreedsData = tokenizeData == null ? void 0 : tokenizeData.stripe_three_ds_response;
|
|
9855
|
-
if (require3ds && !ThreedsData && (ThreedsData == null ? void 0 : ThreedsData.status) === "200 OK" && ((
|
|
10519
|
+
if (require3ds && !ThreedsData && (ThreedsData == null ? void 0 : ThreedsData.status) === "200 OK" && ((_r2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _r2.challenge_url)) {
|
|
9856
10520
|
setError("Something went wrong. Please try again later.");
|
|
9857
10521
|
}
|
|
9858
10522
|
if (require3ds) {
|
|
9859
|
-
if (!((
|
|
9860
|
-
completeFractalFlow(tokenizeData == null ? void 0 : tokenizeData.token, (
|
|
10523
|
+
if (!((_s2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _s2.challenge_url)) {
|
|
10524
|
+
completeFractalFlow(tokenizeData == null ? void 0 : tokenizeData.token, (_t2 = ThreedsData == null ? void 0 : ThreedsData.data) == null ? void 0 : _t2.id);
|
|
9861
10525
|
} else {
|
|
9862
10526
|
hideLoader();
|
|
9863
10527
|
setStripeResponse(__spreadProps(__spreadValues({}, ThreedsData == null ? void 0 : ThreedsData.data), {
|
|
@@ -9873,11 +10537,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9873
10537
|
console.log(error2, "error");
|
|
9874
10538
|
let readableMessage = "Something went wrong!";
|
|
9875
10539
|
try {
|
|
9876
|
-
const rawError = ((
|
|
10540
|
+
const rawError = ((_u2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _u2.data) || (error2 == null ? void 0 : error2.message) || "";
|
|
9877
10541
|
const errorText = typeof rawError === "string" ? rawError : JSON.stringify(rawError);
|
|
9878
|
-
const lines = ((
|
|
10542
|
+
const lines = ((_w = (_v = errorText.split) == null ? void 0 : _v.call(errorText, "\n")) == null ? void 0 : _w.filter(Boolean)) || [];
|
|
9879
10543
|
const lastLine = lines.at(-1) || "";
|
|
9880
|
-
const parts = (
|
|
10544
|
+
const parts = (_x = lastLine.split) == null ? void 0 : _x.call(lastLine, ": ");
|
|
9881
10545
|
readableMessage = (parts == null ? void 0 : parts.length) > 1 ? parts.pop().trim() : lastLine.trim() || readableMessage;
|
|
9882
10546
|
} catch (e) {
|
|
9883
10547
|
readableMessage = "Something went wrong!";
|
|
@@ -9885,8 +10549,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9885
10549
|
setError(readableMessage);
|
|
9886
10550
|
callback({
|
|
9887
10551
|
error: readableMessage,
|
|
9888
|
-
result: (
|
|
9889
|
-
statusCode: (
|
|
10552
|
+
result: (_z = (_y = error2 == null ? void 0 : error2.response) == null ? void 0 : _y.data) == null ? void 0 : _z.result,
|
|
10553
|
+
statusCode: (_A = error2 == null ? void 0 : error2.response) == null ? void 0 : _A.status
|
|
9890
10554
|
});
|
|
9891
10555
|
}
|
|
9892
10556
|
};
|
|
@@ -9912,6 +10576,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9912
10576
|
};
|
|
9913
10577
|
const submitFunc = async (e) => {
|
|
9914
10578
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
|
|
10579
|
+
debugger;
|
|
9915
10580
|
e.preventDefault();
|
|
9916
10581
|
const el = document.activeElement;
|
|
9917
10582
|
if (el instanceof HTMLElement) {
|
|
@@ -10303,8 +10968,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10303
10968
|
});
|
|
10304
10969
|
};
|
|
10305
10970
|
const handlechargeCustomer = async (e) => {
|
|
10306
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2
|
|
10307
|
-
e.currentTarget.blur();
|
|
10971
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
10972
|
+
e == null ? void 0 : e.currentTarget.blur();
|
|
10308
10973
|
if (loading) return;
|
|
10309
10974
|
let customer_id = customerId;
|
|
10310
10975
|
let card_id = selectedCard == null ? void 0 : selectedCard.id;
|
|
@@ -10351,7 +11016,6 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10351
11016
|
statusCode: (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.status
|
|
10352
11017
|
});
|
|
10353
11018
|
hideLoader();
|
|
10354
|
-
setError(((_i2 = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.message) || "Something went wrong!");
|
|
10355
11019
|
}
|
|
10356
11020
|
} else {
|
|
10357
11021
|
setError("Please Select A Card/Bank");
|
|
@@ -10427,21 +11091,21 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10427
11091
|
setOrderLoader(false);
|
|
10428
11092
|
}
|
|
10429
11093
|
};
|
|
10430
|
-
|
|
11094
|
+
useEffect18(() => {
|
|
10431
11095
|
if (!show && !autoTrigger) {
|
|
10432
11096
|
hasRunRef.current = false;
|
|
10433
11097
|
cardListRunRef.current = false;
|
|
10434
11098
|
}
|
|
10435
11099
|
}, [show, autoTrigger]);
|
|
10436
|
-
|
|
10437
|
-
if (!hasRunRef.current && (show || autoTrigger)) {
|
|
11100
|
+
useEffect18(() => {
|
|
11101
|
+
if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
|
|
10438
11102
|
getPaymentDetails();
|
|
10439
11103
|
if (isPartial && !partialRef) {
|
|
10440
11104
|
crateOrderFrac();
|
|
10441
11105
|
}
|
|
10442
11106
|
}
|
|
10443
|
-
}, [show, autoTrigger, isPartial]);
|
|
10444
|
-
|
|
11107
|
+
}, [show, autoTrigger, isPartial, onLoad]);
|
|
11108
|
+
useEffect18(() => {
|
|
10445
11109
|
if ((show || autoTrigger) && pass_fee_amount) {
|
|
10446
11110
|
let cashdisc = Number(amount) - Number(pass_fee_amount);
|
|
10447
11111
|
if (cashdisc && !isNaN(cashdisc)) {
|
|
@@ -10503,7 +11167,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10503
11167
|
console.error("3DS Auth failed \u274C", status);
|
|
10504
11168
|
setError(`3DS Authentication ${status}`);
|
|
10505
11169
|
};
|
|
10506
|
-
|
|
11170
|
+
useEffect18(() => {
|
|
10507
11171
|
if (setHandleCloseRef) {
|
|
10508
11172
|
setHandleCloseRef(() => handleClose);
|
|
10509
11173
|
}
|
|
@@ -10521,24 +11185,95 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10521
11185
|
setPartialError("");
|
|
10522
11186
|
}
|
|
10523
11187
|
};
|
|
10524
|
-
|
|
11188
|
+
useEffect18(() => {
|
|
10525
11189
|
if (typeof FractalTokenizer === "undefined") return;
|
|
10526
11190
|
const tokenizer = new FractalTokenizer({
|
|
10527
11191
|
styles: {}
|
|
10528
11192
|
});
|
|
10529
11193
|
}, []);
|
|
10530
|
-
|
|
10531
|
-
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
|
|
11194
|
+
const stateRef = useRef12({
|
|
11195
|
+
activeinBank,
|
|
11196
|
+
activeinCard,
|
|
11197
|
+
activetab
|
|
11198
|
+
});
|
|
11199
|
+
useEffect18(() => {
|
|
11200
|
+
stateRef.current = {
|
|
11201
|
+
activeinBank,
|
|
11202
|
+
activeinCard,
|
|
11203
|
+
activetab
|
|
11204
|
+
};
|
|
11205
|
+
}, [activeinBank, activeinCard, activetab]);
|
|
11206
|
+
const submit = useCallback(() => {
|
|
11207
|
+
var _a2, _b2;
|
|
11208
|
+
const { activeinBank: activeinBank2, activeinCard: activeinCard2, activetab: activetab2 } = stateRef.current;
|
|
11209
|
+
if (activetab2 === "card") {
|
|
11210
|
+
if (activeinCard2 === "form") {
|
|
11211
|
+
(_a2 = cardFormRef.current) == null ? void 0 : _a2.requestSubmit();
|
|
11212
|
+
} else if (activeinCard2 === "list") {
|
|
11213
|
+
handlechargeCustomer();
|
|
11214
|
+
}
|
|
11215
|
+
} else if (activetab2 === "ach") {
|
|
11216
|
+
if (activeinBank2 === "form") {
|
|
11217
|
+
(_b2 = bankFormRef.current) == null ? void 0 : _b2.requestSubmit();
|
|
11218
|
+
} else if (activeinBank2 === "list") {
|
|
11219
|
+
handlechargeCustomer();
|
|
11220
|
+
}
|
|
11221
|
+
}
|
|
11222
|
+
}, []);
|
|
11223
|
+
useEffect18(() => {
|
|
11224
|
+
onSubmit == null ? void 0 : onSubmit(submit);
|
|
11225
|
+
}, [onSubmit, submit]);
|
|
11226
|
+
function detectCardType(cardinput) {
|
|
11227
|
+
if (!cardinput) return null;
|
|
11228
|
+
const number = cardinput.replace(/\D/g, "");
|
|
11229
|
+
const patterns = {
|
|
11230
|
+
visa: /^4/,
|
|
11231
|
+
mastercard: /^(5[1-5]|2[2-7][0-9]{2})/,
|
|
11232
|
+
amex: /^3[47]/,
|
|
11233
|
+
discover: /^(6011|65|64[4-9])/,
|
|
11234
|
+
diners: /^(30[0-5]|36|38)/,
|
|
11235
|
+
jcb: /^(35[2-8][0-9])/,
|
|
11236
|
+
unionpay: /^62/
|
|
11237
|
+
};
|
|
11238
|
+
for (const [type, regex] of Object.entries(patterns)) {
|
|
11239
|
+
if (regex.test(number)) {
|
|
11240
|
+
return type;
|
|
11241
|
+
}
|
|
11242
|
+
}
|
|
11243
|
+
return "unknown";
|
|
11244
|
+
}
|
|
11245
|
+
function getCardImage(cardInput) {
|
|
11246
|
+
const cardType = detectCardType(cardInput);
|
|
11247
|
+
switch (cardType) {
|
|
11248
|
+
case "visa":
|
|
11249
|
+
return /* @__PURE__ */ jsx36("img", { src: visa2, alt: "visa", width: 33 });
|
|
11250
|
+
case "mastercard":
|
|
11251
|
+
return /* @__PURE__ */ jsx36("img", { src: mastercard2, width: 33, alt: "mastercard" });
|
|
11252
|
+
case "amex":
|
|
11253
|
+
return /* @__PURE__ */ jsx36("img", { src: americanexp2, alt: "amex", width: 33 });
|
|
11254
|
+
case "discover":
|
|
11255
|
+
return /* @__PURE__ */ jsx36("img", { src: discover2, width: 33, alt: "discover" });
|
|
11256
|
+
case "diners":
|
|
11257
|
+
return /* @__PURE__ */ jsx36("img", { src: dinersicon, alt: "Diners Club" });
|
|
11258
|
+
case "jcb":
|
|
11259
|
+
return /* @__PURE__ */ jsx36("img", { src: jcbicon, alt: "JCB" });
|
|
11260
|
+
case "unionpay":
|
|
11261
|
+
return /* @__PURE__ */ jsx36("img", { src: unionicon, alt: "UnionPay" });
|
|
11262
|
+
default:
|
|
11263
|
+
return /* @__PURE__ */ jsx36("img", { src: defualtcardborder, alt: "card" });
|
|
11264
|
+
}
|
|
11265
|
+
}
|
|
11266
|
+
return /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11267
|
+
(initialLoader || !onLoad) && /* @__PURE__ */ jsx36(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
|
|
11268
|
+
error && /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
|
|
11269
|
+
errorIframe && /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
|
|
10535
11270
|
setErrorIframe("");
|
|
10536
|
-
} }) }),
|
|
10537
|
-
|
|
10538
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */
|
|
10539
|
-
/* @__PURE__ */
|
|
10540
|
-
/* @__PURE__ */
|
|
10541
|
-
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */
|
|
11271
|
+
}, autoTrigger: onSubmit ? !onSubmit : autoTrigger }) }),
|
|
11272
|
+
/* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11273
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx36(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
|
|
11274
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
|
|
11275
|
+
/* @__PURE__ */ jsx36("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
|
|
11276
|
+
(stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx36(
|
|
10542
11277
|
ThreeDSChallenge,
|
|
10543
11278
|
{
|
|
10544
11279
|
containerRef: threeDSContainerRef,
|
|
@@ -10548,40 +11283,33 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10548
11283
|
onSuccess: handleSuccess,
|
|
10549
11284
|
onError: handleError
|
|
10550
11285
|
}
|
|
10551
|
-
) : /* @__PURE__ */
|
|
10552
|
-
/* @__PURE__ */
|
|
10553
|
-
/* @__PURE__ */
|
|
10554
|
-
/* @__PURE__ */
|
|
11286
|
+
) : /* @__PURE__ */ jsxs21("div", { className: "parent-pay-container", children: [
|
|
11287
|
+
/* @__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: [
|
|
11288
|
+
/* @__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" }) }),
|
|
11289
|
+
/* @__PURE__ */ jsx36("defs", { children: /* @__PURE__ */ jsx36("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx36("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
10555
11290
|
] }) }),
|
|
10556
|
-
/* @__PURE__ */
|
|
10557
|
-
/* @__PURE__ */
|
|
10558
|
-
/* @__PURE__ */
|
|
10559
|
-
/* @__PURE__ */
|
|
10560
|
-
/* @__PURE__ */
|
|
10561
|
-
/* @__PURE__ */
|
|
10562
|
-
/* @__PURE__ */
|
|
10563
|
-
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */
|
|
11291
|
+
/* @__PURE__ */ jsx36("div", { className: "pay-main-logo-res" }),
|
|
11292
|
+
/* @__PURE__ */ jsxs21("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
|
|
11293
|
+
!onSubmit && /* @__PURE__ */ jsxs21("div", { className: "pay-header pay-conatiner-one", children: [
|
|
11294
|
+
/* @__PURE__ */ jsxs21("div", { className: "pay-conatiner-one-first", children: [
|
|
11295
|
+
/* @__PURE__ */ jsxs21("div", { className: "pay-logo-container", children: [
|
|
11296
|
+
/* @__PURE__ */ jsx36("div", { className: "pay-main-logo" }),
|
|
11297
|
+
/* @__PURE__ */ jsx36("h1", { className: "pay-heading", children: "Pay" }),
|
|
11298
|
+
(cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs21("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
|
|
10564
11299
|
" ",
|
|
10565
|
-
/* @__PURE__ */
|
|
11300
|
+
/* @__PURE__ */ jsx36(IoArrowBack4, {}),
|
|
10566
11301
|
" Back"
|
|
10567
11302
|
] })
|
|
10568
11303
|
] }),
|
|
10569
|
-
/* @__PURE__ */
|
|
10570
|
-
/* @__PURE__ */
|
|
10571
|
-
/* @__PURE__ */
|
|
10572
|
-
/* @__PURE__ */
|
|
10573
|
-
!isPreAuth && isBankActive && !isPartial && /* @__PURE__ */
|
|
11304
|
+
/* @__PURE__ */ jsx36("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs21("div", { className: "pay-amount-conatiner", children: [
|
|
11305
|
+
/* @__PURE__ */ jsx36("small", { className: "pay-payment-amount", children: "Select payment type" }),
|
|
11306
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-card-bank-radio-main", children: [
|
|
11307
|
+
/* @__PURE__ */ jsx36(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
11308
|
+
!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 })
|
|
10574
11309
|
] }),
|
|
10575
|
-
|
|
10576
|
-
/* @__PURE__ */
|
|
10577
|
-
|
|
10578
|
-
" "
|
|
10579
|
-
] }),
|
|
10580
|
-
/* @__PURE__ */ jsx32("p", { children: formatUSD((Number(amount) - Number(cashDiscount)).toFixed(2)) })
|
|
10581
|
-
] }) : null,
|
|
10582
|
-
isPartial && /* @__PURE__ */ jsxs19("div", { className: "frac-partial-payment-input", children: [
|
|
10583
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
10584
|
-
/* @__PURE__ */ jsx32(
|
|
11310
|
+
isPartial && /* @__PURE__ */ jsxs21("div", { className: "frac-partial-payment-input", children: [
|
|
11311
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11312
|
+
/* @__PURE__ */ jsx36(
|
|
10585
11313
|
NumericFormat2,
|
|
10586
11314
|
{
|
|
10587
11315
|
prefix: "$",
|
|
@@ -10605,331 +11333,404 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10605
11333
|
}
|
|
10606
11334
|
}
|
|
10607
11335
|
),
|
|
10608
|
-
partialError && /* @__PURE__ */
|
|
11336
|
+
partialError && /* @__PURE__ */ jsx36("span", { className: "error-span", children: partialError })
|
|
10609
11337
|
] })
|
|
10610
11338
|
] }) })
|
|
10611
11339
|
] }),
|
|
10612
|
-
/* @__PURE__ */
|
|
10613
|
-
/* @__PURE__ */
|
|
10614
|
-
/* @__PURE__ */
|
|
11340
|
+
/* @__PURE__ */ jsxs21("div", { className: "pay-conatiner-one-last", children: [
|
|
11341
|
+
/* @__PURE__ */ jsx36("img", { src: secure2, alt: "" }),
|
|
11342
|
+
/* @__PURE__ */ jsx36("img", { src: pov2, alt: "" }),
|
|
10615
11343
|
"Secure payments powered by Fractal"
|
|
10616
11344
|
] })
|
|
10617
11345
|
] }),
|
|
10618
|
-
/* @__PURE__ */
|
|
10619
|
-
/* @__PURE__ */
|
|
10620
|
-
/* @__PURE__ */
|
|
10621
|
-
/* @__PURE__ */
|
|
10622
|
-
|
|
10623
|
-
/* @__PURE__ */ jsx32(IoArrowBack4, {})
|
|
10624
|
-
] }) }),
|
|
10625
|
-
/* @__PURE__ */ jsx32("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
11346
|
+
/* @__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: [
|
|
11347
|
+
onSubmit && /* @__PURE__ */ jsx36("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs21("div", { className: "pay-amount-conatiner", children: [
|
|
11348
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-card-bank-radio-main", children: [
|
|
11349
|
+
/* @__PURE__ */ jsx36(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
|
|
11350
|
+
!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 })
|
|
10626
11351
|
] }),
|
|
10627
|
-
/* @__PURE__ */
|
|
10628
|
-
/* @__PURE__ */
|
|
10629
|
-
/* @__PURE__ */
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
(
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
/* @__PURE__ */
|
|
10658
|
-
FractalFields_default,
|
|
10659
|
-
{
|
|
10660
|
-
fractalStyles,
|
|
10661
|
-
tokenizerRef,
|
|
10662
|
-
isSky: true
|
|
10663
|
-
}
|
|
10664
|
-
) })
|
|
10665
|
-
] }),
|
|
10666
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10667
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "zip", children: "ZIP" }),
|
|
10668
|
-
/* @__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) }),
|
|
10669
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
|
|
11352
|
+
isPartial && /* @__PURE__ */ jsxs21("div", { className: "frac-partial-payment-input", children: [
|
|
11353
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
11354
|
+
/* @__PURE__ */ jsx36(
|
|
11355
|
+
NumericFormat2,
|
|
11356
|
+
{
|
|
11357
|
+
prefix: "$",
|
|
11358
|
+
className: "form-control-frac",
|
|
11359
|
+
value: partialAmount,
|
|
11360
|
+
onValueChange: (values) => {
|
|
11361
|
+
handlePartialChange(values);
|
|
11362
|
+
},
|
|
11363
|
+
thousandSeparator: true,
|
|
11364
|
+
placeholder: "Enter partial amount",
|
|
11365
|
+
allowNegative: false,
|
|
11366
|
+
allowLeadingZeros: false,
|
|
11367
|
+
decimalScale: 2,
|
|
11368
|
+
fixedDecimalScale: true
|
|
11369
|
+
}
|
|
11370
|
+
),
|
|
11371
|
+
partialError && /* @__PURE__ */ jsx36("span", { className: "error-span", children: partialError })
|
|
11372
|
+
] })
|
|
11373
|
+
] }) }),
|
|
11374
|
+
is3DSEnable ? clientSecret && /* @__PURE__ */ jsx36(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11375
|
+
/* @__PURE__ */ jsxs21("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
|
|
11376
|
+
!onSubmit && /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11377
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
|
|
11378
|
+
/* @__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: [
|
|
11379
|
+
" ",
|
|
11380
|
+
/* @__PURE__ */ jsx36(IoArrowBack4, {})
|
|
11381
|
+
] }) }),
|
|
11382
|
+
/* @__PURE__ */ jsx36("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
|
|
10670
11383
|
] }),
|
|
10671
|
-
|
|
10672
|
-
/* @__PURE__ */
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
className: "toggle-checkbox",
|
|
10678
|
-
checked: saveCardInfo,
|
|
10679
|
-
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
10680
|
-
}
|
|
10681
|
-
),
|
|
10682
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
10683
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
10684
|
-
/* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
|
|
10685
|
-
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
|
|
10686
|
-
"svg",
|
|
10687
|
-
{
|
|
10688
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
10689
|
-
width: "20",
|
|
10690
|
-
height: "20",
|
|
10691
|
-
viewBox: "0 0 20 20",
|
|
10692
|
-
fill: "none",
|
|
10693
|
-
children: [
|
|
10694
|
-
/* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
10695
|
-
/* @__PURE__ */ jsx32(
|
|
10696
|
-
"path",
|
|
10697
|
-
{
|
|
10698
|
-
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",
|
|
10699
|
-
fill: "#161616"
|
|
10700
|
-
}
|
|
10701
|
-
)
|
|
10702
|
-
]
|
|
10703
|
-
}
|
|
10704
|
-
) }),
|
|
10705
|
-
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
10706
|
-
"If checked, I agree to give the ",
|
|
10707
|
-
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10708
|
-
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
10709
|
-
] }) })
|
|
10710
|
-
] })
|
|
10711
|
-
] }) })
|
|
11384
|
+
/* @__PURE__ */ jsxs21("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
|
|
11385
|
+
/* @__PURE__ */ jsx36("img", { src: visa2, alt: "", width: 33 }),
|
|
11386
|
+
/* @__PURE__ */ jsx36("img", { src: mastercard2, width: 33, alt: "" }),
|
|
11387
|
+
/* @__PURE__ */ jsx36("img", { src: americanexp2, alt: "", width: 33 }),
|
|
11388
|
+
/* @__PURE__ */ jsx36("img", { src: discover2, width: 33, alt: "" })
|
|
11389
|
+
] })
|
|
10712
11390
|
] }),
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
}
|
|
10719
|
-
|
|
10720
|
-
|
|
10721
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10722
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
10723
|
-
/* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
10724
|
-
const value = e.target.value;
|
|
10725
|
-
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
10726
|
-
handleCardChange("cardName", value);
|
|
10727
|
-
}
|
|
10728
|
-
} }),
|
|
10729
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
10730
|
-
] }),
|
|
10731
|
-
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx32(
|
|
10732
|
-
DataCapFields,
|
|
11391
|
+
activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11392
|
+
/* @__PURE__ */ jsx36(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
|
|
11393
|
+
setActiveinCard("form");
|
|
11394
|
+
} }),
|
|
11395
|
+
/* @__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)) }) })
|
|
11396
|
+
] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11397
|
+
/* @__PURE__ */ jsx36(
|
|
11398
|
+
ApplePayButton,
|
|
10733
11399
|
{
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
11400
|
+
applePayAmount: partialAmount ? partialAmount : amount,
|
|
11401
|
+
applePayMerchantId,
|
|
11402
|
+
applePayMerchantName: merchantName,
|
|
11403
|
+
completeFractalFlow,
|
|
11404
|
+
showLoader
|
|
10737
11405
|
}
|
|
10738
|
-
)
|
|
10739
|
-
/* @__PURE__ */
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
11406
|
+
),
|
|
11407
|
+
/* @__PURE__ */ jsx36(
|
|
11408
|
+
GooglePayComponent,
|
|
11409
|
+
{
|
|
11410
|
+
amount: partialAmount ? partialAmount : amount,
|
|
11411
|
+
googlePayEnvironment,
|
|
11412
|
+
googlePayGatewayMerchantId,
|
|
11413
|
+
googlePayMerchantId,
|
|
11414
|
+
googlePayMerchantName: merchantName,
|
|
11415
|
+
completeFractalFlow,
|
|
11416
|
+
setLoading
|
|
11417
|
+
}
|
|
11418
|
+
),
|
|
11419
|
+
/* @__PURE__ */ jsx36("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx36("span", { children: "or" }) }),
|
|
11420
|
+
/* @__PURE__ */ jsxs21("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11421
|
+
if (e.key === "Enter" && loading) {
|
|
11422
|
+
e.preventDefault();
|
|
11423
|
+
e.stopPropagation();
|
|
11424
|
+
}
|
|
11425
|
+
}, children: [
|
|
11426
|
+
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11427
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11428
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11429
|
+
/* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11430
|
+
const value = e.target.value;
|
|
11431
|
+
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11432
|
+
handleCardChange("cardName", value);
|
|
11433
|
+
}
|
|
11434
|
+
} }),
|
|
11435
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11436
|
+
] }),
|
|
11437
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11438
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
|
|
11439
|
+
/* @__PURE__ */ jsx36("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx36(
|
|
11440
|
+
FractalFields_default,
|
|
11441
|
+
{
|
|
11442
|
+
fractalStyles,
|
|
11443
|
+
tokenizerRef,
|
|
11444
|
+
isSky: true
|
|
11445
|
+
}
|
|
11446
|
+
) })
|
|
11447
|
+
] }),
|
|
11448
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11449
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11450
|
+
/* @__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) }),
|
|
11451
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11452
|
+
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11453
|
+
"Credit cards include a fee amount of ",
|
|
11454
|
+
/* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11455
|
+
"."
|
|
11456
|
+
] })
|
|
11457
|
+
] }),
|
|
11458
|
+
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: [
|
|
11459
|
+
/* @__PURE__ */ jsx36(
|
|
11460
|
+
"input",
|
|
11461
|
+
{
|
|
11462
|
+
type: "checkbox",
|
|
11463
|
+
id: "save_card",
|
|
11464
|
+
className: "toggle-checkbox",
|
|
11465
|
+
checked: saveCardInfo,
|
|
11466
|
+
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11467
|
+
}
|
|
11468
|
+
),
|
|
11469
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11470
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11471
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
|
|
11472
|
+
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
|
|
11473
|
+
"svg",
|
|
11474
|
+
{
|
|
11475
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11476
|
+
width: "20",
|
|
11477
|
+
height: "20",
|
|
11478
|
+
viewBox: "0 0 20 20",
|
|
11479
|
+
fill: "none",
|
|
11480
|
+
children: [
|
|
11481
|
+
/* @__PURE__ */ jsx36("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11482
|
+
/* @__PURE__ */ jsx36(
|
|
11483
|
+
"path",
|
|
11484
|
+
{
|
|
11485
|
+
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",
|
|
11486
|
+
fill: "#161616"
|
|
11487
|
+
}
|
|
11488
|
+
)
|
|
11489
|
+
]
|
|
11490
|
+
}
|
|
11491
|
+
) }),
|
|
11492
|
+
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11493
|
+
"If checked, I agree to give the ",
|
|
11494
|
+
/* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
|
|
11495
|
+
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11496
|
+
] }) })
|
|
11497
|
+
] })
|
|
11498
|
+
] }) })
|
|
11499
|
+
] }),
|
|
11500
|
+
/* @__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)) }) })
|
|
11501
|
+
] })
|
|
11502
|
+
] }) : /* @__PURE__ */ jsxs21("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11503
|
+
if (e.key === "Enter" && loading) {
|
|
11504
|
+
e.preventDefault();
|
|
11505
|
+
e.stopPropagation();
|
|
11506
|
+
}
|
|
11507
|
+
}, children: [
|
|
11508
|
+
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11509
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11510
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11511
|
+
/* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11512
|
+
const value = e.target.value;
|
|
11513
|
+
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11514
|
+
handleCardChange("cardName", value);
|
|
11515
|
+
}
|
|
11516
|
+
} }),
|
|
11517
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11518
|
+
] }),
|
|
11519
|
+
/* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx36(
|
|
11520
|
+
DataCapFields,
|
|
10747
11521
|
{
|
|
10748
|
-
|
|
10749
|
-
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
|
|
11522
|
+
isOpen: show || autoTrigger,
|
|
11523
|
+
tokenKey: dcToken,
|
|
11524
|
+
setLoader: activeinCard === "form" ? setLoadingIframe : null,
|
|
11525
|
+
isEmbedded: onSubmit ? true : false,
|
|
11526
|
+
customCSS: customCSS2
|
|
10753
11527
|
}
|
|
10754
|
-
),
|
|
10755
|
-
/* @__PURE__ */
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
/* @__PURE__ */
|
|
10759
|
-
|
|
11528
|
+
) }),
|
|
11529
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11530
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11531
|
+
/* @__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) }),
|
|
11532
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11533
|
+
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11534
|
+
"Credit cards include a fee amount of ",
|
|
11535
|
+
/* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11536
|
+
"."
|
|
11537
|
+
] })
|
|
11538
|
+
] }),
|
|
11539
|
+
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: [
|
|
11540
|
+
/* @__PURE__ */ jsx36(
|
|
11541
|
+
"input",
|
|
10760
11542
|
{
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
children: [
|
|
10767
|
-
/* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
10768
|
-
/* @__PURE__ */ jsx32(
|
|
10769
|
-
"path",
|
|
10770
|
-
{
|
|
10771
|
-
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",
|
|
10772
|
-
fill: "#161616"
|
|
10773
|
-
}
|
|
10774
|
-
)
|
|
10775
|
-
]
|
|
11543
|
+
type: "checkbox",
|
|
11544
|
+
id: "save_card",
|
|
11545
|
+
className: "toggle-checkbox",
|
|
11546
|
+
checked: saveCardInfo,
|
|
11547
|
+
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
10776
11548
|
}
|
|
10777
|
-
)
|
|
10778
|
-
/* @__PURE__ */
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
|
|
10800
|
-
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
/* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: {
|
|
10809
|
-
minHeight: "444px",
|
|
10810
|
-
maxHeight: "444px"
|
|
10811
|
-
}, children: [
|
|
10812
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10813
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
10814
|
-
/* @__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 }),
|
|
10815
|
-
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
11549
|
+
),
|
|
11550
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11551
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11552
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
|
|
11553
|
+
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
|
|
11554
|
+
"svg",
|
|
11555
|
+
{
|
|
11556
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11557
|
+
width: "20",
|
|
11558
|
+
height: "20",
|
|
11559
|
+
viewBox: "0 0 20 20",
|
|
11560
|
+
fill: "none",
|
|
11561
|
+
children: [
|
|
11562
|
+
/* @__PURE__ */ jsx36("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11563
|
+
/* @__PURE__ */ jsx36(
|
|
11564
|
+
"path",
|
|
11565
|
+
{
|
|
11566
|
+
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",
|
|
11567
|
+
fill: "#161616"
|
|
11568
|
+
}
|
|
11569
|
+
)
|
|
11570
|
+
]
|
|
11571
|
+
}
|
|
11572
|
+
) }),
|
|
11573
|
+
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11574
|
+
"If checked, I agree to give the ",
|
|
11575
|
+
/* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
|
|
11576
|
+
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11577
|
+
] }) })
|
|
11578
|
+
] })
|
|
11579
|
+
] }) })
|
|
10816
11580
|
] }),
|
|
10817
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
11581
|
+
/* @__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)) }) })
|
|
11582
|
+
] })
|
|
11583
|
+
] }),
|
|
11584
|
+
/* @__PURE__ */ jsx36("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11585
|
+
!onSubmit && /* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
|
|
11586
|
+
/* @__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: [
|
|
11587
|
+
" ",
|
|
11588
|
+
/* @__PURE__ */ jsx36(IoArrowBack4, {})
|
|
11589
|
+
] }) }),
|
|
11590
|
+
/* @__PURE__ */ jsx36("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
|
|
11591
|
+
] }),
|
|
11592
|
+
activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11593
|
+
/* @__PURE__ */ jsx36(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
|
|
11594
|
+
setActiveinBank("form");
|
|
11595
|
+
} }),
|
|
11596
|
+
/* @__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)) }) })
|
|
11597
|
+
] }) : /* @__PURE__ */ jsxs21("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
|
|
11598
|
+
if (e.key === "Enter" && loading) {
|
|
11599
|
+
e.preventDefault();
|
|
11600
|
+
e.stopPropagation();
|
|
11601
|
+
}
|
|
11602
|
+
}, children: [
|
|
11603
|
+
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: {
|
|
11604
|
+
minHeight: "444px",
|
|
11605
|
+
maxHeight: "444px"
|
|
11606
|
+
}, children: [
|
|
11607
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11608
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
11609
|
+
/* @__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 }),
|
|
11610
|
+
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
11611
|
+
] }),
|
|
11612
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11613
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "routingnumber", children: "Routing number" }),
|
|
11614
|
+
/* @__PURE__ */ jsx36(
|
|
11615
|
+
"input",
|
|
11616
|
+
{
|
|
11617
|
+
type: "text",
|
|
11618
|
+
id: "routingnumber",
|
|
11619
|
+
className: "form-control-frac",
|
|
11620
|
+
maxLength: 9,
|
|
11621
|
+
placeholder: "000000000",
|
|
11622
|
+
name: "routingNumber",
|
|
11623
|
+
value: (_o = achData == null ? void 0 : achData.routingNumber) != null ? _o : "",
|
|
11624
|
+
onChange: handleChangeAch
|
|
11625
|
+
}
|
|
11626
|
+
),
|
|
11627
|
+
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
|
|
11628
|
+
] }),
|
|
11629
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11630
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "accountnumber", children: "Account number" }),
|
|
11631
|
+
/* @__PURE__ */ jsx36(
|
|
11632
|
+
"input",
|
|
11633
|
+
{
|
|
11634
|
+
type: "text",
|
|
11635
|
+
id: "accountnumber",
|
|
11636
|
+
className: "form-control-frac",
|
|
11637
|
+
maxLength: 16,
|
|
11638
|
+
placeholder: "0000000000",
|
|
11639
|
+
name: "accountNumber",
|
|
11640
|
+
value: (_p = achData == null ? void 0 : achData.accountNumber) != null ? _p : "",
|
|
11641
|
+
onChange: handleChangeAch
|
|
11642
|
+
}
|
|
11643
|
+
),
|
|
11644
|
+
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
|
|
11645
|
+
] }),
|
|
11646
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11647
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
|
|
11648
|
+
/* @__PURE__ */ jsx36(
|
|
11649
|
+
"input",
|
|
11650
|
+
{
|
|
11651
|
+
type: "text",
|
|
11652
|
+
id: "confirmaccountnumber",
|
|
11653
|
+
className: "form-control-frac",
|
|
11654
|
+
maxLength: 16,
|
|
11655
|
+
placeholder: "0000000000",
|
|
11656
|
+
name: "confirmAccountNumber",
|
|
11657
|
+
value: (_q = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _q : "",
|
|
11658
|
+
onChange: handleChangeAch
|
|
11659
|
+
}
|
|
11660
|
+
),
|
|
11661
|
+
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
|
|
11662
|
+
] }),
|
|
11663
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11664
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "bankname", children: "Bank name" }),
|
|
11665
|
+
/* @__PURE__ */ jsx36(
|
|
11666
|
+
"input",
|
|
11667
|
+
{
|
|
11668
|
+
type: "text",
|
|
11669
|
+
id: "bankname",
|
|
11670
|
+
className: "form-control-frac",
|
|
11671
|
+
maxLength: 100,
|
|
11672
|
+
placeholder: "My Bank",
|
|
11673
|
+
name: "bankName",
|
|
11674
|
+
value: (_r = achData == null ? void 0 : achData.bankName) != null ? _r : "",
|
|
11675
|
+
onChange: handleChangeAch
|
|
11676
|
+
}
|
|
11677
|
+
),
|
|
11678
|
+
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
|
|
11679
|
+
] }),
|
|
11680
|
+
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11681
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "companyName", children: "Company name" }),
|
|
11682
|
+
/* @__PURE__ */ jsx36(
|
|
11683
|
+
"input",
|
|
11684
|
+
{
|
|
11685
|
+
type: "text",
|
|
11686
|
+
id: "companyName",
|
|
11687
|
+
className: "form-control-frac",
|
|
11688
|
+
maxLength: 100,
|
|
11689
|
+
placeholder: "My Company",
|
|
11690
|
+
name: "companyName",
|
|
11691
|
+
value: (_s = achData == null ? void 0 : achData.companyName) != null ? _s : "",
|
|
11692
|
+
onChange: handleChangeAch
|
|
11693
|
+
}
|
|
11694
|
+
),
|
|
11695
|
+
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
|
|
11696
|
+
] }),
|
|
11697
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11698
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "accounttype", children: "Select account type" }),
|
|
11699
|
+
/* @__PURE__ */ jsxs21("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
|
|
11700
|
+
/* @__PURE__ */ jsx36("option", { value: "", children: "Select account" }),
|
|
11701
|
+
accountTypes.map((type) => /* @__PURE__ */ jsx36("option", { value: type.value, children: type.label }, type.value))
|
|
11702
|
+
] }),
|
|
11703
|
+
bankFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11704
|
+
"There is a processing fee of ",
|
|
11705
|
+
/* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
|
|
11706
|
+
"."
|
|
11707
|
+
] }),
|
|
11708
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11709
|
+
/* @__PURE__ */ jsx36("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
|
|
11710
|
+
setIsBankConsentChecked(e.target.checked);
|
|
11711
|
+
if (e.target.checked) {
|
|
11712
|
+
setErrorBankConsent("");
|
|
11713
|
+
}
|
|
11714
|
+
} }),
|
|
11715
|
+
/* @__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.` })
|
|
11716
|
+
] }),
|
|
11717
|
+
errorBankConsent && /* @__PURE__ */ jsx36("span", { className: "error-span", children: errorBankConsent }),
|
|
11718
|
+
customerId && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11719
|
+
/* @__PURE__ */ jsx36("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
11720
|
+
/* @__PURE__ */ jsx36("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
|
|
11721
|
+
] }),
|
|
11722
|
+
saveACHinfo && /* @__PURE__ */ jsx36("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11723
|
+
"If checked, I agree to give the ",
|
|
11724
|
+
/* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
|
|
11725
|
+
" permission to charge this bank account for agreed-upon purchases in the future."
|
|
11726
|
+
] }) })
|
|
10907
11727
|
] })
|
|
10908
11728
|
] }),
|
|
10909
|
-
/* @__PURE__ */
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
}
|
|
10915
|
-
} }),
|
|
10916
|
-
/* @__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.` })
|
|
10917
|
-
] }),
|
|
10918
|
-
errorBankConsent && /* @__PURE__ */ jsx32("span", { className: "error-span", children: errorBankConsent }),
|
|
10919
|
-
customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
10920
|
-
/* @__PURE__ */ jsx32("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
10921
|
-
/* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
|
|
10922
|
-
] }),
|
|
10923
|
-
saveACHinfo && /* @__PURE__ */ jsx32("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
10924
|
-
"If checked, I agree to give the ",
|
|
10925
|
-
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10926
|
-
" permission to charge this bank account for agreed-upon purchases in the future."
|
|
10927
|
-
] }) })
|
|
10928
|
-
] }),
|
|
10929
|
-
/* @__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)) }) })
|
|
10930
|
-
] })
|
|
10931
|
-
] }) })
|
|
10932
|
-
] }) }) }) })
|
|
11729
|
+
/* @__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)) }) })
|
|
11730
|
+
] })
|
|
11731
|
+
] }) })
|
|
11732
|
+
] })
|
|
11733
|
+
] }) }) })
|
|
10933
11734
|
] })
|
|
10934
11735
|
] })
|
|
10935
11736
|
] })
|
|
@@ -10940,7 +11741,7 @@ var ModelContentSky_default = ModelContentSky;
|
|
|
10940
11741
|
|
|
10941
11742
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
10942
11743
|
import axios10 from "axios";
|
|
10943
|
-
import { Fragment as
|
|
11744
|
+
import { Fragment as Fragment21, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
10944
11745
|
var PaymentWidget = ({
|
|
10945
11746
|
amount,
|
|
10946
11747
|
bankAmount,
|
|
@@ -10960,14 +11761,15 @@ var PaymentWidget = ({
|
|
|
10960
11761
|
autoTrigger = false,
|
|
10961
11762
|
isPartial,
|
|
10962
11763
|
bankSurcharge,
|
|
10963
|
-
partialRef
|
|
11764
|
+
partialRef,
|
|
11765
|
+
customCSS: customCSS2
|
|
10964
11766
|
}) => {
|
|
10965
|
-
const [show, setShow] =
|
|
10966
|
-
const [loading, setLoading] =
|
|
10967
|
-
const [childHandleClose, setChildHandleClose] =
|
|
11767
|
+
const [show, setShow] = useState12(autoTrigger || false);
|
|
11768
|
+
const [loading, setLoading] = useState12(false);
|
|
11769
|
+
const [childHandleClose, setChildHandleClose] = useState12(() => () => {
|
|
10968
11770
|
});
|
|
10969
|
-
const [orderGuid, setOrderGuid] =
|
|
10970
|
-
const [remainingAmount, setRemainingAmount] =
|
|
11771
|
+
const [orderGuid, setOrderGuid] = useState12(null);
|
|
11772
|
+
const [remainingAmount, setRemainingAmount] = useState12(null);
|
|
10971
11773
|
const initialCommonProps = useMemo(
|
|
10972
11774
|
() => ({
|
|
10973
11775
|
amount,
|
|
@@ -10990,7 +11792,8 @@ var PaymentWidget = ({
|
|
|
10990
11792
|
setHandleCloseRef: setChildHandleClose,
|
|
10991
11793
|
isPartial,
|
|
10992
11794
|
bankSurcharge,
|
|
10993
|
-
partialRef
|
|
11795
|
+
partialRef,
|
|
11796
|
+
customCSS: customCSS2
|
|
10994
11797
|
}),
|
|
10995
11798
|
[
|
|
10996
11799
|
amount,
|
|
@@ -11014,8 +11817,8 @@ var PaymentWidget = ({
|
|
|
11014
11817
|
partialRef
|
|
11015
11818
|
]
|
|
11016
11819
|
);
|
|
11017
|
-
const [commonProps, setCommonProps] =
|
|
11018
|
-
|
|
11820
|
+
const [commonProps, setCommonProps] = useState12(initialCommonProps);
|
|
11821
|
+
useEffect19(() => {
|
|
11019
11822
|
if (show) {
|
|
11020
11823
|
setCommonProps(initialCommonProps);
|
|
11021
11824
|
}
|
|
@@ -11046,29 +11849,556 @@ var PaymentWidget = ({
|
|
|
11046
11849
|
setLoading(false);
|
|
11047
11850
|
}
|
|
11048
11851
|
};
|
|
11049
|
-
|
|
11852
|
+
useEffect19(() => {
|
|
11050
11853
|
if (show && isPartial && partialRef) {
|
|
11051
11854
|
getskyosOrderDetails();
|
|
11052
11855
|
}
|
|
11053
11856
|
}, [show, isPartial, partialRef]);
|
|
11054
|
-
return /* @__PURE__ */
|
|
11055
|
-
/* @__PURE__ */
|
|
11056
|
-
/* @__PURE__ */
|
|
11057
|
-
/* @__PURE__ */
|
|
11058
|
-
/* @__PURE__ */
|
|
11059
|
-
/* @__PURE__ */
|
|
11060
|
-
/* @__PURE__ */
|
|
11061
|
-
/* @__PURE__ */
|
|
11062
|
-
!autoTrigger && /* @__PURE__ */
|
|
11857
|
+
return /* @__PURE__ */ jsxs22(Fragment21, { children: [
|
|
11858
|
+
/* @__PURE__ */ jsx37("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
11859
|
+
/* @__PURE__ */ jsx37(DataScript, {}),
|
|
11860
|
+
/* @__PURE__ */ jsx37(FractalTokenizerScript, {}),
|
|
11861
|
+
/* @__PURE__ */ jsx37(SkyChargewidgetstyles, {}),
|
|
11862
|
+
/* @__PURE__ */ jsx37(CardBankRadioStyles, {}),
|
|
11863
|
+
/* @__PURE__ */ jsx37(CustomModal2styles_default, {}),
|
|
11864
|
+
/* @__PURE__ */ jsx37(DataCapScriptLoader, {}),
|
|
11865
|
+
!autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
11866
|
+
submitBtnText,
|
|
11867
|
+
submitBtnIcon
|
|
11868
|
+
] }),
|
|
11869
|
+
!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 }))
|
|
11870
|
+
] });
|
|
11871
|
+
};
|
|
11872
|
+
|
|
11873
|
+
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
11874
|
+
import { useEffect as useEffect21, useState as useState13, useMemo as useMemo2 } from "react";
|
|
11875
|
+
import axios11 from "axios";
|
|
11876
|
+
|
|
11877
|
+
// src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
|
|
11878
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
11879
|
+
function EmbeddedCheckoutStyles({ extraCustomCSS }) {
|
|
11880
|
+
return /* @__PURE__ */ jsx38("style", { children: `
|
|
11881
|
+
|
|
11882
|
+
.pay-amount-conatiner{
|
|
11883
|
+
margin-top: 20px !important;
|
|
11884
|
+
margin-bottom: 20px !important ;
|
|
11885
|
+
}
|
|
11886
|
+
|
|
11887
|
+
.frac-pay-container.pay-container {
|
|
11888
|
+
grid-template-columns:1fr;
|
|
11889
|
+
}
|
|
11890
|
+
|
|
11891
|
+
|
|
11892
|
+
/* Card */
|
|
11893
|
+
.plan-card {
|
|
11894
|
+
width: 100%;
|
|
11895
|
+
font-family: Inter, sans-serif;
|
|
11896
|
+
background: #fff;
|
|
11897
|
+
}
|
|
11898
|
+
|
|
11899
|
+
/* Header */
|
|
11900
|
+
.card-header {
|
|
11901
|
+
padding: 12px 0 0 0;
|
|
11902
|
+
}
|
|
11903
|
+
|
|
11904
|
+
/* Button */
|
|
11905
|
+
.collapse-btn {
|
|
11906
|
+
width: 100%;
|
|
11907
|
+
background: none;
|
|
11908
|
+
border: none;
|
|
11909
|
+
display: flex;
|
|
11910
|
+
justify-content: space-between;
|
|
11911
|
+
align-items: center;
|
|
11912
|
+
cursor: pointer;
|
|
11913
|
+
font-size: 15px;
|
|
11914
|
+
padding: 0;
|
|
11915
|
+
}
|
|
11916
|
+
|
|
11917
|
+
/* Arrow */
|
|
11918
|
+
.arrow {
|
|
11919
|
+
transition: transform 0.3s ease;
|
|
11920
|
+
height: 8px;
|
|
11921
|
+
}
|
|
11922
|
+
|
|
11923
|
+
/* Open State */
|
|
11924
|
+
.collapse-btn.open .arrow {
|
|
11925
|
+
transform: rotate(180deg); /* Down */
|
|
11926
|
+
}
|
|
11927
|
+
|
|
11928
|
+
/* Body */
|
|
11929
|
+
.card-body {
|
|
11930
|
+
padding: 0;
|
|
11931
|
+
}
|
|
11932
|
+
|
|
11933
|
+
/* Plan Header */
|
|
11934
|
+
.plan-header {
|
|
11935
|
+
font-size: 15px;
|
|
11936
|
+
font-weight: 600;
|
|
11937
|
+
}
|
|
11938
|
+
|
|
11939
|
+
/* Scrollable List */
|
|
11940
|
+
.plan-list {
|
|
11941
|
+
max-height: 200px;
|
|
11942
|
+
overflow-y: auto;
|
|
11943
|
+
padding-right: 6px;
|
|
11944
|
+
}
|
|
11945
|
+
|
|
11946
|
+
/* Items */
|
|
11947
|
+
.plan-item {
|
|
11948
|
+
display: flex;
|
|
11949
|
+
justify-content: space-between;
|
|
11950
|
+
padding: 6px 0;
|
|
11951
|
+
font-size: 14px;
|
|
11952
|
+
}
|
|
11953
|
+
|
|
11954
|
+
/* Badges */
|
|
11955
|
+
.badge {
|
|
11956
|
+
padding: 4px 10px;
|
|
11957
|
+
border-radius: 12px;
|
|
11958
|
+
font-size: 12px;
|
|
11959
|
+
font-weight: 500;
|
|
11960
|
+
}
|
|
11961
|
+
|
|
11962
|
+
.badge-included {
|
|
11963
|
+
background: #f1f3f5;
|
|
11964
|
+
color: #495057;
|
|
11965
|
+
}
|
|
11966
|
+
|
|
11967
|
+
.badge-available {
|
|
11968
|
+
background: #f8f9fa;
|
|
11969
|
+
color: #212529;
|
|
11970
|
+
}
|
|
11971
|
+
|
|
11972
|
+
/* Helpers */
|
|
11973
|
+
.row-between {
|
|
11974
|
+
display: flex;
|
|
11975
|
+
justify-content: space-between;
|
|
11976
|
+
}
|
|
11977
|
+
|
|
11978
|
+
.text-end {
|
|
11979
|
+
text-align: right;
|
|
11980
|
+
}
|
|
11981
|
+
|
|
11982
|
+
.text-muted {
|
|
11983
|
+
color: #6c757d;
|
|
11984
|
+
font-size: 12px;
|
|
11985
|
+
}
|
|
11986
|
+
|
|
11987
|
+
.fw-semibold {
|
|
11988
|
+
font-weight: 600;
|
|
11989
|
+
}
|
|
11990
|
+
|
|
11991
|
+
.mb-2 {
|
|
11992
|
+
margin-bottom: 8px;
|
|
11993
|
+
}
|
|
11994
|
+
|
|
11995
|
+
/* Divider */
|
|
11996
|
+
.divider {
|
|
11997
|
+
height: 1px;
|
|
11998
|
+
background: #e5e7eb;
|
|
11999
|
+
margin: 8px 0;
|
|
12000
|
+
}
|
|
12001
|
+
|
|
12002
|
+
/* Collapse Animation */
|
|
12003
|
+
.collapse {
|
|
12004
|
+
max-height: 0;
|
|
12005
|
+
overflow: hidden;
|
|
12006
|
+
transition: max-height 0.3s ease;
|
|
12007
|
+
}
|
|
12008
|
+
|
|
12009
|
+
.collapse.show {
|
|
12010
|
+
max-height: 1000px;
|
|
12011
|
+
}
|
|
12012
|
+
.frac-pay-container.pay-container {
|
|
12013
|
+
grid-template-columns:1fr;
|
|
12014
|
+
}
|
|
12015
|
+
.frac-payment-form-div .amt-pay-con {
|
|
12016
|
+
padding-right: 0px;
|
|
12017
|
+
}
|
|
12018
|
+
.frac-payment-form-div .ach-scrl {
|
|
12019
|
+
padding-right: 0px;
|
|
12020
|
+
gap: 10px;
|
|
12021
|
+
max-height: fit-content !important;
|
|
12022
|
+
min-height: fit-content !important;
|
|
12023
|
+
overflow: hidden !important;
|
|
12024
|
+
}
|
|
12025
|
+
.frac-payment-form-div .frac-card-bank-radio-main {
|
|
12026
|
+
display: flex;
|
|
12027
|
+
flex-direction: row;
|
|
12028
|
+
align-items: flex-start;
|
|
12029
|
+
align-self: stretch;
|
|
12030
|
+
border-radius: 14px;
|
|
12031
|
+
border: none;
|
|
12032
|
+
overflow: visible;
|
|
12033
|
+
gap: 10px;
|
|
12034
|
+
}
|
|
12035
|
+
.frac-payment-form-div .frac-card-bank-radio {
|
|
12036
|
+
display: flex;
|
|
12037
|
+
padding: 12px 16px;
|
|
12038
|
+
justify-content: space-between;
|
|
12039
|
+
align-items: center;
|
|
12040
|
+
align-self: stretch;
|
|
12041
|
+
width: 50%;
|
|
12042
|
+
border: 1px solid #E0DFE2;
|
|
12043
|
+
border-radius: 10px;
|
|
12044
|
+
box-shadow: rgba(149, 157, 165, 0.2) 0px 1px 4px;
|
|
12045
|
+
}
|
|
12046
|
+
.frac-payment-form-div .frac-card-bank-radio.frac-active {
|
|
12047
|
+
background: #fff;
|
|
12048
|
+
border: 2px solid #004eab !important;
|
|
12049
|
+
}
|
|
12050
|
+
|
|
12051
|
+
.frac-payment-form-div .form-control-frac {
|
|
12052
|
+
border: 1px solid #dee2e6 !important;
|
|
12053
|
+
border-radius: 0.375rem !important;
|
|
12054
|
+
background-color: #F6F6F7;
|
|
12055
|
+
box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
|
|
12056
|
+
}
|
|
12057
|
+
.frac-payment-form-div .form-control-frac:focus {
|
|
12058
|
+
border: 1px solid #004eab !important;
|
|
12059
|
+
}
|
|
12060
|
+
.frac-payment-form-div .card-expiry-new {
|
|
12061
|
+
border: none;
|
|
12062
|
+
gap: 10px;
|
|
12063
|
+
}
|
|
12064
|
+
.frac-payment-form-div .exp-date-year-container {
|
|
12065
|
+
gap: 10px;
|
|
12066
|
+
width: 100%;
|
|
12067
|
+
}
|
|
12068
|
+
.frac-payment-form-div .card-type-logo-wrap{
|
|
12069
|
+
position: absolute;
|
|
12070
|
+
right: 10px;
|
|
12071
|
+
max-width: 30px;
|
|
12072
|
+
}
|
|
12073
|
+
.detials-wrap.detials-wrap-1 {
|
|
12074
|
+
display: flex;
|
|
12075
|
+
flex-wrap: wrap;
|
|
12076
|
+
}
|
|
12077
|
+
@media screen and (max-width: 1280px) {
|
|
12078
|
+
.frac-pay-container.pay-container {
|
|
12079
|
+
grid-template-columns: 1fr;
|
|
12080
|
+
border: none;
|
|
12081
|
+
}
|
|
12082
|
+
}
|
|
12083
|
+
@media screen and (max-width: 899px) {
|
|
12084
|
+
.detials-wrap {
|
|
12085
|
+
grid-template-columns: 1fr !important;
|
|
12086
|
+
}
|
|
12087
|
+
.frac-payment-form-div .exp-date-year-container{
|
|
12088
|
+
width: 100%;}
|
|
12089
|
+
|
|
12090
|
+
}
|
|
12091
|
+
@media screen and (max-width: 575px) {
|
|
12092
|
+
.frac-payment-form-div .card-type-logo-wrap{
|
|
12093
|
+
max-width: 30px;
|
|
12094
|
+
}
|
|
12095
|
+
form#ACHPaymentForm .ach-scrl {
|
|
12096
|
+
grid-template-columns: 1fr !important;
|
|
12097
|
+
}
|
|
12098
|
+
@media screen and (max-width: 375px) {
|
|
12099
|
+
.frac-payment-form-div .exp-date-year-container {
|
|
12100
|
+
flex-direction: column;
|
|
12101
|
+
}
|
|
12102
|
+
.parent-pay-container {
|
|
12103
|
+
padding: 10px;
|
|
12104
|
+
}
|
|
12105
|
+
}
|
|
12106
|
+
}
|
|
12107
|
+
.box-inner-card-text{
|
|
12108
|
+
display: flex;
|
|
12109
|
+
gap: 0px;
|
|
12110
|
+
flex-direction: column;
|
|
12111
|
+
}
|
|
12112
|
+
.box-inner-card-text .frac-payment-type-logo {
|
|
12113
|
+
width: 17px;
|
|
12114
|
+
height: 17px;
|
|
12115
|
+
aspect-ratio: 1/1;
|
|
12116
|
+
}
|
|
12117
|
+
.exp-date-year-wrap.form-control-frac input {
|
|
12118
|
+
background: transparent;
|
|
12119
|
+
border: none;
|
|
12120
|
+
outline: none;
|
|
12121
|
+
font-size: 1rem;
|
|
12122
|
+
font-weight: 400;
|
|
12123
|
+
}
|
|
12124
|
+
.exp-date-year-wrap.form-control-frac {
|
|
12125
|
+
display: flex;
|
|
12126
|
+
gap: 2px;
|
|
12127
|
+
}
|
|
12128
|
+
.exp-date-year-wrap input.exp-month {
|
|
12129
|
+
width: 32px;
|
|
12130
|
+
}
|
|
12131
|
+
.detials-wrap {
|
|
12132
|
+
display: grid;
|
|
12133
|
+
grid-template-columns: 1fr 1fr;
|
|
12134
|
+
gap: 10px;
|
|
12135
|
+
}
|
|
12136
|
+
.detials-wrap.detials-wrap-2{
|
|
12137
|
+
grid-template-columns: 1fr 1fr;
|
|
12138
|
+
}
|
|
12139
|
+
form#ACHPaymentForm .ach-scrl {
|
|
12140
|
+
display: grid;
|
|
12141
|
+
grid-gap: 0px 10px;
|
|
12142
|
+
grid-template-columns: 1fr;
|
|
12143
|
+
}
|
|
12144
|
+
.plan-list {
|
|
12145
|
+
max-height: 130px;
|
|
12146
|
+
min-height: 130px;
|
|
12147
|
+
overflow-y: auto;
|
|
12148
|
+
padding-right: 6px;
|
|
12149
|
+
}
|
|
12150
|
+
.plan-list::-webkit-scrollbar {
|
|
12151
|
+
width: 3px;
|
|
12152
|
+
background-color: #F5F5F5;
|
|
12153
|
+
}
|
|
12154
|
+
.plan-list::-webkit-scrollbar-thumb {
|
|
12155
|
+
background-color: #35254D;
|
|
12156
|
+
}
|
|
12157
|
+
div#cvv {
|
|
12158
|
+
border-top-left-radius: 0;
|
|
12159
|
+
border-bottom-left-radius: 0;
|
|
12160
|
+
border-top: 0;
|
|
12161
|
+
border-bottom: 0;
|
|
12162
|
+
border-right: 0;
|
|
12163
|
+
}
|
|
12164
|
+
div#exp_year {
|
|
12165
|
+
height: 36px;
|
|
12166
|
+
width: calc(100% + 1px);
|
|
12167
|
+
border-radius: 0;
|
|
12168
|
+
border-top: 0;
|
|
12169
|
+
border-bottom: 0;
|
|
12170
|
+
border-right: 1px solid #dee2e6;
|
|
12171
|
+
}
|
|
12172
|
+
div#exp_month {
|
|
12173
|
+
width: calc(100% + 1px);
|
|
12174
|
+
border-top-right-radius: 0;
|
|
12175
|
+
border-bottom-right-radius: 0;
|
|
12176
|
+
border: 0;
|
|
12177
|
+
border-right: 1px solid #dee2e6;
|
|
12178
|
+
}
|
|
12179
|
+
.exp-date-year-container .form-group {
|
|
12180
|
+
flex: 1;
|
|
12181
|
+
}
|
|
12182
|
+
.input-main-wrap-frac{
|
|
12183
|
+
margin:0px !important;
|
|
12184
|
+
padding:0px !important;
|
|
12185
|
+
}
|
|
12186
|
+
.toggle-num-wrapper.toggle-num-wrapper-new {
|
|
12187
|
+
border: 1px solid #dee2e6 !important;
|
|
12188
|
+
border-radius: 0.375rem !important;
|
|
12189
|
+
background-color: #F6F6F7;
|
|
12190
|
+
box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
|
|
12191
|
+
}
|
|
12192
|
+
.toggle-num-wrapper-new div#card_number {
|
|
12193
|
+
padding: 0px 10px;
|
|
12194
|
+
border: none;
|
|
12195
|
+
border-bottom: 1px solid #dee2e6;
|
|
12196
|
+
}
|
|
12197
|
+
.toggle-num-wrapper-new .card-crdi.card-expiry-new {
|
|
12198
|
+
padding: 0px 10px;
|
|
12199
|
+
}
|
|
12200
|
+
.toggle-num-wrapper-new .input-main-wrap-frac {
|
|
12201
|
+
height: 36px;
|
|
12202
|
+
}
|
|
12203
|
+
.toggle-num-wrapper-new:focus {
|
|
12204
|
+
border: 1px solid #004eab !important;
|
|
12205
|
+
}
|
|
12206
|
+
.frac-card-title-main {
|
|
12207
|
+
display: flex;
|
|
12208
|
+
align-items: start;
|
|
12209
|
+
gap: 4px;
|
|
12210
|
+
flex-direction: column;
|
|
12211
|
+
}
|
|
12212
|
+
.parent-pay-container {
|
|
12213
|
+
padding: 24px;
|
|
12214
|
+
background-color: #ffffff !important;
|
|
12215
|
+
border-radius: 15px;
|
|
12216
|
+
min-width: 300px;
|
|
12217
|
+
}
|
|
12218
|
+
|
|
12219
|
+
|
|
12220
|
+
${extraCustomCSS}
|
|
12221
|
+
|
|
12222
|
+
` });
|
|
12223
|
+
}
|
|
12224
|
+
|
|
12225
|
+
// src/app/components/Atoms/Applepay/ApplePayScriptLoader.tsx
|
|
12226
|
+
import { useEffect as useEffect20 } from "react";
|
|
12227
|
+
var applePayScriptLoaded = false;
|
|
12228
|
+
var ApplePayScriptLoader = () => {
|
|
12229
|
+
useEffect20(() => {
|
|
12230
|
+
if (applePayScriptLoaded) return;
|
|
12231
|
+
const existingScript = document.querySelector(
|
|
12232
|
+
`script[src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"]`
|
|
12233
|
+
);
|
|
12234
|
+
if (!existingScript) {
|
|
12235
|
+
const script2 = document.createElement("script");
|
|
12236
|
+
script2.src = "https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js";
|
|
12237
|
+
script2.async = true;
|
|
12238
|
+
script2.onload = () => {
|
|
12239
|
+
console.log("\u2705 Apple Pay script loaded");
|
|
12240
|
+
applePayScriptLoaded = true;
|
|
12241
|
+
console.log("ApplePaySession:", window.ApplePaySession);
|
|
12242
|
+
};
|
|
12243
|
+
script2.onerror = (err) => {
|
|
12244
|
+
console.error("\u274C Apple Pay script failed", err);
|
|
12245
|
+
};
|
|
12246
|
+
document.head.appendChild(script2);
|
|
12247
|
+
} else {
|
|
12248
|
+
applePayScriptLoaded = true;
|
|
12249
|
+
}
|
|
12250
|
+
}, []);
|
|
12251
|
+
return null;
|
|
12252
|
+
};
|
|
12253
|
+
|
|
12254
|
+
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
12255
|
+
import { Fragment as Fragment22, jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
12256
|
+
var EmbeddedCheckout = ({
|
|
12257
|
+
amount,
|
|
12258
|
+
bankAmount,
|
|
12259
|
+
submitBtnText = "Pay",
|
|
12260
|
+
session_token,
|
|
12261
|
+
customerId,
|
|
12262
|
+
callback,
|
|
12263
|
+
merchantName = "merchant",
|
|
12264
|
+
isPreAuth,
|
|
12265
|
+
surcharge = "0",
|
|
12266
|
+
submitBtnClass,
|
|
12267
|
+
submitBtnIcon,
|
|
12268
|
+
isRequest,
|
|
12269
|
+
pass_fee,
|
|
12270
|
+
pass_fee_amount,
|
|
12271
|
+
require3ds = false,
|
|
12272
|
+
autoTrigger = false,
|
|
12273
|
+
isPartial,
|
|
12274
|
+
bankSurcharge,
|
|
12275
|
+
partialRef,
|
|
12276
|
+
onSubmit,
|
|
12277
|
+
onLoad,
|
|
12278
|
+
customCSS: customCSS2
|
|
12279
|
+
}) => {
|
|
12280
|
+
const [show, setShow] = useState13(false);
|
|
12281
|
+
const [loading, setLoading] = useState13(false);
|
|
12282
|
+
const [childHandleClose, setChildHandleClose] = useState13(() => () => {
|
|
12283
|
+
});
|
|
12284
|
+
const [orderGuid, setOrderGuid] = useState13(null);
|
|
12285
|
+
const [remainingAmount, setRemainingAmount] = useState13(null);
|
|
12286
|
+
const initialCommonProps = useMemo2(
|
|
12287
|
+
() => ({
|
|
12288
|
+
amount,
|
|
12289
|
+
bankAmount,
|
|
12290
|
+
submitBtnText,
|
|
12291
|
+
session_token,
|
|
12292
|
+
customerId,
|
|
12293
|
+
callback,
|
|
12294
|
+
merchantName,
|
|
12295
|
+
isPreAuth,
|
|
12296
|
+
surcharge,
|
|
12297
|
+
submitBtnClass,
|
|
12298
|
+
submitBtnIcon,
|
|
12299
|
+
isRequest,
|
|
12300
|
+
pass_fee,
|
|
12301
|
+
pass_fee_amount,
|
|
12302
|
+
require3ds,
|
|
12303
|
+
autoTrigger,
|
|
12304
|
+
setShow,
|
|
12305
|
+
setHandleCloseRef: setChildHandleClose,
|
|
12306
|
+
isPartial,
|
|
12307
|
+
bankSurcharge,
|
|
12308
|
+
partialRef
|
|
12309
|
+
}),
|
|
12310
|
+
[
|
|
12311
|
+
amount,
|
|
12312
|
+
bankAmount,
|
|
12313
|
+
submitBtnText,
|
|
12314
|
+
session_token,
|
|
12315
|
+
customerId,
|
|
12316
|
+
callback,
|
|
12317
|
+
merchantName,
|
|
12318
|
+
isPreAuth,
|
|
12319
|
+
surcharge,
|
|
12320
|
+
submitBtnClass,
|
|
12321
|
+
submitBtnIcon,
|
|
12322
|
+
isRequest,
|
|
12323
|
+
pass_fee,
|
|
12324
|
+
pass_fee_amount,
|
|
12325
|
+
require3ds,
|
|
12326
|
+
autoTrigger,
|
|
12327
|
+
isPartial,
|
|
12328
|
+
bankSurcharge,
|
|
12329
|
+
partialRef
|
|
12330
|
+
]
|
|
12331
|
+
);
|
|
12332
|
+
const [commonProps, setCommonProps] = useState13(initialCommonProps);
|
|
12333
|
+
useEffect21(() => {
|
|
12334
|
+
if (show) {
|
|
12335
|
+
setCommonProps(initialCommonProps);
|
|
12336
|
+
}
|
|
12337
|
+
}, [show, initialCommonProps]);
|
|
12338
|
+
const getskyosOrderDetails = async () => {
|
|
12339
|
+
var _a;
|
|
12340
|
+
setLoading(true);
|
|
12341
|
+
try {
|
|
12342
|
+
const res = await axios11.get(
|
|
12343
|
+
`${masterBaseUrl}api/v1/gateway/get-order-details/${session_token}`,
|
|
12344
|
+
{ params: { isPartial, partialRef } }
|
|
12345
|
+
);
|
|
12346
|
+
if ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.result) {
|
|
12347
|
+
const data = res.data.data;
|
|
12348
|
+
if (data == null ? void 0 : data.orderGuid) {
|
|
12349
|
+
setOrderGuid(data == null ? void 0 : data.orderGuid);
|
|
12350
|
+
setRemainingAmount(data == null ? void 0 : data.remainingAmount);
|
|
12351
|
+
}
|
|
12352
|
+
setCommonProps((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
12353
|
+
amount: data.amount,
|
|
12354
|
+
pass_fee_amount: data.pass_fee_amount,
|
|
12355
|
+
pass_fee: data.pass_fee
|
|
12356
|
+
}));
|
|
12357
|
+
}
|
|
12358
|
+
} catch (error) {
|
|
12359
|
+
console.log("error while getting skyosorderdeatils", error);
|
|
12360
|
+
} finally {
|
|
12361
|
+
setLoading(false);
|
|
12362
|
+
}
|
|
12363
|
+
};
|
|
12364
|
+
useEffect21(() => {
|
|
12365
|
+
if (show && isPartial && partialRef) {
|
|
12366
|
+
getskyosOrderDetails();
|
|
12367
|
+
}
|
|
12368
|
+
}, [show, isPartial, partialRef]);
|
|
12369
|
+
console.log(onLoad, "onLoad");
|
|
12370
|
+
useEffect21(() => {
|
|
12371
|
+
const supported = !!window.ApplePaySession;
|
|
12372
|
+
let canPay = false;
|
|
12373
|
+
if (supported) {
|
|
12374
|
+
try {
|
|
12375
|
+
canPay = window.ApplePaySession.canMakePayments();
|
|
12376
|
+
} catch (e) {
|
|
12377
|
+
}
|
|
12378
|
+
}
|
|
12379
|
+
console.log(`ApplePaySession: ${supported}, canMakePayments: ${canPay}`);
|
|
12380
|
+
}, []);
|
|
12381
|
+
return /* @__PURE__ */ jsxs23(Fragment22, { children: [
|
|
12382
|
+
/* @__PURE__ */ jsx39("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
12383
|
+
/* @__PURE__ */ jsx39(DataScript, {}),
|
|
12384
|
+
/* @__PURE__ */ jsx39(FractalTokenizerScript, {}),
|
|
12385
|
+
/* @__PURE__ */ jsx39(SkyChargewidgetstyles, {}),
|
|
12386
|
+
/* @__PURE__ */ jsx39(CardBankRadioStyles, {}),
|
|
12387
|
+
/* @__PURE__ */ jsx39(CustomModal2styles_default, {}),
|
|
12388
|
+
/* @__PURE__ */ jsx39(DataCapScriptLoader, {}),
|
|
12389
|
+
/* @__PURE__ */ jsx39(ApplePayScriptLoader, {}),
|
|
12390
|
+
/* @__PURE__ */ jsx39(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
|
|
12391
|
+
!autoTrigger && /* @__PURE__ */ jsxs23("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
11063
12392
|
submitBtnText,
|
|
11064
12393
|
submitBtnIcon
|
|
11065
12394
|
] }),
|
|
11066
|
-
!autoTrigger ? /* @__PURE__ */
|
|
12395
|
+
!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 }))
|
|
11067
12396
|
] });
|
|
11068
12397
|
};
|
|
11069
12398
|
export {
|
|
11070
12399
|
AddCardEasyPay as AddCard,
|
|
11071
12400
|
CardOnFile,
|
|
12401
|
+
EmbeddedCheckout,
|
|
11072
12402
|
GetPaymentPage,
|
|
11073
12403
|
PartialPayment,
|
|
11074
12404
|
PaymentWidget,
|