@fractalpay/fractalpay-next-dev 0.0.215 → 0.0.217
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 +78 -121
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.217",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -3168,7 +3168,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3168
3168
|
{
|
|
3169
3169
|
id: "card_number",
|
|
3170
3170
|
className: "form-control card-number-new",
|
|
3171
|
-
style: { height: "46px" }
|
|
3171
|
+
style: { height: "46px", display: "inline-block" }
|
|
3172
3172
|
}
|
|
3173
3173
|
),
|
|
3174
3174
|
/* @__PURE__ */ jsx17("div", { className: "card-dtl", children: /* @__PURE__ */ jsxs10("div", { className: "exp-cvc-container exp-cvc-container-wrap", style: { margin: 0 }, children: [
|
|
@@ -3209,7 +3209,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3209
3209
|
{
|
|
3210
3210
|
id: "card_number",
|
|
3211
3211
|
className: "form-control card-number-new",
|
|
3212
|
-
style: { height: `${isSky ? "36px" : "46px"}
|
|
3212
|
+
style: { height: `${isSky ? "36px" : "46px"}`, display: "inline-block" }
|
|
3213
3213
|
}
|
|
3214
3214
|
),
|
|
3215
3215
|
/* @__PURE__ */ jsx17("div", { className: "card-crdi card-expiry-new", children: /* @__PURE__ */ jsxs10("div", { className: "exp-date-year-container", children: [
|
|
@@ -3218,7 +3218,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3218
3218
|
{
|
|
3219
3219
|
id: "exp_month",
|
|
3220
3220
|
className: "form-control required card-cvv-in",
|
|
3221
|
-
style: { height: "36px" }
|
|
3221
|
+
style: { height: "36px", display: "inline-block" }
|
|
3222
3222
|
}
|
|
3223
3223
|
) }),
|
|
3224
3224
|
/* @__PURE__ */ jsx17("div", { className: "exp-year form-group", children: /* @__PURE__ */ jsx17(
|
|
@@ -3226,7 +3226,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3226
3226
|
{
|
|
3227
3227
|
id: "exp_year",
|
|
3228
3228
|
className: "form-control required card-cvv-in",
|
|
3229
|
-
style: { height: "36px" }
|
|
3229
|
+
style: { height: "36px", display: "inline-block" }
|
|
3230
3230
|
}
|
|
3231
3231
|
) }),
|
|
3232
3232
|
/* @__PURE__ */ jsx17("div", { className: "security-digit form-group", children: /* @__PURE__ */ jsx17(
|
|
@@ -3234,7 +3234,7 @@ var FractalFields = ({ fractalStyles, tokenizerRef, isAddCard = false, isSky = f
|
|
|
3234
3234
|
{
|
|
3235
3235
|
id: "cvv",
|
|
3236
3236
|
className: "form-control card-cvv-in required",
|
|
3237
|
-
style: { height: "36px" }
|
|
3237
|
+
style: { height: "36px", display: "inline-block" }
|
|
3238
3238
|
}
|
|
3239
3239
|
) })
|
|
3240
3240
|
] }) })
|
|
@@ -5221,7 +5221,7 @@ function PreAuthPayment(_a) {
|
|
|
5221
5221
|
setErrorIframe("");
|
|
5222
5222
|
} }) }),
|
|
5223
5223
|
success && /* @__PURE__ */ jsx20(SuccessMsz, { onClose: handleClose, tranId }),
|
|
5224
|
-
!error && !success && /* @__PURE__ */ jsxs12(Fragment12, { children: [
|
|
5224
|
+
!error && !success && !errorIframe && /* @__PURE__ */ jsxs12(Fragment12, { children: [
|
|
5225
5225
|
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx20(Loader_default, { loading: loading || loading2 || loadingIframe }),
|
|
5226
5226
|
/* @__PURE__ */ jsx20("div", { children: /* @__PURE__ */ jsx20("div", { className: "frac-card-payment-page frac-form", children: /* @__PURE__ */ jsxs12("div", { className: "parent-pay-container", children: [
|
|
5227
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: [
|
|
@@ -6226,7 +6226,7 @@ function AddCardEasyPay(props) {
|
|
|
6226
6226
|
setErrorIframe("");
|
|
6227
6227
|
} }) }),
|
|
6228
6228
|
success && /* @__PURE__ */ jsx24(SuccessCardMsz_default, { onClose: handleCloseSeccess }),
|
|
6229
|
-
!error && !success && /* @__PURE__ */ jsx24(Fragment14, { children: /* @__PURE__ */ jsx24(
|
|
6229
|
+
!error && !success && !errorIframe && /* @__PURE__ */ jsx24(Fragment14, { children: /* @__PURE__ */ jsx24(
|
|
6230
6230
|
"div",
|
|
6231
6231
|
{
|
|
6232
6232
|
className: "container-creditcard add-card modal-content",
|
|
@@ -6631,7 +6631,8 @@ var FractalFieldsAddCardSky = ({ fractalStyles, tokenizerRef, extraInputs }) =>
|
|
|
6631
6631
|
"div",
|
|
6632
6632
|
{
|
|
6633
6633
|
id: "card_number",
|
|
6634
|
-
className: "form-control card-number-new"
|
|
6634
|
+
className: "form-control card-number-new",
|
|
6635
|
+
style: { display: "inline-block" }
|
|
6635
6636
|
}
|
|
6636
6637
|
)
|
|
6637
6638
|
] }) }),
|
|
@@ -6645,7 +6646,8 @@ var FractalFieldsAddCardSky = ({ fractalStyles, tokenizerRef, extraInputs }) =>
|
|
|
6645
6646
|
"div",
|
|
6646
6647
|
{
|
|
6647
6648
|
id: "exp_month",
|
|
6648
|
-
className: "form-control required card-cvv-in"
|
|
6649
|
+
className: "form-control required card-cvv-in",
|
|
6650
|
+
style: { display: "inline-block" }
|
|
6649
6651
|
}
|
|
6650
6652
|
)
|
|
6651
6653
|
] }),
|
|
@@ -6658,7 +6660,8 @@ var FractalFieldsAddCardSky = ({ fractalStyles, tokenizerRef, extraInputs }) =>
|
|
|
6658
6660
|
"div",
|
|
6659
6661
|
{
|
|
6660
6662
|
id: "exp_year",
|
|
6661
|
-
className: "form-control required card-cvv-in"
|
|
6663
|
+
className: "form-control required card-cvv-in",
|
|
6664
|
+
style: { display: "inline-block" }
|
|
6662
6665
|
}
|
|
6663
6666
|
)
|
|
6664
6667
|
] }),
|
|
@@ -6671,7 +6674,8 @@ var FractalFieldsAddCardSky = ({ fractalStyles, tokenizerRef, extraInputs }) =>
|
|
|
6671
6674
|
"div",
|
|
6672
6675
|
{
|
|
6673
6676
|
id: "cvv",
|
|
6674
|
-
className: "form-control card-cvv-in required"
|
|
6677
|
+
className: "form-control card-cvv-in required",
|
|
6678
|
+
style: { display: "inline-block" }
|
|
6675
6679
|
}
|
|
6676
6680
|
)
|
|
6677
6681
|
] }),
|
|
@@ -6968,7 +6972,7 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
|
|
|
6968
6972
|
errorIframe && /* @__PURE__ */ jsx27("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx27(ErrorCardMessage_default, { error: errorIframe, onClose: () => {
|
|
6969
6973
|
setErrorIframe("");
|
|
6970
6974
|
} }) }),
|
|
6971
|
-
!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) => {
|
|
6972
6976
|
if (e.key === "Enter" && loading) {
|
|
6973
6977
|
e.preventDefault();
|
|
6974
6978
|
e.stopPropagation();
|
|
@@ -8073,9 +8077,12 @@ function PartialPayment(props) {
|
|
|
8073
8077
|
onClose: handleClose,
|
|
8074
8078
|
children: [
|
|
8075
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
|
+
} }) }),
|
|
8076
8083
|
success && /* @__PURE__ */ jsx28(SuccessMsz, { onClose: handleClose, tranId }),
|
|
8077
|
-
!error && !success && /* @__PURE__ */ jsxs17(Fragment17, { children: [
|
|
8078
|
-
(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 }),
|
|
8079
8086
|
/* @__PURE__ */ jsx28("div", { className: "frac-card-payment-page frac-form", children: /* @__PURE__ */ jsxs17("div", { className: "parent-pay-container", children: [
|
|
8080
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: [
|
|
8081
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" }) }),
|
|
@@ -9563,9 +9570,9 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9563
9570
|
}
|
|
9564
9571
|
};
|
|
9565
9572
|
const handleCharge = async (data) => {
|
|
9566
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2
|
|
9573
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
9567
9574
|
try {
|
|
9568
|
-
let dataObj = {
|
|
9575
|
+
let dataObj = __spreadValues({
|
|
9569
9576
|
pass_fee_amount: Number(amount) - cashDiscount,
|
|
9570
9577
|
pass_fee,
|
|
9571
9578
|
Token: data == null ? void 0 : data.Token,
|
|
@@ -9574,106 +9581,69 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9574
9581
|
require3ds,
|
|
9575
9582
|
isPartial,
|
|
9576
9583
|
orderGuid: orderGuid || ordGuid
|
|
9577
|
-
}
|
|
9584
|
+
}, saveCardInfo ? {
|
|
9585
|
+
card: {
|
|
9586
|
+
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
9587
|
+
customer_id: customerId,
|
|
9588
|
+
gateway_token: (data == null ? void 0 : data.Token) || (data == null ? void 0 : data.gateway_token),
|
|
9589
|
+
name: cardData == null ? void 0 : cardData.cardName
|
|
9590
|
+
}
|
|
9591
|
+
} : null);
|
|
9578
9592
|
if (require3ds && (data == null ? void 0 : data.stripe_3ds_auth_id)) {
|
|
9579
9593
|
dataObj.stripe_3ds_auth_id = data == null ? void 0 : data.stripe_3ds_auth_id;
|
|
9580
9594
|
}
|
|
9581
9595
|
const chargeResponse = await axios9.post(`${masterBaseUrl}api/v1/gateway/charge/${session_token}`, dataObj);
|
|
9582
9596
|
if ((_a2 = chargeResponse == null ? void 0 : chargeResponse.data) == null ? void 0 : _a2.result) {
|
|
9583
|
-
let addCard;
|
|
9584
|
-
if (saveCardInfo && customerId) {
|
|
9585
|
-
try {
|
|
9586
|
-
let obj = {
|
|
9587
|
-
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
9588
|
-
customer_id: customerId,
|
|
9589
|
-
gateway_token: (data == null ? void 0 : data.gateway_token) || (data == null ? void 0 : data.Token)
|
|
9590
|
-
};
|
|
9591
|
-
addCard = await axios9.post(`${masterBaseUrl}api/v1/gateway/add-card/${session_token}`, obj);
|
|
9592
|
-
if ((_b2 = addCard == null ? void 0 : addCard.data) == null ? void 0 : _b2.result) {
|
|
9593
|
-
addCard = (_c2 = addCard == null ? void 0 : addCard.data) == null ? void 0 : _c2.data;
|
|
9594
|
-
}
|
|
9595
|
-
} catch (error2) {
|
|
9596
|
-
console.log(error2, "error");
|
|
9597
|
-
hideLoader();
|
|
9598
|
-
callback({
|
|
9599
|
-
error: ((_e2 = (_d2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _d2.data) == null ? void 0 : _e2.message) || "Something went wrong!",
|
|
9600
|
-
result: (_g2 = (_f2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _f2.data) == null ? void 0 : _g2.result,
|
|
9601
|
-
statusCode: (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.status
|
|
9602
|
-
});
|
|
9603
|
-
setError(((_j2 = (_i2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _i2.data) == null ? void 0 : _j2.message) || "Something went wrong!");
|
|
9604
|
-
}
|
|
9605
|
-
}
|
|
9606
9597
|
let callbackdata = {
|
|
9607
|
-
cardDetails:
|
|
9608
|
-
callback: __spreadProps(__spreadValues({}, (
|
|
9598
|
+
// cardDetails: { ...addCard, ...data },
|
|
9599
|
+
callback: __spreadProps(__spreadValues({}, (_b2 = chargeResponse == null ? void 0 : chargeResponse.data) == null ? void 0 : _b2.data), { name: cardData == null ? void 0 : cardData.cardName, isPreAuth })
|
|
9609
9600
|
};
|
|
9610
|
-
if (!saveCardInfo) {
|
|
9611
|
-
delete callbackdata.cardDetails;
|
|
9612
|
-
}
|
|
9613
9601
|
callback(callbackdata);
|
|
9614
9602
|
hideLoader();
|
|
9615
9603
|
handleClose();
|
|
9616
9604
|
}
|
|
9617
9605
|
} catch (error2) {
|
|
9618
|
-
setError(((
|
|
9606
|
+
setError(((_d2 = (_c2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || "Something went wrong!");
|
|
9619
9607
|
callback({
|
|
9620
|
-
error: ((
|
|
9621
|
-
result: (
|
|
9622
|
-
statusCode: (
|
|
9608
|
+
error: ((_f2 = (_e2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _e2.data) == null ? void 0 : _f2.message) || "Something went wrong!",
|
|
9609
|
+
result: (_h2 = (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.data) == null ? void 0 : _h2.result,
|
|
9610
|
+
statusCode: (_i2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _i2.status
|
|
9623
9611
|
});
|
|
9624
9612
|
hideLoader();
|
|
9625
9613
|
}
|
|
9626
9614
|
};
|
|
9627
9615
|
const handlePreAuth = async (data) => {
|
|
9628
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2
|
|
9616
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
9629
9617
|
try {
|
|
9630
|
-
let dataObj = {
|
|
9618
|
+
let dataObj = __spreadValues({
|
|
9631
9619
|
Token: data == null ? void 0 : data.Token,
|
|
9632
9620
|
amount,
|
|
9633
9621
|
postal_code: data == null ? void 0 : data.postalCode
|
|
9634
|
-
}
|
|
9622
|
+
}, saveCardInfo ? {
|
|
9623
|
+
card: {
|
|
9624
|
+
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
9625
|
+
customer_id: customerId,
|
|
9626
|
+
gateway_token: (data == null ? void 0 : data.Token) || (data == null ? void 0 : data.gateway_token),
|
|
9627
|
+
name: cardData == null ? void 0 : cardData.cardName
|
|
9628
|
+
}
|
|
9629
|
+
} : null);
|
|
9635
9630
|
const preAuthResponse = await axios9.post(`${masterBaseUrl}api/v1/gateway/preauth/${session_token}`, dataObj);
|
|
9636
9631
|
if ((_a2 = preAuthResponse == null ? void 0 : preAuthResponse.data) == null ? void 0 : _a2.result) {
|
|
9637
9632
|
let addCard;
|
|
9638
|
-
if (saveCardInfo && customerId) {
|
|
9639
|
-
try {
|
|
9640
|
-
let obj = {
|
|
9641
|
-
postal_code: cardData == null ? void 0 : cardData.zipCode,
|
|
9642
|
-
customer_id: customerId,
|
|
9643
|
-
gateway_token: (data == null ? void 0 : data.Token) || (data == null ? void 0 : data.gateway_token)
|
|
9644
|
-
};
|
|
9645
|
-
addCard = await axios9.post(`${masterBaseUrl}api/v1/gateway/add-card/${session_token}`, obj);
|
|
9646
|
-
if ((_b2 = addCard == null ? void 0 : addCard.data) == null ? void 0 : _b2.result) {
|
|
9647
|
-
addCard = (_c2 = addCard == null ? void 0 : addCard.data) == null ? void 0 : _c2.data;
|
|
9648
|
-
}
|
|
9649
|
-
} catch (error2) {
|
|
9650
|
-
console.log(error2, "error");
|
|
9651
|
-
hideLoader();
|
|
9652
|
-
setError(((_e2 = (_d2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _d2.data) == null ? void 0 : _e2.message) || "Something went wrong!");
|
|
9653
|
-
callback({
|
|
9654
|
-
error: ((_g2 = (_f2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _f2.data) == null ? void 0 : _g2.message) || "Something went wrong!",
|
|
9655
|
-
result: (_i2 = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.result,
|
|
9656
|
-
statusCode: (_j2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _j2.status
|
|
9657
|
-
});
|
|
9658
|
-
}
|
|
9659
|
-
}
|
|
9660
9633
|
let callbackdata = {
|
|
9661
|
-
cardDetails:
|
|
9662
|
-
callback: __spreadProps(__spreadValues({}, (
|
|
9634
|
+
// cardDetails: { ...addCard, ...data },
|
|
9635
|
+
callback: __spreadProps(__spreadValues({}, (_b2 = preAuthResponse == null ? void 0 : preAuthResponse.data) == null ? void 0 : _b2.data), { name: cardData == null ? void 0 : cardData.cardName, isPreAuth })
|
|
9663
9636
|
};
|
|
9664
|
-
if (!saveCardInfo) {
|
|
9665
|
-
delete callbackdata.cardDetails;
|
|
9666
|
-
}
|
|
9667
9637
|
callback(callbackdata);
|
|
9668
9638
|
hideLoader();
|
|
9669
9639
|
handleClose();
|
|
9670
9640
|
}
|
|
9671
9641
|
} catch (error2) {
|
|
9672
|
-
setError(((
|
|
9642
|
+
setError(((_d2 = (_c2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || "Something went wrong!");
|
|
9673
9643
|
callback({
|
|
9674
|
-
error: ((
|
|
9675
|
-
result: (
|
|
9676
|
-
statusCode: (
|
|
9644
|
+
error: ((_f2 = (_e2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _e2.data) == null ? void 0 : _f2.message) || "Something went wrong!",
|
|
9645
|
+
result: (_h2 = (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.data) == null ? void 0 : _h2.result,
|
|
9646
|
+
statusCode: (_i2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _i2.status
|
|
9677
9647
|
});
|
|
9678
9648
|
hideLoader();
|
|
9679
9649
|
}
|
|
@@ -9884,7 +9854,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9884
9854
|
return validCard && validCVV && validExpirationDate;
|
|
9885
9855
|
};
|
|
9886
9856
|
const submitFunc = async (e) => {
|
|
9887
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2
|
|
9857
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2;
|
|
9888
9858
|
e.preventDefault();
|
|
9889
9859
|
const el = document.activeElement;
|
|
9890
9860
|
if (el instanceof HTMLElement) {
|
|
@@ -9934,7 +9904,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9934
9904
|
} else {
|
|
9935
9905
|
let callbackdata;
|
|
9936
9906
|
try {
|
|
9937
|
-
const payByBank = await axios9.post(`${masterBaseUrl}api/v1/gateway/bank-charge/${session_token}`, {
|
|
9907
|
+
const payByBank = await axios9.post(`${masterBaseUrl}api/v1/gateway/bank-charge/${session_token}`, __spreadValues({
|
|
9938
9908
|
label: achData == null ? void 0 : achData.name,
|
|
9939
9909
|
account_number: achData == null ? void 0 : achData.accountNumber,
|
|
9940
9910
|
routing_number: achData == null ? void 0 : achData.routingNumber,
|
|
@@ -9948,36 +9918,20 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9948
9918
|
surcharge: "0.00",
|
|
9949
9919
|
order_id: "",
|
|
9950
9920
|
company_name: (achData == null ? void 0 : achData.companyName) || ""
|
|
9951
|
-
}
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
account_type: achData == null ? void 0 : achData.accountType,
|
|
9961
|
-
customer_id: customerId || "",
|
|
9962
|
-
company_name: (achData == null ? void 0 : achData.companyName) || ""
|
|
9963
|
-
});
|
|
9964
|
-
if (result2.data.result) {
|
|
9965
|
-
callbackdata = {
|
|
9966
|
-
bankDetails: __spreadProps(__spreadValues({}, (_g2 = result2 == null ? void 0 : result2.data) == null ? void 0 : _g2.data), { account_type: achData == null ? void 0 : achData.accountType })
|
|
9967
|
-
};
|
|
9968
|
-
}
|
|
9969
|
-
} catch (error2) {
|
|
9970
|
-
hideLoader();
|
|
9971
|
-
setError(((_i2 = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data) == null ? void 0 : _i2.message) || "Something went wrong!");
|
|
9972
|
-
callback({
|
|
9973
|
-
error: ((_k2 = (_j2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _j2.data) == null ? void 0 : _k2.message) || "Something went wrong!",
|
|
9974
|
-
result: (_m2 = (_l2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _l2.data) == null ? void 0 : _m2.result,
|
|
9975
|
-
statusCode: (_n2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _n2.status
|
|
9976
|
-
});
|
|
9977
|
-
}
|
|
9921
|
+
}, saveACHinfo ? {
|
|
9922
|
+
bank: {
|
|
9923
|
+
name: achData == null ? void 0 : achData.name,
|
|
9924
|
+
account_number: achData == null ? void 0 : achData.accountNumber,
|
|
9925
|
+
routing_number: achData == null ? void 0 : achData.routingNumber,
|
|
9926
|
+
bank_name: achData == null ? void 0 : achData.bankName,
|
|
9927
|
+
account_type: achData == null ? void 0 : achData.accountType,
|
|
9928
|
+
customer_id: customerId || "",
|
|
9929
|
+
company_name: (achData == null ? void 0 : achData.companyName) || ""
|
|
9978
9930
|
}
|
|
9931
|
+
} : null));
|
|
9932
|
+
if ((_f2 = payByBank == null ? void 0 : payByBank.data) == null ? void 0 : _f2.result) {
|
|
9979
9933
|
callbackdata = __spreadProps(__spreadValues({}, callbackdata), {
|
|
9980
|
-
callback: __spreadProps(__spreadValues({}, (
|
|
9934
|
+
callback: __spreadProps(__spreadValues({}, (_g2 = payByBank == null ? void 0 : payByBank.data) == null ? void 0 : _g2.data), { name: achData == null ? void 0 : achData.name, isPreAuth })
|
|
9981
9935
|
});
|
|
9982
9936
|
callback(callbackdata);
|
|
9983
9937
|
handleClose();
|
|
@@ -9985,7 +9939,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9985
9939
|
}
|
|
9986
9940
|
} catch (error2) {
|
|
9987
9941
|
console.log(error2, "errororor");
|
|
9988
|
-
let data = (
|
|
9942
|
+
let data = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data;
|
|
9989
9943
|
if (typeof (data == null ? void 0 : data.message) == "object") {
|
|
9990
9944
|
Object.values(data == null ? void 0 : data.message).forEach((message) => {
|
|
9991
9945
|
var _a3;
|
|
@@ -10001,7 +9955,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10001
9955
|
callback({
|
|
10002
9956
|
error: (data == null ? void 0 : data.message) || "Something went wrong!",
|
|
10003
9957
|
result: (data == null ? void 0 : data.result) || false,
|
|
10004
|
-
statusCode: (
|
|
9958
|
+
statusCode: (_i2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _i2.status
|
|
10005
9959
|
});
|
|
10006
9960
|
}
|
|
10007
9961
|
hideLoader();
|
|
@@ -10011,11 +9965,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10011
9965
|
} catch (error2) {
|
|
10012
9966
|
hideLoader();
|
|
10013
9967
|
callback({
|
|
10014
|
-
error: ((
|
|
10015
|
-
result: (
|
|
10016
|
-
statusCode: (
|
|
9968
|
+
error: ((_k2 = (_j2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _j2.data) == null ? void 0 : _k2.message) || "Something went wrong!",
|
|
9969
|
+
result: (_m2 = (_l2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _l2.data) == null ? void 0 : _m2.result,
|
|
9970
|
+
statusCode: (_n2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _n2.status
|
|
10017
9971
|
});
|
|
10018
|
-
setError(((
|
|
9972
|
+
setError(((_p2 = (_o2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _o2.data) == null ? void 0 : _p2.message) || "Something went wrong!");
|
|
10019
9973
|
}
|
|
10020
9974
|
};
|
|
10021
9975
|
const handleCardChange = (field, value) => {
|
|
@@ -10510,7 +10464,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10510
10464
|
return /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10511
10465
|
initialLoader && /* @__PURE__ */ jsx32(Loader_default, { loading: initialLoader }),
|
|
10512
10466
|
error && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error, onClose: handleClose }) }),
|
|
10513
|
-
|
|
10467
|
+
errorIframe && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error: errorIframe, onClose: () => {
|
|
10468
|
+
setErrorIframe("");
|
|
10469
|
+
} }) }),
|
|
10470
|
+
!error && !errorIframe && /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10514
10471
|
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx32(Loader_default, { loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
|
|
10515
10472
|
/* @__PURE__ */ jsxs19("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
|
|
10516
10473
|
/* @__PURE__ */ jsx32("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
|