@fractalpay/fractalpay-next 0.0.25 → 0.0.27
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.js +86 -131
- package/dist/index.js.map +1 -1
- package/package.json +3 -8
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",
|
|
42
|
-
version: "0.0.
|
|
42
|
+
version: "0.0.27",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -97,12 +97,7 @@ var require_package = __commonJS({
|
|
|
97
97
|
},
|
|
98
98
|
author: "Mukul",
|
|
99
99
|
license: "MIT",
|
|
100
|
-
keywords: [
|
|
101
|
-
"nextjs",
|
|
102
|
-
"next",
|
|
103
|
-
"typescript",
|
|
104
|
-
"tailwindcss"
|
|
105
|
-
],
|
|
100
|
+
keywords: ["nextjs", "next", "typescript", "tailwindcss"],
|
|
106
101
|
publishConfig: {
|
|
107
102
|
access: "public"
|
|
108
103
|
}
|
|
@@ -3173,7 +3168,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3173
3168
|
{
|
|
3174
3169
|
id: "card_number",
|
|
3175
3170
|
className: "form-control card-number-new",
|
|
3176
|
-
style: { height: "46px" }
|
|
3171
|
+
style: { height: "46px", display: "inline-block" }
|
|
3177
3172
|
}
|
|
3178
3173
|
),
|
|
3179
3174
|
/* @__PURE__ */ jsx17("div", { className: "card-dtl", children: /* @__PURE__ */ jsxs10("div", { className: "exp-cvc-container exp-cvc-container-wrap", style: { margin: 0 }, children: [
|
|
@@ -3214,32 +3209,32 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3214
3209
|
{
|
|
3215
3210
|
id: "card_number",
|
|
3216
3211
|
className: "form-control card-number-new",
|
|
3217
|
-
style: { height: `${isSky ? "36px" : "46px"}
|
|
3212
|
+
style: { height: `${isSky ? "36px" : "46px"}`, display: "inline-block" }
|
|
3218
3213
|
}
|
|
3219
3214
|
),
|
|
3220
3215
|
/* @__PURE__ */ jsx17("div", { className: "card-crdi card-expiry-new", children: /* @__PURE__ */ jsxs10("div", { className: "exp-date-year-container", children: [
|
|
3221
|
-
/* @__PURE__ */ jsx17("div", { className: "exp-date form-group", children: /* @__PURE__ */ jsx17(
|
|
3216
|
+
/* @__PURE__ */ jsx17("div", { className: "exp-date form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
3222
3217
|
"div",
|
|
3223
3218
|
{
|
|
3224
3219
|
id: "exp_month",
|
|
3225
3220
|
className: "form-control required card-cvv-in",
|
|
3226
|
-
style: { height: "36px" }
|
|
3221
|
+
style: { height: "36px", display: "inline-block" }
|
|
3227
3222
|
}
|
|
3228
3223
|
) }),
|
|
3229
|
-
/* @__PURE__ */ jsx17("div", { className: "exp-year form-group", children: /* @__PURE__ */ jsx17(
|
|
3224
|
+
/* @__PURE__ */ jsx17("div", { className: "exp-year form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
3230
3225
|
"div",
|
|
3231
3226
|
{
|
|
3232
3227
|
id: "exp_year",
|
|
3233
3228
|
className: "form-control required card-cvv-in",
|
|
3234
|
-
style: { height: "36px" }
|
|
3229
|
+
style: { height: "36px", display: "inline-block" }
|
|
3235
3230
|
}
|
|
3236
3231
|
) }),
|
|
3237
|
-
/* @__PURE__ */ jsx17("div", { className: "security-digit form-group", children: /* @__PURE__ */ jsx17(
|
|
3232
|
+
/* @__PURE__ */ jsx17("div", { className: "security-digit form-group input-main-wrap-frac", children: /* @__PURE__ */ jsx17(
|
|
3238
3233
|
"div",
|
|
3239
3234
|
{
|
|
3240
3235
|
id: "cvv",
|
|
3241
3236
|
className: "form-control card-cvv-in required",
|
|
3242
|
-
style: { height: "36px" }
|
|
3237
|
+
style: { height: "36px", display: "inline-block" }
|
|
3243
3238
|
}
|
|
3244
3239
|
) })
|
|
3245
3240
|
] }) })
|
|
@@ -5226,7 +5221,7 @@ function PreAuthPayment(_a) {
|
|
|
5226
5221
|
setErrorIframe("");
|
|
5227
5222
|
} }) }),
|
|
5228
5223
|
success && /* @__PURE__ */ jsx20(SuccessMsz, { onClose: handleClose, tranId }),
|
|
5229
|
-
!error && !success && /* @__PURE__ */ jsxs12(Fragment12, { children: [
|
|
5224
|
+
!error && !success && !errorIframe && /* @__PURE__ */ jsxs12(Fragment12, { children: [
|
|
5230
5225
|
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx20(Loader_default, { loading: loading || loading2 || loadingIframe }),
|
|
5231
5226
|
/* @__PURE__ */ jsx20("div", { children: /* @__PURE__ */ jsx20("div", { className: "frac-card-payment-page frac-form", children: /* @__PURE__ */ jsxs12("div", { className: "parent-pay-container", children: [
|
|
5232
5227
|
/* @__PURE__ */ jsx20("span", { className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs12("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
@@ -6231,7 +6226,7 @@ function AddCardEasyPay(props) {
|
|
|
6231
6226
|
setErrorIframe("");
|
|
6232
6227
|
} }) }),
|
|
6233
6228
|
success && /* @__PURE__ */ jsx24(SuccessCardMsz_default, { onClose: handleCloseSeccess }),
|
|
6234
|
-
!error && !success && /* @__PURE__ */ jsx24(Fragment14, { children: /* @__PURE__ */ jsx24(
|
|
6229
|
+
!error && !success && !errorIframe && /* @__PURE__ */ jsx24(Fragment14, { children: /* @__PURE__ */ jsx24(
|
|
6235
6230
|
"div",
|
|
6236
6231
|
{
|
|
6237
6232
|
className: "container-creditcard add-card modal-content",
|
|
@@ -6636,7 +6631,8 @@ var FractalFieldsAddCardSky = ({ fractalStyles, tokenizerRef, extraInputs }) =>
|
|
|
6636
6631
|
"div",
|
|
6637
6632
|
{
|
|
6638
6633
|
id: "card_number",
|
|
6639
|
-
className: "form-control card-number-new"
|
|
6634
|
+
className: "form-control card-number-new",
|
|
6635
|
+
style: { display: "inline-block" }
|
|
6640
6636
|
}
|
|
6641
6637
|
)
|
|
6642
6638
|
] }) }),
|
|
@@ -6650,7 +6646,8 @@ var FractalFieldsAddCardSky = ({ fractalStyles, tokenizerRef, extraInputs }) =>
|
|
|
6650
6646
|
"div",
|
|
6651
6647
|
{
|
|
6652
6648
|
id: "exp_month",
|
|
6653
|
-
className: "form-control required card-cvv-in"
|
|
6649
|
+
className: "form-control required card-cvv-in",
|
|
6650
|
+
style: { display: "inline-block" }
|
|
6654
6651
|
}
|
|
6655
6652
|
)
|
|
6656
6653
|
] }),
|
|
@@ -6663,7 +6660,8 @@ var FractalFieldsAddCardSky = ({ fractalStyles, tokenizerRef, extraInputs }) =>
|
|
|
6663
6660
|
"div",
|
|
6664
6661
|
{
|
|
6665
6662
|
id: "exp_year",
|
|
6666
|
-
className: "form-control required card-cvv-in"
|
|
6663
|
+
className: "form-control required card-cvv-in",
|
|
6664
|
+
style: { display: "inline-block" }
|
|
6667
6665
|
}
|
|
6668
6666
|
)
|
|
6669
6667
|
] }),
|
|
@@ -6676,7 +6674,8 @@ var FractalFieldsAddCardSky = ({ fractalStyles, tokenizerRef, extraInputs }) =>
|
|
|
6676
6674
|
"div",
|
|
6677
6675
|
{
|
|
6678
6676
|
id: "cvv",
|
|
6679
|
-
className: "form-control card-cvv-in required"
|
|
6677
|
+
className: "form-control card-cvv-in required",
|
|
6678
|
+
style: { display: "inline-block" }
|
|
6680
6679
|
}
|
|
6681
6680
|
)
|
|
6682
6681
|
] }),
|
|
@@ -6973,7 +6972,7 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
|
|
|
6973
6972
|
errorIframe && /* @__PURE__ */ jsx27("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx27(ErrorCardMessage_default, { error: errorIframe, onClose: () => {
|
|
6974
6973
|
setErrorIframe("");
|
|
6975
6974
|
} }) }),
|
|
6976
|
-
!error && /* @__PURE__ */ jsx27("div", { className: "creditformbox", children: paymentGateway == 32 ? /* @__PURE__ */ jsxs16("form", { id: "paymentForm", onSubmit: handleCardAdd, onKeyDown: (e) => {
|
|
6975
|
+
!error && !errorIframe && /* @__PURE__ */ jsx27("div", { className: "creditformbox", children: paymentGateway == 32 ? /* @__PURE__ */ jsxs16("form", { id: "paymentForm", onSubmit: handleCardAdd, onKeyDown: (e) => {
|
|
6977
6976
|
if (e.key === "Enter" && loading) {
|
|
6978
6977
|
e.preventDefault();
|
|
6979
6978
|
e.stopPropagation();
|
|
@@ -8078,9 +8077,12 @@ function PartialPayment(props) {
|
|
|
8078
8077
|
onClose: handleClose,
|
|
8079
8078
|
children: [
|
|
8080
8079
|
error && /* @__PURE__ */ jsx28("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx28(ErrorCardMessage_default, { error, onClose: handleClose }) }),
|
|
8080
|
+
errorIframe && /* @__PURE__ */ jsx28("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx28(ErrorCardMessage_default, { error: errorIframe, onClose: () => {
|
|
8081
|
+
setErrorIframe("");
|
|
8082
|
+
} }) }),
|
|
8081
8083
|
success && /* @__PURE__ */ jsx28(SuccessMsz, { onClose: handleClose, tranId }),
|
|
8082
|
-
!error && !success && /* @__PURE__ */ jsxs17(Fragment17, { children: [
|
|
8083
|
-
(loading || loading2) && /* @__PURE__ */ jsx28(Loader_default, { loading: loading || loading2 }),
|
|
8084
|
+
!error && !success && !errorIframe && /* @__PURE__ */ jsxs17(Fragment17, { children: [
|
|
8085
|
+
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx28(Loader_default, { loading: loading || loading2 || loadingIframe }),
|
|
8084
8086
|
/* @__PURE__ */ jsx28("div", { className: "frac-card-payment-page frac-form", children: /* @__PURE__ */ jsxs17("div", { className: "parent-pay-container", children: [
|
|
8085
8087
|
/* @__PURE__ */ jsx28("span", { className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs17("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
8086
8088
|
/* @__PURE__ */ jsx28("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx28("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" }) }),
|
|
@@ -9336,7 +9338,10 @@ position:relative;
|
|
|
9336
9338
|
.exp-date-year-container .form-group {
|
|
9337
9339
|
flex: 1;
|
|
9338
9340
|
}
|
|
9339
|
-
|
|
9341
|
+
.input-main-wrap-frac{
|
|
9342
|
+
margin:0px !important;
|
|
9343
|
+
padding:0px !important;
|
|
9344
|
+
}
|
|
9340
9345
|
|
|
9341
9346
|
|
|
9342
9347
|
|
|
@@ -9568,9 +9573,9 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9568
9573
|
}
|
|
9569
9574
|
};
|
|
9570
9575
|
const handleCharge = async (data) => {
|
|
9571
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2
|
|
9576
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
9572
9577
|
try {
|
|
9573
|
-
let dataObj = {
|
|
9578
|
+
let dataObj = __spreadValues({
|
|
9574
9579
|
pass_fee_amount: Number(amount) - cashDiscount,
|
|
9575
9580
|
pass_fee,
|
|
9576
9581
|
Token: data == null ? void 0 : data.Token,
|
|
@@ -9579,106 +9584,69 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9579
9584
|
require3ds,
|
|
9580
9585
|
isPartial,
|
|
9581
9586
|
orderGuid: orderGuid || ordGuid
|
|
9582
|
-
}
|
|
9587
|
+
}, saveCardInfo ? {
|
|
9588
|
+
card: {
|
|
9589
|
+
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
9590
|
+
customer_id: customerId,
|
|
9591
|
+
gateway_token: (data == null ? void 0 : data.Token) || (data == null ? void 0 : data.gateway_token),
|
|
9592
|
+
name: cardData == null ? void 0 : cardData.cardName
|
|
9593
|
+
}
|
|
9594
|
+
} : null);
|
|
9583
9595
|
if (require3ds && (data == null ? void 0 : data.stripe_3ds_auth_id)) {
|
|
9584
9596
|
dataObj.stripe_3ds_auth_id = data == null ? void 0 : data.stripe_3ds_auth_id;
|
|
9585
9597
|
}
|
|
9586
9598
|
const chargeResponse = await axios9.post(`${masterBaseUrl}api/v1/gateway/charge/${session_token}`, dataObj);
|
|
9587
9599
|
if ((_a2 = chargeResponse == null ? void 0 : chargeResponse.data) == null ? void 0 : _a2.result) {
|
|
9588
|
-
let addCard;
|
|
9589
|
-
if (saveCardInfo && customerId) {
|
|
9590
|
-
try {
|
|
9591
|
-
let obj = {
|
|
9592
|
-
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
9593
|
-
customer_id: customerId,
|
|
9594
|
-
gateway_token: (data == null ? void 0 : data.gateway_token) || (data == null ? void 0 : data.Token)
|
|
9595
|
-
};
|
|
9596
|
-
addCard = await axios9.post(`${masterBaseUrl}api/v1/gateway/add-card/${session_token}`, obj);
|
|
9597
|
-
if ((_b2 = addCard == null ? void 0 : addCard.data) == null ? void 0 : _b2.result) {
|
|
9598
|
-
addCard = (_c2 = addCard == null ? void 0 : addCard.data) == null ? void 0 : _c2.data;
|
|
9599
|
-
}
|
|
9600
|
-
} catch (error2) {
|
|
9601
|
-
console.log(error2, "error");
|
|
9602
|
-
hideLoader();
|
|
9603
|
-
callback({
|
|
9604
|
-
error: ((_e2 = (_d2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _d2.data) == null ? void 0 : _e2.message) || "Something went wrong!",
|
|
9605
|
-
result: (_g2 = (_f2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _f2.data) == null ? void 0 : _g2.result,
|
|
9606
|
-
statusCode: (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.status
|
|
9607
|
-
});
|
|
9608
|
-
setError(((_j2 = (_i2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _i2.data) == null ? void 0 : _j2.message) || "Something went wrong!");
|
|
9609
|
-
}
|
|
9610
|
-
}
|
|
9611
9600
|
let callbackdata = {
|
|
9612
|
-
cardDetails:
|
|
9613
|
-
callback: __spreadProps(__spreadValues({}, (
|
|
9601
|
+
// cardDetails: { ...addCard, ...data },
|
|
9602
|
+
callback: __spreadProps(__spreadValues({}, (_b2 = chargeResponse == null ? void 0 : chargeResponse.data) == null ? void 0 : _b2.data), { name: cardData == null ? void 0 : cardData.cardName, isPreAuth })
|
|
9614
9603
|
};
|
|
9615
|
-
if (!saveCardInfo) {
|
|
9616
|
-
delete callbackdata.cardDetails;
|
|
9617
|
-
}
|
|
9618
9604
|
callback(callbackdata);
|
|
9619
9605
|
hideLoader();
|
|
9620
9606
|
handleClose();
|
|
9621
9607
|
}
|
|
9622
9608
|
} catch (error2) {
|
|
9623
|
-
setError(((
|
|
9609
|
+
setError(((_d2 = (_c2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || "Something went wrong!");
|
|
9624
9610
|
callback({
|
|
9625
|
-
error: ((
|
|
9626
|
-
result: (
|
|
9627
|
-
statusCode: (
|
|
9611
|
+
error: ((_f2 = (_e2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _e2.data) == null ? void 0 : _f2.message) || "Something went wrong!",
|
|
9612
|
+
result: (_h2 = (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.data) == null ? void 0 : _h2.result,
|
|
9613
|
+
statusCode: (_i2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _i2.status
|
|
9628
9614
|
});
|
|
9629
9615
|
hideLoader();
|
|
9630
9616
|
}
|
|
9631
9617
|
};
|
|
9632
9618
|
const handlePreAuth = async (data) => {
|
|
9633
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2
|
|
9619
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
9634
9620
|
try {
|
|
9635
|
-
let dataObj = {
|
|
9621
|
+
let dataObj = __spreadValues({
|
|
9636
9622
|
Token: data == null ? void 0 : data.Token,
|
|
9637
9623
|
amount,
|
|
9638
9624
|
postal_code: data == null ? void 0 : data.postalCode
|
|
9639
|
-
}
|
|
9625
|
+
}, saveCardInfo ? {
|
|
9626
|
+
card: {
|
|
9627
|
+
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
9628
|
+
customer_id: customerId,
|
|
9629
|
+
gateway_token: (data == null ? void 0 : data.Token) || (data == null ? void 0 : data.gateway_token),
|
|
9630
|
+
name: cardData == null ? void 0 : cardData.cardName
|
|
9631
|
+
}
|
|
9632
|
+
} : null);
|
|
9640
9633
|
const preAuthResponse = await axios9.post(`${masterBaseUrl}api/v1/gateway/preauth/${session_token}`, dataObj);
|
|
9641
9634
|
if ((_a2 = preAuthResponse == null ? void 0 : preAuthResponse.data) == null ? void 0 : _a2.result) {
|
|
9642
9635
|
let addCard;
|
|
9643
|
-
if (saveCardInfo && customerId) {
|
|
9644
|
-
try {
|
|
9645
|
-
let obj = {
|
|
9646
|
-
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
9647
|
-
customer_id: customerId,
|
|
9648
|
-
gateway_token: (data == null ? void 0 : data.Token) || (data == null ? void 0 : data.gateway_token)
|
|
9649
|
-
};
|
|
9650
|
-
addCard = await axios9.post(`${masterBaseUrl}api/v1/gateway/add-card/${session_token}`, obj);
|
|
9651
|
-
if ((_b2 = addCard == null ? void 0 : addCard.data) == null ? void 0 : _b2.result) {
|
|
9652
|
-
addCard = (_c2 = addCard == null ? void 0 : addCard.data) == null ? void 0 : _c2.data;
|
|
9653
|
-
}
|
|
9654
|
-
} catch (error2) {
|
|
9655
|
-
console.log(error2, "error");
|
|
9656
|
-
hideLoader();
|
|
9657
|
-
setError(((_e2 = (_d2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _d2.data) == null ? void 0 : _e2.message) || "Something went wrong!");
|
|
9658
|
-
callback({
|
|
9659
|
-
error: ((_g2 = (_f2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _f2.data) == null ? void 0 : _g2.message) || "Something went wrong!",
|
|
9660
|
-
result: (_i2 = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.result,
|
|
9661
|
-
statusCode: (_j2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _j2.status
|
|
9662
|
-
});
|
|
9663
|
-
}
|
|
9664
|
-
}
|
|
9665
9636
|
let callbackdata = {
|
|
9666
|
-
cardDetails:
|
|
9667
|
-
callback: __spreadProps(__spreadValues({}, (
|
|
9637
|
+
// cardDetails: { ...addCard, ...data },
|
|
9638
|
+
callback: __spreadProps(__spreadValues({}, (_b2 = preAuthResponse == null ? void 0 : preAuthResponse.data) == null ? void 0 : _b2.data), { name: cardData == null ? void 0 : cardData.cardName, isPreAuth })
|
|
9668
9639
|
};
|
|
9669
|
-
if (!saveCardInfo) {
|
|
9670
|
-
delete callbackdata.cardDetails;
|
|
9671
|
-
}
|
|
9672
9640
|
callback(callbackdata);
|
|
9673
9641
|
hideLoader();
|
|
9674
9642
|
handleClose();
|
|
9675
9643
|
}
|
|
9676
9644
|
} catch (error2) {
|
|
9677
|
-
setError(((
|
|
9645
|
+
setError(((_d2 = (_c2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || "Something went wrong!");
|
|
9678
9646
|
callback({
|
|
9679
|
-
error: ((
|
|
9680
|
-
result: (
|
|
9681
|
-
statusCode: (
|
|
9647
|
+
error: ((_f2 = (_e2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _e2.data) == null ? void 0 : _f2.message) || "Something went wrong!",
|
|
9648
|
+
result: (_h2 = (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.data) == null ? void 0 : _h2.result,
|
|
9649
|
+
statusCode: (_i2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _i2.status
|
|
9682
9650
|
});
|
|
9683
9651
|
hideLoader();
|
|
9684
9652
|
}
|
|
@@ -9889,7 +9857,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9889
9857
|
return validCard && validCVV && validExpirationDate;
|
|
9890
9858
|
};
|
|
9891
9859
|
const submitFunc = async (e) => {
|
|
9892
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2
|
|
9860
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
|
|
9893
9861
|
e.preventDefault();
|
|
9894
9862
|
const el = document.activeElement;
|
|
9895
9863
|
if (el instanceof HTMLElement) {
|
|
@@ -9939,7 +9907,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9939
9907
|
} else {
|
|
9940
9908
|
let callbackdata;
|
|
9941
9909
|
try {
|
|
9942
|
-
const payByBank = await axios9.post(`${masterBaseUrl}api/v1/gateway/bank-charge/${session_token}`, {
|
|
9910
|
+
const payByBank = await axios9.post(`${masterBaseUrl}api/v1/gateway/bank-charge/${session_token}`, __spreadValues({
|
|
9943
9911
|
label: achData == null ? void 0 : achData.name,
|
|
9944
9912
|
account_number: achData == null ? void 0 : achData.accountNumber,
|
|
9945
9913
|
routing_number: achData == null ? void 0 : achData.routingNumber,
|
|
@@ -9953,36 +9921,20 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9953
9921
|
surcharge: "0.00",
|
|
9954
9922
|
order_id: "",
|
|
9955
9923
|
company_name: (achData == null ? void 0 : achData.companyName) || ""
|
|
9956
|
-
}
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
account_type: achData == null ? void 0 : achData.accountType,
|
|
9966
|
-
customer_id: customerId || "",
|
|
9967
|
-
company_name: (achData == null ? void 0 : achData.companyName) || ""
|
|
9968
|
-
});
|
|
9969
|
-
if (result2.data.result) {
|
|
9970
|
-
callbackdata = {
|
|
9971
|
-
bankDetails: __spreadProps(__spreadValues({}, (_g2 = result2 == null ? void 0 : result2.data) == null ? void 0 : _g2.data), { account_type: achData == null ? void 0 : achData.accountType })
|
|
9972
|
-
};
|
|
9973
|
-
}
|
|
9974
|
-
} catch (error2) {
|
|
9975
|
-
hideLoader();
|
|
9976
|
-
setError(((_i2 = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.message) || "Something went wrong!");
|
|
9977
|
-
callback({
|
|
9978
|
-
error: ((_k2 = (_j2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _j2.data) == null ? void 0 : _k2.message) || "Something went wrong!",
|
|
9979
|
-
result: (_m2 = (_l2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _l2.data) == null ? void 0 : _m2.result,
|
|
9980
|
-
statusCode: (_n2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _n2.status
|
|
9981
|
-
});
|
|
9982
|
-
}
|
|
9924
|
+
}, saveACHinfo ? {
|
|
9925
|
+
bank: {
|
|
9926
|
+
name: achData == null ? void 0 : achData.name,
|
|
9927
|
+
account_number: achData == null ? void 0 : achData.accountNumber,
|
|
9928
|
+
routing_number: achData == null ? void 0 : achData.routingNumber,
|
|
9929
|
+
bank_name: achData == null ? void 0 : achData.bankName,
|
|
9930
|
+
account_type: achData == null ? void 0 : achData.accountType,
|
|
9931
|
+
customer_id: customerId || "",
|
|
9932
|
+
company_name: (achData == null ? void 0 : achData.companyName) || ""
|
|
9983
9933
|
}
|
|
9934
|
+
} : null));
|
|
9935
|
+
if ((_f2 = payByBank == null ? void 0 : payByBank.data) == null ? void 0 : _f2.result) {
|
|
9984
9936
|
callbackdata = __spreadProps(__spreadValues({}, callbackdata), {
|
|
9985
|
-
callback: __spreadProps(__spreadValues({}, (
|
|
9937
|
+
callback: __spreadProps(__spreadValues({}, (_g2 = payByBank == null ? void 0 : payByBank.data) == null ? void 0 : _g2.data), { name: achData == null ? void 0 : achData.name, isPreAuth })
|
|
9986
9938
|
});
|
|
9987
9939
|
callback(callbackdata);
|
|
9988
9940
|
handleClose();
|
|
@@ -9990,7 +9942,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9990
9942
|
}
|
|
9991
9943
|
} catch (error2) {
|
|
9992
9944
|
console.log(error2, "errororor");
|
|
9993
|
-
let data = (
|
|
9945
|
+
let data = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data;
|
|
9994
9946
|
if (typeof (data == null ? void 0 : data.message) == "object") {
|
|
9995
9947
|
Object.values(data == null ? void 0 : data.message).forEach((message) => {
|
|
9996
9948
|
var _a3;
|
|
@@ -10006,7 +9958,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10006
9958
|
callback({
|
|
10007
9959
|
error: (data == null ? void 0 : data.message) || "Something went wrong!",
|
|
10008
9960
|
result: (data == null ? void 0 : data.result) || false,
|
|
10009
|
-
statusCode: (
|
|
9961
|
+
statusCode: (_i2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _i2.status
|
|
10010
9962
|
});
|
|
10011
9963
|
}
|
|
10012
9964
|
hideLoader();
|
|
@@ -10016,11 +9968,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10016
9968
|
} catch (error2) {
|
|
10017
9969
|
hideLoader();
|
|
10018
9970
|
callback({
|
|
10019
|
-
error: ((
|
|
10020
|
-
result: (
|
|
10021
|
-
statusCode: (
|
|
9971
|
+
error: ((_k2 = (_j2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _j2.data) == null ? void 0 : _k2.message) || "Something went wrong!",
|
|
9972
|
+
result: (_m2 = (_l2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _l2.data) == null ? void 0 : _m2.result,
|
|
9973
|
+
statusCode: (_n2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _n2.status
|
|
10022
9974
|
});
|
|
10023
|
-
setError(((
|
|
9975
|
+
setError(((_p2 = (_o2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _o2.data) == null ? void 0 : _p2.message) || "Something went wrong!");
|
|
10024
9976
|
}
|
|
10025
9977
|
};
|
|
10026
9978
|
const handleCardChange = (field, value) => {
|
|
@@ -10515,7 +10467,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10515
10467
|
return /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10516
10468
|
initialLoader && /* @__PURE__ */ jsx32(Loader_default, { loading: initialLoader }),
|
|
10517
10469
|
error && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error, onClose: handleClose }) }),
|
|
10518
|
-
|
|
10470
|
+
errorIframe && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error: errorIframe, onClose: () => {
|
|
10471
|
+
setErrorIframe("");
|
|
10472
|
+
} }) }),
|
|
10473
|
+
!error && !errorIframe && /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10519
10474
|
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx32(Loader_default, { loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
|
|
10520
10475
|
/* @__PURE__ */ jsxs19("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
|
|
10521
10476
|
/* @__PURE__ */ jsx32("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
|