@pinerohit11/testwidget 0.2.96 → 0.2.98
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 +13 -5
- package/dist/index.mjs +13 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -2547,7 +2547,7 @@ function GetPaymentPage(props) {
|
|
2547
2547
|
}
|
2548
2548
|
};
|
2549
2549
|
const getPaymentDetails = async () => {
|
2550
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
2550
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k;
|
2551
2551
|
showLoader();
|
2552
2552
|
try {
|
2553
2553
|
const data = {
|
@@ -2559,6 +2559,10 @@ function GetPaymentPage(props) {
|
|
2559
2559
|
if (((_c2 = (_b2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _b2.data) == null ? void 0 : _c2.card_list) && ((_f2 = (_e2 = (_d2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _d2.data) == null ? void 0 : _e2.card_list) == null ? void 0 : _f2.length) > 0) {
|
2560
2560
|
setCardList((_h2 = (_g2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _g2.data) == null ? void 0 : _h2.card_list);
|
2561
2561
|
setActive("cardList");
|
2562
|
+
let primary_card = (_k = (_j2 = (_i2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _i2.data) == null ? void 0 : _j2.card_list) == null ? void 0 : _k.filter((card) => (card == null ? void 0 : card.primary_card) == 1);
|
2563
|
+
if (primary_card == null ? void 0 : primary_card[0]) {
|
2564
|
+
setSelectedCard(primary_card[0]);
|
2565
|
+
}
|
2562
2566
|
} else {
|
2563
2567
|
setActive("card");
|
2564
2568
|
}
|
@@ -2720,7 +2724,7 @@ function GetPaymentPage(props) {
|
|
2720
2724
|
checked: selectedCard === card,
|
2721
2725
|
onChange: (e) => setSelectedCard(card)
|
2722
2726
|
}
|
2723
|
-
), /* @__PURE__ */ import_react12.default.createElement("label", { htmlFor: "", className: "card-number-last-four" }, "**** ", card == null ? void 0 : card.cardlastfourdigit), /* @__PURE__ */ import_react12.default.createElement("h6", { className: "card-expiry-date" }, card == null ? void 0 : card.expmonth, "/", card == null ? void 0 : card.expyear)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "card-number-radio" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "visa-card" }, /* @__PURE__ */ import_react12.default.createElement("img", { src: (card == null ? void 0 : card.card_type) != "Bank" ? "https://dev-widget.fractalpay.com/images/visa-img.svg" : "https://dev-widget.fractalpay.com/images/bank.svg", alt: "" })), /* @__PURE__ */ import_react12.default.createElement("span", { className: "visa-card", style: { cursor: "pointer" }, onClick: () => handleDeleteCard(card == null ? void 0 : card.id) }, /* @__PURE__ */ import_react12.default.createElement("img", { src: "https://dev-widget.fractalpay.com/images/Trash.svg", alt: "" }))))))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "pay-with-other-card ", onClick: () => setActive("card") }, "Pay With Other Card", /* @__PURE__ */ import_react12.default.createElement("img", { src: "https://dev-widget.fractalpay.com/images/card.svg", alt: "" }))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "form-group", style: { padding: "0" } }, /* @__PURE__ */ import_react12.default.createElement("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer }, "$", props == null ? void 0 : props.amount))), /* @__PURE__ */ import_react12.default.createElement("div", { id: "card", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent" }, /* @__PURE__ */ import_react12.default.createElement("form", { id: "PaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ach-scrl", style: { minHeight: (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && (cardList == null ? void 0 : cardList.length) > 0 ? "398px" : (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && (cardList == null ? void 0 : cardList.length) == 0 ? "
|
2727
|
+
), /* @__PURE__ */ import_react12.default.createElement("label", { htmlFor: "", className: "card-number-last-four" }, "**** ", card == null ? void 0 : card.cardlastfourdigit), /* @__PURE__ */ import_react12.default.createElement("h6", { className: "card-expiry-date" }, card == null ? void 0 : card.expmonth, "/", card == null ? void 0 : card.expyear)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "card-number-radio" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "visa-card" }, /* @__PURE__ */ import_react12.default.createElement("img", { src: (card == null ? void 0 : card.card_type) != "Bank" ? "https://dev-widget.fractalpay.com/images/visa-img.svg" : "https://dev-widget.fractalpay.com/images/bank.svg", alt: "" })), /* @__PURE__ */ import_react12.default.createElement("span", { className: "visa-card", style: { cursor: "pointer" }, onClick: () => handleDeleteCard(card == null ? void 0 : card.id) }, /* @__PURE__ */ import_react12.default.createElement("img", { src: "https://dev-widget.fractalpay.com/images/Trash.svg", alt: "" }))))))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "pay-with-other-card ", onClick: () => setActive("card") }, "Pay With Other Card", /* @__PURE__ */ import_react12.default.createElement("img", { src: "https://dev-widget.fractalpay.com/images/card.svg", alt: "" }))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "form-group", style: { padding: "0" } }, /* @__PURE__ */ import_react12.default.createElement("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer }, "$", props == null ? void 0 : props.amount))), /* @__PURE__ */ import_react12.default.createElement("div", { id: "card", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent" }, /* @__PURE__ */ import_react12.default.createElement("form", { id: "PaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ach-scrl", style: { minHeight: (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && (cardList == null ? void 0 : cardList.length) > 0 ? "398px" : (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && (cardList == null ? void 0 : cardList.length) == 0 ? "456px" : (cardList == null ? void 0 : cardList.length) > 0 ? "462px" : "520px", overflow: "auto", marginRight: "5px" } }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "form-group" }, /* @__PURE__ */ import_react12.default.createElement("label", { htmlFor: "cardHolderName" }, "NAME ON CARD "), /* @__PURE__ */ import_react12.default.createElement("input", { type: "text", className: "form-control", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
2724
2728
|
const value = e.target.value;
|
2725
2729
|
if (/^[a-zA-Z\s]*$/.test(value)) {
|
2726
2730
|
handleCardChange("cardName", value);
|
@@ -3137,7 +3141,7 @@ function PreAuthPayment(props) {
|
|
3137
3141
|
}
|
3138
3142
|
};
|
3139
3143
|
const getPaymentDetails = async () => {
|
3140
|
-
var _a2, _b2, _c2, _d2, _e, _f, _g, _h;
|
3144
|
+
var _a2, _b2, _c2, _d2, _e, _f, _g, _h, _i, _j, _k;
|
3141
3145
|
showLoader();
|
3142
3146
|
try {
|
3143
3147
|
const data = {
|
@@ -3150,6 +3154,10 @@ function PreAuthPayment(props) {
|
|
3150
3154
|
if (((_c2 = (_b2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _b2.data) == null ? void 0 : _c2.card_list) && ((_f = (_e = (_d2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _d2.data) == null ? void 0 : _e.card_list) == null ? void 0 : _f.length) > 0) {
|
3151
3155
|
setCardList((_h = (_g = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _g.data) == null ? void 0 : _h.card_list);
|
3152
3156
|
setActive("cardList");
|
3157
|
+
let primary_card = (_k = (_j = (_i = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _i.data) == null ? void 0 : _j.card_list) == null ? void 0 : _k.filter((card) => (card == null ? void 0 : card.primary_card) == 1);
|
3158
|
+
if (primary_card == null ? void 0 : primary_card[0]) {
|
3159
|
+
setSelectedCard(primary_card[0]);
|
3160
|
+
}
|
3153
3161
|
} else {
|
3154
3162
|
setActive("card");
|
3155
3163
|
}
|
@@ -3294,7 +3302,7 @@ function PreAuthPayment(props) {
|
|
3294
3302
|
checked: selectedCard === card,
|
3295
3303
|
onChange: (e) => setSelectedCard(card)
|
3296
3304
|
}
|
3297
|
-
), /* @__PURE__ */ import_react13.default.createElement("label", { htmlFor: "", className: "card-number-last-four" }, "**** ", card == null ? void 0 : card.cardlastfourdigit), /* @__PURE__ */ import_react13.default.createElement("h6", { className: "card-expiry-date" }, card == null ? void 0 : card.expmonth, "/", card == null ? void 0 : card.expyear)), /* @__PURE__ */ import_react13.default.createElement("div", { className: "card-number-radio" }, /* @__PURE__ */ import_react13.default.createElement("span", { className: "visa-card" }, /* @__PURE__ */ import_react13.default.createElement("img", { src: (card == null ? void 0 : card.card_type) != "Bank" ? "https://dev-widget.fractalpay.com/images/visa-img.svg" : "https://dev-widget.fractalpay.com/images/bank.svg", alt: "" })), /* @__PURE__ */ import_react13.default.createElement("span", { className: "visa-card", style: { cursor: "pointer" }, onClick: () => handleDeleteCard(card == null ? void 0 : card.id) }, /* @__PURE__ */ import_react13.default.createElement("img", { src: "https://dev-widget.fractalpay.com/images/Trash.svg", alt: "" }))))))), /* @__PURE__ */ import_react13.default.createElement("div", { className: "pay-with-other-card ", onClick: () => setActive("card") }, "Authorize With Other Card", /* @__PURE__ */ import_react13.default.createElement("img", { src: "https://dev-widget.fractalpay.com/images/card.svg", alt: "" }))), /* @__PURE__ */ import_react13.default.createElement("div", { className: "form-group" }, /* @__PURE__ */ import_react13.default.createElement("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer }, "$", props == null ? void 0 : props.amount))), /* @__PURE__ */ import_react13.default.createElement("div", { id: "card", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent" }, /* @__PURE__ */ import_react13.default.createElement("form", { id: "PaymentForm", onSubmit: submitFunc }, /* @__PURE__ */ import_react13.default.createElement("div", { className: "ach-scrl", style: { minHeight: (cardList == null ? void 0 : cardList.length) > 0 ? "
|
3305
|
+
), /* @__PURE__ */ import_react13.default.createElement("label", { htmlFor: "", className: "card-number-last-four" }, "**** ", card == null ? void 0 : card.cardlastfourdigit), /* @__PURE__ */ import_react13.default.createElement("h6", { className: "card-expiry-date" }, card == null ? void 0 : card.expmonth, "/", card == null ? void 0 : card.expyear)), /* @__PURE__ */ import_react13.default.createElement("div", { className: "card-number-radio" }, /* @__PURE__ */ import_react13.default.createElement("span", { className: "visa-card" }, /* @__PURE__ */ import_react13.default.createElement("img", { src: (card == null ? void 0 : card.card_type) != "Bank" ? "https://dev-widget.fractalpay.com/images/visa-img.svg" : "https://dev-widget.fractalpay.com/images/bank.svg", alt: "" })), /* @__PURE__ */ import_react13.default.createElement("span", { className: "visa-card", style: { cursor: "pointer" }, onClick: () => handleDeleteCard(card == null ? void 0 : card.id) }, /* @__PURE__ */ import_react13.default.createElement("img", { src: "https://dev-widget.fractalpay.com/images/Trash.svg", alt: "" }))))))), /* @__PURE__ */ import_react13.default.createElement("div", { className: "pay-with-other-card ", onClick: () => setActive("card") }, "Authorize With Other Card", /* @__PURE__ */ import_react13.default.createElement("img", { src: "https://dev-widget.fractalpay.com/images/card.svg", alt: "" }))), /* @__PURE__ */ import_react13.default.createElement("div", { className: "form-group" }, /* @__PURE__ */ import_react13.default.createElement("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer }, "$", props == null ? void 0 : props.amount))), /* @__PURE__ */ import_react13.default.createElement("div", { id: "card", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent" }, /* @__PURE__ */ import_react13.default.createElement("form", { id: "PaymentForm", onSubmit: submitFunc }, /* @__PURE__ */ import_react13.default.createElement("div", { className: "ach-scrl", style: { minHeight: (cardList == null ? void 0 : cardList.length) > 0 ? "462px" : "520px", overflow: "auto", marginRight: "5px" } }, /* @__PURE__ */ import_react13.default.createElement("div", { className: "form-group" }, /* @__PURE__ */ import_react13.default.createElement("label", { htmlFor: "cardHolderName" }, "Name on Card"), /* @__PURE__ */ import_react13.default.createElement(
|
3298
3306
|
"input",
|
3299
3307
|
{
|
3300
3308
|
type: "text",
|
@@ -4061,7 +4069,7 @@ function AddCard(props) {
|
|
4061
4069
|
success ? /* @__PURE__ */ import_react18.default.createElement(SuccessCardMsz_default, { onClose: handleClose }) : /* @__PURE__ */ import_react18.default.createElement(
|
4062
4070
|
"div",
|
4063
4071
|
{
|
4064
|
-
className: "container-creditcard add-card modal-content
|
4072
|
+
className: "container-creditcard add-card modal-content ",
|
4065
4073
|
id: "add-credit-card-panel"
|
4066
4074
|
},
|
4067
4075
|
/* @__PURE__ */ import_react18.default.createElement("form", { id: "creditCardForm", onSubmit: addCardFunc }, /* @__PURE__ */ import_react18.default.createElement("div", { className: "form-group", style: { marginTop: "0", marginBottom: "10px" } }, /* @__PURE__ */ import_react18.default.createElement("label", { htmlFor: "cardNumber" }, "Card Number"), /* @__PURE__ */ import_react18.default.createElement(
|
package/dist/index.mjs
CHANGED
@@ -2509,7 +2509,7 @@ function GetPaymentPage(props) {
|
|
2509
2509
|
}
|
2510
2510
|
};
|
2511
2511
|
const getPaymentDetails = async () => {
|
2512
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
2512
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k;
|
2513
2513
|
showLoader();
|
2514
2514
|
try {
|
2515
2515
|
const data = {
|
@@ -2521,6 +2521,10 @@ function GetPaymentPage(props) {
|
|
2521
2521
|
if (((_c2 = (_b2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _b2.data) == null ? void 0 : _c2.card_list) && ((_f2 = (_e2 = (_d2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _d2.data) == null ? void 0 : _e2.card_list) == null ? void 0 : _f2.length) > 0) {
|
2522
2522
|
setCardList((_h2 = (_g2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _g2.data) == null ? void 0 : _h2.card_list);
|
2523
2523
|
setActive("cardList");
|
2524
|
+
let primary_card = (_k = (_j2 = (_i2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _i2.data) == null ? void 0 : _j2.card_list) == null ? void 0 : _k.filter((card) => (card == null ? void 0 : card.primary_card) == 1);
|
2525
|
+
if (primary_card == null ? void 0 : primary_card[0]) {
|
2526
|
+
setSelectedCard(primary_card[0]);
|
2527
|
+
}
|
2524
2528
|
} else {
|
2525
2529
|
setActive("card");
|
2526
2530
|
}
|
@@ -2682,7 +2686,7 @@ function GetPaymentPage(props) {
|
|
2682
2686
|
checked: selectedCard === card,
|
2683
2687
|
onChange: (e) => setSelectedCard(card)
|
2684
2688
|
}
|
2685
|
-
), /* @__PURE__ */ React11.createElement("label", { htmlFor: "", className: "card-number-last-four" }, "**** ", card == null ? void 0 : card.cardlastfourdigit), /* @__PURE__ */ React11.createElement("h6", { className: "card-expiry-date" }, card == null ? void 0 : card.expmonth, "/", card == null ? void 0 : card.expyear)), /* @__PURE__ */ React11.createElement("div", { className: "card-number-radio" }, /* @__PURE__ */ React11.createElement("span", { className: "visa-card" }, /* @__PURE__ */ React11.createElement("img", { src: (card == null ? void 0 : card.card_type) != "Bank" ? "https://dev-widget.fractalpay.com/images/visa-img.svg" : "https://dev-widget.fractalpay.com/images/bank.svg", alt: "" })), /* @__PURE__ */ React11.createElement("span", { className: "visa-card", style: { cursor: "pointer" }, onClick: () => handleDeleteCard(card == null ? void 0 : card.id) }, /* @__PURE__ */ React11.createElement("img", { src: "https://dev-widget.fractalpay.com/images/Trash.svg", alt: "" }))))))), /* @__PURE__ */ React11.createElement("div", { className: "pay-with-other-card ", onClick: () => setActive("card") }, "Pay With Other Card", /* @__PURE__ */ React11.createElement("img", { src: "https://dev-widget.fractalpay.com/images/card.svg", alt: "" }))), /* @__PURE__ */ React11.createElement("div", { className: "form-group", style: { padding: "0" } }, /* @__PURE__ */ React11.createElement("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer }, "$", props == null ? void 0 : props.amount))), /* @__PURE__ */ React11.createElement("div", { id: "card", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent" }, /* @__PURE__ */ React11.createElement("form", { id: "PaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc }, /* @__PURE__ */ React11.createElement("div", { className: "ach-scrl", style: { minHeight: (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && (cardList == null ? void 0 : cardList.length) > 0 ? "398px" : (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && (cardList == null ? void 0 : cardList.length) == 0 ? "
|
2689
|
+
), /* @__PURE__ */ React11.createElement("label", { htmlFor: "", className: "card-number-last-four" }, "**** ", card == null ? void 0 : card.cardlastfourdigit), /* @__PURE__ */ React11.createElement("h6", { className: "card-expiry-date" }, card == null ? void 0 : card.expmonth, "/", card == null ? void 0 : card.expyear)), /* @__PURE__ */ React11.createElement("div", { className: "card-number-radio" }, /* @__PURE__ */ React11.createElement("span", { className: "visa-card" }, /* @__PURE__ */ React11.createElement("img", { src: (card == null ? void 0 : card.card_type) != "Bank" ? "https://dev-widget.fractalpay.com/images/visa-img.svg" : "https://dev-widget.fractalpay.com/images/bank.svg", alt: "" })), /* @__PURE__ */ React11.createElement("span", { className: "visa-card", style: { cursor: "pointer" }, onClick: () => handleDeleteCard(card == null ? void 0 : card.id) }, /* @__PURE__ */ React11.createElement("img", { src: "https://dev-widget.fractalpay.com/images/Trash.svg", alt: "" }))))))), /* @__PURE__ */ React11.createElement("div", { className: "pay-with-other-card ", onClick: () => setActive("card") }, "Pay With Other Card", /* @__PURE__ */ React11.createElement("img", { src: "https://dev-widget.fractalpay.com/images/card.svg", alt: "" }))), /* @__PURE__ */ React11.createElement("div", { className: "form-group", style: { padding: "0" } }, /* @__PURE__ */ React11.createElement("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer }, "$", props == null ? void 0 : props.amount))), /* @__PURE__ */ React11.createElement("div", { id: "card", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent" }, /* @__PURE__ */ React11.createElement("form", { id: "PaymentForm", style: { textAlign: "start" }, onSubmit: submitFunc }, /* @__PURE__ */ React11.createElement("div", { className: "ach-scrl", style: { minHeight: (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && (cardList == null ? void 0 : cardList.length) > 0 ? "398px" : (paymentData == null ? void 0 : paymentData.isSkyFiAccount) && (cardList == null ? void 0 : cardList.length) == 0 ? "456px" : (cardList == null ? void 0 : cardList.length) > 0 ? "462px" : "520px", overflow: "auto", marginRight: "5px" } }, /* @__PURE__ */ React11.createElement("div", { className: "form-group" }, /* @__PURE__ */ React11.createElement("label", { htmlFor: "cardHolderName" }, "NAME ON CARD "), /* @__PURE__ */ React11.createElement("input", { type: "text", className: "form-control", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
|
2686
2690
|
const value = e.target.value;
|
2687
2691
|
if (/^[a-zA-Z\s]*$/.test(value)) {
|
2688
2692
|
handleCardChange("cardName", value);
|
@@ -3099,7 +3103,7 @@ function PreAuthPayment(props) {
|
|
3099
3103
|
}
|
3100
3104
|
};
|
3101
3105
|
const getPaymentDetails = async () => {
|
3102
|
-
var _a2, _b2, _c2, _d2, _e, _f, _g, _h;
|
3106
|
+
var _a2, _b2, _c2, _d2, _e, _f, _g, _h, _i, _j, _k;
|
3103
3107
|
showLoader();
|
3104
3108
|
try {
|
3105
3109
|
const data = {
|
@@ -3112,6 +3116,10 @@ function PreAuthPayment(props) {
|
|
3112
3116
|
if (((_c2 = (_b2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _b2.data) == null ? void 0 : _c2.card_list) && ((_f = (_e = (_d2 = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _d2.data) == null ? void 0 : _e.card_list) == null ? void 0 : _f.length) > 0) {
|
3113
3117
|
setCardList((_h = (_g = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _g.data) == null ? void 0 : _h.card_list);
|
3114
3118
|
setActive("cardList");
|
3119
|
+
let primary_card = (_k = (_j = (_i = paymentData2 == null ? void 0 : paymentData2.data) == null ? void 0 : _i.data) == null ? void 0 : _j.card_list) == null ? void 0 : _k.filter((card) => (card == null ? void 0 : card.primary_card) == 1);
|
3120
|
+
if (primary_card == null ? void 0 : primary_card[0]) {
|
3121
|
+
setSelectedCard(primary_card[0]);
|
3122
|
+
}
|
3115
3123
|
} else {
|
3116
3124
|
setActive("card");
|
3117
3125
|
}
|
@@ -3256,7 +3264,7 @@ function PreAuthPayment(props) {
|
|
3256
3264
|
checked: selectedCard === card,
|
3257
3265
|
onChange: (e) => setSelectedCard(card)
|
3258
3266
|
}
|
3259
|
-
), /* @__PURE__ */ React12.createElement("label", { htmlFor: "", className: "card-number-last-four" }, "**** ", card == null ? void 0 : card.cardlastfourdigit), /* @__PURE__ */ React12.createElement("h6", { className: "card-expiry-date" }, card == null ? void 0 : card.expmonth, "/", card == null ? void 0 : card.expyear)), /* @__PURE__ */ React12.createElement("div", { className: "card-number-radio" }, /* @__PURE__ */ React12.createElement("span", { className: "visa-card" }, /* @__PURE__ */ React12.createElement("img", { src: (card == null ? void 0 : card.card_type) != "Bank" ? "https://dev-widget.fractalpay.com/images/visa-img.svg" : "https://dev-widget.fractalpay.com/images/bank.svg", alt: "" })), /* @__PURE__ */ React12.createElement("span", { className: "visa-card", style: { cursor: "pointer" }, onClick: () => handleDeleteCard(card == null ? void 0 : card.id) }, /* @__PURE__ */ React12.createElement("img", { src: "https://dev-widget.fractalpay.com/images/Trash.svg", alt: "" }))))))), /* @__PURE__ */ React12.createElement("div", { className: "pay-with-other-card ", onClick: () => setActive("card") }, "Authorize With Other Card", /* @__PURE__ */ React12.createElement("img", { src: "https://dev-widget.fractalpay.com/images/card.svg", alt: "" }))), /* @__PURE__ */ React12.createElement("div", { className: "form-group" }, /* @__PURE__ */ React12.createElement("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer }, "$", props == null ? void 0 : props.amount))), /* @__PURE__ */ React12.createElement("div", { id: "card", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent" }, /* @__PURE__ */ React12.createElement("form", { id: "PaymentForm", onSubmit: submitFunc }, /* @__PURE__ */ React12.createElement("div", { className: "ach-scrl", style: { minHeight: (cardList == null ? void 0 : cardList.length) > 0 ? "
|
3267
|
+
), /* @__PURE__ */ React12.createElement("label", { htmlFor: "", className: "card-number-last-four" }, "**** ", card == null ? void 0 : card.cardlastfourdigit), /* @__PURE__ */ React12.createElement("h6", { className: "card-expiry-date" }, card == null ? void 0 : card.expmonth, "/", card == null ? void 0 : card.expyear)), /* @__PURE__ */ React12.createElement("div", { className: "card-number-radio" }, /* @__PURE__ */ React12.createElement("span", { className: "visa-card" }, /* @__PURE__ */ React12.createElement("img", { src: (card == null ? void 0 : card.card_type) != "Bank" ? "https://dev-widget.fractalpay.com/images/visa-img.svg" : "https://dev-widget.fractalpay.com/images/bank.svg", alt: "" })), /* @__PURE__ */ React12.createElement("span", { className: "visa-card", style: { cursor: "pointer" }, onClick: () => handleDeleteCard(card == null ? void 0 : card.id) }, /* @__PURE__ */ React12.createElement("img", { src: "https://dev-widget.fractalpay.com/images/Trash.svg", alt: "" }))))))), /* @__PURE__ */ React12.createElement("div", { className: "pay-with-other-card ", onClick: () => setActive("card") }, "Authorize With Other Card", /* @__PURE__ */ React12.createElement("img", { src: "https://dev-widget.fractalpay.com/images/card.svg", alt: "" }))), /* @__PURE__ */ React12.createElement("div", { className: "form-group" }, /* @__PURE__ */ React12.createElement("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer }, "$", props == null ? void 0 : props.amount))), /* @__PURE__ */ React12.createElement("div", { id: "card", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent" }, /* @__PURE__ */ React12.createElement("form", { id: "PaymentForm", onSubmit: submitFunc }, /* @__PURE__ */ React12.createElement("div", { className: "ach-scrl", style: { minHeight: (cardList == null ? void 0 : cardList.length) > 0 ? "462px" : "520px", overflow: "auto", marginRight: "5px" } }, /* @__PURE__ */ React12.createElement("div", { className: "form-group" }, /* @__PURE__ */ React12.createElement("label", { htmlFor: "cardHolderName" }, "Name on Card"), /* @__PURE__ */ React12.createElement(
|
3260
3268
|
"input",
|
3261
3269
|
{
|
3262
3270
|
type: "text",
|
@@ -4023,7 +4031,7 @@ function AddCard(props) {
|
|
4023
4031
|
success ? /* @__PURE__ */ React17.createElement(SuccessCardMsz_default, { onClose: handleClose }) : /* @__PURE__ */ React17.createElement(
|
4024
4032
|
"div",
|
4025
4033
|
{
|
4026
|
-
className: "container-creditcard add-card modal-content
|
4034
|
+
className: "container-creditcard add-card modal-content ",
|
4027
4035
|
id: "add-credit-card-panel"
|
4028
4036
|
},
|
4029
4037
|
/* @__PURE__ */ React17.createElement("form", { id: "creditCardForm", onSubmit: addCardFunc }, /* @__PURE__ */ React17.createElement("div", { className: "form-group", style: { marginTop: "0", marginBottom: "10px" } }, /* @__PURE__ */ React17.createElement("label", { htmlFor: "cardNumber" }, "Card Number"), /* @__PURE__ */ React17.createElement(
|