@pinerohit11/testwidget 0.1.71 → 0.1.72
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.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +17 -6
- package/dist/index.mjs +16 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -10,6 +10,9 @@ interface Props$1 {
|
|
10
10
|
from?: string;
|
11
11
|
amount: string;
|
12
12
|
webname?: string;
|
13
|
+
discount?: string;
|
14
|
+
tax?: string;
|
15
|
+
surcharge?: string;
|
13
16
|
}
|
14
17
|
declare function RequestPayment(props: Props$1): React.JSX.Element;
|
15
18
|
|
@@ -23,6 +26,9 @@ interface Props {
|
|
23
26
|
from?: string;
|
24
27
|
amount: string;
|
25
28
|
webname?: string;
|
29
|
+
discount?: string;
|
30
|
+
tax?: string;
|
31
|
+
surcharge?: string;
|
26
32
|
}
|
27
33
|
declare function RequestPreAuthPayment(props: Props): React.JSX.Element;
|
28
34
|
|
package/dist/index.d.ts
CHANGED
@@ -10,6 +10,9 @@ interface Props$1 {
|
|
10
10
|
from?: string;
|
11
11
|
amount: string;
|
12
12
|
webname?: string;
|
13
|
+
discount?: string;
|
14
|
+
tax?: string;
|
15
|
+
surcharge?: string;
|
13
16
|
}
|
14
17
|
declare function RequestPayment(props: Props$1): React.JSX.Element;
|
15
18
|
|
@@ -23,6 +26,9 @@ interface Props {
|
|
23
26
|
from?: string;
|
24
27
|
amount: string;
|
25
28
|
webname?: string;
|
29
|
+
discount?: string;
|
30
|
+
tax?: string;
|
31
|
+
surcharge?: string;
|
26
32
|
}
|
27
33
|
declare function RequestPreAuthPayment(props: Props): React.JSX.Element;
|
28
34
|
|
package/dist/index.js
CHANGED
@@ -53,7 +53,6 @@ __export(index_exports, {
|
|
53
53
|
module.exports = __toCommonJS(index_exports);
|
54
54
|
|
55
55
|
// src/app/components/RequestPayment/RequestPayment.tsx
|
56
|
-
var import_bootstrap_bundle_min = require("bootstrap/dist/js/bootstrap.bundle.min.js");
|
57
56
|
var import_react6 = __toESM(require("react"));
|
58
57
|
|
59
58
|
// src/app/components/Loader/Loader.tsx
|
@@ -690,6 +689,9 @@ var RequestPaymentstyles_default = RequestPaymentstyles;
|
|
690
689
|
// src/app/components/RequestPayment/RequestPayment.tsx
|
691
690
|
function RequestPayment(props) {
|
692
691
|
const fractalpayClientKey = props.fractalpayClientKey;
|
692
|
+
const discount = props == null ? void 0 : props.discount;
|
693
|
+
const tax = props == null ? void 0 : props.tax;
|
694
|
+
const surcharge = props == null ? void 0 : props.surcharge;
|
693
695
|
const [show, setShow] = (0, import_react6.useState)(false);
|
694
696
|
const [loading, setLoading] = (0, import_react6.useState)(false);
|
695
697
|
const [errors, setErrors] = (0, import_react6.useState)({});
|
@@ -736,7 +738,6 @@ function RequestPayment(props) {
|
|
736
738
|
window.parent.postMessage(message, "*");
|
737
739
|
}
|
738
740
|
const sendRequestPayment = async () => {
|
739
|
-
debugger;
|
740
741
|
if (Object.keys(errors).length > 0) {
|
741
742
|
return;
|
742
743
|
}
|
@@ -760,9 +761,13 @@ function RequestPayment(props) {
|
|
760
761
|
action: "request",
|
761
762
|
name: requestDetails.name,
|
762
763
|
email: requestDetails.email,
|
763
|
-
customer_id: (props == null ? void 0 : props.customerId) ? props == null ? void 0 : props.customerId : ""
|
764
|
+
customer_id: (props == null ? void 0 : props.customerId) ? props == null ? void 0 : props.customerId : "",
|
765
|
+
discount,
|
766
|
+
surcharge,
|
767
|
+
tax
|
764
768
|
};
|
765
|
-
|
769
|
+
const response = await import_axios.default.post("/api/payment-request", formData);
|
770
|
+
console.log(response, "response");
|
766
771
|
if ((response == null ? void 0 : response.status) === 200) {
|
767
772
|
setShowConfirmationModal(true);
|
768
773
|
setShow(false);
|
@@ -916,12 +921,15 @@ function RequestPayment(props) {
|
|
916
921
|
}
|
917
922
|
|
918
923
|
// src/app/components/RequestPayment/RequestPreAuthPayment.tsx
|
919
|
-
var
|
924
|
+
var import_bootstrap_bundle_min = require("bootstrap/dist/js/bootstrap.bundle.min.js");
|
920
925
|
var import_react7 = __toESM(require("react"));
|
921
926
|
var import_axios2 = __toESM(require("axios"));
|
922
927
|
var import_react_number_format2 = require("react-number-format");
|
923
928
|
function RequestPreAuthPayment(props) {
|
924
929
|
const fractalpayClientKey = props.fractalpayClientKey;
|
930
|
+
const discount = props == null ? void 0 : props.discount;
|
931
|
+
const tax = props == null ? void 0 : props.tax;
|
932
|
+
const surcharge = props == null ? void 0 : props.surcharge;
|
925
933
|
const [show, setShow] = (0, import_react7.useState)(false);
|
926
934
|
const [loading, setLoading] = (0, import_react7.useState)(false);
|
927
935
|
const [errors, setErrors] = (0, import_react7.useState)({});
|
@@ -991,7 +999,10 @@ function RequestPreAuthPayment(props) {
|
|
991
999
|
action: "request",
|
992
1000
|
name: requestDetails.name,
|
993
1001
|
email: requestDetails.email,
|
994
|
-
customer_id: (props == null ? void 0 : props.customerId) ? props == null ? void 0 : props.customerId : ""
|
1002
|
+
customer_id: (props == null ? void 0 : props.customerId) ? props == null ? void 0 : props.customerId : "",
|
1003
|
+
discount,
|
1004
|
+
surcharge,
|
1005
|
+
tax
|
995
1006
|
};
|
996
1007
|
let response = await import_axios2.default.post(`${baseUrl}send-request-pre-auth-payment`, formData);
|
997
1008
|
if ((response == null ? void 0 : response.status) === 200) {
|
package/dist/index.mjs
CHANGED
@@ -19,7 +19,6 @@ var __spreadValues = (a, b) => {
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
20
20
|
|
21
21
|
// src/app/components/RequestPayment/RequestPayment.tsx
|
22
|
-
import "bootstrap/dist/js/bootstrap.bundle.min.js";
|
23
22
|
import React6, { useState, useEffect } from "react";
|
24
23
|
|
25
24
|
// src/app/components/Loader/Loader.tsx
|
@@ -656,6 +655,9 @@ var RequestPaymentstyles_default = RequestPaymentstyles;
|
|
656
655
|
// src/app/components/RequestPayment/RequestPayment.tsx
|
657
656
|
function RequestPayment(props) {
|
658
657
|
const fractalpayClientKey = props.fractalpayClientKey;
|
658
|
+
const discount = props == null ? void 0 : props.discount;
|
659
|
+
const tax = props == null ? void 0 : props.tax;
|
660
|
+
const surcharge = props == null ? void 0 : props.surcharge;
|
659
661
|
const [show, setShow] = useState(false);
|
660
662
|
const [loading, setLoading] = useState(false);
|
661
663
|
const [errors, setErrors] = useState({});
|
@@ -702,7 +704,6 @@ function RequestPayment(props) {
|
|
702
704
|
window.parent.postMessage(message, "*");
|
703
705
|
}
|
704
706
|
const sendRequestPayment = async () => {
|
705
|
-
debugger;
|
706
707
|
if (Object.keys(errors).length > 0) {
|
707
708
|
return;
|
708
709
|
}
|
@@ -726,9 +727,13 @@ function RequestPayment(props) {
|
|
726
727
|
action: "request",
|
727
728
|
name: requestDetails.name,
|
728
729
|
email: requestDetails.email,
|
729
|
-
customer_id: (props == null ? void 0 : props.customerId) ? props == null ? void 0 : props.customerId : ""
|
730
|
+
customer_id: (props == null ? void 0 : props.customerId) ? props == null ? void 0 : props.customerId : "",
|
731
|
+
discount,
|
732
|
+
surcharge,
|
733
|
+
tax
|
730
734
|
};
|
731
|
-
|
735
|
+
const response = await axios.post("/api/payment-request", formData);
|
736
|
+
console.log(response, "response");
|
732
737
|
if ((response == null ? void 0 : response.status) === 200) {
|
733
738
|
setShowConfirmationModal(true);
|
734
739
|
setShow(false);
|
@@ -888,6 +893,9 @@ import axios2 from "axios";
|
|
888
893
|
import { PatternFormat as PatternFormat2 } from "react-number-format";
|
889
894
|
function RequestPreAuthPayment(props) {
|
890
895
|
const fractalpayClientKey = props.fractalpayClientKey;
|
896
|
+
const discount = props == null ? void 0 : props.discount;
|
897
|
+
const tax = props == null ? void 0 : props.tax;
|
898
|
+
const surcharge = props == null ? void 0 : props.surcharge;
|
891
899
|
const [show, setShow] = useState2(false);
|
892
900
|
const [loading, setLoading] = useState2(false);
|
893
901
|
const [errors, setErrors] = useState2({});
|
@@ -957,7 +965,10 @@ function RequestPreAuthPayment(props) {
|
|
957
965
|
action: "request",
|
958
966
|
name: requestDetails.name,
|
959
967
|
email: requestDetails.email,
|
960
|
-
customer_id: (props == null ? void 0 : props.customerId) ? props == null ? void 0 : props.customerId : ""
|
968
|
+
customer_id: (props == null ? void 0 : props.customerId) ? props == null ? void 0 : props.customerId : "",
|
969
|
+
discount,
|
970
|
+
surcharge,
|
971
|
+
tax
|
961
972
|
};
|
962
973
|
let response = await axios2.post(`${baseUrl}send-request-pre-auth-payment`, formData);
|
963
974
|
if ((response == null ? void 0 : response.status) === 200) {
|