@pinerohit11/testwidget 0.1.67 → 0.1.68

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.mjs CHANGED
@@ -907,2577 +907,237 @@ function RequestPayment(props) {
907
907
  )));
908
908
  }
909
909
 
910
- // src/app/components/RequestPayment/RequestPaymentAllInput.tsx
911
- import React7, { useState as useState2 } from "react";
912
- import { Modal } from "react-bootstrap";
913
- import { toast, ToastContainer } from "react-toastify";
914
- import "react-toastify/dist/ReactToastify.css";
915
- function RequestPaymentAllInput({ fractalpayClientKey }) {
916
- const [isLoading, setIsLoading] = useState2(false);
910
+ // src/app/components/RequestPayment/RequestPreAuthPayment.tsx
911
+ import "bootstrap/dist/js/bootstrap.bundle.min.js";
912
+ import React7, { useState as useState2, useEffect as useEffect2 } from "react";
913
+ import axios2 from "axios";
914
+ import { PatternFormat as PatternFormat2 } from "react-number-format";
915
+ function RequestPreAuthPayment(props) {
916
+ const fractalpayClientKey = props.fractalpayClientKey;
917
917
  const [show, setShow] = useState2(false);
918
- const [phoneNumber, setPhoneNumber] = useState2("");
919
- const [amount, setAmount] = useState2("");
920
- const [orderId, setOrderId] = useState2("");
921
- const [isValidNumber, setIsValidNumber] = useState2(true);
922
- const [isValidAmount, setIsValidAmount] = useState2(true);
923
- const [isValidOrderId, setIsValidOrderId] = useState2(true);
924
- const [errorMessagephone, setErrorMessagephone] = useState2("");
925
- const [errorMessageamount, setErrorMessageamount] = useState2("");
926
- const [errorMessageorderid, setErrorMessageorderid] = useState2("");
927
- const [submitClicked, setSubmitClicked] = useState2(false);
928
- const handleClose = () => setShow(false);
929
- const handleShow = () => setShow(true);
930
- const sendRequestPayment = () => {
931
- if (!phoneNumber) {
932
- setErrorMessagephone(ErrorText.phonenumberrequired);
933
- setSubmitClicked(true);
934
- return;
935
- }
936
- if (!/^\d{10}$/.test(phoneNumber)) {
937
- setErrorMessagephone(ErrorText.phonenumbervalid);
938
- setSubmitClicked(true);
939
- return;
940
- }
941
- if (!amount) {
942
- setErrorMessageamount(ErrorText.amountenter);
943
- setSubmitClicked(true);
944
- return;
945
- }
946
- if (isNaN(Number(amount))) {
947
- setErrorMessageamount(ErrorText.amountvalid);
948
- setSubmitClicked(true);
949
- return;
950
- }
951
- if (!orderId) {
952
- setErrorMessageorderid(ErrorText.orderidenter);
953
- setSubmitClicked(true);
954
- return;
955
- }
956
- setErrorMessagephone("");
957
- setErrorMessageamount("");
958
- setErrorMessageorderid("");
959
- setSubmitClicked(true);
960
- setIsLoading(true);
961
- let formData = {
962
- fractalpayPublicKey: fractalpayClientKey,
963
- amount,
964
- phone_number: phoneNumber,
965
- orderId,
966
- action: "request"
967
- };
968
- const jsonData = JSON.stringify(formData);
969
- fetch(`${baseUrl}create-widget-order`, {
970
- method: "POST",
971
- headers: {
972
- "Content-Type": "application/json"
973
- },
974
- body: jsonData
975
- }).then((response) => {
976
- setIsLoading(false);
977
- if (!response.ok) {
978
- throw new Error(ErrorText.networkresponseerror);
979
- }
980
- return response.json();
981
- }).then((data) => {
982
- if (data.result === true) {
983
- setShow(true);
984
- }
985
- console.log(data);
986
- }).catch((error) => {
987
- setIsLoading(false);
988
- console.error("Error:", error);
989
- toast.error(ErrorText.anerroroccured);
990
- });
991
- };
992
- const handlePhoneNumberChange = (e) => {
993
- const number = e.target.value;
994
- const isValid = /^\d*$/.test(number);
995
- if (isValid) {
996
- setPhoneNumber(number);
997
- setIsValidNumber(number.length <= 10);
998
- if (number.length > 10) {
999
- setErrorMessagephone(ErrorText.phonenumberlength);
1000
- } else {
1001
- setErrorMessagephone("");
1002
- }
1003
- } else {
1004
- setErrorMessagephone(ErrorText.phonenumbervalid);
1005
- }
1006
- };
1007
- const handleAmountChange = (e) => {
1008
- const amountValue = e.target.value;
1009
- if (!isNaN(Number(amountValue))) {
1010
- setAmount(amountValue);
1011
- setIsValidAmount(true);
1012
- setErrorMessageamount("");
1013
- } else {
1014
- setAmount("");
1015
- setIsValidAmount(false);
1016
- }
1017
- };
1018
- const handleOrderIdChange = (e) => {
1019
- const orderIdValue = e.target.value;
1020
- if (orderIdValue) {
1021
- setOrderId(orderIdValue);
1022
- setIsValidOrderId(true);
1023
- setErrorMessageorderid("");
1024
- } else {
1025
- setOrderId("");
1026
- setIsValidOrderId(false);
1027
- }
1028
- };
1029
- return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ React7.createElement("div", { className: " border-container" }, /* @__PURE__ */ React7.createElement("div", { className: "payment-column" }, /* @__PURE__ */ React7.createElement("label", null, "Enter Phone Number:"), /* @__PURE__ */ React7.createElement("div", { className: "input-container" }, /* @__PURE__ */ React7.createElement(
1030
- "input",
1031
- {
1032
- type: "text",
1033
- value: phoneNumber,
1034
- onChange: handlePhoneNumberChange,
1035
- placeholder: "Enter phone number",
1036
- maxLength: 10,
1037
- className: submitClicked && (!phoneNumber || !isValidNumber) ? "error" : ""
1038
- }
1039
- ), errorMessagephone && /* @__PURE__ */ React7.createElement("div", { className: "error-message text-danger" }, errorMessagephone))), /* @__PURE__ */ React7.createElement("div", { className: "payment-column" }, /* @__PURE__ */ React7.createElement("label", null, "Enter Amount:"), /* @__PURE__ */ React7.createElement("div", { className: "input-container" }, /* @__PURE__ */ React7.createElement(
1040
- "input",
1041
- {
1042
- type: "text",
1043
- value: amount,
1044
- onChange: handleAmountChange,
1045
- placeholder: "Enter amount",
1046
- className: submitClicked && (!amount || !isValidAmount) ? "error" : ""
1047
- }
1048
- ), errorMessageamount && /* @__PURE__ */ React7.createElement("div", { className: "error-message text-danger" }, errorMessageamount))), /* @__PURE__ */ React7.createElement("div", { className: "payment-column" }, /* @__PURE__ */ React7.createElement("label", null, "Enter Order ID:"), /* @__PURE__ */ React7.createElement("div", { className: "input-container" }, /* @__PURE__ */ React7.createElement(
1049
- "input",
1050
- {
1051
- type: "text",
1052
- value: orderId,
1053
- onChange: handleOrderIdChange,
1054
- placeholder: "Enter order ID",
1055
- className: submitClicked && (!orderId || !isValidOrderId) ? "error" : ""
1056
- }
1057
- ), errorMessageorderid && /* @__PURE__ */ React7.createElement("div", { className: "error-message text-danger" }, errorMessageorderid))), /* @__PURE__ */ React7.createElement(
1058
- "button",
1059
- {
1060
- onClick: sendRequestPayment,
1061
- disabled: isLoading || !isValidNumber || !isValidAmount || !isValidOrderId,
1062
- className: "paymentBtn"
1063
- },
1064
- isLoading ? "Loading..." : "Request Payment"
1065
- )), /* @__PURE__ */ React7.createElement(Modal, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ React7.createElement(Modal.Header, { closeButton: true }), /* @__PURE__ */ React7.createElement(Modal.Body, null, /* @__PURE__ */ React7.createElement(
1066
- "svg",
1067
- {
1068
- width: "60",
1069
- height: "60",
1070
- viewBox: "0 0 60 60",
1071
- fill: "none",
1072
- xmlns: "http://www.w3.org/2000/svg"
1073
- },
1074
- /* @__PURE__ */ React7.createElement(
1075
- "rect",
1076
- {
1077
- x: "0.5",
1078
- y: "0.5",
1079
- width: "59",
1080
- height: "59",
1081
- rx: "29.5",
1082
- stroke: "#31B379"
1083
- }
1084
- ),
1085
- /* @__PURE__ */ React7.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ React7.createElement(
1086
- "path",
1087
- {
1088
- 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",
1089
- fill: "#31B379"
1090
- }
1091
- )),
1092
- /* @__PURE__ */ React7.createElement("defs", null, /* @__PURE__ */ React7.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React7.createElement(
1093
- "rect",
1094
- {
1095
- width: "22",
1096
- height: "22",
1097
- fill: "white",
1098
- transform: "translate(19.5 19.0039)"
1099
- }
1100
- )))
1101
- ), /* @__PURE__ */ React7.createElement("h1", null, "Success!"), /* @__PURE__ */ React7.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ React7.createElement(Modal.Footer, null, /* @__PURE__ */ React7.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))), /* @__PURE__ */ React7.createElement(ToastContainer, null));
1102
- }
1103
-
1104
- // src/app/components/RequestPayment/RequestPaymentDynamic.tsx
1105
- import React8, { useState as useState3 } from "react";
1106
- import { Modal as Modal2 } from "react-bootstrap";
1107
-
1108
- // src/app/components/Api/createWidgetOrder.ts
1109
- var createWidgetOrder = (formData) => {
1110
- const jsonData = JSON.stringify(formData);
1111
- return fetch(`${baseUrl}create-widget-order`, {
1112
- method: "POST",
1113
- headers: {
1114
- "Content-Type": "application/json"
1115
- },
1116
- body: jsonData
1117
- }).then((response) => {
1118
- if (!response.ok) {
1119
- throw new Error(ErrorText.networkresponseerror);
1120
- }
1121
- return response.json();
1122
- }).then((data) => {
1123
- return data;
1124
- });
1125
- };
1126
-
1127
- // src/app/components/RequestPayment/RequestPaymentDynamic.tsx
1128
- function RequestPaymentDynamic({ fractalpayClientKey, amount, phone_number, orderID }) {
1129
- const [isLoading, setIsLoading] = useState3(false);
1130
- const [show, setShow] = useState3(false);
1131
- const handleClose = () => setShow(false);
1132
- const handleShow = () => setShow(true);
1133
- const sendRequestPayment = () => {
1134
- setIsLoading(true);
1135
- const formData = {
1136
- fractalpayPublicKey: fractalpayClientKey,
1137
- amount,
1138
- phone_number,
1139
- orderId: orderID,
1140
- action: "request"
1141
- };
1142
- createWidgetOrder(formData).then((data) => {
1143
- setIsLoading(false);
1144
- if (data.result === true) {
1145
- setShow(true);
1146
- }
1147
- console.log(data);
1148
- }).catch((error) => {
1149
- setIsLoading(false);
1150
- console.error("Error:", error);
1151
- });
1152
- };
1153
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
1154
- "button",
1155
- {
1156
- onClick: sendRequestPayment,
1157
- disabled: isLoading,
1158
- className: "paymentBtn"
1159
- },
1160
- isLoading ? "Loading..." : "Request Payment"
1161
- ), /* @__PURE__ */ React8.createElement(Modal2, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ React8.createElement(Modal2.Header, { closeButton: true }), /* @__PURE__ */ React8.createElement(Modal2.Body, null, /* @__PURE__ */ React8.createElement(
1162
- "svg",
1163
- {
1164
- width: "60",
1165
- height: "60",
1166
- viewBox: "0 0 60 60",
1167
- fill: "none",
1168
- xmlns: "http://www.w3.org/2000/svg"
1169
- },
1170
- /* @__PURE__ */ React8.createElement(
1171
- "rect",
1172
- {
1173
- x: "0.5",
1174
- y: "0.5",
1175
- width: "59",
1176
- height: "59",
1177
- rx: "29.5",
1178
- stroke: "#31B379"
1179
- }
1180
- ),
1181
- /* @__PURE__ */ React8.createElement("g", { "clip-path": "url(#clip0_2659_5018)" }, /* @__PURE__ */ React8.createElement(
1182
- "path",
1183
- {
1184
- 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",
1185
- fill: "#31B379"
1186
- }
1187
- )),
1188
- /* @__PURE__ */ React8.createElement("defs", null, /* @__PURE__ */ React8.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React8.createElement(
1189
- "rect",
1190
- {
1191
- width: "22",
1192
- height: "22",
1193
- fill: "white",
1194
- transform: "translate(19.5 19.0039)"
1195
- }
1196
- )))
1197
- ), /* @__PURE__ */ React8.createElement("h1", null, "Success!"), /* @__PURE__ */ React8.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ React8.createElement(Modal2.Footer, null, /* @__PURE__ */ React8.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))));
1198
- }
1199
-
1200
- // src/app/components/RequestPayment/RequestPaymentonClick.tsx
1201
- import React9, { useState as useState4 } from "react";
1202
- import { Modal as Modal3 } from "react-bootstrap";
1203
- function RequestPaymentonClick(props) {
1204
- const [isLoading, setIsLoading] = useState4(false);
1205
- const [show, setShow] = useState4(false);
1206
- const handleClose = () => setShow(false);
1207
- const handleShow = () => setShow(true);
1208
- const { fractalpayClientKey, amount, phone_number, orderID, onSuccess, onError } = props;
1209
- const sendRequestPayment = () => {
1210
- setIsLoading(true);
1211
- let formData = {
1212
- fractalpayPublicKey: fractalpayClientKey,
1213
- amount,
1214
- phone_number,
1215
- orderId: orderID,
1216
- action: "request"
1217
- };
1218
- const jsonData = JSON.stringify(formData);
1219
- fetch(`${baseUrl}create-widget-order`, {
1220
- method: "POST",
1221
- headers: {
1222
- "Content-Type": "application/json"
1223
- },
1224
- body: jsonData
1225
- }).then((response) => {
1226
- setIsLoading(false);
1227
- if (!response.ok) {
1228
- throw new Error(ErrorText.networkresponseerror);
1229
- }
1230
- return response.json();
1231
- }).then((data) => {
1232
- setShow(true);
1233
- console.log(data);
1234
- }).catch((error) => {
1235
- setIsLoading(false);
1236
- console.error("Error:", error);
1237
- });
1238
- };
1239
- return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ React9.createElement(
1240
- "button",
1241
- {
1242
- onClick: sendRequestPayment,
1243
- disabled: isLoading,
1244
- className: "paymentBtn"
1245
- },
1246
- isLoading ? "Loading..." : "Request Payment"
1247
- ), /* @__PURE__ */ React9.createElement(Modal3, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ React9.createElement(Modal3.Header, { closeButton: true }), /* @__PURE__ */ React9.createElement(Modal3.Body, null, onSuccess && /* @__PURE__ */ React9.createElement(
1248
- "svg",
1249
- {
1250
- width: "60",
1251
- height: "60",
1252
- viewBox: "0 0 60 60",
1253
- fill: "none",
1254
- xmlns: "http://www.w3.org/2000/svg"
1255
- },
1256
- /* @__PURE__ */ React9.createElement(
1257
- "rect",
1258
- {
1259
- x: "0.5",
1260
- y: "0.5",
1261
- width: "59",
1262
- height: "59",
1263
- rx: "29.5",
1264
- stroke: "#31B379"
1265
- }
1266
- ),
1267
- /* @__PURE__ */ React9.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ React9.createElement(
1268
- "path",
1269
- {
1270
- 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",
1271
- fill: "#31B379"
1272
- }
1273
- )),
1274
- /* @__PURE__ */ React9.createElement("defs", null, /* @__PURE__ */ React9.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React9.createElement(
1275
- "rect",
1276
- {
1277
- width: "22",
1278
- height: "22",
1279
- fill: "white",
1280
- transform: "translate(19.5 19.0039)"
1281
- }
1282
- )))
1283
- ), onSuccess ? /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("h1", null, "Success!"), /* @__PURE__ */ React9.createElement("h4", null, onSuccess)) : /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("h1", null, "Error!"), /* @__PURE__ */ React9.createElement("h4", null, onError))), /* @__PURE__ */ React9.createElement(Modal3.Footer, null, /* @__PURE__ */ React9.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))));
1284
- }
1285
-
1286
- // src/app/components/RequestPayment/RqstPaymntInputField.tsx
1287
- import React10, { useState as useState5 } from "react";
1288
- import { Modal as Modal4 } from "react-bootstrap";
1289
- import { toast as toast2, ToastContainer as ToastContainer2 } from "react-toastify";
1290
- import "react-toastify/dist/ReactToastify.css";
1291
- function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
1292
- const [isLoading, setIsLoading] = useState5(false);
1293
- const [show, setShow] = useState5(false);
1294
- const [phoneNumber, setPhoneNumber] = useState5("");
1295
- const [isValidNumber, setIsValidNumber] = useState5(true);
1296
- const [errorMessage, setErrorMessage] = useState5("");
1297
- const [submitClicked, setSubmitClicked] = useState5(false);
1298
- const handleClose = () => setShow(false);
1299
- const handleShow = () => setShow(true);
1300
- const sendRequestPayment = () => {
1301
- if (!phoneNumber) {
1302
- setErrorMessage(ErrorText.phonenumberrequired);
1303
- setSubmitClicked(true);
1304
- return;
1305
- }
1306
- if (!/^\d{10}$/.test(phoneNumber)) {
1307
- setErrorMessage(ErrorText.phonenumbervalid);
1308
- setSubmitClicked(true);
1309
- return;
1310
- }
1311
- setErrorMessage("");
1312
- setSubmitClicked(true);
1313
- setIsLoading(true);
1314
- let formData = {
1315
- fractalpayPublicKey: fractalpayClientKey,
1316
- amount,
1317
- phone_number: phoneNumber,
1318
- orderId: orderID,
1319
- action: "request"
1320
- };
1321
- const jsonData = JSON.stringify(formData);
1322
- fetch(`${baseUrl}create-widget-order`, {
1323
- method: "POST",
1324
- headers: {
1325
- "Content-Type": "application/json"
1326
- },
1327
- body: jsonData
1328
- }).then((response) => {
1329
- setIsLoading(false);
1330
- if (!response.ok) {
1331
- throw new Error(ErrorText.networkresponseerror);
1332
- }
1333
- return response.json();
1334
- }).then((data) => {
1335
- if (data.result === true) {
1336
- setShow(true);
1337
- }
1338
- console.log(data);
1339
- }).catch((error) => {
1340
- setIsLoading(false);
1341
- console.error("Error:", error);
1342
- toast2.error(ErrorText.anerroroccured);
1343
- });
1344
- };
1345
- const handlePhoneNumberChange = (e) => {
1346
- const number = e.target.value;
1347
- const isValid = /^\d*$/.test(number);
1348
- if (isValid) {
1349
- setPhoneNumber(number);
1350
- setIsValidNumber(number.length <= 10);
1351
- if (number.length > 10) {
1352
- setErrorMessage(ErrorText.phonenumberlength);
1353
- } else {
1354
- setErrorMessage("");
1355
- }
1356
- } else {
1357
- setErrorMessage(ErrorText.phonenumbervalid);
1358
- }
1359
- };
1360
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement("div", { className: "payment-container" }, /* @__PURE__ */ React10.createElement("div", { className: "input-wrapper" }, /* @__PURE__ */ React10.createElement("div", { className: "input-container" }, /* @__PURE__ */ React10.createElement(
1361
- "input",
1362
- {
1363
- type: "text",
1364
- value: phoneNumber,
1365
- onChange: handlePhoneNumberChange,
1366
- placeholder: "Enter phone number",
1367
- maxLength: 10,
1368
- className: submitClicked && (!phoneNumber || !isValidNumber) ? "error" : ""
1369
- }
1370
- ), errorMessage && /* @__PURE__ */ React10.createElement("div", { className: "error-message text-danger" }, errorMessage))), /* @__PURE__ */ React10.createElement("div", { className: "button-wrapper" }, /* @__PURE__ */ React10.createElement(
1371
- "button",
1372
- {
1373
- onClick: sendRequestPayment,
1374
- disabled: isLoading || !isValidNumber,
1375
- className: "paymentBtn"
1376
- },
1377
- isLoading ? "Loading..." : "Request Payment"
1378
- ))), /* @__PURE__ */ React10.createElement(Modal4, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ React10.createElement(Modal4.Header, { closeButton: true }), /* @__PURE__ */ React10.createElement(Modal4.Body, null, /* @__PURE__ */ React10.createElement(
1379
- "svg",
1380
- {
1381
- width: "60",
1382
- height: "60",
1383
- viewBox: "0 0 60 60",
1384
- fill: "none",
1385
- xmlns: "http://www.w3.org/2000/svg"
1386
- },
1387
- /* @__PURE__ */ React10.createElement(
1388
- "rect",
1389
- {
1390
- x: "0.5",
1391
- y: "0.5",
1392
- width: "59",
1393
- height: "59",
1394
- rx: "29.5",
1395
- stroke: "#31B379"
1396
- }
1397
- ),
1398
- /* @__PURE__ */ React10.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ React10.createElement(
1399
- "path",
1400
- {
1401
- 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",
1402
- fill: "#31B379"
1403
- }
1404
- )),
1405
- /* @__PURE__ */ React10.createElement("defs", null, /* @__PURE__ */ React10.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React10.createElement(
1406
- "rect",
1407
- {
1408
- width: "22",
1409
- height: "22",
1410
- fill: "white",
1411
- transform: "translate(19.5 19.0039)"
1412
- }
1413
- )))
1414
- ), /* @__PURE__ */ React10.createElement("h1", null, "Success!"), /* @__PURE__ */ React10.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ React10.createElement(Modal4.Footer, null, /* @__PURE__ */ React10.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))), /* @__PURE__ */ React10.createElement(ToastContainer2, null));
1415
- }
1416
-
1417
- // src/app/components/Payment/Payment.tsx
1418
- import React12, { useState as useState6 } from "react";
1419
- import forge from "node-forge";
1420
- import { toast as toast3 } from "react-toastify";
1421
- import { Modal as Modal5 } from "react-bootstrap";
1422
-
1423
- // src/app/components/Payment/Paymentstyles.tsx
1424
- import React11 from "react";
1425
- function Paymentstyles() {
1426
- return /* @__PURE__ */ React11.createElement("style", null, `
1427
- .paymentBtn {
1428
- background-color: black;
1429
- border: none;
1430
- color: white;
1431
- padding: 15px 32px;
1432
- text-align: center;
1433
- text-decoration: none;
1434
- display: inline-block;
1435
- font-size: 16px;
1436
- margin: 4px 2px;
1437
- cursor: pointer;
1438
- border-radius: 180px;
1439
- /* width: auto; */
1440
- }
1441
-
1442
- .modal-backdrop {
1443
- display: none !important;
1444
- }
1445
-
1446
- /* CSS for modal */
1447
- .modal {
1448
- /* display: none; */
1449
- position: fixed;
1450
- z-index: 5555;
1451
- left: 0;
1452
- top: 0;
1453
- width: 100%;
1454
- height: 100%;
1455
- overflow: auto;
1456
- background-color: rgba(0, 0, 0, 0.8);
1457
- }
1458
-
1459
- .input-container {
1460
- position: relative;
1461
- }
1462
-
1463
- .error {
1464
- /* border: 1px solid red; */
1465
- color: #ffe6e6;
1466
- /* light red background color */
1467
- }
1468
-
1469
- .form-group {
1470
- margin-bottom: 15px;
1471
- }
1472
-
1473
- .input-container input {
1474
- padding-right: 25px;
1475
- }
1476
-
1477
- .modal-header {
1478
- border-bottom: 0 !important;
1479
- padding-top: 0 !important;
1480
- }
1481
-
1482
- /* CSS for modal content */
1483
- .modal-content {
1484
- /* height: 90vh !important; */
1485
- height: auto;
1486
- /* padding: 20px; */
1487
- padding: 20px 2px !important;
1488
- /* background: #fff; */
1489
- border-radius: 20px !important;
1490
- position: relative;
1491
- width: 430px;
1492
- margin: 30px auto;
1493
- overflow: hidden !important;
1494
- }
1495
- .input-container {
1496
- display: flex;
1497
- align-items: baseline;
1498
- }
1499
-
1500
- .input-error-container {
1501
- flex: 1;
1502
- }
1503
-
1504
- .paymentBtn {
1505
- margin-left: 10px;
1506
- }
1507
-
1508
- .PayButton {
1509
- outline: 0 !important;
1510
- height: 46px;
1511
- font-size: 16px;
1512
- background-color: #161616 !important;
1513
- border: none;
1514
- display: block;
1515
- width: 100%;
1516
- border-radius: 180px;
1517
- margin: 10px 0;
1518
- }
1519
-
1520
- #PayButton:hover {
1521
- background-color: #61c699 !important;
1522
- }
1523
-
1524
- #PayButton:active {
1525
- background-color: #61c699 !important;
1526
- }
1527
-
1528
- #PayButton:disabled {
1529
- background: rgb(172, 44, 170) !important;
1530
- color: #fff !important;
1531
- }
1532
-
1533
- label {
1534
- color: rgba(53, 37, 77, 0.6);
1535
- margin-bottom: 2px;
1536
- text-transform: uppercase;
1537
- font-family: "IBM Plex Mono", monospace;
1538
- font-weight: 500;
1539
- font-size: 12px;
1540
- }
1541
-
1542
- .input-container {
1543
- position: relative;
1544
- }
1545
-
1546
- .input-container input {
1547
- padding-right: 25px;
1548
- }
1549
-
1550
- #Checkout {
1551
- /* z-index: 100001; */
1552
- width: 100%;
1553
- /* height: 100%; */
1554
- /* background: 0 0 #ffffff; */
1555
- border-radius: 24px;
1556
- border: 1px solid #e0dfe2;
1557
- display: block;
1558
- }
1559
-
1560
- .container {
1561
- margin-top: 10px;
1562
- }
1563
-
1564
- .powered-logo {
1565
- width: 18px;
1566
- height: 18px;
1567
- /* float: right; */
1568
- padding: 2px;
1569
- background: #000000;
1570
- border-radius: 4px;
1571
- /* margin-left: 5px; */
1572
- }
1573
-
1574
- .modal-content .container {
1575
- width: 100%;
1576
- }
1577
-
1578
- .powerd-by-part {
1579
- display: flex;
1580
- justify-content: center;
1581
- align-items: center;
1582
- gap: 5px;
1583
- }
1584
-
1585
- .errorText {
1586
- color: red;
1587
- }
1588
-
1589
- .input-group {
1590
- position: relative;
1591
- }
1592
-
1593
- .paynowbtn {
1594
- outline: 0 !important;
1595
- padding: 7px 25px !important;
1596
- font-size: 13px;
1597
- background-color: #161616 !important;
1598
- border: #161616 1px solid !important;
1599
- color: #fff !important;
1600
- display: inline-block !important;
1601
- border-radius: 180px !important;
1602
- }
1603
-
1604
- .paynowbtn:hover {
1605
- background-color: #fff !important;
1606
- border: #161616 1px solid !important;
1607
- color: #161616 !important;
1608
- }
1609
-
1610
- .ButtonGroup__root.btn-group {
1611
- margin: 10px 0 20px 0;
1612
- }
1613
-
1614
- .ButtonGroup__root.btn-group button {
1615
- background: #000;
1616
- border: 0;
1617
- margin: 0 5px;
1618
- border-radius: 4px !important;
1619
- }
1620
-
1621
- .ButtonGroup__root.btn-group button:hover,
1622
- .ButtonGroup__root.btn-group button:focus {
1623
- background: #333 !important;
1624
- }
1625
-
1626
- .input-group button {
1627
- background: #000;
1628
- border: 0;
1629
- margin: 0 5px;
1630
- border-radius: 0 4px 4px 0 !important;
1631
- }
1632
-
1633
- .input-group button:hover,
1634
- .input-group button:focus {
1635
- background: #333 !important;
1636
- }
1637
-
1638
- .payment-suc {
1639
- text-align: center;
1640
- }
1641
-
1642
- .payment-suc .modal-dialog {
1643
- min-width: 600px;
1644
- padding: 50px 0;
1645
- }
1646
-
1647
- .payment-suc h2 {
1648
- font-size: 24px;
1649
- color: #35254d;
1650
- font-weight: 500;
1651
- padding: 15px 0;
1652
- }
1653
-
1654
- .payment-suc p {
1655
- font-size: 14px;
1656
- color: #9a92a6;
1657
- font-weight: 500;
1658
- }
1659
-
1660
- .payment-suc .btn-close {
1661
- position: absolute;
1662
- right: 20px;
1663
- }
1664
-
1665
- .Checkout.container iframe {
1666
- width: 100%;
1667
- overflow: hidden !important;
1668
- }
1669
-
1670
- .responsive-tbl {
1671
- overflow-x: auto;
1672
- }
1673
-
1674
- body {
1675
- position: relative !important;
1676
- }
1677
-
1678
- thead,
1679
- tbody,
1680
- tfoot,
1681
- tr,
1682
- td,
1683
- th {
1684
- white-space: nowrap;
1685
- }
1686
-
1687
- .button-group {
1688
- display: flex;
1689
- gap: 10px;
1690
- }
1691
-
1692
- .rqstonClickbtn {
1693
- color: #fff;
1694
- background-color: #337ab7;
1695
- border-color: #2e6da4;
1696
- }
1697
-
1698
- .loading-animation {
1699
- position: absolute;
1700
- top: 50%;
1701
- left: 50%;
1702
- transform: translate(-50%, -50%);
1703
- }
1704
-
1705
- .spinner {
1706
- width: 40px;
1707
- height: 40px;
1708
- border-radius: 50%;
1709
- border: 4px solid #f3f3f3;
1710
- border-top: 4px solid black;
1711
- animation: spin 1s linear infinite;
1712
- }
1713
-
1714
- @keyframes spin {
1715
- 0% {
1716
- transform: rotate(0deg);
1717
- }
1718
-
1719
- 100% {
1720
- transform: rotate(360deg);
1721
- }
1722
- }
1723
-
1724
- /* .border-container {
1725
- display: flex;
1726
- flex-direction: column;
1727
- border: 0px solid #ccc;
1728
- padding: 20px;
1729
- border-radius: 10px;
1730
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
1731
- align-items: baseline;
1732
- }
1733
- .payment-container {
1734
- border: 0px solid #ccc;
1735
- padding: 20px;
1736
- border-radius: 10px;
1737
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
1738
- } */
1739
-
1740
- .payment-row {
1741
- display: flex;
1742
- align-items: center;
1743
- margin-bottom: 20px;
1744
- }
1745
-
1746
- .payment-row label {
1747
- width: 150px;
1748
- font-weight: bold;
1749
- margin-right: 10px;
1750
- }
1751
-
1752
- .payment-row input {
1753
- flex-grow: 1;
1754
- margin-right: 10px;
1755
- }
1756
-
1757
- .payment-row button {
1758
- flex-grow: 1;
1759
- }
1760
-
1761
- .payment-row {
1762
- display: flex;
1763
- flex-direction: column;
1764
- border-radius: 10px;
1765
- margin-top: 10px;
1766
- }
1767
-
1768
- .input-wrapper {
1769
- flex: 1;
1770
- }
1771
-
1772
- .button-wrapper {
1773
- margin-left: 10px;
1774
- }
1775
-
1776
- .input-container {
1777
- display: flex;
1778
- flex-direction: column;
1779
- }
1780
-
1781
- .export-btn {
1782
- background: black;
1783
- color: white;
1784
- height: 35px;
1785
- width: 68px;
1786
- border-radius: 5px;
1787
- margin-left: 14px;
1788
- }
1789
-
1790
- .payment-popup {
1791
- padding: 12px 20px;
1792
- background: #fff;
1793
- border-radius: 20px;
1794
- position: relative;
1795
- width: 100%;
1796
- margin: 0 auto;
1797
- }
1798
-
1799
- .modal-dialog {
1800
- max-width: 810px;
1801
- }
1802
-
1803
- .modal-content {
1804
- max-width: 100%;
1805
- /* margin-top: 5%; */
1806
- width: 100%;
1807
- margin: 0;
1808
- }
1809
-
1810
- @media (max-width: 460px) {
1811
- .payment-popup {
1812
- padding: 35px 25px;
1813
- width: 98%;
1814
- }
1815
- }
1816
-
1817
- .close-pop {
1818
- position: absolute;
1819
- right: 8px;
1820
- top: 8px;
1821
- border: 0;
1822
- padding: 0;
1823
- background: none !important;
1824
- }
1825
-
1826
- .copy-api {
1827
- overflow-y: auto;
1828
- scrollbar-width: inherit;
1829
- background: #f2f2f2;
1830
- color: rgb(33, 33, 33);
1831
- font-size: "12px";
1832
- border: 0;
1833
- border-radius: 4px;
1834
- width: 100%;
1835
- padding: 8px 15px;
1836
- position: relative;
1837
- }
1838
-
1839
- #style-3::-webkit-scrollbar-track {
1840
- -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
1841
- background-color: #f5f5f5;
1842
- }
1843
-
1844
- #style-3::-webkit-scrollbar {
1845
- height: 3px;
1846
- background-color: #f5f5f5;
1847
- }
1848
-
1849
- #style-3::-webkit-scrollbar-thumb {
1850
- cursor: pointer;
1851
- background-color: #333;
1852
- }
1853
-
1854
- .copy-code {
1855
- display: flex;
1856
- }
1857
-
1858
- .copy-code svg {
1859
- margin-right: 10px;
1860
- }
1861
-
1862
- .accordion.accordion-flush {
1863
- float: left;
1864
- width: 100%;
1865
- margin-bottom: 45px;
1866
- }
1867
-
1868
- .box {
1869
- width: 100%;
1870
- height: 200px;
1871
- /* background-color: #ddf6fc0e; */
1872
- /* color: #fff; */
1873
- text-align: center;
1874
- line-height: 200px;
1875
- /* Center content vertically */
1876
- font-size: 1.5rem;
1877
- }
1878
-
1879
- .amex {
1880
- background-image: url("/assests/amex.svg");
1881
- }
1882
-
1883
- .visa {
1884
- background-image: url("/assests/visa.svg");
1885
- }
1886
-
1887
- .mastercard {
1888
- background-image: url("/assests/mastercard.svg");
1889
- }
1890
-
1891
- .discover {
1892
- background-image: url("/assests/discover.svg");
1893
- }
1894
-
1895
- .expiry-date-group {
1896
- float: left;
1897
- width: 30%;
1898
- }
1899
-
1900
- .expiry-date-group input {
1901
- width: calc(100% + 1px);
1902
- border-top-right-radius: 0;
1903
- border-bottom-right-radius: 0;
1904
- }
1905
-
1906
- .expiry-date-group input:focus {
1907
- position: relative;
1908
- z-index: 10;
1909
-
1910
- }
1911
- .pay-tbl th{width: 24% !important;}
1912
- .pay-tbl th:last-child{width: 28% !important;}
1913
- .security-code-group {
1914
- float: right;
1915
- width: 40%;
1916
- position: relative;
1917
- }
1918
-
1919
- .security-code-group input {
1920
- border-top-left-radius: 0;
1921
- border-bottom-left-radius: 0;
1922
- }
1923
-
1924
- .zip-code-group {
1925
- clear: both;
1926
- }
1927
- .amnt input{max-width: 150px; margin-right:8px;}
1928
- .amnt p, .amnt form{margin-right:8px;}
1929
- #submitButton {
1930
- outline: 0 !important;
1931
- height: 46px;
1932
- font-size: 16px;
1933
- background-color: #161616 !important;
1934
- border: none;
1935
- display: block;
1936
- width: 100%;
1937
- color: white;
1938
- border-radius: 180px;
1939
- }
1940
-
1941
- #submitRequestButton {
1942
- outline: 0 !important;
1943
- height: 46px;
1944
- font-size: 16px;
1945
- background-color: #161616 !important;
1946
- border: none;
1947
- display: block;
1948
- width: 100%;
1949
- border-radius: 180px;
1950
- }
1951
-
1952
- #PayButton {
1953
- outline: 0 !important;
1954
- height: 46px;
1955
- font-size: 16px;
1956
- background-color: #161616 !important;
1957
- border: none;
1958
- display: block;
1959
- width: 100%;
1960
- border-radius: 180px;
1961
- margin: 2px;
1962
- }
1963
-
1964
- #PayButton:hover {
1965
- background-color: #61c699 !important;
1966
- }
1967
-
1968
- #PayButton:active {
1969
- background-color: #61c699 !important;
1970
- }
1971
-
1972
- #PayButton:disabled {
1973
- background: rgb(172, 44, 170) !important;
1974
- color: #fff !important;
1975
- }
1976
-
1977
- .form-control {
1978
- color: #35254d;
1979
- }
1980
-
1981
- .container {
1982
- margin-top: 10px;
1983
- }
1984
-
1985
- #Checkout {
1986
- z-index: 100001;
1987
- width: 100%;
1988
- height: 100%;
1989
- min-height: 100%;
1990
- background: 0 0 #ffffff;
1991
- border-radius: 24px;
1992
- border: 1px solid #e0dfe2;
1993
- margin-left: auto;
1994
- margin-right: auto;
1995
- display: block;
1996
- }
1997
-
1998
- #Checkout .header {
1999
- display: flex;
2000
- /* Enables Flexbox */
2001
- justify-content: center;
2002
- /* Centers content horizontally */
2003
- align-items: center;
2004
- /* Centers content vertically */
2005
- text-align: center;
2006
- padding: 8px;
2007
- border-bottom: 1px solid #dedede;
2008
- margin: 0 10px 20px 10px;
2009
- }
2010
-
2011
- #Checkout .header button {
2012
- border: 0;
2013
- background: none;
2014
- padding: 0;
2015
- }
2016
-
2017
- #Checkout h1 {
2018
- margin: 0;
2019
- flex: 1;
2020
- padding: 10px;
2021
- /* Allows the title to grow and fill the space for centering */
2022
- font-size: 23px;
2023
- font-weight: 500;
2024
- color: #35254d;
2025
- align-items: start;
2026
- display: flex;
2027
- }
2028
-
2029
- #Checkout>form {
2030
- margin: 0 25px 10px 25px;
2031
- }
2032
-
2033
- label {
2034
- color: rgba(53, 37, 77, 0.6);
2035
- margin-bottom: 2px;
2036
- text-transform: uppercase;
2037
- font-family: "IBM Plex Mono", monospace;
2038
- font-weight: 500;
2039
- font-size: 12px;
2040
- }
2041
-
2042
- .input-container {
2043
- position: relative;
2044
- }
2045
-
2046
- .input-container input {
2047
- padding-right: 25px;
2048
- }
2049
-
2050
- #zipcode {
2051
- text-transform: capitalize !important;
2052
- }
2053
-
2054
- #zipcode {
2055
- width: 18px;
2056
- position: absolute;
2057
- right: 8px;
2058
- top: 9px;
2059
- }
2060
-
2061
- #zipcode .zip-tip {
2062
- display: none;
2063
- background-color: rgb(0, 0, 0, 0.4);
2064
- padding: 5px 8px;
2065
- border-radius: 6px;
2066
- position: absolute;
2067
- right: 26px;
2068
- top: -9px;
2069
- font-size: 12.5px;
2070
- text-transform: capitalize !important;
2071
- color: #fff;
2072
- width: 240px;
2073
- line-height: 16px;
2074
- }
2075
-
2076
- #zipcode .zip-tip:before {
2077
- width: 0;
2078
- height: 0;
2079
- border-top: 7px solid transparent;
2080
- border-bottom: 7px solid transparent;
2081
- border-left: 7px solid #000;
2082
- opacity: 0.4;
2083
- position: absolute;
2084
- right: -7px;
2085
- top: 50%;
2086
- transform: translateY(-50%);
2087
- content: "";
2088
- }
2089
-
2090
- #zipcode:hover .zip-tip {
2091
- display: block;
2092
- }
2093
-
2094
- .input-container>i,
2095
- a[role="button"] {
2096
- color: #d3d3d3;
2097
- width: 25px;
2098
- height: 30px;
2099
- line-height: 30px;
2100
- font-size: 16px;
2101
- position: absolute;
2102
- top: 5px;
2103
- right: 6px;
2104
- cursor: pointer;
2105
- text-align: center;
2106
- }
2107
-
2108
- .input-container>i:hover,
2109
- a[role="button"]:hover {
2110
- color: #777;
2111
- }
2112
-
2113
- .amount-placeholder {
2114
- white-space: nowrap;
2115
- font-size: 44px;
2116
- /* height: 35px; */
2117
- font-weight: 600;
2118
- line-height: 40px;
2119
- }
2120
-
2121
- .amount-placeholder>button {
2122
- float: right;
2123
- width: 60px;
2124
- }
2125
-
2126
- .amount-placeholder>span {
2127
- line-height: 34px;
2128
- }
2129
-
2130
- .top-amnt {
2131
- display: flex;
2132
- margin-bottom: 10px;
2133
- align-items: center;
2134
- justify-content: space-between;
2135
- }
2136
-
2137
- .amtleft {
2138
- text-align: center;
2139
- }
2140
-
2141
- .amtleft span {
2142
- color: #35254d;
2143
- margin: 0 -5px;
2144
- }
2145
-
2146
- .card-row {
2147
- text-align: right;
2148
- margin: 22px 0 0 0;
2149
- max-width: 85px;
2150
- line-height: 20px;
2151
- }
2152
-
2153
- .yer {
2154
- border-radius: 0;
2155
- }
2156
-
2157
- .card-row span {
2158
- width: 33px;
2159
- height: 21px;
2160
- margin: 0 2px;
2161
- background-repeat: no-repeat;
2162
- display: inline-block;
2163
- background-size: contain;
2164
- }
2165
-
2166
- .card-image {
2167
- background-repeat: no-repeat;
2168
- padding-right: 50px;
2169
- background-position: right 2px center;
2170
- background-size: auto 90%;
2171
- }
2172
-
2173
- /* .cvc-preview-container {
2174
- overflow: hidden;
2175
- } */
2176
-
2177
- .cvc-preview-container {
2178
- /* overflow: hidden; */
2179
- position: absolute;
2180
- z-index: 9999;
2181
- right: -71px;
2182
- top: -54px;
2183
- width: 165px;
2184
- border-radius: 5px;
2185
- padding: 5px;
2186
- background-color: rgb(0, 0, 0, 0.3);
2187
- display: none;
2188
- }
2189
-
2190
- .cvc-preview-container:before {
2191
- position: absolute;
2192
- left: 50%;
2193
- transform: translate(-50%);
2194
- bottom: -5px;
2195
- width: 0;
2196
- height: 0;
2197
- border-left: 5px solid transparent;
2198
- border-right: 5px solid transparent;
2199
- border-top: 5px solid #000;
2200
- opacity: 0.3;
2201
- content: "";
2202
- }
2203
-
2204
- .security-code-group #cvc:hover .cvc-preview-container {
2205
- display: block;
2206
- }
2207
-
2208
- .cvc-preview-container.two-card div {
2209
- width: 50%;
2210
- height: 45px;
2211
- }
2212
-
2213
- .cvc-preview-container.two-card div.amex-cvc-preview {
2214
- float: right;
2215
- }
2216
-
2217
- .cvc-preview-container.two-card div.visa-mc-dis-cvc-preview {
2218
- float: left;
2219
- }
2220
-
2221
- /* .cvc-preview-container div {
2222
- height: 160px;
2223
- } */
2224
-
2225
- .amex-cvc-preview {
2226
- 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/SBtq3TiFifzpggh3xCxRumzI93DWhm220VH3gKau3RhyveojHeZserkgAtP8rnjpMvJ8lZdqu9JBHYSSf9WeXm7c1JV+w1avSjd98MTp1nHVvl5q+I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R+N35gWf8Yoc6thZfgTDXPemanWRuGyt/V1jf5mxs7TzfiJt7O7ljFSjY0Rw0pk2OgPERvjrEkL46xJCCIVJCKEwCaEwCSEUJiEUJiGEwiSEwiSEUJiEUJisBEIoTEIIhUkIhUkIoTAJoTAJIRQmIX9tYR649YAVQUgUAU36sHQDK4OQ6AGa9G0+ffH/WBmERA/QpG/ZZ59nsTIIiR6gSV/Spp2bd164xgohJAqAFqFJ3+wN29su3LFXpF//jRVDyJ8INAgtQpM+/PkVehILGXvtQkwIyWFR+rUHDUKLPvU3c2NqpaSUnf+zYPtese3cj8Yt8AghkQdag+agPWgQWvTpf7OSU1/xn/jvOZtS5Q7GySfOibSLN+RehtiTgRASGaApaAsag9agOWgPGvSZ/makpFTwGxxK2pT6bxgTQnIWaA2ag/Z8wf5mJW9tNGfjjmX+L13w8yApJfUfhJAIAU35tQWNQWsmDf4HqpjHZRJqxUwAAAAASUVORK5CYII=") center center/contain no-repeat;
2227
- }
2228
-
2229
- .visa-mc-dis-cvc-preview {
2230
- 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+fW5Afm9Bi3pHjHtIkH9KmIZOmYdPnIlQnYpRo5BUppJVqJRWqpZXq5dYrJdYrZhZuaNfvaZhvqdiwKljwapjxK1lybFnyrJoy7NozrVm1Ltq171u2L5v2b9s2b9t2sBt3cNy3zEx3zIx38Rz4MVz4cZ04kI552NI6GVJ6Mx36s5368957dF674xb79J78NN78dV78tV789Z99Nd99dh+9rZv9th+9tl+99l/+duA+sx5+sx6+t2B+92B/N6B/d+C/uCD////AikOogAAAB90Uk5TACQkJSU9PT4+Q0NERJqav7/AwNjY4uLi4u7u8/P6+u6knPAAAAJkSURBVHja7d3pTxNBGMfxQbwAW06Pcj0tntQT8b7v+0JFxaserQcuKlQUFbFUaqvjH+1uG0lMfEETie4z39+bJ/tik/1kjt3MbDLGBFkWbeu0CtPZFq03v7KwxSpO04KKcmm7VZ32xeW2VK70nUF7tlj1afJnH+tA6k3UBWbUrHKBudJ0u8DsNtaJwIQJEyZMmDBhwoQJEyZMmPPCFCcCEyZMmDBhwoQJEyZMmDBhwoQJEyZMmDBhwoQJ010m+5swYcKECRMmTJgwYcKECRMmTJgwYcIMFfPHP8/vz5PLjnpzzmg2F07mxIhXVUYmwsjMVan0nbkQMrOeN1aY+zAsjHleNoRMf1x+rWa6KfjjM4RMvxdWN63+4QaYMGHC/EvM6b0HgpI6tvtoyq9vz+4/clcf89sJ2eiXIZGEyJD9sEl6RAa1MVPbpczsk8vT52SHHZCDUxelXxtzW/x4wPx+6cxn+0A2208PX9pB2aONef7xk3JrBjkth4Jysnf9fX1T0Czzmqx+6pcvcel/pJd5RRLXg1p6d0vWvdHKHJCeG2XljLVb5aZS5r2E3A6uTiUu2Km1klLK3CXxZDK5xd6RNYd3St+MTuaryr94G6y92iuy77X+b9rSi/d8usOEyZIXC5gsR7O5MN9bRexvwoQJEyZMmDBhwoQJEyZMmDBhwoT5vzNLLihLJu8CM2+6XGB2meUuMFeYyEf9ysmIqcsUtSuLmQZjGp8pdxafNxtjamIZ1f12MhOrDQ6uXhRLD4/nVb4/S/nx4XRsSeUY8prGtOI0186eKl8Xae3QSOxojTSUgT8BEvkXyqDHONgAAAAASUVORK5CYII=") center center/contain no-repeat;
2231
- }
2232
-
2233
- .submit-button-lock {
2234
- height: 15px;
2235
- margin-top: -2px;
2236
- margin-right: 7px;
2237
- vertical-align: middle;
2238
- 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+b2DI9kciWiLBmj34RswQISkAd0oAo0gS4wAixgDRyAM3AD3iAAhIBIEAOWAy5IAmlABLJBPtgACkEx2AF2g2pwANSBetAEToI2cAZcBFfADXALDIBHQAqGwUswAd6BaQiC8BAVokGqkBakD5lC1hAbWgh5Q0FQOBQDxUOJkBCSQPnQJqgYKoOqo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OHS0/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;
2239
- width: 14px;
2240
- display: inline-block;
2241
- }
2242
-
2243
- .align-middle {
2244
- vertical-align: middle;
2245
- }
2246
-
2247
- input {
2248
- box-shadow: none !important;
2249
- }
2250
-
2251
- .powerd-by-part {
2252
- display: flex;
2253
- font-size: 12px;
2254
- text-align: center;
2255
- align-items: center;
2256
- justify-content: center;
2257
- margin: 5px 0 20px 0;
2258
- }
2259
-
2260
- .powered-logo {
2261
- width: 18px;
2262
- height: auto;
2263
- float: right;
2264
- padding: 2px;
2265
- background: #000000;
2266
- border-radius: 4px;
2267
- margin-left: 5px;
2268
- }
2269
-
2270
- .comp-name {
2271
- display: block;
2272
- margin-bottom: 8px;
2273
- }
2274
-
2275
- .client-logo {
2276
- max-width: 140px;
2277
- display: block;
2278
- margin: auto;
2279
- padding: 5px;
2280
- }
2281
-
2282
- #qrCode {
2283
- text-align: center;
2284
- }
2285
-
2286
- #qrIcon {
2287
- cursor: pointer;
2288
- border: 1px solid rgb(252, 252, 252);
2289
- padding: 10px;
2290
- border-radius: 5px;
2291
- background: #ffffff;
2292
- }
2293
-
2294
- #target {
2295
- display: none;
2296
- text-align: center;
2297
- transition: all 5s;
2298
- padding: 5px;
2299
- transition: max-height 0.5s, overflow 0.5s 0.5s;
2300
- }
2301
-
2302
- /* input:focus {
2303
- border-color: #acc6db !important;
2304
- background-color: #acc6db !important;
2305
- } */
2306
-
2307
- @media(min-width:725px) {
2308
- .pay-main{margin: 0 auto !important;}
2309
- #modal-pay iframe{
2310
- max-height: 548px;
2311
- min-height: 548px;
2312
- }
2313
- .get-pay-pgs #modal-pay iframe{
2314
- max-height: 500px !important;
2315
- min-height: 500px !important;
2316
- }
2317
- #modal-pay .modal-header{
2318
- position: absolute;
2319
- right: 5px;
2320
- top: 15px;
2321
- z-index: 4;
2322
- }
2323
- /* #modal-pay .modal-body{
2324
- padding: 0 !important;
2325
- } */
2326
- }
2327
- @media(max-width:724px) {
2328
- #modal-pay iframe{
2329
- min-height: 708px !important;
2330
- }
2331
- #modal-pay iframe .modal-body{
2332
- padding:0 !important;
2333
- }
2334
- }
2335
- #modal-pay .modal-body{padding: 0;}
2336
- /* #modal-pay .modal-content{padding: 0 !important;} */
2337
- .pre-auth-pop .modal-header{position: relative; z-index: 4;}
2338
- .pre-auth-pop iframe{
2339
- margin-top: -60px;
2340
- }
2341
-
2342
- .form-control {
2343
- padding: .320rem .75rem !important;
2344
-
2345
- }
2346
- `);
2347
- }
2348
-
2349
- // src/app/components/Payment/Payment.tsx
2350
- function Payment() {
2351
- var _a;
2352
- const [state, setState] = useState6({
2353
- show: false,
2354
- publicKey: "",
2355
- sessionKey: "",
2356
- cardNumber: "",
2357
- year: "",
2358
- month: "",
2359
- cvv: "",
2360
- zip: "",
2361
- amount: ""
2362
- });
2363
- const [isValid, setIsValid] = useState6(false);
2364
- const [isValidMonth, setIsValidMonth] = useState6(false);
2365
- const [data, setData] = useState6(null);
2366
- const handlePaymentClick = async () => {
2367
- try {
2368
- const response = await fetch(`${baseUrl}generate-session`, {
2369
- method: "POST",
2370
- headers: {
2371
- "Content-Type": "application/json"
2372
- },
2373
- body: JSON.stringify({})
2374
- });
2375
- if (!response.ok) {
2376
- throw new Error("Network response was not ok");
2377
- }
2378
- const data2 = await response.json();
2379
- if (data2 && data2.result === true) {
2380
- setState((prev) => {
2381
- var _a2, _b;
2382
- return __spreadProps(__spreadValues({}, prev), {
2383
- show: true,
2384
- publicKey: (_a2 = data2 == null ? void 0 : data2.data) == null ? void 0 : _a2.publicKeyPem,
2385
- sessionKey: (_b = data2 == null ? void 0 : data2.data) == null ? void 0 : _b.session_key
2386
- });
2387
- });
2388
- }
2389
- } catch (error) {
2390
- console.log(error);
2391
- }
2392
- };
2393
- const handleSubmitPay = async () => {
2394
- const track2_data = `${state.cardNumber.replace(/\s+/g, "")}=${state.year}${state.month.length > 1 ? state.month : "0" + state.month} ${state.cvv}`;
2395
- const publicKey = forge.pki.publicKeyFromPem(state.publicKey);
2396
- const encrypted = publicKey.encrypt(track2_data, "RSA-OAEP", {
2397
- md: forge.md.sha1.create(),
2398
- mgf1: { md: forge.md.sha1.create() }
2399
- });
2400
- const encryptedBase64 = forge.util.encode64(encrypted);
2401
- console.log(encryptedBase64);
2402
- const requestBody = {
2403
- enc_track2_data: encryptedBase64,
2404
- session_key: state.sessionKey,
2405
- algorithm: "RSAES_OAEP_SHA_1"
2406
- };
2407
- const apiUrl = "https://m1ao5pku8b.execute-api.us-east-2.amazonaws.com/prod/tokenizer/tokenize";
2408
- try {
2409
- const response = await fetch(apiUrl, {
2410
- method: "POST",
2411
- headers: {
2412
- "x-app-session-key": state == null ? void 0 : state.sessionKey,
2413
- "Content-Type": "application/json"
2414
- },
2415
- body: JSON.stringify(requestBody)
2416
- });
2417
- if (response.ok) {
2418
- toast3.success("Payment Successful");
2419
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
2420
- show: false,
2421
- publicKey: "",
2422
- sessionKey: "",
2423
- cardNumber: "",
2424
- year: "",
2425
- month: "",
2426
- cvv: "",
2427
- zip: "",
2428
- amount: ""
2429
- }));
2430
- }
2431
- const responseData = await response.json();
2432
- console.log("response", responseData);
2433
- } catch (error) {
2434
- console.error("Error:", error);
2435
- }
2436
- };
2437
- const handleCardNumberChange = (e) => {
2438
- e.preventDefault();
2439
- const { value } = e.target;
2440
- const formattedValue = value.replace(/\D+/g, "").replace(/(.{4})/g, "$1 ").trim();
2441
- if (value.match(/[a-zA-Z]/)) {
2442
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
2443
- cardNumber: formattedValue,
2444
- error: "Invalid input. Please enter only numbers."
2445
- }));
2446
- } else {
2447
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
2448
- cardNumber: formattedValue,
2449
- error: null
2450
- }));
2451
- }
2452
- };
2453
- const handleMonthChange = (e) => {
2454
- setIsValid(false);
2455
- let value = e.target.value;
2456
- if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 1 && parseInt(value, 10) <= 12)) {
2457
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
2458
- month: value
2459
- }));
2460
- setIsValidMonth(false);
2461
- } else {
2462
- setIsValidMonth(true);
2463
- }
2464
- };
2465
- const handleYearChange = (e) => {
2466
- setIsValid(false);
2467
- setIsValidMonth(false);
2468
- let value = e.target.value;
2469
- if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 0 && parseInt(value, 10) <= 99)) {
2470
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
2471
- year: value
2472
- }));
2473
- }
2474
- };
2475
- const handleCVVChange = (e) => {
2476
- setIsValid(false);
2477
- setIsValidMonth(false);
2478
- let value = e.target.value;
2479
- if (/^\d{0,4}$/.test(value)) {
2480
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
2481
- cvv: value
2482
- }));
2483
- }
2484
- };
2485
- const handleZIP = (e) => {
2486
- setIsValid(false);
2487
- setIsValidMonth(false);
2488
- let value = e.target.value;
2489
- if (/^\d{0,7}$/.test(value)) {
2490
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
2491
- zip: value
2492
- }));
2493
- }
2494
- };
2495
- const handleAmount = (e) => {
2496
- setIsValid(false);
2497
- setIsValidMonth(false);
2498
- let value = e.target.value;
2499
- value = value.replace(/[^0-9.]/g, "");
2500
- let parts = value.split(".");
2501
- if (parts.length > 2) {
2502
- parts = [parts.shift(), parts.join(".")];
2503
- value = parts.join("");
2504
- }
2505
- if (parts.length === 2 && parts[1].length > 2) {
2506
- value = `${parts[0]}.${parts[1].slice(0, 2)}`;
2507
- }
2508
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
2509
- amount: value
2510
- }));
2511
- };
2512
- const handleAmountBlur = () => {
2513
- const value = state.amount;
2514
- if (value && !value.includes(".")) {
2515
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
2516
- amount: `${value}.00`
2517
- }));
2518
- }
2519
- };
2520
- function amountFormat(amt) {
2521
- if (amt) {
2522
- return `${parseFloat(amt).toLocaleString("en-US", {
2523
- minimumFractionDigits: 2,
2524
- maximumFractionDigits: 2
2525
- })}`;
2526
- }
2527
- return "";
2528
- }
2529
- return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Paymentstyles, null), /* @__PURE__ */ React12.createElement("div", { className: "" }, /* @__PURE__ */ React12.createElement(
2530
- "button",
2531
- {
2532
- className: "export-btn",
2533
- style: { width: "83px" },
2534
- onClick: () => handlePaymentClick()
2535
- },
2536
- "Payment"
2537
- ), /* @__PURE__ */ React12.createElement(
2538
- Modal5,
2539
- {
2540
- show: state.show,
2541
- onHide: () => setState((prev) => __spreadProps(__spreadValues({}, prev), {
2542
- show: false
2543
- })),
2544
- centered: true
2545
- },
2546
- /* @__PURE__ */ React12.createElement(Modal5.Header, { closeButton: true }),
2547
- /* @__PURE__ */ React12.createElement(Modal5.Body, null, /* @__PURE__ */ React12.createElement("div", { className: "payment-popup" }, /* @__PURE__ */ React12.createElement("div", { className: "row" }, /* @__PURE__ */ React12.createElement("div", { className: "" }, /* @__PURE__ */ React12.createElement("div", { id: "Checkout", className: "inline" }, /* @__PURE__ */ React12.createElement("div", { className: "header" }, /* @__PURE__ */ React12.createElement("h1", null, "Pay")), /* @__PURE__ */ React12.createElement("form", { id: "PaymentForm", className: "payment-form" }, /* @__PURE__ */ React12.createElement("div", { className: "form-group", style: { display: "none" } }, /* @__PURE__ */ React12.createElement("label", null, "Payment amount"), /* @__PURE__ */ React12.createElement("div", { className: "input-group" }, /* @__PURE__ */ React12.createElement("span", { className: "input-group-addon" }, "$"), /* @__PURE__ */ React12.createElement(
2548
- "input",
2549
- {
2550
- type: "text",
2551
- name: "amount",
2552
- value: "1",
2553
- className: "form-control",
2554
- id: ""
2555
- }
2556
- )), /* @__PURE__ */ React12.createElement(
2557
- "span",
2558
- {
2559
- id: "amount-error",
2560
- style: { color: "red", display: "none" }
2561
- }
2562
- )), /* @__PURE__ */ React12.createElement("div", { className: "form-group" }, /* @__PURE__ */ React12.createElement("label", null, "Name on card"), /* @__PURE__ */ React12.createElement(
2563
- "input",
2564
- {
2565
- id: "NameOnCard",
2566
- className: "form-control required",
2567
- type: "text",
2568
- maxLength: 100,
2569
- placeholder: "Name"
2570
- }
2571
- ), /* @__PURE__ */ React12.createElement(
2572
- "span",
2573
- {
2574
- id: "NameOnCard-error",
2575
- style: { color: "red", display: "none" }
2576
- }
2577
- )), /* @__PURE__ */ React12.createElement("div", { className: "form-group" }, /* @__PURE__ */ React12.createElement(
2578
- "input",
2579
- {
2580
- "data-token": "card_number",
2581
- className: "null card-image form-control required",
2582
- type: "text",
2583
- maxLength: 19,
2584
- value: state.cardNumber,
2585
- placeholder: "0000 0000 0000 0000",
2586
- onChange: handleCardNumberChange
2587
- }
2588
- ), state.error && /* @__PURE__ */ React12.createElement("div", { style: { color: "red" } }, state.error)), /* @__PURE__ */ React12.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React12.createElement(
2589
- "input",
2590
- {
2591
- "data-token": "exp_month",
2592
- className: "form-control required",
2593
- type: "text",
2594
- placeholder: "MM",
2595
- value: state.month,
2596
- maxLength: 2,
2597
- onChange: (e) => handleMonthChange(e)
2598
- }
2599
- ), isValidMonth && /* @__PURE__ */ React12.createElement(
2600
- "span",
2601
- {
2602
- id: "card_number-error",
2603
- style: { color: "red", fontSize: "15px" }
2604
- },
2605
- (_a = ErrorText) == null ? void 0 : _a.montherror
2606
- )), /* @__PURE__ */ React12.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React12.createElement(
2607
- "input",
2608
- {
2609
- "data-token": "exp_year",
2610
- className: "form-control required",
2611
- type: "text",
2612
- placeholder: "YY",
2613
- maxLength: 2,
2614
- value: state.year,
2615
- onChange: (e) => handleYearChange(e)
2616
- }
2617
- ), state.yearError && /* @__PURE__ */ React12.createElement("span", { id: "exp_year-error", style: { color: "red" } }, state.yearError)), /* @__PURE__ */ React12.createElement("div", { className: "security-code-group form-group" }, /* @__PURE__ */ React12.createElement("div", { className: "input-container" }, /* @__PURE__ */ React12.createElement(
2618
- "input",
2619
- {
2620
- "data-token": "cvv",
2621
- className: "form-control required",
2622
- type: "text",
2623
- maxLength: 4,
2624
- value: state.cvv,
2625
- placeholder: "CVV",
2626
- onChange: (e) => handleCVVChange(e)
2627
- }
2628
- ), /* @__PURE__ */ React12.createElement("i", { id: "cvc", className: "fa fa-question-circle" }), state.cvvError && /* @__PURE__ */ React12.createElement("span", { id: "cvv-error", style: { color: "red" } }, state.cvvError)), /* @__PURE__ */ React12.createElement("div", { className: "cvc-preview-container two-card hide" }, /* @__PURE__ */ React12.createElement("div", { className: "amex-cvc-preview" }), /* @__PURE__ */ React12.createElement("div", { className: "visa-mc-dis-cvc-preview" }))), /* @__PURE__ */ React12.createElement("div", { className: "zip-code-group form-group" }, /* @__PURE__ */ React12.createElement("label", null, "Postal code"), /* @__PURE__ */ React12.createElement("div", { className: "input-container" }, /* @__PURE__ */ React12.createElement(
2629
- "input",
2630
- {
2631
- id: "ZIPCode",
2632
- className: "form-control required",
2633
- name: "zip",
2634
- type: "text",
2635
- maxLength: 7,
2636
- placeholder: "000000",
2637
- value: state.zip,
2638
- onChange: (e) => handleZIP(e)
2639
- }
2640
- ), /* @__PURE__ */ React12.createElement(
2641
- "a",
2642
- {
2643
- tabIndex: 0,
2644
- role: "button",
2645
- "data-toggle": "popover",
2646
- "data-trigger": "focus",
2647
- "data-placement": "left",
2648
- "data-content": "Enter the ZIP/Postal code for your credit card billing address."
2649
- },
2650
- /* @__PURE__ */ React12.createElement("i", { className: "fa fa-question-circle" })
2651
- ), /* @__PURE__ */ React12.createElement(
2652
- "span",
2653
- {
2654
- id: "ZIPCode-error",
2655
- style: { color: "red", display: "none" }
2656
- },
2657
- ErrorText.fieldrequired
2658
- ))), /* @__PURE__ */ React12.createElement("div", { className: "form-group top-amnt" }, /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement("label", null, "Payment amount"), /* @__PURE__ */ React12.createElement("div", { className: "amount-placeholder" }, /* @__PURE__ */ React12.createElement(
2659
- "input",
2660
- {
2661
- id: "Amount",
2662
- className: "form-control required",
2663
- name: "amount",
2664
- type: "text",
2665
- placeholder: "",
2666
- value: state.amount,
2667
- onChange: (e) => handleAmount(e),
2668
- onBlur: handleAmountBlur
2669
- }
2670
- ))), /* @__PURE__ */ React12.createElement("div", { className: "card-row" }, /* @__PURE__ */ React12.createElement("span", { className: "visa" }), /* @__PURE__ */ React12.createElement("span", { className: "mastercard" }), /* @__PURE__ */ React12.createElement("span", { className: "amex" }), /* @__PURE__ */ React12.createElement("span", { className: "discover" }))), /* @__PURE__ */ React12.createElement(
2671
- "button",
2672
- {
2673
- type: "button",
2674
- id: "submitButton",
2675
- onClick: () => handleSubmitPay(),
2676
- className: "btn btn-block btn-success submit-button"
2677
- },
2678
- "Pay"
2679
- )), /* @__PURE__ */ React12.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ React12.createElement(
2680
- "svg",
2681
- {
2682
- xmlns: "http://www.w3.org/2000/svg",
2683
- width: "20",
2684
- height: "20",
2685
- viewBox: "0 0 26 26"
2686
- },
2687
- /* @__PURE__ */ React12.createElement(
2688
- "path",
2689
- {
2690
- fill: "currentColor",
2691
- 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"
2692
- }
2693
- )
2694
- ), "Secure payments powered by Fractal", /* @__PURE__ */ React12.createElement(
2695
- "img",
2696
- {
2697
- src: "https://ui.fractalpay.com/favicon.ico",
2698
- alt: "Fractal logo",
2699
- className: "powered-logo"
2700
- }
2701
- )))))))
2702
- )));
2703
- }
2704
-
2705
- // src/app/components/Transaction/CompletedTransactions.tsx
2706
- import React14, { useEffect as useEffect3, useState as useState8 } from "react";
2707
- import { Col, Row, Table } from "react-bootstrap";
2708
- import {
2709
- DatatableWrapper,
2710
- Filter,
2711
- PaginationOptions,
2712
- TableBody,
2713
- TableHeader
2714
- } from "react-bs-datatable";
2715
- import DatePicker from "react-datepicker";
2716
- import "react-datepicker/dist/react-datepicker.css";
2717
- import { toast as toast4 } from "react-toastify";
2718
-
2719
- // src/app/components/Pagination/Pagination.tsx
2720
- import React13, { useState as useState7, useEffect as useEffect2 } from "react";
2721
- function PaginationPg({ totalPages, onPageChange, current }) {
2722
- const [currentPage, setCurrentPage] = useState7(current);
2723
- const [showPages, setShowPages] = useState7(false);
2724
- useEffect2(() => {
2725
- setCurrentPage(current);
2726
- }, [current]);
2727
- useEffect2(() => {
2728
- setTimeout(() => {
2729
- setShowPages(true);
2730
- }, 1e3);
2731
- }, []);
2732
- const handlePrevious = (e) => {
2733
- e.preventDefault();
2734
- if (currentPage > 1) {
2735
- const newPage = currentPage - 1;
2736
- setCurrentPage(newPage);
2737
- onPageChange(newPage);
2738
- }
2739
- };
2740
- const handleNext = (e) => {
2741
- e.preventDefault();
2742
- if (currentPage < totalPages) {
2743
- const newPage = currentPage + 1;
2744
- setCurrentPage(newPage);
2745
- onPageChange(newPage);
2746
- }
2747
- };
2748
- const handlePageClick = (e, pageNumber) => {
2749
- e.preventDefault();
2750
- setCurrentPage(pageNumber);
2751
- onPageChange(pageNumber);
2752
- };
2753
- const getPageNumbers = () => {
2754
- const pageNumbers = [];
2755
- if (totalPages <= 5) {
2756
- for (let i = 1; i <= totalPages; i++) {
2757
- pageNumbers.push(renderPageNumber(i));
2758
- }
2759
- } else {
2760
- if (currentPage > 3) {
2761
- pageNumbers.push(renderPageNumber(1));
2762
- if (currentPage > 4) {
2763
- pageNumbers.push(/* @__PURE__ */ React13.createElement("li", { key: "start-break", className: "page-item disabled" }, /* @__PURE__ */ React13.createElement("span", { className: "page-link" }, "...")));
2764
- }
2765
- }
2766
- const startPage = Math.max(currentPage - 1, 1);
2767
- const endPage = Math.min(startPage + 2, totalPages);
2768
- for (let i = startPage; i <= endPage; i++) {
2769
- pageNumbers.push(renderPageNumber(i));
2770
- }
2771
- if (currentPage < totalPages - 2) {
2772
- if (currentPage < totalPages - 3) {
2773
- pageNumbers.push(/* @__PURE__ */ React13.createElement("li", { key: "end-break", className: "page-item disabled" }, /* @__PURE__ */ React13.createElement("span", { className: "page-link" }, "...")));
2774
- }
2775
- pageNumbers.push(renderPageNumber(totalPages));
2776
- }
2777
- }
2778
- return pageNumbers;
2779
- };
2780
- const renderPageNumber = (pageNumber) => /* @__PURE__ */ React13.createElement("li", { key: pageNumber, className: `page-item ${currentPage === pageNumber ? "active" : ""}` }, /* @__PURE__ */ React13.createElement("a", { className: "page-link cursor-pointer", onClick: (e) => handlePageClick(e, pageNumber) }, pageNumber));
2781
- return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement("nav", { className: "app-pagination py-2" }, /* @__PURE__ */ React13.createElement("ul", { className: "pagination justify-content-center" }, /* @__PURE__ */ React13.createElement("li", { className: `page-item ${currentPage === 1 ? "disabled" : ""}` }, /* @__PURE__ */ React13.createElement("a", { className: "page-link cursor-pointer", onClick: handlePrevious }, /* @__PURE__ */ React13.createElement("span", null, "\u2B9C"))), showPages && getPageNumbers(), /* @__PURE__ */ React13.createElement("li", { className: `page-item ${currentPage === totalPages ? "disabled" : ""}` }, /* @__PURE__ */ React13.createElement("a", { className: "page-link cursor-pointer", onClick: handleNext }, /* @__PURE__ */ React13.createElement("span", null, "\u2B9E"))))));
2782
- }
2783
-
2784
- // src/app/components/Transaction/CompletedTransactions.tsx
2785
- var STORY_HEADERS = [
2786
- {
2787
- prop: "Date",
2788
- title: "Date",
2789
- isSortable: true
2790
- },
2791
- {
2792
- prop: "Name",
2793
- isFilterable: true,
2794
- title: "Name",
2795
- isSortable: true
2796
- },
2797
- {
2798
- prop: "lastFourDigits",
2799
- title: "Last 4",
2800
- isSortable: true
2801
- },
2802
- {
2803
- prop: "cardType",
2804
- title: "Brand",
2805
- isSortable: true
2806
- },
2807
- {
2808
- prop: "Amount",
2809
- title: "Amount",
2810
- isSortable: true
2811
- },
2812
- {
2813
- prop: "Net",
2814
- title: "Net",
2815
- isSortable: true
2816
- }
2817
- ];
2818
- function CompletedTransactions(props) {
2819
- const [dataList, setDataList] = useState8([]);
2820
- const [startDate, setStartDate] = useState8(null);
2821
- const [endDate, setEndDate] = useState8(null);
2822
- const [state, setState] = useState8({
2823
- page: 1,
2824
- totalPage: 0,
2825
- data: [],
2826
- csvData: false
2827
- });
2828
- const formatDate = (inputDate) => {
2829
- if (!inputDate) return "";
2830
- const date = new Date(inputDate);
2831
- const month = date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() + 1;
2832
- const day = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate();
2833
- return `${date.getFullYear()}-${month}-${day}`;
2834
- };
2835
- const downloadStringAsCSV = (name, content) => {
2836
- const csvContent = convertArrayOfObjectsToCSV(content);
2837
- const blob = new Blob([csvContent], { type: "text/csv;charset=utf-8;" });
2838
- const a = document.createElement("a");
2839
- a.href = URL.createObjectURL(blob);
2840
- a.download = name;
2841
- document.body.appendChild(a);
2842
- a.click();
2843
- document.body.removeChild(a);
2844
- };
2845
- const convertArrayOfObjectsToCSV = (array) => {
2846
- const headers = Object.keys(array[0]);
2847
- const csvRows = [];
2848
- csvRows.push(headers.join(","));
2849
- for (const obj of array) {
2850
- const values = headers.map((header) => obj[header]);
2851
- csvRows.push(values.join(","));
2852
- }
2853
- return csvRows.join("\n");
2854
- };
2855
- const fetchData = async (newPage, startDate2, endDate2) => {
2856
- var _a, _b;
2857
- try {
2858
- const response = await fetch(`${baseUrl}get-complete-request-payments`, {
2859
- method: "POST",
2860
- headers: {
2861
- "Content-Type": "application/json"
2862
- },
2863
- body: JSON.stringify({
2864
- fractalpayPublicKey: props.fractalpayClientKey,
2865
- page: newPage,
2866
- dateStart: startDate2 ? formatDate(startDate2) : "",
2867
- dateEnd: endDate2 ? formatDate(endDate2) : ""
2868
- })
2869
- });
2870
- if (!response.ok) {
2871
- throw new Error(`HTTP error! status: ${response.status}`);
2872
- }
2873
- const data = await response.json();
2874
- setState((prev) => {
2875
- var _a2;
2876
- return __spreadProps(__spreadValues({}, prev), { totalPage: (_a2 = data == null ? void 0 : data.data) == null ? void 0 : _a2.totalPage });
2877
- });
2878
- if (data && (data == null ? void 0 : data.result) === true) {
2879
- const result = ((_b = (_a = data == null ? void 0 : data.data) == null ? void 0 : _a.allPaymentTransaction) != null ? _b : []).map((item) => ({
2880
- Date: formatDate(item == null ? void 0 : item.Date),
2881
- Name: item == null ? void 0 : item.Name,
2882
- lastFourDigits: item == null ? void 0 : item.lastFourDigits,
2883
- cardType: item == null ? void 0 : item.cardType,
2884
- Amount: `$${parseFloat(item == null ? void 0 : item.Amount).toLocaleString("en-US", { maximumFractionDigits: 2 })}`,
2885
- Net: `$${parseFloat(item == null ? void 0 : item.Net).toLocaleString("en-US", { maximumFractionDigits: 2 })}`
2886
- }));
2887
- if (state.csvData) {
2888
- downloadStringAsCSV("transaction.csv", result);
2889
- setState((prev) => {
2890
- var _a2;
2891
- return __spreadProps(__spreadValues({}, prev), { data: (_a2 = data == null ? void 0 : data.data) == null ? void 0 : _a2.allPaymentTransaction, csvData: false });
2892
- });
2893
- }
2894
- setDataList(result);
2895
- } else {
2896
- console.log("No data available");
2897
- }
2898
- } catch (error) {
2899
- console.log(error);
2900
- }
2901
- };
2902
- const handleStartDateChange = (date) => {
2903
- setStartDate(date);
918
+ const [loading, setLoading] = useState2(false);
919
+ const [errors, setErrors] = useState2({});
920
+ const [phone, setPhone] = useState2(null);
921
+ const [requestDetails, setRequestDetails] = useState2({
922
+ email: "",
923
+ phone_number: "",
924
+ order_id: "",
925
+ name: "",
926
+ fractalpayPublicKey: fractalpayClientKey
927
+ });
928
+ const [amount, setAmount] = useState2("");
929
+ const [showConfirmationModal, setShowConfirmationModal] = useState2(false);
930
+ const [apiResponse, setApiResponse] = useState2(null);
931
+ const phoneNumberRegex = (value) => /^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/.test(value);
932
+ const amoutRegex = /[+-]?([0-9]*[.])?[0-9]+/;
933
+ const isValidEmail = (value) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value);
934
+ const isAlpha = (value) => /^[A-Za-z\s]*$/.test(value);
935
+ const handleClose = () => {
936
+ setShow(false);
937
+ setErrors({});
2904
938
  };
2905
- const handleEndDateChange = (date) => {
2906
- setEndDate(date);
939
+ const handleShow = () => setShow(true);
940
+ const handleCloseConfirmationModal = () => {
941
+ console.log(apiResponse, "apiresponse");
942
+ handleSubmit(apiResponse);
943
+ setShowConfirmationModal(false);
2907
944
  };
2908
- const handleExport = async () => {
2909
- if (!startDate) {
2910
- toast4.error("Start date required");
2911
- } else if (!endDate) {
2912
- toast4.error("End date required");
2913
- } else {
2914
- setState((prev) => __spreadProps(__spreadValues({}, prev), { csvData: true }));
2915
- try {
2916
- const response = await fetch(`${baseUrl}get-complete-request-payments`, {
2917
- method: "POST",
2918
- headers: {
2919
- "Content-Type": "application/json"
2920
- },
2921
- body: JSON.stringify({
2922
- fractalpayPublicKey: props.fractalpayClientKey,
2923
- dateStart: startDate ? formatDate(startDate) : "",
2924
- dateEnd: endDate ? formatDate(endDate) : "",
2925
- isExport: true
2926
- })
2927
- });
2928
- if (!response.ok) {
2929
- throw new Error(`HTTP error! status: ${response.status}`);
2930
- }
2931
- const data = await response.json();
2932
- if (data.status) {
2933
- const link = document.createElement("a");
2934
- link.href = `${data == null ? void 0 : data.data}`;
2935
- link.target = "_blank";
2936
- document.body.appendChild(link);
2937
- link.click();
2938
- document.body.removeChild(link);
2939
- }
2940
- } catch (error) {
2941
- console.log(error);
2942
- }
945
+ function emptyFields() {
946
+ setRequestDetails({
947
+ email: "",
948
+ phone_number: "",
949
+ order_id: "",
950
+ name: "",
951
+ fractalpayPublicKey: fractalpayClientKey
952
+ });
953
+ setAmount("");
954
+ }
955
+ function handleSubmit(event) {
956
+ let message = {
957
+ type: "preview.compiledcheck",
958
+ other: __spreadProps(__spreadValues({}, event), { status: true })
959
+ };
960
+ window.parent.postMessage(message, "*");
961
+ }
962
+ const sendRequestPayment = async () => {
963
+ if (Object.keys(errors).length > 0) {
964
+ return;
2943
965
  }
2944
- };
2945
- useEffect3(() => {
2946
- fetchData(state.page, startDate, endDate);
2947
- }, [state.page]);
2948
- const handlePageChange = (pageNumber) => {
2949
- setState((prev) => __spreadProps(__spreadValues({}, prev), { page: pageNumber }));
2950
- fetchData(pageNumber, startDate, endDate);
2951
- };
2952
- return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement("style", null, `
2953
- .react-datepicker-wrapper:first-child {
2954
- margin-right: 10px;
2955
- }
2956
- `), /* @__PURE__ */ React14.createElement("div", { className: "mb-5" }, /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ React14.createElement("div", { style: { display: "flex", marginRight: "10px", marginTop: "25px" } }, /* @__PURE__ */ React14.createElement(
2957
- DatePicker,
2958
- {
2959
- selected: startDate,
2960
- onChange: handleStartDateChange,
2961
- selectsStart: true,
2962
- startDate,
2963
- endDate,
2964
- placeholderText: "Start Date",
2965
- required: true
966
+ setErrors({});
967
+ if (!(requestDetails == null ? void 0 : requestDetails.email) && phone && !phoneNumberRegex(phone)) {
968
+ setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
969
+ phone: ErrorText.phonenumbervalid
970
+ }));
971
+ return;
2966
972
  }
2967
- ), /* @__PURE__ */ React14.createElement(
2968
- DatePicker,
2969
- {
2970
- selected: endDate,
2971
- onChange: handleEndDateChange,
2972
- selectsEnd: true,
2973
- startDate,
2974
- endDate,
2975
- minDate: startDate,
2976
- placeholderText: "End Date"
973
+ if (!validateForm()) {
974
+ return;
2977
975
  }
2978
- )), /* @__PURE__ */ React14.createElement("button", { className: "export-btn1", onClick: handleExport }, "Export")), /* @__PURE__ */ React14.createElement(
2979
- DatatableWrapper,
2980
- {
2981
- body: dataList,
2982
- headers: STORY_HEADERS,
2983
- paginationOptionsProps: {
2984
- initialState: {
2985
- rowsPerPage: 10,
2986
- options: [5, 10, 15, 20]
2987
- }
2988
- }
2989
- },
2990
- /* @__PURE__ */ React14.createElement(Row, { className: "mb-4 p-2" }, /* @__PURE__ */ React14.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__ */ React14.createElement(PaginationOptions, null)), /* @__PURE__ */ React14.createElement(Col, { xs: 12, lg: 4, className: "d-flex flex-col justify-content-end align-items-end" }), /* @__PURE__ */ React14.createElement(Col, { xs: 12, sm: 6, lg: 4, className: "d-flex flex-col justify-content-end align-items-end" }, /* @__PURE__ */ React14.createElement(Filter, null))),
2991
- /* @__PURE__ */ React14.createElement(Row, null, /* @__PURE__ */ React14.createElement("div", { className: "responsive-tbl" }, /* @__PURE__ */ React14.createElement(Table, null, /* @__PURE__ */ React14.createElement(TableHeader, null), /* @__PURE__ */ React14.createElement(TableBody, null)))),
2992
- /* @__PURE__ */ React14.createElement(PaginationPg, { totalPages: state.totalPage, onPageChange: handlePageChange, current: state.page })
2993
- ))));
2994
- }
2995
-
2996
- // src/app/components/Payment/TockenizPay.tsx
2997
- import React15, { useState as useState9 } from "react";
2998
- import { Modal as Modal6 } from "react-bootstrap";
2999
- import { toast as toast5, ToastContainer as ToastContainer3 } from "react-toastify";
3000
- import forge2 from "node-forge";
3001
- import creditCardType from "credit-card-type";
3002
- function TockenizPay() {
3003
- const [state, setState] = useState9({
3004
- show: false,
3005
- publicKey: "",
3006
- sessionKey: "",
3007
- cardNumber: "",
3008
- year: "",
3009
- month: "",
3010
- cvv: "",
3011
- zip: "",
3012
- amount: ""
3013
- });
3014
- const [cardTypeDetail, setCardTypeDetail] = useState9(null);
3015
- const [isValid, setIsValid] = useState9(false);
3016
- const [isValidMonth, setIsValidMonth] = useState9(false);
3017
- const [data, setData] = useState9(null);
3018
- const handlePaymentClick = async () => {
3019
976
  try {
3020
- const response = await fetch(`${baseUrl}/generate-session`, {
3021
- method: "POST",
3022
- headers: {
3023
- "Content-Type": "application/json"
3024
- },
3025
- body: JSON.stringify({})
3026
- });
3027
- if (!response.ok) {
3028
- throw new Error("Network response was not ok");
3029
- }
3030
- const data2 = await response.json();
3031
- if (data2 && data2.result === true) {
3032
- setState((prev) => {
3033
- var _a, _b;
3034
- return __spreadProps(__spreadValues({}, prev), {
3035
- show: true,
3036
- publicKey: (_a = data2 == null ? void 0 : data2.data) == null ? void 0 : _a.publicKeyPem,
3037
- sessionKey: (_b = data2 == null ? void 0 : data2.data) == null ? void 0 : _b.session_key
3038
- });
3039
- });
977
+ setLoading(true);
978
+ const formData = {
979
+ fractalpayPublicKey: fractalpayClientKey,
980
+ amount,
981
+ phone_number: phone,
982
+ order_id: requestDetails.order_id,
983
+ action: "request",
984
+ name: requestDetails.name,
985
+ email: requestDetails.email,
986
+ customer_id: (props == null ? void 0 : props.customerId) ? props == null ? void 0 : props.customerId : ""
987
+ };
988
+ let response = await axios2.post(`${baseUrl}send-request-pre-auth-payment`, formData);
989
+ if ((response == null ? void 0 : response.status) === 200) {
990
+ setShowConfirmationModal(true);
991
+ setShow(false);
992
+ emptyFields();
993
+ setApiResponse(response == null ? void 0 : response.data);
3040
994
  }
995
+ setLoading(false);
3041
996
  } catch (error) {
3042
997
  console.log(error);
998
+ setLoading(false);
3043
999
  }
3044
1000
  };
3045
- const handleSubmitPay = async () => {
3046
- var _a, _b, _c;
3047
- 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}`;
3048
- const publicKey = forge2.pki.publicKeyFromPem(state.publicKey);
3049
- const encrypted = publicKey.encrypt(track2_data, "RSA-OAEP", {
3050
- md: forge2.md.sha1.create(),
3051
- mgf1: {
3052
- md: forge2.md.sha1.create()
3053
- }
3054
- });
3055
- const encryptedBase64 = forge2.util.encode64(encrypted);
3056
- console.log(encryptedBase64);
3057
- const requestBody = {
3058
- enc_track2_data: encryptedBase64,
3059
- session_key: state.sessionKey,
3060
- algorithm: "RSAES_OAEP_SHA_1"
3061
- };
3062
- try {
3063
- const response = await fetch(
3064
- "https://m1ao5pku8b.execute-api.us-east-2.amazonaws.com/prod/tokenizer/tokenize",
3065
- {
3066
- method: "POST",
3067
- headers: {
3068
- "x-app-session-key": state == null ? void 0 : state.sessionKey,
3069
- "Content-Type": "application/json"
3070
- },
3071
- body: JSON.stringify(requestBody)
3072
- }
3073
- );
3074
- if (!response.ok) {
3075
- const errorData = await response.json();
3076
- throw new Error(((_c = errorData == null ? void 0 : errorData.data) == null ? void 0 : _c.message) || "Request failed");
3077
- }
3078
- const responseData = await response.json();
3079
- toast5.success("Payment Successful");
3080
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
3081
- show: false,
3082
- publicKey: "",
3083
- sessionKey: "",
3084
- cardNumber: "",
3085
- year: "",
3086
- month: "",
3087
- cvv: "",
3088
- zip: "",
3089
- amount: ""
1001
+ let favicon_logo = baseUrl + "images/logo-img.png";
1002
+ const handleChange = (e) => {
1003
+ const { value } = e.target;
1004
+ const token = e.target.dataset.token;
1005
+ setRequestDetails(__spreadProps(__spreadValues({}, requestDetails), { [token]: value }));
1006
+ if (token === "name" && !isAlpha(value)) {
1007
+ setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
1008
+ [token]: ErrorText.onlylettersallowed
3090
1009
  }));
3091
- console.log("response", responseData);
3092
- } catch (error) {
3093
- toast5.error((error == null ? void 0 : error.message) || "An error occurred");
3094
- console.error("Error:", error);
1010
+ return;
3095
1011
  }
3096
- };
3097
- const formatCreditCardNumber = (cardNumber, cardType) => {
3098
- const cleanNumber = cardNumber.replace(/\D+/g, "");
3099
- let formattedValue;
3100
- switch (cardType) {
3101
- case "visa":
3102
- case "mastercard":
3103
- case "Discover":
3104
- case "JCB":
3105
- formattedValue = cleanNumber.replace(/(.{4})/g, "$1 ").trim();
3106
- break;
3107
- case "american-express":
3108
- formattedValue = cleanNumber.replace(/(\d{4})(\d{6})(\d{5})/, "$1 $2 $3");
3109
- break;
3110
- case "diners-club":
3111
- formattedValue = cleanNumber.replace(/(\d{4})(\d{6})(\d{4})/, "$1 $2 $3");
3112
- break;
3113
- case "maestro":
3114
- formattedValue = cleanNumber.length <= 19 ? cleanNumber.replace(/(.{4})/g, "$1 ").trim() : cleanNumber;
3115
- break;
3116
- default:
3117
- formattedValue = cleanNumber;
1012
+ let errorobj = errors;
1013
+ if (token === "email" && !phone) {
1014
+ delete errorobj.phone;
1015
+ setErrors(errorobj);
3118
1016
  }
3119
- return formattedValue;
3120
- };
3121
- const handleCardNumberChange = (e) => {
3122
- e.preventDefault();
3123
- e.stopPropagation();
3124
- const { value } = e.target;
3125
- let cardtyp = creditCardType(value)[0];
3126
- const formattedValue = formatCreditCardNumber(value, cardtyp == null ? void 0 : cardtyp.type);
3127
- setCardTypeDetail(creditCardType(value)[0]);
3128
- console.log(formattedValue);
3129
- if (value.match(/[a-zA-Z]/)) {
3130
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
3131
- cardNumber: formattedValue,
3132
- error: "Invalid input. Please enter only numbers."
3133
- }));
3134
- } else {
3135
- handleCardNumLength("");
3136
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
3137
- cardNumber: formattedValue,
3138
- error: null
3139
- }));
1017
+ if (value) {
1018
+ delete errorobj[token];
1019
+ setErrors(errorobj);
3140
1020
  }
3141
- };
3142
- function handleCardNumLength(cardType) {
3143
- const cardLengths = {
3144
- "Visa": 16,
3145
- "MasterCard": 16,
3146
- "AmericanExpress": 15,
3147
- "Discover": 16,
3148
- "DinersClub": 14,
3149
- "JCB": 16
3150
- };
3151
- return cardLengths[cardType] || "Unknown card type";
3152
- }
3153
- const handleMonthChange = (e) => {
3154
- setIsValid(false);
3155
- let value = e.target.value;
3156
- if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 1 && parseInt(value, 10) <= 12)) {
3157
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
3158
- month: value
3159
- }));
3160
- setIsValidMonth(false);
3161
- } else {
3162
- setIsValidMonth(true);
1021
+ if (token === "email" && !value) {
1022
+ delete errorobj[token];
1023
+ setErrors(errorobj);
3163
1024
  }
3164
1025
  };
3165
- const handleYearChange = (e) => {
3166
- setIsValid(false);
3167
- setIsValidMonth(false);
3168
- let value = e.target.value;
3169
- if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 0 && parseInt(value, 10) <= 99)) {
3170
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
3171
- year: value
3172
- }));
1026
+ const handleAmountChange = (data) => {
1027
+ const { value } = data;
1028
+ if (Number(value) > 0) {
1029
+ let errorobj = errors;
1030
+ delete errorobj.amount;
1031
+ setErrors(errorobj);
3173
1032
  }
1033
+ setAmount(value);
3174
1034
  };
3175
- const handleCVVChange = (e) => {
3176
- setIsValid(false);
3177
- setIsValidMonth(false);
3178
- let value = e.target.value;
3179
- if (/^\d{0,4}$/.test(value)) {
3180
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
3181
- cvv: value
3182
- }));
3183
- }
1035
+ const validateForm = () => {
1036
+ let newErrors = {};
1037
+ if (!amount) newErrors.amount = ErrorText.amountrequired;
1038
+ if (requestDetails.email && !isValidEmail(requestDetails == null ? void 0 : requestDetails.email)) newErrors.email = ErrorText.invalidemail;
1039
+ if (!phone && !(requestDetails == null ? void 0 : requestDetails.email)) newErrors.phone = ErrorText.phoneoremailrequired;
1040
+ if (!phone && !(requestDetails == null ? void 0 : requestDetails.email)) newErrors.email = ErrorText.phoneoremailrequired;
1041
+ if (!phone && requestDetails.email && !isValidEmail(requestDetails == null ? void 0 : requestDetails.email)) newErrors.email = ErrorText.invalidemail;
1042
+ if (props.from === "merchant" && !requestDetails.order_id) newErrors.order_id = ErrorText.orderidrequired;
1043
+ setErrors(newErrors);
1044
+ return Object.keys(newErrors).length === 0;
3184
1045
  };
3185
- const handleZIP = (e) => {
3186
- setIsValid(false);
3187
- setIsValidMonth(false);
3188
- let value = e.target.value;
3189
- if (/^\d{0,7}$/.test(value)) {
3190
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
3191
- zip: value
1046
+ useEffect2(() => {
1047
+ if (props) {
1048
+ setRequestDetails((prev) => __spreadProps(__spreadValues({}, prev), {
1049
+ order_id: props.orderID ? props.orderID : "",
1050
+ name: (props == null ? void 0 : props.name) ? props == null ? void 0 : props.name : "",
1051
+ email: (props == null ? void 0 : props.email) ? props == null ? void 0 : props.email : ""
3192
1052
  }));
1053
+ setAmount(props.amount ? props.amount : "");
1054
+ setPhone(props.phone ? `${props.phone}` : null);
3193
1055
  }
3194
- };
3195
- const handleAmount = (e) => {
3196
- setIsValid(false);
3197
- setIsValidMonth(false);
3198
- let value = e.target.value;
3199
- value = value.replace(/[^0-9.]/g, "");
3200
- let parts = value.split(".");
3201
- if (parts.length > 2) {
3202
- parts = [parts.shift(), parts.join(".")];
3203
- value = parts.join("");
3204
- }
3205
- if (parts.length === 2 && parts[1].length > 2) {
3206
- value = `${parts[0]}.${parts[1].slice(0, 2)}`;
3207
- }
3208
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
3209
- amount: value
3210
- }));
3211
- };
3212
- const handleAmountBlur = () => {
3213
- const value = state.amount;
3214
- if (value && !value.includes(".")) {
3215
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
3216
- amount: `${value}.00`
1056
+ }, [props]);
1057
+ const handlePhoneChange = (e) => {
1058
+ let value = e == null ? void 0 : e.value;
1059
+ if (value && (value == null ? void 0 : value.length) > 0 && (value == null ? void 0 : value.length) !== 10) {
1060
+ setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
1061
+ phone: ErrorText.phonenumberlength
3217
1062
  }));
1063
+ setPhone(value);
1064
+ return;
1065
+ } else {
1066
+ setPhone(value);
3218
1067
  }
3219
- };
3220
- function amountFormat(amt) {
3221
- if (amt) {
3222
- return `${parseFloat(amt).toLocaleString("en-US", {
3223
- minimumFractionDigits: 2,
3224
- maximumFractionDigits: 2
3225
- })}`;
1068
+ let errorobj = errors;
1069
+ delete errorobj.phone;
1070
+ if (value && !(requestDetails == null ? void 0 : requestDetails.email)) {
1071
+ delete errorobj.email;
3226
1072
  }
3227
- return "";
1073
+ setErrors(errorobj);
1074
+ };
1075
+ function formatAmount(amount2) {
1076
+ return new Intl.NumberFormat("en-US", {
1077
+ style: "currency",
1078
+ currency: "USD",
1079
+ minimumFractionDigits: 2,
1080
+ maximumFractionDigits: 2
1081
+ }).format(Number(amount2));
3228
1082
  }
3229
- return /* @__PURE__ */ React15.createElement("div", null, /* @__PURE__ */ React15.createElement(ToastContainer3, null), /* @__PURE__ */ React15.createElement(
3230
- "button",
3231
- {
3232
- className: "export-btn mt-4",
3233
- style: { width: "100px" },
3234
- onClick: () => handlePaymentClick()
3235
- },
3236
- "TokenizePay"
3237
- ), /* @__PURE__ */ React15.createElement(
3238
- Modal6,
1083
+ return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ React7.createElement(Loader_default, { loading }), /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Request Pre Auth Payment"), /* @__PURE__ */ React7.createElement(
1084
+ CustomModal2_default,
3239
1085
  {
3240
- show: state.show,
3241
- onHide: () => setState((prev) => __spreadProps(__spreadValues({}, prev), {
3242
- show: false
3243
- })),
3244
- centered: true
1086
+ open: show,
1087
+ onClose: () => setShow(false)
3245
1088
  },
3246
- /* @__PURE__ */ React15.createElement(Modal6.Header, { closeButton: true }),
3247
- /* @__PURE__ */ React15.createElement(Modal6.Body, null, /* @__PURE__ */ React15.createElement("div", { className: "payment-popup" }, /* @__PURE__ */ React15.createElement("div", { className: "row" }, /* @__PURE__ */ React15.createElement("div", { className: "" }, /* @__PURE__ */ React15.createElement("div", { id: "Checkout", className: "inline" }, /* @__PURE__ */ React15.createElement("div", { className: "header" }, /* @__PURE__ */ React15.createElement("h1", null, "Pay")), /* @__PURE__ */ React15.createElement("form", { id: "PaymentForm", className: "payment-form" }, /* @__PURE__ */ React15.createElement("div", { className: "form-group" }, /* @__PURE__ */ React15.createElement("label", null, "Name on card"), /* @__PURE__ */ React15.createElement(
3248
- "input",
3249
- {
3250
- id: "NameOnCard",
3251
- className: "form-control required",
3252
- type: "text",
3253
- maxLength: 100,
3254
- placeholder: "Name"
3255
- }
3256
- ), /* @__PURE__ */ React15.createElement(
3257
- "span",
3258
- {
3259
- id: "NameOnCard-error",
3260
- style: { color: "red", display: "none" }
3261
- }
3262
- )), /* @__PURE__ */ React15.createElement("div", { className: "form-group" }, /* @__PURE__ */ React15.createElement(
3263
- "input",
3264
- {
3265
- "data-token": "card_number",
3266
- className: "null card-image form-control required",
3267
- type: "text",
3268
- maxLength: 19,
3269
- value: state.cardNumber,
3270
- placeholder: "0000 0000 0000 0000",
3271
- onChange: handleCardNumberChange
3272
- }
3273
- ), state.error && /* @__PURE__ */ React15.createElement("div", { style: { color: "red" } }, state.error)), /* @__PURE__ */ React15.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React15.createElement(
3274
- "input",
3275
- {
3276
- "data-token": "exp_month",
3277
- className: "form-control required",
3278
- type: "text",
3279
- placeholder: "MM",
3280
- value: state.month,
3281
- maxLength: 2,
3282
- onChange: (e) => handleMonthChange(e)
3283
- }
3284
- ), isValidMonth && /* @__PURE__ */ React15.createElement(
3285
- "span",
3286
- {
3287
- id: "card_number-error",
3288
- style: { color: "red", fontSize: "15px" }
3289
- },
3290
- "Please write month only 1 to 12"
3291
- )), /* @__PURE__ */ React15.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React15.createElement(
3292
- "input",
3293
- {
3294
- "data-token": "exp_year",
3295
- className: "form-control required",
3296
- type: "text",
3297
- placeholder: "YY",
3298
- maxLength: 2,
3299
- value: state.year,
3300
- onChange: (e) => handleYearChange(e)
3301
- }
3302
- ), state.yearError && /* @__PURE__ */ React15.createElement("span", { id: "exp_year-error", style: { color: "red" } }, state.yearError)), /* @__PURE__ */ React15.createElement("div", { className: "security-code-group form-group" }, /* @__PURE__ */ React15.createElement("div", { className: "input-container" }, /* @__PURE__ */ React15.createElement(
1089
+ /* @__PURE__ */ React7.createElement("div", { className: "request-payment-amount-detail" }, /* @__PURE__ */ React7.createElement("p", { className: "request-payment-merchantname" }, "Authorization Request"), /* @__PURE__ */ React7.createElement("p", { className: "request-payment-pre-auth-merchantname" }, "Pay ", props == null ? void 0 : props.webname), /* @__PURE__ */ React7.createElement("p", { className: "request-payment-amount" }, formatAmount(props == null ? void 0 : props.amount)), (props == null ? void 0 : props.from) === "merchant" && /* @__PURE__ */ React7.createElement("p", { className: "request-payment-orderid" }, requestDetails == null ? void 0 : requestDetails.order_id), /* @__PURE__ */ React7.createElement("span", { className: "request-payment-close-popup", onClick: handleClose }, /* @__PURE__ */ React7.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React7.createElement("g", { "clip-path": "url(#clip0_12425_52336)" }, /* @__PURE__ */ React7.createElement("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" })), /* @__PURE__ */ React7.createElement("defs", null, /* @__PURE__ */ React7.createElement("clipPath", { id: "clip0_12425_52336" }, /* @__PURE__ */ React7.createElement("rect", { width: "16", height: "16", fill: "white" })))))),
1090
+ /* @__PURE__ */ React7.createElement("form", { className: "request-payment-input-form" }, /* @__PURE__ */ React7.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ React7.createElement("label", { htmlFor: "exampleFormControlInput2", className: "request-payment-input-label" }, "FULL NAME"), /* @__PURE__ */ React7.createElement(
3303
1091
  "input",
3304
1092
  {
3305
- "data-token": "cvv",
3306
- className: "form-control required",
1093
+ className: "request-payment-input-box",
3307
1094
  type: "text",
3308
- maxLength: 4,
3309
- value: state.cvv,
3310
- placeholder: "CVV",
3311
- onChange: (e) => handleCVVChange(e)
1095
+ placeholder: "Full Name",
1096
+ "data-token": "name",
1097
+ onChange: handleChange,
1098
+ value: requestDetails == null ? void 0 : requestDetails.name
3312
1099
  }
3313
- ), /* @__PURE__ */ React15.createElement("i", { id: "cvc", className: "fa fa-question-circle" }), state.cvvError && /* @__PURE__ */ React15.createElement("span", { id: "cvv-error", style: { color: "red" } }, state.cvvError)), /* @__PURE__ */ React15.createElement("div", { className: "cvc-preview-container two-card hide" }, /* @__PURE__ */ React15.createElement("div", { className: "amex-cvc-preview" }), /* @__PURE__ */ React15.createElement("div", { className: "visa-mc-dis-cvc-preview" }))), /* @__PURE__ */ React15.createElement("div", { className: "zip-code-group form-group" }, /* @__PURE__ */ React15.createElement("label", null, "Postal code"), /* @__PURE__ */ React15.createElement("div", { className: "input-container" }, /* @__PURE__ */ React15.createElement(
3314
- "input",
1100
+ ), errors.name && /* @__PURE__ */ React7.createElement("small", { className: "request-payment-error-msg" }, errors.name)), /* @__PURE__ */ React7.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ React7.createElement("label", { htmlFor: "requestPhoneNumber", className: "request-payment-input-label" }, "Phone Number"), /* @__PURE__ */ React7.createElement(
1101
+ PatternFormat2,
3315
1102
  {
3316
- id: "ZIPCode",
3317
- className: "form-control required",
3318
- name: "zip",
3319
- type: "text",
3320
- maxLength: 7,
3321
- placeholder: "000000",
3322
- value: state.zip,
3323
- onChange: (e) => handleZIP(e)
1103
+ className: "request-payment-input-box",
1104
+ placeholder: "Mobile number",
1105
+ format: "+1 (###) ###-####",
1106
+ value: phone,
1107
+ onValueChange: (e) => {
1108
+ handlePhoneChange(e);
1109
+ }
3324
1110
  }
3325
- ), /* @__PURE__ */ React15.createElement(
3326
- "a",
3327
- {
3328
- tabIndex: 0,
3329
- role: "button",
3330
- "data-toggle": "popover",
3331
- "data-trigger": "focus",
3332
- "data-placement": "left",
3333
- "data-content": "Enter the ZIP/Postal code for your credit card billing address."
3334
- },
3335
- /* @__PURE__ */ React15.createElement("i", { className: "fa fa-question-circle" })
3336
- ), /* @__PURE__ */ React15.createElement(
3337
- "span",
3338
- {
3339
- id: "ZIPCode-error",
3340
- style: { color: "red", display: "none" }
3341
- },
3342
- "This field is required"
3343
- ))), /* @__PURE__ */ React15.createElement("div", { className: "form-group top-amnt" }, /* @__PURE__ */ React15.createElement("div", null, /* @__PURE__ */ React15.createElement("label", null, "Payment amount"), /* @__PURE__ */ React15.createElement("div", { className: "amount-placeholder" }, /* @__PURE__ */ React15.createElement(
1111
+ ), errors.phone && /* @__PURE__ */ React7.createElement("small", { className: "request-payment-error-msg" }, errors.phone)), /* @__PURE__ */ React7.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ React7.createElement("label", { htmlFor: "exampleFormControlInput2", className: "request-payment-input-label" }, "EMAIL"), /* @__PURE__ */ React7.createElement(
3344
1112
  "input",
3345
1113
  {
3346
- id: "Amount",
3347
- className: "form-control required",
3348
- name: "amount",
1114
+ className: "request-payment-input-box",
3349
1115
  type: "text",
3350
- placeholder: "",
3351
- value: state.amount,
3352
- onChange: (e) => handleAmount(e),
3353
- onBlur: handleAmountBlur
1116
+ placeholder: "Email",
1117
+ onChange: handleChange,
1118
+ "data-token": "email",
1119
+ value: requestDetails == null ? void 0 : requestDetails.email
3354
1120
  }
3355
- ))), /* @__PURE__ */ React15.createElement("div", { className: "card-row" }, /* @__PURE__ */ React15.createElement("span", { className: "visa" }), /* @__PURE__ */ React15.createElement("span", { className: "mastercard" }), /* @__PURE__ */ React15.createElement("span", { className: "amex" }), /* @__PURE__ */ React15.createElement("span", { className: "discover" }))), /* @__PURE__ */ React15.createElement(
1121
+ ), errors.email && /* @__PURE__ */ React7.createElement("small", { className: "request-payment-error-msg" }, errors.email)), /* @__PURE__ */ React7.createElement(
3356
1122
  "button",
3357
1123
  {
3358
1124
  type: "button",
3359
- id: "submitButton",
3360
- onClick: () => handleSubmitPay(),
3361
- className: "btn btn-block btn-success submit-button"
3362
- },
3363
- "Submit"
3364
- )), /* @__PURE__ */ React15.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ React15.createElement(
3365
- "svg",
3366
- {
3367
- xmlns: "http://www.w3.org/2000/svg",
3368
- width: "20",
3369
- height: "20",
3370
- viewBox: "0 0 26 26"
1125
+ className: "request-payment-submit-button",
1126
+ onClick: sendRequestPayment,
1127
+ disabled: loading
3371
1128
  },
3372
- /* @__PURE__ */ React15.createElement(
3373
- "path",
3374
- {
3375
- fill: "currentColor",
3376
- 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"
3377
- }
3378
- )
3379
- ), "Secure payments powered by Fractal", /* @__PURE__ */ React15.createElement(
3380
- "img",
3381
- {
3382
- src: "https://ui.fractalpay.com/favicon.ico",
3383
- alt: "Fractal logo",
3384
- className: "powered-logo"
3385
- }
3386
- )))))))
3387
- ));
3388
- }
3389
-
3390
- // src/app/components/Payment/GetPaymentDynamic.tsx
3391
- import React17, { useEffect as useEffect4, useState as useState10 } from "react";
3392
- import { Modal as Modal7 } from "react-bootstrap";
3393
-
3394
- // src/app/components/Loader/MyLoadingAnimation.tsx
3395
- import React16 from "react";
3396
- function MyLoadingAnimation() {
3397
- return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(LoaderStyle_default, null), /* @__PURE__ */ React16.createElement("div", { className: "loading-animation" }, /* @__PURE__ */ React16.createElement("div", { className: "spinner" })));
3398
- }
3399
-
3400
- // src/app/components/Payment/GetPaymentDynamic.tsx
3401
- function GetPaymentDynamic(props) {
3402
- const { amount, fractalpayClientKey, orderID } = props;
3403
- const [loading, setLoading] = useState10(false);
3404
- const [show, setShow] = useState10(false);
3405
- const [iframeLoaded, setIframeLoaded] = useState10(false);
3406
- const [phoneNumber, setPhoneNumber] = useState10("");
3407
- const [errorMessage, setErrorMessage] = useState10("");
3408
- const [submitClicked, setSubmitClicked] = useState10(false);
3409
- const [isValidNumber, setIsValidNumber] = useState10(true);
3410
- const handleClose = () => {
3411
- setIframeLoaded(false);
3412
- setTimeout(() => {
3413
- setShow(false);
3414
- }, 1e3);
3415
- };
3416
- const handleShow = () => {
3417
- if (fractalpayClientKey) {
3418
- setShow(true);
3419
- setIframeLoaded(true);
3420
- } else {
3421
- console.error(ErrorText.fractalpayclientidrequired);
3422
- }
3423
- };
3424
- useEffect4(() => {
3425
- if (!fractalpayClientKey) {
3426
- console.error(ErrorText.fractalpayclientidrequired);
3427
- }
3428
- }, [fractalpayClientKey]);
3429
- const handlePhoneNumberChange = (e) => {
3430
- const number = e.target.value;
3431
- const isValid = /^\d*$/.test(number);
3432
- if (isValid) {
3433
- setPhoneNumber(number);
3434
- setIsValidNumber(number.length <= 10);
3435
- if (number.length > 10) {
3436
- setErrorMessage(ErrorText.phonenumbervalid);
3437
- } else {
3438
- setErrorMessage("");
3439
- }
3440
- } else {
3441
- setErrorMessage(ErrorText.phonenumbervalidnumberonly);
3442
- }
3443
- };
3444
- const handleLoad = () => {
3445
- setLoading(false);
3446
- };
3447
- useEffect4(() => {
3448
- const messageListener = (event) => {
3449
- var _a, _b;
3450
- const response = (_b = (_a = event == null ? void 0 : event.data) == null ? void 0 : _a.other) == null ? void 0 : _b.data;
3451
- if (response == null ? void 0 : response.result) {
3452
- setTimeout(() => {
3453
- handleClose();
3454
- }, 5e3);
3455
- }
3456
- };
3457
- window.addEventListener("message", messageListener);
3458
- return () => {
3459
- window.removeEventListener("message", messageListener);
3460
- };
3461
- }, []);
3462
- return /* @__PURE__ */ React17.createElement("div", null, /* @__PURE__ */ React17.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Pay"), /* @__PURE__ */ React17.createElement(Modal7, { show: show && iframeLoaded, id: "modal-pay", className: "modal-lg", onHide: handleClose }, /* @__PURE__ */ React17.createElement(Modal7.Header, { closeButton: true }), /* @__PURE__ */ React17.createElement(Modal7.Body, null, loading && /* @__PURE__ */ React17.createElement(MyLoadingAnimation, null), /* @__PURE__ */ React17.createElement(
3463
- "iframe",
1129
+ loading ? "Loading..." : "Send Request"
1130
+ ), /* @__PURE__ */ React7.createElement("div", { className: "request-payment-fractal-powerd-by" }, /* @__PURE__ */ React7.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17", height: "16", viewBox: "0 0 17 16", fill: "none" }, /* @__PURE__ */ React7.createElement("path", { d: "M15.2165 4.11839C15.1973 3.69746 15.1973 3.29567 15.1973 2.89387C15.1973 2.56861 14.9486 2.31988 14.6234 2.31988C12.2317 2.31988 10.4141 1.63109 8.90257 0.157848C8.67298 -0.0526158 8.32858 -0.0526158 8.09898 0.157848C6.58748 1.63109 4.76984 2.31988 2.37821 2.31988C2.05295 2.31988 1.80422 2.56861 1.80422 2.89387C1.80422 3.29567 1.80422 3.69746 1.78508 4.11839C1.70855 8.13632 1.59375 13.6466 8.30945 15.9617L8.50078 16L8.69211 15.9617C15.3887 13.6466 15.293 8.15546 15.2165 4.11839ZM8.04159 9.6861C7.92679 9.78176 7.79286 9.83916 7.63979 9.83916H7.62066C7.46759 9.83916 7.31453 9.76263 7.21887 9.64783L5.43949 7.67713L6.30048 6.91181L7.69719 8.46158L10.7967 5.5151L11.5812 6.35695L8.04159 9.6861Z", fill: "#727272" })), "Secure payments powered by ", /* @__PURE__ */ React7.createElement("span", null, "Fractal"), /* @__PURE__ */ React7.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none" }, /* @__PURE__ */ React7.createElement("path", { d: "M17.4999 5.49758V7.01156C17.4999 7.05924 17.4595 7.09898 17.411 7.09898H12.3516C12.9169 6.54266 13.4781 5.99032 14.0434 5.434C14.0596 5.4181 14.0838 5.41016 14.104 5.41016H17.411C17.4595 5.41016 17.4999 5.44989 17.4999 5.49758Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M12.3462 10.9037V9.29836C12.3462 9.25067 12.3866 9.21094 12.435 9.21094H13.8523C13.929 9.21094 13.9694 9.30631 13.9129 9.35796C13.392 9.87455 12.8711 10.3911 12.3462 10.9037Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M12.4404 9.00523H15.6949C15.7434 9.00523 15.7838 8.96549 15.7838 8.91781V7.40383C15.7838 7.35614 15.7434 7.31641 15.6949 7.31641H12.4404C12.3919 7.31641 12.3516 7.35614 12.3516 7.40383V8.91781C12.3516 8.96549 12.3919 9.00523 12.4404 9.00523Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M10.1581 0.0120725L11.4906 0.77105C11.531 0.794892 11.5471 0.84655 11.5229 0.890261L8.99114 5.20173C8.78521 4.44275 8.57927 3.68775 8.37334 2.92877C8.36527 2.90493 8.3693 2.88109 8.38142 2.86122L10.0329 0.0438621C10.0612 0.000151419 10.1177 -0.0117697 10.1581 0.0120725Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M12.3382 7.10006L10.9289 6.29737C10.8886 6.27353 10.8724 6.22187 10.8966 6.17816L11.6033 4.97015C11.6436 4.9026 11.7446 4.91452 11.7648 4.99002C11.9546 5.69734 12.1484 6.40068 12.3382 7.10006Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M10.7107 6.0771L12.338 3.30345C12.3622 3.26372 12.346 3.20808 12.3057 3.18424L10.9732 2.42526C10.9328 2.40142 10.8763 2.41732 10.852 2.45705L9.22476 5.2307C9.20053 5.27044 9.21669 5.32607 9.25706 5.34991L10.5896 6.10889C10.634 6.13273 10.6865 6.11683 10.7107 6.0771Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M1.66713 3.51237L2.99963 2.75339C3.04001 2.72955 3.09654 2.74544 3.12077 2.78518L5.65251 7.09665C4.88128 6.89399 4.11408 6.69133 3.34285 6.48867C3.31862 6.4847 3.30247 6.4688 3.29036 6.44893L1.63483 3.63158C1.6106 3.58787 1.62271 3.53621 1.66713 3.51237Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M8.99793 5.20018L7.58871 5.99889C7.54833 6.02274 7.4918 6.00684 7.46757 5.9671L6.76095 4.76307C6.72057 4.69552 6.78517 4.61605 6.86189 4.63591C7.57256 4.82268 8.28726 5.00944 8.99793 5.20018Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M7.27986 6.07054L5.6526 3.2969C5.62837 3.25716 5.57588 3.24127 5.53146 3.26511L4.19896 4.02409C4.15858 4.04793 4.14243 4.09959 4.16666 4.1433L5.79392 6.91694C5.81815 6.95668 5.87064 6.97257 5.91506 6.94873L7.24756 6.18975C7.28794 6.16591 7.30409 6.11425 7.27986 6.07054Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M0.5 12.4998V10.9859C0.5 10.9382 0.540379 10.8984 0.588833 10.8984H5.64829C5.08299 11.4548 4.52172 12.0071 3.95642 12.5634C3.94027 12.5793 3.91604 12.5873 3.89585 12.5873H0.588833C0.540379 12.5873 0.5 12.5475 0.5 12.4998Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M5.65129 7.09766V8.70303C5.65129 8.75072 5.61091 8.79045 5.56246 8.79045H4.14516C4.06844 8.79045 4.02806 8.69508 4.08459 8.64343C4.60548 8.12685 5.12637 7.61424 5.65129 7.09766Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M5.55967 8.99609H2.30514C2.25669 8.99609 2.21631 9.03583 2.21631 9.08352V10.5975C2.21631 10.6452 2.25669 10.6849 2.30514 10.6849H5.55967C5.60813 10.6849 5.6485 10.6452 5.6485 10.5975V9.08352C5.6485 9.03583 5.60813 8.99609 5.55967 8.99609Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M7.82638 17.9865L6.49388 17.2276C6.4535 17.2037 6.43735 17.1521 6.46158 17.1083L8.99333 12.7969C9.19926 13.5559 9.40519 14.3109 9.61112 15.0698C9.6192 15.0937 9.61516 15.1175 9.60305 15.1374L7.95155 17.9547C7.91925 17.9985 7.86676 18.0104 7.82638 17.9865Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M5.64795 10.8984L7.05717 11.7011C7.09755 11.725 7.1137 11.7766 7.08947 11.8203L6.38284 13.0283C6.34246 13.0959 6.24152 13.084 6.22133 13.0085C6.02751 12.3012 5.83773 11.5978 5.64795 10.8984Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M7.2739 11.9258L5.64664 14.6994C5.62241 14.7392 5.63856 14.7948 5.67894 14.8187L7.01144 15.5776C7.05182 15.6015 7.10835 15.5856 7.13258 15.5458L8.75984 12.7722C8.78407 12.7325 8.76792 12.6768 8.72754 12.653L7.39504 11.894C7.35062 11.8702 7.29813 11.8861 7.2739 11.9258Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M16.3199 14.4866L14.9874 15.2456C14.947 15.2694 14.8904 15.2535 14.8662 15.2138L12.3345 10.9023C13.1057 11.105 13.8729 11.3077 14.6441 11.5103C14.6684 11.5143 14.6845 11.5302 14.6966 11.5501L16.3481 14.3674C16.3764 14.4111 16.3643 14.4628 16.3199 14.4866Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M8.99121 12.7983L10.4004 11.9956C10.4408 11.9717 10.4973 11.9876 10.5216 12.0274L11.2282 13.2354C11.2686 13.3029 11.204 13.3824 11.1272 13.3625C10.4166 13.1758 9.70188 12.989 8.99121 12.7983Z", fill: "#61C699" }), /* @__PURE__ */ React7.createElement("path", { d: "M10.7077 11.9285L12.3349 14.7021C12.3592 14.7418 12.4117 14.7577 12.4561 14.7339L13.7886 13.9749C13.829 13.9511 13.8451 13.8994 13.8209 13.8557L12.1936 11.0821C12.1694 11.0423 12.1169 11.0264 12.0725 11.0503L10.74 11.8092C10.6996 11.8331 10.6834 11.8847 10.7077 11.9285Z", fill: "#61C699" }))))
1131
+ ), /* @__PURE__ */ React7.createElement(
1132
+ CustomModal2_default,
3464
1133
  {
3465
- src: `${baseUrl}widget-form/${amount}?fractalpay_public_key=${fractalpayClientKey}&order_id=${orderID}`,
3466
- height: "auto",
3467
- width: "100%",
3468
- style: { display: loading ? "none" : "block" },
3469
- onLoad: handleLoad
3470
- }
3471
- ))));
1134
+ open: showConfirmationModal,
1135
+ onClose: handleCloseConfirmationModal
1136
+ },
1137
+ /* @__PURE__ */ React7.createElement("div", { className: "fractal-popup-content", style: { padding: "0px" } }, /* @__PURE__ */ React7.createElement("div", { className: "request-payment-success-container" }, /* @__PURE__ */ React7.createElement("span", { className: "request-payment-close-popup", onClick: handleCloseConfirmationModal }, /* @__PURE__ */ React7.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React7.createElement("g", { "clip-path": "url(#clip0_12425_52336)" }, /* @__PURE__ */ React7.createElement("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" })), /* @__PURE__ */ React7.createElement("defs", null, /* @__PURE__ */ React7.createElement("clipPath", { id: "clip0_12425_52336" }, /* @__PURE__ */ React7.createElement("rect", { width: "16", height: "16", fill: "white" }))))), /* @__PURE__ */ React7.createElement("div", { className: "request-payment-success-tick-div" }, /* @__PURE__ */ React7.createElement("div", { className: "request-payment-success-tick" }, /* @__PURE__ */ React7.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React7.createElement("path", { d: "M6.12669 13.9774C5.97396 14.131 5.76558 14.2167 5.54913 14.2167C5.33267 14.2167 5.1243 14.131 4.97157 13.9774L0.359012 9.36408C-0.119671 8.8854 -0.119671 8.10919 0.359012 7.6314L0.936573 7.05369C1.4154 6.57501 2.19072 6.57501 2.6694 7.05369L5.54913 9.93357L13.3306 2.15198C13.8094 1.6733 14.5855 1.6733 15.0634 2.15198L15.641 2.72969C16.1196 3.20837 16.1196 3.98444 15.641 4.46237L6.12669 13.9774Z", fill: "#61C699" })))), /* @__PURE__ */ React7.createElement("h6", { className: "request-payment-success-text" }, "The request ", /* @__PURE__ */ React7.createElement("br", null), "was sent"), /* @__PURE__ */ React7.createElement("h6", { className: "request-payment-success-subtext" }, "Please wait for the customer to pay"), /* @__PURE__ */ React7.createElement("div", { className: "request-payment-success-btn-div" }, /* @__PURE__ */ React7.createElement("button", { onClick: handleCloseConfirmationModal, className: "request-payment-success-btn2" }, "Close"))))
1138
+ )));
3472
1139
  }
3473
1140
  export {
3474
- CompletedTransactions,
3475
- GetPaymentDynamic,
3476
- Payment,
3477
1141
  RequestPayment,
3478
- RequestPaymentAllInput,
3479
- RequestPaymentDynamic,
3480
- RequestPaymentonClick,
3481
- RqstPaymntInputField,
3482
- TockenizPay
1142
+ RequestPreAuthPayment
3483
1143
  };