@pinerohit11/testwidget 0.2.125 → 0.2.126
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 +2 -8
- package/dist/index.mjs +2 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -780,7 +780,6 @@ function RequestPayment(props) {
|
|
780
780
|
window.parent.postMessage(message, "*");
|
781
781
|
}
|
782
782
|
const sendRequestPayment = async () => {
|
783
|
-
debugger;
|
784
783
|
if (Object.keys(errors).length > 0) {
|
785
784
|
return;
|
786
785
|
}
|
@@ -2694,7 +2693,6 @@ function GetPaymentPage(props) {
|
|
2694
2693
|
socketClient_default.emit("sendMessage", dataForm);
|
2695
2694
|
socketClient_default.on("ach-incoming", (data) => {
|
2696
2695
|
var _a3;
|
2697
|
-
debugger;
|
2698
2696
|
console.log(data, "sfhdwhf");
|
2699
2697
|
if ((data == null ? void 0 : data.status) == "Failed") {
|
2700
2698
|
if (typeof (data == null ? void 0 : data.message) == "object") {
|
@@ -2778,7 +2776,6 @@ function GetPaymentPage(props) {
|
|
2778
2776
|
socketClient_default.emit("sendMessage", { url: chargeurl, body: chargeobj, isChargebycard: true });
|
2779
2777
|
socketClient_default.on("charge-by-card", (response) => {
|
2780
2778
|
var _a3;
|
2781
|
-
debugger;
|
2782
2779
|
console.log(response, "response");
|
2783
2780
|
if ((response == null ? void 0 : response.result) == true || (response == null ? void 0 : response.status) == true) {
|
2784
2781
|
setTranId((_a3 = response.data) == null ? void 0 : _a3.transaction_id);
|
@@ -4062,7 +4059,7 @@ function AddCard(props) {
|
|
4062
4059
|
}));
|
4063
4060
|
};
|
4064
4061
|
const validateCardData = () => {
|
4065
|
-
var _a2, _b, _c, _d, _e, _f
|
4062
|
+
var _a2, _b, _c, _d, _e, _f;
|
4066
4063
|
const errors = {};
|
4067
4064
|
const data = cardData;
|
4068
4065
|
const month = parseInt((data == null ? void 0 : data.expiryMonth) || "", 10);
|
@@ -4082,7 +4079,6 @@ function AddCard(props) {
|
|
4082
4079
|
errors.expiryMonth = "Invalid Expiration Date.";
|
4083
4080
|
}
|
4084
4081
|
if (!((_f = data == null ? void 0 : data.cvv) == null ? void 0 : _f.trim())) errors.cvv = "CVC is required";
|
4085
|
-
if (!((_g = data == null ? void 0 : data.zipCode) == null ? void 0 : _g.trim())) errors.zipCode = "ZIP code is required";
|
4086
4082
|
if ((data == null ? void 0 : data.expiryMonth) && (data == null ? void 0 : data.expiryYear) && data.expiryMonth.length <= 2 && data.expiryYear.length === 4) {
|
4087
4083
|
const month2 = parseInt(data.expiryMonth, 10);
|
4088
4084
|
const year2 = parseInt(data.expiryYear, 10);
|
@@ -4449,7 +4445,7 @@ function AddCardEasyPay(props) {
|
|
4449
4445
|
}));
|
4450
4446
|
};
|
4451
4447
|
const validateCardData = () => {
|
4452
|
-
var _a2, _b, _c, _d, _e, _f
|
4448
|
+
var _a2, _b, _c, _d, _e, _f;
|
4453
4449
|
const errors = {};
|
4454
4450
|
const data = cardData;
|
4455
4451
|
const month = parseInt((data == null ? void 0 : data.expiryMonth) || "", 10);
|
@@ -4469,7 +4465,6 @@ function AddCardEasyPay(props) {
|
|
4469
4465
|
errors.expiryMonth = "Invalid Expiration Date.";
|
4470
4466
|
}
|
4471
4467
|
if (!((_f = data == null ? void 0 : data.cvv) == null ? void 0 : _f.trim())) errors.cvv = "CVC is required";
|
4472
|
-
if (!((_g = data == null ? void 0 : data.zipCode) == null ? void 0 : _g.trim())) errors.zipCode = "ZIP code is required";
|
4473
4468
|
if ((data == null ? void 0 : data.expiryMonth) && (data == null ? void 0 : data.expiryYear) && data.expiryMonth.length <= 2 && data.expiryYear.length === 4) {
|
4474
4469
|
const month2 = parseInt(data.expiryMonth, 10);
|
4475
4470
|
const year2 = parseInt(data.expiryYear, 10);
|
@@ -4517,7 +4512,6 @@ function AddCardEasyPay(props) {
|
|
4517
4512
|
e.preventDefault();
|
4518
4513
|
const hasError = validateCardData();
|
4519
4514
|
console.log(cardData);
|
4520
|
-
debugger;
|
4521
4515
|
if (hasError) return;
|
4522
4516
|
else {
|
4523
4517
|
let validCard = DatacapWebToken.validateCardNumber(cardData == null ? void 0 : cardData.cardNumber.replaceAll(" ", ""));
|
package/dist/index.mjs
CHANGED
@@ -742,7 +742,6 @@ function RequestPayment(props) {
|
|
742
742
|
window.parent.postMessage(message, "*");
|
743
743
|
}
|
744
744
|
const sendRequestPayment = async () => {
|
745
|
-
debugger;
|
746
745
|
if (Object.keys(errors).length > 0) {
|
747
746
|
return;
|
748
747
|
}
|
@@ -2656,7 +2655,6 @@ function GetPaymentPage(props) {
|
|
2656
2655
|
socketClient_default.emit("sendMessage", dataForm);
|
2657
2656
|
socketClient_default.on("ach-incoming", (data) => {
|
2658
2657
|
var _a3;
|
2659
|
-
debugger;
|
2660
2658
|
console.log(data, "sfhdwhf");
|
2661
2659
|
if ((data == null ? void 0 : data.status) == "Failed") {
|
2662
2660
|
if (typeof (data == null ? void 0 : data.message) == "object") {
|
@@ -2740,7 +2738,6 @@ function GetPaymentPage(props) {
|
|
2740
2738
|
socketClient_default.emit("sendMessage", { url: chargeurl, body: chargeobj, isChargebycard: true });
|
2741
2739
|
socketClient_default.on("charge-by-card", (response) => {
|
2742
2740
|
var _a3;
|
2743
|
-
debugger;
|
2744
2741
|
console.log(response, "response");
|
2745
2742
|
if ((response == null ? void 0 : response.result) == true || (response == null ? void 0 : response.status) == true) {
|
2746
2743
|
setTranId((_a3 = response.data) == null ? void 0 : _a3.transaction_id);
|
@@ -4024,7 +4021,7 @@ function AddCard(props) {
|
|
4024
4021
|
}));
|
4025
4022
|
};
|
4026
4023
|
const validateCardData = () => {
|
4027
|
-
var _a2, _b, _c, _d, _e, _f
|
4024
|
+
var _a2, _b, _c, _d, _e, _f;
|
4028
4025
|
const errors = {};
|
4029
4026
|
const data = cardData;
|
4030
4027
|
const month = parseInt((data == null ? void 0 : data.expiryMonth) || "", 10);
|
@@ -4044,7 +4041,6 @@ function AddCard(props) {
|
|
4044
4041
|
errors.expiryMonth = "Invalid Expiration Date.";
|
4045
4042
|
}
|
4046
4043
|
if (!((_f = data == null ? void 0 : data.cvv) == null ? void 0 : _f.trim())) errors.cvv = "CVC is required";
|
4047
|
-
if (!((_g = data == null ? void 0 : data.zipCode) == null ? void 0 : _g.trim())) errors.zipCode = "ZIP code is required";
|
4048
4044
|
if ((data == null ? void 0 : data.expiryMonth) && (data == null ? void 0 : data.expiryYear) && data.expiryMonth.length <= 2 && data.expiryYear.length === 4) {
|
4049
4045
|
const month2 = parseInt(data.expiryMonth, 10);
|
4050
4046
|
const year2 = parseInt(data.expiryYear, 10);
|
@@ -4411,7 +4407,7 @@ function AddCardEasyPay(props) {
|
|
4411
4407
|
}));
|
4412
4408
|
};
|
4413
4409
|
const validateCardData = () => {
|
4414
|
-
var _a2, _b, _c, _d, _e, _f
|
4410
|
+
var _a2, _b, _c, _d, _e, _f;
|
4415
4411
|
const errors = {};
|
4416
4412
|
const data = cardData;
|
4417
4413
|
const month = parseInt((data == null ? void 0 : data.expiryMonth) || "", 10);
|
@@ -4431,7 +4427,6 @@ function AddCardEasyPay(props) {
|
|
4431
4427
|
errors.expiryMonth = "Invalid Expiration Date.";
|
4432
4428
|
}
|
4433
4429
|
if (!((_f = data == null ? void 0 : data.cvv) == null ? void 0 : _f.trim())) errors.cvv = "CVC is required";
|
4434
|
-
if (!((_g = data == null ? void 0 : data.zipCode) == null ? void 0 : _g.trim())) errors.zipCode = "ZIP code is required";
|
4435
4430
|
if ((data == null ? void 0 : data.expiryMonth) && (data == null ? void 0 : data.expiryYear) && data.expiryMonth.length <= 2 && data.expiryYear.length === 4) {
|
4436
4431
|
const month2 = parseInt(data.expiryMonth, 10);
|
4437
4432
|
const year2 = parseInt(data.expiryYear, 10);
|
@@ -4479,7 +4474,6 @@ function AddCardEasyPay(props) {
|
|
4479
4474
|
e.preventDefault();
|
4480
4475
|
const hasError = validateCardData();
|
4481
4476
|
console.log(cardData);
|
4482
|
-
debugger;
|
4483
4477
|
if (hasError) return;
|
4484
4478
|
else {
|
4485
4479
|
let validCard = DatacapWebToken.validateCardNumber(cardData == null ? void 0 : cardData.cardNumber.replaceAll(" ", ""));
|