@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.d.mts +12 -45
- package/dist/index.d.ts +12 -45
- package/dist/index.js +186 -2527
- package/dist/index.mjs +186 -2526
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -47,15 +47,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
47
47
|
// src/app/index.ts
|
48
48
|
var index_exports = {};
|
49
49
|
__export(index_exports, {
|
50
|
-
CompletedTransactions: () => CompletedTransactions,
|
51
|
-
GetPaymentDynamic: () => GetPaymentDynamic,
|
52
|
-
Payment: () => Payment,
|
53
50
|
RequestPayment: () => RequestPayment,
|
54
|
-
|
55
|
-
RequestPaymentDynamic: () => RequestPaymentDynamic,
|
56
|
-
RequestPaymentonClick: () => RequestPaymentonClick,
|
57
|
-
RqstPaymntInputField: () => RqstPaymntInputField,
|
58
|
-
TockenizPay: () => TockenizPay
|
51
|
+
RequestPreAuthPayment: () => RequestPreAuthPayment
|
59
52
|
});
|
60
53
|
module.exports = __toCommonJS(index_exports);
|
61
54
|
|
@@ -948,2572 +941,238 @@ function RequestPayment(props) {
|
|
948
941
|
)));
|
949
942
|
}
|
950
943
|
|
951
|
-
// src/app/components/RequestPayment/
|
944
|
+
// src/app/components/RequestPayment/RequestPreAuthPayment.tsx
|
945
|
+
var import_bootstrap_bundle_min2 = require("bootstrap/dist/js/bootstrap.bundle.min.js");
|
952
946
|
var import_react7 = __toESM(require("react"));
|
953
|
-
var
|
954
|
-
var
|
955
|
-
|
956
|
-
|
957
|
-
const [isLoading, setIsLoading] = (0, import_react7.useState)(false);
|
947
|
+
var import_axios2 = __toESM(require("axios"));
|
948
|
+
var import_react_number_format2 = require("react-number-format");
|
949
|
+
function RequestPreAuthPayment(props) {
|
950
|
+
const fractalpayClientKey = props.fractalpayClientKey;
|
958
951
|
const [show, setShow] = (0, import_react7.useState)(false);
|
959
|
-
const [
|
960
|
-
const [
|
961
|
-
const [
|
962
|
-
const [
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
const
|
970
|
-
const
|
971
|
-
const
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
setSubmitClicked(true);
|
980
|
-
return;
|
981
|
-
}
|
982
|
-
if (!amount) {
|
983
|
-
setErrorMessageamount(ErrorText.amountenter);
|
984
|
-
setSubmitClicked(true);
|
985
|
-
return;
|
986
|
-
}
|
987
|
-
if (isNaN(Number(amount))) {
|
988
|
-
setErrorMessageamount(ErrorText.amountvalid);
|
989
|
-
setSubmitClicked(true);
|
990
|
-
return;
|
991
|
-
}
|
992
|
-
if (!orderId) {
|
993
|
-
setErrorMessageorderid(ErrorText.orderidenter);
|
994
|
-
setSubmitClicked(true);
|
995
|
-
return;
|
996
|
-
}
|
997
|
-
setErrorMessagephone("");
|
998
|
-
setErrorMessageamount("");
|
999
|
-
setErrorMessageorderid("");
|
1000
|
-
setSubmitClicked(true);
|
1001
|
-
setIsLoading(true);
|
1002
|
-
let formData = {
|
1003
|
-
fractalpayPublicKey: fractalpayClientKey,
|
1004
|
-
amount,
|
1005
|
-
phone_number: phoneNumber,
|
1006
|
-
orderId,
|
1007
|
-
action: "request"
|
1008
|
-
};
|
1009
|
-
const jsonData = JSON.stringify(formData);
|
1010
|
-
fetch(`${baseUrl}create-widget-order`, {
|
1011
|
-
method: "POST",
|
1012
|
-
headers: {
|
1013
|
-
"Content-Type": "application/json"
|
1014
|
-
},
|
1015
|
-
body: jsonData
|
1016
|
-
}).then((response) => {
|
1017
|
-
setIsLoading(false);
|
1018
|
-
if (!response.ok) {
|
1019
|
-
throw new Error(ErrorText.networkresponseerror);
|
1020
|
-
}
|
1021
|
-
return response.json();
|
1022
|
-
}).then((data) => {
|
1023
|
-
if (data.result === true) {
|
1024
|
-
setShow(true);
|
1025
|
-
}
|
1026
|
-
console.log(data);
|
1027
|
-
}).catch((error) => {
|
1028
|
-
setIsLoading(false);
|
1029
|
-
console.error("Error:", error);
|
1030
|
-
import_react_toastify.toast.error(ErrorText.anerroroccured);
|
1031
|
-
});
|
1032
|
-
};
|
1033
|
-
const handlePhoneNumberChange = (e) => {
|
1034
|
-
const number = e.target.value;
|
1035
|
-
const isValid = /^\d*$/.test(number);
|
1036
|
-
if (isValid) {
|
1037
|
-
setPhoneNumber(number);
|
1038
|
-
setIsValidNumber(number.length <= 10);
|
1039
|
-
if (number.length > 10) {
|
1040
|
-
setErrorMessagephone(ErrorText.phonenumberlength);
|
1041
|
-
} else {
|
1042
|
-
setErrorMessagephone("");
|
1043
|
-
}
|
1044
|
-
} else {
|
1045
|
-
setErrorMessagephone(ErrorText.phonenumbervalid);
|
1046
|
-
}
|
1047
|
-
};
|
1048
|
-
const handleAmountChange = (e) => {
|
1049
|
-
const amountValue = e.target.value;
|
1050
|
-
if (!isNaN(Number(amountValue))) {
|
1051
|
-
setAmount(amountValue);
|
1052
|
-
setIsValidAmount(true);
|
1053
|
-
setErrorMessageamount("");
|
1054
|
-
} else {
|
1055
|
-
setAmount("");
|
1056
|
-
setIsValidAmount(false);
|
1057
|
-
}
|
1058
|
-
};
|
1059
|
-
const handleOrderIdChange = (e) => {
|
1060
|
-
const orderIdValue = e.target.value;
|
1061
|
-
if (orderIdValue) {
|
1062
|
-
setOrderId(orderIdValue);
|
1063
|
-
setIsValidOrderId(true);
|
1064
|
-
setErrorMessageorderid("");
|
1065
|
-
} else {
|
1066
|
-
setOrderId("");
|
1067
|
-
setIsValidOrderId(false);
|
1068
|
-
}
|
1069
|
-
};
|
1070
|
-
return /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ import_react7.default.createElement("div", { className: " border-container" }, /* @__PURE__ */ import_react7.default.createElement("div", { className: "payment-column" }, /* @__PURE__ */ import_react7.default.createElement("label", null, "Enter Phone Number:"), /* @__PURE__ */ import_react7.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react7.default.createElement(
|
1071
|
-
"input",
|
1072
|
-
{
|
1073
|
-
type: "text",
|
1074
|
-
value: phoneNumber,
|
1075
|
-
onChange: handlePhoneNumberChange,
|
1076
|
-
placeholder: "Enter phone number",
|
1077
|
-
maxLength: 10,
|
1078
|
-
className: submitClicked && (!phoneNumber || !isValidNumber) ? "error" : ""
|
1079
|
-
}
|
1080
|
-
), errorMessagephone && /* @__PURE__ */ import_react7.default.createElement("div", { className: "error-message text-danger" }, errorMessagephone))), /* @__PURE__ */ import_react7.default.createElement("div", { className: "payment-column" }, /* @__PURE__ */ import_react7.default.createElement("label", null, "Enter Amount:"), /* @__PURE__ */ import_react7.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react7.default.createElement(
|
1081
|
-
"input",
|
1082
|
-
{
|
1083
|
-
type: "text",
|
1084
|
-
value: amount,
|
1085
|
-
onChange: handleAmountChange,
|
1086
|
-
placeholder: "Enter amount",
|
1087
|
-
className: submitClicked && (!amount || !isValidAmount) ? "error" : ""
|
1088
|
-
}
|
1089
|
-
), errorMessageamount && /* @__PURE__ */ import_react7.default.createElement("div", { className: "error-message text-danger" }, errorMessageamount))), /* @__PURE__ */ import_react7.default.createElement("div", { className: "payment-column" }, /* @__PURE__ */ import_react7.default.createElement("label", null, "Enter Order ID:"), /* @__PURE__ */ import_react7.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react7.default.createElement(
|
1090
|
-
"input",
|
1091
|
-
{
|
1092
|
-
type: "text",
|
1093
|
-
value: orderId,
|
1094
|
-
onChange: handleOrderIdChange,
|
1095
|
-
placeholder: "Enter order ID",
|
1096
|
-
className: submitClicked && (!orderId || !isValidOrderId) ? "error" : ""
|
1097
|
-
}
|
1098
|
-
), errorMessageorderid && /* @__PURE__ */ import_react7.default.createElement("div", { className: "error-message text-danger" }, errorMessageorderid))), /* @__PURE__ */ import_react7.default.createElement(
|
1099
|
-
"button",
|
1100
|
-
{
|
1101
|
-
onClick: sendRequestPayment,
|
1102
|
-
disabled: isLoading || !isValidNumber || !isValidAmount || !isValidOrderId,
|
1103
|
-
className: "paymentBtn"
|
1104
|
-
},
|
1105
|
-
isLoading ? "Loading..." : "Request Payment"
|
1106
|
-
)), /* @__PURE__ */ import_react7.default.createElement(import_react_bootstrap.Modal, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ import_react7.default.createElement(import_react_bootstrap.Modal.Header, { closeButton: true }), /* @__PURE__ */ import_react7.default.createElement(import_react_bootstrap.Modal.Body, null, /* @__PURE__ */ import_react7.default.createElement(
|
1107
|
-
"svg",
|
1108
|
-
{
|
1109
|
-
width: "60",
|
1110
|
-
height: "60",
|
1111
|
-
viewBox: "0 0 60 60",
|
1112
|
-
fill: "none",
|
1113
|
-
xmlns: "http://www.w3.org/2000/svg"
|
1114
|
-
},
|
1115
|
-
/* @__PURE__ */ import_react7.default.createElement(
|
1116
|
-
"rect",
|
1117
|
-
{
|
1118
|
-
x: "0.5",
|
1119
|
-
y: "0.5",
|
1120
|
-
width: "59",
|
1121
|
-
height: "59",
|
1122
|
-
rx: "29.5",
|
1123
|
-
stroke: "#31B379"
|
1124
|
-
}
|
1125
|
-
),
|
1126
|
-
/* @__PURE__ */ import_react7.default.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ import_react7.default.createElement(
|
1127
|
-
"path",
|
1128
|
-
{
|
1129
|
-
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",
|
1130
|
-
fill: "#31B379"
|
1131
|
-
}
|
1132
|
-
)),
|
1133
|
-
/* @__PURE__ */ import_react7.default.createElement("defs", null, /* @__PURE__ */ import_react7.default.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ import_react7.default.createElement(
|
1134
|
-
"rect",
|
1135
|
-
{
|
1136
|
-
width: "22",
|
1137
|
-
height: "22",
|
1138
|
-
fill: "white",
|
1139
|
-
transform: "translate(19.5 19.0039)"
|
1140
|
-
}
|
1141
|
-
)))
|
1142
|
-
), /* @__PURE__ */ import_react7.default.createElement("h1", null, "Success!"), /* @__PURE__ */ import_react7.default.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ import_react7.default.createElement(import_react_bootstrap.Modal.Footer, null, /* @__PURE__ */ import_react7.default.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))), /* @__PURE__ */ import_react7.default.createElement(import_react_toastify.ToastContainer, null));
|
1143
|
-
}
|
1144
|
-
|
1145
|
-
// src/app/components/RequestPayment/RequestPaymentDynamic.tsx
|
1146
|
-
var import_react8 = __toESM(require("react"));
|
1147
|
-
var import_react_bootstrap2 = require("react-bootstrap");
|
1148
|
-
|
1149
|
-
// src/app/components/Api/createWidgetOrder.ts
|
1150
|
-
var createWidgetOrder = (formData) => {
|
1151
|
-
const jsonData = JSON.stringify(formData);
|
1152
|
-
return fetch(`${baseUrl}create-widget-order`, {
|
1153
|
-
method: "POST",
|
1154
|
-
headers: {
|
1155
|
-
"Content-Type": "application/json"
|
1156
|
-
},
|
1157
|
-
body: jsonData
|
1158
|
-
}).then((response) => {
|
1159
|
-
if (!response.ok) {
|
1160
|
-
throw new Error(ErrorText.networkresponseerror);
|
1161
|
-
}
|
1162
|
-
return response.json();
|
1163
|
-
}).then((data) => {
|
1164
|
-
return data;
|
1165
|
-
});
|
1166
|
-
};
|
1167
|
-
|
1168
|
-
// src/app/components/RequestPayment/RequestPaymentDynamic.tsx
|
1169
|
-
function RequestPaymentDynamic({ fractalpayClientKey, amount, phone_number, orderID }) {
|
1170
|
-
const [isLoading, setIsLoading] = (0, import_react8.useState)(false);
|
1171
|
-
const [show, setShow] = (0, import_react8.useState)(false);
|
1172
|
-
const handleClose = () => setShow(false);
|
1173
|
-
const handleShow = () => setShow(true);
|
1174
|
-
const sendRequestPayment = () => {
|
1175
|
-
setIsLoading(true);
|
1176
|
-
const formData = {
|
1177
|
-
fractalpayPublicKey: fractalpayClientKey,
|
1178
|
-
amount,
|
1179
|
-
phone_number,
|
1180
|
-
orderId: orderID,
|
1181
|
-
action: "request"
|
1182
|
-
};
|
1183
|
-
createWidgetOrder(formData).then((data) => {
|
1184
|
-
setIsLoading(false);
|
1185
|
-
if (data.result === true) {
|
1186
|
-
setShow(true);
|
1187
|
-
}
|
1188
|
-
console.log(data);
|
1189
|
-
}).catch((error) => {
|
1190
|
-
setIsLoading(false);
|
1191
|
-
console.error("Error:", error);
|
1192
|
-
});
|
1193
|
-
};
|
1194
|
-
return /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, /* @__PURE__ */ import_react8.default.createElement(
|
1195
|
-
"button",
|
1196
|
-
{
|
1197
|
-
onClick: sendRequestPayment,
|
1198
|
-
disabled: isLoading,
|
1199
|
-
className: "paymentBtn"
|
1200
|
-
},
|
1201
|
-
isLoading ? "Loading..." : "Request Payment"
|
1202
|
-
), /* @__PURE__ */ import_react8.default.createElement(import_react_bootstrap2.Modal, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ import_react8.default.createElement(import_react_bootstrap2.Modal.Header, { closeButton: true }), /* @__PURE__ */ import_react8.default.createElement(import_react_bootstrap2.Modal.Body, null, /* @__PURE__ */ import_react8.default.createElement(
|
1203
|
-
"svg",
|
1204
|
-
{
|
1205
|
-
width: "60",
|
1206
|
-
height: "60",
|
1207
|
-
viewBox: "0 0 60 60",
|
1208
|
-
fill: "none",
|
1209
|
-
xmlns: "http://www.w3.org/2000/svg"
|
1210
|
-
},
|
1211
|
-
/* @__PURE__ */ import_react8.default.createElement(
|
1212
|
-
"rect",
|
1213
|
-
{
|
1214
|
-
x: "0.5",
|
1215
|
-
y: "0.5",
|
1216
|
-
width: "59",
|
1217
|
-
height: "59",
|
1218
|
-
rx: "29.5",
|
1219
|
-
stroke: "#31B379"
|
1220
|
-
}
|
1221
|
-
),
|
1222
|
-
/* @__PURE__ */ import_react8.default.createElement("g", { "clip-path": "url(#clip0_2659_5018)" }, /* @__PURE__ */ import_react8.default.createElement(
|
1223
|
-
"path",
|
1224
|
-
{
|
1225
|
-
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",
|
1226
|
-
fill: "#31B379"
|
1227
|
-
}
|
1228
|
-
)),
|
1229
|
-
/* @__PURE__ */ import_react8.default.createElement("defs", null, /* @__PURE__ */ import_react8.default.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ import_react8.default.createElement(
|
1230
|
-
"rect",
|
1231
|
-
{
|
1232
|
-
width: "22",
|
1233
|
-
height: "22",
|
1234
|
-
fill: "white",
|
1235
|
-
transform: "translate(19.5 19.0039)"
|
1236
|
-
}
|
1237
|
-
)))
|
1238
|
-
), /* @__PURE__ */ import_react8.default.createElement("h1", null, "Success!"), /* @__PURE__ */ import_react8.default.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ import_react8.default.createElement(import_react_bootstrap2.Modal.Footer, null, /* @__PURE__ */ import_react8.default.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))));
|
1239
|
-
}
|
1240
|
-
|
1241
|
-
// src/app/components/RequestPayment/RequestPaymentonClick.tsx
|
1242
|
-
var import_react9 = __toESM(require("react"));
|
1243
|
-
var import_react_bootstrap3 = require("react-bootstrap");
|
1244
|
-
function RequestPaymentonClick(props) {
|
1245
|
-
const [isLoading, setIsLoading] = (0, import_react9.useState)(false);
|
1246
|
-
const [show, setShow] = (0, import_react9.useState)(false);
|
1247
|
-
const handleClose = () => setShow(false);
|
1248
|
-
const handleShow = () => setShow(true);
|
1249
|
-
const { fractalpayClientKey, amount, phone_number, orderID, onSuccess, onError } = props;
|
1250
|
-
const sendRequestPayment = () => {
|
1251
|
-
setIsLoading(true);
|
1252
|
-
let formData = {
|
1253
|
-
fractalpayPublicKey: fractalpayClientKey,
|
1254
|
-
amount,
|
1255
|
-
phone_number,
|
1256
|
-
orderId: orderID,
|
1257
|
-
action: "request"
|
1258
|
-
};
|
1259
|
-
const jsonData = JSON.stringify(formData);
|
1260
|
-
fetch(`${baseUrl}create-widget-order`, {
|
1261
|
-
method: "POST",
|
1262
|
-
headers: {
|
1263
|
-
"Content-Type": "application/json"
|
1264
|
-
},
|
1265
|
-
body: jsonData
|
1266
|
-
}).then((response) => {
|
1267
|
-
setIsLoading(false);
|
1268
|
-
if (!response.ok) {
|
1269
|
-
throw new Error(ErrorText.networkresponseerror);
|
1270
|
-
}
|
1271
|
-
return response.json();
|
1272
|
-
}).then((data) => {
|
1273
|
-
setShow(true);
|
1274
|
-
console.log(data);
|
1275
|
-
}).catch((error) => {
|
1276
|
-
setIsLoading(false);
|
1277
|
-
console.error("Error:", error);
|
1278
|
-
});
|
1279
|
-
};
|
1280
|
-
return /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, /* @__PURE__ */ import_react9.default.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ import_react9.default.createElement(
|
1281
|
-
"button",
|
1282
|
-
{
|
1283
|
-
onClick: sendRequestPayment,
|
1284
|
-
disabled: isLoading,
|
1285
|
-
className: "paymentBtn"
|
1286
|
-
},
|
1287
|
-
isLoading ? "Loading..." : "Request Payment"
|
1288
|
-
), /* @__PURE__ */ import_react9.default.createElement(import_react_bootstrap3.Modal, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ import_react9.default.createElement(import_react_bootstrap3.Modal.Header, { closeButton: true }), /* @__PURE__ */ import_react9.default.createElement(import_react_bootstrap3.Modal.Body, null, onSuccess && /* @__PURE__ */ import_react9.default.createElement(
|
1289
|
-
"svg",
|
1290
|
-
{
|
1291
|
-
width: "60",
|
1292
|
-
height: "60",
|
1293
|
-
viewBox: "0 0 60 60",
|
1294
|
-
fill: "none",
|
1295
|
-
xmlns: "http://www.w3.org/2000/svg"
|
1296
|
-
},
|
1297
|
-
/* @__PURE__ */ import_react9.default.createElement(
|
1298
|
-
"rect",
|
1299
|
-
{
|
1300
|
-
x: "0.5",
|
1301
|
-
y: "0.5",
|
1302
|
-
width: "59",
|
1303
|
-
height: "59",
|
1304
|
-
rx: "29.5",
|
1305
|
-
stroke: "#31B379"
|
1306
|
-
}
|
1307
|
-
),
|
1308
|
-
/* @__PURE__ */ import_react9.default.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ import_react9.default.createElement(
|
1309
|
-
"path",
|
1310
|
-
{
|
1311
|
-
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",
|
1312
|
-
fill: "#31B379"
|
1313
|
-
}
|
1314
|
-
)),
|
1315
|
-
/* @__PURE__ */ import_react9.default.createElement("defs", null, /* @__PURE__ */ import_react9.default.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ import_react9.default.createElement(
|
1316
|
-
"rect",
|
1317
|
-
{
|
1318
|
-
width: "22",
|
1319
|
-
height: "22",
|
1320
|
-
fill: "white",
|
1321
|
-
transform: "translate(19.5 19.0039)"
|
1322
|
-
}
|
1323
|
-
)))
|
1324
|
-
), onSuccess ? /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, /* @__PURE__ */ import_react9.default.createElement("h1", null, "Success!"), /* @__PURE__ */ import_react9.default.createElement("h4", null, onSuccess)) : /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, /* @__PURE__ */ import_react9.default.createElement("h1", null, "Error!"), /* @__PURE__ */ import_react9.default.createElement("h4", null, onError))), /* @__PURE__ */ import_react9.default.createElement(import_react_bootstrap3.Modal.Footer, null, /* @__PURE__ */ import_react9.default.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))));
|
1325
|
-
}
|
1326
|
-
|
1327
|
-
// src/app/components/RequestPayment/RqstPaymntInputField.tsx
|
1328
|
-
var import_react10 = __toESM(require("react"));
|
1329
|
-
var import_react_bootstrap4 = require("react-bootstrap");
|
1330
|
-
var import_react_toastify2 = require("react-toastify");
|
1331
|
-
var import_ReactToastify2 = require("react-toastify/dist/ReactToastify.css");
|
1332
|
-
function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
|
1333
|
-
const [isLoading, setIsLoading] = (0, import_react10.useState)(false);
|
1334
|
-
const [show, setShow] = (0, import_react10.useState)(false);
|
1335
|
-
const [phoneNumber, setPhoneNumber] = (0, import_react10.useState)("");
|
1336
|
-
const [isValidNumber, setIsValidNumber] = (0, import_react10.useState)(true);
|
1337
|
-
const [errorMessage, setErrorMessage] = (0, import_react10.useState)("");
|
1338
|
-
const [submitClicked, setSubmitClicked] = (0, import_react10.useState)(false);
|
1339
|
-
const handleClose = () => setShow(false);
|
1340
|
-
const handleShow = () => setShow(true);
|
1341
|
-
const sendRequestPayment = () => {
|
1342
|
-
if (!phoneNumber) {
|
1343
|
-
setErrorMessage(ErrorText.phonenumberrequired);
|
1344
|
-
setSubmitClicked(true);
|
1345
|
-
return;
|
1346
|
-
}
|
1347
|
-
if (!/^\d{10}$/.test(phoneNumber)) {
|
1348
|
-
setErrorMessage(ErrorText.phonenumbervalid);
|
1349
|
-
setSubmitClicked(true);
|
1350
|
-
return;
|
1351
|
-
}
|
1352
|
-
setErrorMessage("");
|
1353
|
-
setSubmitClicked(true);
|
1354
|
-
setIsLoading(true);
|
1355
|
-
let formData = {
|
1356
|
-
fractalpayPublicKey: fractalpayClientKey,
|
1357
|
-
amount,
|
1358
|
-
phone_number: phoneNumber,
|
1359
|
-
orderId: orderID,
|
1360
|
-
action: "request"
|
1361
|
-
};
|
1362
|
-
const jsonData = JSON.stringify(formData);
|
1363
|
-
fetch(`${baseUrl}create-widget-order`, {
|
1364
|
-
method: "POST",
|
1365
|
-
headers: {
|
1366
|
-
"Content-Type": "application/json"
|
1367
|
-
},
|
1368
|
-
body: jsonData
|
1369
|
-
}).then((response) => {
|
1370
|
-
setIsLoading(false);
|
1371
|
-
if (!response.ok) {
|
1372
|
-
throw new Error(ErrorText.networkresponseerror);
|
1373
|
-
}
|
1374
|
-
return response.json();
|
1375
|
-
}).then((data) => {
|
1376
|
-
if (data.result === true) {
|
1377
|
-
setShow(true);
|
1378
|
-
}
|
1379
|
-
console.log(data);
|
1380
|
-
}).catch((error) => {
|
1381
|
-
setIsLoading(false);
|
1382
|
-
console.error("Error:", error);
|
1383
|
-
import_react_toastify2.toast.error(ErrorText.anerroroccured);
|
1384
|
-
});
|
1385
|
-
};
|
1386
|
-
const handlePhoneNumberChange = (e) => {
|
1387
|
-
const number = e.target.value;
|
1388
|
-
const isValid = /^\d*$/.test(number);
|
1389
|
-
if (isValid) {
|
1390
|
-
setPhoneNumber(number);
|
1391
|
-
setIsValidNumber(number.length <= 10);
|
1392
|
-
if (number.length > 10) {
|
1393
|
-
setErrorMessage(ErrorText.phonenumberlength);
|
1394
|
-
} else {
|
1395
|
-
setErrorMessage("");
|
1396
|
-
}
|
1397
|
-
} else {
|
1398
|
-
setErrorMessage(ErrorText.phonenumbervalid);
|
1399
|
-
}
|
1400
|
-
};
|
1401
|
-
return /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement("div", { className: "payment-container" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "input-wrapper" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react10.default.createElement(
|
1402
|
-
"input",
|
1403
|
-
{
|
1404
|
-
type: "text",
|
1405
|
-
value: phoneNumber,
|
1406
|
-
onChange: handlePhoneNumberChange,
|
1407
|
-
placeholder: "Enter phone number",
|
1408
|
-
maxLength: 10,
|
1409
|
-
className: submitClicked && (!phoneNumber || !isValidNumber) ? "error" : ""
|
1410
|
-
}
|
1411
|
-
), errorMessage && /* @__PURE__ */ import_react10.default.createElement("div", { className: "error-message text-danger" }, errorMessage))), /* @__PURE__ */ import_react10.default.createElement("div", { className: "button-wrapper" }, /* @__PURE__ */ import_react10.default.createElement(
|
1412
|
-
"button",
|
1413
|
-
{
|
1414
|
-
onClick: sendRequestPayment,
|
1415
|
-
disabled: isLoading || !isValidNumber,
|
1416
|
-
className: "paymentBtn"
|
1417
|
-
},
|
1418
|
-
isLoading ? "Loading..." : "Request Payment"
|
1419
|
-
))), /* @__PURE__ */ import_react10.default.createElement(import_react_bootstrap4.Modal, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ import_react10.default.createElement(import_react_bootstrap4.Modal.Header, { closeButton: true }), /* @__PURE__ */ import_react10.default.createElement(import_react_bootstrap4.Modal.Body, null, /* @__PURE__ */ import_react10.default.createElement(
|
1420
|
-
"svg",
|
1421
|
-
{
|
1422
|
-
width: "60",
|
1423
|
-
height: "60",
|
1424
|
-
viewBox: "0 0 60 60",
|
1425
|
-
fill: "none",
|
1426
|
-
xmlns: "http://www.w3.org/2000/svg"
|
1427
|
-
},
|
1428
|
-
/* @__PURE__ */ import_react10.default.createElement(
|
1429
|
-
"rect",
|
1430
|
-
{
|
1431
|
-
x: "0.5",
|
1432
|
-
y: "0.5",
|
1433
|
-
width: "59",
|
1434
|
-
height: "59",
|
1435
|
-
rx: "29.5",
|
1436
|
-
stroke: "#31B379"
|
1437
|
-
}
|
1438
|
-
),
|
1439
|
-
/* @__PURE__ */ import_react10.default.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ import_react10.default.createElement(
|
1440
|
-
"path",
|
1441
|
-
{
|
1442
|
-
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",
|
1443
|
-
fill: "#31B379"
|
1444
|
-
}
|
1445
|
-
)),
|
1446
|
-
/* @__PURE__ */ import_react10.default.createElement("defs", null, /* @__PURE__ */ import_react10.default.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ import_react10.default.createElement(
|
1447
|
-
"rect",
|
1448
|
-
{
|
1449
|
-
width: "22",
|
1450
|
-
height: "22",
|
1451
|
-
fill: "white",
|
1452
|
-
transform: "translate(19.5 19.0039)"
|
1453
|
-
}
|
1454
|
-
)))
|
1455
|
-
), /* @__PURE__ */ import_react10.default.createElement("h1", null, "Success!"), /* @__PURE__ */ import_react10.default.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ import_react10.default.createElement(import_react_bootstrap4.Modal.Footer, null, /* @__PURE__ */ import_react10.default.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))), /* @__PURE__ */ import_react10.default.createElement(import_react_toastify2.ToastContainer, null));
|
1456
|
-
}
|
1457
|
-
|
1458
|
-
// src/app/components/Payment/Payment.tsx
|
1459
|
-
var import_react12 = __toESM(require("react"));
|
1460
|
-
var import_node_forge = __toESM(require("node-forge"));
|
1461
|
-
var import_react_toastify3 = require("react-toastify");
|
1462
|
-
var import_react_bootstrap5 = require("react-bootstrap");
|
1463
|
-
|
1464
|
-
// src/app/components/Payment/Paymentstyles.tsx
|
1465
|
-
var import_react11 = __toESM(require("react"));
|
1466
|
-
function Paymentstyles() {
|
1467
|
-
return /* @__PURE__ */ import_react11.default.createElement("style", null, `
|
1468
|
-
.paymentBtn {
|
1469
|
-
background-color: black;
|
1470
|
-
border: none;
|
1471
|
-
color: white;
|
1472
|
-
padding: 15px 32px;
|
1473
|
-
text-align: center;
|
1474
|
-
text-decoration: none;
|
1475
|
-
display: inline-block;
|
1476
|
-
font-size: 16px;
|
1477
|
-
margin: 4px 2px;
|
1478
|
-
cursor: pointer;
|
1479
|
-
border-radius: 180px;
|
1480
|
-
/* width: auto; */
|
1481
|
-
}
|
1482
|
-
|
1483
|
-
.modal-backdrop {
|
1484
|
-
display: none !important;
|
1485
|
-
}
|
1486
|
-
|
1487
|
-
/* CSS for modal */
|
1488
|
-
.modal {
|
1489
|
-
/* display: none; */
|
1490
|
-
position: fixed;
|
1491
|
-
z-index: 5555;
|
1492
|
-
left: 0;
|
1493
|
-
top: 0;
|
1494
|
-
width: 100%;
|
1495
|
-
height: 100%;
|
1496
|
-
overflow: auto;
|
1497
|
-
background-color: rgba(0, 0, 0, 0.8);
|
1498
|
-
}
|
1499
|
-
|
1500
|
-
.input-container {
|
1501
|
-
position: relative;
|
1502
|
-
}
|
1503
|
-
|
1504
|
-
.error {
|
1505
|
-
/* border: 1px solid red; */
|
1506
|
-
color: #ffe6e6;
|
1507
|
-
/* light red background color */
|
1508
|
-
}
|
1509
|
-
|
1510
|
-
.form-group {
|
1511
|
-
margin-bottom: 15px;
|
1512
|
-
}
|
1513
|
-
|
1514
|
-
.input-container input {
|
1515
|
-
padding-right: 25px;
|
1516
|
-
}
|
1517
|
-
|
1518
|
-
.modal-header {
|
1519
|
-
border-bottom: 0 !important;
|
1520
|
-
padding-top: 0 !important;
|
1521
|
-
}
|
1522
|
-
|
1523
|
-
/* CSS for modal content */
|
1524
|
-
.modal-content {
|
1525
|
-
/* height: 90vh !important; */
|
1526
|
-
height: auto;
|
1527
|
-
/* padding: 20px; */
|
1528
|
-
padding: 20px 2px !important;
|
1529
|
-
/* background: #fff; */
|
1530
|
-
border-radius: 20px !important;
|
1531
|
-
position: relative;
|
1532
|
-
width: 430px;
|
1533
|
-
margin: 30px auto;
|
1534
|
-
overflow: hidden !important;
|
1535
|
-
}
|
1536
|
-
.input-container {
|
1537
|
-
display: flex;
|
1538
|
-
align-items: baseline;
|
1539
|
-
}
|
1540
|
-
|
1541
|
-
.input-error-container {
|
1542
|
-
flex: 1;
|
1543
|
-
}
|
1544
|
-
|
1545
|
-
.paymentBtn {
|
1546
|
-
margin-left: 10px;
|
1547
|
-
}
|
1548
|
-
|
1549
|
-
.PayButton {
|
1550
|
-
outline: 0 !important;
|
1551
|
-
height: 46px;
|
1552
|
-
font-size: 16px;
|
1553
|
-
background-color: #161616 !important;
|
1554
|
-
border: none;
|
1555
|
-
display: block;
|
1556
|
-
width: 100%;
|
1557
|
-
border-radius: 180px;
|
1558
|
-
margin: 10px 0;
|
1559
|
-
}
|
1560
|
-
|
1561
|
-
#PayButton:hover {
|
1562
|
-
background-color: #61c699 !important;
|
1563
|
-
}
|
1564
|
-
|
1565
|
-
#PayButton:active {
|
1566
|
-
background-color: #61c699 !important;
|
1567
|
-
}
|
1568
|
-
|
1569
|
-
#PayButton:disabled {
|
1570
|
-
background: rgb(172, 44, 170) !important;
|
1571
|
-
color: #fff !important;
|
1572
|
-
}
|
1573
|
-
|
1574
|
-
label {
|
1575
|
-
color: rgba(53, 37, 77, 0.6);
|
1576
|
-
margin-bottom: 2px;
|
1577
|
-
text-transform: uppercase;
|
1578
|
-
font-family: "IBM Plex Mono", monospace;
|
1579
|
-
font-weight: 500;
|
1580
|
-
font-size: 12px;
|
1581
|
-
}
|
1582
|
-
|
1583
|
-
.input-container {
|
1584
|
-
position: relative;
|
1585
|
-
}
|
1586
|
-
|
1587
|
-
.input-container input {
|
1588
|
-
padding-right: 25px;
|
1589
|
-
}
|
1590
|
-
|
1591
|
-
#Checkout {
|
1592
|
-
/* z-index: 100001; */
|
1593
|
-
width: 100%;
|
1594
|
-
/* height: 100%; */
|
1595
|
-
/* background: 0 0 #ffffff; */
|
1596
|
-
border-radius: 24px;
|
1597
|
-
border: 1px solid #e0dfe2;
|
1598
|
-
display: block;
|
1599
|
-
}
|
1600
|
-
|
1601
|
-
.container {
|
1602
|
-
margin-top: 10px;
|
1603
|
-
}
|
1604
|
-
|
1605
|
-
.powered-logo {
|
1606
|
-
width: 18px;
|
1607
|
-
height: 18px;
|
1608
|
-
/* float: right; */
|
1609
|
-
padding: 2px;
|
1610
|
-
background: #000000;
|
1611
|
-
border-radius: 4px;
|
1612
|
-
/* margin-left: 5px; */
|
1613
|
-
}
|
1614
|
-
|
1615
|
-
.modal-content .container {
|
1616
|
-
width: 100%;
|
1617
|
-
}
|
1618
|
-
|
1619
|
-
.powerd-by-part {
|
1620
|
-
display: flex;
|
1621
|
-
justify-content: center;
|
1622
|
-
align-items: center;
|
1623
|
-
gap: 5px;
|
1624
|
-
}
|
1625
|
-
|
1626
|
-
.errorText {
|
1627
|
-
color: red;
|
1628
|
-
}
|
1629
|
-
|
1630
|
-
.input-group {
|
1631
|
-
position: relative;
|
1632
|
-
}
|
1633
|
-
|
1634
|
-
.paynowbtn {
|
1635
|
-
outline: 0 !important;
|
1636
|
-
padding: 7px 25px !important;
|
1637
|
-
font-size: 13px;
|
1638
|
-
background-color: #161616 !important;
|
1639
|
-
border: #161616 1px solid !important;
|
1640
|
-
color: #fff !important;
|
1641
|
-
display: inline-block !important;
|
1642
|
-
border-radius: 180px !important;
|
1643
|
-
}
|
1644
|
-
|
1645
|
-
.paynowbtn:hover {
|
1646
|
-
background-color: #fff !important;
|
1647
|
-
border: #161616 1px solid !important;
|
1648
|
-
color: #161616 !important;
|
1649
|
-
}
|
1650
|
-
|
1651
|
-
.ButtonGroup__root.btn-group {
|
1652
|
-
margin: 10px 0 20px 0;
|
1653
|
-
}
|
1654
|
-
|
1655
|
-
.ButtonGroup__root.btn-group button {
|
1656
|
-
background: #000;
|
1657
|
-
border: 0;
|
1658
|
-
margin: 0 5px;
|
1659
|
-
border-radius: 4px !important;
|
1660
|
-
}
|
1661
|
-
|
1662
|
-
.ButtonGroup__root.btn-group button:hover,
|
1663
|
-
.ButtonGroup__root.btn-group button:focus {
|
1664
|
-
background: #333 !important;
|
1665
|
-
}
|
1666
|
-
|
1667
|
-
.input-group button {
|
1668
|
-
background: #000;
|
1669
|
-
border: 0;
|
1670
|
-
margin: 0 5px;
|
1671
|
-
border-radius: 0 4px 4px 0 !important;
|
1672
|
-
}
|
1673
|
-
|
1674
|
-
.input-group button:hover,
|
1675
|
-
.input-group button:focus {
|
1676
|
-
background: #333 !important;
|
1677
|
-
}
|
1678
|
-
|
1679
|
-
.payment-suc {
|
1680
|
-
text-align: center;
|
1681
|
-
}
|
1682
|
-
|
1683
|
-
.payment-suc .modal-dialog {
|
1684
|
-
min-width: 600px;
|
1685
|
-
padding: 50px 0;
|
1686
|
-
}
|
1687
|
-
|
1688
|
-
.payment-suc h2 {
|
1689
|
-
font-size: 24px;
|
1690
|
-
color: #35254d;
|
1691
|
-
font-weight: 500;
|
1692
|
-
padding: 15px 0;
|
1693
|
-
}
|
1694
|
-
|
1695
|
-
.payment-suc p {
|
1696
|
-
font-size: 14px;
|
1697
|
-
color: #9a92a6;
|
1698
|
-
font-weight: 500;
|
1699
|
-
}
|
1700
|
-
|
1701
|
-
.payment-suc .btn-close {
|
1702
|
-
position: absolute;
|
1703
|
-
right: 20px;
|
1704
|
-
}
|
1705
|
-
|
1706
|
-
.Checkout.container iframe {
|
1707
|
-
width: 100%;
|
1708
|
-
overflow: hidden !important;
|
1709
|
-
}
|
1710
|
-
|
1711
|
-
.responsive-tbl {
|
1712
|
-
overflow-x: auto;
|
1713
|
-
}
|
1714
|
-
|
1715
|
-
body {
|
1716
|
-
position: relative !important;
|
1717
|
-
}
|
1718
|
-
|
1719
|
-
thead,
|
1720
|
-
tbody,
|
1721
|
-
tfoot,
|
1722
|
-
tr,
|
1723
|
-
td,
|
1724
|
-
th {
|
1725
|
-
white-space: nowrap;
|
1726
|
-
}
|
1727
|
-
|
1728
|
-
.button-group {
|
1729
|
-
display: flex;
|
1730
|
-
gap: 10px;
|
1731
|
-
}
|
1732
|
-
|
1733
|
-
.rqstonClickbtn {
|
1734
|
-
color: #fff;
|
1735
|
-
background-color: #337ab7;
|
1736
|
-
border-color: #2e6da4;
|
1737
|
-
}
|
1738
|
-
|
1739
|
-
.loading-animation {
|
1740
|
-
position: absolute;
|
1741
|
-
top: 50%;
|
1742
|
-
left: 50%;
|
1743
|
-
transform: translate(-50%, -50%);
|
1744
|
-
}
|
1745
|
-
|
1746
|
-
.spinner {
|
1747
|
-
width: 40px;
|
1748
|
-
height: 40px;
|
1749
|
-
border-radius: 50%;
|
1750
|
-
border: 4px solid #f3f3f3;
|
1751
|
-
border-top: 4px solid black;
|
1752
|
-
animation: spin 1s linear infinite;
|
1753
|
-
}
|
1754
|
-
|
1755
|
-
@keyframes spin {
|
1756
|
-
0% {
|
1757
|
-
transform: rotate(0deg);
|
1758
|
-
}
|
1759
|
-
|
1760
|
-
100% {
|
1761
|
-
transform: rotate(360deg);
|
1762
|
-
}
|
1763
|
-
}
|
1764
|
-
|
1765
|
-
/* .border-container {
|
1766
|
-
display: flex;
|
1767
|
-
flex-direction: column;
|
1768
|
-
border: 0px solid #ccc;
|
1769
|
-
padding: 20px;
|
1770
|
-
border-radius: 10px;
|
1771
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
1772
|
-
align-items: baseline;
|
1773
|
-
}
|
1774
|
-
.payment-container {
|
1775
|
-
border: 0px solid #ccc;
|
1776
|
-
padding: 20px;
|
1777
|
-
border-radius: 10px;
|
1778
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
1779
|
-
} */
|
1780
|
-
|
1781
|
-
.payment-row {
|
1782
|
-
display: flex;
|
1783
|
-
align-items: center;
|
1784
|
-
margin-bottom: 20px;
|
1785
|
-
}
|
1786
|
-
|
1787
|
-
.payment-row label {
|
1788
|
-
width: 150px;
|
1789
|
-
font-weight: bold;
|
1790
|
-
margin-right: 10px;
|
1791
|
-
}
|
1792
|
-
|
1793
|
-
.payment-row input {
|
1794
|
-
flex-grow: 1;
|
1795
|
-
margin-right: 10px;
|
1796
|
-
}
|
1797
|
-
|
1798
|
-
.payment-row button {
|
1799
|
-
flex-grow: 1;
|
1800
|
-
}
|
1801
|
-
|
1802
|
-
.payment-row {
|
1803
|
-
display: flex;
|
1804
|
-
flex-direction: column;
|
1805
|
-
border-radius: 10px;
|
1806
|
-
margin-top: 10px;
|
1807
|
-
}
|
1808
|
-
|
1809
|
-
.input-wrapper {
|
1810
|
-
flex: 1;
|
1811
|
-
}
|
1812
|
-
|
1813
|
-
.button-wrapper {
|
1814
|
-
margin-left: 10px;
|
1815
|
-
}
|
1816
|
-
|
1817
|
-
.input-container {
|
1818
|
-
display: flex;
|
1819
|
-
flex-direction: column;
|
1820
|
-
}
|
1821
|
-
|
1822
|
-
.export-btn {
|
1823
|
-
background: black;
|
1824
|
-
color: white;
|
1825
|
-
height: 35px;
|
1826
|
-
width: 68px;
|
1827
|
-
border-radius: 5px;
|
1828
|
-
margin-left: 14px;
|
1829
|
-
}
|
1830
|
-
|
1831
|
-
.payment-popup {
|
1832
|
-
padding: 12px 20px;
|
1833
|
-
background: #fff;
|
1834
|
-
border-radius: 20px;
|
1835
|
-
position: relative;
|
1836
|
-
width: 100%;
|
1837
|
-
margin: 0 auto;
|
1838
|
-
}
|
1839
|
-
|
1840
|
-
.modal-dialog {
|
1841
|
-
max-width: 810px;
|
1842
|
-
}
|
1843
|
-
|
1844
|
-
.modal-content {
|
1845
|
-
max-width: 100%;
|
1846
|
-
/* margin-top: 5%; */
|
1847
|
-
width: 100%;
|
1848
|
-
margin: 0;
|
1849
|
-
}
|
1850
|
-
|
1851
|
-
@media (max-width: 460px) {
|
1852
|
-
.payment-popup {
|
1853
|
-
padding: 35px 25px;
|
1854
|
-
width: 98%;
|
1855
|
-
}
|
1856
|
-
}
|
1857
|
-
|
1858
|
-
.close-pop {
|
1859
|
-
position: absolute;
|
1860
|
-
right: 8px;
|
1861
|
-
top: 8px;
|
1862
|
-
border: 0;
|
1863
|
-
padding: 0;
|
1864
|
-
background: none !important;
|
1865
|
-
}
|
1866
|
-
|
1867
|
-
.copy-api {
|
1868
|
-
overflow-y: auto;
|
1869
|
-
scrollbar-width: inherit;
|
1870
|
-
background: #f2f2f2;
|
1871
|
-
color: rgb(33, 33, 33);
|
1872
|
-
font-size: "12px";
|
1873
|
-
border: 0;
|
1874
|
-
border-radius: 4px;
|
1875
|
-
width: 100%;
|
1876
|
-
padding: 8px 15px;
|
1877
|
-
position: relative;
|
1878
|
-
}
|
1879
|
-
|
1880
|
-
#style-3::-webkit-scrollbar-track {
|
1881
|
-
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
|
1882
|
-
background-color: #f5f5f5;
|
1883
|
-
}
|
1884
|
-
|
1885
|
-
#style-3::-webkit-scrollbar {
|
1886
|
-
height: 3px;
|
1887
|
-
background-color: #f5f5f5;
|
1888
|
-
}
|
1889
|
-
|
1890
|
-
#style-3::-webkit-scrollbar-thumb {
|
1891
|
-
cursor: pointer;
|
1892
|
-
background-color: #333;
|
1893
|
-
}
|
1894
|
-
|
1895
|
-
.copy-code {
|
1896
|
-
display: flex;
|
1897
|
-
}
|
1898
|
-
|
1899
|
-
.copy-code svg {
|
1900
|
-
margin-right: 10px;
|
1901
|
-
}
|
1902
|
-
|
1903
|
-
.accordion.accordion-flush {
|
1904
|
-
float: left;
|
1905
|
-
width: 100%;
|
1906
|
-
margin-bottom: 45px;
|
1907
|
-
}
|
1908
|
-
|
1909
|
-
.box {
|
1910
|
-
width: 100%;
|
1911
|
-
height: 200px;
|
1912
|
-
/* background-color: #ddf6fc0e; */
|
1913
|
-
/* color: #fff; */
|
1914
|
-
text-align: center;
|
1915
|
-
line-height: 200px;
|
1916
|
-
/* Center content vertically */
|
1917
|
-
font-size: 1.5rem;
|
1918
|
-
}
|
1919
|
-
|
1920
|
-
.amex {
|
1921
|
-
background-image: url("/assests/amex.svg");
|
1922
|
-
}
|
1923
|
-
|
1924
|
-
.visa {
|
1925
|
-
background-image: url("/assests/visa.svg");
|
1926
|
-
}
|
1927
|
-
|
1928
|
-
.mastercard {
|
1929
|
-
background-image: url("/assests/mastercard.svg");
|
1930
|
-
}
|
1931
|
-
|
1932
|
-
.discover {
|
1933
|
-
background-image: url("/assests/discover.svg");
|
1934
|
-
}
|
1935
|
-
|
1936
|
-
.expiry-date-group {
|
1937
|
-
float: left;
|
1938
|
-
width: 30%;
|
1939
|
-
}
|
1940
|
-
|
1941
|
-
.expiry-date-group input {
|
1942
|
-
width: calc(100% + 1px);
|
1943
|
-
border-top-right-radius: 0;
|
1944
|
-
border-bottom-right-radius: 0;
|
1945
|
-
}
|
1946
|
-
|
1947
|
-
.expiry-date-group input:focus {
|
1948
|
-
position: relative;
|
1949
|
-
z-index: 10;
|
1950
|
-
|
1951
|
-
}
|
1952
|
-
.pay-tbl th{width: 24% !important;}
|
1953
|
-
.pay-tbl th:last-child{width: 28% !important;}
|
1954
|
-
.security-code-group {
|
1955
|
-
float: right;
|
1956
|
-
width: 40%;
|
1957
|
-
position: relative;
|
1958
|
-
}
|
1959
|
-
|
1960
|
-
.security-code-group input {
|
1961
|
-
border-top-left-radius: 0;
|
1962
|
-
border-bottom-left-radius: 0;
|
1963
|
-
}
|
1964
|
-
|
1965
|
-
.zip-code-group {
|
1966
|
-
clear: both;
|
1967
|
-
}
|
1968
|
-
.amnt input{max-width: 150px; margin-right:8px;}
|
1969
|
-
.amnt p, .amnt form{margin-right:8px;}
|
1970
|
-
#submitButton {
|
1971
|
-
outline: 0 !important;
|
1972
|
-
height: 46px;
|
1973
|
-
font-size: 16px;
|
1974
|
-
background-color: #161616 !important;
|
1975
|
-
border: none;
|
1976
|
-
display: block;
|
1977
|
-
width: 100%;
|
1978
|
-
color: white;
|
1979
|
-
border-radius: 180px;
|
1980
|
-
}
|
1981
|
-
|
1982
|
-
#submitRequestButton {
|
1983
|
-
outline: 0 !important;
|
1984
|
-
height: 46px;
|
1985
|
-
font-size: 16px;
|
1986
|
-
background-color: #161616 !important;
|
1987
|
-
border: none;
|
1988
|
-
display: block;
|
1989
|
-
width: 100%;
|
1990
|
-
border-radius: 180px;
|
1991
|
-
}
|
1992
|
-
|
1993
|
-
#PayButton {
|
1994
|
-
outline: 0 !important;
|
1995
|
-
height: 46px;
|
1996
|
-
font-size: 16px;
|
1997
|
-
background-color: #161616 !important;
|
1998
|
-
border: none;
|
1999
|
-
display: block;
|
2000
|
-
width: 100%;
|
2001
|
-
border-radius: 180px;
|
2002
|
-
margin: 2px;
|
2003
|
-
}
|
2004
|
-
|
2005
|
-
#PayButton:hover {
|
2006
|
-
background-color: #61c699 !important;
|
2007
|
-
}
|
2008
|
-
|
2009
|
-
#PayButton:active {
|
2010
|
-
background-color: #61c699 !important;
|
2011
|
-
}
|
2012
|
-
|
2013
|
-
#PayButton:disabled {
|
2014
|
-
background: rgb(172, 44, 170) !important;
|
2015
|
-
color: #fff !important;
|
2016
|
-
}
|
2017
|
-
|
2018
|
-
.form-control {
|
2019
|
-
color: #35254d;
|
2020
|
-
}
|
2021
|
-
|
2022
|
-
.container {
|
2023
|
-
margin-top: 10px;
|
2024
|
-
}
|
2025
|
-
|
2026
|
-
#Checkout {
|
2027
|
-
z-index: 100001;
|
2028
|
-
width: 100%;
|
2029
|
-
height: 100%;
|
2030
|
-
min-height: 100%;
|
2031
|
-
background: 0 0 #ffffff;
|
2032
|
-
border-radius: 24px;
|
2033
|
-
border: 1px solid #e0dfe2;
|
2034
|
-
margin-left: auto;
|
2035
|
-
margin-right: auto;
|
2036
|
-
display: block;
|
2037
|
-
}
|
2038
|
-
|
2039
|
-
#Checkout .header {
|
2040
|
-
display: flex;
|
2041
|
-
/* Enables Flexbox */
|
2042
|
-
justify-content: center;
|
2043
|
-
/* Centers content horizontally */
|
2044
|
-
align-items: center;
|
2045
|
-
/* Centers content vertically */
|
2046
|
-
text-align: center;
|
2047
|
-
padding: 8px;
|
2048
|
-
border-bottom: 1px solid #dedede;
|
2049
|
-
margin: 0 10px 20px 10px;
|
2050
|
-
}
|
2051
|
-
|
2052
|
-
#Checkout .header button {
|
2053
|
-
border: 0;
|
2054
|
-
background: none;
|
2055
|
-
padding: 0;
|
2056
|
-
}
|
2057
|
-
|
2058
|
-
#Checkout h1 {
|
2059
|
-
margin: 0;
|
2060
|
-
flex: 1;
|
2061
|
-
padding: 10px;
|
2062
|
-
/* Allows the title to grow and fill the space for centering */
|
2063
|
-
font-size: 23px;
|
2064
|
-
font-weight: 500;
|
2065
|
-
color: #35254d;
|
2066
|
-
align-items: start;
|
2067
|
-
display: flex;
|
2068
|
-
}
|
2069
|
-
|
2070
|
-
#Checkout>form {
|
2071
|
-
margin: 0 25px 10px 25px;
|
2072
|
-
}
|
2073
|
-
|
2074
|
-
label {
|
2075
|
-
color: rgba(53, 37, 77, 0.6);
|
2076
|
-
margin-bottom: 2px;
|
2077
|
-
text-transform: uppercase;
|
2078
|
-
font-family: "IBM Plex Mono", monospace;
|
2079
|
-
font-weight: 500;
|
2080
|
-
font-size: 12px;
|
2081
|
-
}
|
2082
|
-
|
2083
|
-
.input-container {
|
2084
|
-
position: relative;
|
2085
|
-
}
|
2086
|
-
|
2087
|
-
.input-container input {
|
2088
|
-
padding-right: 25px;
|
2089
|
-
}
|
2090
|
-
|
2091
|
-
#zipcode {
|
2092
|
-
text-transform: capitalize !important;
|
2093
|
-
}
|
2094
|
-
|
2095
|
-
#zipcode {
|
2096
|
-
width: 18px;
|
2097
|
-
position: absolute;
|
2098
|
-
right: 8px;
|
2099
|
-
top: 9px;
|
2100
|
-
}
|
2101
|
-
|
2102
|
-
#zipcode .zip-tip {
|
2103
|
-
display: none;
|
2104
|
-
background-color: rgb(0, 0, 0, 0.4);
|
2105
|
-
padding: 5px 8px;
|
2106
|
-
border-radius: 6px;
|
2107
|
-
position: absolute;
|
2108
|
-
right: 26px;
|
2109
|
-
top: -9px;
|
2110
|
-
font-size: 12.5px;
|
2111
|
-
text-transform: capitalize !important;
|
2112
|
-
color: #fff;
|
2113
|
-
width: 240px;
|
2114
|
-
line-height: 16px;
|
2115
|
-
}
|
2116
|
-
|
2117
|
-
#zipcode .zip-tip:before {
|
2118
|
-
width: 0;
|
2119
|
-
height: 0;
|
2120
|
-
border-top: 7px solid transparent;
|
2121
|
-
border-bottom: 7px solid transparent;
|
2122
|
-
border-left: 7px solid #000;
|
2123
|
-
opacity: 0.4;
|
2124
|
-
position: absolute;
|
2125
|
-
right: -7px;
|
2126
|
-
top: 50%;
|
2127
|
-
transform: translateY(-50%);
|
2128
|
-
content: "";
|
2129
|
-
}
|
2130
|
-
|
2131
|
-
#zipcode:hover .zip-tip {
|
2132
|
-
display: block;
|
2133
|
-
}
|
2134
|
-
|
2135
|
-
.input-container>i,
|
2136
|
-
a[role="button"] {
|
2137
|
-
color: #d3d3d3;
|
2138
|
-
width: 25px;
|
2139
|
-
height: 30px;
|
2140
|
-
line-height: 30px;
|
2141
|
-
font-size: 16px;
|
2142
|
-
position: absolute;
|
2143
|
-
top: 5px;
|
2144
|
-
right: 6px;
|
2145
|
-
cursor: pointer;
|
2146
|
-
text-align: center;
|
2147
|
-
}
|
2148
|
-
|
2149
|
-
.input-container>i:hover,
|
2150
|
-
a[role="button"]:hover {
|
2151
|
-
color: #777;
|
2152
|
-
}
|
2153
|
-
|
2154
|
-
.amount-placeholder {
|
2155
|
-
white-space: nowrap;
|
2156
|
-
font-size: 44px;
|
2157
|
-
/* height: 35px; */
|
2158
|
-
font-weight: 600;
|
2159
|
-
line-height: 40px;
|
2160
|
-
}
|
2161
|
-
|
2162
|
-
.amount-placeholder>button {
|
2163
|
-
float: right;
|
2164
|
-
width: 60px;
|
2165
|
-
}
|
2166
|
-
|
2167
|
-
.amount-placeholder>span {
|
2168
|
-
line-height: 34px;
|
2169
|
-
}
|
2170
|
-
|
2171
|
-
.top-amnt {
|
2172
|
-
display: flex;
|
2173
|
-
margin-bottom: 10px;
|
2174
|
-
align-items: center;
|
2175
|
-
justify-content: space-between;
|
2176
|
-
}
|
2177
|
-
|
2178
|
-
.amtleft {
|
2179
|
-
text-align: center;
|
2180
|
-
}
|
2181
|
-
|
2182
|
-
.amtleft span {
|
2183
|
-
color: #35254d;
|
2184
|
-
margin: 0 -5px;
|
2185
|
-
}
|
2186
|
-
|
2187
|
-
.card-row {
|
2188
|
-
text-align: right;
|
2189
|
-
margin: 22px 0 0 0;
|
2190
|
-
max-width: 85px;
|
2191
|
-
line-height: 20px;
|
2192
|
-
}
|
2193
|
-
|
2194
|
-
.yer {
|
2195
|
-
border-radius: 0;
|
2196
|
-
}
|
2197
|
-
|
2198
|
-
.card-row span {
|
2199
|
-
width: 33px;
|
2200
|
-
height: 21px;
|
2201
|
-
margin: 0 2px;
|
2202
|
-
background-repeat: no-repeat;
|
2203
|
-
display: inline-block;
|
2204
|
-
background-size: contain;
|
2205
|
-
}
|
2206
|
-
|
2207
|
-
.card-image {
|
2208
|
-
background-repeat: no-repeat;
|
2209
|
-
padding-right: 50px;
|
2210
|
-
background-position: right 2px center;
|
2211
|
-
background-size: auto 90%;
|
2212
|
-
}
|
2213
|
-
|
2214
|
-
/* .cvc-preview-container {
|
2215
|
-
overflow: hidden;
|
2216
|
-
} */
|
2217
|
-
|
2218
|
-
.cvc-preview-container {
|
2219
|
-
/* overflow: hidden; */
|
2220
|
-
position: absolute;
|
2221
|
-
z-index: 9999;
|
2222
|
-
right: -71px;
|
2223
|
-
top: -54px;
|
2224
|
-
width: 165px;
|
2225
|
-
border-radius: 5px;
|
2226
|
-
padding: 5px;
|
2227
|
-
background-color: rgb(0, 0, 0, 0.3);
|
2228
|
-
display: none;
|
2229
|
-
}
|
2230
|
-
|
2231
|
-
.cvc-preview-container:before {
|
2232
|
-
position: absolute;
|
2233
|
-
left: 50%;
|
2234
|
-
transform: translate(-50%);
|
2235
|
-
bottom: -5px;
|
2236
|
-
width: 0;
|
2237
|
-
height: 0;
|
2238
|
-
border-left: 5px solid transparent;
|
2239
|
-
border-right: 5px solid transparent;
|
2240
|
-
border-top: 5px solid #000;
|
2241
|
-
opacity: 0.3;
|
2242
|
-
content: "";
|
2243
|
-
}
|
2244
|
-
|
2245
|
-
.security-code-group #cvc:hover .cvc-preview-container {
|
2246
|
-
display: block;
|
2247
|
-
}
|
2248
|
-
|
2249
|
-
.cvc-preview-container.two-card div {
|
2250
|
-
width: 50%;
|
2251
|
-
height: 45px;
|
2252
|
-
}
|
2253
|
-
|
2254
|
-
.cvc-preview-container.two-card div.amex-cvc-preview {
|
2255
|
-
float: right;
|
2256
|
-
}
|
2257
|
-
|
2258
|
-
.cvc-preview-container.two-card div.visa-mc-dis-cvc-preview {
|
2259
|
-
float: left;
|
2260
|
-
}
|
2261
|
-
|
2262
|
-
/* .cvc-preview-container div {
|
2263
|
-
height: 160px;
|
2264
|
-
} */
|
2265
|
-
|
2266
|
-
.amex-cvc-preview {
|
2267
|
-
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/SBtq3TiFifzpggh3xCxRumzI93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n26NdIzry6LTD9dCxBdoGTk8DbxU5Gwk6N8yxa7/S1FbvuF6bbj1dbwq169nXeH9wzHl/IsHSPZmygTufsWKkR+N35gWf8Yoc6thZfgTDXPemanWRuGyt/V1jf5mxs7TzfiJt7O7ljFSjY0Rw0pk2OgPERvjrEkL46xJCCIVJCKEwCaEwCSEUJiEUJiGEwiSEwiSEUJiEUJisBEIoTEIIhUkIhUkIoTAJoTAJIRQmIX9tYR649YAVQUgUAU36sHQDK4OQ6AGa9G0+ffH/WBmERA/QpG/ZZ59nsTIIiR6gSV/Spp2bd164xgohJAqAFqFJ3+wN29su3LFXpF//jRVDyJ8INAgtQpM+/PkVehILGXvtQkwIyWFR+rUHDUKLPvU3c2NqpaSUnf+zYPtese3cj8Yt8AghkQdag+agPWgQWvTpf7OSU1/xn/jvOZtS5Q7GySfOibSLN+RehtiTgRASGaApaAsag9agOWgPGvSZ/makpFTwGxxK2pT6bxgTQnIWaA2ag/Z8wf5mJW9tNGfjjmX+L13w8yApJfUfhJAIAU35tQWNQWsmDf4HqpjHZRJqxUwAAAAASUVORK5CYII=") center center/contain no-repeat;
|
2268
|
-
}
|
2269
|
-
|
2270
|
-
.visa-mc-dis-cvc-preview {
|
2271
|
-
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+fW5Afm9Bi3pHjHtIkH9K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prGtOI0186eKl8Xae3QSOxojTSUgT8BEvkXyqDHONgAAAAASUVORK5CYII=") center center/contain no-repeat;
|
2272
|
-
}
|
2273
|
-
|
2274
|
-
.submit-button-lock {
|
2275
|
-
height: 15px;
|
2276
|
-
margin-top: -2px;
|
2277
|
-
margin-right: 7px;
|
2278
|
-
vertical-align: middle;
|
2279
|
-
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+b2DI9kciWiLBmj34RswQISkAd0oAo0gS4wA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UFtxWHc4azDz+ui6rq/Z39ff0TtSPGRz0eFR6XHwo911TvU1zeoN5Q2wo2SxrHjccdv/eD1Q3sTq+lQM6O5+AQ4ITnx4sf4H++eDDzZeYp9qukn/Z/2ttBailqh1tzWibakNml7THvf6YDTnR3OHS0/m/989Iz2mZqzymdLz5HOFZybOZ93fvJCxoXxi4kXhzpXdD66tOTSna6wrt7LgZevXvG5cqnbvfv8VZerZ645XTt9nX297Yb9jdYeu56WX+x+aem172296XCz/ZbjrY6+BX3n+l37L972un3ljv+dGwOLBvruLr57/17cPel93v3RB6kPXj/Mejj9aP1j7OOiJwpPKp6qP6391fjXZqm99Oyg12DPs4hnj4a4Qy//lfmvT8MFz6nPK0a0RupHrUfPjPmM3Xqx9MXwy4yX0+OFvyn+tveV0auffnf7vWdiycTwa9HrmT9K3qi+OfrW9m3nZOjk03dp76anit6rvj/2gf2h+2P0x5Hp7E/4T5WfjT93fAn88ngmbWbm3/eE8/syOll+AAAAYFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////98JRy6AAAAH3RSTlMAAgYMEyIzOUpTVFViY3N2gJmcnaipq7fX3ebx+Pn8eTEuDQAAAI9JREFUKM/N0UkOglAQRdFHDyK90n64+9+lAyQgookjuaNKTlJJpaQlO2n6sW8SW/uCjrku2EloWDLhi3gDa4O3pTtA5Tt+BXDbiDsBmSQpAyZ3pRhoLUmS1QLxSilQPOcCSFfKgfxgPgfZ9ch7Y21LCcdd5wVH5SckEzkXc0ylpPJnMpETmX/d9eUpH1/5AKrsQVrz7YPBAAAAAElFTkSuQmCC") center center/contain no-repeat;
|
2280
|
-
width: 14px;
|
2281
|
-
display: inline-block;
|
2282
|
-
}
|
2283
|
-
|
2284
|
-
.align-middle {
|
2285
|
-
vertical-align: middle;
|
2286
|
-
}
|
2287
|
-
|
2288
|
-
input {
|
2289
|
-
box-shadow: none !important;
|
2290
|
-
}
|
2291
|
-
|
2292
|
-
.powerd-by-part {
|
2293
|
-
display: flex;
|
2294
|
-
font-size: 12px;
|
2295
|
-
text-align: center;
|
2296
|
-
align-items: center;
|
2297
|
-
justify-content: center;
|
2298
|
-
margin: 5px 0 20px 0;
|
2299
|
-
}
|
2300
|
-
|
2301
|
-
.powered-logo {
|
2302
|
-
width: 18px;
|
2303
|
-
height: auto;
|
2304
|
-
float: right;
|
2305
|
-
padding: 2px;
|
2306
|
-
background: #000000;
|
2307
|
-
border-radius: 4px;
|
2308
|
-
margin-left: 5px;
|
2309
|
-
}
|
2310
|
-
|
2311
|
-
.comp-name {
|
2312
|
-
display: block;
|
2313
|
-
margin-bottom: 8px;
|
2314
|
-
}
|
2315
|
-
|
2316
|
-
.client-logo {
|
2317
|
-
max-width: 140px;
|
2318
|
-
display: block;
|
2319
|
-
margin: auto;
|
2320
|
-
padding: 5px;
|
2321
|
-
}
|
2322
|
-
|
2323
|
-
#qrCode {
|
2324
|
-
text-align: center;
|
2325
|
-
}
|
2326
|
-
|
2327
|
-
#qrIcon {
|
2328
|
-
cursor: pointer;
|
2329
|
-
border: 1px solid rgb(252, 252, 252);
|
2330
|
-
padding: 10px;
|
2331
|
-
border-radius: 5px;
|
2332
|
-
background: #ffffff;
|
2333
|
-
}
|
2334
|
-
|
2335
|
-
#target {
|
2336
|
-
display: none;
|
2337
|
-
text-align: center;
|
2338
|
-
transition: all 5s;
|
2339
|
-
padding: 5px;
|
2340
|
-
transition: max-height 0.5s, overflow 0.5s 0.5s;
|
2341
|
-
}
|
2342
|
-
|
2343
|
-
/* input:focus {
|
2344
|
-
border-color: #acc6db !important;
|
2345
|
-
background-color: #acc6db !important;
|
2346
|
-
} */
|
2347
|
-
|
2348
|
-
@media(min-width:725px) {
|
2349
|
-
.pay-main{margin: 0 auto !important;}
|
2350
|
-
#modal-pay iframe{
|
2351
|
-
max-height: 548px;
|
2352
|
-
min-height: 548px;
|
2353
|
-
}
|
2354
|
-
.get-pay-pgs #modal-pay iframe{
|
2355
|
-
max-height: 500px !important;
|
2356
|
-
min-height: 500px !important;
|
2357
|
-
}
|
2358
|
-
#modal-pay .modal-header{
|
2359
|
-
position: absolute;
|
2360
|
-
right: 5px;
|
2361
|
-
top: 15px;
|
2362
|
-
z-index: 4;
|
2363
|
-
}
|
2364
|
-
/* #modal-pay .modal-body{
|
2365
|
-
padding: 0 !important;
|
2366
|
-
} */
|
2367
|
-
}
|
2368
|
-
@media(max-width:724px) {
|
2369
|
-
#modal-pay iframe{
|
2370
|
-
min-height: 708px !important;
|
2371
|
-
}
|
2372
|
-
#modal-pay iframe .modal-body{
|
2373
|
-
padding:0 !important;
|
2374
|
-
}
|
2375
|
-
}
|
2376
|
-
#modal-pay .modal-body{padding: 0;}
|
2377
|
-
/* #modal-pay .modal-content{padding: 0 !important;} */
|
2378
|
-
.pre-auth-pop .modal-header{position: relative; z-index: 4;}
|
2379
|
-
.pre-auth-pop iframe{
|
2380
|
-
margin-top: -60px;
|
2381
|
-
}
|
2382
|
-
|
2383
|
-
.form-control {
|
2384
|
-
padding: .320rem .75rem !important;
|
2385
|
-
|
2386
|
-
}
|
2387
|
-
`);
|
2388
|
-
}
|
2389
|
-
|
2390
|
-
// src/app/components/Payment/Payment.tsx
|
2391
|
-
function Payment() {
|
2392
|
-
var _a;
|
2393
|
-
const [state, setState] = (0, import_react12.useState)({
|
2394
|
-
show: false,
|
2395
|
-
publicKey: "",
|
2396
|
-
sessionKey: "",
|
2397
|
-
cardNumber: "",
|
2398
|
-
year: "",
|
2399
|
-
month: "",
|
2400
|
-
cvv: "",
|
2401
|
-
zip: "",
|
2402
|
-
amount: ""
|
2403
|
-
});
|
2404
|
-
const [isValid, setIsValid] = (0, import_react12.useState)(false);
|
2405
|
-
const [isValidMonth, setIsValidMonth] = (0, import_react12.useState)(false);
|
2406
|
-
const [data, setData] = (0, import_react12.useState)(null);
|
2407
|
-
const handlePaymentClick = async () => {
|
2408
|
-
try {
|
2409
|
-
const response = await fetch(`${baseUrl}generate-session`, {
|
2410
|
-
method: "POST",
|
2411
|
-
headers: {
|
2412
|
-
"Content-Type": "application/json"
|
2413
|
-
},
|
2414
|
-
body: JSON.stringify({})
|
2415
|
-
});
|
2416
|
-
if (!response.ok) {
|
2417
|
-
throw new Error("Network response was not ok");
|
2418
|
-
}
|
2419
|
-
const data2 = await response.json();
|
2420
|
-
if (data2 && data2.result === true) {
|
2421
|
-
setState((prev) => {
|
2422
|
-
var _a2, _b;
|
2423
|
-
return __spreadProps(__spreadValues({}, prev), {
|
2424
|
-
show: true,
|
2425
|
-
publicKey: (_a2 = data2 == null ? void 0 : data2.data) == null ? void 0 : _a2.publicKeyPem,
|
2426
|
-
sessionKey: (_b = data2 == null ? void 0 : data2.data) == null ? void 0 : _b.session_key
|
2427
|
-
});
|
2428
|
-
});
|
2429
|
-
}
|
2430
|
-
} catch (error) {
|
2431
|
-
console.log(error);
|
2432
|
-
}
|
2433
|
-
};
|
2434
|
-
const handleSubmitPay = async () => {
|
2435
|
-
const track2_data = `${state.cardNumber.replace(/\s+/g, "")}=${state.year}${state.month.length > 1 ? state.month : "0" + state.month} ${state.cvv}`;
|
2436
|
-
const publicKey = import_node_forge.default.pki.publicKeyFromPem(state.publicKey);
|
2437
|
-
const encrypted = publicKey.encrypt(track2_data, "RSA-OAEP", {
|
2438
|
-
md: import_node_forge.default.md.sha1.create(),
|
2439
|
-
mgf1: { md: import_node_forge.default.md.sha1.create() }
|
2440
|
-
});
|
2441
|
-
const encryptedBase64 = import_node_forge.default.util.encode64(encrypted);
|
2442
|
-
console.log(encryptedBase64);
|
2443
|
-
const requestBody = {
|
2444
|
-
enc_track2_data: encryptedBase64,
|
2445
|
-
session_key: state.sessionKey,
|
2446
|
-
algorithm: "RSAES_OAEP_SHA_1"
|
2447
|
-
};
|
2448
|
-
const apiUrl = "https://m1ao5pku8b.execute-api.us-east-2.amazonaws.com/prod/tokenizer/tokenize";
|
2449
|
-
try {
|
2450
|
-
const response = await fetch(apiUrl, {
|
2451
|
-
method: "POST",
|
2452
|
-
headers: {
|
2453
|
-
"x-app-session-key": state == null ? void 0 : state.sessionKey,
|
2454
|
-
"Content-Type": "application/json"
|
2455
|
-
},
|
2456
|
-
body: JSON.stringify(requestBody)
|
2457
|
-
});
|
2458
|
-
if (response.ok) {
|
2459
|
-
import_react_toastify3.toast.success("Payment Successful");
|
2460
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2461
|
-
show: false,
|
2462
|
-
publicKey: "",
|
2463
|
-
sessionKey: "",
|
2464
|
-
cardNumber: "",
|
2465
|
-
year: "",
|
2466
|
-
month: "",
|
2467
|
-
cvv: "",
|
2468
|
-
zip: "",
|
2469
|
-
amount: ""
|
2470
|
-
}));
|
2471
|
-
}
|
2472
|
-
const responseData = await response.json();
|
2473
|
-
console.log("response", responseData);
|
2474
|
-
} catch (error) {
|
2475
|
-
console.error("Error:", error);
|
2476
|
-
}
|
2477
|
-
};
|
2478
|
-
const handleCardNumberChange = (e) => {
|
2479
|
-
e.preventDefault();
|
2480
|
-
const { value } = e.target;
|
2481
|
-
const formattedValue = value.replace(/\D+/g, "").replace(/(.{4})/g, "$1 ").trim();
|
2482
|
-
if (value.match(/[a-zA-Z]/)) {
|
2483
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2484
|
-
cardNumber: formattedValue,
|
2485
|
-
error: "Invalid input. Please enter only numbers."
|
2486
|
-
}));
|
2487
|
-
} else {
|
2488
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2489
|
-
cardNumber: formattedValue,
|
2490
|
-
error: null
|
2491
|
-
}));
|
2492
|
-
}
|
2493
|
-
};
|
2494
|
-
const handleMonthChange = (e) => {
|
2495
|
-
setIsValid(false);
|
2496
|
-
let value = e.target.value;
|
2497
|
-
if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 1 && parseInt(value, 10) <= 12)) {
|
2498
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2499
|
-
month: value
|
2500
|
-
}));
|
2501
|
-
setIsValidMonth(false);
|
2502
|
-
} else {
|
2503
|
-
setIsValidMonth(true);
|
2504
|
-
}
|
2505
|
-
};
|
2506
|
-
const handleYearChange = (e) => {
|
2507
|
-
setIsValid(false);
|
2508
|
-
setIsValidMonth(false);
|
2509
|
-
let value = e.target.value;
|
2510
|
-
if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 0 && parseInt(value, 10) <= 99)) {
|
2511
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2512
|
-
year: value
|
2513
|
-
}));
|
2514
|
-
}
|
2515
|
-
};
|
2516
|
-
const handleCVVChange = (e) => {
|
2517
|
-
setIsValid(false);
|
2518
|
-
setIsValidMonth(false);
|
2519
|
-
let value = e.target.value;
|
2520
|
-
if (/^\d{0,4}$/.test(value)) {
|
2521
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2522
|
-
cvv: value
|
2523
|
-
}));
|
2524
|
-
}
|
2525
|
-
};
|
2526
|
-
const handleZIP = (e) => {
|
2527
|
-
setIsValid(false);
|
2528
|
-
setIsValidMonth(false);
|
2529
|
-
let value = e.target.value;
|
2530
|
-
if (/^\d{0,7}$/.test(value)) {
|
2531
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2532
|
-
zip: value
|
2533
|
-
}));
|
2534
|
-
}
|
2535
|
-
};
|
2536
|
-
const handleAmount = (e) => {
|
2537
|
-
setIsValid(false);
|
2538
|
-
setIsValidMonth(false);
|
2539
|
-
let value = e.target.value;
|
2540
|
-
value = value.replace(/[^0-9.]/g, "");
|
2541
|
-
let parts = value.split(".");
|
2542
|
-
if (parts.length > 2) {
|
2543
|
-
parts = [parts.shift(), parts.join(".")];
|
2544
|
-
value = parts.join("");
|
2545
|
-
}
|
2546
|
-
if (parts.length === 2 && parts[1].length > 2) {
|
2547
|
-
value = `${parts[0]}.${parts[1].slice(0, 2)}`;
|
2548
|
-
}
|
2549
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2550
|
-
amount: value
|
2551
|
-
}));
|
2552
|
-
};
|
2553
|
-
const handleAmountBlur = () => {
|
2554
|
-
const value = state.amount;
|
2555
|
-
if (value && !value.includes(".")) {
|
2556
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2557
|
-
amount: `${value}.00`
|
2558
|
-
}));
|
2559
|
-
}
|
2560
|
-
};
|
2561
|
-
function amountFormat(amt) {
|
2562
|
-
if (amt) {
|
2563
|
-
return `${parseFloat(amt).toLocaleString("en-US", {
|
2564
|
-
minimumFractionDigits: 2,
|
2565
|
-
maximumFractionDigits: 2
|
2566
|
-
})}`;
|
2567
|
-
}
|
2568
|
-
return "";
|
2569
|
-
}
|
2570
|
-
return /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement(Paymentstyles, null), /* @__PURE__ */ import_react12.default.createElement("div", { className: "" }, /* @__PURE__ */ import_react12.default.createElement(
|
2571
|
-
"button",
|
2572
|
-
{
|
2573
|
-
className: "export-btn",
|
2574
|
-
style: { width: "83px" },
|
2575
|
-
onClick: () => handlePaymentClick()
|
2576
|
-
},
|
2577
|
-
"Payment"
|
2578
|
-
), /* @__PURE__ */ import_react12.default.createElement(
|
2579
|
-
import_react_bootstrap5.Modal,
|
2580
|
-
{
|
2581
|
-
show: state.show,
|
2582
|
-
onHide: () => setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
2583
|
-
show: false
|
2584
|
-
})),
|
2585
|
-
centered: true
|
2586
|
-
},
|
2587
|
-
/* @__PURE__ */ import_react12.default.createElement(import_react_bootstrap5.Modal.Header, { closeButton: true }),
|
2588
|
-
/* @__PURE__ */ import_react12.default.createElement(import_react_bootstrap5.Modal.Body, null, /* @__PURE__ */ import_react12.default.createElement("div", { className: "payment-popup" }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "row" }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "" }, /* @__PURE__ */ import_react12.default.createElement("div", { id: "Checkout", className: "inline" }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "header" }, /* @__PURE__ */ import_react12.default.createElement("h1", null, "Pay")), /* @__PURE__ */ import_react12.default.createElement("form", { id: "PaymentForm", className: "payment-form" }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "form-group", style: { display: "none" } }, /* @__PURE__ */ import_react12.default.createElement("label", null, "Payment amount"), /* @__PURE__ */ import_react12.default.createElement("div", { className: "input-group" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "input-group-addon" }, "$"), /* @__PURE__ */ import_react12.default.createElement(
|
2589
|
-
"input",
|
2590
|
-
{
|
2591
|
-
type: "text",
|
2592
|
-
name: "amount",
|
2593
|
-
value: "1",
|
2594
|
-
className: "form-control",
|
2595
|
-
id: ""
|
2596
|
-
}
|
2597
|
-
)), /* @__PURE__ */ import_react12.default.createElement(
|
2598
|
-
"span",
|
2599
|
-
{
|
2600
|
-
id: "amount-error",
|
2601
|
-
style: { color: "red", display: "none" }
|
2602
|
-
}
|
2603
|
-
)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "form-group" }, /* @__PURE__ */ import_react12.default.createElement("label", null, "Name on card"), /* @__PURE__ */ import_react12.default.createElement(
|
2604
|
-
"input",
|
2605
|
-
{
|
2606
|
-
id: "NameOnCard",
|
2607
|
-
className: "form-control required",
|
2608
|
-
type: "text",
|
2609
|
-
maxLength: 100,
|
2610
|
-
placeholder: "Name"
|
2611
|
-
}
|
2612
|
-
), /* @__PURE__ */ import_react12.default.createElement(
|
2613
|
-
"span",
|
2614
|
-
{
|
2615
|
-
id: "NameOnCard-error",
|
2616
|
-
style: { color: "red", display: "none" }
|
2617
|
-
}
|
2618
|
-
)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "form-group" }, /* @__PURE__ */ import_react12.default.createElement(
|
2619
|
-
"input",
|
2620
|
-
{
|
2621
|
-
"data-token": "card_number",
|
2622
|
-
className: "null card-image form-control required",
|
2623
|
-
type: "text",
|
2624
|
-
maxLength: 19,
|
2625
|
-
value: state.cardNumber,
|
2626
|
-
placeholder: "0000 0000 0000 0000",
|
2627
|
-
onChange: handleCardNumberChange
|
2628
|
-
}
|
2629
|
-
), state.error && /* @__PURE__ */ import_react12.default.createElement("div", { style: { color: "red" } }, state.error)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ import_react12.default.createElement(
|
2630
|
-
"input",
|
2631
|
-
{
|
2632
|
-
"data-token": "exp_month",
|
2633
|
-
className: "form-control required",
|
2634
|
-
type: "text",
|
2635
|
-
placeholder: "MM",
|
2636
|
-
value: state.month,
|
2637
|
-
maxLength: 2,
|
2638
|
-
onChange: (e) => handleMonthChange(e)
|
2639
|
-
}
|
2640
|
-
), isValidMonth && /* @__PURE__ */ import_react12.default.createElement(
|
2641
|
-
"span",
|
2642
|
-
{
|
2643
|
-
id: "card_number-error",
|
2644
|
-
style: { color: "red", fontSize: "15px" }
|
2645
|
-
},
|
2646
|
-
(_a = ErrorText) == null ? void 0 : _a.montherror
|
2647
|
-
)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ import_react12.default.createElement(
|
2648
|
-
"input",
|
2649
|
-
{
|
2650
|
-
"data-token": "exp_year",
|
2651
|
-
className: "form-control required",
|
2652
|
-
type: "text",
|
2653
|
-
placeholder: "YY",
|
2654
|
-
maxLength: 2,
|
2655
|
-
value: state.year,
|
2656
|
-
onChange: (e) => handleYearChange(e)
|
2657
|
-
}
|
2658
|
-
), state.yearError && /* @__PURE__ */ import_react12.default.createElement("span", { id: "exp_year-error", style: { color: "red" } }, state.yearError)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "security-code-group form-group" }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react12.default.createElement(
|
2659
|
-
"input",
|
2660
|
-
{
|
2661
|
-
"data-token": "cvv",
|
2662
|
-
className: "form-control required",
|
2663
|
-
type: "text",
|
2664
|
-
maxLength: 4,
|
2665
|
-
value: state.cvv,
|
2666
|
-
placeholder: "CVV",
|
2667
|
-
onChange: (e) => handleCVVChange(e)
|
2668
|
-
}
|
2669
|
-
), /* @__PURE__ */ import_react12.default.createElement("i", { id: "cvc", className: "fa fa-question-circle" }), state.cvvError && /* @__PURE__ */ import_react12.default.createElement("span", { id: "cvv-error", style: { color: "red" } }, state.cvvError)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "cvc-preview-container two-card hide" }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "amex-cvc-preview" }), /* @__PURE__ */ import_react12.default.createElement("div", { className: "visa-mc-dis-cvc-preview" }))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "zip-code-group form-group" }, /* @__PURE__ */ import_react12.default.createElement("label", null, "Postal code"), /* @__PURE__ */ import_react12.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react12.default.createElement(
|
2670
|
-
"input",
|
2671
|
-
{
|
2672
|
-
id: "ZIPCode",
|
2673
|
-
className: "form-control required",
|
2674
|
-
name: "zip",
|
2675
|
-
type: "text",
|
2676
|
-
maxLength: 7,
|
2677
|
-
placeholder: "000000",
|
2678
|
-
value: state.zip,
|
2679
|
-
onChange: (e) => handleZIP(e)
|
2680
|
-
}
|
2681
|
-
), /* @__PURE__ */ import_react12.default.createElement(
|
2682
|
-
"a",
|
2683
|
-
{
|
2684
|
-
tabIndex: 0,
|
2685
|
-
role: "button",
|
2686
|
-
"data-toggle": "popover",
|
2687
|
-
"data-trigger": "focus",
|
2688
|
-
"data-placement": "left",
|
2689
|
-
"data-content": "Enter the ZIP/Postal code for your credit card billing address."
|
2690
|
-
},
|
2691
|
-
/* @__PURE__ */ import_react12.default.createElement("i", { className: "fa fa-question-circle" })
|
2692
|
-
), /* @__PURE__ */ import_react12.default.createElement(
|
2693
|
-
"span",
|
2694
|
-
{
|
2695
|
-
id: "ZIPCode-error",
|
2696
|
-
style: { color: "red", display: "none" }
|
2697
|
-
},
|
2698
|
-
ErrorText.fieldrequired
|
2699
|
-
))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "form-group top-amnt" }, /* @__PURE__ */ import_react12.default.createElement("div", null, /* @__PURE__ */ import_react12.default.createElement("label", null, "Payment amount"), /* @__PURE__ */ import_react12.default.createElement("div", { className: "amount-placeholder" }, /* @__PURE__ */ import_react12.default.createElement(
|
2700
|
-
"input",
|
2701
|
-
{
|
2702
|
-
id: "Amount",
|
2703
|
-
className: "form-control required",
|
2704
|
-
name: "amount",
|
2705
|
-
type: "text",
|
2706
|
-
placeholder: "",
|
2707
|
-
value: state.amount,
|
2708
|
-
onChange: (e) => handleAmount(e),
|
2709
|
-
onBlur: handleAmountBlur
|
2710
|
-
}
|
2711
|
-
))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "card-row" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "visa" }), /* @__PURE__ */ import_react12.default.createElement("span", { className: "mastercard" }), /* @__PURE__ */ import_react12.default.createElement("span", { className: "amex" }), /* @__PURE__ */ import_react12.default.createElement("span", { className: "discover" }))), /* @__PURE__ */ import_react12.default.createElement(
|
2712
|
-
"button",
|
2713
|
-
{
|
2714
|
-
type: "button",
|
2715
|
-
id: "submitButton",
|
2716
|
-
onClick: () => handleSubmitPay(),
|
2717
|
-
className: "btn btn-block btn-success submit-button"
|
2718
|
-
},
|
2719
|
-
"Pay"
|
2720
|
-
)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ import_react12.default.createElement(
|
2721
|
-
"svg",
|
2722
|
-
{
|
2723
|
-
xmlns: "http://www.w3.org/2000/svg",
|
2724
|
-
width: "20",
|
2725
|
-
height: "20",
|
2726
|
-
viewBox: "0 0 26 26"
|
2727
|
-
},
|
2728
|
-
/* @__PURE__ */ import_react12.default.createElement(
|
2729
|
-
"path",
|
2730
|
-
{
|
2731
|
-
fill: "currentColor",
|
2732
|
-
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"
|
2733
|
-
}
|
2734
|
-
)
|
2735
|
-
), "Secure payments powered by Fractal", /* @__PURE__ */ import_react12.default.createElement(
|
2736
|
-
"img",
|
2737
|
-
{
|
2738
|
-
src: "https://ui.fractalpay.com/favicon.ico",
|
2739
|
-
alt: "Fractal logo",
|
2740
|
-
className: "powered-logo"
|
2741
|
-
}
|
2742
|
-
)))))))
|
2743
|
-
)));
|
2744
|
-
}
|
2745
|
-
|
2746
|
-
// src/app/components/Transaction/CompletedTransactions.tsx
|
2747
|
-
var import_react14 = __toESM(require("react"));
|
2748
|
-
var import_react_bootstrap6 = require("react-bootstrap");
|
2749
|
-
var import_react_bs_datatable = require("react-bs-datatable");
|
2750
|
-
var import_react_datepicker = __toESM(require("react-datepicker"));
|
2751
|
-
var import_react_datepicker2 = require("react-datepicker/dist/react-datepicker.css");
|
2752
|
-
var import_react_toastify4 = require("react-toastify");
|
2753
|
-
|
2754
|
-
// src/app/components/Pagination/Pagination.tsx
|
2755
|
-
var import_react13 = __toESM(require("react"));
|
2756
|
-
function PaginationPg({ totalPages, onPageChange, current }) {
|
2757
|
-
const [currentPage, setCurrentPage] = (0, import_react13.useState)(current);
|
2758
|
-
const [showPages, setShowPages] = (0, import_react13.useState)(false);
|
2759
|
-
(0, import_react13.useEffect)(() => {
|
2760
|
-
setCurrentPage(current);
|
2761
|
-
}, [current]);
|
2762
|
-
(0, import_react13.useEffect)(() => {
|
2763
|
-
setTimeout(() => {
|
2764
|
-
setShowPages(true);
|
2765
|
-
}, 1e3);
|
2766
|
-
}, []);
|
2767
|
-
const handlePrevious = (e) => {
|
2768
|
-
e.preventDefault();
|
2769
|
-
if (currentPage > 1) {
|
2770
|
-
const newPage = currentPage - 1;
|
2771
|
-
setCurrentPage(newPage);
|
2772
|
-
onPageChange(newPage);
|
2773
|
-
}
|
2774
|
-
};
|
2775
|
-
const handleNext = (e) => {
|
2776
|
-
e.preventDefault();
|
2777
|
-
if (currentPage < totalPages) {
|
2778
|
-
const newPage = currentPage + 1;
|
2779
|
-
setCurrentPage(newPage);
|
2780
|
-
onPageChange(newPage);
|
2781
|
-
}
|
2782
|
-
};
|
2783
|
-
const handlePageClick = (e, pageNumber) => {
|
2784
|
-
e.preventDefault();
|
2785
|
-
setCurrentPage(pageNumber);
|
2786
|
-
onPageChange(pageNumber);
|
2787
|
-
};
|
2788
|
-
const getPageNumbers = () => {
|
2789
|
-
const pageNumbers = [];
|
2790
|
-
if (totalPages <= 5) {
|
2791
|
-
for (let i = 1; i <= totalPages; i++) {
|
2792
|
-
pageNumbers.push(renderPageNumber(i));
|
2793
|
-
}
|
2794
|
-
} else {
|
2795
|
-
if (currentPage > 3) {
|
2796
|
-
pageNumbers.push(renderPageNumber(1));
|
2797
|
-
if (currentPage > 4) {
|
2798
|
-
pageNumbers.push(/* @__PURE__ */ import_react13.default.createElement("li", { key: "start-break", className: "page-item disabled" }, /* @__PURE__ */ import_react13.default.createElement("span", { className: "page-link" }, "...")));
|
2799
|
-
}
|
2800
|
-
}
|
2801
|
-
const startPage = Math.max(currentPage - 1, 1);
|
2802
|
-
const endPage = Math.min(startPage + 2, totalPages);
|
2803
|
-
for (let i = startPage; i <= endPage; i++) {
|
2804
|
-
pageNumbers.push(renderPageNumber(i));
|
2805
|
-
}
|
2806
|
-
if (currentPage < totalPages - 2) {
|
2807
|
-
if (currentPage < totalPages - 3) {
|
2808
|
-
pageNumbers.push(/* @__PURE__ */ import_react13.default.createElement("li", { key: "end-break", className: "page-item disabled" }, /* @__PURE__ */ import_react13.default.createElement("span", { className: "page-link" }, "...")));
|
2809
|
-
}
|
2810
|
-
pageNumbers.push(renderPageNumber(totalPages));
|
2811
|
-
}
|
2812
|
-
}
|
2813
|
-
return pageNumbers;
|
2814
|
-
};
|
2815
|
-
const renderPageNumber = (pageNumber) => /* @__PURE__ */ import_react13.default.createElement("li", { key: pageNumber, className: `page-item ${currentPage === pageNumber ? "active" : ""}` }, /* @__PURE__ */ import_react13.default.createElement("a", { className: "page-link cursor-pointer", onClick: (e) => handlePageClick(e, pageNumber) }, pageNumber));
|
2816
|
-
return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement("nav", { className: "app-pagination py-2" }, /* @__PURE__ */ import_react13.default.createElement("ul", { className: "pagination justify-content-center" }, /* @__PURE__ */ import_react13.default.createElement("li", { className: `page-item ${currentPage === 1 ? "disabled" : ""}` }, /* @__PURE__ */ import_react13.default.createElement("a", { className: "page-link cursor-pointer", onClick: handlePrevious }, /* @__PURE__ */ import_react13.default.createElement("span", null, "\u2B9C"))), showPages && getPageNumbers(), /* @__PURE__ */ import_react13.default.createElement("li", { className: `page-item ${currentPage === totalPages ? "disabled" : ""}` }, /* @__PURE__ */ import_react13.default.createElement("a", { className: "page-link cursor-pointer", onClick: handleNext }, /* @__PURE__ */ import_react13.default.createElement("span", null, "\u2B9E"))))));
|
2817
|
-
}
|
2818
|
-
|
2819
|
-
// src/app/components/Transaction/CompletedTransactions.tsx
|
2820
|
-
var STORY_HEADERS = [
|
2821
|
-
{
|
2822
|
-
prop: "Date",
|
2823
|
-
title: "Date",
|
2824
|
-
isSortable: true
|
2825
|
-
},
|
2826
|
-
{
|
2827
|
-
prop: "Name",
|
2828
|
-
isFilterable: true,
|
2829
|
-
title: "Name",
|
2830
|
-
isSortable: true
|
2831
|
-
},
|
2832
|
-
{
|
2833
|
-
prop: "lastFourDigits",
|
2834
|
-
title: "Last 4",
|
2835
|
-
isSortable: true
|
2836
|
-
},
|
2837
|
-
{
|
2838
|
-
prop: "cardType",
|
2839
|
-
title: "Brand",
|
2840
|
-
isSortable: true
|
2841
|
-
},
|
2842
|
-
{
|
2843
|
-
prop: "Amount",
|
2844
|
-
title: "Amount",
|
2845
|
-
isSortable: true
|
2846
|
-
},
|
2847
|
-
{
|
2848
|
-
prop: "Net",
|
2849
|
-
title: "Net",
|
2850
|
-
isSortable: true
|
2851
|
-
}
|
2852
|
-
];
|
2853
|
-
function CompletedTransactions(props) {
|
2854
|
-
const [dataList, setDataList] = (0, import_react14.useState)([]);
|
2855
|
-
const [startDate, setStartDate] = (0, import_react14.useState)(null);
|
2856
|
-
const [endDate, setEndDate] = (0, import_react14.useState)(null);
|
2857
|
-
const [state, setState] = (0, import_react14.useState)({
|
2858
|
-
page: 1,
|
2859
|
-
totalPage: 0,
|
2860
|
-
data: [],
|
2861
|
-
csvData: false
|
2862
|
-
});
|
2863
|
-
const formatDate = (inputDate) => {
|
2864
|
-
if (!inputDate) return "";
|
2865
|
-
const date = new Date(inputDate);
|
2866
|
-
const month = date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() + 1;
|
2867
|
-
const day = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate();
|
2868
|
-
return `${date.getFullYear()}-${month}-${day}`;
|
2869
|
-
};
|
2870
|
-
const downloadStringAsCSV = (name, content) => {
|
2871
|
-
const csvContent = convertArrayOfObjectsToCSV(content);
|
2872
|
-
const blob = new Blob([csvContent], { type: "text/csv;charset=utf-8;" });
|
2873
|
-
const a = document.createElement("a");
|
2874
|
-
a.href = URL.createObjectURL(blob);
|
2875
|
-
a.download = name;
|
2876
|
-
document.body.appendChild(a);
|
2877
|
-
a.click();
|
2878
|
-
document.body.removeChild(a);
|
2879
|
-
};
|
2880
|
-
const convertArrayOfObjectsToCSV = (array) => {
|
2881
|
-
const headers = Object.keys(array[0]);
|
2882
|
-
const csvRows = [];
|
2883
|
-
csvRows.push(headers.join(","));
|
2884
|
-
for (const obj of array) {
|
2885
|
-
const values = headers.map((header) => obj[header]);
|
2886
|
-
csvRows.push(values.join(","));
|
2887
|
-
}
|
2888
|
-
return csvRows.join("\n");
|
2889
|
-
};
|
2890
|
-
const fetchData = async (newPage, startDate2, endDate2) => {
|
2891
|
-
var _a, _b;
|
2892
|
-
try {
|
2893
|
-
const response = await fetch(`${baseUrl}get-complete-request-payments`, {
|
2894
|
-
method: "POST",
|
2895
|
-
headers: {
|
2896
|
-
"Content-Type": "application/json"
|
2897
|
-
},
|
2898
|
-
body: JSON.stringify({
|
2899
|
-
fractalpayPublicKey: props.fractalpayClientKey,
|
2900
|
-
page: newPage,
|
2901
|
-
dateStart: startDate2 ? formatDate(startDate2) : "",
|
2902
|
-
dateEnd: endDate2 ? formatDate(endDate2) : ""
|
2903
|
-
})
|
2904
|
-
});
|
2905
|
-
if (!response.ok) {
|
2906
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
2907
|
-
}
|
2908
|
-
const data = await response.json();
|
2909
|
-
setState((prev) => {
|
2910
|
-
var _a2;
|
2911
|
-
return __spreadProps(__spreadValues({}, prev), { totalPage: (_a2 = data == null ? void 0 : data.data) == null ? void 0 : _a2.totalPage });
|
2912
|
-
});
|
2913
|
-
if (data && (data == null ? void 0 : data.result) === true) {
|
2914
|
-
const result = ((_b = (_a = data == null ? void 0 : data.data) == null ? void 0 : _a.allPaymentTransaction) != null ? _b : []).map((item) => ({
|
2915
|
-
Date: formatDate(item == null ? void 0 : item.Date),
|
2916
|
-
Name: item == null ? void 0 : item.Name,
|
2917
|
-
lastFourDigits: item == null ? void 0 : item.lastFourDigits,
|
2918
|
-
cardType: item == null ? void 0 : item.cardType,
|
2919
|
-
Amount: `$${parseFloat(item == null ? void 0 : item.Amount).toLocaleString("en-US", { maximumFractionDigits: 2 })}`,
|
2920
|
-
Net: `$${parseFloat(item == null ? void 0 : item.Net).toLocaleString("en-US", { maximumFractionDigits: 2 })}`
|
2921
|
-
}));
|
2922
|
-
if (state.csvData) {
|
2923
|
-
downloadStringAsCSV("transaction.csv", result);
|
2924
|
-
setState((prev) => {
|
2925
|
-
var _a2;
|
2926
|
-
return __spreadProps(__spreadValues({}, prev), { data: (_a2 = data == null ? void 0 : data.data) == null ? void 0 : _a2.allPaymentTransaction, csvData: false });
|
2927
|
-
});
|
2928
|
-
}
|
2929
|
-
setDataList(result);
|
2930
|
-
} else {
|
2931
|
-
console.log("No data available");
|
2932
|
-
}
|
2933
|
-
} catch (error) {
|
2934
|
-
console.log(error);
|
2935
|
-
}
|
2936
|
-
};
|
2937
|
-
const handleStartDateChange = (date) => {
|
2938
|
-
setStartDate(date);
|
952
|
+
const [loading, setLoading] = (0, import_react7.useState)(false);
|
953
|
+
const [errors, setErrors] = (0, import_react7.useState)({});
|
954
|
+
const [phone, setPhone] = (0, import_react7.useState)(null);
|
955
|
+
const [requestDetails, setRequestDetails] = (0, import_react7.useState)({
|
956
|
+
email: "",
|
957
|
+
phone_number: "",
|
958
|
+
order_id: "",
|
959
|
+
name: "",
|
960
|
+
fractalpayPublicKey: fractalpayClientKey
|
961
|
+
});
|
962
|
+
const [amount, setAmount] = (0, import_react7.useState)("");
|
963
|
+
const [showConfirmationModal, setShowConfirmationModal] = (0, import_react7.useState)(false);
|
964
|
+
const [apiResponse, setApiResponse] = (0, import_react7.useState)(null);
|
965
|
+
const phoneNumberRegex = (value) => /^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/.test(value);
|
966
|
+
const amoutRegex = /[+-]?([0-9]*[.])?[0-9]+/;
|
967
|
+
const isValidEmail = (value) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value);
|
968
|
+
const isAlpha = (value) => /^[A-Za-z\s]*$/.test(value);
|
969
|
+
const handleClose = () => {
|
970
|
+
setShow(false);
|
971
|
+
setErrors({});
|
2939
972
|
};
|
2940
|
-
const
|
2941
|
-
|
973
|
+
const handleShow = () => setShow(true);
|
974
|
+
const handleCloseConfirmationModal = () => {
|
975
|
+
console.log(apiResponse, "apiresponse");
|
976
|
+
handleSubmit(apiResponse);
|
977
|
+
setShowConfirmationModal(false);
|
2942
978
|
};
|
2943
|
-
|
2944
|
-
|
2945
|
-
|
2946
|
-
|
2947
|
-
|
2948
|
-
|
2949
|
-
|
2950
|
-
|
2951
|
-
|
2952
|
-
|
2953
|
-
|
2954
|
-
|
2955
|
-
|
2956
|
-
|
2957
|
-
|
2958
|
-
|
2959
|
-
|
2960
|
-
|
2961
|
-
|
2962
|
-
|
2963
|
-
if (!response.ok) {
|
2964
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
2965
|
-
}
|
2966
|
-
const data = await response.json();
|
2967
|
-
if (data.status) {
|
2968
|
-
const link = document.createElement("a");
|
2969
|
-
link.href = `${data == null ? void 0 : data.data}`;
|
2970
|
-
link.target = "_blank";
|
2971
|
-
document.body.appendChild(link);
|
2972
|
-
link.click();
|
2973
|
-
document.body.removeChild(link);
|
2974
|
-
}
|
2975
|
-
} catch (error) {
|
2976
|
-
console.log(error);
|
2977
|
-
}
|
979
|
+
function emptyFields() {
|
980
|
+
setRequestDetails({
|
981
|
+
email: "",
|
982
|
+
phone_number: "",
|
983
|
+
order_id: "",
|
984
|
+
name: "",
|
985
|
+
fractalpayPublicKey: fractalpayClientKey
|
986
|
+
});
|
987
|
+
setAmount("");
|
988
|
+
}
|
989
|
+
function handleSubmit(event) {
|
990
|
+
let message = {
|
991
|
+
type: "preview.compiledcheck",
|
992
|
+
other: __spreadProps(__spreadValues({}, event), { status: true })
|
993
|
+
};
|
994
|
+
window.parent.postMessage(message, "*");
|
995
|
+
}
|
996
|
+
const sendRequestPayment = async () => {
|
997
|
+
if (Object.keys(errors).length > 0) {
|
998
|
+
return;
|
2978
999
|
}
|
2979
|
-
|
2980
|
-
|
2981
|
-
|
2982
|
-
|
2983
|
-
|
2984
|
-
|
2985
|
-
fetchData(pageNumber, startDate, endDate);
|
2986
|
-
};
|
2987
|
-
return /* @__PURE__ */ import_react14.default.createElement(import_react14.default.Fragment, null, /* @__PURE__ */ import_react14.default.createElement("style", null, `
|
2988
|
-
.react-datepicker-wrapper:first-child {
|
2989
|
-
margin-right: 10px;
|
2990
|
-
}
|
2991
|
-
`), /* @__PURE__ */ import_react14.default.createElement("div", { className: "mb-5" }, /* @__PURE__ */ import_react14.default.createElement("div", null, /* @__PURE__ */ import_react14.default.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ import_react14.default.createElement("div", { style: { display: "flex", marginRight: "10px", marginTop: "25px" } }, /* @__PURE__ */ import_react14.default.createElement(
|
2992
|
-
import_react_datepicker.default,
|
2993
|
-
{
|
2994
|
-
selected: startDate,
|
2995
|
-
onChange: handleStartDateChange,
|
2996
|
-
selectsStart: true,
|
2997
|
-
startDate,
|
2998
|
-
endDate,
|
2999
|
-
placeholderText: "Start Date",
|
3000
|
-
required: true
|
1000
|
+
setErrors({});
|
1001
|
+
if (!(requestDetails == null ? void 0 : requestDetails.email) && phone && !phoneNumberRegex(phone)) {
|
1002
|
+
setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
|
1003
|
+
phone: ErrorText.phonenumbervalid
|
1004
|
+
}));
|
1005
|
+
return;
|
3001
1006
|
}
|
3002
|
-
|
3003
|
-
|
3004
|
-
{
|
3005
|
-
selected: endDate,
|
3006
|
-
onChange: handleEndDateChange,
|
3007
|
-
selectsEnd: true,
|
3008
|
-
startDate,
|
3009
|
-
endDate,
|
3010
|
-
minDate: startDate,
|
3011
|
-
placeholderText: "End Date"
|
1007
|
+
if (!validateForm()) {
|
1008
|
+
return;
|
3012
1009
|
}
|
3013
|
-
)), /* @__PURE__ */ import_react14.default.createElement("button", { className: "export-btn1", onClick: handleExport }, "Export")), /* @__PURE__ */ import_react14.default.createElement(
|
3014
|
-
import_react_bs_datatable.DatatableWrapper,
|
3015
|
-
{
|
3016
|
-
body: dataList,
|
3017
|
-
headers: STORY_HEADERS,
|
3018
|
-
paginationOptionsProps: {
|
3019
|
-
initialState: {
|
3020
|
-
rowsPerPage: 10,
|
3021
|
-
options: [5, 10, 15, 20]
|
3022
|
-
}
|
3023
|
-
}
|
3024
|
-
},
|
3025
|
-
/* @__PURE__ */ import_react14.default.createElement(import_react_bootstrap6.Row, { className: "mb-4 p-2" }, /* @__PURE__ */ import_react14.default.createElement(import_react_bootstrap6.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__ */ import_react14.default.createElement(import_react_bs_datatable.PaginationOptions, null)), /* @__PURE__ */ import_react14.default.createElement(import_react_bootstrap6.Col, { xs: 12, lg: 4, className: "d-flex flex-col justify-content-end align-items-end" }), /* @__PURE__ */ import_react14.default.createElement(import_react_bootstrap6.Col, { xs: 12, sm: 6, lg: 4, className: "d-flex flex-col justify-content-end align-items-end" }, /* @__PURE__ */ import_react14.default.createElement(import_react_bs_datatable.Filter, null))),
|
3026
|
-
/* @__PURE__ */ import_react14.default.createElement(import_react_bootstrap6.Row, null, /* @__PURE__ */ import_react14.default.createElement("div", { className: "responsive-tbl" }, /* @__PURE__ */ import_react14.default.createElement(import_react_bootstrap6.Table, null, /* @__PURE__ */ import_react14.default.createElement(import_react_bs_datatable.TableHeader, null), /* @__PURE__ */ import_react14.default.createElement(import_react_bs_datatable.TableBody, null)))),
|
3027
|
-
/* @__PURE__ */ import_react14.default.createElement(PaginationPg, { totalPages: state.totalPage, onPageChange: handlePageChange, current: state.page })
|
3028
|
-
))));
|
3029
|
-
}
|
3030
|
-
|
3031
|
-
// src/app/components/Payment/TockenizPay.tsx
|
3032
|
-
var import_react15 = __toESM(require("react"));
|
3033
|
-
var import_react_bootstrap7 = require("react-bootstrap");
|
3034
|
-
var import_react_toastify5 = require("react-toastify");
|
3035
|
-
var import_node_forge2 = __toESM(require("node-forge"));
|
3036
|
-
var import_credit_card_type = __toESM(require("credit-card-type"));
|
3037
|
-
function TockenizPay() {
|
3038
|
-
const [state, setState] = (0, import_react15.useState)({
|
3039
|
-
show: false,
|
3040
|
-
publicKey: "",
|
3041
|
-
sessionKey: "",
|
3042
|
-
cardNumber: "",
|
3043
|
-
year: "",
|
3044
|
-
month: "",
|
3045
|
-
cvv: "",
|
3046
|
-
zip: "",
|
3047
|
-
amount: ""
|
3048
|
-
});
|
3049
|
-
const [cardTypeDetail, setCardTypeDetail] = (0, import_react15.useState)(null);
|
3050
|
-
const [isValid, setIsValid] = (0, import_react15.useState)(false);
|
3051
|
-
const [isValidMonth, setIsValidMonth] = (0, import_react15.useState)(false);
|
3052
|
-
const [data, setData] = (0, import_react15.useState)(null);
|
3053
|
-
const handlePaymentClick = async () => {
|
3054
1010
|
try {
|
3055
|
-
|
3056
|
-
|
3057
|
-
|
3058
|
-
|
3059
|
-
|
3060
|
-
|
3061
|
-
|
3062
|
-
|
3063
|
-
|
3064
|
-
|
3065
|
-
|
3066
|
-
|
3067
|
-
|
3068
|
-
|
3069
|
-
|
3070
|
-
|
3071
|
-
|
3072
|
-
sessionKey: (_b = data2 == null ? void 0 : data2.data) == null ? void 0 : _b.session_key
|
3073
|
-
});
|
3074
|
-
});
|
1011
|
+
setLoading(true);
|
1012
|
+
const formData = {
|
1013
|
+
fractalpayPublicKey: fractalpayClientKey,
|
1014
|
+
amount,
|
1015
|
+
phone_number: phone,
|
1016
|
+
order_id: requestDetails.order_id,
|
1017
|
+
action: "request",
|
1018
|
+
name: requestDetails.name,
|
1019
|
+
email: requestDetails.email,
|
1020
|
+
customer_id: (props == null ? void 0 : props.customerId) ? props == null ? void 0 : props.customerId : ""
|
1021
|
+
};
|
1022
|
+
let response = await import_axios2.default.post(`${baseUrl}send-request-pre-auth-payment`, formData);
|
1023
|
+
if ((response == null ? void 0 : response.status) === 200) {
|
1024
|
+
setShowConfirmationModal(true);
|
1025
|
+
setShow(false);
|
1026
|
+
emptyFields();
|
1027
|
+
setApiResponse(response == null ? void 0 : response.data);
|
3075
1028
|
}
|
1029
|
+
setLoading(false);
|
3076
1030
|
} catch (error) {
|
3077
1031
|
console.log(error);
|
1032
|
+
setLoading(false);
|
3078
1033
|
}
|
3079
1034
|
};
|
3080
|
-
|
3081
|
-
|
3082
|
-
|
3083
|
-
const
|
3084
|
-
|
3085
|
-
|
3086
|
-
|
3087
|
-
|
3088
|
-
}
|
3089
|
-
});
|
3090
|
-
const encryptedBase64 = import_node_forge2.default.util.encode64(encrypted);
|
3091
|
-
console.log(encryptedBase64);
|
3092
|
-
const requestBody = {
|
3093
|
-
enc_track2_data: encryptedBase64,
|
3094
|
-
session_key: state.sessionKey,
|
3095
|
-
algorithm: "RSAES_OAEP_SHA_1"
|
3096
|
-
};
|
3097
|
-
try {
|
3098
|
-
const response = await fetch(
|
3099
|
-
"https://m1ao5pku8b.execute-api.us-east-2.amazonaws.com/prod/tokenizer/tokenize",
|
3100
|
-
{
|
3101
|
-
method: "POST",
|
3102
|
-
headers: {
|
3103
|
-
"x-app-session-key": state == null ? void 0 : state.sessionKey,
|
3104
|
-
"Content-Type": "application/json"
|
3105
|
-
},
|
3106
|
-
body: JSON.stringify(requestBody)
|
3107
|
-
}
|
3108
|
-
);
|
3109
|
-
if (!response.ok) {
|
3110
|
-
const errorData = await response.json();
|
3111
|
-
throw new Error(((_c = errorData == null ? void 0 : errorData.data) == null ? void 0 : _c.message) || "Request failed");
|
3112
|
-
}
|
3113
|
-
const responseData = await response.json();
|
3114
|
-
import_react_toastify5.toast.success("Payment Successful");
|
3115
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3116
|
-
show: false,
|
3117
|
-
publicKey: "",
|
3118
|
-
sessionKey: "",
|
3119
|
-
cardNumber: "",
|
3120
|
-
year: "",
|
3121
|
-
month: "",
|
3122
|
-
cvv: "",
|
3123
|
-
zip: "",
|
3124
|
-
amount: ""
|
1035
|
+
let favicon_logo = baseUrl + "images/logo-img.png";
|
1036
|
+
const handleChange = (e) => {
|
1037
|
+
const { value } = e.target;
|
1038
|
+
const token = e.target.dataset.token;
|
1039
|
+
setRequestDetails(__spreadProps(__spreadValues({}, requestDetails), { [token]: value }));
|
1040
|
+
if (token === "name" && !isAlpha(value)) {
|
1041
|
+
setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
|
1042
|
+
[token]: ErrorText.onlylettersallowed
|
3125
1043
|
}));
|
3126
|
-
|
3127
|
-
} catch (error) {
|
3128
|
-
import_react_toastify5.toast.error((error == null ? void 0 : error.message) || "An error occurred");
|
3129
|
-
console.error("Error:", error);
|
1044
|
+
return;
|
3130
1045
|
}
|
3131
|
-
|
3132
|
-
|
3133
|
-
|
3134
|
-
|
3135
|
-
switch (cardType) {
|
3136
|
-
case "visa":
|
3137
|
-
case "mastercard":
|
3138
|
-
case "Discover":
|
3139
|
-
case "JCB":
|
3140
|
-
formattedValue = cleanNumber.replace(/(.{4})/g, "$1 ").trim();
|
3141
|
-
break;
|
3142
|
-
case "american-express":
|
3143
|
-
formattedValue = cleanNumber.replace(/(\d{4})(\d{6})(\d{5})/, "$1 $2 $3");
|
3144
|
-
break;
|
3145
|
-
case "diners-club":
|
3146
|
-
formattedValue = cleanNumber.replace(/(\d{4})(\d{6})(\d{4})/, "$1 $2 $3");
|
3147
|
-
break;
|
3148
|
-
case "maestro":
|
3149
|
-
formattedValue = cleanNumber.length <= 19 ? cleanNumber.replace(/(.{4})/g, "$1 ").trim() : cleanNumber;
|
3150
|
-
break;
|
3151
|
-
default:
|
3152
|
-
formattedValue = cleanNumber;
|
1046
|
+
let errorobj = errors;
|
1047
|
+
if (token === "email" && !phone) {
|
1048
|
+
delete errorobj.phone;
|
1049
|
+
setErrors(errorobj);
|
3153
1050
|
}
|
3154
|
-
|
3155
|
-
|
3156
|
-
|
3157
|
-
e.preventDefault();
|
3158
|
-
e.stopPropagation();
|
3159
|
-
const { value } = e.target;
|
3160
|
-
let cardtyp = (0, import_credit_card_type.default)(value)[0];
|
3161
|
-
const formattedValue = formatCreditCardNumber(value, cardtyp == null ? void 0 : cardtyp.type);
|
3162
|
-
setCardTypeDetail((0, import_credit_card_type.default)(value)[0]);
|
3163
|
-
console.log(formattedValue);
|
3164
|
-
if (value.match(/[a-zA-Z]/)) {
|
3165
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3166
|
-
cardNumber: formattedValue,
|
3167
|
-
error: "Invalid input. Please enter only numbers."
|
3168
|
-
}));
|
3169
|
-
} else {
|
3170
|
-
handleCardNumLength("");
|
3171
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3172
|
-
cardNumber: formattedValue,
|
3173
|
-
error: null
|
3174
|
-
}));
|
1051
|
+
if (value) {
|
1052
|
+
delete errorobj[token];
|
1053
|
+
setErrors(errorobj);
|
3175
1054
|
}
|
3176
|
-
|
3177
|
-
|
3178
|
-
|
3179
|
-
"Visa": 16,
|
3180
|
-
"MasterCard": 16,
|
3181
|
-
"AmericanExpress": 15,
|
3182
|
-
"Discover": 16,
|
3183
|
-
"DinersClub": 14,
|
3184
|
-
"JCB": 16
|
3185
|
-
};
|
3186
|
-
return cardLengths[cardType] || "Unknown card type";
|
3187
|
-
}
|
3188
|
-
const handleMonthChange = (e) => {
|
3189
|
-
setIsValid(false);
|
3190
|
-
let value = e.target.value;
|
3191
|
-
if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 1 && parseInt(value, 10) <= 12)) {
|
3192
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3193
|
-
month: value
|
3194
|
-
}));
|
3195
|
-
setIsValidMonth(false);
|
3196
|
-
} else {
|
3197
|
-
setIsValidMonth(true);
|
1055
|
+
if (token === "email" && !value) {
|
1056
|
+
delete errorobj[token];
|
1057
|
+
setErrors(errorobj);
|
3198
1058
|
}
|
3199
1059
|
};
|
3200
|
-
const
|
3201
|
-
|
3202
|
-
|
3203
|
-
|
3204
|
-
|
3205
|
-
|
3206
|
-
year: value
|
3207
|
-
}));
|
1060
|
+
const handleAmountChange = (data) => {
|
1061
|
+
const { value } = data;
|
1062
|
+
if (Number(value) > 0) {
|
1063
|
+
let errorobj = errors;
|
1064
|
+
delete errorobj.amount;
|
1065
|
+
setErrors(errorobj);
|
3208
1066
|
}
|
1067
|
+
setAmount(value);
|
3209
1068
|
};
|
3210
|
-
const
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
3214
|
-
if (
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
1069
|
+
const validateForm = () => {
|
1070
|
+
let newErrors = {};
|
1071
|
+
if (!amount) newErrors.amount = ErrorText.amountrequired;
|
1072
|
+
if (requestDetails.email && !isValidEmail(requestDetails == null ? void 0 : requestDetails.email)) newErrors.email = ErrorText.invalidemail;
|
1073
|
+
if (!phone && !(requestDetails == null ? void 0 : requestDetails.email)) newErrors.phone = ErrorText.phoneoremailrequired;
|
1074
|
+
if (!phone && !(requestDetails == null ? void 0 : requestDetails.email)) newErrors.email = ErrorText.phoneoremailrequired;
|
1075
|
+
if (!phone && requestDetails.email && !isValidEmail(requestDetails == null ? void 0 : requestDetails.email)) newErrors.email = ErrorText.invalidemail;
|
1076
|
+
if (props.from === "merchant" && !requestDetails.order_id) newErrors.order_id = ErrorText.orderidrequired;
|
1077
|
+
setErrors(newErrors);
|
1078
|
+
return Object.keys(newErrors).length === 0;
|
3219
1079
|
};
|
3220
|
-
|
3221
|
-
|
3222
|
-
|
3223
|
-
|
3224
|
-
|
3225
|
-
|
3226
|
-
zip: value
|
1080
|
+
(0, import_react7.useEffect)(() => {
|
1081
|
+
if (props) {
|
1082
|
+
setRequestDetails((prev) => __spreadProps(__spreadValues({}, prev), {
|
1083
|
+
order_id: props.orderID ? props.orderID : "",
|
1084
|
+
name: (props == null ? void 0 : props.name) ? props == null ? void 0 : props.name : "",
|
1085
|
+
email: (props == null ? void 0 : props.email) ? props == null ? void 0 : props.email : ""
|
3227
1086
|
}));
|
1087
|
+
setAmount(props.amount ? props.amount : "");
|
1088
|
+
setPhone(props.phone ? `${props.phone}` : null);
|
3228
1089
|
}
|
3229
|
-
};
|
3230
|
-
const
|
3231
|
-
|
3232
|
-
|
3233
|
-
|
3234
|
-
|
3235
|
-
let parts = value.split(".");
|
3236
|
-
if (parts.length > 2) {
|
3237
|
-
parts = [parts.shift(), parts.join(".")];
|
3238
|
-
value = parts.join("");
|
3239
|
-
}
|
3240
|
-
if (parts.length === 2 && parts[1].length > 2) {
|
3241
|
-
value = `${parts[0]}.${parts[1].slice(0, 2)}`;
|
3242
|
-
}
|
3243
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3244
|
-
amount: value
|
3245
|
-
}));
|
3246
|
-
};
|
3247
|
-
const handleAmountBlur = () => {
|
3248
|
-
const value = state.amount;
|
3249
|
-
if (value && !value.includes(".")) {
|
3250
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
3251
|
-
amount: `${value}.00`
|
1090
|
+
}, [props]);
|
1091
|
+
const handlePhoneChange = (e) => {
|
1092
|
+
let value = e == null ? void 0 : e.value;
|
1093
|
+
if (value && (value == null ? void 0 : value.length) > 0 && (value == null ? void 0 : value.length) !== 10) {
|
1094
|
+
setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
|
1095
|
+
phone: ErrorText.phonenumberlength
|
3252
1096
|
}));
|
1097
|
+
setPhone(value);
|
1098
|
+
return;
|
1099
|
+
} else {
|
1100
|
+
setPhone(value);
|
3253
1101
|
}
|
3254
|
-
|
3255
|
-
|
3256
|
-
if (
|
3257
|
-
|
3258
|
-
minimumFractionDigits: 2,
|
3259
|
-
maximumFractionDigits: 2
|
3260
|
-
})}`;
|
1102
|
+
let errorobj = errors;
|
1103
|
+
delete errorobj.phone;
|
1104
|
+
if (value && !(requestDetails == null ? void 0 : requestDetails.email)) {
|
1105
|
+
delete errorobj.email;
|
3261
1106
|
}
|
3262
|
-
|
1107
|
+
setErrors(errorobj);
|
1108
|
+
};
|
1109
|
+
function formatAmount(amount2) {
|
1110
|
+
return new Intl.NumberFormat("en-US", {
|
1111
|
+
style: "currency",
|
1112
|
+
currency: "USD",
|
1113
|
+
minimumFractionDigits: 2,
|
1114
|
+
maximumFractionDigits: 2
|
1115
|
+
}).format(Number(amount2));
|
3263
1116
|
}
|
3264
|
-
return /* @__PURE__ */
|
3265
|
-
|
3266
|
-
{
|
3267
|
-
className: "export-btn mt-4",
|
3268
|
-
style: { width: "100px" },
|
3269
|
-
onClick: () => handlePaymentClick()
|
3270
|
-
},
|
3271
|
-
"TokenizePay"
|
3272
|
-
), /* @__PURE__ */ import_react15.default.createElement(
|
3273
|
-
import_react_bootstrap7.Modal,
|
1117
|
+
return /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ import_react7.default.createElement(Loader_default, { loading }), /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Request Pre Auth Payment"), /* @__PURE__ */ import_react7.default.createElement(
|
1118
|
+
CustomModal2_default,
|
3274
1119
|
{
|
3275
|
-
|
3276
|
-
|
3277
|
-
show: false
|
3278
|
-
})),
|
3279
|
-
centered: true
|
1120
|
+
open: show,
|
1121
|
+
onClose: () => setShow(false)
|
3280
1122
|
},
|
3281
|
-
/* @__PURE__ */
|
3282
|
-
/* @__PURE__ */
|
3283
|
-
"input",
|
3284
|
-
{
|
3285
|
-
id: "NameOnCard",
|
3286
|
-
className: "form-control required",
|
3287
|
-
type: "text",
|
3288
|
-
maxLength: 100,
|
3289
|
-
placeholder: "Name"
|
3290
|
-
}
|
3291
|
-
), /* @__PURE__ */ import_react15.default.createElement(
|
3292
|
-
"span",
|
3293
|
-
{
|
3294
|
-
id: "NameOnCard-error",
|
3295
|
-
style: { color: "red", display: "none" }
|
3296
|
-
}
|
3297
|
-
)), /* @__PURE__ */ import_react15.default.createElement("div", { className: "form-group" }, /* @__PURE__ */ import_react15.default.createElement(
|
3298
|
-
"input",
|
3299
|
-
{
|
3300
|
-
"data-token": "card_number",
|
3301
|
-
className: "null card-image form-control required",
|
3302
|
-
type: "text",
|
3303
|
-
maxLength: 19,
|
3304
|
-
value: state.cardNumber,
|
3305
|
-
placeholder: "0000 0000 0000 0000",
|
3306
|
-
onChange: handleCardNumberChange
|
3307
|
-
}
|
3308
|
-
), state.error && /* @__PURE__ */ import_react15.default.createElement("div", { style: { color: "red" } }, state.error)), /* @__PURE__ */ import_react15.default.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ import_react15.default.createElement(
|
3309
|
-
"input",
|
3310
|
-
{
|
3311
|
-
"data-token": "exp_month",
|
3312
|
-
className: "form-control required",
|
3313
|
-
type: "text",
|
3314
|
-
placeholder: "MM",
|
3315
|
-
value: state.month,
|
3316
|
-
maxLength: 2,
|
3317
|
-
onChange: (e) => handleMonthChange(e)
|
3318
|
-
}
|
3319
|
-
), isValidMonth && /* @__PURE__ */ import_react15.default.createElement(
|
3320
|
-
"span",
|
3321
|
-
{
|
3322
|
-
id: "card_number-error",
|
3323
|
-
style: { color: "red", fontSize: "15px" }
|
3324
|
-
},
|
3325
|
-
"Please write month only 1 to 12"
|
3326
|
-
)), /* @__PURE__ */ import_react15.default.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ import_react15.default.createElement(
|
3327
|
-
"input",
|
3328
|
-
{
|
3329
|
-
"data-token": "exp_year",
|
3330
|
-
className: "form-control required",
|
3331
|
-
type: "text",
|
3332
|
-
placeholder: "YY",
|
3333
|
-
maxLength: 2,
|
3334
|
-
value: state.year,
|
3335
|
-
onChange: (e) => handleYearChange(e)
|
3336
|
-
}
|
3337
|
-
), state.yearError && /* @__PURE__ */ import_react15.default.createElement("span", { id: "exp_year-error", style: { color: "red" } }, state.yearError)), /* @__PURE__ */ import_react15.default.createElement("div", { className: "security-code-group form-group" }, /* @__PURE__ */ import_react15.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react15.default.createElement(
|
1123
|
+
/* @__PURE__ */ import_react7.default.createElement("div", { className: "request-payment-amount-detail" }, /* @__PURE__ */ import_react7.default.createElement("p", { className: "request-payment-merchantname" }, "Authorization Request"), /* @__PURE__ */ import_react7.default.createElement("p", { className: "request-payment-pre-auth-merchantname" }, "Pay ", props == null ? void 0 : props.webname), /* @__PURE__ */ import_react7.default.createElement("p", { className: "request-payment-amount" }, formatAmount(props == null ? void 0 : props.amount)), (props == null ? void 0 : props.from) === "merchant" && /* @__PURE__ */ import_react7.default.createElement("p", { className: "request-payment-orderid" }, requestDetails == null ? void 0 : requestDetails.order_id), /* @__PURE__ */ import_react7.default.createElement("span", { className: "request-payment-close-popup", onClick: handleClose }, /* @__PURE__ */ import_react7.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ import_react7.default.createElement("g", { "clip-path": "url(#clip0_12425_52336)" }, /* @__PURE__ */ import_react7.default.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__ */ import_react7.default.createElement("defs", null, /* @__PURE__ */ import_react7.default.createElement("clipPath", { id: "clip0_12425_52336" }, /* @__PURE__ */ import_react7.default.createElement("rect", { width: "16", height: "16", fill: "white" })))))),
|
1124
|
+
/* @__PURE__ */ import_react7.default.createElement("form", { className: "request-payment-input-form" }, /* @__PURE__ */ import_react7.default.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ import_react7.default.createElement("label", { htmlFor: "exampleFormControlInput2", className: "request-payment-input-label" }, "FULL NAME"), /* @__PURE__ */ import_react7.default.createElement(
|
3338
1125
|
"input",
|
3339
1126
|
{
|
3340
|
-
|
3341
|
-
className: "form-control required",
|
1127
|
+
className: "request-payment-input-box",
|
3342
1128
|
type: "text",
|
3343
|
-
|
3344
|
-
|
3345
|
-
|
3346
|
-
|
1129
|
+
placeholder: "Full Name",
|
1130
|
+
"data-token": "name",
|
1131
|
+
onChange: handleChange,
|
1132
|
+
value: requestDetails == null ? void 0 : requestDetails.name
|
3347
1133
|
}
|
3348
|
-
),
|
3349
|
-
|
1134
|
+
), errors.name && /* @__PURE__ */ import_react7.default.createElement("small", { className: "request-payment-error-msg" }, errors.name)), /* @__PURE__ */ import_react7.default.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ import_react7.default.createElement("label", { htmlFor: "requestPhoneNumber", className: "request-payment-input-label" }, "Phone Number"), /* @__PURE__ */ import_react7.default.createElement(
|
1135
|
+
import_react_number_format2.PatternFormat,
|
3350
1136
|
{
|
3351
|
-
|
3352
|
-
|
3353
|
-
|
3354
|
-
|
3355
|
-
|
3356
|
-
|
3357
|
-
|
3358
|
-
onChange: (e) => handleZIP(e)
|
1137
|
+
className: "request-payment-input-box",
|
1138
|
+
placeholder: "Mobile number",
|
1139
|
+
format: "+1 (###) ###-####",
|
1140
|
+
value: phone,
|
1141
|
+
onValueChange: (e) => {
|
1142
|
+
handlePhoneChange(e);
|
1143
|
+
}
|
3359
1144
|
}
|
3360
|
-
), /* @__PURE__ */
|
3361
|
-
"a",
|
3362
|
-
{
|
3363
|
-
tabIndex: 0,
|
3364
|
-
role: "button",
|
3365
|
-
"data-toggle": "popover",
|
3366
|
-
"data-trigger": "focus",
|
3367
|
-
"data-placement": "left",
|
3368
|
-
"data-content": "Enter the ZIP/Postal code for your credit card billing address."
|
3369
|
-
},
|
3370
|
-
/* @__PURE__ */ import_react15.default.createElement("i", { className: "fa fa-question-circle" })
|
3371
|
-
), /* @__PURE__ */ import_react15.default.createElement(
|
3372
|
-
"span",
|
3373
|
-
{
|
3374
|
-
id: "ZIPCode-error",
|
3375
|
-
style: { color: "red", display: "none" }
|
3376
|
-
},
|
3377
|
-
"This field is required"
|
3378
|
-
))), /* @__PURE__ */ import_react15.default.createElement("div", { className: "form-group top-amnt" }, /* @__PURE__ */ import_react15.default.createElement("div", null, /* @__PURE__ */ import_react15.default.createElement("label", null, "Payment amount"), /* @__PURE__ */ import_react15.default.createElement("div", { className: "amount-placeholder" }, /* @__PURE__ */ import_react15.default.createElement(
|
1145
|
+
), errors.phone && /* @__PURE__ */ import_react7.default.createElement("small", { className: "request-payment-error-msg" }, errors.phone)), /* @__PURE__ */ import_react7.default.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ import_react7.default.createElement("label", { htmlFor: "exampleFormControlInput2", className: "request-payment-input-label" }, "EMAIL"), /* @__PURE__ */ import_react7.default.createElement(
|
3379
1146
|
"input",
|
3380
1147
|
{
|
3381
|
-
|
3382
|
-
className: "form-control required",
|
3383
|
-
name: "amount",
|
1148
|
+
className: "request-payment-input-box",
|
3384
1149
|
type: "text",
|
3385
|
-
placeholder: "",
|
3386
|
-
|
3387
|
-
|
3388
|
-
|
1150
|
+
placeholder: "Email",
|
1151
|
+
onChange: handleChange,
|
1152
|
+
"data-token": "email",
|
1153
|
+
value: requestDetails == null ? void 0 : requestDetails.email
|
3389
1154
|
}
|
3390
|
-
)
|
1155
|
+
), errors.email && /* @__PURE__ */ import_react7.default.createElement("small", { className: "request-payment-error-msg" }, errors.email)), /* @__PURE__ */ import_react7.default.createElement(
|
3391
1156
|
"button",
|
3392
1157
|
{
|
3393
1158
|
type: "button",
|
3394
|
-
|
3395
|
-
onClick:
|
3396
|
-
|
3397
|
-
},
|
3398
|
-
"Submit"
|
3399
|
-
)), /* @__PURE__ */ import_react15.default.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ import_react15.default.createElement(
|
3400
|
-
"svg",
|
3401
|
-
{
|
3402
|
-
xmlns: "http://www.w3.org/2000/svg",
|
3403
|
-
width: "20",
|
3404
|
-
height: "20",
|
3405
|
-
viewBox: "0 0 26 26"
|
1159
|
+
className: "request-payment-submit-button",
|
1160
|
+
onClick: sendRequestPayment,
|
1161
|
+
disabled: loading
|
3406
1162
|
},
|
3407
|
-
|
3408
|
-
|
3409
|
-
|
3410
|
-
|
3411
|
-
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"
|
3412
|
-
}
|
3413
|
-
)
|
3414
|
-
), "Secure payments powered by Fractal", /* @__PURE__ */ import_react15.default.createElement(
|
3415
|
-
"img",
|
3416
|
-
{
|
3417
|
-
src: "https://ui.fractalpay.com/favicon.ico",
|
3418
|
-
alt: "Fractal logo",
|
3419
|
-
className: "powered-logo"
|
3420
|
-
}
|
3421
|
-
)))))))
|
3422
|
-
));
|
3423
|
-
}
|
3424
|
-
|
3425
|
-
// src/app/components/Payment/GetPaymentDynamic.tsx
|
3426
|
-
var import_react17 = __toESM(require("react"));
|
3427
|
-
var import_react_bootstrap8 = require("react-bootstrap");
|
3428
|
-
|
3429
|
-
// src/app/components/Loader/MyLoadingAnimation.tsx
|
3430
|
-
var import_react16 = __toESM(require("react"));
|
3431
|
-
function MyLoadingAnimation() {
|
3432
|
-
return /* @__PURE__ */ import_react16.default.createElement(import_react16.default.Fragment, null, /* @__PURE__ */ import_react16.default.createElement(LoaderStyle_default, null), /* @__PURE__ */ import_react16.default.createElement("div", { className: "loading-animation" }, /* @__PURE__ */ import_react16.default.createElement("div", { className: "spinner" })));
|
3433
|
-
}
|
3434
|
-
|
3435
|
-
// src/app/components/Payment/GetPaymentDynamic.tsx
|
3436
|
-
function GetPaymentDynamic(props) {
|
3437
|
-
const { amount, fractalpayClientKey, orderID } = props;
|
3438
|
-
const [loading, setLoading] = (0, import_react17.useState)(false);
|
3439
|
-
const [show, setShow] = (0, import_react17.useState)(false);
|
3440
|
-
const [iframeLoaded, setIframeLoaded] = (0, import_react17.useState)(false);
|
3441
|
-
const [phoneNumber, setPhoneNumber] = (0, import_react17.useState)("");
|
3442
|
-
const [errorMessage, setErrorMessage] = (0, import_react17.useState)("");
|
3443
|
-
const [submitClicked, setSubmitClicked] = (0, import_react17.useState)(false);
|
3444
|
-
const [isValidNumber, setIsValidNumber] = (0, import_react17.useState)(true);
|
3445
|
-
const handleClose = () => {
|
3446
|
-
setIframeLoaded(false);
|
3447
|
-
setTimeout(() => {
|
3448
|
-
setShow(false);
|
3449
|
-
}, 1e3);
|
3450
|
-
};
|
3451
|
-
const handleShow = () => {
|
3452
|
-
if (fractalpayClientKey) {
|
3453
|
-
setShow(true);
|
3454
|
-
setIframeLoaded(true);
|
3455
|
-
} else {
|
3456
|
-
console.error(ErrorText.fractalpayclientidrequired);
|
3457
|
-
}
|
3458
|
-
};
|
3459
|
-
(0, import_react17.useEffect)(() => {
|
3460
|
-
if (!fractalpayClientKey) {
|
3461
|
-
console.error(ErrorText.fractalpayclientidrequired);
|
3462
|
-
}
|
3463
|
-
}, [fractalpayClientKey]);
|
3464
|
-
const handlePhoneNumberChange = (e) => {
|
3465
|
-
const number = e.target.value;
|
3466
|
-
const isValid = /^\d*$/.test(number);
|
3467
|
-
if (isValid) {
|
3468
|
-
setPhoneNumber(number);
|
3469
|
-
setIsValidNumber(number.length <= 10);
|
3470
|
-
if (number.length > 10) {
|
3471
|
-
setErrorMessage(ErrorText.phonenumbervalid);
|
3472
|
-
} else {
|
3473
|
-
setErrorMessage("");
|
3474
|
-
}
|
3475
|
-
} else {
|
3476
|
-
setErrorMessage(ErrorText.phonenumbervalidnumberonly);
|
3477
|
-
}
|
3478
|
-
};
|
3479
|
-
const handleLoad = () => {
|
3480
|
-
setLoading(false);
|
3481
|
-
};
|
3482
|
-
(0, import_react17.useEffect)(() => {
|
3483
|
-
const messageListener = (event) => {
|
3484
|
-
var _a, _b;
|
3485
|
-
const response = (_b = (_a = event == null ? void 0 : event.data) == null ? void 0 : _a.other) == null ? void 0 : _b.data;
|
3486
|
-
if (response == null ? void 0 : response.result) {
|
3487
|
-
setTimeout(() => {
|
3488
|
-
handleClose();
|
3489
|
-
}, 5e3);
|
3490
|
-
}
|
3491
|
-
};
|
3492
|
-
window.addEventListener("message", messageListener);
|
3493
|
-
return () => {
|
3494
|
-
window.removeEventListener("message", messageListener);
|
3495
|
-
};
|
3496
|
-
}, []);
|
3497
|
-
return /* @__PURE__ */ import_react17.default.createElement("div", null, /* @__PURE__ */ import_react17.default.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Pay"), /* @__PURE__ */ import_react17.default.createElement(import_react_bootstrap8.Modal, { show: show && iframeLoaded, id: "modal-pay", className: "modal-lg", onHide: handleClose }, /* @__PURE__ */ import_react17.default.createElement(import_react_bootstrap8.Modal.Header, { closeButton: true }), /* @__PURE__ */ import_react17.default.createElement(import_react_bootstrap8.Modal.Body, null, loading && /* @__PURE__ */ import_react17.default.createElement(MyLoadingAnimation, null), /* @__PURE__ */ import_react17.default.createElement(
|
3498
|
-
"iframe",
|
1163
|
+
loading ? "Loading..." : "Send Request"
|
1164
|
+
), /* @__PURE__ */ import_react7.default.createElement("div", { className: "request-payment-fractal-powerd-by" }, /* @__PURE__ */ import_react7.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17", height: "16", viewBox: "0 0 17 16", fill: "none" }, /* @__PURE__ */ import_react7.default.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__ */ import_react7.default.createElement("span", null, "Fractal"), /* @__PURE__ */ import_react7.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none" }, /* @__PURE__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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__ */ import_react7.default.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" }))))
|
1165
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
1166
|
+
CustomModal2_default,
|
3499
1167
|
{
|
3500
|
-
|
3501
|
-
|
3502
|
-
|
3503
|
-
|
3504
|
-
|
3505
|
-
}
|
3506
|
-
))));
|
1168
|
+
open: showConfirmationModal,
|
1169
|
+
onClose: handleCloseConfirmationModal
|
1170
|
+
},
|
1171
|
+
/* @__PURE__ */ import_react7.default.createElement("div", { className: "fractal-popup-content", style: { padding: "0px" } }, /* @__PURE__ */ import_react7.default.createElement("div", { className: "request-payment-success-container" }, /* @__PURE__ */ import_react7.default.createElement("span", { className: "request-payment-close-popup", onClick: handleCloseConfirmationModal }, /* @__PURE__ */ import_react7.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ import_react7.default.createElement("g", { "clip-path": "url(#clip0_12425_52336)" }, /* @__PURE__ */ import_react7.default.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__ */ import_react7.default.createElement("defs", null, /* @__PURE__ */ import_react7.default.createElement("clipPath", { id: "clip0_12425_52336" }, /* @__PURE__ */ import_react7.default.createElement("rect", { width: "16", height: "16", fill: "white" }))))), /* @__PURE__ */ import_react7.default.createElement("div", { className: "request-payment-success-tick-div" }, /* @__PURE__ */ import_react7.default.createElement("div", { className: "request-payment-success-tick" }, /* @__PURE__ */ import_react7.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ import_react7.default.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__ */ import_react7.default.createElement("h6", { className: "request-payment-success-text" }, "The request ", /* @__PURE__ */ import_react7.default.createElement("br", null), "was sent"), /* @__PURE__ */ import_react7.default.createElement("h6", { className: "request-payment-success-subtext" }, "Please wait for the customer to pay"), /* @__PURE__ */ import_react7.default.createElement("div", { className: "request-payment-success-btn-div" }, /* @__PURE__ */ import_react7.default.createElement("button", { onClick: handleCloseConfirmationModal, className: "request-payment-success-btn2" }, "Close"))))
|
1172
|
+
)));
|
3507
1173
|
}
|
3508
1174
|
// Annotate the CommonJS export names for ESM import in node:
|
3509
1175
|
0 && (module.exports = {
|
3510
|
-
CompletedTransactions,
|
3511
|
-
GetPaymentDynamic,
|
3512
|
-
Payment,
|
3513
1176
|
RequestPayment,
|
3514
|
-
|
3515
|
-
RequestPaymentDynamic,
|
3516
|
-
RequestPaymentonClick,
|
3517
|
-
RqstPaymntInputField,
|
3518
|
-
TockenizPay
|
1177
|
+
RequestPreAuthPayment
|
3519
1178
|
});
|