@pinerohit11/testwidget 0.1.41 → 0.1.43
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs +2186 -4
- package/dist/index.d.cts +24 -1
- package/dist/index.d.ts +24 -1
- package/dist/index.js +2186 -3
- package/package.json +50 -45
package/dist/index.js
CHANGED
@@ -115,6 +115,32 @@ var LoaderStyle = (props) => {
|
|
115
115
|
transform: scale(0);
|
116
116
|
}
|
117
117
|
}
|
118
|
+
|
119
|
+
|
120
|
+
.loading-animation {
|
121
|
+
position: absolute;
|
122
|
+
top: 50%;
|
123
|
+
left: 50%;
|
124
|
+
transform: translate(-50%, -50%);
|
125
|
+
}
|
126
|
+
|
127
|
+
.spinner {
|
128
|
+
width: 40px;
|
129
|
+
height: 40px;
|
130
|
+
border-radius: 50%;
|
131
|
+
border: 4px solid #f3f3f3;
|
132
|
+
border-top: 4px solid black;
|
133
|
+
animation: spin 1s linear infinite;
|
134
|
+
}
|
135
|
+
|
136
|
+
@keyframes spin {
|
137
|
+
0% {
|
138
|
+
transform: rotate(0deg);
|
139
|
+
}
|
140
|
+
100% {
|
141
|
+
transform: rotate(360deg);
|
142
|
+
}
|
143
|
+
}
|
118
144
|
`);
|
119
145
|
};
|
120
146
|
var LoaderStyle_default = LoaderStyle;
|
@@ -977,7 +1003,9 @@ var ErrorText = {
|
|
977
1003
|
phonenumbervalid: "Please enter a valid 10-digit phone number",
|
978
1004
|
orderidenter: "Please enter an order ID",
|
979
1005
|
networkresponseerror: "Network response was not ok",
|
980
|
-
anerroroccured: "An error occurred. Please try again."
|
1006
|
+
anerroroccured: "An error occurred. Please try again.",
|
1007
|
+
montherror: "Please write month only 1 to 12",
|
1008
|
+
fieldrequired: "This field is required"
|
981
1009
|
};
|
982
1010
|
|
983
1011
|
// src/app/components/RequestPayment/RequestPayment.tsx
|
@@ -1524,7 +1552,7 @@ function RequestPaymentDynamic({ fractalpayClientKey, amount, phone_number, orde
|
|
1524
1552
|
console.error("Error:", error);
|
1525
1553
|
});
|
1526
1554
|
};
|
1527
|
-
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
|
1555
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
|
1528
1556
|
"button",
|
1529
1557
|
{
|
1530
1558
|
onClick: sendRequestPayment,
|
@@ -1656,9 +1684,2164 @@ function RequestPaymentonClick(props) {
|
|
1656
1684
|
)))
|
1657
1685
|
), onSuccess ? /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("h1", null, "Success!"), /* @__PURE__ */ React7.createElement("h4", null, onSuccess)) : /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("h1", null, "Error!"), /* @__PURE__ */ React7.createElement("h4", null, onError))), /* @__PURE__ */ React7.createElement(Modal4.Footer, null, /* @__PURE__ */ React7.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))));
|
1658
1686
|
}
|
1687
|
+
|
1688
|
+
// src/app/components/RequestPayment/RqstPaymntInputField.tsx
|
1689
|
+
import React8, { useState as useState5 } from "react";
|
1690
|
+
import { Modal as Modal5 } from "react-bootstrap";
|
1691
|
+
import { toast as toast2, ToastContainer as ToastContainer2 } from "react-toastify";
|
1692
|
+
import "react-toastify/dist/ReactToastify.css";
|
1693
|
+
function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
|
1694
|
+
const [isLoading, setIsLoading] = useState5(false);
|
1695
|
+
const [show, setShow] = useState5(false);
|
1696
|
+
const [phoneNumber, setPhoneNumber] = useState5("");
|
1697
|
+
const [isValidNumber, setIsValidNumber] = useState5(true);
|
1698
|
+
const [errorMessage, setErrorMessage] = useState5("");
|
1699
|
+
const [submitClicked, setSubmitClicked] = useState5(false);
|
1700
|
+
const handleClose = () => setShow(false);
|
1701
|
+
const handleShow = () => setShow(true);
|
1702
|
+
const sendRequestPayment = () => {
|
1703
|
+
if (!phoneNumber) {
|
1704
|
+
setErrorMessage(ErrorText.phonenumberrequired);
|
1705
|
+
setSubmitClicked(true);
|
1706
|
+
return;
|
1707
|
+
}
|
1708
|
+
if (!/^\d{10}$/.test(phoneNumber)) {
|
1709
|
+
setErrorMessage(ErrorText.phonenumbervalid);
|
1710
|
+
setSubmitClicked(true);
|
1711
|
+
return;
|
1712
|
+
}
|
1713
|
+
setErrorMessage("");
|
1714
|
+
setSubmitClicked(true);
|
1715
|
+
setIsLoading(true);
|
1716
|
+
let formData = {
|
1717
|
+
fractalpayPublicKey: fractalpayClientKey,
|
1718
|
+
amount,
|
1719
|
+
phone_number: phoneNumber,
|
1720
|
+
orderId: orderID,
|
1721
|
+
action: "request"
|
1722
|
+
};
|
1723
|
+
const jsonData = JSON.stringify(formData);
|
1724
|
+
fetch(`${baseUrl}create-widget-order`, {
|
1725
|
+
method: "POST",
|
1726
|
+
headers: {
|
1727
|
+
"Content-Type": "application/json"
|
1728
|
+
},
|
1729
|
+
body: jsonData
|
1730
|
+
}).then((response) => {
|
1731
|
+
setIsLoading(false);
|
1732
|
+
if (!response.ok) {
|
1733
|
+
throw new Error(ErrorText.networkresponseerror);
|
1734
|
+
}
|
1735
|
+
return response.json();
|
1736
|
+
}).then((data) => {
|
1737
|
+
if (data.result === true) {
|
1738
|
+
setShow(true);
|
1739
|
+
}
|
1740
|
+
console.log(data);
|
1741
|
+
}).catch((error) => {
|
1742
|
+
setIsLoading(false);
|
1743
|
+
console.error("Error:", error);
|
1744
|
+
toast2.error(ErrorText.anerroroccured);
|
1745
|
+
});
|
1746
|
+
};
|
1747
|
+
const handlePhoneNumberChange = (e) => {
|
1748
|
+
const number = e.target.value;
|
1749
|
+
const isValid = /^\d*$/.test(number);
|
1750
|
+
if (isValid) {
|
1751
|
+
setPhoneNumber(number);
|
1752
|
+
setIsValidNumber(number.length <= 10);
|
1753
|
+
if (number.length > 10) {
|
1754
|
+
setErrorMessage(ErrorText.phonenumberlength);
|
1755
|
+
} else {
|
1756
|
+
setErrorMessage("");
|
1757
|
+
}
|
1758
|
+
} else {
|
1759
|
+
setErrorMessage(ErrorText.phonenumbervalid);
|
1760
|
+
}
|
1761
|
+
};
|
1762
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("div", { className: "payment-container" }, /* @__PURE__ */ React8.createElement("div", { className: "input-wrapper" }, /* @__PURE__ */ React8.createElement("div", { className: "input-container" }, /* @__PURE__ */ React8.createElement(
|
1763
|
+
"input",
|
1764
|
+
{
|
1765
|
+
type: "text",
|
1766
|
+
value: phoneNumber,
|
1767
|
+
onChange: handlePhoneNumberChange,
|
1768
|
+
placeholder: "Enter phone number",
|
1769
|
+
maxLength: 10,
|
1770
|
+
className: submitClicked && (!phoneNumber || !isValidNumber) ? "error" : ""
|
1771
|
+
}
|
1772
|
+
), errorMessage && /* @__PURE__ */ React8.createElement("div", { className: "error-message text-danger" }, errorMessage))), /* @__PURE__ */ React8.createElement("div", { className: "button-wrapper" }, /* @__PURE__ */ React8.createElement(
|
1773
|
+
"button",
|
1774
|
+
{
|
1775
|
+
onClick: sendRequestPayment,
|
1776
|
+
disabled: isLoading || !isValidNumber,
|
1777
|
+
className: "paymentBtn"
|
1778
|
+
},
|
1779
|
+
isLoading ? "Loading..." : "Request Payment"
|
1780
|
+
))), /* @__PURE__ */ React8.createElement(Modal5, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ React8.createElement(Modal5.Header, { closeButton: true }), /* @__PURE__ */ React8.createElement(Modal5.Body, null, /* @__PURE__ */ React8.createElement(
|
1781
|
+
"svg",
|
1782
|
+
{
|
1783
|
+
width: "60",
|
1784
|
+
height: "60",
|
1785
|
+
viewBox: "0 0 60 60",
|
1786
|
+
fill: "none",
|
1787
|
+
xmlns: "http://www.w3.org/2000/svg"
|
1788
|
+
},
|
1789
|
+
/* @__PURE__ */ React8.createElement(
|
1790
|
+
"rect",
|
1791
|
+
{
|
1792
|
+
x: "0.5",
|
1793
|
+
y: "0.5",
|
1794
|
+
width: "59",
|
1795
|
+
height: "59",
|
1796
|
+
rx: "29.5",
|
1797
|
+
stroke: "#31B379"
|
1798
|
+
}
|
1799
|
+
),
|
1800
|
+
/* @__PURE__ */ React8.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ React8.createElement(
|
1801
|
+
"path",
|
1802
|
+
{
|
1803
|
+
d: "M41.1778 22.248C40.7483 21.8184 40.0518 21.8184 39.6222 22.248L26.4435 35.4268L21.3778 30.3611C20.9483 29.9315 20.2518 29.9316 19.8222 30.3611C19.3926 30.7907 19.3926 31.4871 19.8222 31.9167L25.6657 37.7601C26.0951 38.1897 26.7921 38.1894 27.2213 37.7601L41.1778 23.8036C41.6074 23.3741 41.6074 22.6776 41.1778 22.248Z",
|
1804
|
+
fill: "#31B379"
|
1805
|
+
}
|
1806
|
+
)),
|
1807
|
+
/* @__PURE__ */ React8.createElement("defs", null, /* @__PURE__ */ React8.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React8.createElement(
|
1808
|
+
"rect",
|
1809
|
+
{
|
1810
|
+
width: "22",
|
1811
|
+
height: "22",
|
1812
|
+
fill: "white",
|
1813
|
+
transform: "translate(19.5 19.0039)"
|
1814
|
+
}
|
1815
|
+
)))
|
1816
|
+
), /* @__PURE__ */ React8.createElement("h1", null, "Success!"), /* @__PURE__ */ React8.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ React8.createElement(Modal5.Footer, null, /* @__PURE__ */ React8.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))), /* @__PURE__ */ React8.createElement(ToastContainer2, null));
|
1817
|
+
}
|
1818
|
+
|
1819
|
+
// src/app/components/Payment/Payment.tsx
|
1820
|
+
import React10, { useState as useState6 } from "react";
|
1821
|
+
import axios2 from "axios";
|
1822
|
+
import forge from "node-forge";
|
1823
|
+
import { toast as toast3 } from "react-toastify";
|
1824
|
+
import { Modal as Modal6 } from "react-bootstrap";
|
1825
|
+
|
1826
|
+
// src/app/components/Payment/Paymentstyles.tsx
|
1827
|
+
import React9 from "react";
|
1828
|
+
function Paymentstyles() {
|
1829
|
+
return /* @__PURE__ */ React9.createElement("style", null, `
|
1830
|
+
.paymentBtn {
|
1831
|
+
background-color: black;
|
1832
|
+
border: none;
|
1833
|
+
color: white;
|
1834
|
+
padding: 15px 32px;
|
1835
|
+
text-align: center;
|
1836
|
+
text-decoration: none;
|
1837
|
+
display: inline-block;
|
1838
|
+
font-size: 16px;
|
1839
|
+
margin: 4px 2px;
|
1840
|
+
cursor: pointer;
|
1841
|
+
border-radius: 180px;
|
1842
|
+
/* width: auto; */
|
1843
|
+
}
|
1844
|
+
|
1845
|
+
.modal-backdrop {
|
1846
|
+
display: none !important;
|
1847
|
+
}
|
1848
|
+
|
1849
|
+
/* CSS for modal */
|
1850
|
+
.modal {
|
1851
|
+
/* display: none; */
|
1852
|
+
position: fixed;
|
1853
|
+
z-index: 5555;
|
1854
|
+
left: 0;
|
1855
|
+
top: 0;
|
1856
|
+
width: 100%;
|
1857
|
+
height: 100%;
|
1858
|
+
overflow: auto;
|
1859
|
+
background-color: rgba(0, 0, 0, 0.8);
|
1860
|
+
}
|
1861
|
+
|
1862
|
+
.input-container {
|
1863
|
+
position: relative;
|
1864
|
+
}
|
1865
|
+
|
1866
|
+
.error {
|
1867
|
+
/* border: 1px solid red; */
|
1868
|
+
color: #ffe6e6;
|
1869
|
+
/* light red background color */
|
1870
|
+
}
|
1871
|
+
|
1872
|
+
.form-group {
|
1873
|
+
margin-bottom: 15px;
|
1874
|
+
}
|
1875
|
+
|
1876
|
+
.input-container input {
|
1877
|
+
padding-right: 25px;
|
1878
|
+
}
|
1879
|
+
|
1880
|
+
.modal-header {
|
1881
|
+
border-bottom: 0 !important;
|
1882
|
+
padding-top: 0 !important;
|
1883
|
+
}
|
1884
|
+
|
1885
|
+
/* CSS for modal content */
|
1886
|
+
.modal-content {
|
1887
|
+
/* height: 90vh !important; */
|
1888
|
+
height: auto;
|
1889
|
+
/* padding: 20px; */
|
1890
|
+
padding: 20px 2px !important;
|
1891
|
+
/* background: #fff; */
|
1892
|
+
border-radius: 20px !important;
|
1893
|
+
position: relative;
|
1894
|
+
width: 430px;
|
1895
|
+
margin: 30px auto;
|
1896
|
+
overflow: hidden !important;
|
1897
|
+
}
|
1898
|
+
.input-container {
|
1899
|
+
display: flex;
|
1900
|
+
align-items: baseline;
|
1901
|
+
}
|
1902
|
+
|
1903
|
+
.input-error-container {
|
1904
|
+
flex: 1;
|
1905
|
+
}
|
1906
|
+
|
1907
|
+
.paymentBtn {
|
1908
|
+
margin-left: 10px;
|
1909
|
+
}
|
1910
|
+
|
1911
|
+
.PayButton {
|
1912
|
+
outline: 0 !important;
|
1913
|
+
height: 46px;
|
1914
|
+
font-size: 16px;
|
1915
|
+
background-color: #161616 !important;
|
1916
|
+
border: none;
|
1917
|
+
display: block;
|
1918
|
+
width: 100%;
|
1919
|
+
border-radius: 180px;
|
1920
|
+
margin: 10px 0;
|
1921
|
+
}
|
1922
|
+
|
1923
|
+
#PayButton:hover {
|
1924
|
+
background-color: #61c699 !important;
|
1925
|
+
}
|
1926
|
+
|
1927
|
+
#PayButton:active {
|
1928
|
+
background-color: #61c699 !important;
|
1929
|
+
}
|
1930
|
+
|
1931
|
+
#PayButton:disabled {
|
1932
|
+
background: rgb(172, 44, 170) !important;
|
1933
|
+
color: #fff !important;
|
1934
|
+
}
|
1935
|
+
|
1936
|
+
label {
|
1937
|
+
color: rgba(53, 37, 77, 0.6);
|
1938
|
+
margin-bottom: 2px;
|
1939
|
+
text-transform: uppercase;
|
1940
|
+
font-family: "IBM Plex Mono", monospace;
|
1941
|
+
font-weight: 500;
|
1942
|
+
font-size: 12px;
|
1943
|
+
}
|
1944
|
+
|
1945
|
+
.input-container {
|
1946
|
+
position: relative;
|
1947
|
+
}
|
1948
|
+
|
1949
|
+
.input-container input {
|
1950
|
+
padding-right: 25px;
|
1951
|
+
}
|
1952
|
+
|
1953
|
+
#Checkout {
|
1954
|
+
/* z-index: 100001; */
|
1955
|
+
width: 100%;
|
1956
|
+
/* height: 100%; */
|
1957
|
+
/* background: 0 0 #ffffff; */
|
1958
|
+
border-radius: 24px;
|
1959
|
+
border: 1px solid #e0dfe2;
|
1960
|
+
display: block;
|
1961
|
+
}
|
1962
|
+
|
1963
|
+
.container {
|
1964
|
+
margin-top: 10px;
|
1965
|
+
}
|
1966
|
+
|
1967
|
+
.powered-logo {
|
1968
|
+
width: 18px;
|
1969
|
+
height: 18px;
|
1970
|
+
/* float: right; */
|
1971
|
+
padding: 2px;
|
1972
|
+
background: #000000;
|
1973
|
+
border-radius: 4px;
|
1974
|
+
/* margin-left: 5px; */
|
1975
|
+
}
|
1976
|
+
|
1977
|
+
.modal-content .container {
|
1978
|
+
width: 100%;
|
1979
|
+
}
|
1980
|
+
|
1981
|
+
.powerd-by-part {
|
1982
|
+
display: flex;
|
1983
|
+
justify-content: center;
|
1984
|
+
align-items: center;
|
1985
|
+
gap: 5px;
|
1986
|
+
}
|
1987
|
+
|
1988
|
+
.errorText {
|
1989
|
+
color: red;
|
1990
|
+
}
|
1991
|
+
|
1992
|
+
.input-group {
|
1993
|
+
position: relative;
|
1994
|
+
}
|
1995
|
+
|
1996
|
+
.paynowbtn {
|
1997
|
+
outline: 0 !important;
|
1998
|
+
padding: 7px 25px !important;
|
1999
|
+
font-size: 13px;
|
2000
|
+
background-color: #161616 !important;
|
2001
|
+
border: #161616 1px solid !important;
|
2002
|
+
color: #fff !important;
|
2003
|
+
display: inline-block !important;
|
2004
|
+
border-radius: 180px !important;
|
2005
|
+
}
|
2006
|
+
|
2007
|
+
.paynowbtn:hover {
|
2008
|
+
background-color: #fff !important;
|
2009
|
+
border: #161616 1px solid !important;
|
2010
|
+
color: #161616 !important;
|
2011
|
+
}
|
2012
|
+
|
2013
|
+
.ButtonGroup__root.btn-group {
|
2014
|
+
margin: 10px 0 20px 0;
|
2015
|
+
}
|
2016
|
+
|
2017
|
+
.ButtonGroup__root.btn-group button {
|
2018
|
+
background: #000;
|
2019
|
+
border: 0;
|
2020
|
+
margin: 0 5px;
|
2021
|
+
border-radius: 4px !important;
|
2022
|
+
}
|
2023
|
+
|
2024
|
+
.ButtonGroup__root.btn-group button:hover,
|
2025
|
+
.ButtonGroup__root.btn-group button:focus {
|
2026
|
+
background: #333 !important;
|
2027
|
+
}
|
2028
|
+
|
2029
|
+
.input-group button {
|
2030
|
+
background: #000;
|
2031
|
+
border: 0;
|
2032
|
+
margin: 0 5px;
|
2033
|
+
border-radius: 0 4px 4px 0 !important;
|
2034
|
+
}
|
2035
|
+
|
2036
|
+
.input-group button:hover,
|
2037
|
+
.input-group button:focus {
|
2038
|
+
background: #333 !important;
|
2039
|
+
}
|
2040
|
+
|
2041
|
+
.payment-suc {
|
2042
|
+
text-align: center;
|
2043
|
+
}
|
2044
|
+
|
2045
|
+
.payment-suc .modal-dialog {
|
2046
|
+
min-width: 600px;
|
2047
|
+
padding: 50px 0;
|
2048
|
+
}
|
2049
|
+
|
2050
|
+
.payment-suc h2 {
|
2051
|
+
font-size: 24px;
|
2052
|
+
color: #35254d;
|
2053
|
+
font-weight: 500;
|
2054
|
+
padding: 15px 0;
|
2055
|
+
}
|
2056
|
+
|
2057
|
+
.payment-suc p {
|
2058
|
+
font-size: 14px;
|
2059
|
+
color: #9a92a6;
|
2060
|
+
font-weight: 500;
|
2061
|
+
}
|
2062
|
+
|
2063
|
+
.payment-suc .btn-close {
|
2064
|
+
position: absolute;
|
2065
|
+
right: 20px;
|
2066
|
+
}
|
2067
|
+
|
2068
|
+
.Checkout.container iframe {
|
2069
|
+
width: 100%;
|
2070
|
+
overflow: hidden !important;
|
2071
|
+
}
|
2072
|
+
|
2073
|
+
.responsive-tbl {
|
2074
|
+
overflow-x: auto;
|
2075
|
+
}
|
2076
|
+
|
2077
|
+
body {
|
2078
|
+
position: relative !important;
|
2079
|
+
}
|
2080
|
+
|
2081
|
+
thead,
|
2082
|
+
tbody,
|
2083
|
+
tfoot,
|
2084
|
+
tr,
|
2085
|
+
td,
|
2086
|
+
th {
|
2087
|
+
white-space: nowrap;
|
2088
|
+
}
|
2089
|
+
|
2090
|
+
.button-group {
|
2091
|
+
display: flex;
|
2092
|
+
gap: 10px;
|
2093
|
+
}
|
2094
|
+
|
2095
|
+
.rqstonClickbtn {
|
2096
|
+
color: #fff;
|
2097
|
+
background-color: #337ab7;
|
2098
|
+
border-color: #2e6da4;
|
2099
|
+
}
|
2100
|
+
|
2101
|
+
.loading-animation {
|
2102
|
+
position: absolute;
|
2103
|
+
top: 50%;
|
2104
|
+
left: 50%;
|
2105
|
+
transform: translate(-50%, -50%);
|
2106
|
+
}
|
2107
|
+
|
2108
|
+
.spinner {
|
2109
|
+
width: 40px;
|
2110
|
+
height: 40px;
|
2111
|
+
border-radius: 50%;
|
2112
|
+
border: 4px solid #f3f3f3;
|
2113
|
+
border-top: 4px solid black;
|
2114
|
+
animation: spin 1s linear infinite;
|
2115
|
+
}
|
2116
|
+
|
2117
|
+
@keyframes spin {
|
2118
|
+
0% {
|
2119
|
+
transform: rotate(0deg);
|
2120
|
+
}
|
2121
|
+
|
2122
|
+
100% {
|
2123
|
+
transform: rotate(360deg);
|
2124
|
+
}
|
2125
|
+
}
|
2126
|
+
|
2127
|
+
/* .border-container {
|
2128
|
+
display: flex;
|
2129
|
+
flex-direction: column;
|
2130
|
+
border: 0px solid #ccc;
|
2131
|
+
padding: 20px;
|
2132
|
+
border-radius: 10px;
|
2133
|
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
2134
|
+
align-items: baseline;
|
2135
|
+
}
|
2136
|
+
.payment-container {
|
2137
|
+
border: 0px solid #ccc;
|
2138
|
+
padding: 20px;
|
2139
|
+
border-radius: 10px;
|
2140
|
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
2141
|
+
} */
|
2142
|
+
|
2143
|
+
.payment-row {
|
2144
|
+
display: flex;
|
2145
|
+
align-items: center;
|
2146
|
+
margin-bottom: 20px;
|
2147
|
+
}
|
2148
|
+
|
2149
|
+
.payment-row label {
|
2150
|
+
width: 150px;
|
2151
|
+
font-weight: bold;
|
2152
|
+
margin-right: 10px;
|
2153
|
+
}
|
2154
|
+
|
2155
|
+
.payment-row input {
|
2156
|
+
flex-grow: 1;
|
2157
|
+
margin-right: 10px;
|
2158
|
+
}
|
2159
|
+
|
2160
|
+
.payment-row button {
|
2161
|
+
flex-grow: 1;
|
2162
|
+
}
|
2163
|
+
|
2164
|
+
.payment-row {
|
2165
|
+
display: flex;
|
2166
|
+
flex-direction: column;
|
2167
|
+
border-radius: 10px;
|
2168
|
+
margin-top: 10px;
|
2169
|
+
}
|
2170
|
+
|
2171
|
+
.input-wrapper {
|
2172
|
+
flex: 1;
|
2173
|
+
}
|
2174
|
+
|
2175
|
+
.button-wrapper {
|
2176
|
+
margin-left: 10px;
|
2177
|
+
}
|
2178
|
+
|
2179
|
+
.input-container {
|
2180
|
+
display: flex;
|
2181
|
+
flex-direction: column;
|
2182
|
+
}
|
2183
|
+
|
2184
|
+
.export-btn {
|
2185
|
+
background: black;
|
2186
|
+
color: white;
|
2187
|
+
height: 35px;
|
2188
|
+
width: 68px;
|
2189
|
+
border-radius: 5px;
|
2190
|
+
margin-left: 14px;
|
2191
|
+
}
|
2192
|
+
|
2193
|
+
.payment-popup {
|
2194
|
+
padding: 12px 20px;
|
2195
|
+
background: #fff;
|
2196
|
+
border-radius: 20px;
|
2197
|
+
position: relative;
|
2198
|
+
width: 100%;
|
2199
|
+
margin: 0 auto;
|
2200
|
+
}
|
2201
|
+
|
2202
|
+
.modal-dialog {
|
2203
|
+
max-width: 810px;
|
2204
|
+
}
|
2205
|
+
|
2206
|
+
.modal-content {
|
2207
|
+
max-width: 100%;
|
2208
|
+
/* margin-top: 5%; */
|
2209
|
+
width: 100%;
|
2210
|
+
margin: 0;
|
2211
|
+
}
|
2212
|
+
|
2213
|
+
@media (max-width: 460px) {
|
2214
|
+
.payment-popup {
|
2215
|
+
padding: 35px 25px;
|
2216
|
+
width: 98%;
|
2217
|
+
}
|
2218
|
+
}
|
2219
|
+
|
2220
|
+
.close-pop {
|
2221
|
+
position: absolute;
|
2222
|
+
right: 8px;
|
2223
|
+
top: 8px;
|
2224
|
+
border: 0;
|
2225
|
+
padding: 0;
|
2226
|
+
background: none !important;
|
2227
|
+
}
|
2228
|
+
|
2229
|
+
.copy-api {
|
2230
|
+
overflow-y: auto;
|
2231
|
+
scrollbar-width: inherit;
|
2232
|
+
background: #f2f2f2;
|
2233
|
+
color: rgb(33, 33, 33);
|
2234
|
+
font-size: "12px";
|
2235
|
+
border: 0;
|
2236
|
+
border-radius: 4px;
|
2237
|
+
width: 100%;
|
2238
|
+
padding: 8px 15px;
|
2239
|
+
position: relative;
|
2240
|
+
}
|
2241
|
+
|
2242
|
+
#style-3::-webkit-scrollbar-track {
|
2243
|
+
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
|
2244
|
+
background-color: #f5f5f5;
|
2245
|
+
}
|
2246
|
+
|
2247
|
+
#style-3::-webkit-scrollbar {
|
2248
|
+
height: 3px;
|
2249
|
+
background-color: #f5f5f5;
|
2250
|
+
}
|
2251
|
+
|
2252
|
+
#style-3::-webkit-scrollbar-thumb {
|
2253
|
+
cursor: pointer;
|
2254
|
+
background-color: #333;
|
2255
|
+
}
|
2256
|
+
|
2257
|
+
.copy-code {
|
2258
|
+
display: flex;
|
2259
|
+
}
|
2260
|
+
|
2261
|
+
.copy-code svg {
|
2262
|
+
margin-right: 10px;
|
2263
|
+
}
|
2264
|
+
|
2265
|
+
.accordion.accordion-flush {
|
2266
|
+
float: left;
|
2267
|
+
width: 100%;
|
2268
|
+
margin-bottom: 45px;
|
2269
|
+
}
|
2270
|
+
|
2271
|
+
.box {
|
2272
|
+
width: 100%;
|
2273
|
+
height: 200px;
|
2274
|
+
/* background-color: #ddf6fc0e; */
|
2275
|
+
/* color: #fff; */
|
2276
|
+
text-align: center;
|
2277
|
+
line-height: 200px;
|
2278
|
+
/* Center content vertically */
|
2279
|
+
font-size: 1.5rem;
|
2280
|
+
}
|
2281
|
+
|
2282
|
+
.amex {
|
2283
|
+
background-image: url("/assests/amex.svg");
|
2284
|
+
}
|
2285
|
+
|
2286
|
+
.visa {
|
2287
|
+
background-image: url("/assests/visa.svg");
|
2288
|
+
}
|
2289
|
+
|
2290
|
+
.mastercard {
|
2291
|
+
background-image: url("/assests/mastercard.svg");
|
2292
|
+
}
|
2293
|
+
|
2294
|
+
.discover {
|
2295
|
+
background-image: url("/assests/discover.svg");
|
2296
|
+
}
|
2297
|
+
|
2298
|
+
.expiry-date-group {
|
2299
|
+
float: left;
|
2300
|
+
width: 30%;
|
2301
|
+
}
|
2302
|
+
|
2303
|
+
.expiry-date-group input {
|
2304
|
+
width: calc(100% + 1px);
|
2305
|
+
border-top-right-radius: 0;
|
2306
|
+
border-bottom-right-radius: 0;
|
2307
|
+
}
|
2308
|
+
|
2309
|
+
.expiry-date-group input:focus {
|
2310
|
+
position: relative;
|
2311
|
+
z-index: 10;
|
2312
|
+
|
2313
|
+
}
|
2314
|
+
.pay-tbl th{width: 24% !important;}
|
2315
|
+
.pay-tbl th:last-child{width: 28% !important;}
|
2316
|
+
.security-code-group {
|
2317
|
+
float: right;
|
2318
|
+
width: 40%;
|
2319
|
+
position: relative;
|
2320
|
+
}
|
2321
|
+
|
2322
|
+
.security-code-group input {
|
2323
|
+
border-top-left-radius: 0;
|
2324
|
+
border-bottom-left-radius: 0;
|
2325
|
+
}
|
2326
|
+
|
2327
|
+
.zip-code-group {
|
2328
|
+
clear: both;
|
2329
|
+
}
|
2330
|
+
.amnt input{max-width: 150px; margin-right:8px;}
|
2331
|
+
.amnt p, .amnt form{margin-right:8px;}
|
2332
|
+
#submitButton {
|
2333
|
+
outline: 0 !important;
|
2334
|
+
height: 46px;
|
2335
|
+
font-size: 16px;
|
2336
|
+
background-color: #161616 !important;
|
2337
|
+
border: none;
|
2338
|
+
display: block;
|
2339
|
+
width: 100%;
|
2340
|
+
color: white;
|
2341
|
+
border-radius: 180px;
|
2342
|
+
}
|
2343
|
+
|
2344
|
+
#submitRequestButton {
|
2345
|
+
outline: 0 !important;
|
2346
|
+
height: 46px;
|
2347
|
+
font-size: 16px;
|
2348
|
+
background-color: #161616 !important;
|
2349
|
+
border: none;
|
2350
|
+
display: block;
|
2351
|
+
width: 100%;
|
2352
|
+
border-radius: 180px;
|
2353
|
+
}
|
2354
|
+
|
2355
|
+
#PayButton {
|
2356
|
+
outline: 0 !important;
|
2357
|
+
height: 46px;
|
2358
|
+
font-size: 16px;
|
2359
|
+
background-color: #161616 !important;
|
2360
|
+
border: none;
|
2361
|
+
display: block;
|
2362
|
+
width: 100%;
|
2363
|
+
border-radius: 180px;
|
2364
|
+
margin: 2px;
|
2365
|
+
}
|
2366
|
+
|
2367
|
+
#PayButton:hover {
|
2368
|
+
background-color: #61c699 !important;
|
2369
|
+
}
|
2370
|
+
|
2371
|
+
#PayButton:active {
|
2372
|
+
background-color: #61c699 !important;
|
2373
|
+
}
|
2374
|
+
|
2375
|
+
#PayButton:disabled {
|
2376
|
+
background: rgb(172, 44, 170) !important;
|
2377
|
+
color: #fff !important;
|
2378
|
+
}
|
2379
|
+
|
2380
|
+
.form-control {
|
2381
|
+
color: #35254d;
|
2382
|
+
}
|
2383
|
+
|
2384
|
+
.container {
|
2385
|
+
margin-top: 10px;
|
2386
|
+
}
|
2387
|
+
|
2388
|
+
#Checkout {
|
2389
|
+
z-index: 100001;
|
2390
|
+
width: 100%;
|
2391
|
+
height: 100%;
|
2392
|
+
min-height: 100%;
|
2393
|
+
background: 0 0 #ffffff;
|
2394
|
+
border-radius: 24px;
|
2395
|
+
border: 1px solid #e0dfe2;
|
2396
|
+
margin-left: auto;
|
2397
|
+
margin-right: auto;
|
2398
|
+
display: block;
|
2399
|
+
}
|
2400
|
+
|
2401
|
+
#Checkout .header {
|
2402
|
+
display: flex;
|
2403
|
+
/* Enables Flexbox */
|
2404
|
+
justify-content: center;
|
2405
|
+
/* Centers content horizontally */
|
2406
|
+
align-items: center;
|
2407
|
+
/* Centers content vertically */
|
2408
|
+
text-align: center;
|
2409
|
+
padding: 8px;
|
2410
|
+
border-bottom: 1px solid #dedede;
|
2411
|
+
margin: 0 10px 20px 10px;
|
2412
|
+
}
|
2413
|
+
|
2414
|
+
#Checkout .header button {
|
2415
|
+
border: 0;
|
2416
|
+
background: none;
|
2417
|
+
padding: 0;
|
2418
|
+
}
|
2419
|
+
|
2420
|
+
#Checkout h1 {
|
2421
|
+
margin: 0;
|
2422
|
+
flex: 1;
|
2423
|
+
padding: 10px;
|
2424
|
+
/* Allows the title to grow and fill the space for centering */
|
2425
|
+
font-size: 23px;
|
2426
|
+
font-weight: 500;
|
2427
|
+
color: #35254d;
|
2428
|
+
align-items: start;
|
2429
|
+
display: flex;
|
2430
|
+
}
|
2431
|
+
|
2432
|
+
#Checkout>form {
|
2433
|
+
margin: 0 25px 10px 25px;
|
2434
|
+
}
|
2435
|
+
|
2436
|
+
label {
|
2437
|
+
color: rgba(53, 37, 77, 0.6);
|
2438
|
+
margin-bottom: 2px;
|
2439
|
+
text-transform: uppercase;
|
2440
|
+
font-family: "IBM Plex Mono", monospace;
|
2441
|
+
font-weight: 500;
|
2442
|
+
font-size: 12px;
|
2443
|
+
}
|
2444
|
+
|
2445
|
+
.input-container {
|
2446
|
+
position: relative;
|
2447
|
+
}
|
2448
|
+
|
2449
|
+
.input-container input {
|
2450
|
+
padding-right: 25px;
|
2451
|
+
}
|
2452
|
+
|
2453
|
+
#zipcode {
|
2454
|
+
text-transform: capitalize !important;
|
2455
|
+
}
|
2456
|
+
|
2457
|
+
#zipcode {
|
2458
|
+
width: 18px;
|
2459
|
+
position: absolute;
|
2460
|
+
right: 8px;
|
2461
|
+
top: 9px;
|
2462
|
+
}
|
2463
|
+
|
2464
|
+
#zipcode .zip-tip {
|
2465
|
+
display: none;
|
2466
|
+
background-color: rgb(0, 0, 0, 0.4);
|
2467
|
+
padding: 5px 8px;
|
2468
|
+
border-radius: 6px;
|
2469
|
+
position: absolute;
|
2470
|
+
right: 26px;
|
2471
|
+
top: -9px;
|
2472
|
+
font-size: 12.5px;
|
2473
|
+
text-transform: capitalize !important;
|
2474
|
+
color: #fff;
|
2475
|
+
width: 240px;
|
2476
|
+
line-height: 16px;
|
2477
|
+
}
|
2478
|
+
|
2479
|
+
#zipcode .zip-tip:before {
|
2480
|
+
width: 0;
|
2481
|
+
height: 0;
|
2482
|
+
border-top: 7px solid transparent;
|
2483
|
+
border-bottom: 7px solid transparent;
|
2484
|
+
border-left: 7px solid #000;
|
2485
|
+
opacity: 0.4;
|
2486
|
+
position: absolute;
|
2487
|
+
right: -7px;
|
2488
|
+
top: 50%;
|
2489
|
+
transform: translateY(-50%);
|
2490
|
+
content: "";
|
2491
|
+
}
|
2492
|
+
|
2493
|
+
#zipcode:hover .zip-tip {
|
2494
|
+
display: block;
|
2495
|
+
}
|
2496
|
+
|
2497
|
+
.input-container>i,
|
2498
|
+
a[role="button"] {
|
2499
|
+
color: #d3d3d3;
|
2500
|
+
width: 25px;
|
2501
|
+
height: 30px;
|
2502
|
+
line-height: 30px;
|
2503
|
+
font-size: 16px;
|
2504
|
+
position: absolute;
|
2505
|
+
top: 5px;
|
2506
|
+
right: 6px;
|
2507
|
+
cursor: pointer;
|
2508
|
+
text-align: center;
|
2509
|
+
}
|
2510
|
+
|
2511
|
+
.input-container>i:hover,
|
2512
|
+
a[role="button"]:hover {
|
2513
|
+
color: #777;
|
2514
|
+
}
|
2515
|
+
|
2516
|
+
.amount-placeholder {
|
2517
|
+
white-space: nowrap;
|
2518
|
+
font-size: 44px;
|
2519
|
+
/* height: 35px; */
|
2520
|
+
font-weight: 600;
|
2521
|
+
line-height: 40px;
|
2522
|
+
}
|
2523
|
+
|
2524
|
+
.amount-placeholder>button {
|
2525
|
+
float: right;
|
2526
|
+
width: 60px;
|
2527
|
+
}
|
2528
|
+
|
2529
|
+
.amount-placeholder>span {
|
2530
|
+
line-height: 34px;
|
2531
|
+
}
|
2532
|
+
|
2533
|
+
.top-amnt {
|
2534
|
+
display: flex;
|
2535
|
+
margin-bottom: 10px;
|
2536
|
+
align-items: center;
|
2537
|
+
justify-content: space-between;
|
2538
|
+
}
|
2539
|
+
|
2540
|
+
.amtleft {
|
2541
|
+
text-align: center;
|
2542
|
+
}
|
2543
|
+
|
2544
|
+
.amtleft span {
|
2545
|
+
color: #35254d;
|
2546
|
+
margin: 0 -5px;
|
2547
|
+
}
|
2548
|
+
|
2549
|
+
.card-row {
|
2550
|
+
text-align: right;
|
2551
|
+
margin: 22px 0 0 0;
|
2552
|
+
max-width: 85px;
|
2553
|
+
line-height: 20px;
|
2554
|
+
}
|
2555
|
+
|
2556
|
+
.yer {
|
2557
|
+
border-radius: 0;
|
2558
|
+
}
|
2559
|
+
|
2560
|
+
.card-row span {
|
2561
|
+
width: 33px;
|
2562
|
+
height: 21px;
|
2563
|
+
margin: 0 2px;
|
2564
|
+
background-repeat: no-repeat;
|
2565
|
+
display: inline-block;
|
2566
|
+
background-size: contain;
|
2567
|
+
}
|
2568
|
+
|
2569
|
+
.card-image {
|
2570
|
+
background-repeat: no-repeat;
|
2571
|
+
padding-right: 50px;
|
2572
|
+
background-position: right 2px center;
|
2573
|
+
background-size: auto 90%;
|
2574
|
+
}
|
2575
|
+
|
2576
|
+
/* .cvc-preview-container {
|
2577
|
+
overflow: hidden;
|
2578
|
+
} */
|
2579
|
+
|
2580
|
+
.cvc-preview-container {
|
2581
|
+
/* overflow: hidden; */
|
2582
|
+
position: absolute;
|
2583
|
+
z-index: 9999;
|
2584
|
+
right: -71px;
|
2585
|
+
top: -54px;
|
2586
|
+
width: 165px;
|
2587
|
+
border-radius: 5px;
|
2588
|
+
padding: 5px;
|
2589
|
+
background-color: rgb(0, 0, 0, 0.3);
|
2590
|
+
display: none;
|
2591
|
+
}
|
2592
|
+
|
2593
|
+
.cvc-preview-container:before {
|
2594
|
+
position: absolute;
|
2595
|
+
left: 50%;
|
2596
|
+
transform: translate(-50%);
|
2597
|
+
bottom: -5px;
|
2598
|
+
width: 0;
|
2599
|
+
height: 0;
|
2600
|
+
border-left: 5px solid transparent;
|
2601
|
+
border-right: 5px solid transparent;
|
2602
|
+
border-top: 5px solid #000;
|
2603
|
+
opacity: 0.3;
|
2604
|
+
content: "";
|
2605
|
+
}
|
2606
|
+
|
2607
|
+
.security-code-group #cvc:hover .cvc-preview-container {
|
2608
|
+
display: block;
|
2609
|
+
}
|
2610
|
+
|
2611
|
+
.cvc-preview-container.two-card div {
|
2612
|
+
width: 50%;
|
2613
|
+
height: 45px;
|
2614
|
+
}
|
2615
|
+
|
2616
|
+
.cvc-preview-container.two-card div.amex-cvc-preview {
|
2617
|
+
float: right;
|
2618
|
+
}
|
2619
|
+
|
2620
|
+
.cvc-preview-container.two-card div.visa-mc-dis-cvc-preview {
|
2621
|
+
float: left;
|
2622
|
+
}
|
2623
|
+
|
2624
|
+
/* .cvc-preview-container div {
|
2625
|
+
height: 160px;
|
2626
|
+
} */
|
2627
|
+
|
2628
|
+
.amex-cvc-preview {
|
2629
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOYAAACOCAYAAAAlzXSMAAAAAXNSR0IArs4c6QAAFg9JREFUeNrtnfeTFcXaxw+ZBZacM0oGySBIXECiSBQQAQFhJaclo+SgAsuS2QVBlrCLSlQBAVGCCpK5XiW4vFVvvXX/gPvDe9+qt+r2Pd9eeuiZ6TkBzuI563erPgVn5jk93T397X76mTndPl+Qv0+v3I/PuHW/MiEkMkBTvnD/3vr883wZdx6NyriX9XXmvax/Zt57LAghkSbrn9AYtAbNBRTlwTuP22Tce/wbK42QFwc0B+0ZRXno9h8D/Ab/YkUR8qeI81/QoE2U++8+apF59/H/soII+RPxaxBaVLrMk3k36yYrhpBoEGfWTWjSl3H30ZusEEKiyK31a9IvzMfprAxCokmYj9N9B289/Acrg5DoAZr0Zdz54/9ZGYRE0Yjp16SPFUFI9EFhEkJhEkIoTEIoTEIIhUkIhUkIoTAJoTBZCYRQmIQQCpMQCpMQQmESQmESQihMQihMEsFfn2eJTad+ENvP/8z6iEIO3flDpHx9QWw5c1kcuv0o4vYxJcx1R06LPHnzSuJLlhLp13832jVt38myA/O27radT0pJtZ1v1qGLda5VQnfbOROVatay7Nt072W0KRRXRJSuUFG07NJNLE//wnb9es1bSZvqdeq78p588rxo0q6D/L7P55PEFYsXvUeOFXt/vudZN598eSqkumnbo4+0yV+goPyO83zF6jXl+b6jxwe8F60SXg9eTzWy62lx2n6RN18+eaxByzay09HTavJaR+s7i9PSjfWK7xcoVEiWrU6T5mL6J5uN5fK6Dy06dxPLPjts+86rr/cOWobyVavZvoOy4PoFCxe27g/y1q5nX5HyzfeueoJ93aYtXPbIL4SaK4SJxqkKByav3mC0e6VtB5td73fG2M73HD7adh4NQ53DDdTPmahQrYatgQazhwhWZxy3voMbheNVX65jy9f0jzfZbqATNJJdl26a68ZfRt12yhpz3aAxKhvkwykSXAPn+owaF/BeoMMJWk9Vq1v2nfsPto6/v/wj6/iMdVus4x3fGGAdb921R9D0xy9ZbSyXF/nyFxArDxx92ql26xn0O2UrVbbsl+7NlKJ6ml5+m22p8hVE2sUblj06At3GZV+uvEj74XpsC3P/jd9F0eIlbAXDyBOKMJ0CqFzzJW9hduoqjxUrUVKsPfyVkfXHvnUJs0h8/FObzJNixf4vRbchw61roIdU30GP68xX6ve/iLiixeTxkmXLiVnJ26UIMYK26/WGlU7XwcOeq26cDThx2dpnEqbqwHDdUOpp95XbokSZstZ30CDhAaBx4lh8qdK2TsdZr2syT8iG3n/cRKuB4zvKLVTlKlykqOs+vD70Hau8EKNTmPBIvMqw7ugZy755x4Qn+S8uVh86Jju1fdf+LgZOmGKlPyhxqqstoQyrDh6V9um//CYGJj61x3djWphwXVRh2vd50/q/fvOdwqxet75lt/PCNXkOczZ1rEa9Bp4jJhpRKPlSDQgulmte4W80ELjMi+a2mkbM7m+NsPKFRuicn6AsaNCv9e7nrhv/SBtq3TiFifzpggh3xCxRumzI93DWhm220VH3gKau3RhyveojHeZserkgAtP8rnjpMvJ8l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7/S1FbvuF6bbj1dbwq169nXeH9wzHl/IsHSPZmygTufsWKkR+N35gWf8Yoc6thZfgTDXPemanWRuGyt/V1jf5mxs7TzfiJt7O7ljFSjY0Rw0pk2OgPERvjrEkL46xJCCIVJCKEwCaEwCSEUJiEUJiGEwiSEwiSEUJiEUJisBEIoTEIIhUkIhUkIoTAJoTAJIRQmIX9tYR649YAVQUgUAU36sHQDK4OQ6AGa9G0+ffH/WBmERA/QpG/ZZ59nsTIIiR6gSV/Spp2bd164xgohJAqAFqFJ3+wN29su3LFXpF//jRVDyJ8INAgtQpM+/PkVehILGXvtQkwIyWFR+rUHDUKLPvU3c2NqpaSUnf+zYPtese3cj8Yt8AghkQdag+agPWgQWvTpf7OSU1/xn/jvOZtS5Q7GySfOibSLN+RehtiTgRASGaApaAsag9agOWgPGvSZ/makpFTwGxxK2pT6bxgTQnIWaA2ag/Z8wf5mJW9tNGfjjmX+L13w8yApJfUfhJAIAU35tQWNQWsmDf4HqpjHZRJqxUwAAAAASUVORK5CYII=") center center/contain no-repeat;
|
2630
|
+
}
|
2631
|
+
|
2632
|
+
.visa-mc-dis-cvc-preview {
|
2633
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOYAAACOCAMAAAASE4S+AAAAAXNSR0IArs4c6QAAAadQTFRFAAAAzbFj+NyAyLNg+N2DzbRk+96CzrVj+96AzrNj+92By7Rl+92AzbRl/eCDzrRl/t+DzrVl/t+CzbVm/t+C3MFt3MFv/N2B/N6CzrRm/uCDzrRm/uCC7M93/N6CAAAAAQEBAgIBBAQCBQUDBwcECQgFDAsGDg0HEA4IEQ8JFRMLFxUMIBwQIR0RJSETKyYWLikYLyoYMCsZMSsZNC4bNzEcOTIdQDkhQTkhQzsiRT0jRj4kSkEmTEMnWE4tWU8uWk8uXFEvXVIwXlMwX1QxaV02bWA4bmE5cWQ6eGo+eWs+fW5Afm9Bi3pHjHtIkH9KmIZOmYdPnIlQnYpRo5BUppJVqJRWqpZXq5dYrJ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AAAAASUVORK5CYII=") center center/contain no-repeat;
|
2634
|
+
}
|
2635
|
+
|
2636
|
+
.submit-button-lock {
|
2637
|
+
height: 15px;
|
2638
|
+
margin-top: -2px;
|
2639
|
+
margin-right: 7px;
|
2640
|
+
vertical-align: middle;
|
2641
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAgCAMAAAA7dZg3AAAKQWlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUU9kWh8+9N73QEiIgJfQaegkg0jtIFQRRiUmAUAKGhCZ2RAVGFBEpVmRUwAFHhyJjRRQLg4Ji1wnyEFDGwVFEReXdjGsJ7601896a/cdZ39nnt9fZZ+9917oAUPyCBMJ0WAGANKFYFO7rwVwSE8vE9wIYEAEOWAHA4WZmBEf4RALU/L09mZmoSMaz9u4ugGS72yy/UCZz1v9/kSI3QyQGAApF1TY8fiYX5QKUU7PFGTL/BMr0lSkyhjEyFqEJoqwi48SvbPan5iu7yZiXJuShGlnOGbw0noy7UN6aJeGjjAShXJgl4GejfAdlvVRJmgDl9yjT0/icTAAwFJlfzOcmoWyJMkUUGe6J8gIACJTEObxyDov5OWieAHimZ+SKBIlJYqYR15hp5ejIZvrxs1P5YjErlMNN4Yh4TM/0tAyOMBeAr2+WRQElWW2ZaJHtrRzt7VnW5mj5v9nfHn5T/T3IevtV8Sbsz55BjJ5Z32zsrC+9FgD2JFqbHbO+lVUAtG0GQOXhrE/vIADyBQC03pzzHoZsXpLE4gwnC4vs7GxzAZ9rLivoN/ufgm/Kv4Y595nL7vtWO6YXP4EjSRUzZUXlpqemS0TMzAwOl89k/fcQ/+PAOWnNycMsnJ/AF/GF6FVR6JQJhIlou4U8gViQLmQKhH/V4X8YNicHGX6daxRodV8AfYU5ULhJB8hvPQBDIwMkbj96An3rWxAxCsi+vGitka9zjzJ6/uf6Hwtcim7hTEEiU+b2DI9kciWiLBmj34RswQISkAd0oAo0gS4wAixgDRyAM3AD3iAAhIBIEAOWAy5IAmlABLJBPtgAC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Hwo911TvU1zeoN5Q2wo2SxrHjccdv/eD1Q3sTq+lQM6O5+AQ4ITnx4sf4H++eDDzZeYp9qukn/Z/2ttBailqh1tzWibakNml7THvf6YDTnR3OHS0/m/989Iz2mZqzymdLz5HOFZybOZ93fvJCxoXxi4kXhzpXdD66tOTSna6wrt7LgZevXvG5cqnbvfv8VZerZ645XTt9nX297Yb9jdYeu56WX+x+aem172296XCz/ZbjrY6+BX3n+l37L972un3ljv+dGwOLBvruLr57/17cPel93v3RB6kPXj/Mejj9aP1j7OOiJwpPKp6qP6391fjXZqm99Oyg12DPs4hnj4a4Qy//lfmvT8MFz6nPK0a0RupHrUfPjPmM3Xqx9MXwy4yX0+OFvyn+tveV0auffnf7vWdiycTwa9HrmT9K3qi+OfrW9m3nZOjk03dp76anit6rvj/2gf2h+2P0x5Hp7E/4T5WfjT93fAn88ngmbWbm3/eE8/syOll+AAAAYFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////98JRy6AAAAH3RSTlMAAgYMEyIzOUpTVFViY3N2gJmcnaipq7fX3ebx+Pn8eTEuDQAAAI9JREFUKM/N0UkOglAQRdFHDyK90n64+9+lAyQgookjuaNKTlJJpaQlO2n6sW8SW/uCjrku2EloWDLhi3gDa4O3pTtA5Tt+BXDbiDsBmSQpAyZ3pRhoLUmS1QLxSilQPOcCSFfKgfxgPgfZ9ch7Y21LCcdd5wVH5SckEzkXc0ylpPJnMpETmX/d9eUpH1/5AKrsQVrz7YPBAAAAAElFTkSuQmCC") center center/contain no-repeat;
|
2642
|
+
width: 14px;
|
2643
|
+
display: inline-block;
|
2644
|
+
}
|
2645
|
+
|
2646
|
+
.align-middle {
|
2647
|
+
vertical-align: middle;
|
2648
|
+
}
|
2649
|
+
|
2650
|
+
input {
|
2651
|
+
box-shadow: none !important;
|
2652
|
+
}
|
2653
|
+
|
2654
|
+
.powerd-by-part {
|
2655
|
+
display: flex;
|
2656
|
+
font-size: 12px;
|
2657
|
+
text-align: center;
|
2658
|
+
align-items: center;
|
2659
|
+
justify-content: center;
|
2660
|
+
margin: 5px 0 20px 0;
|
2661
|
+
}
|
2662
|
+
|
2663
|
+
.powered-logo {
|
2664
|
+
width: 18px;
|
2665
|
+
height: auto;
|
2666
|
+
float: right;
|
2667
|
+
padding: 2px;
|
2668
|
+
background: #000000;
|
2669
|
+
border-radius: 4px;
|
2670
|
+
margin-left: 5px;
|
2671
|
+
}
|
2672
|
+
|
2673
|
+
.comp-name {
|
2674
|
+
display: block;
|
2675
|
+
margin-bottom: 8px;
|
2676
|
+
}
|
2677
|
+
|
2678
|
+
.client-logo {
|
2679
|
+
max-width: 140px;
|
2680
|
+
display: block;
|
2681
|
+
margin: auto;
|
2682
|
+
padding: 5px;
|
2683
|
+
}
|
2684
|
+
|
2685
|
+
#qrCode {
|
2686
|
+
text-align: center;
|
2687
|
+
}
|
2688
|
+
|
2689
|
+
#qrIcon {
|
2690
|
+
cursor: pointer;
|
2691
|
+
border: 1px solid rgb(252, 252, 252);
|
2692
|
+
padding: 10px;
|
2693
|
+
border-radius: 5px;
|
2694
|
+
background: #ffffff;
|
2695
|
+
}
|
2696
|
+
|
2697
|
+
#target {
|
2698
|
+
display: none;
|
2699
|
+
text-align: center;
|
2700
|
+
transition: all 5s;
|
2701
|
+
padding: 5px;
|
2702
|
+
transition: max-height 0.5s, overflow 0.5s 0.5s;
|
2703
|
+
}
|
2704
|
+
|
2705
|
+
/* input:focus {
|
2706
|
+
border-color: #acc6db !important;
|
2707
|
+
background-color: #acc6db !important;
|
2708
|
+
} */
|
2709
|
+
|
2710
|
+
@media(min-width:725px) {
|
2711
|
+
.pay-main{margin: 0 auto !important;}
|
2712
|
+
#modal-pay iframe{
|
2713
|
+
max-height: 548px;
|
2714
|
+
min-height: 548px;
|
2715
|
+
}
|
2716
|
+
.get-pay-pgs #modal-pay iframe{
|
2717
|
+
max-height: 500px !important;
|
2718
|
+
min-height: 500px !important;
|
2719
|
+
}
|
2720
|
+
#modal-pay .modal-header{
|
2721
|
+
position: absolute;
|
2722
|
+
right: 5px;
|
2723
|
+
top: 15px;
|
2724
|
+
z-index: 4;
|
2725
|
+
}
|
2726
|
+
/* #modal-pay .modal-body{
|
2727
|
+
padding: 0 !important;
|
2728
|
+
} */
|
2729
|
+
}
|
2730
|
+
@media(max-width:724px) {
|
2731
|
+
#modal-pay iframe{
|
2732
|
+
min-height: 708px !important;
|
2733
|
+
}
|
2734
|
+
#modal-pay iframe .modal-body{
|
2735
|
+
padding:0 !important;
|
2736
|
+
}
|
2737
|
+
}
|
2738
|
+
#modal-pay .modal-body{padding: 0;}
|
2739
|
+
/* #modal-pay .modal-content{padding: 0 !important;} */
|
2740
|
+
.pre-auth-pop .modal-header{position: relative; z-index: 4;}
|
2741
|
+
.pre-auth-pop iframe{
|
2742
|
+
margin-top: -60px;
|
2743
|
+
}
|
2744
|
+
|
2745
|
+
.form-control {
|
2746
|
+
padding: .320rem .75rem !important;
|
2747
|
+
|
2748
|
+
}
|
2749
|
+
`);
|
2750
|
+
}
|
2751
|
+
|
2752
|
+
// src/app/components/Payment/Payment.tsx
|
2753
|
+
function Payment() {
|
2754
|
+
var _a;
|
2755
|
+
const [state, setState] = useState6({
|
2756
|
+
show: false,
|
2757
|
+
publicKey: "",
|
2758
|
+
sessionKey: "",
|
2759
|
+
cardNumber: "",
|
2760
|
+
year: "",
|
2761
|
+
month: "",
|
2762
|
+
cvv: "",
|
2763
|
+
zip: "",
|
2764
|
+
amount: ""
|
2765
|
+
});
|
2766
|
+
const [isValid, setIsValid] = useState6(false);
|
2767
|
+
const [isValidMonth, setIsValidMonth] = useState6(false);
|
2768
|
+
const [data, setData] = useState6(null);
|
2769
|
+
const handlePaymentClick = async () => {
|
2770
|
+
try {
|
2771
|
+
const response = await axios2.post(`${baseUrl}generate-session`, {});
|
2772
|
+
const data2 = response.data;
|
2773
|
+
if (data2 && (data2 == null ? void 0 : data2.result) === true) {
|
2774
|
+
setState((prev) => {
|
2775
|
+
var _a2, _b;
|
2776
|
+
return __spreadProps(__spreadValues({}, prev), {
|
2777
|
+
show: true,
|
2778
|
+
publicKey: (_a2 = data2 == null ? void 0 : data2.data) == null ? void 0 : _a2.publicKeyPem,
|
2779
|
+
sessionKey: (_b = data2 == null ? void 0 : data2.data) == null ? void 0 : _b.session_key
|
2780
|
+
});
|
2781
|
+
});
|
2782
|
+
}
|
2783
|
+
} catch (error) {
|
2784
|
+
console.log(error);
|
2785
|
+
}
|
2786
|
+
};
|
2787
|
+
const handleSubmitPay = async () => {
|
2788
|
+
const track2_data = `${state.cardNumber.replace(/\s+/g, "")}=${state.year}${state.month.length > 1 ? state.month : "0" + state.month} ${state.cvv}`;
|
2789
|
+
const publicKey = forge.pki.publicKeyFromPem(state.publicKey);
|
2790
|
+
const encrypted = publicKey.encrypt(track2_data, "RSA-OAEP", {
|
2791
|
+
md: forge.md.sha1.create(),
|
2792
|
+
mgf1: { md: forge.md.sha1.create() }
|
2793
|
+
});
|
2794
|
+
const encryptedBase64 = forge.util.encode64(encrypted);
|
2795
|
+
console.log(encryptedBase64);
|
2796
|
+
const requestBody = {
|
2797
|
+
enc_track2_data: encryptedBase64,
|
2798
|
+
session_key: state.sessionKey,
|
2799
|
+
algorithm: "RSAES_OAEP_SHA_1"
|
2800
|
+
};
|
2801
|
+
const apiUrl = "https://m1ao5pku8b.execute-api.us-east-2.amazonaws.com/prod/tokenizer/tokenize";
|
2802
|
+
try {
|
2803
|
+
const response = await axios2.post(apiUrl, requestBody, {
|
2804
|
+
headers: {
|
2805
|
+
"x-app-session-key": state == null ? void 0 : state.sessionKey,
|
2806
|
+
"Content-Type": "application/json"
|
2807
|
+
}
|
2808
|
+
});
|
2809
|
+
if ((response == null ? void 0 : response.status) === 200) {
|
2810
|
+
toast3.success("Payment Successful");
|
2811
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2812
|
+
show: false,
|
2813
|
+
publicKey: "",
|
2814
|
+
sessionKey: "",
|
2815
|
+
cardNumber: "",
|
2816
|
+
year: "",
|
2817
|
+
month: "",
|
2818
|
+
cvv: "",
|
2819
|
+
zip: "",
|
2820
|
+
amount: ""
|
2821
|
+
}));
|
2822
|
+
}
|
2823
|
+
console.log("response", response);
|
2824
|
+
} catch (error) {
|
2825
|
+
console.error("Error:", error);
|
2826
|
+
}
|
2827
|
+
};
|
2828
|
+
const handleCardNumberChange = (e) => {
|
2829
|
+
e.preventDefault();
|
2830
|
+
const { value } = e.target;
|
2831
|
+
const formattedValue = value.replace(/\D+/g, "").replace(/(.{4})/g, "$1 ").trim();
|
2832
|
+
if (value.match(/[a-zA-Z]/)) {
|
2833
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2834
|
+
cardNumber: formattedValue,
|
2835
|
+
error: "Invalid input. Please enter only numbers."
|
2836
|
+
}));
|
2837
|
+
} else {
|
2838
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2839
|
+
cardNumber: formattedValue,
|
2840
|
+
error: null
|
2841
|
+
}));
|
2842
|
+
}
|
2843
|
+
};
|
2844
|
+
const handleMonthChange = (e) => {
|
2845
|
+
setIsValid(false);
|
2846
|
+
let value = e.target.value;
|
2847
|
+
if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 1 && parseInt(value, 10) <= 12)) {
|
2848
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2849
|
+
month: value
|
2850
|
+
}));
|
2851
|
+
setIsValidMonth(false);
|
2852
|
+
} else {
|
2853
|
+
setIsValidMonth(true);
|
2854
|
+
}
|
2855
|
+
};
|
2856
|
+
const handleYearChange = (e) => {
|
2857
|
+
setIsValid(false);
|
2858
|
+
setIsValidMonth(false);
|
2859
|
+
let value = e.target.value;
|
2860
|
+
if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 0 && parseInt(value, 10) <= 99)) {
|
2861
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2862
|
+
year: value
|
2863
|
+
}));
|
2864
|
+
}
|
2865
|
+
};
|
2866
|
+
const handleCVVChange = (e) => {
|
2867
|
+
setIsValid(false);
|
2868
|
+
setIsValidMonth(false);
|
2869
|
+
let value = e.target.value;
|
2870
|
+
if (/^\d{0,4}$/.test(value)) {
|
2871
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2872
|
+
cvv: value
|
2873
|
+
}));
|
2874
|
+
}
|
2875
|
+
};
|
2876
|
+
const handleZIP = (e) => {
|
2877
|
+
setIsValid(false);
|
2878
|
+
setIsValidMonth(false);
|
2879
|
+
let value = e.target.value;
|
2880
|
+
if (/^\d{0,7}$/.test(value)) {
|
2881
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2882
|
+
zip: value
|
2883
|
+
}));
|
2884
|
+
}
|
2885
|
+
};
|
2886
|
+
const handleAmount = (e) => {
|
2887
|
+
setIsValid(false);
|
2888
|
+
setIsValidMonth(false);
|
2889
|
+
let value = e.target.value;
|
2890
|
+
value = value.replace(/[^0-9.]/g, "");
|
2891
|
+
let parts = value.split(".");
|
2892
|
+
if (parts.length > 2) {
|
2893
|
+
parts = [parts.shift(), parts.join(".")];
|
2894
|
+
value = parts.join("");
|
2895
|
+
}
|
2896
|
+
if (parts.length === 2 && parts[1].length > 2) {
|
2897
|
+
value = `${parts[0]}.${parts[1].slice(0, 2)}`;
|
2898
|
+
}
|
2899
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2900
|
+
amount: value
|
2901
|
+
}));
|
2902
|
+
};
|
2903
|
+
const handleAmountBlur = () => {
|
2904
|
+
const value = state.amount;
|
2905
|
+
if (value && !value.includes(".")) {
|
2906
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2907
|
+
amount: `${value}.00`
|
2908
|
+
}));
|
2909
|
+
}
|
2910
|
+
};
|
2911
|
+
function amountFormat(amt) {
|
2912
|
+
if (amt) {
|
2913
|
+
return `${parseFloat(amt).toLocaleString("en-US", {
|
2914
|
+
minimumFractionDigits: 2,
|
2915
|
+
maximumFractionDigits: 2
|
2916
|
+
})}`;
|
2917
|
+
}
|
2918
|
+
return "";
|
2919
|
+
}
|
2920
|
+
return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Paymentstyles, null), /* @__PURE__ */ React10.createElement("div", { className: "" }, /* @__PURE__ */ React10.createElement(
|
2921
|
+
"button",
|
2922
|
+
{
|
2923
|
+
className: "export-btn",
|
2924
|
+
style: { width: "83px" },
|
2925
|
+
onClick: () => handlePaymentClick()
|
2926
|
+
},
|
2927
|
+
"Payment"
|
2928
|
+
), /* @__PURE__ */ React10.createElement(
|
2929
|
+
Modal6,
|
2930
|
+
{
|
2931
|
+
show: state.show,
|
2932
|
+
onHide: () => setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2933
|
+
show: false
|
2934
|
+
})),
|
2935
|
+
centered: true
|
2936
|
+
},
|
2937
|
+
/* @__PURE__ */ React10.createElement(Modal6.Header, { closeButton: true }),
|
2938
|
+
/* @__PURE__ */ React10.createElement(Modal6.Body, null, /* @__PURE__ */ React10.createElement("div", { className: "payment-popup" }, /* @__PURE__ */ React10.createElement("div", { className: "row" }, /* @__PURE__ */ React10.createElement("div", { className: "" }, /* @__PURE__ */ React10.createElement("div", { id: "Checkout", className: "inline" }, /* @__PURE__ */ React10.createElement("div", { className: "header" }, /* @__PURE__ */ React10.createElement("h1", null, "Pay")), /* @__PURE__ */ React10.createElement("form", { id: "PaymentForm", className: "payment-form" }, /* @__PURE__ */ React10.createElement("div", { className: "form-group", style: { display: "none" } }, /* @__PURE__ */ React10.createElement("label", null, "Payment amount"), /* @__PURE__ */ React10.createElement("div", { className: "input-group" }, /* @__PURE__ */ React10.createElement("span", { className: "input-group-addon" }, "$"), /* @__PURE__ */ React10.createElement(
|
2939
|
+
"input",
|
2940
|
+
{
|
2941
|
+
type: "text",
|
2942
|
+
name: "amount",
|
2943
|
+
value: "1",
|
2944
|
+
className: "form-control",
|
2945
|
+
id: ""
|
2946
|
+
}
|
2947
|
+
)), /* @__PURE__ */ React10.createElement(
|
2948
|
+
"span",
|
2949
|
+
{
|
2950
|
+
id: "amount-error",
|
2951
|
+
style: { color: "red", display: "none" }
|
2952
|
+
}
|
2953
|
+
)), /* @__PURE__ */ React10.createElement("div", { className: "form-group" }, /* @__PURE__ */ React10.createElement("label", null, "Name on card"), /* @__PURE__ */ React10.createElement(
|
2954
|
+
"input",
|
2955
|
+
{
|
2956
|
+
id: "NameOnCard",
|
2957
|
+
className: "form-control required",
|
2958
|
+
type: "text",
|
2959
|
+
maxLength: 100,
|
2960
|
+
placeholder: "Name"
|
2961
|
+
}
|
2962
|
+
), /* @__PURE__ */ React10.createElement(
|
2963
|
+
"span",
|
2964
|
+
{
|
2965
|
+
id: "NameOnCard-error",
|
2966
|
+
style: { color: "red", display: "none" }
|
2967
|
+
}
|
2968
|
+
)), /* @__PURE__ */ React10.createElement("div", { className: "form-group" }, /* @__PURE__ */ React10.createElement(
|
2969
|
+
"input",
|
2970
|
+
{
|
2971
|
+
"data-token": "card_number",
|
2972
|
+
className: "null card-image form-control required",
|
2973
|
+
type: "text",
|
2974
|
+
maxLength: 19,
|
2975
|
+
value: state.cardNumber,
|
2976
|
+
placeholder: "0000 0000 0000 0000",
|
2977
|
+
onChange: handleCardNumberChange
|
2978
|
+
}
|
2979
|
+
), state.error && /* @__PURE__ */ React10.createElement("div", { style: { color: "red" } }, state.error)), /* @__PURE__ */ React10.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React10.createElement(
|
2980
|
+
"input",
|
2981
|
+
{
|
2982
|
+
"data-token": "exp_month",
|
2983
|
+
className: "form-control required",
|
2984
|
+
type: "text",
|
2985
|
+
placeholder: "MM",
|
2986
|
+
value: state.month,
|
2987
|
+
maxLength: 2,
|
2988
|
+
onChange: (e) => handleMonthChange(e)
|
2989
|
+
}
|
2990
|
+
), isValidMonth && /* @__PURE__ */ React10.createElement(
|
2991
|
+
"span",
|
2992
|
+
{
|
2993
|
+
id: "card_number-error",
|
2994
|
+
style: { color: "red", fontSize: "15px" }
|
2995
|
+
},
|
2996
|
+
(_a = ErrorText) == null ? void 0 : _a.montherror
|
2997
|
+
)), /* @__PURE__ */ React10.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React10.createElement(
|
2998
|
+
"input",
|
2999
|
+
{
|
3000
|
+
"data-token": "exp_year",
|
3001
|
+
className: "form-control required",
|
3002
|
+
type: "text",
|
3003
|
+
placeholder: "YY",
|
3004
|
+
maxLength: 2,
|
3005
|
+
value: state.year,
|
3006
|
+
onChange: (e) => handleYearChange(e)
|
3007
|
+
}
|
3008
|
+
), state.yearError && /* @__PURE__ */ React10.createElement("span", { id: "exp_year-error", style: { color: "red" } }, state.yearError)), /* @__PURE__ */ React10.createElement("div", { className: "security-code-group form-group" }, /* @__PURE__ */ React10.createElement("div", { className: "input-container" }, /* @__PURE__ */ React10.createElement(
|
3009
|
+
"input",
|
3010
|
+
{
|
3011
|
+
"data-token": "cvv",
|
3012
|
+
className: "form-control required",
|
3013
|
+
type: "text",
|
3014
|
+
maxLength: 4,
|
3015
|
+
value: state.cvv,
|
3016
|
+
placeholder: "CVV",
|
3017
|
+
onChange: (e) => handleCVVChange(e)
|
3018
|
+
}
|
3019
|
+
), /* @__PURE__ */ React10.createElement("i", { id: "cvc", className: "fa fa-question-circle" }), state.cvvError && /* @__PURE__ */ React10.createElement("span", { id: "cvv-error", style: { color: "red" } }, state.cvvError)), /* @__PURE__ */ React10.createElement("div", { className: "cvc-preview-container two-card hide" }, /* @__PURE__ */ React10.createElement("div", { className: "amex-cvc-preview" }), /* @__PURE__ */ React10.createElement("div", { className: "visa-mc-dis-cvc-preview" }))), /* @__PURE__ */ React10.createElement("div", { className: "zip-code-group form-group" }, /* @__PURE__ */ React10.createElement("label", null, "Postal code"), /* @__PURE__ */ React10.createElement("div", { className: "input-container" }, /* @__PURE__ */ React10.createElement(
|
3020
|
+
"input",
|
3021
|
+
{
|
3022
|
+
id: "ZIPCode",
|
3023
|
+
className: "form-control required",
|
3024
|
+
name: "zip",
|
3025
|
+
type: "text",
|
3026
|
+
maxLength: 7,
|
3027
|
+
placeholder: "000000",
|
3028
|
+
value: state.zip,
|
3029
|
+
onChange: (e) => handleZIP(e)
|
3030
|
+
}
|
3031
|
+
), /* @__PURE__ */ React10.createElement(
|
3032
|
+
"a",
|
3033
|
+
{
|
3034
|
+
tabIndex: 0,
|
3035
|
+
role: "button",
|
3036
|
+
"data-toggle": "popover",
|
3037
|
+
"data-trigger": "focus",
|
3038
|
+
"data-placement": "left",
|
3039
|
+
"data-content": "Enter the ZIP/Postal code for your credit card billing address."
|
3040
|
+
},
|
3041
|
+
/* @__PURE__ */ React10.createElement("i", { className: "fa fa-question-circle" })
|
3042
|
+
), /* @__PURE__ */ React10.createElement(
|
3043
|
+
"span",
|
3044
|
+
{
|
3045
|
+
id: "ZIPCode-error",
|
3046
|
+
style: { color: "red", display: "none" }
|
3047
|
+
},
|
3048
|
+
ErrorText.fieldrequired
|
3049
|
+
))), /* @__PURE__ */ React10.createElement("div", { className: "form-group top-amnt" }, /* @__PURE__ */ React10.createElement("div", null, /* @__PURE__ */ React10.createElement("label", null, "Payment amount"), /* @__PURE__ */ React10.createElement("div", { className: "amount-placeholder" }, /* @__PURE__ */ React10.createElement(
|
3050
|
+
"input",
|
3051
|
+
{
|
3052
|
+
id: "Amount",
|
3053
|
+
className: "form-control required",
|
3054
|
+
name: "amount",
|
3055
|
+
type: "text",
|
3056
|
+
placeholder: "",
|
3057
|
+
value: state.amount,
|
3058
|
+
onChange: (e) => handleAmount(e),
|
3059
|
+
onBlur: handleAmountBlur
|
3060
|
+
}
|
3061
|
+
))), /* @__PURE__ */ React10.createElement("div", { className: "card-row" }, /* @__PURE__ */ React10.createElement("span", { className: "visa" }), /* @__PURE__ */ React10.createElement("span", { className: "mastercard" }), /* @__PURE__ */ React10.createElement("span", { className: "amex" }), /* @__PURE__ */ React10.createElement("span", { className: "discover" }))), /* @__PURE__ */ React10.createElement(
|
3062
|
+
"button",
|
3063
|
+
{
|
3064
|
+
type: "button",
|
3065
|
+
id: "submitButton",
|
3066
|
+
onClick: () => handleSubmitPay(),
|
3067
|
+
className: "btn btn-block btn-success submit-button"
|
3068
|
+
},
|
3069
|
+
"Pay"
|
3070
|
+
)), /* @__PURE__ */ React10.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ React10.createElement(
|
3071
|
+
"svg",
|
3072
|
+
{
|
3073
|
+
xmlns: "http://www.w3.org/2000/svg",
|
3074
|
+
width: "20",
|
3075
|
+
height: "20",
|
3076
|
+
viewBox: "0 0 26 26"
|
3077
|
+
},
|
3078
|
+
/* @__PURE__ */ React10.createElement(
|
3079
|
+
"path",
|
3080
|
+
{
|
3081
|
+
fill: "currentColor",
|
3082
|
+
d: "M23.633 5.028a1.074 1.074 0 0 0-.777-.366c-2.295-.06-5.199-2.514-7.119-3.477C14.551.592 13.768.201 13.18.098a1.225 1.225 0 0 0-.36.001c-.588.103-1.371.494-2.556 1.087c-1.92.962-4.824 3.416-7.119 3.476a1.08 1.08 0 0 0-.778.366a1.167 1.167 0 0 0-.291.834c.493 10.023 4.088 16.226 10.396 19.831c.164.093.346.141.527.141s.363-.048.528-.141c6.308-3.605 9.902-9.808 10.396-19.831a1.161 1.161 0 0 0-.29-.834zM18.617 8.97l-5.323 7.855c-.191.282-.491.469-.788.469c-.298 0-.629-.163-.838-.372l-3.752-3.753a.656.656 0 0 1 0-.926l.927-.929a.658.658 0 0 1 .926 0l2.44 2.44l4.239-6.257a.657.657 0 0 1 .91-.173l1.085.736a.657.657 0 0 1 .174.91z"
|
3083
|
+
}
|
3084
|
+
)
|
3085
|
+
), "Secure payments powered by Fractal", /* @__PURE__ */ React10.createElement(
|
3086
|
+
"img",
|
3087
|
+
{
|
3088
|
+
src: "https://ui.fractalpay.com/favicon.ico",
|
3089
|
+
alt: "Fractal logo",
|
3090
|
+
className: "powered-logo"
|
3091
|
+
}
|
3092
|
+
)))))))
|
3093
|
+
)));
|
3094
|
+
}
|
3095
|
+
|
3096
|
+
// src/app/components/Transaction/CompletedTransactions.tsx
|
3097
|
+
import axios3 from "axios";
|
3098
|
+
import React12, { useEffect as useEffect3, useState as useState8 } from "react";
|
3099
|
+
import { Col, Row, Table } from "react-bootstrap";
|
3100
|
+
import {
|
3101
|
+
DatatableWrapper,
|
3102
|
+
Filter,
|
3103
|
+
PaginationOptions,
|
3104
|
+
TableBody,
|
3105
|
+
TableHeader
|
3106
|
+
} from "react-bs-datatable";
|
3107
|
+
import DatePicker from "react-datepicker";
|
3108
|
+
import "react-datepicker/dist/react-datepicker.css";
|
3109
|
+
import { toast as toast4 } from "react-toastify";
|
3110
|
+
|
3111
|
+
// src/app/components/Pagination/Pagination.tsx
|
3112
|
+
import React11, { memo, useState as useState7, useEffect as useEffect2 } from "react";
|
3113
|
+
var PaginationPg = ({ totalPages, onPageChange, current }) => {
|
3114
|
+
const [currentPage, setCurrentPage] = useState7(current);
|
3115
|
+
const [showPages, setShowPages] = useState7(false);
|
3116
|
+
useEffect2(() => {
|
3117
|
+
setCurrentPage(current);
|
3118
|
+
}, [current]);
|
3119
|
+
useEffect2(() => {
|
3120
|
+
setTimeout(() => {
|
3121
|
+
setShowPages(true);
|
3122
|
+
}, 1e3);
|
3123
|
+
}, []);
|
3124
|
+
const handlePrevious = (e) => {
|
3125
|
+
e.preventDefault();
|
3126
|
+
if (currentPage > 1) {
|
3127
|
+
const newPage = currentPage - 1;
|
3128
|
+
setCurrentPage(newPage);
|
3129
|
+
onPageChange(newPage);
|
3130
|
+
}
|
3131
|
+
};
|
3132
|
+
const handleNext = (e) => {
|
3133
|
+
e.preventDefault();
|
3134
|
+
if (currentPage < totalPages) {
|
3135
|
+
const newPage = currentPage + 1;
|
3136
|
+
setCurrentPage(newPage);
|
3137
|
+
onPageChange(newPage);
|
3138
|
+
}
|
3139
|
+
};
|
3140
|
+
const handlePageClick = (e, pageNumber) => {
|
3141
|
+
e.preventDefault();
|
3142
|
+
setCurrentPage(pageNumber);
|
3143
|
+
onPageChange(pageNumber);
|
3144
|
+
};
|
3145
|
+
const getPageNumbers = () => {
|
3146
|
+
const pageNumbers = [];
|
3147
|
+
if (totalPages <= 5) {
|
3148
|
+
for (let i = 1; i <= totalPages; i++) {
|
3149
|
+
pageNumbers.push(renderPageNumber(i));
|
3150
|
+
}
|
3151
|
+
} else {
|
3152
|
+
if (currentPage > 3) {
|
3153
|
+
pageNumbers.push(renderPageNumber(1));
|
3154
|
+
if (currentPage > 4) {
|
3155
|
+
pageNumbers.push(/* @__PURE__ */ React11.createElement("li", { key: "start-break", className: "page-item disabled" }, /* @__PURE__ */ React11.createElement("span", { className: "page-link" }, "...")));
|
3156
|
+
}
|
3157
|
+
}
|
3158
|
+
const startPage = Math.max(currentPage - 1, 1);
|
3159
|
+
const endPage = Math.min(startPage + 2, totalPages);
|
3160
|
+
for (let i = startPage; i <= endPage; i++) {
|
3161
|
+
pageNumbers.push(renderPageNumber(i));
|
3162
|
+
}
|
3163
|
+
if (currentPage < totalPages - 2) {
|
3164
|
+
if (currentPage < totalPages - 3) {
|
3165
|
+
pageNumbers.push(/* @__PURE__ */ React11.createElement("li", { key: "end-break", className: "page-item disabled" }, /* @__PURE__ */ React11.createElement("span", { className: "page-link" }, "...")));
|
3166
|
+
}
|
3167
|
+
pageNumbers.push(renderPageNumber(totalPages));
|
3168
|
+
}
|
3169
|
+
}
|
3170
|
+
return pageNumbers;
|
3171
|
+
};
|
3172
|
+
const renderPageNumber = (pageNumber) => /* @__PURE__ */ React11.createElement("li", { key: pageNumber, className: `page-item ${currentPage === pageNumber ? "active" : ""}` }, /* @__PURE__ */ React11.createElement("a", { className: "page-link cursor-pointer", onClick: (e) => handlePageClick(e, pageNumber) }, pageNumber));
|
3173
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement("nav", { className: "app-pagination py-2" }, /* @__PURE__ */ React11.createElement("ul", { className: "pagination justify-content-center" }, /* @__PURE__ */ React11.createElement("li", { className: `page-item ${currentPage === 1 ? "disabled" : ""}` }, /* @__PURE__ */ React11.createElement("a", { className: "page-link cursor-pointer", onClick: handlePrevious }, /* @__PURE__ */ React11.createElement("span", null, "\u2B9C"))), showPages && getPageNumbers(), /* @__PURE__ */ React11.createElement("li", { className: `page-item ${currentPage === totalPages ? "disabled" : ""}` }, /* @__PURE__ */ React11.createElement("a", { className: "page-link cursor-pointer", onClick: handleNext }, /* @__PURE__ */ React11.createElement("span", null, "\u2B9E"))))));
|
3174
|
+
};
|
3175
|
+
var Pagination_default = memo(PaginationPg);
|
3176
|
+
|
3177
|
+
// src/app/components/Transaction/CompletedTransactions.tsx
|
3178
|
+
var STORY_HEADERS = [
|
3179
|
+
{
|
3180
|
+
prop: "Date",
|
3181
|
+
title: "Date",
|
3182
|
+
isSortable: true
|
3183
|
+
},
|
3184
|
+
{
|
3185
|
+
prop: "Name",
|
3186
|
+
isFilterable: true,
|
3187
|
+
title: "Name",
|
3188
|
+
isSortable: true
|
3189
|
+
},
|
3190
|
+
{
|
3191
|
+
prop: "lastFourDigits",
|
3192
|
+
title: "Last 4",
|
3193
|
+
isSortable: true
|
3194
|
+
},
|
3195
|
+
{
|
3196
|
+
prop: "cardType",
|
3197
|
+
title: "Brand",
|
3198
|
+
isSortable: true
|
3199
|
+
},
|
3200
|
+
{
|
3201
|
+
prop: "Amount",
|
3202
|
+
title: "Amount",
|
3203
|
+
isSortable: true
|
3204
|
+
},
|
3205
|
+
{
|
3206
|
+
prop: "Net",
|
3207
|
+
title: "Net",
|
3208
|
+
isSortable: true
|
3209
|
+
}
|
3210
|
+
];
|
3211
|
+
function CompletedTransactions(props) {
|
3212
|
+
const [dataList, setDataList] = useState8([]);
|
3213
|
+
const [startDate, setStartDate] = useState8(null);
|
3214
|
+
const [endDate, setEndDate] = useState8(null);
|
3215
|
+
const [state, setState] = useState8({
|
3216
|
+
page: 1,
|
3217
|
+
totalPage: 0,
|
3218
|
+
data: [],
|
3219
|
+
csvData: false
|
3220
|
+
});
|
3221
|
+
const formatDate = (inputDate) => {
|
3222
|
+
if (!inputDate) return "";
|
3223
|
+
const date = new Date(inputDate);
|
3224
|
+
const month = date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() + 1;
|
3225
|
+
const day = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate();
|
3226
|
+
return `${date.getFullYear()}-${month}-${day}`;
|
3227
|
+
};
|
3228
|
+
const downloadStringAsCSV = (name, content) => {
|
3229
|
+
const csvContent = convertArrayOfObjectsToCSV(content);
|
3230
|
+
const blob = new Blob([csvContent], { type: "text/csv;charset=utf-8;" });
|
3231
|
+
const a = document.createElement("a");
|
3232
|
+
a.href = URL.createObjectURL(blob);
|
3233
|
+
a.download = name;
|
3234
|
+
document.body.appendChild(a);
|
3235
|
+
a.click();
|
3236
|
+
document.body.removeChild(a);
|
3237
|
+
};
|
3238
|
+
const convertArrayOfObjectsToCSV = (array) => {
|
3239
|
+
const headers = Object.keys(array[0]);
|
3240
|
+
const csvRows = [];
|
3241
|
+
csvRows.push(headers.join(","));
|
3242
|
+
for (const obj of array) {
|
3243
|
+
const values = headers.map((header) => obj[header]);
|
3244
|
+
csvRows.push(values.join(","));
|
3245
|
+
}
|
3246
|
+
return csvRows.join("\n");
|
3247
|
+
};
|
3248
|
+
const fetchData = async (newPage, startDate2, endDate2) => {
|
3249
|
+
var _a, _b;
|
3250
|
+
try {
|
3251
|
+
const response = await axios3.post(`${baseUrl}get-complete-request-payments`, {
|
3252
|
+
fractalpayPublicKey: props.fractalpayClientKey,
|
3253
|
+
page: newPage,
|
3254
|
+
dateStart: startDate2 ? formatDate(startDate2) : "",
|
3255
|
+
dateEnd: endDate2 ? formatDate(endDate2) : ""
|
3256
|
+
});
|
3257
|
+
const data = response.data;
|
3258
|
+
setState((prev) => {
|
3259
|
+
var _a2;
|
3260
|
+
return __spreadProps(__spreadValues({}, prev), { totalPage: (_a2 = data == null ? void 0 : data.data) == null ? void 0 : _a2.totalPage });
|
3261
|
+
});
|
3262
|
+
if (data && (data == null ? void 0 : data.result) === true) {
|
3263
|
+
const result = ((_b = (_a = data == null ? void 0 : data.data) == null ? void 0 : _a.allPaymentTransaction) != null ? _b : []).map((item) => ({
|
3264
|
+
Date: formatDate(item == null ? void 0 : item.Date),
|
3265
|
+
Name: item == null ? void 0 : item.Name,
|
3266
|
+
lastFourDigits: item == null ? void 0 : item.lastFourDigits,
|
3267
|
+
cardType: item == null ? void 0 : item.cardType,
|
3268
|
+
Amount: `$${parseFloat(item == null ? void 0 : item.Amount).toLocaleString("en-US", { maximumFractionDigits: 2 })}`,
|
3269
|
+
Net: `$${parseFloat(item == null ? void 0 : item.Net).toLocaleString("en-US", { maximumFractionDigits: 2 })}`
|
3270
|
+
}));
|
3271
|
+
if (state.csvData) {
|
3272
|
+
downloadStringAsCSV("transaction.csv", result);
|
3273
|
+
setState((prev) => {
|
3274
|
+
var _a2;
|
3275
|
+
return __spreadProps(__spreadValues({}, prev), { data: (_a2 = data == null ? void 0 : data.data) == null ? void 0 : _a2.allPaymentTransaction, csvData: false });
|
3276
|
+
});
|
3277
|
+
}
|
3278
|
+
setDataList(result);
|
3279
|
+
} else {
|
3280
|
+
console.log("No data available");
|
3281
|
+
}
|
3282
|
+
} catch (error) {
|
3283
|
+
console.log(error);
|
3284
|
+
}
|
3285
|
+
};
|
3286
|
+
const handleStartDateChange = (date) => {
|
3287
|
+
setStartDate(date);
|
3288
|
+
};
|
3289
|
+
const handleEndDateChange = (date) => {
|
3290
|
+
setEndDate(date);
|
3291
|
+
};
|
3292
|
+
const handleExport = async () => {
|
3293
|
+
var _a;
|
3294
|
+
if (!startDate) {
|
3295
|
+
toast4.error("Start date required");
|
3296
|
+
} else if (!endDate) {
|
3297
|
+
toast4.error("End date required");
|
3298
|
+
} else {
|
3299
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), { csvData: true }));
|
3300
|
+
try {
|
3301
|
+
const response = await axios3.post(`${baseUrl}get-complete-request-payments`, {
|
3302
|
+
fractalpayPublicKey: props.fractalpayClientKey,
|
3303
|
+
dateStart: startDate ? formatDate(startDate) : "",
|
3304
|
+
dateEnd: endDate ? formatDate(endDate) : "",
|
3305
|
+
isExport: true
|
3306
|
+
});
|
3307
|
+
if (response.data.status) {
|
3308
|
+
const link = document.createElement("a");
|
3309
|
+
link.href = `${(_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data}`;
|
3310
|
+
link.target = "_blank";
|
3311
|
+
document.body.appendChild(link);
|
3312
|
+
link.click();
|
3313
|
+
document.body.removeChild(link);
|
3314
|
+
}
|
3315
|
+
} catch (error) {
|
3316
|
+
console.log(error);
|
3317
|
+
}
|
3318
|
+
}
|
3319
|
+
};
|
3320
|
+
useEffect3(() => {
|
3321
|
+
fetchData(state.page, startDate, endDate);
|
3322
|
+
}, [state.page]);
|
3323
|
+
const handlePageChange = (pageNumber) => {
|
3324
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), { page: pageNumber }));
|
3325
|
+
fetchData(pageNumber, startDate, endDate);
|
3326
|
+
};
|
3327
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("style", null, `
|
3328
|
+
.react-datepicker-wrapper:first-child {
|
3329
|
+
margin-right: 10px;
|
3330
|
+
}
|
3331
|
+
`), /* @__PURE__ */ React12.createElement("div", { className: "mb-5" }, /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ React12.createElement("div", { style: { display: "flex", marginRight: "10px", marginTop: "25px" } }, /* @__PURE__ */ React12.createElement(
|
3332
|
+
DatePicker,
|
3333
|
+
{
|
3334
|
+
selected: startDate,
|
3335
|
+
onChange: handleStartDateChange,
|
3336
|
+
selectsStart: true,
|
3337
|
+
startDate,
|
3338
|
+
endDate,
|
3339
|
+
placeholderText: "Start Date",
|
3340
|
+
required: true
|
3341
|
+
}
|
3342
|
+
), /* @__PURE__ */ React12.createElement(
|
3343
|
+
DatePicker,
|
3344
|
+
{
|
3345
|
+
selected: endDate,
|
3346
|
+
onChange: handleEndDateChange,
|
3347
|
+
selectsEnd: true,
|
3348
|
+
startDate,
|
3349
|
+
endDate,
|
3350
|
+
minDate: startDate,
|
3351
|
+
placeholderText: "End Date"
|
3352
|
+
}
|
3353
|
+
)), /* @__PURE__ */ React12.createElement("button", { className: "export-btn1", onClick: handleExport }, "Export")), /* @__PURE__ */ React12.createElement(
|
3354
|
+
DatatableWrapper,
|
3355
|
+
{
|
3356
|
+
body: dataList,
|
3357
|
+
headers: STORY_HEADERS,
|
3358
|
+
paginationOptionsProps: {
|
3359
|
+
initialState: {
|
3360
|
+
rowsPerPage: 10,
|
3361
|
+
options: [5, 10, 15, 20]
|
3362
|
+
}
|
3363
|
+
}
|
3364
|
+
},
|
3365
|
+
/* @__PURE__ */ React12.createElement(Row, { className: "mb-4 p-2" }, /* @__PURE__ */ React12.createElement(Col, { xs: 12, sm: 6, lg: 4, className: "d-flex flex-col justify-content-lg-start align-items-center justify-content-sm-start mb-2 mb-sm-0" }, /* @__PURE__ */ React12.createElement(PaginationOptions, null)), /* @__PURE__ */ React12.createElement(Col, { xs: 12, lg: 4, className: "d-flex flex-col justify-content-end align-items-end" }), /* @__PURE__ */ React12.createElement(Col, { xs: 12, sm: 6, lg: 4, className: "d-flex flex-col justify-content-end align-items-end" }, /* @__PURE__ */ React12.createElement(Filter, null))),
|
3366
|
+
/* @__PURE__ */ React12.createElement(Row, null, /* @__PURE__ */ React12.createElement("div", { className: "responsive-tbl" }, /* @__PURE__ */ React12.createElement(Table, null, /* @__PURE__ */ React12.createElement(TableHeader, null), /* @__PURE__ */ React12.createElement(TableBody, null)))),
|
3367
|
+
/* @__PURE__ */ React12.createElement(Pagination_default, { totalPages: state.totalPage, onPageChange: handlePageChange, current: state.page })
|
3368
|
+
))));
|
3369
|
+
}
|
3370
|
+
|
3371
|
+
// src/app/components/Payment/TockenizPay.tsx
|
3372
|
+
import React13, { useState as useState9 } from "react";
|
3373
|
+
import { Modal as Modal7 } from "react-bootstrap";
|
3374
|
+
import { toast as toast5, ToastContainer as ToastContainer3 } from "react-toastify";
|
3375
|
+
import axios4 from "axios";
|
3376
|
+
import forge2 from "node-forge";
|
3377
|
+
import creditCardType from "credit-card-type";
|
3378
|
+
function TockenizPay() {
|
3379
|
+
const [state, setState] = useState9({
|
3380
|
+
show: false,
|
3381
|
+
publicKey: "",
|
3382
|
+
sessionKey: "",
|
3383
|
+
cardNumber: "",
|
3384
|
+
year: "",
|
3385
|
+
month: "",
|
3386
|
+
cvv: "",
|
3387
|
+
zip: "",
|
3388
|
+
amount: ""
|
3389
|
+
});
|
3390
|
+
const [cardTypeDetail, setCardTypeDetail] = useState9(null);
|
3391
|
+
const [isValid, setIsValid] = useState9(false);
|
3392
|
+
const [isValidMonth, setIsValidMonth] = useState9(false);
|
3393
|
+
const [data, setData] = useState9(null);
|
3394
|
+
const handlePaymentClick = async () => {
|
3395
|
+
try {
|
3396
|
+
const response = await axios4.post(`${baseUrl}/generate-session`, {});
|
3397
|
+
const data2 = response.data;
|
3398
|
+
if (data2 && (data2 == null ? void 0 : data2.result) === true) {
|
3399
|
+
setState((prev) => {
|
3400
|
+
var _a, _b;
|
3401
|
+
return __spreadProps(__spreadValues({}, prev), {
|
3402
|
+
show: true,
|
3403
|
+
publicKey: (_a = data2 == null ? void 0 : data2.data) == null ? void 0 : _a.publicKeyPem,
|
3404
|
+
sessionKey: (_b = data2 == null ? void 0 : data2.data) == null ? void 0 : _b.session_key
|
3405
|
+
});
|
3406
|
+
});
|
3407
|
+
}
|
3408
|
+
} catch (error) {
|
3409
|
+
console.log(error);
|
3410
|
+
}
|
3411
|
+
};
|
3412
|
+
const handleSubmitPay = async () => {
|
3413
|
+
var _a, _b, _c, _d, _e;
|
3414
|
+
let track2_data = `${(_a = state == null ? void 0 : state.cardNumber) == null ? void 0 : _a.replaceAll(" ", "")}=${state.year}${((_b = state == null ? void 0 : state.month) == null ? void 0 : _b.length) > 1 ? state == null ? void 0 : state.month : "0" + (state == null ? void 0 : state.month)} ${state.cvv}`;
|
3415
|
+
const publicKey = forge2.pki.publicKeyFromPem(state.publicKey);
|
3416
|
+
const encrypted = publicKey.encrypt(track2_data, "RSA-OAEP", {
|
3417
|
+
md: forge2.md.sha1.create(),
|
3418
|
+
mgf1: {
|
3419
|
+
md: forge2.md.sha1.create()
|
3420
|
+
}
|
3421
|
+
});
|
3422
|
+
const encryptedBase64 = forge2.util.encode64(encrypted);
|
3423
|
+
console.log(encryptedBase64);
|
3424
|
+
const requestBody = {
|
3425
|
+
enc_track2_data: encryptedBase64,
|
3426
|
+
session_key: state.sessionKey,
|
3427
|
+
algorithm: "RSAES_OAEP_SHA_1"
|
3428
|
+
};
|
3429
|
+
try {
|
3430
|
+
const response = await axios4.post(
|
3431
|
+
"https://m1ao5pku8b.execute-api.us-east-2.amazonaws.com/prod/tokenizer/tokenize",
|
3432
|
+
requestBody,
|
3433
|
+
{
|
3434
|
+
headers: {
|
3435
|
+
"x-app-session-key": state == null ? void 0 : state.sessionKey,
|
3436
|
+
"Content-Type": "application/json"
|
3437
|
+
}
|
3438
|
+
}
|
3439
|
+
);
|
3440
|
+
if ((response == null ? void 0 : response.status) === 200) {
|
3441
|
+
toast5.success("Payment Successful");
|
3442
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3443
|
+
show: false,
|
3444
|
+
publicKey: "",
|
3445
|
+
sessionKey: "",
|
3446
|
+
cardNumber: "",
|
3447
|
+
year: "",
|
3448
|
+
month: "",
|
3449
|
+
cvv: "",
|
3450
|
+
zip: "",
|
3451
|
+
amount: ""
|
3452
|
+
}));
|
3453
|
+
}
|
3454
|
+
console.log("response", response);
|
3455
|
+
} catch (error) {
|
3456
|
+
toast5.error((_e = (_d = (_c = error == null ? void 0 : error.response) == null ? void 0 : _c.data) == null ? void 0 : _d.data) == null ? void 0 : _e.message);
|
3457
|
+
console.error("Error:", error);
|
3458
|
+
}
|
3459
|
+
};
|
3460
|
+
const formatCreditCardNumber = (cardNumber, cardType) => {
|
3461
|
+
const cleanNumber = cardNumber.replace(/\D+/g, "");
|
3462
|
+
let formattedValue;
|
3463
|
+
switch (cardType) {
|
3464
|
+
case "visa":
|
3465
|
+
case "mastercard":
|
3466
|
+
case "Discover":
|
3467
|
+
case "JCB":
|
3468
|
+
formattedValue = cleanNumber.replace(/(.{4})/g, "$1 ").trim();
|
3469
|
+
break;
|
3470
|
+
case "american-express":
|
3471
|
+
formattedValue = cleanNumber.replace(/(\d{4})(\d{6})(\d{5})/, "$1 $2 $3");
|
3472
|
+
break;
|
3473
|
+
case "diners-club":
|
3474
|
+
formattedValue = cleanNumber.replace(/(\d{4})(\d{6})(\d{4})/, "$1 $2 $3");
|
3475
|
+
break;
|
3476
|
+
case "maestro":
|
3477
|
+
formattedValue = cleanNumber.length <= 19 ? cleanNumber.replace(/(.{4})/g, "$1 ").trim() : cleanNumber;
|
3478
|
+
break;
|
3479
|
+
default:
|
3480
|
+
formattedValue = cleanNumber;
|
3481
|
+
}
|
3482
|
+
return formattedValue;
|
3483
|
+
};
|
3484
|
+
const handleCardNumberChange = (e) => {
|
3485
|
+
e.preventDefault();
|
3486
|
+
e.stopPropagation();
|
3487
|
+
const { value } = e.target;
|
3488
|
+
let cardtyp = creditCardType(value)[0];
|
3489
|
+
const formattedValue = formatCreditCardNumber(value, cardtyp == null ? void 0 : cardtyp.type);
|
3490
|
+
setCardTypeDetail(creditCardType(value)[0]);
|
3491
|
+
console.log(formattedValue);
|
3492
|
+
if (value.match(/[a-zA-Z]/)) {
|
3493
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3494
|
+
cardNumber: formattedValue,
|
3495
|
+
error: "Invalid input. Please enter only numbers."
|
3496
|
+
}));
|
3497
|
+
} else {
|
3498
|
+
handleCardNumLength("");
|
3499
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3500
|
+
cardNumber: formattedValue,
|
3501
|
+
error: null
|
3502
|
+
}));
|
3503
|
+
}
|
3504
|
+
};
|
3505
|
+
function handleCardNumLength(cardType) {
|
3506
|
+
const cardLengths = {
|
3507
|
+
"Visa": 16,
|
3508
|
+
"MasterCard": 16,
|
3509
|
+
"AmericanExpress": 15,
|
3510
|
+
"Discover": 16,
|
3511
|
+
"DinersClub": 14,
|
3512
|
+
"JCB": 16
|
3513
|
+
};
|
3514
|
+
return cardLengths[cardType] || "Unknown card type";
|
3515
|
+
}
|
3516
|
+
const handleMonthChange = (e) => {
|
3517
|
+
setIsValid(false);
|
3518
|
+
let value = e.target.value;
|
3519
|
+
if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 1 && parseInt(value, 10) <= 12)) {
|
3520
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3521
|
+
month: value
|
3522
|
+
}));
|
3523
|
+
setIsValidMonth(false);
|
3524
|
+
} else {
|
3525
|
+
setIsValidMonth(true);
|
3526
|
+
}
|
3527
|
+
};
|
3528
|
+
const handleYearChange = (e) => {
|
3529
|
+
setIsValid(false);
|
3530
|
+
setIsValidMonth(false);
|
3531
|
+
let value = e.target.value;
|
3532
|
+
if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 0 && parseInt(value, 10) <= 99)) {
|
3533
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3534
|
+
year: value
|
3535
|
+
}));
|
3536
|
+
}
|
3537
|
+
};
|
3538
|
+
const handleCVVChange = (e) => {
|
3539
|
+
setIsValid(false);
|
3540
|
+
setIsValidMonth(false);
|
3541
|
+
let value = e.target.value;
|
3542
|
+
if (/^\d{0,4}$/.test(value)) {
|
3543
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3544
|
+
cvv: value
|
3545
|
+
}));
|
3546
|
+
}
|
3547
|
+
};
|
3548
|
+
const handleZIP = (e) => {
|
3549
|
+
setIsValid(false);
|
3550
|
+
setIsValidMonth(false);
|
3551
|
+
let value = e.target.value;
|
3552
|
+
if (/^\d{0,7}$/.test(value)) {
|
3553
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3554
|
+
zip: value
|
3555
|
+
}));
|
3556
|
+
}
|
3557
|
+
};
|
3558
|
+
const handleAmount = (e) => {
|
3559
|
+
setIsValid(false);
|
3560
|
+
setIsValidMonth(false);
|
3561
|
+
let value = e.target.value;
|
3562
|
+
value = value.replace(/[^0-9.]/g, "");
|
3563
|
+
let parts = value.split(".");
|
3564
|
+
if (parts.length > 2) {
|
3565
|
+
parts = [parts.shift(), parts.join(".")];
|
3566
|
+
value = parts.join("");
|
3567
|
+
}
|
3568
|
+
if (parts.length === 2 && parts[1].length > 2) {
|
3569
|
+
value = `${parts[0]}.${parts[1].slice(0, 2)}`;
|
3570
|
+
}
|
3571
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3572
|
+
amount: value
|
3573
|
+
}));
|
3574
|
+
};
|
3575
|
+
const handleAmountBlur = () => {
|
3576
|
+
const value = state.amount;
|
3577
|
+
if (value && !value.includes(".")) {
|
3578
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3579
|
+
amount: `${value}.00`
|
3580
|
+
}));
|
3581
|
+
}
|
3582
|
+
};
|
3583
|
+
function amountFormat(amt) {
|
3584
|
+
if (amt) {
|
3585
|
+
return `${parseFloat(amt).toLocaleString("en-US", {
|
3586
|
+
minimumFractionDigits: 2,
|
3587
|
+
maximumFractionDigits: 2
|
3588
|
+
})}`;
|
3589
|
+
}
|
3590
|
+
return "";
|
3591
|
+
}
|
3592
|
+
console.log("===================cardtype===============", cardTypeDetail);
|
3593
|
+
return /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement(ToastContainer3, null), /* @__PURE__ */ React13.createElement(
|
3594
|
+
"button",
|
3595
|
+
{
|
3596
|
+
className: "export-btn mt-4",
|
3597
|
+
style: { width: "100px" },
|
3598
|
+
onClick: () => handlePaymentClick()
|
3599
|
+
},
|
3600
|
+
"TokenizePay"
|
3601
|
+
), /* @__PURE__ */ React13.createElement(
|
3602
|
+
Modal7,
|
3603
|
+
{
|
3604
|
+
show: state.show,
|
3605
|
+
onHide: () => setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3606
|
+
show: false
|
3607
|
+
})),
|
3608
|
+
centered: true
|
3609
|
+
},
|
3610
|
+
/* @__PURE__ */ React13.createElement(Modal7.Header, { closeButton: true }),
|
3611
|
+
/* @__PURE__ */ React13.createElement(Modal7.Body, null, /* @__PURE__ */ React13.createElement("div", { className: "payment-popup" }, /* @__PURE__ */ React13.createElement("div", { className: "row" }, /* @__PURE__ */ React13.createElement("div", { className: "" }, /* @__PURE__ */ React13.createElement("div", { id: "Checkout", className: "inline" }, /* @__PURE__ */ React13.createElement("div", { className: "header" }, /* @__PURE__ */ React13.createElement("h1", null, "Pay")), /* @__PURE__ */ React13.createElement("form", { id: "PaymentForm", className: "payment-form" }, /* @__PURE__ */ React13.createElement("div", { className: "form-group" }, /* @__PURE__ */ React13.createElement("label", null, "Name on card"), /* @__PURE__ */ React13.createElement(
|
3612
|
+
"input",
|
3613
|
+
{
|
3614
|
+
id: "NameOnCard",
|
3615
|
+
className: "form-control required",
|
3616
|
+
type: "text",
|
3617
|
+
maxLength: 100,
|
3618
|
+
placeholder: "Name"
|
3619
|
+
}
|
3620
|
+
), /* @__PURE__ */ React13.createElement(
|
3621
|
+
"span",
|
3622
|
+
{
|
3623
|
+
id: "NameOnCard-error",
|
3624
|
+
style: { color: "red", display: "none" }
|
3625
|
+
}
|
3626
|
+
)), /* @__PURE__ */ React13.createElement("div", { className: "form-group" }, /* @__PURE__ */ React13.createElement(
|
3627
|
+
"input",
|
3628
|
+
{
|
3629
|
+
"data-token": "card_number",
|
3630
|
+
className: "null card-image form-control required",
|
3631
|
+
type: "text",
|
3632
|
+
maxLength: 19,
|
3633
|
+
value: state.cardNumber,
|
3634
|
+
placeholder: "0000 0000 0000 0000",
|
3635
|
+
onChange: handleCardNumberChange
|
3636
|
+
}
|
3637
|
+
), state.error && /* @__PURE__ */ React13.createElement("div", { style: { color: "red" } }, state.error)), /* @__PURE__ */ React13.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React13.createElement(
|
3638
|
+
"input",
|
3639
|
+
{
|
3640
|
+
"data-token": "exp_month",
|
3641
|
+
className: "form-control required",
|
3642
|
+
type: "text",
|
3643
|
+
placeholder: "MM",
|
3644
|
+
value: state.month,
|
3645
|
+
maxLength: 2,
|
3646
|
+
onChange: (e) => handleMonthChange(e)
|
3647
|
+
}
|
3648
|
+
), isValidMonth && /* @__PURE__ */ React13.createElement(
|
3649
|
+
"span",
|
3650
|
+
{
|
3651
|
+
id: "card_number-error",
|
3652
|
+
style: { color: "red", fontSize: "15px" }
|
3653
|
+
},
|
3654
|
+
"Please write month only 1 to 12"
|
3655
|
+
)), /* @__PURE__ */ React13.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React13.createElement(
|
3656
|
+
"input",
|
3657
|
+
{
|
3658
|
+
"data-token": "exp_year",
|
3659
|
+
className: "form-control required",
|
3660
|
+
type: "text",
|
3661
|
+
placeholder: "YY",
|
3662
|
+
maxLength: 2,
|
3663
|
+
value: state.year,
|
3664
|
+
onChange: (e) => handleYearChange(e)
|
3665
|
+
}
|
3666
|
+
), state.yearError && /* @__PURE__ */ React13.createElement("span", { id: "exp_year-error", style: { color: "red" } }, state.yearError)), /* @__PURE__ */ React13.createElement("div", { className: "security-code-group form-group" }, /* @__PURE__ */ React13.createElement("div", { className: "input-container" }, /* @__PURE__ */ React13.createElement(
|
3667
|
+
"input",
|
3668
|
+
{
|
3669
|
+
"data-token": "cvv",
|
3670
|
+
className: "form-control required",
|
3671
|
+
type: "text",
|
3672
|
+
maxLength: 4,
|
3673
|
+
value: state.cvv,
|
3674
|
+
placeholder: "CVV",
|
3675
|
+
onChange: (e) => handleCVVChange(e)
|
3676
|
+
}
|
3677
|
+
), /* @__PURE__ */ React13.createElement("i", { id: "cvc", className: "fa fa-question-circle" }), state.cvvError && /* @__PURE__ */ React13.createElement("span", { id: "cvv-error", style: { color: "red" } }, state.cvvError)), /* @__PURE__ */ React13.createElement("div", { className: "cvc-preview-container two-card hide" }, /* @__PURE__ */ React13.createElement("div", { className: "amex-cvc-preview" }), /* @__PURE__ */ React13.createElement("div", { className: "visa-mc-dis-cvc-preview" }))), /* @__PURE__ */ React13.createElement("div", { className: "zip-code-group form-group" }, /* @__PURE__ */ React13.createElement("label", null, "Postal code"), /* @__PURE__ */ React13.createElement("div", { className: "input-container" }, /* @__PURE__ */ React13.createElement(
|
3678
|
+
"input",
|
3679
|
+
{
|
3680
|
+
id: "ZIPCode",
|
3681
|
+
className: "form-control required",
|
3682
|
+
name: "zip",
|
3683
|
+
type: "text",
|
3684
|
+
maxLength: 7,
|
3685
|
+
placeholder: "000000",
|
3686
|
+
value: state.zip,
|
3687
|
+
onChange: (e) => handleZIP(e)
|
3688
|
+
}
|
3689
|
+
), /* @__PURE__ */ React13.createElement(
|
3690
|
+
"a",
|
3691
|
+
{
|
3692
|
+
tabIndex: 0,
|
3693
|
+
role: "button",
|
3694
|
+
"data-toggle": "popover",
|
3695
|
+
"data-trigger": "focus",
|
3696
|
+
"data-placement": "left",
|
3697
|
+
"data-content": "Enter the ZIP/Postal code for your credit card billing address."
|
3698
|
+
},
|
3699
|
+
/* @__PURE__ */ React13.createElement("i", { className: "fa fa-question-circle" })
|
3700
|
+
), /* @__PURE__ */ React13.createElement(
|
3701
|
+
"span",
|
3702
|
+
{
|
3703
|
+
id: "ZIPCode-error",
|
3704
|
+
style: { color: "red", display: "none" }
|
3705
|
+
},
|
3706
|
+
"This field is required"
|
3707
|
+
))), /* @__PURE__ */ React13.createElement("div", { className: "form-group top-amnt" }, /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement("label", null, "Payment amount"), /* @__PURE__ */ React13.createElement("div", { className: "amount-placeholder" }, /* @__PURE__ */ React13.createElement(
|
3708
|
+
"input",
|
3709
|
+
{
|
3710
|
+
id: "Amount",
|
3711
|
+
className: "form-control required",
|
3712
|
+
name: "amount",
|
3713
|
+
type: "text",
|
3714
|
+
placeholder: "",
|
3715
|
+
value: state.amount,
|
3716
|
+
onChange: (e) => handleAmount(e),
|
3717
|
+
onBlur: handleAmountBlur
|
3718
|
+
}
|
3719
|
+
))), /* @__PURE__ */ React13.createElement("div", { className: "card-row" }, /* @__PURE__ */ React13.createElement("span", { className: "visa" }), /* @__PURE__ */ React13.createElement("span", { className: "mastercard" }), /* @__PURE__ */ React13.createElement("span", { className: "amex" }), /* @__PURE__ */ React13.createElement("span", { className: "discover" }))), /* @__PURE__ */ React13.createElement(
|
3720
|
+
"button",
|
3721
|
+
{
|
3722
|
+
type: "button",
|
3723
|
+
id: "submitButton",
|
3724
|
+
onClick: () => handleSubmitPay(),
|
3725
|
+
className: "btn btn-block btn-success submit-button"
|
3726
|
+
},
|
3727
|
+
"Submit"
|
3728
|
+
)), /* @__PURE__ */ React13.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ React13.createElement(
|
3729
|
+
"svg",
|
3730
|
+
{
|
3731
|
+
xmlns: "http://www.w3.org/2000/svg",
|
3732
|
+
width: "20",
|
3733
|
+
height: "20",
|
3734
|
+
viewBox: "0 0 26 26"
|
3735
|
+
},
|
3736
|
+
/* @__PURE__ */ React13.createElement(
|
3737
|
+
"path",
|
3738
|
+
{
|
3739
|
+
fill: "currentColor",
|
3740
|
+
d: "M23.633 5.028a1.074 1.074 0 0 0-.777-.366c-2.295-.06-5.199-2.514-7.119-3.477C14.551.592 13.768.201 13.18.098a1.225 1.225 0 0 0-.36.001c-.588.103-1.371.494-2.556 1.087c-1.92.962-4.824 3.416-7.119 3.476a1.08 1.08 0 0 0-.778.366a1.167 1.167 0 0 0-.291.834c.493 10.023 4.088 16.226 10.396 19.831c.164.093.346.141.527.141s.363-.048.528-.141c6.308-3.605 9.902-9.808 10.396-19.831a1.161 1.161 0 0 0-.29-.834zM18.617 8.97l-5.323 7.855c-.191.282-.491.469-.788.469c-.298 0-.629-.163-.838-.372l-3.752-3.753a.656.656 0 0 1 0-.926l.927-.929a.658.658 0 0 1 .926 0l2.44 2.44l4.239-6.257a.657.657 0 0 1 .91-.173l1.085.736a.657.657 0 0 1 .174.91z"
|
3741
|
+
}
|
3742
|
+
)
|
3743
|
+
), "Secure payments powered by Fractal", /* @__PURE__ */ React13.createElement(
|
3744
|
+
"img",
|
3745
|
+
{
|
3746
|
+
src: "https://ui.fractalpay.com/favicon.ico",
|
3747
|
+
alt: "Fractal logo",
|
3748
|
+
className: "powered-logo"
|
3749
|
+
}
|
3750
|
+
)))))))
|
3751
|
+
));
|
3752
|
+
}
|
3753
|
+
|
3754
|
+
// src/app/components/Payment/GetPaymentDynamic.tsx
|
3755
|
+
import React15, { useEffect as useEffect4, useState as useState10 } from "react";
|
3756
|
+
import { Modal as Modal8 } from "react-bootstrap";
|
3757
|
+
|
3758
|
+
// src/app/components/Loader/MyLoadingAnimation.tsx
|
3759
|
+
import React14 from "react";
|
3760
|
+
function MyLoadingAnimation() {
|
3761
|
+
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(LoaderStyle_default, null), /* @__PURE__ */ React14.createElement("div", { className: "loading-animation" }, /* @__PURE__ */ React14.createElement("div", { className: "spinner" })));
|
3762
|
+
}
|
3763
|
+
|
3764
|
+
// src/app/components/Payment/GetPaymentDynamic.tsx
|
3765
|
+
function GetPaymentDynamic(props) {
|
3766
|
+
const { amount, fractalpayClientKey, orderID } = props;
|
3767
|
+
const [loading, setLoading] = useState10(false);
|
3768
|
+
const [show, setShow] = useState10(false);
|
3769
|
+
const [iframeLoaded, setIframeLoaded] = useState10(false);
|
3770
|
+
const [phoneNumber, setPhoneNumber] = useState10("");
|
3771
|
+
const [errorMessage, setErrorMessage] = useState10("");
|
3772
|
+
const [submitClicked, setSubmitClicked] = useState10(false);
|
3773
|
+
const [isValidNumber, setIsValidNumber] = useState10(true);
|
3774
|
+
const handleClose = () => {
|
3775
|
+
setIframeLoaded(false);
|
3776
|
+
setTimeout(() => {
|
3777
|
+
setShow(false);
|
3778
|
+
}, 1e3);
|
3779
|
+
};
|
3780
|
+
const handleShow = () => {
|
3781
|
+
if (fractalpayClientKey) {
|
3782
|
+
setShow(true);
|
3783
|
+
setIframeLoaded(true);
|
3784
|
+
} else {
|
3785
|
+
console.error("Fractalpay client key is missing or empty.");
|
3786
|
+
}
|
3787
|
+
};
|
3788
|
+
useEffect4(() => {
|
3789
|
+
if (!fractalpayClientKey) {
|
3790
|
+
console.error("Fractalpay client key is missing or empty.");
|
3791
|
+
}
|
3792
|
+
}, [fractalpayClientKey]);
|
3793
|
+
const handlePhoneNumberChange = (e) => {
|
3794
|
+
const number = e.target.value;
|
3795
|
+
const isValid = /^\d*$/.test(number);
|
3796
|
+
if (isValid) {
|
3797
|
+
setPhoneNumber(number);
|
3798
|
+
setIsValidNumber(number.length <= 10);
|
3799
|
+
if (number.length > 10) {
|
3800
|
+
setErrorMessage("Please enter a valid phone number (max 10 digits)");
|
3801
|
+
} else {
|
3802
|
+
setErrorMessage("");
|
3803
|
+
}
|
3804
|
+
} else {
|
3805
|
+
setErrorMessage("Please enter a valid phone number (numbers only)");
|
3806
|
+
}
|
3807
|
+
};
|
3808
|
+
const handleLoad = () => {
|
3809
|
+
setLoading(false);
|
3810
|
+
};
|
3811
|
+
useEffect4(() => {
|
3812
|
+
const messageListener = (event) => {
|
3813
|
+
var _a, _b;
|
3814
|
+
const response = (_b = (_a = event == null ? void 0 : event.data) == null ? void 0 : _a.other) == null ? void 0 : _b.data;
|
3815
|
+
if (response == null ? void 0 : response.result) {
|
3816
|
+
setTimeout(() => {
|
3817
|
+
handleClose();
|
3818
|
+
}, 5e3);
|
3819
|
+
}
|
3820
|
+
};
|
3821
|
+
window.addEventListener("message", messageListener);
|
3822
|
+
return () => {
|
3823
|
+
window.removeEventListener("message", messageListener);
|
3824
|
+
};
|
3825
|
+
}, []);
|
3826
|
+
return /* @__PURE__ */ React15.createElement("div", null, /* @__PURE__ */ React15.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Pay"), /* @__PURE__ */ React15.createElement(Modal8, { show: show && iframeLoaded, id: "modal-pay", className: "modal-lg", onHide: handleClose }, /* @__PURE__ */ React15.createElement(Modal8.Header, { closeButton: true }), /* @__PURE__ */ React15.createElement(Modal8.Body, null, loading && /* @__PURE__ */ React15.createElement(MyLoadingAnimation, null), /* @__PURE__ */ React15.createElement(
|
3827
|
+
"iframe",
|
3828
|
+
{
|
3829
|
+
src: `${baseUrl}widget-form/${amount}?fractalpay_public_key=${fractalpayClientKey}&order_id=${orderID}`,
|
3830
|
+
height: "auto",
|
3831
|
+
width: "100%",
|
3832
|
+
style: { display: loading ? "none" : "block" },
|
3833
|
+
onLoad: handleLoad
|
3834
|
+
}
|
3835
|
+
))));
|
3836
|
+
}
|
1659
3837
|
export {
|
3838
|
+
CompletedTransactions,
|
3839
|
+
GetPaymentDynamic,
|
3840
|
+
Payment,
|
1660
3841
|
RequestPayment,
|
1661
3842
|
RequestPaymentAllInput,
|
1662
3843
|
RequestPaymentDynamic,
|
1663
|
-
RequestPaymentonClick
|
3844
|
+
RequestPaymentonClick,
|
3845
|
+
RqstPaymntInputField,
|
3846
|
+
TockenizPay
|
1664
3847
|
};
|