@fractalpay/fractalpay-next-test 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 +85 -125
- 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-test",
|
|
42
|
-
version: "0.0.
|
|
42
|
+
version: "0.0.27",
|
|
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,32 +3209,32 @@ 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: [
|
|
3216
|
-
/* @__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(
|
|
3217
3217
|
"div",
|
|
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
|
-
/* @__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(
|
|
3225
3225
|
"div",
|
|
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
|
-
/* @__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(
|
|
3233
3233
|
"div",
|
|
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" }) }),
|
|
@@ -9331,7 +9338,10 @@ position:relative;
|
|
|
9331
9338
|
.exp-date-year-container .form-group {
|
|
9332
9339
|
flex: 1;
|
|
9333
9340
|
}
|
|
9334
|
-
|
|
9341
|
+
.input-main-wrap-frac{
|
|
9342
|
+
margin:0px !important;
|
|
9343
|
+
padding:0px !important;
|
|
9344
|
+
}
|
|
9335
9345
|
|
|
9336
9346
|
|
|
9337
9347
|
|
|
@@ -9563,9 +9573,9 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9563
9573
|
}
|
|
9564
9574
|
};
|
|
9565
9575
|
const handleCharge = async (data) => {
|
|
9566
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2
|
|
9576
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
9567
9577
|
try {
|
|
9568
|
-
let dataObj = {
|
|
9578
|
+
let dataObj = __spreadValues({
|
|
9569
9579
|
pass_fee_amount: Number(amount) - cashDiscount,
|
|
9570
9580
|
pass_fee,
|
|
9571
9581
|
Token: data == null ? void 0 : data.Token,
|
|
@@ -9574,106 +9584,69 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9574
9584
|
require3ds,
|
|
9575
9585
|
isPartial,
|
|
9576
9586
|
orderGuid: orderGuid || ordGuid
|
|
9577
|
-
}
|
|
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);
|
|
9578
9595
|
if (require3ds && (data == null ? void 0 : data.stripe_3ds_auth_id)) {
|
|
9579
9596
|
dataObj.stripe_3ds_auth_id = data == null ? void 0 : data.stripe_3ds_auth_id;
|
|
9580
9597
|
}
|
|
9581
9598
|
const chargeResponse = await axios9.post(`${masterBaseUrl}api/v1/gateway/charge/${session_token}`, dataObj);
|
|
9582
9599
|
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
9600
|
let callbackdata = {
|
|
9607
|
-
cardDetails:
|
|
9608
|
-
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 })
|
|
9609
9603
|
};
|
|
9610
|
-
if (!saveCardInfo) {
|
|
9611
|
-
delete callbackdata.cardDetails;
|
|
9612
|
-
}
|
|
9613
9604
|
callback(callbackdata);
|
|
9614
9605
|
hideLoader();
|
|
9615
9606
|
handleClose();
|
|
9616
9607
|
}
|
|
9617
9608
|
} catch (error2) {
|
|
9618
|
-
setError(((
|
|
9609
|
+
setError(((_d2 = (_c2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || "Something went wrong!");
|
|
9619
9610
|
callback({
|
|
9620
|
-
error: ((
|
|
9621
|
-
result: (
|
|
9622
|
-
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
|
|
9623
9614
|
});
|
|
9624
9615
|
hideLoader();
|
|
9625
9616
|
}
|
|
9626
9617
|
};
|
|
9627
9618
|
const handlePreAuth = async (data) => {
|
|
9628
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2
|
|
9619
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
9629
9620
|
try {
|
|
9630
|
-
let dataObj = {
|
|
9621
|
+
let dataObj = __spreadValues({
|
|
9631
9622
|
Token: data == null ? void 0 : data.Token,
|
|
9632
9623
|
amount,
|
|
9633
9624
|
postal_code: data == null ? void 0 : data.postalCode
|
|
9634
|
-
}
|
|
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);
|
|
9635
9633
|
const preAuthResponse = await axios9.post(`${masterBaseUrl}api/v1/gateway/preauth/${session_token}`, dataObj);
|
|
9636
9634
|
if ((_a2 = preAuthResponse == null ? void 0 : preAuthResponse.data) == null ? void 0 : _a2.result) {
|
|
9637
9635
|
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
9636
|
let callbackdata = {
|
|
9661
|
-
cardDetails:
|
|
9662
|
-
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 })
|
|
9663
9639
|
};
|
|
9664
|
-
if (!saveCardInfo) {
|
|
9665
|
-
delete callbackdata.cardDetails;
|
|
9666
|
-
}
|
|
9667
9640
|
callback(callbackdata);
|
|
9668
9641
|
hideLoader();
|
|
9669
9642
|
handleClose();
|
|
9670
9643
|
}
|
|
9671
9644
|
} catch (error2) {
|
|
9672
|
-
setError(((
|
|
9645
|
+
setError(((_d2 = (_c2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || "Something went wrong!");
|
|
9673
9646
|
callback({
|
|
9674
|
-
error: ((
|
|
9675
|
-
result: (
|
|
9676
|
-
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
|
|
9677
9650
|
});
|
|
9678
9651
|
hideLoader();
|
|
9679
9652
|
}
|
|
@@ -9884,7 +9857,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9884
9857
|
return validCard && validCVV && validExpirationDate;
|
|
9885
9858
|
};
|
|
9886
9859
|
const submitFunc = async (e) => {
|
|
9887
|
-
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;
|
|
9888
9861
|
e.preventDefault();
|
|
9889
9862
|
const el = document.activeElement;
|
|
9890
9863
|
if (el instanceof HTMLElement) {
|
|
@@ -9934,7 +9907,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9934
9907
|
} else {
|
|
9935
9908
|
let callbackdata;
|
|
9936
9909
|
try {
|
|
9937
|
-
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({
|
|
9938
9911
|
label: achData == null ? void 0 : achData.name,
|
|
9939
9912
|
account_number: achData == null ? void 0 : achData.accountNumber,
|
|
9940
9913
|
routing_number: achData == null ? void 0 : achData.routingNumber,
|
|
@@ -9948,36 +9921,20 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9948
9921
|
surcharge: "0.00",
|
|
9949
9922
|
order_id: "",
|
|
9950
9923
|
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
|
-
}
|
|
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) || ""
|
|
9978
9933
|
}
|
|
9934
|
+
} : null));
|
|
9935
|
+
if ((_f2 = payByBank == null ? void 0 : payByBank.data) == null ? void 0 : _f2.result) {
|
|
9979
9936
|
callbackdata = __spreadProps(__spreadValues({}, callbackdata), {
|
|
9980
|
-
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 })
|
|
9981
9938
|
});
|
|
9982
9939
|
callback(callbackdata);
|
|
9983
9940
|
handleClose();
|
|
@@ -9985,7 +9942,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9985
9942
|
}
|
|
9986
9943
|
} catch (error2) {
|
|
9987
9944
|
console.log(error2, "errororor");
|
|
9988
|
-
let data = (
|
|
9945
|
+
let data = (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.data;
|
|
9989
9946
|
if (typeof (data == null ? void 0 : data.message) == "object") {
|
|
9990
9947
|
Object.values(data == null ? void 0 : data.message).forEach((message) => {
|
|
9991
9948
|
var _a3;
|
|
@@ -10001,7 +9958,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10001
9958
|
callback({
|
|
10002
9959
|
error: (data == null ? void 0 : data.message) || "Something went wrong!",
|
|
10003
9960
|
result: (data == null ? void 0 : data.result) || false,
|
|
10004
|
-
statusCode: (
|
|
9961
|
+
statusCode: (_i2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _i2.status
|
|
10005
9962
|
});
|
|
10006
9963
|
}
|
|
10007
9964
|
hideLoader();
|
|
@@ -10011,11 +9968,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10011
9968
|
} catch (error2) {
|
|
10012
9969
|
hideLoader();
|
|
10013
9970
|
callback({
|
|
10014
|
-
error: ((
|
|
10015
|
-
result: (
|
|
10016
|
-
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
|
|
10017
9974
|
});
|
|
10018
|
-
setError(((
|
|
9975
|
+
setError(((_p2 = (_o2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _o2.data) == null ? void 0 : _p2.message) || "Something went wrong!");
|
|
10019
9976
|
}
|
|
10020
9977
|
};
|
|
10021
9978
|
const handleCardChange = (field, value) => {
|
|
@@ -10510,7 +10467,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10510
10467
|
return /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10511
10468
|
initialLoader && /* @__PURE__ */ jsx32(Loader_default, { loading: initialLoader }),
|
|
10512
10469
|
error && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error, onClose: handleClose }) }),
|
|
10513
|
-
|
|
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: [
|
|
10514
10474
|
(loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx32(Loader_default, { loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
|
|
10515
10475
|
/* @__PURE__ */ jsxs19("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
|
|
10516
10476
|
/* @__PURE__ */ jsx32("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
|