@pinerohit11/testwidget 0.1.60 → 0.1.62
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 +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +815 -1226
- package/dist/index.mjs +753 -1164
- package/package.json +7 -2
package/dist/index.mjs
CHANGED
@@ -20,7 +20,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
|
21
21
|
// src/app/components/RequestPayment/RequestPayment.tsx
|
22
22
|
import "bootstrap/dist/js/bootstrap.bundle.min.js";
|
23
|
-
import
|
23
|
+
import React6, { useState, useEffect } from "react";
|
24
24
|
|
25
25
|
// src/app/components/Loader/Loader.tsx
|
26
26
|
import React2 from "react";
|
@@ -151,1183 +151,772 @@ var Loader = (props) => {
|
|
151
151
|
};
|
152
152
|
var Loader_default = Loader;
|
153
153
|
|
154
|
-
// src/app/components/RequestPayment/
|
155
|
-
import
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
phonenumberrequired: "Please enter a phone number",
|
174
|
-
// phonenumbervalid:'Please enter a valid 10-digit phone number',
|
175
|
-
phonenumbervalid: "Please enter a valid phone number (max 10 digits)",
|
176
|
-
phonenumbervalidnumberonly: "Please enter a valid phone number (numbers only)",
|
177
|
-
orderidenter: "Please enter an order ID",
|
178
|
-
networkresponseerror: "Network response was not ok",
|
179
|
-
anerroroccured: "An error occurred. Please try again.",
|
180
|
-
montherror: "Please write month only 1 to 12",
|
181
|
-
fieldrequired: "This field is required",
|
182
|
-
fractalpayclientidrequired: "Fractalpay client key is missing or empty."
|
183
|
-
};
|
184
|
-
|
185
|
-
// src/app/components/RequestPayment/RequestPayment.tsx
|
186
|
-
function RequestPayment(props) {
|
187
|
-
const fractalpayClientKey = props.fractalpayClientKey;
|
188
|
-
const [show, setShow] = useState(false);
|
189
|
-
const [loading, setLoading] = useState(false);
|
190
|
-
const [errors, setErrors] = useState({});
|
191
|
-
const [requestDetails, setRequestDetails] = useState({
|
192
|
-
email: "",
|
193
|
-
amount: "",
|
194
|
-
phone_number: "",
|
195
|
-
order_id: "",
|
196
|
-
name: "",
|
197
|
-
fractalpayPublicKey: fractalpayClientKey
|
198
|
-
});
|
199
|
-
const [showConfirmationModal, setShowConfirmationModal] = useState(false);
|
200
|
-
const phoneNumberRegex = (value) => /^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/.test(value);
|
201
|
-
const amoutRegex = /[+-]?([0-9]*[.])?[0-9]+/;
|
202
|
-
const positiveAmountRegex = /^[+]?\d+(\.\d+)?$/;
|
203
|
-
const isValidEmail = (value) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value);
|
204
|
-
const isAlpha = (value) => /^[A-Za-z\s]*$/.test(value);
|
205
|
-
const handleClose = () => {
|
206
|
-
setShow(false);
|
207
|
-
emptyFields();
|
208
|
-
setErrors({});
|
209
|
-
};
|
210
|
-
const handleShow = () => setShow(true);
|
211
|
-
const handleCloseConfirmationModal = () => setShowConfirmationModal(false);
|
212
|
-
const emptyFields = () => {
|
213
|
-
setRequestDetails({
|
214
|
-
email: "",
|
215
|
-
amount: "",
|
216
|
-
phone_number: "",
|
217
|
-
order_id: "",
|
218
|
-
name: "",
|
219
|
-
fractalpayPublicKey: fractalpayClientKey
|
220
|
-
});
|
221
|
-
};
|
222
|
-
const handleSubmit = (event) => {
|
223
|
-
let message = {
|
224
|
-
type: "preview.compiledcheck",
|
225
|
-
other: __spreadProps(__spreadValues({}, event), { status: true })
|
226
|
-
};
|
227
|
-
console.log("message: ", message);
|
228
|
-
window.parent.postMessage(message, "*");
|
229
|
-
};
|
230
|
-
const sendRequestPayment = async () => {
|
231
|
-
setErrors({});
|
232
|
-
if (!(requestDetails == null ? void 0 : requestDetails.email) && requestDetails.phone_number && !phoneNumberRegex(requestDetails.phone_number)) {
|
233
|
-
setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
|
234
|
-
phone_number: "Phone number should be 10 digits"
|
235
|
-
}));
|
236
|
-
return;
|
237
|
-
}
|
238
|
-
if (!validateForm()) {
|
239
|
-
return;
|
240
|
-
}
|
241
|
-
try {
|
242
|
-
setLoading(true);
|
243
|
-
const formData = {
|
244
|
-
fractalpayPublicKey: fractalpayClientKey,
|
245
|
-
amount: requestDetails.amount,
|
246
|
-
phone_number: requestDetails.phone_number,
|
247
|
-
order_id: requestDetails.order_id,
|
248
|
-
action: "request",
|
249
|
-
name: requestDetails.name,
|
250
|
-
email: requestDetails.email
|
251
|
-
};
|
252
|
-
const response = await fetch(`${baseUrl}create-widget-order`, {
|
253
|
-
method: "POST",
|
254
|
-
headers: {
|
255
|
-
"Content-Type": "application/json"
|
256
|
-
},
|
257
|
-
body: JSON.stringify(formData)
|
258
|
-
});
|
259
|
-
if (!response.ok) {
|
260
|
-
throw new Error("Failed to create widget order");
|
261
|
-
}
|
262
|
-
const data = await response.json();
|
263
|
-
if (data) {
|
264
|
-
setShowConfirmationModal(true);
|
265
|
-
setShow(false);
|
266
|
-
emptyFields();
|
267
|
-
handleSubmit(data);
|
268
|
-
}
|
269
|
-
console.log(data);
|
270
|
-
setLoading(false);
|
271
|
-
} catch (error) {
|
272
|
-
console.log(error);
|
273
|
-
setLoading(false);
|
274
|
-
}
|
275
|
-
};
|
276
|
-
const validateAmount = (amount) => amoutRegex.test(amount);
|
277
|
-
const PositiveAmount = (amount) => positiveAmountRegex.test(amount);
|
278
|
-
const handleChange = (e) => {
|
279
|
-
const { value } = e.target;
|
280
|
-
const token = e.target.dataset.token;
|
281
|
-
setRequestDetails(__spreadProps(__spreadValues({}, requestDetails), { [token]: value }));
|
282
|
-
if (token === "name" && !isAlpha(value)) {
|
283
|
-
setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
|
284
|
-
[token]: ErrorText.onlylettersallowed
|
285
|
-
}));
|
286
|
-
return;
|
287
|
-
}
|
288
|
-
if (token === "phone_number" && !phoneNumberRegex(value)) {
|
289
|
-
setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
|
290
|
-
[token]: ErrorText.phonenumberlength
|
291
|
-
}));
|
292
|
-
return;
|
293
|
-
}
|
294
|
-
if (token === "email" && !isValidEmail(value)) {
|
295
|
-
setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
|
296
|
-
email: ErrorText.invalidemailformat
|
297
|
-
}));
|
298
|
-
return;
|
299
|
-
}
|
300
|
-
if (token === "amount" && !value) {
|
301
|
-
setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
|
302
|
-
amount: ErrorText.amountrequired
|
303
|
-
}));
|
304
|
-
return;
|
305
|
-
}
|
306
|
-
if (token === "amount" && !PositiveAmount(value)) {
|
307
|
-
setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
|
308
|
-
amount: ErrorText.amountpositive
|
309
|
-
}));
|
310
|
-
return;
|
311
|
-
}
|
312
|
-
if (token === "amount" && parseFloat(value) === 0) {
|
313
|
-
setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
|
314
|
-
amount: ErrorText.amountzero
|
315
|
-
}));
|
316
|
-
return;
|
317
|
-
}
|
318
|
-
if (value) {
|
319
|
-
setErrors(__spreadProps(__spreadValues({}, errors), { [token]: "" }));
|
320
|
-
}
|
321
|
-
};
|
322
|
-
const handleAmountBlur = () => {
|
323
|
-
const value = requestDetails.amount;
|
324
|
-
if (value && !value.includes(".")) {
|
325
|
-
setRequestDetails((prev) => __spreadProps(__spreadValues({}, prev), {
|
326
|
-
amount: `${value}.00`
|
327
|
-
}));
|
328
|
-
}
|
329
|
-
};
|
330
|
-
const validateForm = () => {
|
331
|
-
let newErrors = {};
|
332
|
-
if (!requestDetails.name) newErrors.name = ErrorText.namerequired;
|
333
|
-
if (!requestDetails.amount) newErrors.amount = ErrorText.amountrequired;
|
334
|
-
if (!requestDetails.phone_number && !(requestDetails == null ? void 0 : requestDetails.email)) newErrors.phone_number = ErrorText.phoneoremailrequired;
|
335
|
-
if (!requestDetails.email && !requestDetails.phone_number) newErrors.email = ErrorText.phoneoremailrequired;
|
336
|
-
if (!requestDetails.phone_number && requestDetails.email && !isValidEmail(requestDetails == null ? void 0 : requestDetails.email)) newErrors.email = ErrorText.invalidemail;
|
337
|
-
setErrors(newErrors);
|
338
|
-
return Object.keys(newErrors).length === 0;
|
339
|
-
};
|
340
|
-
useEffect(() => {
|
341
|
-
if (props.amount) {
|
342
|
-
setRequestDetails((prev) => __spreadProps(__spreadValues({}, prev), { amount: props.amount }));
|
343
|
-
}
|
344
|
-
}, [props.amount]);
|
345
|
-
const handleKeyDown = (e) => {
|
346
|
-
if (e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
347
|
-
e.preventDefault();
|
348
|
-
}
|
349
|
-
};
|
350
|
-
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(Loader_default, { loading }), /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Request Payment"), /* @__PURE__ */ React3.createElement(
|
351
|
-
Modal,
|
352
|
-
{
|
353
|
-
show,
|
354
|
-
onHide: handleClose,
|
355
|
-
size: "lg",
|
356
|
-
backdrop: "static",
|
357
|
-
keyboard: false
|
358
|
-
},
|
359
|
-
/* @__PURE__ */ React3.createElement(Modal.Header, { closeButton: true }, /* @__PURE__ */ React3.createElement(Modal.Title, null, "Request Payment")),
|
360
|
-
/* @__PURE__ */ React3.createElement(Modal.Body, { id: "Checkout" }, /* @__PURE__ */ React3.createElement(Form, null, /* @__PURE__ */ React3.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React3.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "FULL NAME *"), /* @__PURE__ */ React3.createElement(
|
361
|
-
"input",
|
362
|
-
{
|
363
|
-
className: "form-control",
|
364
|
-
type: "text",
|
365
|
-
placeholder: "Full Name",
|
366
|
-
"data-token": "name",
|
367
|
-
onChange: handleChange
|
368
|
-
}
|
369
|
-
), errors.name && /* @__PURE__ */ React3.createElement("small", { className: "text-danger" }, errors.name)), /* @__PURE__ */ React3.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React3.createElement("label", { htmlFor: "requestPhoneNumber", className: "form-label" }, "Phone Number"), /* @__PURE__ */ React3.createElement(
|
370
|
-
"input",
|
371
|
-
{
|
372
|
-
maxLength: 10,
|
373
|
-
className: "form-control",
|
374
|
-
onChange: (e) => {
|
375
|
-
handleChange(e);
|
376
|
-
},
|
377
|
-
placeholder: "Phone Number",
|
378
|
-
type: "text",
|
379
|
-
"data-token": "phone_number"
|
380
|
-
}
|
381
|
-
), errors.phone_number && /* @__PURE__ */ React3.createElement("small", { className: "text-danger" }, errors.phone_number)), /* @__PURE__ */ React3.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React3.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "EMAIL"), /* @__PURE__ */ React3.createElement(
|
382
|
-
"input",
|
383
|
-
{
|
384
|
-
className: "form-control",
|
385
|
-
type: "text",
|
386
|
-
placeholder: "Email",
|
387
|
-
onChange: handleChange,
|
388
|
-
"data-token": "email"
|
389
|
-
}
|
390
|
-
), errors.email && /* @__PURE__ */ React3.createElement("small", { className: "text-danger" }, errors.email)), /* @__PURE__ */ React3.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React3.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "AMOUNT *"), /* @__PURE__ */ React3.createElement("div", { className: "input-group" }, /* @__PURE__ */ React3.createElement("span", { className: "input-group-text" }, "$"), /* @__PURE__ */ React3.createElement(
|
391
|
-
"input",
|
392
|
-
{
|
393
|
-
"data-token": "amount",
|
394
|
-
placeholder: "Amount",
|
395
|
-
min: 0,
|
396
|
-
type: "number",
|
397
|
-
className: "form-control",
|
398
|
-
value: requestDetails.amount,
|
399
|
-
onChange: handleChange,
|
400
|
-
onBlur: handleAmountBlur,
|
401
|
-
onKeyDown: handleKeyDown,
|
402
|
-
onFocus: (e) => e.target.addEventListener("wheel", function(e2) {
|
403
|
-
e2.preventDefault();
|
404
|
-
}, { passive: false })
|
405
|
-
}
|
406
|
-
)), errors.amount && /* @__PURE__ */ React3.createElement("small", { className: "text-danger" }, errors.amount)), /* @__PURE__ */ React3.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React3.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "ORDER ID"), /* @__PURE__ */ React3.createElement(
|
407
|
-
"input",
|
408
|
-
{
|
409
|
-
className: "form-control",
|
410
|
-
type: "text",
|
411
|
-
placeholder: "Order Id",
|
412
|
-
onChange: handleChange,
|
413
|
-
"data-token": "order_id"
|
414
|
-
}
|
415
|
-
), errors.order_id && /* @__PURE__ */ React3.createElement("small", { className: "text-danger" }, errors.order_id)), /* @__PURE__ */ React3.createElement(
|
416
|
-
Button,
|
417
|
-
{
|
418
|
-
type: "button",
|
419
|
-
className: "PayButton",
|
420
|
-
onClick: sendRequestPayment,
|
421
|
-
disabled: loading
|
422
|
-
},
|
423
|
-
loading ? "Loading..." : "Send Request"
|
424
|
-
)), /* @__PURE__ */ React3.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ React3.createElement(
|
425
|
-
"svg",
|
426
|
-
{
|
427
|
-
xmlns: "http://www.w3.org/2000/svg",
|
428
|
-
width: "20",
|
429
|
-
height: "20",
|
430
|
-
viewBox: "0 0 26 26"
|
431
|
-
},
|
432
|
-
/* @__PURE__ */ React3.createElement(
|
433
|
-
"path",
|
434
|
-
{
|
435
|
-
fill: "currentColor",
|
436
|
-
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"
|
437
|
-
}
|
438
|
-
)
|
439
|
-
), "Secure payments powered by Fractal", /* @__PURE__ */ React3.createElement(
|
440
|
-
"img",
|
441
|
-
{
|
442
|
-
src: "https://ui.fractalpay.com/favicon.ico",
|
443
|
-
alt: "Fractal logo",
|
444
|
-
className: "powered-logo"
|
445
|
-
}
|
446
|
-
)))
|
447
|
-
), /* @__PURE__ */ React3.createElement(
|
448
|
-
Modal,
|
449
|
-
{
|
450
|
-
className: "payment-suc",
|
451
|
-
show: showConfirmationModal,
|
452
|
-
onHide: handleCloseConfirmationModal
|
453
|
-
},
|
454
|
-
/* @__PURE__ */ React3.createElement(Modal.Header, { closeButton: true }),
|
455
|
-
/* @__PURE__ */ React3.createElement(Modal.Body, null, /* @__PURE__ */ React3.createElement(
|
456
|
-
"svg",
|
457
|
-
{
|
458
|
-
width: "60",
|
459
|
-
height: "60",
|
460
|
-
viewBox: "0 0 60 60",
|
461
|
-
fill: "none",
|
462
|
-
xmlns: "http://www.w3.org/2000/svg"
|
463
|
-
},
|
464
|
-
/* @__PURE__ */ React3.createElement(
|
465
|
-
"rect",
|
466
|
-
{
|
467
|
-
x: "0.5",
|
468
|
-
y: "0.5",
|
469
|
-
width: "59",
|
470
|
-
height: "59",
|
471
|
-
rx: "29.5",
|
472
|
-
stroke: "#31B379"
|
473
|
-
}
|
474
|
-
),
|
475
|
-
/* @__PURE__ */ React3.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ React3.createElement(
|
476
|
-
"path",
|
477
|
-
{
|
478
|
-
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",
|
479
|
-
fill: "#31B379"
|
480
|
-
}
|
481
|
-
)),
|
482
|
-
/* @__PURE__ */ React3.createElement("defs", null, /* @__PURE__ */ React3.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React3.createElement(
|
483
|
-
"rect",
|
484
|
-
{
|
485
|
-
width: "22",
|
486
|
-
height: "22",
|
487
|
-
fill: "white",
|
488
|
-
transform: "translate(19.5 19.0039)"
|
489
|
-
}
|
490
|
-
)))
|
491
|
-
), /* @__PURE__ */ React3.createElement("h2", null, "Payment link has been ", /* @__PURE__ */ React3.createElement("br", null), " sent successfully"))
|
492
|
-
)));
|
493
|
-
}
|
494
|
-
|
495
|
-
// src/app/components/RequestPayment/RequestPaymentAllInput.tsx
|
496
|
-
import React5, { useState as useState2 } from "react";
|
497
|
-
import { Modal as Modal2 } from "react-bootstrap";
|
498
|
-
import { toast, ToastContainer } from "react-toastify";
|
499
|
-
import "react-toastify/dist/ReactToastify.css";
|
500
|
-
|
501
|
-
// src/app/components/RequestPayment/RequestPaymentstyles.tsx
|
502
|
-
import React4 from "react";
|
503
|
-
var RequestPaymentstyles = (props) => {
|
504
|
-
return /* @__PURE__ */ React4.createElement("style", null, `
|
505
|
-
.paymentBtn {
|
506
|
-
background-color: black;
|
507
|
-
border: none;
|
508
|
-
color: white;
|
509
|
-
padding: 15px 32px;
|
510
|
-
text-align: center;
|
511
|
-
text-decoration: none;
|
512
|
-
display: inline-block;
|
513
|
-
font-size: 16px;
|
514
|
-
margin: 4px 2px;
|
515
|
-
cursor: pointer;
|
516
|
-
border-radius: 180px;
|
517
|
-
/* width: auto; */
|
518
|
-
}
|
519
|
-
.modal-backdrop {
|
520
|
-
display: none !important;
|
521
|
-
}
|
522
|
-
/* CSS for modal */
|
523
|
-
.modal {
|
524
|
-
/* display: none; */
|
525
|
-
position: fixed;
|
526
|
-
z-index: 5555;
|
527
|
-
left: 0;
|
528
|
-
top: 0;
|
529
|
-
width: 100%;
|
530
|
-
height: 100%;
|
531
|
-
overflow: auto;
|
532
|
-
background-color: rgba(0, 0, 0, 0.4);
|
533
|
-
}
|
534
|
-
|
535
|
-
.input-container {
|
536
|
-
position: relative;
|
537
|
-
}
|
538
|
-
.error {
|
539
|
-
border: 1px solid red;
|
540
|
-
background-color: #ffe6e6; /* light red background color */
|
541
|
-
}
|
542
|
-
.form-group {
|
543
|
-
margin-bottom: 15px;
|
544
|
-
}
|
545
|
-
.input-container input {
|
546
|
-
padding-right: 25px;
|
547
|
-
}
|
548
|
-
|
549
|
-
.modal-header {
|
550
|
-
border-bottom: 0 !important;
|
551
|
-
padding-top: 0 !important;
|
552
|
-
}
|
553
|
-
|
554
|
-
/* CSS for modal content */
|
555
|
-
.modal-content {
|
556
|
-
/* height: 90vh !important; */
|
557
|
-
height: auto;
|
558
|
-
padding: 20px 5px;
|
559
|
-
/* background: #fff; */
|
560
|
-
border-radius: 20px !important;
|
561
|
-
position: relative;
|
562
|
-
width: 100%;
|
563
|
-
max-width: 100%;
|
564
|
-
margin: 30px auto;
|
565
|
-
overflow: inherit !important;
|
566
|
-
}
|
567
|
-
.input-container {
|
568
|
-
display: flex;
|
569
|
-
align-items: baseline;
|
570
|
-
}
|
571
|
-
|
572
|
-
.input-error-container {
|
573
|
-
flex: 1;
|
574
|
-
}
|
575
|
-
|
576
|
-
.paymentBtn {
|
577
|
-
margin-left: 10px;
|
578
|
-
}
|
579
|
-
|
580
|
-
.PayButton {
|
581
|
-
outline: 0 !important;
|
582
|
-
height: 46px;
|
583
|
-
font-size: 16px;
|
584
|
-
background-color: #161616 !important;
|
585
|
-
border: none;
|
586
|
-
display: block;
|
587
|
-
width: 100%;
|
588
|
-
border-radius: 180px;
|
589
|
-
margin: 10px 0;
|
590
|
-
}
|
591
|
-
|
592
|
-
#PayButton:hover {
|
593
|
-
background-color: #61c699 !important;
|
594
|
-
}
|
595
|
-
|
596
|
-
#PayButton:active {
|
597
|
-
background-color: #61c699 !important;
|
598
|
-
}
|
599
|
-
|
600
|
-
#PayButton:disabled {
|
601
|
-
background: rgb(172, 44, 170) !important;
|
602
|
-
color: #fff !important;
|
603
|
-
}
|
604
|
-
|
605
|
-
label {
|
606
|
-
color: rgba(53, 37, 77, 0.6);
|
607
|
-
margin-bottom: 2px;
|
608
|
-
text-transform: uppercase;
|
609
|
-
font-family: "IBM Plex Mono", monospace;
|
610
|
-
font-weight: 500;
|
611
|
-
font-size: 12px;
|
612
|
-
}
|
613
|
-
|
614
|
-
.input-container {
|
615
|
-
position: relative;
|
616
|
-
}
|
617
|
-
|
618
|
-
.input-container input {
|
619
|
-
padding-right: 25px;
|
620
|
-
}
|
621
|
-
|
622
|
-
#Checkout {
|
623
|
-
/* z-index: 100001; */
|
624
|
-
width: 100%;
|
625
|
-
/* height: 100%; */
|
626
|
-
/* background: 0 0 #ffffff; */
|
627
|
-
border-radius: 24px;
|
628
|
-
border: 1px solid #e0dfe2;
|
629
|
-
display: block;
|
630
|
-
}
|
631
|
-
|
632
|
-
.container {
|
633
|
-
margin-top: 10px;
|
634
|
-
}
|
635
|
-
|
636
|
-
.powered-logo {
|
637
|
-
width: 18px;
|
638
|
-
height: 18px;
|
639
|
-
/* float: right; */
|
640
|
-
padding: 2px;
|
641
|
-
background: #000000;
|
642
|
-
border-radius: 4px;
|
643
|
-
/* margin-left: 5px; */
|
644
|
-
}
|
645
|
-
|
646
|
-
.modal-content .container {
|
647
|
-
width: 100%;
|
648
|
-
}
|
649
|
-
|
650
|
-
.powerd-by-part {
|
651
|
-
display: flex;
|
652
|
-
justify-content: center;
|
653
|
-
align-items: center;
|
654
|
-
gap: 5px;
|
655
|
-
}
|
656
|
-
|
657
|
-
.errorText {
|
658
|
-
color: red;
|
659
|
-
}
|
660
|
-
|
661
|
-
.input-group {
|
662
|
-
position: relative;
|
663
|
-
}
|
664
|
-
|
665
|
-
.paynowbtn {
|
666
|
-
outline: 0 !important;
|
667
|
-
padding: 7px 25px !important;
|
668
|
-
font-size: 13px;
|
669
|
-
background-color: #161616 !important;
|
670
|
-
border: #161616 1px solid !important;
|
671
|
-
color: #fff !important;
|
672
|
-
display: inline-block !important;
|
673
|
-
border-radius: 180px !important;
|
674
|
-
}
|
675
|
-
|
676
|
-
.paynowbtn:hover {
|
677
|
-
background-color: #fff !important;
|
678
|
-
border: #161616 1px solid !important;
|
679
|
-
color: #161616 !important;
|
680
|
-
}
|
681
|
-
|
682
|
-
.ButtonGroup__root.btn-group {
|
683
|
-
margin: 10px 0 20px 0;
|
684
|
-
}
|
685
|
-
|
686
|
-
.ButtonGroup__root.btn-group button {
|
687
|
-
background: #000;
|
688
|
-
border: 0;
|
689
|
-
margin: 0 5px;
|
690
|
-
border-radius: 4px !important;
|
691
|
-
}
|
692
|
-
|
693
|
-
.ButtonGroup__root.btn-group button:hover,
|
694
|
-
.ButtonGroup__root.btn-group button:focus {
|
695
|
-
background: #333 !important;
|
696
|
-
}
|
697
|
-
|
698
|
-
.input-group button {
|
699
|
-
background: #000;
|
700
|
-
border: 0;
|
701
|
-
margin: 0 5px;
|
702
|
-
border-radius: 0 4px 4px 0 !important;
|
703
|
-
}
|
704
|
-
|
705
|
-
.input-group button:hover,
|
706
|
-
.input-group button:focus {
|
707
|
-
background: #333 !important;
|
708
|
-
}
|
709
|
-
|
710
|
-
.payment-suc {
|
711
|
-
text-align: center;
|
712
|
-
}
|
713
|
-
|
714
|
-
.payment-suc .modal-dialog {
|
715
|
-
min-width: 600px;
|
716
|
-
padding: 50px 0;
|
717
|
-
}
|
718
|
-
|
719
|
-
.payment-suc h2 {
|
720
|
-
font-size: 24px;
|
721
|
-
color: #35254d;
|
722
|
-
font-weight: 500;
|
723
|
-
padding: 15px 0;
|
724
|
-
}
|
725
|
-
|
726
|
-
.payment-suc p {
|
727
|
-
font-size: 14px;
|
728
|
-
color: #9a92a6;
|
729
|
-
font-weight: 500;
|
730
|
-
}
|
731
|
-
|
732
|
-
.payment-suc .btn-close {
|
733
|
-
position: absolute;
|
734
|
-
right: 20px;
|
735
|
-
}
|
736
|
-
|
737
|
-
.Checkout.container iframe {
|
738
|
-
width: 100%;
|
739
|
-
overflow: hidden !important;
|
740
|
-
}
|
741
|
-
|
742
|
-
.responsive-tbl {
|
743
|
-
overflow-x: auto;
|
744
|
-
}
|
745
|
-
body {
|
746
|
-
position: relative !important;
|
747
|
-
}
|
748
|
-
thead,
|
749
|
-
tbody,
|
750
|
-
tfoot,
|
751
|
-
tr,
|
752
|
-
td,
|
753
|
-
th {
|
754
|
-
white-space: nowrap;
|
755
|
-
}
|
756
|
-
|
757
|
-
.button-group {
|
758
|
-
display: flex;
|
759
|
-
gap: 10px;
|
760
|
-
}
|
761
|
-
.rqstonClickbtn {
|
762
|
-
color: #fff;
|
763
|
-
background-color: #337ab7;
|
764
|
-
border-color: #2e6da4;
|
765
|
-
}
|
766
|
-
.loading-animation {
|
767
|
-
position: absolute;
|
768
|
-
top: 50%;
|
769
|
-
left: 50%;
|
770
|
-
transform: translate(-50%, -50%);
|
771
|
-
}
|
772
|
-
|
773
|
-
.spinner {
|
774
|
-
width: 40px;
|
775
|
-
height: 40px;
|
776
|
-
border-radius: 50%;
|
777
|
-
border: 4px solid #f3f3f3;
|
778
|
-
border-top: 4px solid black;
|
779
|
-
animation: spin 1s linear infinite;
|
780
|
-
}
|
781
|
-
|
782
|
-
@keyframes spin {
|
783
|
-
0% {
|
784
|
-
transform: rotate(0deg);
|
785
|
-
}
|
786
|
-
100% {
|
787
|
-
transform: rotate(360deg);
|
788
|
-
}
|
789
|
-
}
|
790
|
-
/* .border-container {
|
791
|
-
display: flex;
|
792
|
-
flex-direction: column;
|
793
|
-
border: 0px solid #ccc;
|
794
|
-
padding: 20px;
|
795
|
-
border-radius: 10px;
|
796
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
797
|
-
align-items: baseline;
|
798
|
-
}
|
799
|
-
.payment-container {
|
800
|
-
border: 0px solid #ccc;
|
801
|
-
padding: 20px;
|
802
|
-
border-radius: 10px;
|
803
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
804
|
-
} */
|
805
|
-
|
806
|
-
.payment-row {
|
807
|
-
display: flex;
|
808
|
-
align-items: center;
|
809
|
-
margin-bottom: 20px;
|
810
|
-
}
|
811
|
-
|
812
|
-
.payment-row label {
|
813
|
-
width: 150px;
|
814
|
-
font-weight: bold;
|
815
|
-
margin-right: 10px;
|
816
|
-
}
|
817
|
-
|
818
|
-
.payment-row input {
|
819
|
-
flex-grow: 1;
|
820
|
-
margin-right: 10px;
|
821
|
-
}
|
822
|
-
|
823
|
-
.payment-row button {
|
824
|
-
flex-grow: 1;
|
825
|
-
}
|
826
|
-
.payment-row {
|
827
|
-
display: flex;
|
828
|
-
flex-direction: column;
|
829
|
-
border-radius: 10px;
|
830
|
-
margin-top: 10px;
|
831
|
-
}
|
832
|
-
|
833
|
-
.input-wrapper {
|
834
|
-
flex: 1;
|
835
|
-
}
|
836
|
-
|
837
|
-
.button-wrapper {
|
838
|
-
margin-left: 10px;
|
839
|
-
}
|
840
|
-
.input-container {
|
841
|
-
display: flex;
|
842
|
-
flex-direction: column;
|
843
|
-
}
|
154
|
+
// src/app/components/RequestPayment/RequestPaymentstyles.tsx
|
155
|
+
import React3 from "react";
|
156
|
+
var RequestPaymentstyles = (props) => {
|
157
|
+
return /* @__PURE__ */ React3.createElement("style", null, `
|
158
|
+
.paymentBtn {
|
159
|
+
background-color: black;
|
160
|
+
border: none;
|
161
|
+
color: white;
|
162
|
+
padding: 15px 32px;
|
163
|
+
text-align: center;
|
164
|
+
text-decoration: none;
|
165
|
+
display: inline-block;
|
166
|
+
font-size: 16px;
|
167
|
+
margin: 4px 2px;
|
168
|
+
cursor: pointer;
|
169
|
+
border-radius: 180px;
|
170
|
+
/* width: auto; */
|
171
|
+
}
|
172
|
+
/*****************************************REDESIGNING STYLES **************************************/
|
844
173
|
|
845
|
-
.
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
174
|
+
.request-payment-amount {
|
175
|
+
color: #161616;
|
176
|
+
text-align: center;
|
177
|
+
font-family: Inter;
|
178
|
+
font-size: 42px;
|
179
|
+
font-style: normal;
|
180
|
+
font-weight: 600;
|
181
|
+
text-transform: uppercase;
|
182
|
+
margin: 8px 0px !important;
|
852
183
|
}
|
853
184
|
|
854
|
-
.
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
185
|
+
.request-payment-orderid {
|
186
|
+
color: #727272;
|
187
|
+
text-align: center;
|
188
|
+
font-family: Inter;
|
189
|
+
font-size: 14px;
|
190
|
+
font-style: normal;
|
191
|
+
font-weight: 500;
|
192
|
+
margin: 0px;
|
861
193
|
}
|
862
194
|
|
863
|
-
.payment-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
195
|
+
.request-payment-pre-auth-merchantname {
|
196
|
+
color: #727272;
|
197
|
+
text-align: center;
|
198
|
+
font-family: Inter;
|
199
|
+
font-size: 14px;
|
200
|
+
font-style: normal;
|
201
|
+
font-weight: 500;
|
202
|
+
margin-top: 10px !important;
|
203
|
+
margin-bottom: 0px !important;
|
870
204
|
}
|
871
205
|
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
206
|
+
.request-payment-merchantname {
|
207
|
+
color: #727272;
|
208
|
+
text-align: center;
|
209
|
+
font-family: Inter;
|
210
|
+
font-size: 14px;
|
211
|
+
font-style: normal;
|
212
|
+
font-weight: 500;
|
213
|
+
margin-top: 20px !important;
|
214
|
+
margin-bottom: 0px !important;
|
881
215
|
}
|
882
216
|
|
883
|
-
.close-
|
217
|
+
.request-payment-close-popup {
|
884
218
|
position: absolute;
|
885
|
-
right:
|
886
|
-
top:
|
887
|
-
|
888
|
-
padding: 0;
|
889
|
-
background: none !important;
|
890
|
-
}
|
891
|
-
|
892
|
-
.amex {
|
893
|
-
background-image: url("../amex.svg");
|
894
|
-
}
|
895
|
-
|
896
|
-
.visa {
|
897
|
-
background-image: url("../visa.svg");
|
898
|
-
}
|
899
|
-
|
900
|
-
.mastercard {
|
901
|
-
background-image: url("../mastercard.svg");
|
902
|
-
}
|
903
|
-
|
904
|
-
.discover {
|
905
|
-
background-image: url("../discover.svg");
|
906
|
-
}
|
907
|
-
|
908
|
-
.expiry-date-group {
|
909
|
-
float: left;
|
910
|
-
width: 30%;
|
911
|
-
}
|
912
|
-
|
913
|
-
.expiry-date-group input {
|
914
|
-
width: calc(100% + 1px);
|
915
|
-
border-top-right-radius: 0;
|
916
|
-
border-bottom-right-radius: 0;
|
219
|
+
right: 20px;
|
220
|
+
top: 20px;
|
221
|
+
cursor: pointer;
|
917
222
|
}
|
918
223
|
|
919
|
-
.
|
920
|
-
|
921
|
-
|
224
|
+
.request-payment-amount-detail {
|
225
|
+
padding: 32px 0px;
|
226
|
+
border-bottom: 1px solid #E0DFE2;
|
922
227
|
}
|
923
228
|
|
924
|
-
.
|
925
|
-
|
926
|
-
|
927
|
-
position: relative;
|
229
|
+
.request-payment-popup-container {
|
230
|
+
padding: 0px !important;
|
231
|
+
border-radius: 12px !important;
|
928
232
|
}
|
929
233
|
|
930
|
-
.
|
931
|
-
|
932
|
-
border-bottom-left-radius: 0;
|
234
|
+
.request-payment-input-form {
|
235
|
+
padding: 24px 48px 32px 48px;
|
933
236
|
}
|
934
237
|
|
935
|
-
.
|
936
|
-
|
238
|
+
.request-payment-input-label {
|
239
|
+
color: #727272;
|
240
|
+
font-family: Inter;
|
241
|
+
font-size: 12px;
|
242
|
+
font-style: normal;
|
243
|
+
font-weight: 500;
|
244
|
+
margin-bottom: 6px !important;
|
245
|
+
text-align: start !important;
|
246
|
+
width: 100% !important;
|
247
|
+
margin-bottom: 6px !important;
|
248
|
+
text-transform: uppercase;
|
937
249
|
}
|
938
250
|
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
background-color: #161616 !important;
|
944
|
-
border: none;
|
945
|
-
display: block;
|
946
|
-
width: 100%;
|
947
|
-
border-radius: 180px;
|
948
|
-
}
|
949
|
-
#submitRequestButton {
|
950
|
-
outline: 0 !important;
|
951
|
-
height: 46px;
|
952
|
-
font-size: 16px;
|
953
|
-
background-color: #161616 !important;
|
954
|
-
border: none;
|
955
|
-
display: block;
|
956
|
-
width: 100%;
|
957
|
-
border-radius: 180px;
|
958
|
-
}
|
959
|
-
#PayButton {
|
960
|
-
outline: 0 !important;
|
961
|
-
height: 46px;
|
962
|
-
font-size: 16px;
|
963
|
-
background-color: #161616 !important;
|
964
|
-
border: none;
|
251
|
+
.request-payment-input-box {
|
252
|
+
border-radius: 8px;
|
253
|
+
border: 1px solid #E0DFE2;
|
254
|
+
padding: 11px;
|
965
255
|
display: block;
|
966
256
|
width: 100%;
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
257
|
+
color: #161616;
|
258
|
+
margin-top: 6px !important;
|
259
|
+
font-family: Inter;
|
260
|
+
font-size: 14px;
|
261
|
+
font-style: normal;
|
262
|
+
font-weight: 500;
|
972
263
|
}
|
973
264
|
|
974
|
-
|
975
|
-
|
265
|
+
.request-payment-list-div {
|
266
|
+
margin-bottom: 12px;
|
976
267
|
}
|
977
268
|
|
978
|
-
|
979
|
-
|
980
|
-
|
269
|
+
.request-payment-submit-button {
|
270
|
+
border-radius: 80px;
|
271
|
+
background: #161616;
|
272
|
+
height: 48px;
|
273
|
+
padding: 12px 24px;
|
274
|
+
margin-top: 20px;
|
275
|
+
color: #fff;
|
276
|
+
width: 100% !important;
|
277
|
+
border: none !important;
|
278
|
+
font-family: Inter;
|
279
|
+
font-size: 16px;
|
280
|
+
font-style: normal;
|
281
|
+
font-weight: 500;
|
282
|
+
cursor: pointer;
|
981
283
|
}
|
982
284
|
|
983
|
-
.
|
984
|
-
|
285
|
+
.request-payment-submit-button:disabled {
|
286
|
+
cursor: not-allowed;
|
985
287
|
}
|
986
288
|
|
987
|
-
.
|
988
|
-
|
289
|
+
.request-payment-fractal-powerd-by {
|
290
|
+
color: #727272;
|
291
|
+
font-family: Inter;
|
292
|
+
font-size: 14px;
|
293
|
+
font-style: normal;
|
294
|
+
font-weight: 500;
|
295
|
+
margin-top: 16px;
|
296
|
+
display: flex;
|
297
|
+
text-align: center;
|
298
|
+
align-items: center;
|
299
|
+
justify-content: center;
|
300
|
+
gap: 6px;
|
989
301
|
}
|
990
302
|
|
991
|
-
|
992
|
-
|
993
|
-
width: 100%;
|
994
|
-
height: 100%;
|
995
|
-
min-height: 100%;
|
996
|
-
background: 0 0 #ffffff;
|
997
|
-
border-radius: 24px;
|
998
|
-
border: 1px solid #e0dfe2;
|
999
|
-
margin-left: auto;
|
1000
|
-
margin-right: auto;
|
1001
|
-
display: block;
|
303
|
+
.request-payment-fractal-powerd-by span {
|
304
|
+
color: #61C699;
|
1002
305
|
}
|
1003
306
|
|
1004
|
-
|
307
|
+
.request-payment-success-container {
|
1005
308
|
display: flex;
|
1006
|
-
|
309
|
+
padding: 120px 48px 32px 48px;
|
310
|
+
flex-direction: column;
|
1007
311
|
justify-content: center;
|
1008
|
-
/* Centers content horizontally */
|
1009
312
|
align-items: center;
|
1010
|
-
/* Centers content vertically */
|
1011
|
-
text-align: center;
|
1012
|
-
padding: 8px;
|
1013
|
-
border-bottom: 1px solid #dedede;
|
1014
|
-
margin: 0 10px 20px 10px;
|
1015
313
|
}
|
1016
314
|
|
1017
|
-
|
1018
|
-
border:
|
1019
|
-
background:
|
1020
|
-
padding: 0;
|
1021
|
-
}
|
1022
|
-
|
1023
|
-
#Checkout h1 {
|
1024
|
-
margin: 0;
|
1025
|
-
flex: 1;
|
1026
|
-
padding: 10px;
|
1027
|
-
/* Allows the title to grow and fill the space for centering */
|
1028
|
-
font-size: 23px;
|
1029
|
-
font-weight: 500;
|
1030
|
-
color: #35254d;
|
1031
|
-
align-items: start;
|
315
|
+
.request-payment-success-tick {
|
316
|
+
border-radius: 1000px;
|
317
|
+
background: rgba(97, 198, 153, 0.14);
|
1032
318
|
display: flex;
|
319
|
+
width: 60px;
|
320
|
+
height: 60px;
|
321
|
+
justify-content: center;
|
322
|
+
align-items: center;
|
1033
323
|
}
|
1034
324
|
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
margin-bottom: 2px;
|
1042
|
-
text-transform: uppercase;
|
1043
|
-
font-family: "IBM Plex Mono", monospace;
|
325
|
+
.request-payment-success-text {
|
326
|
+
color: #161616;
|
327
|
+
text-align: center;
|
328
|
+
font-family: Inter;
|
329
|
+
font-size: 32px;
|
330
|
+
font-style: normal;
|
1044
331
|
font-weight: 500;
|
1045
|
-
|
332
|
+
line-height: 36px;
|
333
|
+
/* 112.5% */
|
334
|
+
letter-spacing: -0.64px;
|
335
|
+
margin-top: 20px;
|
336
|
+
margin-bottom: 5px !important;
|
1046
337
|
}
|
1047
338
|
|
1048
|
-
.
|
1049
|
-
|
339
|
+
.request-payment-success-subtext {
|
340
|
+
color: #727272;
|
341
|
+
text-align: center;
|
342
|
+
font-family: Inter;
|
343
|
+
font-size: 14px;
|
344
|
+
font-style: normal;
|
345
|
+
font-weight: 500;
|
346
|
+
line-height: 18px;
|
347
|
+
letter-spacing: -0.28px;
|
348
|
+
margin-bottom: 6rem !important;
|
349
|
+
margin-top: 8px !important;
|
1050
350
|
}
|
1051
351
|
|
1052
|
-
.
|
1053
|
-
|
352
|
+
.request-payment-success-btn-div {
|
353
|
+
display: flex;
|
354
|
+
align-items: flex-start;
|
355
|
+
justify-content: center;
|
356
|
+
gap: 8px;
|
1054
357
|
}
|
1055
358
|
|
1056
|
-
|
1057
|
-
|
359
|
+
.request-payment-success-tick-div {
|
360
|
+
display: flex;
|
361
|
+
justify-content: center;
|
362
|
+
align-items: center;
|
363
|
+
margin-top: 32px;
|
1058
364
|
}
|
1059
365
|
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
366
|
+
.request-payment-success-btn1 {
|
367
|
+
cursor: pointer;
|
368
|
+
border-radius: 80px;
|
369
|
+
border: 1px solid #E0DFE2;
|
370
|
+
display: flex;
|
371
|
+
padding: 12px 32px;
|
372
|
+
justify-content: center;
|
373
|
+
align-items: center;
|
374
|
+
gap: 6px;
|
375
|
+
background-color: #fff;
|
1065
376
|
}
|
1066
377
|
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
378
|
+
.request-payment-success-btn2 {
|
379
|
+
border-radius: 80px;
|
380
|
+
cursor: pointer;
|
381
|
+
border: 1px solid #E0DFE2;
|
382
|
+
display: flex;
|
383
|
+
padding: 12px 32px;
|
384
|
+
justify-content: center;
|
385
|
+
align-items: center;
|
386
|
+
gap: 6px;
|
387
|
+
background-color: #161616;
|
1077
388
|
color: #fff;
|
1078
|
-
|
1079
|
-
|
389
|
+
font-family: Inter;
|
390
|
+
font-size: 14px;
|
391
|
+
font-style: normal;
|
392
|
+
font-weight: 500;
|
1080
393
|
}
|
1081
394
|
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
border-bottom: 7px solid transparent;
|
1087
|
-
border-left: 7px solid #000;
|
1088
|
-
opacity: 0.4;
|
1089
|
-
position: absolute;
|
1090
|
-
right: -7px;
|
1091
|
-
top: 50%;
|
1092
|
-
transform: translateY(-50%);
|
1093
|
-
content: "";
|
395
|
+
.request-payment-error-msg{
|
396
|
+
color: #dc3545;
|
397
|
+
font-family: Inter;
|
398
|
+
font-size: 12px;
|
1094
399
|
}
|
400
|
+
`);
|
401
|
+
};
|
402
|
+
var RequestPaymentstyles_default = RequestPaymentstyles;
|
1095
403
|
|
1096
|
-
|
1097
|
-
|
1098
|
-
}
|
404
|
+
// src/app/components/baseurl.ts
|
405
|
+
var baseUrl = "https://staging-widget.fractalpay.com/";
|
1099
406
|
|
1100
|
-
.
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
407
|
+
// src/app/components/Errortext.ts
|
408
|
+
var ErrorText = {
|
409
|
+
namerequired: "Full Name is required",
|
410
|
+
amountrequired: "Amount is required",
|
411
|
+
amountpositive: "Amount should be positive",
|
412
|
+
amountzero: "Amount should not be zero",
|
413
|
+
amountenter: "Please enter an amount",
|
414
|
+
amountvalid: "Please enter a valid amount",
|
415
|
+
phoneoremailrequired: "Phone or Email is required",
|
416
|
+
invalidemail: "Please enter a valid email",
|
417
|
+
invalidemailformat: "Invalid email format",
|
418
|
+
onlylettersallowed: "Only letters are allowed",
|
419
|
+
phonenumberlength: "Phone number should be 10 digits",
|
420
|
+
phonenumberrequired: "Please enter a phone number",
|
421
|
+
// phonenumbervalid:'Please enter a valid 10-digit phone number',
|
422
|
+
phonenumbervalid: "Please enter a valid phone number",
|
423
|
+
phonenumbervalidnumberonly: "Please enter a valid phone number (numbers only)",
|
424
|
+
orderidenter: "Please enter an order ID",
|
425
|
+
orderidrequired: "Order ID is required",
|
426
|
+
networkresponseerror: "Network response was not ok",
|
427
|
+
anerroroccured: "An error occurred. Please try again.",
|
428
|
+
montherror: "Please write month only 1 to 12",
|
429
|
+
fieldrequired: "This field is required",
|
430
|
+
fractalpayclientidrequired: "Fractalpay client key is missing or empty."
|
431
|
+
};
|
1113
432
|
|
1114
|
-
.
|
1115
|
-
|
1116
|
-
color: #777;
|
1117
|
-
}
|
433
|
+
// src/app/components/CustomModal/CustomModal2.tsx
|
434
|
+
import React5 from "react";
|
1118
435
|
|
1119
|
-
.
|
1120
|
-
|
1121
|
-
|
1122
|
-
/*
|
1123
|
-
|
1124
|
-
|
436
|
+
// src/app/components/CustomModal/CustomModal2styles.tsx
|
437
|
+
import React4 from "react";
|
438
|
+
var CustomModal2styles = (props) => {
|
439
|
+
return /* @__PURE__ */ React4.createElement("style", null, `
|
440
|
+
.fractal-input::placeholder {
|
441
|
+
color: #35254D;
|
442
|
+
opacity: 1;
|
443
|
+
font-size: 15px;
|
1125
444
|
}
|
1126
445
|
|
1127
|
-
.
|
1128
|
-
|
1129
|
-
|
446
|
+
.fractal-input::-ms-input-placeholder {
|
447
|
+
color: #35254D;
|
448
|
+
font-size: 15px;
|
1130
449
|
}
|
1131
450
|
|
1132
|
-
.
|
1133
|
-
|
451
|
+
.trigger{
|
452
|
+
text-align: center;
|
453
|
+
padding: 7px 13px;
|
454
|
+
background: #3e3e3e;
|
455
|
+
color: #fff;
|
456
|
+
font-size: 15px;
|
457
|
+
outline: none;
|
458
|
+
border: none;
|
459
|
+
border-radius: 5px;
|
460
|
+
font-family: cursive;
|
1134
461
|
}
|
1135
462
|
|
1136
|
-
.
|
463
|
+
.fractal-popup {
|
464
|
+
position: fixed;
|
465
|
+
z-index: 9999;
|
466
|
+
top: 0;
|
467
|
+
right: 0;
|
468
|
+
bottom: 0;
|
469
|
+
left: 0;
|
470
|
+
|
471
|
+
width: 100%;
|
472
|
+
height: 100%;
|
473
|
+
background-color: rgba(0, 0, 0, 0.5);
|
474
|
+
transition: visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;
|
1137
475
|
display: flex;
|
1138
|
-
|
476
|
+
justify-content: center;
|
1139
477
|
align-items: center;
|
1140
|
-
justify-content: space-between;
|
1141
478
|
}
|
1142
479
|
|
1143
|
-
.
|
1144
|
-
|
480
|
+
.fractal-popup-content {
|
481
|
+
background-color: white;
|
482
|
+
padding:20px;
|
483
|
+
border-radius: 0.5rem;
|
484
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
485
|
+
box-sizing: border-box;
|
486
|
+
position: relative;
|
1145
487
|
}
|
1146
488
|
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
}
|
489
|
+
@media only screen and (min-width: 600px){
|
490
|
+
.fractal-popup-content {
|
491
|
+
width: 500px;
|
1151
492
|
|
1152
|
-
|
1153
|
-
text-align: right;
|
1154
|
-
margin: 22px 0 0 0;
|
1155
|
-
max-width: 85px;
|
1156
|
-
line-height: 20px;
|
493
|
+
}
|
1157
494
|
}
|
1158
|
-
|
1159
|
-
.
|
1160
|
-
|
495
|
+
@media only screen and (max-width: 600px){
|
496
|
+
.fractal-popup-content {
|
497
|
+
width: 350px;
|
498
|
+
}
|
1161
499
|
}
|
1162
|
-
|
1163
|
-
.
|
1164
|
-
|
1165
|
-
|
1166
|
-
margin: 0 2px;
|
1167
|
-
background-repeat: no-repeat;
|
1168
|
-
display: inline-block;
|
1169
|
-
background-size: contain;
|
500
|
+
@media only screen and (max-width: 450px){
|
501
|
+
.fractal-popup-content {
|
502
|
+
width: 300px;
|
503
|
+
}
|
1170
504
|
}
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
505
|
+
.close-popup {
|
506
|
+
max-height:25px;
|
507
|
+
width:25px;
|
508
|
+
height: 25px;
|
509
|
+
color: #999;
|
510
|
+
position: absolute;
|
511
|
+
top: 2px;
|
512
|
+
right: 4px;
|
513
|
+
z-index: 7;
|
514
|
+
text-align: center;
|
515
|
+
cursor: pointer;
|
516
|
+
border-radius: 0.25rem;
|
517
|
+
font-size: 30px;
|
518
|
+
line-height: 30px;
|
519
|
+
display: flex;
|
520
|
+
align-items: center;
|
521
|
+
justify-content: center;
|
1177
522
|
}
|
1178
523
|
|
1179
|
-
|
1180
|
-
|
1181
|
-
} */
|
1182
|
-
|
1183
|
-
.cvc-preview-container {
|
1184
|
-
/* overflow: hidden; */
|
1185
|
-
position: absolute;
|
1186
|
-
z-index: 9999;
|
1187
|
-
right: -71px;
|
1188
|
-
top: -54px;
|
1189
|
-
width: 165px;
|
1190
|
-
border-radius: 5px;
|
1191
|
-
padding: 5px;
|
1192
|
-
background-color: rgb(0, 0, 0, 0.3);
|
1193
|
-
display: none;
|
524
|
+
.close-popup:hover {
|
525
|
+
color: #000;
|
1194
526
|
}
|
1195
527
|
|
1196
|
-
.
|
1197
|
-
|
1198
|
-
left: 50%;
|
1199
|
-
transform: translate(-50%);
|
1200
|
-
bottom: -5px;
|
1201
|
-
width: 0;
|
1202
|
-
height: 0;
|
1203
|
-
border-left: 5px solid transparent;
|
1204
|
-
border-right: 5px solid transparent;
|
1205
|
-
border-top: 5px solid #000;
|
1206
|
-
opacity: 0.3;
|
1207
|
-
content: "";
|
528
|
+
.fractal-inpt-list {
|
529
|
+
margin-bottom: 15px;
|
1208
530
|
}
|
1209
531
|
|
1210
|
-
.
|
1211
|
-
|
532
|
+
.fractal-label {
|
533
|
+
color: #727272;
|
534
|
+
margin-bottom: 3px;
|
535
|
+
font-family: "Inter", sans-serif;
|
536
|
+
font-weight: 500;
|
537
|
+
font-size: 12px;
|
538
|
+
display: block;
|
539
|
+
text-align: left;
|
1212
540
|
}
|
1213
541
|
|
1214
|
-
.
|
1215
|
-
|
1216
|
-
|
542
|
+
.fractal-input {
|
543
|
+
display: block;
|
544
|
+
width: 100%;
|
545
|
+
padding: .320rem .75rem;
|
546
|
+
font-size: 1rem;
|
547
|
+
font-weight: 400;
|
548
|
+
line-height: 1.5;
|
549
|
+
color: #35254D;
|
550
|
+
appearance: none;
|
551
|
+
background-color:#ffffff;
|
552
|
+
background-clip: padding-box;
|
553
|
+
border:1px solid #dee2e6;
|
554
|
+
border-radius: 0.375rem;
|
555
|
+
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
556
|
+
}
|
557
|
+
|
558
|
+
.fractal-input:focus {border:#86b7fe 1px solid; outline: none;}
|
559
|
+
|
560
|
+
.fractal-group {
|
561
|
+
position: relative;
|
562
|
+
display: flex;
|
563
|
+
align-items: stretch;
|
564
|
+
width: 100%;
|
1217
565
|
}
|
1218
566
|
|
1219
|
-
.
|
1220
|
-
|
567
|
+
.fractal-group-icons {
|
568
|
+
display: flex;
|
569
|
+
align-items: center;
|
570
|
+
padding: 0.375rem 0.75rem;
|
571
|
+
font-size: 1rem;
|
572
|
+
font-weight: 400;
|
573
|
+
line-height: 1.5;
|
574
|
+
color: #212529;
|
575
|
+
text-align: center;
|
576
|
+
white-space: nowrap;
|
577
|
+
background-color: #f8f9fa;
|
578
|
+
border:#dee2e6 1px solid;
|
579
|
+
border-radius: 0.375rem 0 0 0.375rem ;
|
1221
580
|
}
|
1222
581
|
|
1223
|
-
.
|
1224
|
-
|
582
|
+
.fractal-group .fractal-input{
|
583
|
+
border-radius:0 0.375rem 0.375rem 0;
|
1225
584
|
}
|
1226
585
|
|
1227
|
-
/* .cvc-preview-container div {
|
1228
|
-
height: 160px;
|
1229
|
-
} */
|
1230
586
|
|
1231
|
-
.
|
1232
|
-
|
1233
|
-
|
587
|
+
.pay-button {
|
588
|
+
outline: 0;
|
589
|
+
height: 46px;
|
590
|
+
font-size: 16px;
|
591
|
+
background: #ddd;
|
592
|
+
border: none;
|
593
|
+
display: block;
|
594
|
+
color: #fff;
|
595
|
+
width: 100%;
|
596
|
+
border-radius: 180px;
|
597
|
+
margin: 10px 0;
|
598
|
+
text-decoration: none;
|
1234
599
|
}
|
1235
600
|
|
1236
|
-
.
|
1237
|
-
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOYAAACOCAMAAAASE4S+AAAAAXNSR0IArs4c6QAAAadQTFRFAAAAzbFj+NyAyLNg+N2DzbRk+96CzrVj+96AzrNj+92By7Rl+92AzbRl/eCDzrRl/t+DzrVl/t+CzbVm/t+C3MFt3MFv/N2B/N6CzrRm/uCDzrRm/uCC7M93/N6CAAAAAQEBAgIBBAQCBQUDBwcECQgFDAsGDg0HEA4IEQ8JFRMLFxUMIBwQIR0RJSETKyYWLikYLyoYMCsZMSsZNC4bNzEcOTIdQDkhQTkhQzsiRT0jRj4kSkEmTEMnWE4tWU8uWk8uXFEvXVIwXlMwX1QxaV02bWA4bmE5cWQ6eGo+eWs+fW5Afm9Bi3pHjHtIkH9KmIZOmYdPnIlQnYpRo5BUppJVqJRWqpZXq5dYrJdYrZhZuaNfvaZhvqdiwKljwapjxK1lybFnyrJoy7NozrVm1Ltq171u2L5v2b9s2b9t2sBt3cNy3zEx3zIx38Rz4MVz4cZ04kI552NI6GVJ6Mx36s5368957dF674xb79J78NN78dV78tV789Z99Nd99dh+9rZv9th+9tl+99l/+duA+sx5+sx6+t2B+92B/N6B/d+C/uCD////AikOogAAAB90Uk5TACQkJSU9PT4+Q0NERJqav7/AwNjY4uLi4u7u8/P6+u6knPAAAAJkSURBVHja7d3pTxNBGMfxQbwAW06Pcj0tntQT8b7v+0JFxaserQcuKlQUFbFUaqvjH+1uG0lMfEETie4z39+bJ/tik/1kjt3MbDLGBFkWbeu0CtPZFq03v7KwxSpO04KKcmm7VZ32xeW2VK70nUF7tlj1afJnH+tA6k3UBWbUrHKBudJ0u8DsNtaJwIQJEyZMmDBhwoQJEyZMmPPCFCcCEyZMmDBhwoQJEyZMmDBhwoQJEyZMmDBhwoQJ010m+5swYcKECRMmTJgwYcKECRMmTJgwYcIMFfPHP8/vz5PLjnpzzmg2F07mxIhXVUYmwsjMVan0nbkQMrOeN1aY+zAsjHleNoRMf1x+rWa6KfjjM4RMvxdWN63+4QaYMGHC/EvM6b0HgpI6tvtoyq9vz+4/clcf89sJ2eiXIZGEyJD9sEl6RAa1MVPbpczsk8vT52SHHZCDUxelXxtzW/x4wPx+6cxn+0A2208PX9pB2aONef7xk3JrBjkth4Jysnf9fX1T0Czzmqx+6pcvcel/pJd5RRLXg1p6d0vWvdHKHJCeG2XljLVb5aZS5r2E3A6uTiUu2Km1klLK3CXxZDK5xd6RNYd3St+MTuaryr94G6y92iuy77X+b9rSi/d8usOEyZIXC5gsR7O5MN9bRexvwoQJEyZMmDBhwoQJEyZMmDBhwoT5vzNLLihLJu8CM2+6XGB2meUuMFeYyEf9ysmIqcsUtSuLmQZjGp8pdxafNxtjamIZ1f12MhOrDQ6uXhRLD4/nVb4/S/nx4XRsSeUY8prGtOI0186eKl8Xae3QSOxojTSUgT8BEvkXyqDHONgAAAAASUVORK5CYII=")
|
1238
|
-
center center/contain no-repeat;
|
1239
|
-
}
|
601
|
+
.pay-button:hover, .pay-button:focus {background: #333; color: #fff;}
|
1240
602
|
|
1241
|
-
.
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
width: 14px;
|
1249
|
-
display: inline-block;
|
603
|
+
.fractal-powerd-by {
|
604
|
+
display: flex;
|
605
|
+
font-size: 12px;
|
606
|
+
text-align: center;
|
607
|
+
align-items: center;
|
608
|
+
justify-content: center;
|
609
|
+
margin: 5px 0 20px 0;
|
1250
610
|
}
|
1251
611
|
|
1252
|
-
.align-middle {
|
1253
|
-
vertical-align: middle;
|
1254
|
-
}
|
1255
612
|
|
1256
|
-
input {
|
1257
|
-
box-shadow: none !important;
|
1258
|
-
}
|
1259
613
|
|
1260
|
-
.powerd-by-part {
|
1261
|
-
display: flex;
|
1262
|
-
font-size: 12px;
|
1263
|
-
text-align: center;
|
1264
|
-
align-items: center;
|
1265
|
-
justify-content: center;
|
1266
|
-
margin: 5px 0 20px 0;
|
1267
|
-
}
|
1268
614
|
|
1269
|
-
.powered-logo {
|
1270
|
-
width: 18px;
|
1271
|
-
height: auto;
|
1272
|
-
float: right;
|
1273
|
-
padding: 2px;
|
1274
|
-
background: #000000;
|
1275
|
-
border-radius: 4px;
|
1276
|
-
margin-left: 5px;
|
1277
|
-
}
|
1278
615
|
|
1279
|
-
.comp-name {
|
1280
|
-
display: block;
|
1281
|
-
margin-bottom: 8px;
|
1282
|
-
}
|
1283
616
|
|
1284
|
-
.client-logo {
|
1285
|
-
max-width: 140px;
|
1286
|
-
display: block;
|
1287
|
-
margin: auto;
|
1288
|
-
padding: 5px;
|
1289
|
-
}
|
1290
617
|
|
1291
|
-
|
1292
|
-
text-align: center;
|
1293
|
-
}
|
618
|
+
/* ................................................................ */
|
1294
619
|
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
620
|
+
.fractal-pay-popup {
|
621
|
+
position: fixed;
|
622
|
+
z-index: 9999;
|
623
|
+
top: 0;
|
624
|
+
right: 0;
|
625
|
+
bottom: 0;
|
626
|
+
left: 0;
|
627
|
+
width: 100%;
|
628
|
+
height: 100%;
|
629
|
+
background-color: rgba(0, 0, 0, 0.5);
|
630
|
+
transition: visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;
|
631
|
+
display: flex;
|
632
|
+
justify-content: center;
|
633
|
+
align-items: center;
|
1301
634
|
}
|
1302
635
|
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
636
|
+
.fractal-pay-popup-content {
|
637
|
+
background-color: white;
|
638
|
+
padding:0px;
|
639
|
+
border-radius: 0.5rem;
|
640
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
641
|
+
box-sizing: border-box;
|
642
|
+
position: relative;
|
643
|
+
height: 100%;
|
644
|
+
max-height:90%;
|
645
|
+
overflow: hidden;
|
1309
646
|
}
|
647
|
+
.fractal-pay-popup-content iframe{height: 100% !important; }
|
648
|
+
.fractal-pay-popup-content iframe body{overflow: hidden;}
|
649
|
+
@media only screen and (min-width: 768px){
|
650
|
+
.fractal-pay-popup-content iframe{width: 768px;}
|
651
|
+
.fractal-pay-popup-content {
|
652
|
+
width: 750px;
|
1310
653
|
|
1311
|
-
|
1312
|
-
border-color: #acc6db !important;
|
1313
|
-
background-color: #acc6db !important;
|
1314
|
-
} */
|
1315
|
-
|
1316
|
-
input[type="number"]::-webkit-outer-spin-button,
|
1317
|
-
input[type="number"]::-webkit-inner-spin-button {
|
1318
|
-
-webkit-appearance: none;
|
1319
|
-
margin: 0;
|
654
|
+
}
|
1320
655
|
}
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
656
|
+
@media only screen and (max-width: 600px){
|
657
|
+
.fractal-pay-popup-content {
|
658
|
+
width: 350px;
|
659
|
+
}
|
660
|
+
}
|
661
|
+
@media only screen and (max-width: 450px){
|
662
|
+
.fractal-pay-popup-content {
|
663
|
+
width: 300px;
|
664
|
+
}
|
1324
665
|
}
|
1325
666
|
|
1326
|
-
|
667
|
+
.request-payment-popup-container {
|
668
|
+
padding: 0px !important;
|
669
|
+
border-radius: 12px !important;
|
670
|
+
}
|
671
|
+
`);
|
1327
672
|
};
|
1328
|
-
var
|
673
|
+
var CustomModal2styles_default = CustomModal2styles;
|
674
|
+
|
675
|
+
// src/app/components/CustomModal/CustomModal2.tsx
|
676
|
+
var CustomModal2 = ({
|
677
|
+
open,
|
678
|
+
onClose,
|
679
|
+
children
|
680
|
+
}) => {
|
681
|
+
if (!open) return null;
|
682
|
+
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(CustomModal2styles_default, null), /* @__PURE__ */ React5.createElement("div", { className: "fractal-popup" }, /* @__PURE__ */ React5.createElement("div", { className: "fractal-popup-content request-payment-popup-container" }, children)));
|
683
|
+
};
|
684
|
+
var CustomModal2_default = CustomModal2;
|
685
|
+
|
686
|
+
// src/app/components/RequestPayment/RequestPayment.tsx
|
687
|
+
import axios from "axios";
|
688
|
+
import { PatternFormat } from "react-number-format";
|
689
|
+
function RequestPayment(props) {
|
690
|
+
const fractalpayClientKey = props.fractalpayClientKey;
|
691
|
+
const [show, setShow] = useState(false);
|
692
|
+
const [loading, setLoading] = useState(false);
|
693
|
+
const [errors, setErrors] = useState({});
|
694
|
+
const [phone, setPhone] = useState(null);
|
695
|
+
const [requestDetails, setRequestDetails] = useState({
|
696
|
+
email: "",
|
697
|
+
phone_number: "",
|
698
|
+
order_id: "",
|
699
|
+
name: "",
|
700
|
+
fractalpayPublicKey: fractalpayClientKey
|
701
|
+
});
|
702
|
+
const [amount, setAmount] = useState("");
|
703
|
+
const [showConfirmationModal, setShowConfirmationModal] = useState(true);
|
704
|
+
const [apiResponse, setApiResponse] = useState(null);
|
705
|
+
const phoneNumberRegex = (value) => /^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/.test(value);
|
706
|
+
const amoutRegex = /[+-]?([0-9]*[.])?[0-9]+/;
|
707
|
+
const isValidEmail = (value) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value);
|
708
|
+
const isAlpha = (value) => /^[A-Za-z\s]*$/.test(value);
|
709
|
+
const handleClose = () => {
|
710
|
+
setShow(false);
|
711
|
+
setErrors({});
|
712
|
+
};
|
713
|
+
const handleShow = () => setShow(true);
|
714
|
+
const handleCloseConfirmationModal = () => {
|
715
|
+
console.log(apiResponse, "apiresponse");
|
716
|
+
handleSubmit(apiResponse);
|
717
|
+
setShowConfirmationModal(false);
|
718
|
+
};
|
719
|
+
function emptyFields() {
|
720
|
+
setRequestDetails({
|
721
|
+
email: "",
|
722
|
+
phone_number: "",
|
723
|
+
order_id: "",
|
724
|
+
name: "",
|
725
|
+
fractalpayPublicKey: fractalpayClientKey
|
726
|
+
});
|
727
|
+
setAmount("");
|
728
|
+
}
|
729
|
+
function handleSubmit(event) {
|
730
|
+
let message = {
|
731
|
+
type: "preview.compiledcheck",
|
732
|
+
other: __spreadProps(__spreadValues({}, event), { status: true })
|
733
|
+
};
|
734
|
+
window.parent.postMessage(message, "*");
|
735
|
+
}
|
736
|
+
const sendRequestPayment = async () => {
|
737
|
+
if (Object.keys(errors).length > 0) {
|
738
|
+
return;
|
739
|
+
}
|
740
|
+
setErrors({});
|
741
|
+
if (!(requestDetails == null ? void 0 : requestDetails.email) && phone && !phoneNumberRegex(phone)) {
|
742
|
+
setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
|
743
|
+
phone: ErrorText.phonenumbervalid
|
744
|
+
}));
|
745
|
+
return;
|
746
|
+
}
|
747
|
+
if (!validateForm()) {
|
748
|
+
return;
|
749
|
+
}
|
750
|
+
try {
|
751
|
+
setLoading(true);
|
752
|
+
const formData = {
|
753
|
+
fractalpayPublicKey: fractalpayClientKey,
|
754
|
+
amount,
|
755
|
+
phone_number: phone,
|
756
|
+
order_id: requestDetails.order_id,
|
757
|
+
action: "request",
|
758
|
+
name: requestDetails.name,
|
759
|
+
email: requestDetails.email,
|
760
|
+
customer_id: (props == null ? void 0 : props.customerId) ? props == null ? void 0 : props.customerId : ""
|
761
|
+
};
|
762
|
+
let response = await axios.post(`${baseUrl}create-widget-order`, formData);
|
763
|
+
if ((response == null ? void 0 : response.status) === 200) {
|
764
|
+
setShowConfirmationModal(true);
|
765
|
+
setShow(false);
|
766
|
+
emptyFields();
|
767
|
+
setApiResponse(response == null ? void 0 : response.data);
|
768
|
+
}
|
769
|
+
setLoading(false);
|
770
|
+
} catch (error) {
|
771
|
+
console.log(error);
|
772
|
+
setLoading(false);
|
773
|
+
}
|
774
|
+
};
|
775
|
+
let favicon_logo = baseUrl + "images/logo-img.png";
|
776
|
+
const handleChange = (e) => {
|
777
|
+
const { value } = e.target;
|
778
|
+
const token = e.target.dataset.token;
|
779
|
+
setRequestDetails(__spreadProps(__spreadValues({}, requestDetails), { [token]: value }));
|
780
|
+
if (token === "name" && !isAlpha(value)) {
|
781
|
+
setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
|
782
|
+
[token]: ErrorText.onlylettersallowed
|
783
|
+
}));
|
784
|
+
return;
|
785
|
+
}
|
786
|
+
let errorobj = errors;
|
787
|
+
if (token === "email" && !phone) {
|
788
|
+
delete errorobj.phone;
|
789
|
+
setErrors(errorobj);
|
790
|
+
}
|
791
|
+
if (value) {
|
792
|
+
delete errorobj[token];
|
793
|
+
setErrors(errorobj);
|
794
|
+
}
|
795
|
+
if (token === "email" && !value) {
|
796
|
+
delete errorobj[token];
|
797
|
+
setErrors(errorobj);
|
798
|
+
}
|
799
|
+
};
|
800
|
+
const handleAmountChange = (data) => {
|
801
|
+
const { value } = data;
|
802
|
+
if (Number(value) > 0) {
|
803
|
+
let errorobj = errors;
|
804
|
+
delete errorobj.amount;
|
805
|
+
setErrors(errorobj);
|
806
|
+
}
|
807
|
+
setAmount(value);
|
808
|
+
};
|
809
|
+
const validateForm = () => {
|
810
|
+
let newErrors = {};
|
811
|
+
if (!amount) newErrors.amount = ErrorText.amountrequired;
|
812
|
+
if (requestDetails.email && !isValidEmail(requestDetails == null ? void 0 : requestDetails.email)) newErrors.email = ErrorText.invalidemail;
|
813
|
+
if (!phone && !(requestDetails == null ? void 0 : requestDetails.email)) newErrors.phone = ErrorText.phoneoremailrequired;
|
814
|
+
if (!phone && !(requestDetails == null ? void 0 : requestDetails.email)) newErrors.email = ErrorText.phoneoremailrequired;
|
815
|
+
if (!phone && requestDetails.email && !isValidEmail(requestDetails == null ? void 0 : requestDetails.email)) newErrors.email = ErrorText.invalidemail;
|
816
|
+
if (props.from === "merchant" && !requestDetails.order_id) newErrors.order_id = ErrorText.orderidrequired;
|
817
|
+
setErrors(newErrors);
|
818
|
+
return Object.keys(newErrors).length === 0;
|
819
|
+
};
|
820
|
+
useEffect(() => {
|
821
|
+
if (props) {
|
822
|
+
setRequestDetails((prev) => __spreadProps(__spreadValues({}, prev), {
|
823
|
+
order_id: props.orderID ? props.orderID : "",
|
824
|
+
name: (props == null ? void 0 : props.name) ? props == null ? void 0 : props.name : "",
|
825
|
+
email: (props == null ? void 0 : props.email) ? props == null ? void 0 : props.email : ""
|
826
|
+
}));
|
827
|
+
setAmount(props.amount ? props.amount : "");
|
828
|
+
setPhone(props.phone ? `${props.phone}` : null);
|
829
|
+
}
|
830
|
+
}, [props]);
|
831
|
+
const handlePhoneChange = (e) => {
|
832
|
+
let value = e == null ? void 0 : e.value;
|
833
|
+
if (value && (value == null ? void 0 : value.length) > 0 && (value == null ? void 0 : value.length) !== 10) {
|
834
|
+
setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
|
835
|
+
phone: ErrorText.phonenumberlength
|
836
|
+
}));
|
837
|
+
setPhone(value);
|
838
|
+
return;
|
839
|
+
} else {
|
840
|
+
setPhone(value);
|
841
|
+
}
|
842
|
+
let errorobj = errors;
|
843
|
+
delete errorobj.phone;
|
844
|
+
if (value && !(requestDetails == null ? void 0 : requestDetails.email)) {
|
845
|
+
delete errorobj.email;
|
846
|
+
}
|
847
|
+
setErrors(errorobj);
|
848
|
+
};
|
849
|
+
function formatAmount(amount2) {
|
850
|
+
return new Intl.NumberFormat("en-US", {
|
851
|
+
style: "currency",
|
852
|
+
currency: "USD",
|
853
|
+
minimumFractionDigits: 2,
|
854
|
+
maximumFractionDigits: 2
|
855
|
+
}).format(Number(amount2));
|
856
|
+
}
|
857
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ React6.createElement(Loader_default, { loading }), /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Request Payment"), /* @__PURE__ */ React6.createElement(
|
858
|
+
CustomModal2_default,
|
859
|
+
{
|
860
|
+
open: show,
|
861
|
+
onClose: () => setShow(false)
|
862
|
+
},
|
863
|
+
/* @__PURE__ */ React6.createElement("div", { className: "request-payment-amount-detail" }, /* @__PURE__ */ React6.createElement("p", { className: "request-payment-merchantname" }, "Pay ", props == null ? void 0 : props.webname), /* @__PURE__ */ React6.createElement("p", { className: "request-payment-amount" }, formatAmount(props == null ? void 0 : props.amount)), (props == null ? void 0 : props.from) === "merchant" && /* @__PURE__ */ React6.createElement("p", { className: "request-payment-orderid" }, requestDetails == null ? void 0 : requestDetails.order_id), /* @__PURE__ */ React6.createElement("span", { className: "request-payment-close-popup", onClick: handleClose }, /* @__PURE__ */ React6.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React6.createElement("g", { "clip-path": "url(#clip0_12425_52336)" }, /* @__PURE__ */ React6.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__ */ React6.createElement("defs", null, /* @__PURE__ */ React6.createElement("clipPath", { id: "clip0_12425_52336" }, /* @__PURE__ */ React6.createElement("rect", { width: "16", height: "16", fill: "white" })))))),
|
864
|
+
/* @__PURE__ */ React6.createElement("form", { className: "request-payment-input-form" }, /* @__PURE__ */ React6.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ React6.createElement("label", { htmlFor: "exampleFormControlInput2", className: "request-payment-input-label" }, "FULL NAME"), /* @__PURE__ */ React6.createElement(
|
865
|
+
"input",
|
866
|
+
{
|
867
|
+
className: "request-payment-input-box",
|
868
|
+
type: "text",
|
869
|
+
placeholder: "Full Name",
|
870
|
+
"data-token": "name",
|
871
|
+
onChange: handleChange,
|
872
|
+
value: requestDetails == null ? void 0 : requestDetails.name
|
873
|
+
}
|
874
|
+
), errors.name && /* @__PURE__ */ React6.createElement("small", { className: "request-payment-error-msg" }, errors.name)), /* @__PURE__ */ React6.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ React6.createElement("label", { htmlFor: "requestPhoneNumber", className: "request-payment-input-label" }, "Phone Number"), /* @__PURE__ */ React6.createElement(
|
875
|
+
PatternFormat,
|
876
|
+
{
|
877
|
+
className: "request-payment-input-box",
|
878
|
+
placeholder: "Mobile number",
|
879
|
+
format: "+1 (###) ###-####",
|
880
|
+
value: phone,
|
881
|
+
onValueChange: (e) => {
|
882
|
+
handlePhoneChange(e);
|
883
|
+
}
|
884
|
+
}
|
885
|
+
), errors.phone && /* @__PURE__ */ React6.createElement("small", { className: "request-payment-error-msg" }, errors.phone)), /* @__PURE__ */ React6.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ React6.createElement("label", { htmlFor: "exampleFormControlInput2", className: "request-payment-input-label" }, "EMAIL"), /* @__PURE__ */ React6.createElement(
|
886
|
+
"input",
|
887
|
+
{
|
888
|
+
className: "request-payment-input-box",
|
889
|
+
type: "text",
|
890
|
+
placeholder: "Email",
|
891
|
+
onChange: handleChange,
|
892
|
+
"data-token": "email",
|
893
|
+
value: requestDetails == null ? void 0 : requestDetails.email
|
894
|
+
}
|
895
|
+
), errors.email && /* @__PURE__ */ React6.createElement("small", { className: "request-payment-error-msg" }, errors.email)), /* @__PURE__ */ React6.createElement(
|
896
|
+
"button",
|
897
|
+
{
|
898
|
+
type: "button",
|
899
|
+
className: "request-payment-submit-button",
|
900
|
+
onClick: sendRequestPayment,
|
901
|
+
disabled: loading
|
902
|
+
},
|
903
|
+
loading ? "Loading..." : "Send Request"
|
904
|
+
), /* @__PURE__ */ React6.createElement("div", { className: "request-payment-fractal-powerd-by" }, /* @__PURE__ */ React6.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17", height: "16", viewBox: "0 0 17 16", fill: "none" }, /* @__PURE__ */ React6.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__ */ React6.createElement("span", null, "Fractal"), /* @__PURE__ */ React6.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none" }, /* @__PURE__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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__ */ React6.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" }))))
|
905
|
+
), /* @__PURE__ */ React6.createElement(
|
906
|
+
CustomModal2_default,
|
907
|
+
{
|
908
|
+
open: showConfirmationModal,
|
909
|
+
onClose: handleCloseConfirmationModal
|
910
|
+
},
|
911
|
+
/* @__PURE__ */ React6.createElement("div", { className: "fractal-popup-content", style: { padding: "0px" } }, /* @__PURE__ */ React6.createElement("div", { className: "request-payment-success-container" }, /* @__PURE__ */ React6.createElement("span", { className: "request-payment-close-popup", onClick: handleCloseConfirmationModal }, /* @__PURE__ */ React6.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React6.createElement("g", { "clip-path": "url(#clip0_12425_52336)" }, /* @__PURE__ */ React6.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__ */ React6.createElement("defs", null, /* @__PURE__ */ React6.createElement("clipPath", { id: "clip0_12425_52336" }, /* @__PURE__ */ React6.createElement("rect", { width: "16", height: "16", fill: "white" }))))), /* @__PURE__ */ React6.createElement("div", { className: "request-payment-success-tick-div" }, /* @__PURE__ */ React6.createElement("div", { className: "request-payment-success-tick" }, /* @__PURE__ */ React6.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React6.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__ */ React6.createElement("h6", { className: "request-payment-success-text" }, "The request ", /* @__PURE__ */ React6.createElement("br", null), "was sent"), /* @__PURE__ */ React6.createElement("h6", { className: "request-payment-success-subtext" }, "Please wait for the customer to pay"), /* @__PURE__ */ React6.createElement("div", { className: "request-payment-success-btn-div" }, /* @__PURE__ */ React6.createElement("button", { onClick: handleCloseConfirmationModal, className: "request-payment-success-btn2" }, "Close"))))
|
912
|
+
)));
|
913
|
+
}
|
1329
914
|
|
1330
915
|
// src/app/components/RequestPayment/RequestPaymentAllInput.tsx
|
916
|
+
import React7, { useState as useState2 } from "react";
|
917
|
+
import { Modal } from "react-bootstrap";
|
918
|
+
import { toast, ToastContainer } from "react-toastify";
|
919
|
+
import "react-toastify/dist/ReactToastify.css";
|
1331
920
|
function RequestPaymentAllInput({ fractalpayClientKey }) {
|
1332
921
|
const [isLoading, setIsLoading] = useState2(false);
|
1333
922
|
const [show, setShow] = useState2(false);
|
@@ -1442,7 +1031,7 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
|
|
1442
1031
|
setIsValidOrderId(false);
|
1443
1032
|
}
|
1444
1033
|
};
|
1445
|
-
return /* @__PURE__ */
|
1034
|
+
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ React7.createElement("div", { className: " border-container" }, /* @__PURE__ */ React7.createElement("div", { className: "payment-column" }, /* @__PURE__ */ React7.createElement("label", null, "Enter Phone Number:"), /* @__PURE__ */ React7.createElement("div", { className: "input-container" }, /* @__PURE__ */ React7.createElement(
|
1446
1035
|
"input",
|
1447
1036
|
{
|
1448
1037
|
type: "text",
|
@@ -1452,7 +1041,7 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
|
|
1452
1041
|
maxLength: 10,
|
1453
1042
|
className: submitClicked && (!phoneNumber || !isValidNumber) ? "error" : ""
|
1454
1043
|
}
|
1455
|
-
), errorMessagephone && /* @__PURE__ */
|
1044
|
+
), errorMessagephone && /* @__PURE__ */ React7.createElement("div", { className: "error-message text-danger" }, errorMessagephone))), /* @__PURE__ */ React7.createElement("div", { className: "payment-column" }, /* @__PURE__ */ React7.createElement("label", null, "Enter Amount:"), /* @__PURE__ */ React7.createElement("div", { className: "input-container" }, /* @__PURE__ */ React7.createElement(
|
1456
1045
|
"input",
|
1457
1046
|
{
|
1458
1047
|
type: "text",
|
@@ -1461,7 +1050,7 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
|
|
1461
1050
|
placeholder: "Enter amount",
|
1462
1051
|
className: submitClicked && (!amount || !isValidAmount) ? "error" : ""
|
1463
1052
|
}
|
1464
|
-
), errorMessageamount && /* @__PURE__ */
|
1053
|
+
), errorMessageamount && /* @__PURE__ */ React7.createElement("div", { className: "error-message text-danger" }, errorMessageamount))), /* @__PURE__ */ React7.createElement("div", { className: "payment-column" }, /* @__PURE__ */ React7.createElement("label", null, "Enter Order ID:"), /* @__PURE__ */ React7.createElement("div", { className: "input-container" }, /* @__PURE__ */ React7.createElement(
|
1465
1054
|
"input",
|
1466
1055
|
{
|
1467
1056
|
type: "text",
|
@@ -1470,7 +1059,7 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
|
|
1470
1059
|
placeholder: "Enter order ID",
|
1471
1060
|
className: submitClicked && (!orderId || !isValidOrderId) ? "error" : ""
|
1472
1061
|
}
|
1473
|
-
), errorMessageorderid && /* @__PURE__ */
|
1062
|
+
), errorMessageorderid && /* @__PURE__ */ React7.createElement("div", { className: "error-message text-danger" }, errorMessageorderid))), /* @__PURE__ */ React7.createElement(
|
1474
1063
|
"button",
|
1475
1064
|
{
|
1476
1065
|
onClick: sendRequestPayment,
|
@@ -1478,7 +1067,7 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
|
|
1478
1067
|
className: "paymentBtn"
|
1479
1068
|
},
|
1480
1069
|
isLoading ? "Loading..." : "Request Payment"
|
1481
|
-
)), /* @__PURE__ */
|
1070
|
+
)), /* @__PURE__ */ React7.createElement(Modal, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ React7.createElement(Modal.Header, { closeButton: true }), /* @__PURE__ */ React7.createElement(Modal.Body, null, /* @__PURE__ */ React7.createElement(
|
1482
1071
|
"svg",
|
1483
1072
|
{
|
1484
1073
|
width: "60",
|
@@ -1487,7 +1076,7 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
|
|
1487
1076
|
fill: "none",
|
1488
1077
|
xmlns: "http://www.w3.org/2000/svg"
|
1489
1078
|
},
|
1490
|
-
/* @__PURE__ */
|
1079
|
+
/* @__PURE__ */ React7.createElement(
|
1491
1080
|
"rect",
|
1492
1081
|
{
|
1493
1082
|
x: "0.5",
|
@@ -1498,14 +1087,14 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
|
|
1498
1087
|
stroke: "#31B379"
|
1499
1088
|
}
|
1500
1089
|
),
|
1501
|
-
/* @__PURE__ */
|
1090
|
+
/* @__PURE__ */ React7.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ React7.createElement(
|
1502
1091
|
"path",
|
1503
1092
|
{
|
1504
1093
|
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",
|
1505
1094
|
fill: "#31B379"
|
1506
1095
|
}
|
1507
1096
|
)),
|
1508
|
-
/* @__PURE__ */
|
1097
|
+
/* @__PURE__ */ React7.createElement("defs", null, /* @__PURE__ */ React7.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React7.createElement(
|
1509
1098
|
"rect",
|
1510
1099
|
{
|
1511
1100
|
width: "22",
|
@@ -1514,12 +1103,12 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
|
|
1514
1103
|
transform: "translate(19.5 19.0039)"
|
1515
1104
|
}
|
1516
1105
|
)))
|
1517
|
-
), /* @__PURE__ */
|
1106
|
+
), /* @__PURE__ */ React7.createElement("h1", null, "Success!"), /* @__PURE__ */ React7.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ React7.createElement(Modal.Footer, null, /* @__PURE__ */ React7.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))), /* @__PURE__ */ React7.createElement(ToastContainer, null));
|
1518
1107
|
}
|
1519
1108
|
|
1520
1109
|
// src/app/components/RequestPayment/RequestPaymentDynamic.tsx
|
1521
|
-
import
|
1522
|
-
import { Modal as
|
1110
|
+
import React8, { useState as useState3 } from "react";
|
1111
|
+
import { Modal as Modal2 } from "react-bootstrap";
|
1523
1112
|
|
1524
1113
|
// src/app/components/Api/createWidgetOrder.ts
|
1525
1114
|
var createWidgetOrder = (formData) => {
|
@@ -1566,7 +1155,7 @@ function RequestPaymentDynamic({ fractalpayClientKey, amount, phone_number, orde
|
|
1566
1155
|
console.error("Error:", error);
|
1567
1156
|
});
|
1568
1157
|
};
|
1569
|
-
return /* @__PURE__ */
|
1158
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
|
1570
1159
|
"button",
|
1571
1160
|
{
|
1572
1161
|
onClick: sendRequestPayment,
|
@@ -1574,7 +1163,7 @@ function RequestPaymentDynamic({ fractalpayClientKey, amount, phone_number, orde
|
|
1574
1163
|
className: "paymentBtn"
|
1575
1164
|
},
|
1576
1165
|
isLoading ? "Loading..." : "Request Payment"
|
1577
|
-
), /* @__PURE__ */
|
1166
|
+
), /* @__PURE__ */ React8.createElement(Modal2, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ React8.createElement(Modal2.Header, { closeButton: true }), /* @__PURE__ */ React8.createElement(Modal2.Body, null, /* @__PURE__ */ React8.createElement(
|
1578
1167
|
"svg",
|
1579
1168
|
{
|
1580
1169
|
width: "60",
|
@@ -1583,7 +1172,7 @@ function RequestPaymentDynamic({ fractalpayClientKey, amount, phone_number, orde
|
|
1583
1172
|
fill: "none",
|
1584
1173
|
xmlns: "http://www.w3.org/2000/svg"
|
1585
1174
|
},
|
1586
|
-
/* @__PURE__ */
|
1175
|
+
/* @__PURE__ */ React8.createElement(
|
1587
1176
|
"rect",
|
1588
1177
|
{
|
1589
1178
|
x: "0.5",
|
@@ -1594,14 +1183,14 @@ function RequestPaymentDynamic({ fractalpayClientKey, amount, phone_number, orde
|
|
1594
1183
|
stroke: "#31B379"
|
1595
1184
|
}
|
1596
1185
|
),
|
1597
|
-
/* @__PURE__ */
|
1186
|
+
/* @__PURE__ */ React8.createElement("g", { "clip-path": "url(#clip0_2659_5018)" }, /* @__PURE__ */ React8.createElement(
|
1598
1187
|
"path",
|
1599
1188
|
{
|
1600
1189
|
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",
|
1601
1190
|
fill: "#31B379"
|
1602
1191
|
}
|
1603
1192
|
)),
|
1604
|
-
/* @__PURE__ */
|
1193
|
+
/* @__PURE__ */ React8.createElement("defs", null, /* @__PURE__ */ React8.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React8.createElement(
|
1605
1194
|
"rect",
|
1606
1195
|
{
|
1607
1196
|
width: "22",
|
@@ -1610,12 +1199,12 @@ function RequestPaymentDynamic({ fractalpayClientKey, amount, phone_number, orde
|
|
1610
1199
|
transform: "translate(19.5 19.0039)"
|
1611
1200
|
}
|
1612
1201
|
)))
|
1613
|
-
), /* @__PURE__ */
|
1202
|
+
), /* @__PURE__ */ React8.createElement("h1", null, "Success!"), /* @__PURE__ */ React8.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ React8.createElement(Modal2.Footer, null, /* @__PURE__ */ React8.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))));
|
1614
1203
|
}
|
1615
1204
|
|
1616
1205
|
// src/app/components/RequestPayment/RequestPaymentonClick.tsx
|
1617
|
-
import
|
1618
|
-
import { Modal as
|
1206
|
+
import React9, { useState as useState4 } from "react";
|
1207
|
+
import { Modal as Modal3 } from "react-bootstrap";
|
1619
1208
|
function RequestPaymentonClick(props) {
|
1620
1209
|
const [isLoading, setIsLoading] = useState4(false);
|
1621
1210
|
const [show, setShow] = useState4(false);
|
@@ -1652,7 +1241,7 @@ function RequestPaymentonClick(props) {
|
|
1652
1241
|
console.error("Error:", error);
|
1653
1242
|
});
|
1654
1243
|
};
|
1655
|
-
return /* @__PURE__ */
|
1244
|
+
return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ React9.createElement(
|
1656
1245
|
"button",
|
1657
1246
|
{
|
1658
1247
|
onClick: sendRequestPayment,
|
@@ -1660,7 +1249,7 @@ function RequestPaymentonClick(props) {
|
|
1660
1249
|
className: "paymentBtn"
|
1661
1250
|
},
|
1662
1251
|
isLoading ? "Loading..." : "Request Payment"
|
1663
|
-
), /* @__PURE__ */
|
1252
|
+
), /* @__PURE__ */ React9.createElement(Modal3, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ React9.createElement(Modal3.Header, { closeButton: true }), /* @__PURE__ */ React9.createElement(Modal3.Body, null, onSuccess && /* @__PURE__ */ React9.createElement(
|
1664
1253
|
"svg",
|
1665
1254
|
{
|
1666
1255
|
width: "60",
|
@@ -1669,7 +1258,7 @@ function RequestPaymentonClick(props) {
|
|
1669
1258
|
fill: "none",
|
1670
1259
|
xmlns: "http://www.w3.org/2000/svg"
|
1671
1260
|
},
|
1672
|
-
/* @__PURE__ */
|
1261
|
+
/* @__PURE__ */ React9.createElement(
|
1673
1262
|
"rect",
|
1674
1263
|
{
|
1675
1264
|
x: "0.5",
|
@@ -1680,14 +1269,14 @@ function RequestPaymentonClick(props) {
|
|
1680
1269
|
stroke: "#31B379"
|
1681
1270
|
}
|
1682
1271
|
),
|
1683
|
-
/* @__PURE__ */
|
1272
|
+
/* @__PURE__ */ React9.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ React9.createElement(
|
1684
1273
|
"path",
|
1685
1274
|
{
|
1686
1275
|
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",
|
1687
1276
|
fill: "#31B379"
|
1688
1277
|
}
|
1689
1278
|
)),
|
1690
|
-
/* @__PURE__ */
|
1279
|
+
/* @__PURE__ */ React9.createElement("defs", null, /* @__PURE__ */ React9.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React9.createElement(
|
1691
1280
|
"rect",
|
1692
1281
|
{
|
1693
1282
|
width: "22",
|
@@ -1696,12 +1285,12 @@ function RequestPaymentonClick(props) {
|
|
1696
1285
|
transform: "translate(19.5 19.0039)"
|
1697
1286
|
}
|
1698
1287
|
)))
|
1699
|
-
), onSuccess ? /* @__PURE__ */
|
1288
|
+
), onSuccess ? /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("h1", null, "Success!"), /* @__PURE__ */ React9.createElement("h4", null, onSuccess)) : /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("h1", null, "Error!"), /* @__PURE__ */ React9.createElement("h4", null, onError))), /* @__PURE__ */ React9.createElement(Modal3.Footer, null, /* @__PURE__ */ React9.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))));
|
1700
1289
|
}
|
1701
1290
|
|
1702
1291
|
// src/app/components/RequestPayment/RqstPaymntInputField.tsx
|
1703
|
-
import
|
1704
|
-
import { Modal as
|
1292
|
+
import React10, { useState as useState5 } from "react";
|
1293
|
+
import { Modal as Modal4 } from "react-bootstrap";
|
1705
1294
|
import { toast as toast2, ToastContainer as ToastContainer2 } from "react-toastify";
|
1706
1295
|
import "react-toastify/dist/ReactToastify.css";
|
1707
1296
|
function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
|
@@ -1773,7 +1362,7 @@ function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
|
|
1773
1362
|
setErrorMessage(ErrorText.phonenumbervalid);
|
1774
1363
|
}
|
1775
1364
|
};
|
1776
|
-
return /* @__PURE__ */
|
1365
|
+
return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement("div", { className: "payment-container" }, /* @__PURE__ */ React10.createElement("div", { className: "input-wrapper" }, /* @__PURE__ */ React10.createElement("div", { className: "input-container" }, /* @__PURE__ */ React10.createElement(
|
1777
1366
|
"input",
|
1778
1367
|
{
|
1779
1368
|
type: "text",
|
@@ -1783,7 +1372,7 @@ function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
|
|
1783
1372
|
maxLength: 10,
|
1784
1373
|
className: submitClicked && (!phoneNumber || !isValidNumber) ? "error" : ""
|
1785
1374
|
}
|
1786
|
-
), errorMessage && /* @__PURE__ */
|
1375
|
+
), errorMessage && /* @__PURE__ */ React10.createElement("div", { className: "error-message text-danger" }, errorMessage))), /* @__PURE__ */ React10.createElement("div", { className: "button-wrapper" }, /* @__PURE__ */ React10.createElement(
|
1787
1376
|
"button",
|
1788
1377
|
{
|
1789
1378
|
onClick: sendRequestPayment,
|
@@ -1791,7 +1380,7 @@ function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
|
|
1791
1380
|
className: "paymentBtn"
|
1792
1381
|
},
|
1793
1382
|
isLoading ? "Loading..." : "Request Payment"
|
1794
|
-
))), /* @__PURE__ */
|
1383
|
+
))), /* @__PURE__ */ React10.createElement(Modal4, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ React10.createElement(Modal4.Header, { closeButton: true }), /* @__PURE__ */ React10.createElement(Modal4.Body, null, /* @__PURE__ */ React10.createElement(
|
1795
1384
|
"svg",
|
1796
1385
|
{
|
1797
1386
|
width: "60",
|
@@ -1800,7 +1389,7 @@ function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
|
|
1800
1389
|
fill: "none",
|
1801
1390
|
xmlns: "http://www.w3.org/2000/svg"
|
1802
1391
|
},
|
1803
|
-
/* @__PURE__ */
|
1392
|
+
/* @__PURE__ */ React10.createElement(
|
1804
1393
|
"rect",
|
1805
1394
|
{
|
1806
1395
|
x: "0.5",
|
@@ -1811,14 +1400,14 @@ function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
|
|
1811
1400
|
stroke: "#31B379"
|
1812
1401
|
}
|
1813
1402
|
),
|
1814
|
-
/* @__PURE__ */
|
1403
|
+
/* @__PURE__ */ React10.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ React10.createElement(
|
1815
1404
|
"path",
|
1816
1405
|
{
|
1817
1406
|
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",
|
1818
1407
|
fill: "#31B379"
|
1819
1408
|
}
|
1820
1409
|
)),
|
1821
|
-
/* @__PURE__ */
|
1410
|
+
/* @__PURE__ */ React10.createElement("defs", null, /* @__PURE__ */ React10.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React10.createElement(
|
1822
1411
|
"rect",
|
1823
1412
|
{
|
1824
1413
|
width: "22",
|
@@ -1827,19 +1416,19 @@ function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
|
|
1827
1416
|
transform: "translate(19.5 19.0039)"
|
1828
1417
|
}
|
1829
1418
|
)))
|
1830
|
-
), /* @__PURE__ */
|
1419
|
+
), /* @__PURE__ */ React10.createElement("h1", null, "Success!"), /* @__PURE__ */ React10.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ React10.createElement(Modal4.Footer, null, /* @__PURE__ */ React10.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))), /* @__PURE__ */ React10.createElement(ToastContainer2, null));
|
1831
1420
|
}
|
1832
1421
|
|
1833
1422
|
// src/app/components/Payment/Payment.tsx
|
1834
|
-
import
|
1423
|
+
import React12, { useState as useState6 } from "react";
|
1835
1424
|
import forge from "node-forge";
|
1836
1425
|
import { toast as toast3 } from "react-toastify";
|
1837
|
-
import { Modal as
|
1426
|
+
import { Modal as Modal5 } from "react-bootstrap";
|
1838
1427
|
|
1839
1428
|
// src/app/components/Payment/Paymentstyles.tsx
|
1840
|
-
import
|
1429
|
+
import React11 from "react";
|
1841
1430
|
function Paymentstyles() {
|
1842
|
-
return /* @__PURE__ */
|
1431
|
+
return /* @__PURE__ */ React11.createElement("style", null, `
|
1843
1432
|
.paymentBtn {
|
1844
1433
|
background-color: black;
|
1845
1434
|
border: none;
|
@@ -2942,7 +2531,7 @@ function Payment() {
|
|
2942
2531
|
}
|
2943
2532
|
return "";
|
2944
2533
|
}
|
2945
|
-
return /* @__PURE__ */
|
2534
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Paymentstyles, null), /* @__PURE__ */ React12.createElement("div", { className: "" }, /* @__PURE__ */ React12.createElement(
|
2946
2535
|
"button",
|
2947
2536
|
{
|
2948
2537
|
className: "export-btn",
|
@@ -2950,8 +2539,8 @@ function Payment() {
|
|
2950
2539
|
onClick: () => handlePaymentClick()
|
2951
2540
|
},
|
2952
2541
|
"Payment"
|
2953
|
-
), /* @__PURE__ */
|
2954
|
-
|
2542
|
+
), /* @__PURE__ */ React12.createElement(
|
2543
|
+
Modal5,
|
2955
2544
|
{
|
2956
2545
|
show: state.show,
|
2957
2546
|
onHide: () => setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
@@ -2959,8 +2548,8 @@ function Payment() {
|
|
2959
2548
|
})),
|
2960
2549
|
centered: true
|
2961
2550
|
},
|
2962
|
-
/* @__PURE__ */
|
2963
|
-
/* @__PURE__ */
|
2551
|
+
/* @__PURE__ */ React12.createElement(Modal5.Header, { closeButton: true }),
|
2552
|
+
/* @__PURE__ */ React12.createElement(Modal5.Body, null, /* @__PURE__ */ React12.createElement("div", { className: "payment-popup" }, /* @__PURE__ */ React12.createElement("div", { className: "row" }, /* @__PURE__ */ React12.createElement("div", { className: "" }, /* @__PURE__ */ React12.createElement("div", { id: "Checkout", className: "inline" }, /* @__PURE__ */ React12.createElement("div", { className: "header" }, /* @__PURE__ */ React12.createElement("h1", null, "Pay")), /* @__PURE__ */ React12.createElement("form", { id: "PaymentForm", className: "payment-form" }, /* @__PURE__ */ React12.createElement("div", { className: "form-group", style: { display: "none" } }, /* @__PURE__ */ React12.createElement("label", null, "Payment amount"), /* @__PURE__ */ React12.createElement("div", { className: "input-group" }, /* @__PURE__ */ React12.createElement("span", { className: "input-group-addon" }, "$"), /* @__PURE__ */ React12.createElement(
|
2964
2553
|
"input",
|
2965
2554
|
{
|
2966
2555
|
type: "text",
|
@@ -2969,13 +2558,13 @@ function Payment() {
|
|
2969
2558
|
className: "form-control",
|
2970
2559
|
id: ""
|
2971
2560
|
}
|
2972
|
-
)), /* @__PURE__ */
|
2561
|
+
)), /* @__PURE__ */ React12.createElement(
|
2973
2562
|
"span",
|
2974
2563
|
{
|
2975
2564
|
id: "amount-error",
|
2976
2565
|
style: { color: "red", display: "none" }
|
2977
2566
|
}
|
2978
|
-
)), /* @__PURE__ */
|
2567
|
+
)), /* @__PURE__ */ React12.createElement("div", { className: "form-group" }, /* @__PURE__ */ React12.createElement("label", null, "Name on card"), /* @__PURE__ */ React12.createElement(
|
2979
2568
|
"input",
|
2980
2569
|
{
|
2981
2570
|
id: "NameOnCard",
|
@@ -2984,13 +2573,13 @@ function Payment() {
|
|
2984
2573
|
maxLength: 100,
|
2985
2574
|
placeholder: "Name"
|
2986
2575
|
}
|
2987
|
-
), /* @__PURE__ */
|
2576
|
+
), /* @__PURE__ */ React12.createElement(
|
2988
2577
|
"span",
|
2989
2578
|
{
|
2990
2579
|
id: "NameOnCard-error",
|
2991
2580
|
style: { color: "red", display: "none" }
|
2992
2581
|
}
|
2993
|
-
)), /* @__PURE__ */
|
2582
|
+
)), /* @__PURE__ */ React12.createElement("div", { className: "form-group" }, /* @__PURE__ */ React12.createElement(
|
2994
2583
|
"input",
|
2995
2584
|
{
|
2996
2585
|
"data-token": "card_number",
|
@@ -3001,7 +2590,7 @@ function Payment() {
|
|
3001
2590
|
placeholder: "0000 0000 0000 0000",
|
3002
2591
|
onChange: handleCardNumberChange
|
3003
2592
|
}
|
3004
|
-
), state.error && /* @__PURE__ */
|
2593
|
+
), state.error && /* @__PURE__ */ React12.createElement("div", { style: { color: "red" } }, state.error)), /* @__PURE__ */ React12.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React12.createElement(
|
3005
2594
|
"input",
|
3006
2595
|
{
|
3007
2596
|
"data-token": "exp_month",
|
@@ -3012,14 +2601,14 @@ function Payment() {
|
|
3012
2601
|
maxLength: 2,
|
3013
2602
|
onChange: (e) => handleMonthChange(e)
|
3014
2603
|
}
|
3015
|
-
), isValidMonth && /* @__PURE__ */
|
2604
|
+
), isValidMonth && /* @__PURE__ */ React12.createElement(
|
3016
2605
|
"span",
|
3017
2606
|
{
|
3018
2607
|
id: "card_number-error",
|
3019
2608
|
style: { color: "red", fontSize: "15px" }
|
3020
2609
|
},
|
3021
2610
|
(_a = ErrorText) == null ? void 0 : _a.montherror
|
3022
|
-
)), /* @__PURE__ */
|
2611
|
+
)), /* @__PURE__ */ React12.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React12.createElement(
|
3023
2612
|
"input",
|
3024
2613
|
{
|
3025
2614
|
"data-token": "exp_year",
|
@@ -3030,7 +2619,7 @@ function Payment() {
|
|
3030
2619
|
value: state.year,
|
3031
2620
|
onChange: (e) => handleYearChange(e)
|
3032
2621
|
}
|
3033
|
-
), state.yearError && /* @__PURE__ */
|
2622
|
+
), state.yearError && /* @__PURE__ */ React12.createElement("span", { id: "exp_year-error", style: { color: "red" } }, state.yearError)), /* @__PURE__ */ React12.createElement("div", { className: "security-code-group form-group" }, /* @__PURE__ */ React12.createElement("div", { className: "input-container" }, /* @__PURE__ */ React12.createElement(
|
3034
2623
|
"input",
|
3035
2624
|
{
|
3036
2625
|
"data-token": "cvv",
|
@@ -3041,7 +2630,7 @@ function Payment() {
|
|
3041
2630
|
placeholder: "CVV",
|
3042
2631
|
onChange: (e) => handleCVVChange(e)
|
3043
2632
|
}
|
3044
|
-
), /* @__PURE__ */
|
2633
|
+
), /* @__PURE__ */ React12.createElement("i", { id: "cvc", className: "fa fa-question-circle" }), state.cvvError && /* @__PURE__ */ React12.createElement("span", { id: "cvv-error", style: { color: "red" } }, state.cvvError)), /* @__PURE__ */ React12.createElement("div", { className: "cvc-preview-container two-card hide" }, /* @__PURE__ */ React12.createElement("div", { className: "amex-cvc-preview" }), /* @__PURE__ */ React12.createElement("div", { className: "visa-mc-dis-cvc-preview" }))), /* @__PURE__ */ React12.createElement("div", { className: "zip-code-group form-group" }, /* @__PURE__ */ React12.createElement("label", null, "Postal code"), /* @__PURE__ */ React12.createElement("div", { className: "input-container" }, /* @__PURE__ */ React12.createElement(
|
3045
2634
|
"input",
|
3046
2635
|
{
|
3047
2636
|
id: "ZIPCode",
|
@@ -3053,7 +2642,7 @@ function Payment() {
|
|
3053
2642
|
value: state.zip,
|
3054
2643
|
onChange: (e) => handleZIP(e)
|
3055
2644
|
}
|
3056
|
-
), /* @__PURE__ */
|
2645
|
+
), /* @__PURE__ */ React12.createElement(
|
3057
2646
|
"a",
|
3058
2647
|
{
|
3059
2648
|
tabIndex: 0,
|
@@ -3063,15 +2652,15 @@ function Payment() {
|
|
3063
2652
|
"data-placement": "left",
|
3064
2653
|
"data-content": "Enter the ZIP/Postal code for your credit card billing address."
|
3065
2654
|
},
|
3066
|
-
/* @__PURE__ */
|
3067
|
-
), /* @__PURE__ */
|
2655
|
+
/* @__PURE__ */ React12.createElement("i", { className: "fa fa-question-circle" })
|
2656
|
+
), /* @__PURE__ */ React12.createElement(
|
3068
2657
|
"span",
|
3069
2658
|
{
|
3070
2659
|
id: "ZIPCode-error",
|
3071
2660
|
style: { color: "red", display: "none" }
|
3072
2661
|
},
|
3073
2662
|
ErrorText.fieldrequired
|
3074
|
-
))), /* @__PURE__ */
|
2663
|
+
))), /* @__PURE__ */ React12.createElement("div", { className: "form-group top-amnt" }, /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement("label", null, "Payment amount"), /* @__PURE__ */ React12.createElement("div", { className: "amount-placeholder" }, /* @__PURE__ */ React12.createElement(
|
3075
2664
|
"input",
|
3076
2665
|
{
|
3077
2666
|
id: "Amount",
|
@@ -3083,7 +2672,7 @@ function Payment() {
|
|
3083
2672
|
onChange: (e) => handleAmount(e),
|
3084
2673
|
onBlur: handleAmountBlur
|
3085
2674
|
}
|
3086
|
-
))), /* @__PURE__ */
|
2675
|
+
))), /* @__PURE__ */ React12.createElement("div", { className: "card-row" }, /* @__PURE__ */ React12.createElement("span", { className: "visa" }), /* @__PURE__ */ React12.createElement("span", { className: "mastercard" }), /* @__PURE__ */ React12.createElement("span", { className: "amex" }), /* @__PURE__ */ React12.createElement("span", { className: "discover" }))), /* @__PURE__ */ React12.createElement(
|
3087
2676
|
"button",
|
3088
2677
|
{
|
3089
2678
|
type: "button",
|
@@ -3092,7 +2681,7 @@ function Payment() {
|
|
3092
2681
|
className: "btn btn-block btn-success submit-button"
|
3093
2682
|
},
|
3094
2683
|
"Pay"
|
3095
|
-
)), /* @__PURE__ */
|
2684
|
+
)), /* @__PURE__ */ React12.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ React12.createElement(
|
3096
2685
|
"svg",
|
3097
2686
|
{
|
3098
2687
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -3100,14 +2689,14 @@ function Payment() {
|
|
3100
2689
|
height: "20",
|
3101
2690
|
viewBox: "0 0 26 26"
|
3102
2691
|
},
|
3103
|
-
/* @__PURE__ */
|
2692
|
+
/* @__PURE__ */ React12.createElement(
|
3104
2693
|
"path",
|
3105
2694
|
{
|
3106
2695
|
fill: "currentColor",
|
3107
2696
|
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"
|
3108
2697
|
}
|
3109
2698
|
)
|
3110
|
-
), "Secure payments powered by Fractal", /* @__PURE__ */
|
2699
|
+
), "Secure payments powered by Fractal", /* @__PURE__ */ React12.createElement(
|
3111
2700
|
"img",
|
3112
2701
|
{
|
3113
2702
|
src: "https://ui.fractalpay.com/favicon.ico",
|
@@ -3119,7 +2708,7 @@ function Payment() {
|
|
3119
2708
|
}
|
3120
2709
|
|
3121
2710
|
// src/app/components/Transaction/CompletedTransactions.tsx
|
3122
|
-
import
|
2711
|
+
import React14, { useEffect as useEffect3, useState as useState8 } from "react";
|
3123
2712
|
import { Col, Row, Table } from "react-bootstrap";
|
3124
2713
|
import {
|
3125
2714
|
DatatableWrapper,
|
@@ -3133,7 +2722,7 @@ import "react-datepicker/dist/react-datepicker.css";
|
|
3133
2722
|
import { toast as toast4 } from "react-toastify";
|
3134
2723
|
|
3135
2724
|
// src/app/components/Pagination/Pagination.tsx
|
3136
|
-
import
|
2725
|
+
import React13, { useState as useState7, useEffect as useEffect2 } from "react";
|
3137
2726
|
function PaginationPg({ totalPages, onPageChange, current }) {
|
3138
2727
|
const [currentPage, setCurrentPage] = useState7(current);
|
3139
2728
|
const [showPages, setShowPages] = useState7(false);
|
@@ -3176,7 +2765,7 @@ function PaginationPg({ totalPages, onPageChange, current }) {
|
|
3176
2765
|
if (currentPage > 3) {
|
3177
2766
|
pageNumbers.push(renderPageNumber(1));
|
3178
2767
|
if (currentPage > 4) {
|
3179
|
-
pageNumbers.push(/* @__PURE__ */
|
2768
|
+
pageNumbers.push(/* @__PURE__ */ React13.createElement("li", { key: "start-break", className: "page-item disabled" }, /* @__PURE__ */ React13.createElement("span", { className: "page-link" }, "...")));
|
3180
2769
|
}
|
3181
2770
|
}
|
3182
2771
|
const startPage = Math.max(currentPage - 1, 1);
|
@@ -3186,15 +2775,15 @@ function PaginationPg({ totalPages, onPageChange, current }) {
|
|
3186
2775
|
}
|
3187
2776
|
if (currentPage < totalPages - 2) {
|
3188
2777
|
if (currentPage < totalPages - 3) {
|
3189
|
-
pageNumbers.push(/* @__PURE__ */
|
2778
|
+
pageNumbers.push(/* @__PURE__ */ React13.createElement("li", { key: "end-break", className: "page-item disabled" }, /* @__PURE__ */ React13.createElement("span", { className: "page-link" }, "...")));
|
3190
2779
|
}
|
3191
2780
|
pageNumbers.push(renderPageNumber(totalPages));
|
3192
2781
|
}
|
3193
2782
|
}
|
3194
2783
|
return pageNumbers;
|
3195
2784
|
};
|
3196
|
-
const renderPageNumber = (pageNumber) => /* @__PURE__ */
|
3197
|
-
return /* @__PURE__ */
|
2785
|
+
const renderPageNumber = (pageNumber) => /* @__PURE__ */ React13.createElement("li", { key: pageNumber, className: `page-item ${currentPage === pageNumber ? "active" : ""}` }, /* @__PURE__ */ React13.createElement("a", { className: "page-link cursor-pointer", onClick: (e) => handlePageClick(e, pageNumber) }, pageNumber));
|
2786
|
+
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement("nav", { className: "app-pagination py-2" }, /* @__PURE__ */ React13.createElement("ul", { className: "pagination justify-content-center" }, /* @__PURE__ */ React13.createElement("li", { className: `page-item ${currentPage === 1 ? "disabled" : ""}` }, /* @__PURE__ */ React13.createElement("a", { className: "page-link cursor-pointer", onClick: handlePrevious }, /* @__PURE__ */ React13.createElement("span", null, "\u2B9C"))), showPages && getPageNumbers(), /* @__PURE__ */ React13.createElement("li", { className: `page-item ${currentPage === totalPages ? "disabled" : ""}` }, /* @__PURE__ */ React13.createElement("a", { className: "page-link cursor-pointer", onClick: handleNext }, /* @__PURE__ */ React13.createElement("span", null, "\u2B9E"))))));
|
3198
2787
|
}
|
3199
2788
|
|
3200
2789
|
// src/app/components/Transaction/CompletedTransactions.tsx
|
@@ -3365,11 +2954,11 @@ function CompletedTransactions(props) {
|
|
3365
2954
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { page: pageNumber }));
|
3366
2955
|
fetchData(pageNumber, startDate, endDate);
|
3367
2956
|
};
|
3368
|
-
return /* @__PURE__ */
|
2957
|
+
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement("style", null, `
|
3369
2958
|
.react-datepicker-wrapper:first-child {
|
3370
2959
|
margin-right: 10px;
|
3371
2960
|
}
|
3372
|
-
`), /* @__PURE__ */
|
2961
|
+
`), /* @__PURE__ */ React14.createElement("div", { className: "mb-5" }, /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ React14.createElement("div", { style: { display: "flex", marginRight: "10px", marginTop: "25px" } }, /* @__PURE__ */ React14.createElement(
|
3373
2962
|
DatePicker,
|
3374
2963
|
{
|
3375
2964
|
selected: startDate,
|
@@ -3380,7 +2969,7 @@ function CompletedTransactions(props) {
|
|
3380
2969
|
placeholderText: "Start Date",
|
3381
2970
|
required: true
|
3382
2971
|
}
|
3383
|
-
), /* @__PURE__ */
|
2972
|
+
), /* @__PURE__ */ React14.createElement(
|
3384
2973
|
DatePicker,
|
3385
2974
|
{
|
3386
2975
|
selected: endDate,
|
@@ -3391,7 +2980,7 @@ function CompletedTransactions(props) {
|
|
3391
2980
|
minDate: startDate,
|
3392
2981
|
placeholderText: "End Date"
|
3393
2982
|
}
|
3394
|
-
)), /* @__PURE__ */
|
2983
|
+
)), /* @__PURE__ */ React14.createElement("button", { className: "export-btn1", onClick: handleExport }, "Export")), /* @__PURE__ */ React14.createElement(
|
3395
2984
|
DatatableWrapper,
|
3396
2985
|
{
|
3397
2986
|
body: dataList,
|
@@ -3403,15 +2992,15 @@ function CompletedTransactions(props) {
|
|
3403
2992
|
}
|
3404
2993
|
}
|
3405
2994
|
},
|
3406
|
-
/* @__PURE__ */
|
3407
|
-
/* @__PURE__ */
|
3408
|
-
/* @__PURE__ */
|
2995
|
+
/* @__PURE__ */ React14.createElement(Row, { className: "mb-4 p-2" }, /* @__PURE__ */ React14.createElement(Col, { xs: 12, sm: 6, lg: 4, className: "d-flex flex-col justify-content-lg-start align-items-center justify-content-sm-start mb-2 mb-sm-0" }, /* @__PURE__ */ React14.createElement(PaginationOptions, null)), /* @__PURE__ */ React14.createElement(Col, { xs: 12, lg: 4, className: "d-flex flex-col justify-content-end align-items-end" }), /* @__PURE__ */ React14.createElement(Col, { xs: 12, sm: 6, lg: 4, className: "d-flex flex-col justify-content-end align-items-end" }, /* @__PURE__ */ React14.createElement(Filter, null))),
|
2996
|
+
/* @__PURE__ */ React14.createElement(Row, null, /* @__PURE__ */ React14.createElement("div", { className: "responsive-tbl" }, /* @__PURE__ */ React14.createElement(Table, null, /* @__PURE__ */ React14.createElement(TableHeader, null), /* @__PURE__ */ React14.createElement(TableBody, null)))),
|
2997
|
+
/* @__PURE__ */ React14.createElement(PaginationPg, { totalPages: state.totalPage, onPageChange: handlePageChange, current: state.page })
|
3409
2998
|
))));
|
3410
2999
|
}
|
3411
3000
|
|
3412
3001
|
// src/app/components/Payment/TockenizPay.tsx
|
3413
|
-
import
|
3414
|
-
import { Modal as
|
3002
|
+
import React15, { useState as useState9 } from "react";
|
3003
|
+
import { Modal as Modal6 } from "react-bootstrap";
|
3415
3004
|
import { toast as toast5, ToastContainer as ToastContainer3 } from "react-toastify";
|
3416
3005
|
import forge2 from "node-forge";
|
3417
3006
|
import creditCardType from "credit-card-type";
|
@@ -3642,7 +3231,7 @@ function TockenizPay() {
|
|
3642
3231
|
}
|
3643
3232
|
return "";
|
3644
3233
|
}
|
3645
|
-
return /* @__PURE__ */
|
3234
|
+
return /* @__PURE__ */ React15.createElement("div", null, /* @__PURE__ */ React15.createElement(ToastContainer3, null), /* @__PURE__ */ React15.createElement(
|
3646
3235
|
"button",
|
3647
3236
|
{
|
3648
3237
|
className: "export-btn mt-4",
|
@@ -3650,8 +3239,8 @@ function TockenizPay() {
|
|
3650
3239
|
onClick: () => handlePaymentClick()
|
3651
3240
|
},
|
3652
3241
|
"TokenizePay"
|
3653
|
-
), /* @__PURE__ */
|
3654
|
-
|
3242
|
+
), /* @__PURE__ */ React15.createElement(
|
3243
|
+
Modal6,
|
3655
3244
|
{
|
3656
3245
|
show: state.show,
|
3657
3246
|
onHide: () => setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
@@ -3659,8 +3248,8 @@ function TockenizPay() {
|
|
3659
3248
|
})),
|
3660
3249
|
centered: true
|
3661
3250
|
},
|
3662
|
-
/* @__PURE__ */
|
3663
|
-
/* @__PURE__ */
|
3251
|
+
/* @__PURE__ */ React15.createElement(Modal6.Header, { closeButton: true }),
|
3252
|
+
/* @__PURE__ */ React15.createElement(Modal6.Body, null, /* @__PURE__ */ React15.createElement("div", { className: "payment-popup" }, /* @__PURE__ */ React15.createElement("div", { className: "row" }, /* @__PURE__ */ React15.createElement("div", { className: "" }, /* @__PURE__ */ React15.createElement("div", { id: "Checkout", className: "inline" }, /* @__PURE__ */ React15.createElement("div", { className: "header" }, /* @__PURE__ */ React15.createElement("h1", null, "Pay")), /* @__PURE__ */ React15.createElement("form", { id: "PaymentForm", className: "payment-form" }, /* @__PURE__ */ React15.createElement("div", { className: "form-group" }, /* @__PURE__ */ React15.createElement("label", null, "Name on card"), /* @__PURE__ */ React15.createElement(
|
3664
3253
|
"input",
|
3665
3254
|
{
|
3666
3255
|
id: "NameOnCard",
|
@@ -3669,13 +3258,13 @@ function TockenizPay() {
|
|
3669
3258
|
maxLength: 100,
|
3670
3259
|
placeholder: "Name"
|
3671
3260
|
}
|
3672
|
-
), /* @__PURE__ */
|
3261
|
+
), /* @__PURE__ */ React15.createElement(
|
3673
3262
|
"span",
|
3674
3263
|
{
|
3675
3264
|
id: "NameOnCard-error",
|
3676
3265
|
style: { color: "red", display: "none" }
|
3677
3266
|
}
|
3678
|
-
)), /* @__PURE__ */
|
3267
|
+
)), /* @__PURE__ */ React15.createElement("div", { className: "form-group" }, /* @__PURE__ */ React15.createElement(
|
3679
3268
|
"input",
|
3680
3269
|
{
|
3681
3270
|
"data-token": "card_number",
|
@@ -3686,7 +3275,7 @@ function TockenizPay() {
|
|
3686
3275
|
placeholder: "0000 0000 0000 0000",
|
3687
3276
|
onChange: handleCardNumberChange
|
3688
3277
|
}
|
3689
|
-
), state.error && /* @__PURE__ */
|
3278
|
+
), state.error && /* @__PURE__ */ React15.createElement("div", { style: { color: "red" } }, state.error)), /* @__PURE__ */ React15.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React15.createElement(
|
3690
3279
|
"input",
|
3691
3280
|
{
|
3692
3281
|
"data-token": "exp_month",
|
@@ -3697,14 +3286,14 @@ function TockenizPay() {
|
|
3697
3286
|
maxLength: 2,
|
3698
3287
|
onChange: (e) => handleMonthChange(e)
|
3699
3288
|
}
|
3700
|
-
), isValidMonth && /* @__PURE__ */
|
3289
|
+
), isValidMonth && /* @__PURE__ */ React15.createElement(
|
3701
3290
|
"span",
|
3702
3291
|
{
|
3703
3292
|
id: "card_number-error",
|
3704
3293
|
style: { color: "red", fontSize: "15px" }
|
3705
3294
|
},
|
3706
3295
|
"Please write month only 1 to 12"
|
3707
|
-
)), /* @__PURE__ */
|
3296
|
+
)), /* @__PURE__ */ React15.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React15.createElement(
|
3708
3297
|
"input",
|
3709
3298
|
{
|
3710
3299
|
"data-token": "exp_year",
|
@@ -3715,7 +3304,7 @@ function TockenizPay() {
|
|
3715
3304
|
value: state.year,
|
3716
3305
|
onChange: (e) => handleYearChange(e)
|
3717
3306
|
}
|
3718
|
-
), state.yearError && /* @__PURE__ */
|
3307
|
+
), state.yearError && /* @__PURE__ */ React15.createElement("span", { id: "exp_year-error", style: { color: "red" } }, state.yearError)), /* @__PURE__ */ React15.createElement("div", { className: "security-code-group form-group" }, /* @__PURE__ */ React15.createElement("div", { className: "input-container" }, /* @__PURE__ */ React15.createElement(
|
3719
3308
|
"input",
|
3720
3309
|
{
|
3721
3310
|
"data-token": "cvv",
|
@@ -3726,7 +3315,7 @@ function TockenizPay() {
|
|
3726
3315
|
placeholder: "CVV",
|
3727
3316
|
onChange: (e) => handleCVVChange(e)
|
3728
3317
|
}
|
3729
|
-
), /* @__PURE__ */
|
3318
|
+
), /* @__PURE__ */ React15.createElement("i", { id: "cvc", className: "fa fa-question-circle" }), state.cvvError && /* @__PURE__ */ React15.createElement("span", { id: "cvv-error", style: { color: "red" } }, state.cvvError)), /* @__PURE__ */ React15.createElement("div", { className: "cvc-preview-container two-card hide" }, /* @__PURE__ */ React15.createElement("div", { className: "amex-cvc-preview" }), /* @__PURE__ */ React15.createElement("div", { className: "visa-mc-dis-cvc-preview" }))), /* @__PURE__ */ React15.createElement("div", { className: "zip-code-group form-group" }, /* @__PURE__ */ React15.createElement("label", null, "Postal code"), /* @__PURE__ */ React15.createElement("div", { className: "input-container" }, /* @__PURE__ */ React15.createElement(
|
3730
3319
|
"input",
|
3731
3320
|
{
|
3732
3321
|
id: "ZIPCode",
|
@@ -3738,7 +3327,7 @@ function TockenizPay() {
|
|
3738
3327
|
value: state.zip,
|
3739
3328
|
onChange: (e) => handleZIP(e)
|
3740
3329
|
}
|
3741
|
-
), /* @__PURE__ */
|
3330
|
+
), /* @__PURE__ */ React15.createElement(
|
3742
3331
|
"a",
|
3743
3332
|
{
|
3744
3333
|
tabIndex: 0,
|
@@ -3748,15 +3337,15 @@ function TockenizPay() {
|
|
3748
3337
|
"data-placement": "left",
|
3749
3338
|
"data-content": "Enter the ZIP/Postal code for your credit card billing address."
|
3750
3339
|
},
|
3751
|
-
/* @__PURE__ */
|
3752
|
-
), /* @__PURE__ */
|
3340
|
+
/* @__PURE__ */ React15.createElement("i", { className: "fa fa-question-circle" })
|
3341
|
+
), /* @__PURE__ */ React15.createElement(
|
3753
3342
|
"span",
|
3754
3343
|
{
|
3755
3344
|
id: "ZIPCode-error",
|
3756
3345
|
style: { color: "red", display: "none" }
|
3757
3346
|
},
|
3758
3347
|
"This field is required"
|
3759
|
-
))), /* @__PURE__ */
|
3348
|
+
))), /* @__PURE__ */ React15.createElement("div", { className: "form-group top-amnt" }, /* @__PURE__ */ React15.createElement("div", null, /* @__PURE__ */ React15.createElement("label", null, "Payment amount"), /* @__PURE__ */ React15.createElement("div", { className: "amount-placeholder" }, /* @__PURE__ */ React15.createElement(
|
3760
3349
|
"input",
|
3761
3350
|
{
|
3762
3351
|
id: "Amount",
|
@@ -3768,7 +3357,7 @@ function TockenizPay() {
|
|
3768
3357
|
onChange: (e) => handleAmount(e),
|
3769
3358
|
onBlur: handleAmountBlur
|
3770
3359
|
}
|
3771
|
-
))), /* @__PURE__ */
|
3360
|
+
))), /* @__PURE__ */ React15.createElement("div", { className: "card-row" }, /* @__PURE__ */ React15.createElement("span", { className: "visa" }), /* @__PURE__ */ React15.createElement("span", { className: "mastercard" }), /* @__PURE__ */ React15.createElement("span", { className: "amex" }), /* @__PURE__ */ React15.createElement("span", { className: "discover" }))), /* @__PURE__ */ React15.createElement(
|
3772
3361
|
"button",
|
3773
3362
|
{
|
3774
3363
|
type: "button",
|
@@ -3777,7 +3366,7 @@ function TockenizPay() {
|
|
3777
3366
|
className: "btn btn-block btn-success submit-button"
|
3778
3367
|
},
|
3779
3368
|
"Submit"
|
3780
|
-
)), /* @__PURE__ */
|
3369
|
+
)), /* @__PURE__ */ React15.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ React15.createElement(
|
3781
3370
|
"svg",
|
3782
3371
|
{
|
3783
3372
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -3785,14 +3374,14 @@ function TockenizPay() {
|
|
3785
3374
|
height: "20",
|
3786
3375
|
viewBox: "0 0 26 26"
|
3787
3376
|
},
|
3788
|
-
/* @__PURE__ */
|
3377
|
+
/* @__PURE__ */ React15.createElement(
|
3789
3378
|
"path",
|
3790
3379
|
{
|
3791
3380
|
fill: "currentColor",
|
3792
3381
|
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"
|
3793
3382
|
}
|
3794
3383
|
)
|
3795
|
-
), "Secure payments powered by Fractal", /* @__PURE__ */
|
3384
|
+
), "Secure payments powered by Fractal", /* @__PURE__ */ React15.createElement(
|
3796
3385
|
"img",
|
3797
3386
|
{
|
3798
3387
|
src: "https://ui.fractalpay.com/favicon.ico",
|
@@ -3804,13 +3393,13 @@ function TockenizPay() {
|
|
3804
3393
|
}
|
3805
3394
|
|
3806
3395
|
// src/app/components/Payment/GetPaymentDynamic.tsx
|
3807
|
-
import
|
3808
|
-
import { Modal as
|
3396
|
+
import React17, { useEffect as useEffect4, useState as useState10 } from "react";
|
3397
|
+
import { Modal as Modal7 } from "react-bootstrap";
|
3809
3398
|
|
3810
3399
|
// src/app/components/Loader/MyLoadingAnimation.tsx
|
3811
|
-
import
|
3400
|
+
import React16 from "react";
|
3812
3401
|
function MyLoadingAnimation() {
|
3813
|
-
return /* @__PURE__ */
|
3402
|
+
return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(LoaderStyle_default, null), /* @__PURE__ */ React16.createElement("div", { className: "loading-animation" }, /* @__PURE__ */ React16.createElement("div", { className: "spinner" })));
|
3814
3403
|
}
|
3815
3404
|
|
3816
3405
|
// src/app/components/Payment/GetPaymentDynamic.tsx
|
@@ -3875,7 +3464,7 @@ function GetPaymentDynamic(props) {
|
|
3875
3464
|
window.removeEventListener("message", messageListener);
|
3876
3465
|
};
|
3877
3466
|
}, []);
|
3878
|
-
return /* @__PURE__ */
|
3467
|
+
return /* @__PURE__ */ React17.createElement("div", null, /* @__PURE__ */ React17.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Pay"), /* @__PURE__ */ React17.createElement(Modal7, { show: show && iframeLoaded, id: "modal-pay", className: "modal-lg", onHide: handleClose }, /* @__PURE__ */ React17.createElement(Modal7.Header, { closeButton: true }), /* @__PURE__ */ React17.createElement(Modal7.Body, null, loading && /* @__PURE__ */ React17.createElement(MyLoadingAnimation, null), /* @__PURE__ */ React17.createElement(
|
3879
3468
|
"iframe",
|
3880
3469
|
{
|
3881
3470
|
src: `${baseUrl}widget-form/${amount}?fractalpay_public_key=${fractalpayClientKey}&order_id=${orderID}`,
|