@fractalpay/fractalpay-next-dev 0.0.260 → 0.0.262
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 +43 -16
- package/dist/index.js +1845 -515
- 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.262",
|
|
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,6 +3438,7 @@ var DataCapFields = ({
|
|
|
3360
3438
|
tokenKey,
|
|
3361
3439
|
setLoader,
|
|
3362
3440
|
isAddCard,
|
|
3441
|
+
isEmbedded,
|
|
3363
3442
|
customCSS: extraCss,
|
|
3364
3443
|
height
|
|
3365
3444
|
}) => {
|
|
@@ -3387,10 +3466,24 @@ var DataCapFields = ({
|
|
|
3387
3466
|
|
|
3388
3467
|
`;
|
|
3389
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
|
+
}
|
|
3390
3483
|
if (extraCss) {
|
|
3391
3484
|
customCSS += extraCss;
|
|
3392
3485
|
}
|
|
3393
|
-
console.log(customCSS, "
|
|
3486
|
+
console.log(customCSS, "customCSS1555");
|
|
3394
3487
|
const initialize = async () => {
|
|
3395
3488
|
setLoader == null ? void 0 : setLoader(true);
|
|
3396
3489
|
setIframeReady(false);
|
|
@@ -3422,13 +3515,18 @@ var DataCapFields = ({
|
|
|
3422
3515
|
};
|
|
3423
3516
|
initialize();
|
|
3424
3517
|
}, [isOpen, tokenKey]);
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
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");
|
|
3432
3530
|
return /* @__PURE__ */ jsx18(
|
|
3433
3531
|
"iframe",
|
|
3434
3532
|
{
|
|
@@ -8602,7 +8700,7 @@ function PartialPayment(props) {
|
|
|
8602
8700
|
}
|
|
8603
8701
|
|
|
8604
8702
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
8605
|
-
import { useEffect as
|
|
8703
|
+
import { useEffect as useEffect19, useState as useState12, useMemo } from "react";
|
|
8606
8704
|
|
|
8607
8705
|
// src/app/components/Skysystemz/SkyChargewidgetstyles.tsx
|
|
8608
8706
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -8838,6 +8936,17 @@ function SkyChargewidgetstyles() {
|
|
|
8838
8936
|
text-align : left !important;
|
|
8839
8937
|
text-transform: uppercase !important;
|
|
8840
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
|
+
}
|
|
8841
8950
|
.form-control-frac{
|
|
8842
8951
|
display: block;
|
|
8843
8952
|
width: 100%;
|
|
@@ -8872,7 +8981,7 @@ function SkyChargewidgetstyles() {
|
|
|
8872
8981
|
}
|
|
8873
8982
|
.exp-date-year-container .form-group {
|
|
8874
8983
|
flex: 1;
|
|
8875
|
-
padding-left:.75rem;
|
|
8984
|
+
padding-left:.75rem !important;
|
|
8876
8985
|
}
|
|
8877
8986
|
.card-crdi {
|
|
8878
8987
|
display: flex;
|
|
@@ -8889,7 +8998,7 @@ function SkyChargewidgetstyles() {
|
|
|
8889
8998
|
}
|
|
8890
8999
|
.exp-date-year-container .form-group-frac{
|
|
8891
9000
|
flex:1;
|
|
8892
|
-
padding: 0px !important
|
|
9001
|
+
// padding: 0px !important
|
|
8893
9002
|
|
|
8894
9003
|
}
|
|
8895
9004
|
|
|
@@ -9390,13 +9499,54 @@ margin:0px !important;
|
|
|
9390
9499
|
padding:0px !important;
|
|
9391
9500
|
}
|
|
9392
9501
|
|
|
9393
|
-
|
|
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
|
+
|
|
9394
9544
|
|
|
9395
9545
|
` });
|
|
9396
9546
|
}
|
|
9397
9547
|
|
|
9398
9548
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9399
|
-
import { useCallback, useEffect as
|
|
9549
|
+
import { useCallback, useEffect as useEffect18, useRef as useRef12, useState as useState11 } from "react";
|
|
9400
9550
|
import axios9 from "axios";
|
|
9401
9551
|
import Swal5 from "sweetalert2";
|
|
9402
9552
|
|
|
@@ -9537,113 +9687,604 @@ function CheckoutWrapper({ clientSecret, onSuccess, showLoader, setError, sessio
|
|
|
9537
9687
|
// src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
|
|
9538
9688
|
import { IoArrowBack as IoArrowBack4 } from "react-icons/io5";
|
|
9539
9689
|
import { NumericFormat as NumericFormat2 } from "react-number-format";
|
|
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
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
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
|
|
9601
9893
|
};
|
|
9602
|
-
const
|
|
9603
|
-
const
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
"padding": "0px",
|
|
9610
|
-
"appearance": "none",
|
|
9611
|
-
"outline": "none",
|
|
9612
|
-
"border": "none",
|
|
9613
|
-
"box-shadow": "none"
|
|
9614
|
-
},
|
|
9615
|
-
":focus": {
|
|
9616
|
-
"color": "#212529",
|
|
9617
|
-
"outline": "none",
|
|
9618
|
-
"border": "none"
|
|
9619
|
-
},
|
|
9620
|
-
"::placeholder": {
|
|
9621
|
-
"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
|
|
9622
9901
|
}
|
|
9623
9902
|
};
|
|
9624
|
-
const
|
|
9625
|
-
|
|
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;
|
|
9626
9914
|
try {
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
}
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
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"
|
|
9642
9934
|
}
|
|
9643
|
-
}
|
|
9644
|
-
|
|
9645
|
-
|
|
9646
|
-
|
|
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
|
+
}
|
|
9647
10288
|
const chargeResponse = await axios9.post(`${masterBaseUrl}api/v1/gateway/charge/${session_token}`, dataObj);
|
|
9648
10289
|
if ((_a2 = chargeResponse == null ? void 0 : chargeResponse.data) == null ? void 0 : _a2.result) {
|
|
9649
10290
|
let callbackdata = {
|
|
@@ -9769,14 +10410,23 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9769
10410
|
setAchError(errors);
|
|
9770
10411
|
return Object.keys(errors).length > 0 || !isBankConsentChecked;
|
|
9771
10412
|
};
|
|
9772
|
-
const completeFractalFlow = async (tokenizeData, intentid) => {
|
|
10413
|
+
const completeFractalFlow = async (tokenizeData, intentid, typeoftoken) => {
|
|
9773
10414
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
9774
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
|
+
}
|
|
9775
10424
|
let token = tokenizeData;
|
|
9776
10425
|
let verifyandsaveresp = await axios9.post(`${masterBaseUrl}api/v1/gateway/verify-and-save/${session_token}`, {
|
|
9777
10426
|
token,
|
|
9778
10427
|
require3ds,
|
|
9779
|
-
pass_fee
|
|
10428
|
+
pass_fee,
|
|
10429
|
+
typeoftoken
|
|
9780
10430
|
});
|
|
9781
10431
|
if ((verifyandsaveresp == null ? void 0 : verifyandsaveresp.status) == 200) {
|
|
9782
10432
|
let responsetemp = (_a2 = verifyandsaveresp == null ? void 0 : verifyandsaveresp.data) == null ? void 0 : _a2.data;
|
|
@@ -9808,7 +10458,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9808
10458
|
}
|
|
9809
10459
|
};
|
|
9810
10460
|
const handleFractalTokenFlow = async () => {
|
|
9811
|
-
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;
|
|
9812
10462
|
try {
|
|
9813
10463
|
const requestOptions = {
|
|
9814
10464
|
method: "POST",
|
|
@@ -9849,17 +10499,29 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9849
10499
|
three_ds_data
|
|
9850
10500
|
);
|
|
9851
10501
|
} catch (error2) {
|
|
9852
|
-
|
|
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);
|
|
9853
10515
|
hideLoader();
|
|
9854
10516
|
}
|
|
9855
10517
|
if (tokenizeData == null ? void 0 : tokenizeData.token) {
|
|
9856
10518
|
let ThreedsData = tokenizeData == null ? void 0 : tokenizeData.stripe_three_ds_response;
|
|
9857
|
-
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)) {
|
|
9858
10520
|
setError("Something went wrong. Please try again later.");
|
|
9859
10521
|
}
|
|
9860
10522
|
if (require3ds) {
|
|
9861
|
-
if (!((
|
|
9862
|
-
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);
|
|
9863
10525
|
} else {
|
|
9864
10526
|
hideLoader();
|
|
9865
10527
|
setStripeResponse(__spreadProps(__spreadValues({}, ThreedsData == null ? void 0 : ThreedsData.data), {
|
|
@@ -9875,11 +10537,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9875
10537
|
console.log(error2, "error");
|
|
9876
10538
|
let readableMessage = "Something went wrong!";
|
|
9877
10539
|
try {
|
|
9878
|
-
const rawError = ((
|
|
10540
|
+
const rawError = ((_u2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _u2.data) || (error2 == null ? void 0 : error2.message) || "";
|
|
9879
10541
|
const errorText = typeof rawError === "string" ? rawError : JSON.stringify(rawError);
|
|
9880
|
-
const lines = ((
|
|
10542
|
+
const lines = ((_w = (_v = errorText.split) == null ? void 0 : _v.call(errorText, "\n")) == null ? void 0 : _w.filter(Boolean)) || [];
|
|
9881
10543
|
const lastLine = lines.at(-1) || "";
|
|
9882
|
-
const parts = (
|
|
10544
|
+
const parts = (_x = lastLine.split) == null ? void 0 : _x.call(lastLine, ": ");
|
|
9883
10545
|
readableMessage = (parts == null ? void 0 : parts.length) > 1 ? parts.pop().trim() : lastLine.trim() || readableMessage;
|
|
9884
10546
|
} catch (e) {
|
|
9885
10547
|
readableMessage = "Something went wrong!";
|
|
@@ -9887,8 +10549,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9887
10549
|
setError(readableMessage);
|
|
9888
10550
|
callback({
|
|
9889
10551
|
error: readableMessage,
|
|
9890
|
-
result: (
|
|
9891
|
-
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
|
|
9892
10554
|
});
|
|
9893
10555
|
}
|
|
9894
10556
|
};
|
|
@@ -9914,6 +10576,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9914
10576
|
};
|
|
9915
10577
|
const submitFunc = async (e) => {
|
|
9916
10578
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
|
|
10579
|
+
debugger;
|
|
9917
10580
|
e.preventDefault();
|
|
9918
10581
|
const el = document.activeElement;
|
|
9919
10582
|
if (el instanceof HTMLElement) {
|
|
@@ -10305,8 +10968,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10305
10968
|
});
|
|
10306
10969
|
};
|
|
10307
10970
|
const handlechargeCustomer = async (e) => {
|
|
10308
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2
|
|
10309
|
-
e.currentTarget.blur();
|
|
10971
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
10972
|
+
e == null ? void 0 : e.currentTarget.blur();
|
|
10310
10973
|
if (loading) return;
|
|
10311
10974
|
let customer_id = customerId;
|
|
10312
10975
|
let card_id = selectedCard == null ? void 0 : selectedCard.id;
|
|
@@ -10353,7 +11016,6 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10353
11016
|
statusCode: (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.status
|
|
10354
11017
|
});
|
|
10355
11018
|
hideLoader();
|
|
10356
|
-
setError(((_i2 = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.message) || "Something went wrong!");
|
|
10357
11019
|
}
|
|
10358
11020
|
} else {
|
|
10359
11021
|
setError("Please Select A Card/Bank");
|
|
@@ -10429,21 +11091,21 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10429
11091
|
setOrderLoader(false);
|
|
10430
11092
|
}
|
|
10431
11093
|
};
|
|
10432
|
-
|
|
11094
|
+
useEffect18(() => {
|
|
10433
11095
|
if (!show && !autoTrigger) {
|
|
10434
11096
|
hasRunRef.current = false;
|
|
10435
11097
|
cardListRunRef.current = false;
|
|
10436
11098
|
}
|
|
10437
11099
|
}, [show, autoTrigger]);
|
|
10438
|
-
|
|
10439
|
-
if (!hasRunRef.current && (show || autoTrigger)) {
|
|
11100
|
+
useEffect18(() => {
|
|
11101
|
+
if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
|
|
10440
11102
|
getPaymentDetails();
|
|
10441
11103
|
if (isPartial && !partialRef) {
|
|
10442
11104
|
crateOrderFrac();
|
|
10443
11105
|
}
|
|
10444
11106
|
}
|
|
10445
|
-
}, [show, autoTrigger, isPartial]);
|
|
10446
|
-
|
|
11107
|
+
}, [show, autoTrigger, isPartial, onLoad]);
|
|
11108
|
+
useEffect18(() => {
|
|
10447
11109
|
if ((show || autoTrigger) && pass_fee_amount) {
|
|
10448
11110
|
let cashdisc = Number(amount) - Number(pass_fee_amount);
|
|
10449
11111
|
if (cashdisc && !isNaN(cashdisc)) {
|
|
@@ -10505,7 +11167,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10505
11167
|
console.error("3DS Auth failed \u274C", status);
|
|
10506
11168
|
setError(`3DS Authentication ${status}`);
|
|
10507
11169
|
};
|
|
10508
|
-
|
|
11170
|
+
useEffect18(() => {
|
|
10509
11171
|
if (setHandleCloseRef) {
|
|
10510
11172
|
setHandleCloseRef(() => handleClose);
|
|
10511
11173
|
}
|
|
@@ -10523,24 +11185,95 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10523
11185
|
setPartialError("");
|
|
10524
11186
|
}
|
|
10525
11187
|
};
|
|
10526
|
-
|
|
11188
|
+
useEffect18(() => {
|
|
10527
11189
|
if (typeof FractalTokenizer === "undefined") return;
|
|
10528
11190
|
const tokenizer = new FractalTokenizer({
|
|
10529
11191
|
styles: {}
|
|
10530
11192
|
});
|
|
10531
11193
|
}, []);
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
|
|
10536
|
-
|
|
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: () => {
|
|
10537
11270
|
setErrorIframe("");
|
|
10538
|
-
} }) }),
|
|
10539
|
-
|
|
10540
|
-
(loading || loading2 || loadingIframe) && /* @__PURE__ */
|
|
10541
|
-
/* @__PURE__ */
|
|
10542
|
-
/* @__PURE__ */
|
|
10543
|
-
(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(
|
|
10544
11277
|
ThreeDSChallenge,
|
|
10545
11278
|
{
|
|
10546
11279
|
containerRef: threeDSContainerRef,
|
|
@@ -10550,40 +11283,33 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10550
11283
|
onSuccess: handleSuccess,
|
|
10551
11284
|
onError: handleError
|
|
10552
11285
|
}
|
|
10553
|
-
) : /* @__PURE__ */
|
|
10554
|
-
/* @__PURE__ */
|
|
10555
|
-
/* @__PURE__ */
|
|
10556
|
-
/* @__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" }) }) })
|
|
10557
11290
|
] }) }),
|
|
10558
|
-
/* @__PURE__ */
|
|
10559
|
-
/* @__PURE__ */
|
|
10560
|
-
/* @__PURE__ */
|
|
10561
|
-
/* @__PURE__ */
|
|
10562
|
-
/* @__PURE__ */
|
|
10563
|
-
/* @__PURE__ */
|
|
10564
|
-
/* @__PURE__ */
|
|
10565
|
-
(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: [
|
|
10566
11299
|
" ",
|
|
10567
|
-
/* @__PURE__ */
|
|
11300
|
+
/* @__PURE__ */ jsx36(IoArrowBack4, {}),
|
|
10568
11301
|
" Back"
|
|
10569
11302
|
] })
|
|
10570
11303
|
] }),
|
|
10571
|
-
/* @__PURE__ */
|
|
10572
|
-
/* @__PURE__ */
|
|
10573
|
-
/* @__PURE__ */
|
|
10574
|
-
/* @__PURE__ */
|
|
10575
|
-
!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 })
|
|
10576
11309
|
] }),
|
|
10577
|
-
|
|
10578
|
-
/* @__PURE__ */
|
|
10579
|
-
|
|
10580
|
-
" "
|
|
10581
|
-
] }),
|
|
10582
|
-
/* @__PURE__ */ jsx32("p", { children: formatUSD((Number(amount) - Number(cashDiscount)).toFixed(2)) })
|
|
10583
|
-
] }) : null,
|
|
10584
|
-
isPartial && /* @__PURE__ */ jsxs19("div", { className: "frac-partial-payment-input", children: [
|
|
10585
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
|
|
10586
|
-
/* @__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(
|
|
10587
11313
|
NumericFormat2,
|
|
10588
11314
|
{
|
|
10589
11315
|
prefix: "$",
|
|
@@ -10607,331 +11333,406 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10607
11333
|
}
|
|
10608
11334
|
}
|
|
10609
11335
|
),
|
|
10610
|
-
partialError && /* @__PURE__ */
|
|
11336
|
+
partialError && /* @__PURE__ */ jsx36("span", { className: "error-span", children: partialError })
|
|
10611
11337
|
] })
|
|
10612
11338
|
] }) })
|
|
10613
11339
|
] }),
|
|
10614
|
-
/* @__PURE__ */
|
|
10615
|
-
/* @__PURE__ */
|
|
10616
|
-
/* @__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: "" }),
|
|
10617
11343
|
"Secure payments powered by Fractal"
|
|
10618
11344
|
] })
|
|
10619
11345
|
] }),
|
|
10620
|
-
/* @__PURE__ */
|
|
10621
|
-
/* @__PURE__ */
|
|
10622
|
-
/* @__PURE__ */
|
|
10623
|
-
/* @__PURE__ */
|
|
10624
|
-
|
|
10625
|
-
/* @__PURE__ */ jsx32(IoArrowBack4, {})
|
|
10626
|
-
] }) }),
|
|
10627
|
-
/* @__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 })
|
|
10628
11351
|
] }),
|
|
10629
|
-
/* @__PURE__ */
|
|
10630
|
-
/* @__PURE__ */
|
|
10631
|
-
/* @__PURE__ */
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
(
|
|
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" })
|
|
10656
11383
|
] }),
|
|
10657
|
-
/* @__PURE__ */
|
|
10658
|
-
/* @__PURE__ */
|
|
10659
|
-
/* @__PURE__ */
|
|
10660
|
-
|
|
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
|
+
] })
|
|
11390
|
+
] }),
|
|
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
|
+
onSubmit && /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11398
|
+
/* @__PURE__ */ jsx36(
|
|
11399
|
+
ApplePayButton,
|
|
10661
11400
|
{
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
11401
|
+
applePayAmount: partialAmount ? partialAmount : amount,
|
|
11402
|
+
applePayMerchantId,
|
|
11403
|
+
applePayMerchantName: merchantName,
|
|
11404
|
+
completeFractalFlow,
|
|
11405
|
+
showLoader
|
|
10665
11406
|
}
|
|
10666
|
-
)
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "zip", children: "ZIP" }),
|
|
10670
|
-
/* @__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) }),
|
|
10671
|
-
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode })
|
|
10672
|
-
] }),
|
|
10673
|
-
customerId && /* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
|
|
10674
|
-
/* @__PURE__ */ jsx32(
|
|
10675
|
-
"input",
|
|
11407
|
+
),
|
|
11408
|
+
/* @__PURE__ */ jsx36(
|
|
11409
|
+
GooglePayComponent,
|
|
10676
11410
|
{
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
|
|
10680
|
-
|
|
10681
|
-
|
|
11411
|
+
amount: partialAmount ? partialAmount : amount,
|
|
11412
|
+
googlePayEnvironment,
|
|
11413
|
+
googlePayGatewayMerchantId,
|
|
11414
|
+
googlePayMerchantId,
|
|
11415
|
+
googlePayMerchantName: merchantName,
|
|
11416
|
+
completeFractalFlow,
|
|
11417
|
+
setLoading
|
|
10682
11418
|
}
|
|
10683
11419
|
),
|
|
10684
|
-
/* @__PURE__ */
|
|
10685
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
10686
|
-
/* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
|
|
10687
|
-
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
|
|
10688
|
-
"svg",
|
|
10689
|
-
{
|
|
10690
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
10691
|
-
width: "20",
|
|
10692
|
-
height: "20",
|
|
10693
|
-
viewBox: "0 0 20 20",
|
|
10694
|
-
fill: "none",
|
|
10695
|
-
children: [
|
|
10696
|
-
/* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
10697
|
-
/* @__PURE__ */ jsx32(
|
|
10698
|
-
"path",
|
|
10699
|
-
{
|
|
10700
|
-
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",
|
|
10701
|
-
fill: "#161616"
|
|
10702
|
-
}
|
|
10703
|
-
)
|
|
10704
|
-
]
|
|
10705
|
-
}
|
|
10706
|
-
) }),
|
|
10707
|
-
/* @__PURE__ */ jsx32("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
10708
|
-
"If checked, I agree to give the ",
|
|
10709
|
-
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10710
|
-
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
10711
|
-
] }) })
|
|
10712
|
-
] })
|
|
10713
|
-
] }) })
|
|
10714
|
-
] }),
|
|
10715
|
-
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx32("button", { type: "submit", style: { margin: 0 }, className: "pay-button", children: partialAmount ? formatUSD((_f = Number(partialAmount)) == null ? void 0 : _f.toFixed(2)) : formatUSD((_g = Number(amount)) == null ? void 0 : _g.toFixed(2)) }) })
|
|
10716
|
-
] }) : /* @__PURE__ */ jsxs19("form", { id: "PaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
10717
|
-
if (e.key === "Enter" && loading) {
|
|
10718
|
-
e.preventDefault();
|
|
10719
|
-
e.stopPropagation();
|
|
10720
|
-
}
|
|
10721
|
-
}, children: [
|
|
10722
|
-
/* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
10723
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10724
|
-
/* @__PURE__ */ jsx32("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
10725
|
-
/* @__PURE__ */ jsx32("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
10726
|
-
const value = e.target.value;
|
|
10727
|
-
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
10728
|
-
handleCardChange("cardName", value);
|
|
10729
|
-
}
|
|
10730
|
-
} }),
|
|
10731
|
-
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11420
|
+
/* @__PURE__ */ jsx36("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx36("span", { children: "or" }) })
|
|
10732
11421
|
] }),
|
|
10733
|
-
/* @__PURE__ */
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
tokenKey: dcToken,
|
|
10738
|
-
setLoader: activeinCard === "form" ? setLoadingIframe : null
|
|
11422
|
+
/* @__PURE__ */ jsxs21("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11423
|
+
if (e.key === "Enter" && loading) {
|
|
11424
|
+
e.preventDefault();
|
|
11425
|
+
e.stopPropagation();
|
|
10739
11426
|
}
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
11427
|
+
}, children: [
|
|
11428
|
+
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11429
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11430
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11431
|
+
/* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11432
|
+
const value = e.target.value;
|
|
11433
|
+
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11434
|
+
handleCardChange("cardName", value);
|
|
11435
|
+
}
|
|
11436
|
+
} }),
|
|
11437
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11438
|
+
] }),
|
|
11439
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11440
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
|
|
11441
|
+
/* @__PURE__ */ jsx36("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx36(
|
|
11442
|
+
FractalFields_default,
|
|
11443
|
+
{
|
|
11444
|
+
fractalStyles,
|
|
11445
|
+
tokenizerRef,
|
|
11446
|
+
isSky: true
|
|
11447
|
+
}
|
|
11448
|
+
) })
|
|
11449
|
+
] }),
|
|
11450
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11451
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11452
|
+
/* @__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) }),
|
|
11453
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11454
|
+
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11455
|
+
"Credit cards include a fee amount of ",
|
|
11456
|
+
/* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11457
|
+
"."
|
|
11458
|
+
] })
|
|
11459
|
+
] }),
|
|
11460
|
+
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: [
|
|
11461
|
+
/* @__PURE__ */ jsx36(
|
|
11462
|
+
"input",
|
|
11463
|
+
{
|
|
11464
|
+
type: "checkbox",
|
|
11465
|
+
id: "save_card",
|
|
11466
|
+
className: "toggle-checkbox",
|
|
11467
|
+
checked: saveCardInfo,
|
|
11468
|
+
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
11469
|
+
}
|
|
11470
|
+
),
|
|
11471
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11472
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11473
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
|
|
11474
|
+
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
|
|
11475
|
+
"svg",
|
|
11476
|
+
{
|
|
11477
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11478
|
+
width: "20",
|
|
11479
|
+
height: "20",
|
|
11480
|
+
viewBox: "0 0 20 20",
|
|
11481
|
+
fill: "none",
|
|
11482
|
+
children: [
|
|
11483
|
+
/* @__PURE__ */ jsx36("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11484
|
+
/* @__PURE__ */ jsx36(
|
|
11485
|
+
"path",
|
|
11486
|
+
{
|
|
11487
|
+
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",
|
|
11488
|
+
fill: "#161616"
|
|
11489
|
+
}
|
|
11490
|
+
)
|
|
11491
|
+
]
|
|
11492
|
+
}
|
|
11493
|
+
) }),
|
|
11494
|
+
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11495
|
+
"If checked, I agree to give the ",
|
|
11496
|
+
/* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
|
|
11497
|
+
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11498
|
+
] }) })
|
|
11499
|
+
] })
|
|
11500
|
+
] }) })
|
|
11501
|
+
] }),
|
|
11502
|
+
/* @__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)) }) })
|
|
11503
|
+
] })
|
|
11504
|
+
] }) : /* @__PURE__ */ jsxs21("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
|
|
11505
|
+
if (e.key === "Enter" && loading) {
|
|
11506
|
+
e.preventDefault();
|
|
11507
|
+
e.stopPropagation();
|
|
11508
|
+
}
|
|
11509
|
+
}, children: [
|
|
11510
|
+
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
|
|
11511
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11512
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
|
|
11513
|
+
/* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
|
11514
|
+
const value = e.target.value;
|
|
11515
|
+
if (/^[a-zA-Z\s]*$/.test(value)) {
|
|
11516
|
+
handleCardChange("cardName", value);
|
|
11517
|
+
}
|
|
11518
|
+
} }),
|
|
11519
|
+
(cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
|
|
11520
|
+
] }),
|
|
11521
|
+
/* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx36(
|
|
11522
|
+
DataCapFields,
|
|
10749
11523
|
{
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
|
|
10753
|
-
|
|
10754
|
-
|
|
11524
|
+
isOpen: show || autoTrigger,
|
|
11525
|
+
tokenKey: dcToken,
|
|
11526
|
+
setLoader: activeinCard === "form" ? setLoadingIframe : null,
|
|
11527
|
+
isEmbedded: onSubmit ? true : false,
|
|
11528
|
+
customCSS: customCSS2
|
|
10755
11529
|
}
|
|
10756
|
-
),
|
|
10757
|
-
/* @__PURE__ */
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
/* @__PURE__ */
|
|
10761
|
-
|
|
11530
|
+
) }),
|
|
11531
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11532
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "zip", children: "ZIP" }),
|
|
11533
|
+
/* @__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) }),
|
|
11534
|
+
(cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
|
|
11535
|
+
pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11536
|
+
"Credit cards include a fee amount of ",
|
|
11537
|
+
/* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
|
|
11538
|
+
"."
|
|
11539
|
+
] })
|
|
11540
|
+
] }),
|
|
11541
|
+
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: [
|
|
11542
|
+
/* @__PURE__ */ jsx36(
|
|
11543
|
+
"input",
|
|
10762
11544
|
{
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
children: [
|
|
10769
|
-
/* @__PURE__ */ jsx32("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
10770
|
-
/* @__PURE__ */ jsx32(
|
|
10771
|
-
"path",
|
|
10772
|
-
{
|
|
10773
|
-
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",
|
|
10774
|
-
fill: "#161616"
|
|
10775
|
-
}
|
|
10776
|
-
)
|
|
10777
|
-
]
|
|
11545
|
+
type: "checkbox",
|
|
11546
|
+
id: "save_card",
|
|
11547
|
+
className: "toggle-checkbox",
|
|
11548
|
+
checked: saveCardInfo,
|
|
11549
|
+
onChange: (e) => setSaveCardInfo(e.target.checked)
|
|
10778
11550
|
}
|
|
10779
|
-
)
|
|
10780
|
-
/* @__PURE__ */
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
11551
|
+
),
|
|
11552
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", className: "toggle-label" }),
|
|
11553
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "save_card", children: "Save card for future payments " }),
|
|
11554
|
+
/* @__PURE__ */ jsxs21("div", { className: "frac-tooltip-wrapper", children: [
|
|
11555
|
+
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs21(
|
|
11556
|
+
"svg",
|
|
11557
|
+
{
|
|
11558
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11559
|
+
width: "20",
|
|
11560
|
+
height: "20",
|
|
11561
|
+
viewBox: "0 0 20 20",
|
|
11562
|
+
fill: "none",
|
|
11563
|
+
children: [
|
|
11564
|
+
/* @__PURE__ */ jsx36("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
|
|
11565
|
+
/* @__PURE__ */ jsx36(
|
|
11566
|
+
"path",
|
|
11567
|
+
{
|
|
11568
|
+
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",
|
|
11569
|
+
fill: "#161616"
|
|
11570
|
+
}
|
|
11571
|
+
)
|
|
11572
|
+
]
|
|
11573
|
+
}
|
|
11574
|
+
) }),
|
|
11575
|
+
/* @__PURE__ */ jsx36("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11576
|
+
"If checked, I agree to give the ",
|
|
11577
|
+
/* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
|
|
11578
|
+
" permission to charge this credit card for agreed-upon purchases in the future."
|
|
11579
|
+
] }) })
|
|
11580
|
+
] })
|
|
11581
|
+
] }) })
|
|
11582
|
+
] }),
|
|
11583
|
+
/* @__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)) }) })
|
|
11584
|
+
] })
|
|
10798
11585
|
] }),
|
|
10799
|
-
|
|
10800
|
-
/* @__PURE__ */
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
11586
|
+
/* @__PURE__ */ jsx36("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11587
|
+
!onSubmit && /* @__PURE__ */ jsxs21("div", { className: "frac-heading-card-wrap", children: [
|
|
11588
|
+
/* @__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: [
|
|
11589
|
+
" ",
|
|
11590
|
+
/* @__PURE__ */ jsx36(IoArrowBack4, {})
|
|
11591
|
+
] }) }),
|
|
11592
|
+
/* @__PURE__ */ jsx36("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
|
|
11593
|
+
] }),
|
|
11594
|
+
activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs21(Fragment20, { children: [
|
|
11595
|
+
/* @__PURE__ */ jsx36(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
|
|
11596
|
+
setActiveinBank("form");
|
|
11597
|
+
} }),
|
|
11598
|
+
/* @__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)) }) })
|
|
11599
|
+
] }) : /* @__PURE__ */ jsxs21("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
|
|
11600
|
+
if (e.key === "Enter" && loading) {
|
|
11601
|
+
e.preventDefault();
|
|
11602
|
+
e.stopPropagation();
|
|
11603
|
+
}
|
|
10813
11604
|
}, children: [
|
|
10814
|
-
/* @__PURE__ */
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
11605
|
+
/* @__PURE__ */ jsxs21("div", { className: "ach-scrl", style: {
|
|
11606
|
+
minHeight: "444px",
|
|
11607
|
+
maxHeight: "444px"
|
|
11608
|
+
}, children: [
|
|
11609
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11610
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
11611
|
+
/* @__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 }),
|
|
11612
|
+
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
11613
|
+
] }),
|
|
11614
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11615
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "routingnumber", children: "Routing number" }),
|
|
11616
|
+
/* @__PURE__ */ jsx36(
|
|
11617
|
+
"input",
|
|
11618
|
+
{
|
|
11619
|
+
type: "text",
|
|
11620
|
+
id: "routingnumber",
|
|
11621
|
+
className: "form-control-frac",
|
|
11622
|
+
maxLength: 9,
|
|
11623
|
+
placeholder: "000000000",
|
|
11624
|
+
name: "routingNumber",
|
|
11625
|
+
value: (_o = achData == null ? void 0 : achData.routingNumber) != null ? _o : "",
|
|
11626
|
+
onChange: handleChangeAch
|
|
11627
|
+
}
|
|
11628
|
+
),
|
|
11629
|
+
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
|
|
11630
|
+
] }),
|
|
11631
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11632
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "accountnumber", children: "Account number" }),
|
|
11633
|
+
/* @__PURE__ */ jsx36(
|
|
11634
|
+
"input",
|
|
11635
|
+
{
|
|
11636
|
+
type: "text",
|
|
11637
|
+
id: "accountnumber",
|
|
11638
|
+
className: "form-control-frac",
|
|
11639
|
+
maxLength: 16,
|
|
11640
|
+
placeholder: "0000000000",
|
|
11641
|
+
name: "accountNumber",
|
|
11642
|
+
value: (_p = achData == null ? void 0 : achData.accountNumber) != null ? _p : "",
|
|
11643
|
+
onChange: handleChangeAch
|
|
11644
|
+
}
|
|
11645
|
+
),
|
|
11646
|
+
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
|
|
11647
|
+
] }),
|
|
11648
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11649
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
|
|
11650
|
+
/* @__PURE__ */ jsx36(
|
|
11651
|
+
"input",
|
|
11652
|
+
{
|
|
11653
|
+
type: "text",
|
|
11654
|
+
id: "confirmaccountnumber",
|
|
11655
|
+
className: "form-control-frac",
|
|
11656
|
+
maxLength: 16,
|
|
11657
|
+
placeholder: "0000000000",
|
|
11658
|
+
name: "confirmAccountNumber",
|
|
11659
|
+
value: (_q = achData == null ? void 0 : achData.confirmAccountNumber) != null ? _q : "",
|
|
11660
|
+
onChange: handleChangeAch
|
|
11661
|
+
}
|
|
11662
|
+
),
|
|
11663
|
+
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
|
|
11664
|
+
] }),
|
|
11665
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11666
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "bankname", children: "Bank name" }),
|
|
11667
|
+
/* @__PURE__ */ jsx36(
|
|
11668
|
+
"input",
|
|
11669
|
+
{
|
|
11670
|
+
type: "text",
|
|
11671
|
+
id: "bankname",
|
|
11672
|
+
className: "form-control-frac",
|
|
11673
|
+
maxLength: 100,
|
|
11674
|
+
placeholder: "My Bank",
|
|
11675
|
+
name: "bankName",
|
|
11676
|
+
value: (_r = achData == null ? void 0 : achData.bankName) != null ? _r : "",
|
|
11677
|
+
onChange: handleChangeAch
|
|
11678
|
+
}
|
|
11679
|
+
),
|
|
11680
|
+
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
|
|
11681
|
+
] }),
|
|
11682
|
+
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11683
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "companyName", children: "Company name" }),
|
|
11684
|
+
/* @__PURE__ */ jsx36(
|
|
11685
|
+
"input",
|
|
11686
|
+
{
|
|
11687
|
+
type: "text",
|
|
11688
|
+
id: "companyName",
|
|
11689
|
+
className: "form-control-frac",
|
|
11690
|
+
maxLength: 100,
|
|
11691
|
+
placeholder: "My Company",
|
|
11692
|
+
name: "companyName",
|
|
11693
|
+
value: (_s = achData == null ? void 0 : achData.companyName) != null ? _s : "",
|
|
11694
|
+
onChange: handleChangeAch
|
|
11695
|
+
}
|
|
11696
|
+
),
|
|
11697
|
+
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
|
|
11698
|
+
] }),
|
|
11699
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac", children: [
|
|
11700
|
+
/* @__PURE__ */ jsx36("label", { htmlFor: "accounttype", children: "Select account type" }),
|
|
11701
|
+
/* @__PURE__ */ jsxs21("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
|
|
11702
|
+
/* @__PURE__ */ jsx36("option", { value: "", children: "Select account" }),
|
|
11703
|
+
accountTypes.map((type) => /* @__PURE__ */ jsx36("option", { value: type.value, children: type.label }, type.value))
|
|
11704
|
+
] }),
|
|
11705
|
+
bankFeeAmount > 0 && /* @__PURE__ */ jsxs21("small", { className: "frac-fee-text", children: [
|
|
11706
|
+
"There is a processing fee of ",
|
|
11707
|
+
/* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
|
|
11708
|
+
"."
|
|
11709
|
+
] }),
|
|
11710
|
+
/* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11711
|
+
/* @__PURE__ */ jsx36("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
|
|
11712
|
+
setIsBankConsentChecked(e.target.checked);
|
|
11713
|
+
if (e.target.checked) {
|
|
11714
|
+
setErrorBankConsent("");
|
|
11715
|
+
}
|
|
11716
|
+
} }),
|
|
11717
|
+
/* @__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.` })
|
|
11718
|
+
] }),
|
|
11719
|
+
errorBankConsent && /* @__PURE__ */ jsx36("span", { className: "error-span", children: errorBankConsent }),
|
|
11720
|
+
customerId && /* @__PURE__ */ jsxs21("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
11721
|
+
/* @__PURE__ */ jsx36("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
11722
|
+
/* @__PURE__ */ jsx36("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
|
|
11723
|
+
] }),
|
|
11724
|
+
saveACHinfo && /* @__PURE__ */ jsx36("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs21("p", { children: [
|
|
11725
|
+
"If checked, I agree to give the ",
|
|
11726
|
+
/* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
|
|
11727
|
+
" permission to charge this bank account for agreed-upon purchases in the future."
|
|
11728
|
+
] }) })
|
|
10909
11729
|
] })
|
|
10910
11730
|
] }),
|
|
10911
|
-
/* @__PURE__ */
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
}
|
|
10917
|
-
} }),
|
|
10918
|
-
/* @__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.` })
|
|
10919
|
-
] }),
|
|
10920
|
-
errorBankConsent && /* @__PURE__ */ jsx32("span", { className: "error-span", children: errorBankConsent }),
|
|
10921
|
-
customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
10922
|
-
/* @__PURE__ */ jsx32("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
10923
|
-
/* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save Bank" })
|
|
10924
|
-
] }),
|
|
10925
|
-
saveACHinfo && /* @__PURE__ */ jsx32("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
10926
|
-
"If checked, I agree to give the ",
|
|
10927
|
-
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10928
|
-
" permission to charge this bank account for agreed-upon purchases in the future."
|
|
10929
|
-
] }) })
|
|
10930
|
-
] }),
|
|
10931
|
-
/* @__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)) }) })
|
|
10932
|
-
] })
|
|
10933
|
-
] }) })
|
|
10934
|
-
] }) }) }) })
|
|
11731
|
+
/* @__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)) }) })
|
|
11732
|
+
] })
|
|
11733
|
+
] }) })
|
|
11734
|
+
] })
|
|
11735
|
+
] }) }) })
|
|
10935
11736
|
] })
|
|
10936
11737
|
] })
|
|
10937
11738
|
] })
|
|
@@ -10942,7 +11743,7 @@ var ModelContentSky_default = ModelContentSky;
|
|
|
10942
11743
|
|
|
10943
11744
|
// src/app/components/Skysystemz/PayButtonWithForm.tsx
|
|
10944
11745
|
import axios10 from "axios";
|
|
10945
|
-
import { Fragment as
|
|
11746
|
+
import { Fragment as Fragment21, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
10946
11747
|
var PaymentWidget = ({
|
|
10947
11748
|
amount,
|
|
10948
11749
|
bankAmount,
|
|
@@ -10962,14 +11763,15 @@ var PaymentWidget = ({
|
|
|
10962
11763
|
autoTrigger = false,
|
|
10963
11764
|
isPartial,
|
|
10964
11765
|
bankSurcharge,
|
|
10965
|
-
partialRef
|
|
11766
|
+
partialRef,
|
|
11767
|
+
customCSS: customCSS2
|
|
10966
11768
|
}) => {
|
|
10967
|
-
const [show, setShow] =
|
|
10968
|
-
const [loading, setLoading] =
|
|
10969
|
-
const [childHandleClose, setChildHandleClose] =
|
|
11769
|
+
const [show, setShow] = useState12(autoTrigger || false);
|
|
11770
|
+
const [loading, setLoading] = useState12(false);
|
|
11771
|
+
const [childHandleClose, setChildHandleClose] = useState12(() => () => {
|
|
10970
11772
|
});
|
|
10971
|
-
const [orderGuid, setOrderGuid] =
|
|
10972
|
-
const [remainingAmount, setRemainingAmount] =
|
|
11773
|
+
const [orderGuid, setOrderGuid] = useState12(null);
|
|
11774
|
+
const [remainingAmount, setRemainingAmount] = useState12(null);
|
|
10973
11775
|
const initialCommonProps = useMemo(
|
|
10974
11776
|
() => ({
|
|
10975
11777
|
amount,
|
|
@@ -10992,7 +11794,8 @@ var PaymentWidget = ({
|
|
|
10992
11794
|
setHandleCloseRef: setChildHandleClose,
|
|
10993
11795
|
isPartial,
|
|
10994
11796
|
bankSurcharge,
|
|
10995
|
-
partialRef
|
|
11797
|
+
partialRef,
|
|
11798
|
+
customCSS: customCSS2
|
|
10996
11799
|
}),
|
|
10997
11800
|
[
|
|
10998
11801
|
amount,
|
|
@@ -11016,8 +11819,8 @@ var PaymentWidget = ({
|
|
|
11016
11819
|
partialRef
|
|
11017
11820
|
]
|
|
11018
11821
|
);
|
|
11019
|
-
const [commonProps, setCommonProps] =
|
|
11020
|
-
|
|
11822
|
+
const [commonProps, setCommonProps] = useState12(initialCommonProps);
|
|
11823
|
+
useEffect19(() => {
|
|
11021
11824
|
if (show) {
|
|
11022
11825
|
setCommonProps(initialCommonProps);
|
|
11023
11826
|
}
|
|
@@ -11048,29 +11851,556 @@ var PaymentWidget = ({
|
|
|
11048
11851
|
setLoading(false);
|
|
11049
11852
|
}
|
|
11050
11853
|
};
|
|
11051
|
-
|
|
11854
|
+
useEffect19(() => {
|
|
11052
11855
|
if (show && isPartial && partialRef) {
|
|
11053
11856
|
getskyosOrderDetails();
|
|
11054
11857
|
}
|
|
11055
11858
|
}, [show, isPartial, partialRef]);
|
|
11056
|
-
return /* @__PURE__ */
|
|
11057
|
-
/* @__PURE__ */
|
|
11058
|
-
/* @__PURE__ */
|
|
11059
|
-
/* @__PURE__ */
|
|
11060
|
-
/* @__PURE__ */
|
|
11061
|
-
/* @__PURE__ */
|
|
11062
|
-
/* @__PURE__ */
|
|
11063
|
-
/* @__PURE__ */
|
|
11064
|
-
!autoTrigger && /* @__PURE__ */
|
|
11859
|
+
return /* @__PURE__ */ jsxs22(Fragment21, { children: [
|
|
11860
|
+
/* @__PURE__ */ jsx37("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
11861
|
+
/* @__PURE__ */ jsx37(DataScript, {}),
|
|
11862
|
+
/* @__PURE__ */ jsx37(FractalTokenizerScript, {}),
|
|
11863
|
+
/* @__PURE__ */ jsx37(SkyChargewidgetstyles, {}),
|
|
11864
|
+
/* @__PURE__ */ jsx37(CardBankRadioStyles, {}),
|
|
11865
|
+
/* @__PURE__ */ jsx37(CustomModal2styles_default, {}),
|
|
11866
|
+
/* @__PURE__ */ jsx37(DataCapScriptLoader, {}),
|
|
11867
|
+
!autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
11868
|
+
submitBtnText,
|
|
11869
|
+
submitBtnIcon
|
|
11870
|
+
] }),
|
|
11871
|
+
!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 }))
|
|
11872
|
+
] });
|
|
11873
|
+
};
|
|
11874
|
+
|
|
11875
|
+
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
11876
|
+
import { useEffect as useEffect21, useState as useState13, useMemo as useMemo2 } from "react";
|
|
11877
|
+
import axios11 from "axios";
|
|
11878
|
+
|
|
11879
|
+
// src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
|
|
11880
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
11881
|
+
function EmbeddedCheckoutStyles({ extraCustomCSS }) {
|
|
11882
|
+
return /* @__PURE__ */ jsx38("style", { children: `
|
|
11883
|
+
|
|
11884
|
+
.pay-amount-conatiner{
|
|
11885
|
+
margin-top: 20px !important;
|
|
11886
|
+
margin-bottom: 20px !important ;
|
|
11887
|
+
}
|
|
11888
|
+
|
|
11889
|
+
.frac-pay-container.pay-container {
|
|
11890
|
+
grid-template-columns:1fr;
|
|
11891
|
+
}
|
|
11892
|
+
|
|
11893
|
+
|
|
11894
|
+
/* Card */
|
|
11895
|
+
.plan-card {
|
|
11896
|
+
width: 100%;
|
|
11897
|
+
font-family: Inter, sans-serif;
|
|
11898
|
+
background: #fff;
|
|
11899
|
+
}
|
|
11900
|
+
|
|
11901
|
+
/* Header */
|
|
11902
|
+
.card-header {
|
|
11903
|
+
padding: 12px 0 0 0;
|
|
11904
|
+
}
|
|
11905
|
+
|
|
11906
|
+
/* Button */
|
|
11907
|
+
.collapse-btn {
|
|
11908
|
+
width: 100%;
|
|
11909
|
+
background: none;
|
|
11910
|
+
border: none;
|
|
11911
|
+
display: flex;
|
|
11912
|
+
justify-content: space-between;
|
|
11913
|
+
align-items: center;
|
|
11914
|
+
cursor: pointer;
|
|
11915
|
+
font-size: 15px;
|
|
11916
|
+
padding: 0;
|
|
11917
|
+
}
|
|
11918
|
+
|
|
11919
|
+
/* Arrow */
|
|
11920
|
+
.arrow {
|
|
11921
|
+
transition: transform 0.3s ease;
|
|
11922
|
+
height: 8px;
|
|
11923
|
+
}
|
|
11924
|
+
|
|
11925
|
+
/* Open State */
|
|
11926
|
+
.collapse-btn.open .arrow {
|
|
11927
|
+
transform: rotate(180deg); /* Down */
|
|
11928
|
+
}
|
|
11929
|
+
|
|
11930
|
+
/* Body */
|
|
11931
|
+
.card-body {
|
|
11932
|
+
padding: 0;
|
|
11933
|
+
}
|
|
11934
|
+
|
|
11935
|
+
/* Plan Header */
|
|
11936
|
+
.plan-header {
|
|
11937
|
+
font-size: 15px;
|
|
11938
|
+
font-weight: 600;
|
|
11939
|
+
}
|
|
11940
|
+
|
|
11941
|
+
/* Scrollable List */
|
|
11942
|
+
.plan-list {
|
|
11943
|
+
max-height: 200px;
|
|
11944
|
+
overflow-y: auto;
|
|
11945
|
+
padding-right: 6px;
|
|
11946
|
+
}
|
|
11947
|
+
|
|
11948
|
+
/* Items */
|
|
11949
|
+
.plan-item {
|
|
11950
|
+
display: flex;
|
|
11951
|
+
justify-content: space-between;
|
|
11952
|
+
padding: 6px 0;
|
|
11953
|
+
font-size: 14px;
|
|
11954
|
+
}
|
|
11955
|
+
|
|
11956
|
+
/* Badges */
|
|
11957
|
+
.badge {
|
|
11958
|
+
padding: 4px 10px;
|
|
11959
|
+
border-radius: 12px;
|
|
11960
|
+
font-size: 12px;
|
|
11961
|
+
font-weight: 500;
|
|
11962
|
+
}
|
|
11963
|
+
|
|
11964
|
+
.badge-included {
|
|
11965
|
+
background: #f1f3f5;
|
|
11966
|
+
color: #495057;
|
|
11967
|
+
}
|
|
11968
|
+
|
|
11969
|
+
.badge-available {
|
|
11970
|
+
background: #f8f9fa;
|
|
11971
|
+
color: #212529;
|
|
11972
|
+
}
|
|
11973
|
+
|
|
11974
|
+
/* Helpers */
|
|
11975
|
+
.row-between {
|
|
11976
|
+
display: flex;
|
|
11977
|
+
justify-content: space-between;
|
|
11978
|
+
}
|
|
11979
|
+
|
|
11980
|
+
.text-end {
|
|
11981
|
+
text-align: right;
|
|
11982
|
+
}
|
|
11983
|
+
|
|
11984
|
+
.text-muted {
|
|
11985
|
+
color: #6c757d;
|
|
11986
|
+
font-size: 12px;
|
|
11987
|
+
}
|
|
11988
|
+
|
|
11989
|
+
.fw-semibold {
|
|
11990
|
+
font-weight: 600;
|
|
11991
|
+
}
|
|
11992
|
+
|
|
11993
|
+
.mb-2 {
|
|
11994
|
+
margin-bottom: 8px;
|
|
11995
|
+
}
|
|
11996
|
+
|
|
11997
|
+
/* Divider */
|
|
11998
|
+
.divider {
|
|
11999
|
+
height: 1px;
|
|
12000
|
+
background: #e5e7eb;
|
|
12001
|
+
margin: 8px 0;
|
|
12002
|
+
}
|
|
12003
|
+
|
|
12004
|
+
/* Collapse Animation */
|
|
12005
|
+
.collapse {
|
|
12006
|
+
max-height: 0;
|
|
12007
|
+
overflow: hidden;
|
|
12008
|
+
transition: max-height 0.3s ease;
|
|
12009
|
+
}
|
|
12010
|
+
|
|
12011
|
+
.collapse.show {
|
|
12012
|
+
max-height: 1000px;
|
|
12013
|
+
}
|
|
12014
|
+
.frac-pay-container.pay-container {
|
|
12015
|
+
grid-template-columns:1fr;
|
|
12016
|
+
}
|
|
12017
|
+
.frac-payment-form-div .amt-pay-con {
|
|
12018
|
+
padding-right: 0px;
|
|
12019
|
+
}
|
|
12020
|
+
.frac-payment-form-div .ach-scrl {
|
|
12021
|
+
padding-right: 0px;
|
|
12022
|
+
gap: 10px;
|
|
12023
|
+
max-height: fit-content !important;
|
|
12024
|
+
min-height: fit-content !important;
|
|
12025
|
+
overflow: hidden !important;
|
|
12026
|
+
}
|
|
12027
|
+
.frac-payment-form-div .frac-card-bank-radio-main {
|
|
12028
|
+
display: flex;
|
|
12029
|
+
flex-direction: row;
|
|
12030
|
+
align-items: flex-start;
|
|
12031
|
+
align-self: stretch;
|
|
12032
|
+
border-radius: 14px;
|
|
12033
|
+
border: none;
|
|
12034
|
+
overflow: visible;
|
|
12035
|
+
gap: 10px;
|
|
12036
|
+
}
|
|
12037
|
+
.frac-payment-form-div .frac-card-bank-radio {
|
|
12038
|
+
display: flex;
|
|
12039
|
+
padding: 12px 16px;
|
|
12040
|
+
justify-content: space-between;
|
|
12041
|
+
align-items: center;
|
|
12042
|
+
align-self: stretch;
|
|
12043
|
+
width: 50%;
|
|
12044
|
+
border: 1px solid #E0DFE2;
|
|
12045
|
+
border-radius: 10px;
|
|
12046
|
+
box-shadow: rgba(149, 157, 165, 0.2) 0px 1px 4px;
|
|
12047
|
+
}
|
|
12048
|
+
.frac-payment-form-div .frac-card-bank-radio.frac-active {
|
|
12049
|
+
background: #fff;
|
|
12050
|
+
border: 2px solid #004eab !important;
|
|
12051
|
+
}
|
|
12052
|
+
|
|
12053
|
+
.frac-payment-form-div .form-control-frac {
|
|
12054
|
+
border: 1px solid #dee2e6 !important;
|
|
12055
|
+
border-radius: 0.375rem !important;
|
|
12056
|
+
background-color: #F6F6F7;
|
|
12057
|
+
box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
|
|
12058
|
+
}
|
|
12059
|
+
.frac-payment-form-div .form-control-frac:focus {
|
|
12060
|
+
border: 1px solid #004eab !important;
|
|
12061
|
+
}
|
|
12062
|
+
.frac-payment-form-div .card-expiry-new {
|
|
12063
|
+
border: none;
|
|
12064
|
+
gap: 10px;
|
|
12065
|
+
}
|
|
12066
|
+
.frac-payment-form-div .exp-date-year-container {
|
|
12067
|
+
gap: 10px;
|
|
12068
|
+
width: 100%;
|
|
12069
|
+
}
|
|
12070
|
+
.frac-payment-form-div .card-type-logo-wrap{
|
|
12071
|
+
position: absolute;
|
|
12072
|
+
right: 10px;
|
|
12073
|
+
max-width: 30px;
|
|
12074
|
+
}
|
|
12075
|
+
.detials-wrap.detials-wrap-1 {
|
|
12076
|
+
display: flex;
|
|
12077
|
+
flex-wrap: wrap;
|
|
12078
|
+
}
|
|
12079
|
+
@media screen and (max-width: 1280px) {
|
|
12080
|
+
.frac-pay-container.pay-container {
|
|
12081
|
+
grid-template-columns: 1fr;
|
|
12082
|
+
border: none;
|
|
12083
|
+
}
|
|
12084
|
+
}
|
|
12085
|
+
@media screen and (max-width: 899px) {
|
|
12086
|
+
.detials-wrap {
|
|
12087
|
+
grid-template-columns: 1fr !important;
|
|
12088
|
+
}
|
|
12089
|
+
.frac-payment-form-div .exp-date-year-container{
|
|
12090
|
+
width: 100%;}
|
|
12091
|
+
|
|
12092
|
+
}
|
|
12093
|
+
@media screen and (max-width: 575px) {
|
|
12094
|
+
.frac-payment-form-div .card-type-logo-wrap{
|
|
12095
|
+
max-width: 30px;
|
|
12096
|
+
}
|
|
12097
|
+
form#ACHPaymentForm .ach-scrl {
|
|
12098
|
+
grid-template-columns: 1fr !important;
|
|
12099
|
+
}
|
|
12100
|
+
@media screen and (max-width: 375px) {
|
|
12101
|
+
.frac-payment-form-div .exp-date-year-container {
|
|
12102
|
+
flex-direction: column;
|
|
12103
|
+
}
|
|
12104
|
+
.parent-pay-container {
|
|
12105
|
+
padding: 10px;
|
|
12106
|
+
}
|
|
12107
|
+
}
|
|
12108
|
+
}
|
|
12109
|
+
.box-inner-card-text{
|
|
12110
|
+
display: flex;
|
|
12111
|
+
gap: 0px;
|
|
12112
|
+
flex-direction: column;
|
|
12113
|
+
}
|
|
12114
|
+
.box-inner-card-text .frac-payment-type-logo {
|
|
12115
|
+
width: 17px;
|
|
12116
|
+
height: 17px;
|
|
12117
|
+
aspect-ratio: 1/1;
|
|
12118
|
+
}
|
|
12119
|
+
.exp-date-year-wrap.form-control-frac input {
|
|
12120
|
+
background: transparent;
|
|
12121
|
+
border: none;
|
|
12122
|
+
outline: none;
|
|
12123
|
+
font-size: 1rem;
|
|
12124
|
+
font-weight: 400;
|
|
12125
|
+
}
|
|
12126
|
+
.exp-date-year-wrap.form-control-frac {
|
|
12127
|
+
display: flex;
|
|
12128
|
+
gap: 2px;
|
|
12129
|
+
}
|
|
12130
|
+
.exp-date-year-wrap input.exp-month {
|
|
12131
|
+
width: 32px;
|
|
12132
|
+
}
|
|
12133
|
+
.detials-wrap {
|
|
12134
|
+
display: grid;
|
|
12135
|
+
grid-template-columns: 1fr 1fr;
|
|
12136
|
+
gap: 10px;
|
|
12137
|
+
}
|
|
12138
|
+
.detials-wrap.detials-wrap-2{
|
|
12139
|
+
grid-template-columns: 1fr 1fr;
|
|
12140
|
+
}
|
|
12141
|
+
form#ACHPaymentForm .ach-scrl {
|
|
12142
|
+
display: grid;
|
|
12143
|
+
grid-gap: 0px 10px;
|
|
12144
|
+
grid-template-columns: 1fr;
|
|
12145
|
+
}
|
|
12146
|
+
.plan-list {
|
|
12147
|
+
max-height: 130px;
|
|
12148
|
+
min-height: 130px;
|
|
12149
|
+
overflow-y: auto;
|
|
12150
|
+
padding-right: 6px;
|
|
12151
|
+
}
|
|
12152
|
+
.plan-list::-webkit-scrollbar {
|
|
12153
|
+
width: 3px;
|
|
12154
|
+
background-color: #F5F5F5;
|
|
12155
|
+
}
|
|
12156
|
+
.plan-list::-webkit-scrollbar-thumb {
|
|
12157
|
+
background-color: #35254D;
|
|
12158
|
+
}
|
|
12159
|
+
div#cvv {
|
|
12160
|
+
border-top-left-radius: 0;
|
|
12161
|
+
border-bottom-left-radius: 0;
|
|
12162
|
+
border-top: 0;
|
|
12163
|
+
border-bottom: 0;
|
|
12164
|
+
border-right: 0;
|
|
12165
|
+
}
|
|
12166
|
+
div#exp_year {
|
|
12167
|
+
height: 36px;
|
|
12168
|
+
width: calc(100% + 1px);
|
|
12169
|
+
border-radius: 0;
|
|
12170
|
+
border-top: 0;
|
|
12171
|
+
border-bottom: 0;
|
|
12172
|
+
border-right: 1px solid #dee2e6;
|
|
12173
|
+
}
|
|
12174
|
+
div#exp_month {
|
|
12175
|
+
width: calc(100% + 1px);
|
|
12176
|
+
border-top-right-radius: 0;
|
|
12177
|
+
border-bottom-right-radius: 0;
|
|
12178
|
+
border: 0;
|
|
12179
|
+
border-right: 1px solid #dee2e6;
|
|
12180
|
+
}
|
|
12181
|
+
.exp-date-year-container .form-group {
|
|
12182
|
+
flex: 1;
|
|
12183
|
+
}
|
|
12184
|
+
.input-main-wrap-frac{
|
|
12185
|
+
margin:0px !important;
|
|
12186
|
+
padding:0px !important;
|
|
12187
|
+
}
|
|
12188
|
+
.toggle-num-wrapper.toggle-num-wrapper-new {
|
|
12189
|
+
border: 1px solid #dee2e6 !important;
|
|
12190
|
+
border-radius: 0.375rem !important;
|
|
12191
|
+
background-color: #F6F6F7;
|
|
12192
|
+
box-shadow: 1px 1px 2px inset rgba(0, 0, 0, 0.1);
|
|
12193
|
+
}
|
|
12194
|
+
.toggle-num-wrapper-new div#card_number {
|
|
12195
|
+
padding: 0px 10px;
|
|
12196
|
+
border: none;
|
|
12197
|
+
border-bottom: 1px solid #dee2e6;
|
|
12198
|
+
}
|
|
12199
|
+
.toggle-num-wrapper-new .card-crdi.card-expiry-new {
|
|
12200
|
+
padding: 0px 10px;
|
|
12201
|
+
}
|
|
12202
|
+
.toggle-num-wrapper-new .input-main-wrap-frac {
|
|
12203
|
+
height: 36px;
|
|
12204
|
+
}
|
|
12205
|
+
.toggle-num-wrapper-new:focus {
|
|
12206
|
+
border: 1px solid #004eab !important;
|
|
12207
|
+
}
|
|
12208
|
+
.frac-card-title-main {
|
|
12209
|
+
display: flex;
|
|
12210
|
+
align-items: start;
|
|
12211
|
+
gap: 4px;
|
|
12212
|
+
flex-direction: column;
|
|
12213
|
+
}
|
|
12214
|
+
.parent-pay-container {
|
|
12215
|
+
padding: 24px;
|
|
12216
|
+
background-color: #ffffff !important;
|
|
12217
|
+
border-radius: 15px;
|
|
12218
|
+
min-width: 300px;
|
|
12219
|
+
}
|
|
12220
|
+
|
|
12221
|
+
|
|
12222
|
+
${extraCustomCSS}
|
|
12223
|
+
|
|
12224
|
+
` });
|
|
12225
|
+
}
|
|
12226
|
+
|
|
12227
|
+
// src/app/components/Atoms/Applepay/ApplePayScriptLoader.tsx
|
|
12228
|
+
import { useEffect as useEffect20 } from "react";
|
|
12229
|
+
var applePayScriptLoaded = false;
|
|
12230
|
+
var ApplePayScriptLoader = () => {
|
|
12231
|
+
useEffect20(() => {
|
|
12232
|
+
if (applePayScriptLoaded) return;
|
|
12233
|
+
const existingScript = document.querySelector(
|
|
12234
|
+
`script[src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"]`
|
|
12235
|
+
);
|
|
12236
|
+
if (!existingScript) {
|
|
12237
|
+
const script2 = document.createElement("script");
|
|
12238
|
+
script2.src = "https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js";
|
|
12239
|
+
script2.async = true;
|
|
12240
|
+
script2.onload = () => {
|
|
12241
|
+
console.log("\u2705 Apple Pay script loaded");
|
|
12242
|
+
applePayScriptLoaded = true;
|
|
12243
|
+
console.log("ApplePaySession:", window.ApplePaySession);
|
|
12244
|
+
};
|
|
12245
|
+
script2.onerror = (err) => {
|
|
12246
|
+
console.error("\u274C Apple Pay script failed", err);
|
|
12247
|
+
};
|
|
12248
|
+
document.head.appendChild(script2);
|
|
12249
|
+
} else {
|
|
12250
|
+
applePayScriptLoaded = true;
|
|
12251
|
+
}
|
|
12252
|
+
}, []);
|
|
12253
|
+
return null;
|
|
12254
|
+
};
|
|
12255
|
+
|
|
12256
|
+
// src/app/components/Skysystemz/EmbeddedCheckout.tsx
|
|
12257
|
+
import { Fragment as Fragment22, jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
12258
|
+
var EmbeddedCheckout = ({
|
|
12259
|
+
amount,
|
|
12260
|
+
bankAmount,
|
|
12261
|
+
submitBtnText = "Pay",
|
|
12262
|
+
session_token,
|
|
12263
|
+
customerId,
|
|
12264
|
+
callback,
|
|
12265
|
+
merchantName = "merchant",
|
|
12266
|
+
isPreAuth,
|
|
12267
|
+
surcharge = "0",
|
|
12268
|
+
submitBtnClass,
|
|
12269
|
+
submitBtnIcon,
|
|
12270
|
+
isRequest,
|
|
12271
|
+
pass_fee,
|
|
12272
|
+
pass_fee_amount,
|
|
12273
|
+
require3ds = false,
|
|
12274
|
+
autoTrigger = false,
|
|
12275
|
+
isPartial,
|
|
12276
|
+
bankSurcharge,
|
|
12277
|
+
partialRef,
|
|
12278
|
+
onSubmit,
|
|
12279
|
+
onLoad,
|
|
12280
|
+
customCSS: customCSS2
|
|
12281
|
+
}) => {
|
|
12282
|
+
const [show, setShow] = useState13(false);
|
|
12283
|
+
const [loading, setLoading] = useState13(false);
|
|
12284
|
+
const [childHandleClose, setChildHandleClose] = useState13(() => () => {
|
|
12285
|
+
});
|
|
12286
|
+
const [orderGuid, setOrderGuid] = useState13(null);
|
|
12287
|
+
const [remainingAmount, setRemainingAmount] = useState13(null);
|
|
12288
|
+
const initialCommonProps = useMemo2(
|
|
12289
|
+
() => ({
|
|
12290
|
+
amount,
|
|
12291
|
+
bankAmount,
|
|
12292
|
+
submitBtnText,
|
|
12293
|
+
session_token,
|
|
12294
|
+
customerId,
|
|
12295
|
+
callback,
|
|
12296
|
+
merchantName,
|
|
12297
|
+
isPreAuth,
|
|
12298
|
+
surcharge,
|
|
12299
|
+
submitBtnClass,
|
|
12300
|
+
submitBtnIcon,
|
|
12301
|
+
isRequest,
|
|
12302
|
+
pass_fee,
|
|
12303
|
+
pass_fee_amount,
|
|
12304
|
+
require3ds,
|
|
12305
|
+
autoTrigger,
|
|
12306
|
+
setShow,
|
|
12307
|
+
setHandleCloseRef: setChildHandleClose,
|
|
12308
|
+
isPartial,
|
|
12309
|
+
bankSurcharge,
|
|
12310
|
+
partialRef
|
|
12311
|
+
}),
|
|
12312
|
+
[
|
|
12313
|
+
amount,
|
|
12314
|
+
bankAmount,
|
|
12315
|
+
submitBtnText,
|
|
12316
|
+
session_token,
|
|
12317
|
+
customerId,
|
|
12318
|
+
callback,
|
|
12319
|
+
merchantName,
|
|
12320
|
+
isPreAuth,
|
|
12321
|
+
surcharge,
|
|
12322
|
+
submitBtnClass,
|
|
12323
|
+
submitBtnIcon,
|
|
12324
|
+
isRequest,
|
|
12325
|
+
pass_fee,
|
|
12326
|
+
pass_fee_amount,
|
|
12327
|
+
require3ds,
|
|
12328
|
+
autoTrigger,
|
|
12329
|
+
isPartial,
|
|
12330
|
+
bankSurcharge,
|
|
12331
|
+
partialRef
|
|
12332
|
+
]
|
|
12333
|
+
);
|
|
12334
|
+
const [commonProps, setCommonProps] = useState13(initialCommonProps);
|
|
12335
|
+
useEffect21(() => {
|
|
12336
|
+
if (show) {
|
|
12337
|
+
setCommonProps(initialCommonProps);
|
|
12338
|
+
}
|
|
12339
|
+
}, [show, initialCommonProps]);
|
|
12340
|
+
const getskyosOrderDetails = async () => {
|
|
12341
|
+
var _a;
|
|
12342
|
+
setLoading(true);
|
|
12343
|
+
try {
|
|
12344
|
+
const res = await axios11.get(
|
|
12345
|
+
`${masterBaseUrl}api/v1/gateway/get-order-details/${session_token}`,
|
|
12346
|
+
{ params: { isPartial, partialRef } }
|
|
12347
|
+
);
|
|
12348
|
+
if ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.result) {
|
|
12349
|
+
const data = res.data.data;
|
|
12350
|
+
if (data == null ? void 0 : data.orderGuid) {
|
|
12351
|
+
setOrderGuid(data == null ? void 0 : data.orderGuid);
|
|
12352
|
+
setRemainingAmount(data == null ? void 0 : data.remainingAmount);
|
|
12353
|
+
}
|
|
12354
|
+
setCommonProps((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
12355
|
+
amount: data.amount,
|
|
12356
|
+
pass_fee_amount: data.pass_fee_amount,
|
|
12357
|
+
pass_fee: data.pass_fee
|
|
12358
|
+
}));
|
|
12359
|
+
}
|
|
12360
|
+
} catch (error) {
|
|
12361
|
+
console.log("error while getting skyosorderdeatils", error);
|
|
12362
|
+
} finally {
|
|
12363
|
+
setLoading(false);
|
|
12364
|
+
}
|
|
12365
|
+
};
|
|
12366
|
+
useEffect21(() => {
|
|
12367
|
+
if (show && isPartial && partialRef) {
|
|
12368
|
+
getskyosOrderDetails();
|
|
12369
|
+
}
|
|
12370
|
+
}, [show, isPartial, partialRef]);
|
|
12371
|
+
console.log(onLoad, "onLoad");
|
|
12372
|
+
useEffect21(() => {
|
|
12373
|
+
const supported = !!window.ApplePaySession;
|
|
12374
|
+
let canPay = false;
|
|
12375
|
+
if (supported) {
|
|
12376
|
+
try {
|
|
12377
|
+
canPay = window.ApplePaySession.canMakePayments();
|
|
12378
|
+
} catch (e) {
|
|
12379
|
+
}
|
|
12380
|
+
}
|
|
12381
|
+
console.log(`ApplePaySession: ${supported}, canMakePayments: ${canPay}`);
|
|
12382
|
+
}, []);
|
|
12383
|
+
return /* @__PURE__ */ jsxs23(Fragment22, { children: [
|
|
12384
|
+
/* @__PURE__ */ jsx39("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
|
|
12385
|
+
/* @__PURE__ */ jsx39(DataScript, {}),
|
|
12386
|
+
/* @__PURE__ */ jsx39(FractalTokenizerScript, {}),
|
|
12387
|
+
/* @__PURE__ */ jsx39(SkyChargewidgetstyles, {}),
|
|
12388
|
+
/* @__PURE__ */ jsx39(CardBankRadioStyles, {}),
|
|
12389
|
+
/* @__PURE__ */ jsx39(CustomModal2styles_default, {}),
|
|
12390
|
+
/* @__PURE__ */ jsx39(DataCapScriptLoader, {}),
|
|
12391
|
+
/* @__PURE__ */ jsx39(ApplePayScriptLoader, {}),
|
|
12392
|
+
/* @__PURE__ */ jsx39(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
|
|
12393
|
+
!autoTrigger && /* @__PURE__ */ jsxs23("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
|
|
11065
12394
|
submitBtnText,
|
|
11066
12395
|
submitBtnIcon
|
|
11067
12396
|
] }),
|
|
11068
|
-
!autoTrigger ? /* @__PURE__ */
|
|
12397
|
+
!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 }))
|
|
11069
12398
|
] });
|
|
11070
12399
|
};
|
|
11071
12400
|
export {
|
|
11072
12401
|
AddCardEasyPay as AddCard,
|
|
11073
12402
|
CardOnFile,
|
|
12403
|
+
EmbeddedCheckout,
|
|
11074
12404
|
GetPaymentPage,
|
|
11075
12405
|
PartialPayment,
|
|
11076
12406
|
PaymentWidget,
|