@pinerohit11/testwidget 0.1.62 → 0.1.64
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.js +292 -273
- package/dist/index.mjs +286 -267
- package/package.json +4 -2
package/dist/index.js
CHANGED
@@ -61,7 +61,7 @@ module.exports = __toCommonJS(index_exports);
|
|
61
61
|
|
62
62
|
// src/app/components/RequestPayment/RequestPayment.tsx
|
63
63
|
var import_bootstrap_bundle_min = require("bootstrap/dist/js/bootstrap.bundle.min.js");
|
64
|
-
var
|
64
|
+
var import_react5 = __toESM(require("react"));
|
65
65
|
|
66
66
|
// src/app/components/Loader/Loader.tsx
|
67
67
|
var import_react2 = __toESM(require("react"));
|
@@ -192,256 +192,6 @@ var Loader = (props) => {
|
|
192
192
|
};
|
193
193
|
var Loader_default = Loader;
|
194
194
|
|
195
|
-
// src/app/components/RequestPayment/RequestPaymentstyles.tsx
|
196
|
-
var import_react3 = __toESM(require("react"));
|
197
|
-
var RequestPaymentstyles = (props) => {
|
198
|
-
return /* @__PURE__ */ import_react3.default.createElement("style", null, `
|
199
|
-
.paymentBtn {
|
200
|
-
background-color: black;
|
201
|
-
border: none;
|
202
|
-
color: white;
|
203
|
-
padding: 15px 32px;
|
204
|
-
text-align: center;
|
205
|
-
text-decoration: none;
|
206
|
-
display: inline-block;
|
207
|
-
font-size: 16px;
|
208
|
-
margin: 4px 2px;
|
209
|
-
cursor: pointer;
|
210
|
-
border-radius: 180px;
|
211
|
-
/* width: auto; */
|
212
|
-
}
|
213
|
-
/*****************************************REDESIGNING STYLES **************************************/
|
214
|
-
|
215
|
-
.request-payment-amount {
|
216
|
-
color: #161616;
|
217
|
-
text-align: center;
|
218
|
-
font-family: Inter;
|
219
|
-
font-size: 42px;
|
220
|
-
font-style: normal;
|
221
|
-
font-weight: 600;
|
222
|
-
text-transform: uppercase;
|
223
|
-
margin: 8px 0px !important;
|
224
|
-
}
|
225
|
-
|
226
|
-
.request-payment-orderid {
|
227
|
-
color: #727272;
|
228
|
-
text-align: center;
|
229
|
-
font-family: Inter;
|
230
|
-
font-size: 14px;
|
231
|
-
font-style: normal;
|
232
|
-
font-weight: 500;
|
233
|
-
margin: 0px;
|
234
|
-
}
|
235
|
-
|
236
|
-
.request-payment-pre-auth-merchantname {
|
237
|
-
color: #727272;
|
238
|
-
text-align: center;
|
239
|
-
font-family: Inter;
|
240
|
-
font-size: 14px;
|
241
|
-
font-style: normal;
|
242
|
-
font-weight: 500;
|
243
|
-
margin-top: 10px !important;
|
244
|
-
margin-bottom: 0px !important;
|
245
|
-
}
|
246
|
-
|
247
|
-
.request-payment-merchantname {
|
248
|
-
color: #727272;
|
249
|
-
text-align: center;
|
250
|
-
font-family: Inter;
|
251
|
-
font-size: 14px;
|
252
|
-
font-style: normal;
|
253
|
-
font-weight: 500;
|
254
|
-
margin-top: 20px !important;
|
255
|
-
margin-bottom: 0px !important;
|
256
|
-
}
|
257
|
-
|
258
|
-
.request-payment-close-popup {
|
259
|
-
position: absolute;
|
260
|
-
right: 20px;
|
261
|
-
top: 20px;
|
262
|
-
cursor: pointer;
|
263
|
-
}
|
264
|
-
|
265
|
-
.request-payment-amount-detail {
|
266
|
-
padding: 32px 0px;
|
267
|
-
border-bottom: 1px solid #E0DFE2;
|
268
|
-
}
|
269
|
-
|
270
|
-
.request-payment-popup-container {
|
271
|
-
padding: 0px !important;
|
272
|
-
border-radius: 12px !important;
|
273
|
-
}
|
274
|
-
|
275
|
-
.request-payment-input-form {
|
276
|
-
padding: 24px 48px 32px 48px;
|
277
|
-
}
|
278
|
-
|
279
|
-
.request-payment-input-label {
|
280
|
-
color: #727272;
|
281
|
-
font-family: Inter;
|
282
|
-
font-size: 12px;
|
283
|
-
font-style: normal;
|
284
|
-
font-weight: 500;
|
285
|
-
margin-bottom: 6px !important;
|
286
|
-
text-align: start !important;
|
287
|
-
width: 100% !important;
|
288
|
-
margin-bottom: 6px !important;
|
289
|
-
text-transform: uppercase;
|
290
|
-
}
|
291
|
-
|
292
|
-
.request-payment-input-box {
|
293
|
-
border-radius: 8px;
|
294
|
-
border: 1px solid #E0DFE2;
|
295
|
-
padding: 11px;
|
296
|
-
display: block;
|
297
|
-
width: 100%;
|
298
|
-
color: #161616;
|
299
|
-
margin-top: 6px !important;
|
300
|
-
font-family: Inter;
|
301
|
-
font-size: 14px;
|
302
|
-
font-style: normal;
|
303
|
-
font-weight: 500;
|
304
|
-
}
|
305
|
-
|
306
|
-
.request-payment-list-div {
|
307
|
-
margin-bottom: 12px;
|
308
|
-
}
|
309
|
-
|
310
|
-
.request-payment-submit-button {
|
311
|
-
border-radius: 80px;
|
312
|
-
background: #161616;
|
313
|
-
height: 48px;
|
314
|
-
padding: 12px 24px;
|
315
|
-
margin-top: 20px;
|
316
|
-
color: #fff;
|
317
|
-
width: 100% !important;
|
318
|
-
border: none !important;
|
319
|
-
font-family: Inter;
|
320
|
-
font-size: 16px;
|
321
|
-
font-style: normal;
|
322
|
-
font-weight: 500;
|
323
|
-
cursor: pointer;
|
324
|
-
}
|
325
|
-
|
326
|
-
.request-payment-submit-button:disabled {
|
327
|
-
cursor: not-allowed;
|
328
|
-
}
|
329
|
-
|
330
|
-
.request-payment-fractal-powerd-by {
|
331
|
-
color: #727272;
|
332
|
-
font-family: Inter;
|
333
|
-
font-size: 14px;
|
334
|
-
font-style: normal;
|
335
|
-
font-weight: 500;
|
336
|
-
margin-top: 16px;
|
337
|
-
display: flex;
|
338
|
-
text-align: center;
|
339
|
-
align-items: center;
|
340
|
-
justify-content: center;
|
341
|
-
gap: 6px;
|
342
|
-
}
|
343
|
-
|
344
|
-
.request-payment-fractal-powerd-by span {
|
345
|
-
color: #61C699;
|
346
|
-
}
|
347
|
-
|
348
|
-
.request-payment-success-container {
|
349
|
-
display: flex;
|
350
|
-
padding: 120px 48px 32px 48px;
|
351
|
-
flex-direction: column;
|
352
|
-
justify-content: center;
|
353
|
-
align-items: center;
|
354
|
-
}
|
355
|
-
|
356
|
-
.request-payment-success-tick {
|
357
|
-
border-radius: 1000px;
|
358
|
-
background: rgba(97, 198, 153, 0.14);
|
359
|
-
display: flex;
|
360
|
-
width: 60px;
|
361
|
-
height: 60px;
|
362
|
-
justify-content: center;
|
363
|
-
align-items: center;
|
364
|
-
}
|
365
|
-
|
366
|
-
.request-payment-success-text {
|
367
|
-
color: #161616;
|
368
|
-
text-align: center;
|
369
|
-
font-family: Inter;
|
370
|
-
font-size: 32px;
|
371
|
-
font-style: normal;
|
372
|
-
font-weight: 500;
|
373
|
-
line-height: 36px;
|
374
|
-
/* 112.5% */
|
375
|
-
letter-spacing: -0.64px;
|
376
|
-
margin-top: 20px;
|
377
|
-
margin-bottom: 5px !important;
|
378
|
-
}
|
379
|
-
|
380
|
-
.request-payment-success-subtext {
|
381
|
-
color: #727272;
|
382
|
-
text-align: center;
|
383
|
-
font-family: Inter;
|
384
|
-
font-size: 14px;
|
385
|
-
font-style: normal;
|
386
|
-
font-weight: 500;
|
387
|
-
line-height: 18px;
|
388
|
-
letter-spacing: -0.28px;
|
389
|
-
margin-bottom: 6rem !important;
|
390
|
-
margin-top: 8px !important;
|
391
|
-
}
|
392
|
-
|
393
|
-
.request-payment-success-btn-div {
|
394
|
-
display: flex;
|
395
|
-
align-items: flex-start;
|
396
|
-
justify-content: center;
|
397
|
-
gap: 8px;
|
398
|
-
}
|
399
|
-
|
400
|
-
.request-payment-success-tick-div {
|
401
|
-
display: flex;
|
402
|
-
justify-content: center;
|
403
|
-
align-items: center;
|
404
|
-
margin-top: 32px;
|
405
|
-
}
|
406
|
-
|
407
|
-
.request-payment-success-btn1 {
|
408
|
-
cursor: pointer;
|
409
|
-
border-radius: 80px;
|
410
|
-
border: 1px solid #E0DFE2;
|
411
|
-
display: flex;
|
412
|
-
padding: 12px 32px;
|
413
|
-
justify-content: center;
|
414
|
-
align-items: center;
|
415
|
-
gap: 6px;
|
416
|
-
background-color: #fff;
|
417
|
-
}
|
418
|
-
|
419
|
-
.request-payment-success-btn2 {
|
420
|
-
border-radius: 80px;
|
421
|
-
cursor: pointer;
|
422
|
-
border: 1px solid #E0DFE2;
|
423
|
-
display: flex;
|
424
|
-
padding: 12px 32px;
|
425
|
-
justify-content: center;
|
426
|
-
align-items: center;
|
427
|
-
gap: 6px;
|
428
|
-
background-color: #161616;
|
429
|
-
color: #fff;
|
430
|
-
font-family: Inter;
|
431
|
-
font-size: 14px;
|
432
|
-
font-style: normal;
|
433
|
-
font-weight: 500;
|
434
|
-
}
|
435
|
-
|
436
|
-
.request-payment-error-msg{
|
437
|
-
color: #dc3545;
|
438
|
-
font-family: Inter;
|
439
|
-
font-size: 12px;
|
440
|
-
}
|
441
|
-
`);
|
442
|
-
};
|
443
|
-
var RequestPaymentstyles_default = RequestPaymentstyles;
|
444
|
-
|
445
195
|
// src/app/components/baseurl.ts
|
446
196
|
var baseUrl = "https://staging-widget.fractalpay.com/";
|
447
197
|
|
@@ -472,12 +222,12 @@ var ErrorText = {
|
|
472
222
|
};
|
473
223
|
|
474
224
|
// src/app/components/CustomModal/CustomModal2.tsx
|
475
|
-
var
|
225
|
+
var import_react4 = __toESM(require("react"));
|
476
226
|
|
477
227
|
// src/app/components/CustomModal/CustomModal2styles.tsx
|
478
|
-
var
|
228
|
+
var import_react3 = __toESM(require("react"));
|
479
229
|
var CustomModal2styles = (props) => {
|
480
|
-
return /* @__PURE__ */
|
230
|
+
return /* @__PURE__ */ import_react3.default.createElement("style", null, `
|
481
231
|
.fractal-input::placeholder {
|
482
232
|
color: #35254D;
|
483
233
|
opacity: 1;
|
@@ -720,29 +470,42 @@ var CustomModal2 = ({
|
|
720
470
|
children
|
721
471
|
}) => {
|
722
472
|
if (!open) return null;
|
723
|
-
return /* @__PURE__ */
|
473
|
+
return /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement(CustomModal2styles_default, null), /* @__PURE__ */ import_react4.default.createElement("div", { className: "fractal-popup" }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "fractal-popup-content request-payment-popup-container" }, children)));
|
724
474
|
};
|
725
475
|
var CustomModal2_default = CustomModal2;
|
726
476
|
|
727
477
|
// src/app/components/RequestPayment/RequestPayment.tsx
|
728
478
|
var import_axios = __toESM(require("axios"));
|
729
479
|
var import_react_number_format = require("react-number-format");
|
480
|
+
var import_styled_components = __toESM(require("styled-components"));
|
481
|
+
var Label = import_styled_components.default.label`
|
482
|
+
color: #727272;
|
483
|
+
font-family: Inter;
|
484
|
+
font-size: 12px;
|
485
|
+
font-style: normal;
|
486
|
+
font-weight: 500;
|
487
|
+
margin-bottom: 6px !important;
|
488
|
+
text-align: start !important;
|
489
|
+
width: 100% !important;
|
490
|
+
margin-bottom: 6px !important;
|
491
|
+
text-transform: uppercase;
|
492
|
+
`;
|
730
493
|
function RequestPayment(props) {
|
731
494
|
const fractalpayClientKey = props.fractalpayClientKey;
|
732
|
-
const [show, setShow] = (0,
|
733
|
-
const [loading, setLoading] = (0,
|
734
|
-
const [errors, setErrors] = (0,
|
735
|
-
const [phone, setPhone] = (0,
|
736
|
-
const [requestDetails, setRequestDetails] = (0,
|
495
|
+
const [show, setShow] = (0, import_react5.useState)(false);
|
496
|
+
const [loading, setLoading] = (0, import_react5.useState)(false);
|
497
|
+
const [errors, setErrors] = (0, import_react5.useState)({});
|
498
|
+
const [phone, setPhone] = (0, import_react5.useState)(null);
|
499
|
+
const [requestDetails, setRequestDetails] = (0, import_react5.useState)({
|
737
500
|
email: "",
|
738
501
|
phone_number: "",
|
739
502
|
order_id: "",
|
740
503
|
name: "",
|
741
504
|
fractalpayPublicKey: fractalpayClientKey
|
742
505
|
});
|
743
|
-
const [amount, setAmount] = (0,
|
744
|
-
const [showConfirmationModal, setShowConfirmationModal] = (0,
|
745
|
-
const [apiResponse, setApiResponse] = (0,
|
506
|
+
const [amount, setAmount] = (0, import_react5.useState)("");
|
507
|
+
const [showConfirmationModal, setShowConfirmationModal] = (0, import_react5.useState)(false);
|
508
|
+
const [apiResponse, setApiResponse] = (0, import_react5.useState)(null);
|
746
509
|
const phoneNumberRegex = (value) => /^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/.test(value);
|
747
510
|
const amoutRegex = /[+-]?([0-9]*[.])?[0-9]+/;
|
748
511
|
const isValidEmail = (value) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value);
|
@@ -858,7 +621,7 @@ function RequestPayment(props) {
|
|
858
621
|
setErrors(newErrors);
|
859
622
|
return Object.keys(newErrors).length === 0;
|
860
623
|
};
|
861
|
-
(0,
|
624
|
+
(0, import_react5.useEffect)(() => {
|
862
625
|
if (props) {
|
863
626
|
setRequestDetails((prev) => __spreadProps(__spreadValues({}, prev), {
|
864
627
|
order_id: props.orderID ? props.orderID : "",
|
@@ -895,14 +658,14 @@ function RequestPayment(props) {
|
|
895
658
|
maximumFractionDigits: 2
|
896
659
|
}).format(Number(amount2));
|
897
660
|
}
|
898
|
-
return /* @__PURE__ */
|
661
|
+
return /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, /* @__PURE__ */ import_react5.default.createElement(Loader_default, { loading }), /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, /* @__PURE__ */ import_react5.default.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Request Payment"), /* @__PURE__ */ import_react5.default.createElement(
|
899
662
|
CustomModal2_default,
|
900
663
|
{
|
901
664
|
open: show,
|
902
665
|
onClose: () => setShow(false)
|
903
666
|
},
|
904
|
-
/* @__PURE__ */
|
905
|
-
/* @__PURE__ */
|
667
|
+
/* @__PURE__ */ import_react5.default.createElement("div", { className: "request-payment-amount-detail" }, /* @__PURE__ */ import_react5.default.createElement("p", { className: "request-payment-merchantname" }, "Pay ", props == null ? void 0 : props.webname), /* @__PURE__ */ import_react5.default.createElement("p", { className: "request-payment-amount" }, formatAmount(props == null ? void 0 : props.amount)), (props == null ? void 0 : props.from) === "merchant" && /* @__PURE__ */ import_react5.default.createElement("p", { className: "request-payment-orderid" }, requestDetails == null ? void 0 : requestDetails.order_id), /* @__PURE__ */ import_react5.default.createElement("span", { className: "request-payment-close-popup", onClick: handleClose }, /* @__PURE__ */ import_react5.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ import_react5.default.createElement("g", { "clip-path": "url(#clip0_12425_52336)" }, /* @__PURE__ */ import_react5.default.createElement("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" })), /* @__PURE__ */ import_react5.default.createElement("defs", null, /* @__PURE__ */ import_react5.default.createElement("clipPath", { id: "clip0_12425_52336" }, /* @__PURE__ */ import_react5.default.createElement("rect", { width: "16", height: "16", fill: "white" })))))),
|
668
|
+
/* @__PURE__ */ import_react5.default.createElement("form", { className: "request-payment-input-form" }, /* @__PURE__ */ import_react5.default.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ import_react5.default.createElement(Label, { htmlFor: "exampleFormControlInput2", className: "request-payment-input-label" }, "FULL NAME"), /* @__PURE__ */ import_react5.default.createElement(
|
906
669
|
"input",
|
907
670
|
{
|
908
671
|
className: "request-payment-input-box",
|
@@ -912,7 +675,7 @@ function RequestPayment(props) {
|
|
912
675
|
onChange: handleChange,
|
913
676
|
value: requestDetails == null ? void 0 : requestDetails.name
|
914
677
|
}
|
915
|
-
), errors.name && /* @__PURE__ */
|
678
|
+
), errors.name && /* @__PURE__ */ import_react5.default.createElement("small", { className: "request-payment-error-msg" }, errors.name)), /* @__PURE__ */ import_react5.default.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ import_react5.default.createElement(Label, { htmlFor: "requestPhoneNumber", className: "request-payment-input-label" }, "Phone Number"), /* @__PURE__ */ import_react5.default.createElement(
|
916
679
|
import_react_number_format.PatternFormat,
|
917
680
|
{
|
918
681
|
className: "request-payment-input-box",
|
@@ -923,7 +686,7 @@ function RequestPayment(props) {
|
|
923
686
|
handlePhoneChange(e);
|
924
687
|
}
|
925
688
|
}
|
926
|
-
), errors.phone && /* @__PURE__ */
|
689
|
+
), errors.phone && /* @__PURE__ */ import_react5.default.createElement("small", { className: "request-payment-error-msg" }, errors.phone)), /* @__PURE__ */ import_react5.default.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ import_react5.default.createElement(Label, { htmlFor: "exampleFormControlInput2", className: "request-payment-input-label" }, "EMAIL"), /* @__PURE__ */ import_react5.default.createElement(
|
927
690
|
"input",
|
928
691
|
{
|
929
692
|
className: "request-payment-input-box",
|
@@ -933,7 +696,7 @@ function RequestPayment(props) {
|
|
933
696
|
"data-token": "email",
|
934
697
|
value: requestDetails == null ? void 0 : requestDetails.email
|
935
698
|
}
|
936
|
-
), errors.email && /* @__PURE__ */
|
699
|
+
), errors.email && /* @__PURE__ */ import_react5.default.createElement("small", { className: "request-payment-error-msg" }, errors.email)), /* @__PURE__ */ import_react5.default.createElement(
|
937
700
|
"button",
|
938
701
|
{
|
939
702
|
type: "button",
|
@@ -942,14 +705,14 @@ function RequestPayment(props) {
|
|
942
705
|
disabled: loading
|
943
706
|
},
|
944
707
|
loading ? "Loading..." : "Send Request"
|
945
|
-
), /* @__PURE__ */
|
946
|
-
), /* @__PURE__ */
|
708
|
+
), /* @__PURE__ */ import_react5.default.createElement("div", { className: "request-payment-fractal-powerd-by" }, /* @__PURE__ */ import_react5.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17", height: "16", viewBox: "0 0 17 16", fill: "none" }, /* @__PURE__ */ import_react5.default.createElement("path", { d: "M15.2165 4.11839C15.1973 3.69746 15.1973 3.29567 15.1973 2.89387C15.1973 2.56861 14.9486 2.31988 14.6234 2.31988C12.2317 2.31988 10.4141 1.63109 8.90257 0.157848C8.67298 -0.0526158 8.32858 -0.0526158 8.09898 0.157848C6.58748 1.63109 4.76984 2.31988 2.37821 2.31988C2.05295 2.31988 1.80422 2.56861 1.80422 2.89387C1.80422 3.29567 1.80422 3.69746 1.78508 4.11839C1.70855 8.13632 1.59375 13.6466 8.30945 15.9617L8.50078 16L8.69211 15.9617C15.3887 13.6466 15.293 8.15546 15.2165 4.11839ZM8.04159 9.6861C7.92679 9.78176 7.79286 9.83916 7.63979 9.83916H7.62066C7.46759 9.83916 7.31453 9.76263 7.21887 9.64783L5.43949 7.67713L6.30048 6.91181L7.69719 8.46158L10.7967 5.5151L11.5812 6.35695L8.04159 9.6861Z", fill: "#727272" })), "Secure payments powered by ", /* @__PURE__ */ import_react5.default.createElement("span", null, "Fractal"), /* @__PURE__ */ import_react5.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none" }, /* @__PURE__ */ import_react5.default.createElement("path", { d: "M17.4999 5.49758V7.01156C17.4999 7.05924 17.4595 7.09898 17.411 7.09898H12.3516C12.9169 6.54266 13.4781 5.99032 14.0434 5.434C14.0596 5.4181 14.0838 5.41016 14.104 5.41016H17.411C17.4595 5.41016 17.4999 5.44989 17.4999 5.49758Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M12.3462 10.9037V9.29836C12.3462 9.25067 12.3866 9.21094 12.435 9.21094H13.8523C13.929 9.21094 13.9694 9.30631 13.9129 9.35796C13.392 9.87455 12.8711 10.3911 12.3462 10.9037Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M12.4404 9.00523H15.6949C15.7434 9.00523 15.7838 8.96549 15.7838 8.91781V7.40383C15.7838 7.35614 15.7434 7.31641 15.6949 7.31641H12.4404C12.3919 7.31641 12.3516 7.35614 12.3516 7.40383V8.91781C12.3516 8.96549 12.3919 9.00523 12.4404 9.00523Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M10.1581 0.0120725L11.4906 0.77105C11.531 0.794892 11.5471 0.84655 11.5229 0.890261L8.99114 5.20173C8.78521 4.44275 8.57927 3.68775 8.37334 2.92877C8.36527 2.90493 8.3693 2.88109 8.38142 2.86122L10.0329 0.0438621C10.0612 0.000151419 10.1177 -0.0117697 10.1581 0.0120725Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M12.3382 7.10006L10.9289 6.29737C10.8886 6.27353 10.8724 6.22187 10.8966 6.17816L11.6033 4.97015C11.6436 4.9026 11.7446 4.91452 11.7648 4.99002C11.9546 5.69734 12.1484 6.40068 12.3382 7.10006Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M10.7107 6.0771L12.338 3.30345C12.3622 3.26372 12.346 3.20808 12.3057 3.18424L10.9732 2.42526C10.9328 2.40142 10.8763 2.41732 10.852 2.45705L9.22476 5.2307C9.20053 5.27044 9.21669 5.32607 9.25706 5.34991L10.5896 6.10889C10.634 6.13273 10.6865 6.11683 10.7107 6.0771Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M1.66713 3.51237L2.99963 2.75339C3.04001 2.72955 3.09654 2.74544 3.12077 2.78518L5.65251 7.09665C4.88128 6.89399 4.11408 6.69133 3.34285 6.48867C3.31862 6.4847 3.30247 6.4688 3.29036 6.44893L1.63483 3.63158C1.6106 3.58787 1.62271 3.53621 1.66713 3.51237Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M8.99793 5.20018L7.58871 5.99889C7.54833 6.02274 7.4918 6.00684 7.46757 5.9671L6.76095 4.76307C6.72057 4.69552 6.78517 4.61605 6.86189 4.63591C7.57256 4.82268 8.28726 5.00944 8.99793 5.20018Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M7.27986 6.07054L5.6526 3.2969C5.62837 3.25716 5.57588 3.24127 5.53146 3.26511L4.19896 4.02409C4.15858 4.04793 4.14243 4.09959 4.16666 4.1433L5.79392 6.91694C5.81815 6.95668 5.87064 6.97257 5.91506 6.94873L7.24756 6.18975C7.28794 6.16591 7.30409 6.11425 7.27986 6.07054Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M0.5 12.4998V10.9859C0.5 10.9382 0.540379 10.8984 0.588833 10.8984H5.64829C5.08299 11.4548 4.52172 12.0071 3.95642 12.5634C3.94027 12.5793 3.91604 12.5873 3.89585 12.5873H0.588833C0.540379 12.5873 0.5 12.5475 0.5 12.4998Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M5.65129 7.09766V8.70303C5.65129 8.75072 5.61091 8.79045 5.56246 8.79045H4.14516C4.06844 8.79045 4.02806 8.69508 4.08459 8.64343C4.60548 8.12685 5.12637 7.61424 5.65129 7.09766Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M5.55967 8.99609H2.30514C2.25669 8.99609 2.21631 9.03583 2.21631 9.08352V10.5975C2.21631 10.6452 2.25669 10.6849 2.30514 10.6849H5.55967C5.60813 10.6849 5.6485 10.6452 5.6485 10.5975V9.08352C5.6485 9.03583 5.60813 8.99609 5.55967 8.99609Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M7.82638 17.9865L6.49388 17.2276C6.4535 17.2037 6.43735 17.1521 6.46158 17.1083L8.99333 12.7969C9.19926 13.5559 9.40519 14.3109 9.61112 15.0698C9.6192 15.0937 9.61516 15.1175 9.60305 15.1374L7.95155 17.9547C7.91925 17.9985 7.86676 18.0104 7.82638 17.9865Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M5.64795 10.8984L7.05717 11.7011C7.09755 11.725 7.1137 11.7766 7.08947 11.8203L6.38284 13.0283C6.34246 13.0959 6.24152 13.084 6.22133 13.0085C6.02751 12.3012 5.83773 11.5978 5.64795 10.8984Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M7.2739 11.9258L5.64664 14.6994C5.62241 14.7392 5.63856 14.7948 5.67894 14.8187L7.01144 15.5776C7.05182 15.6015 7.10835 15.5856 7.13258 15.5458L8.75984 12.7722C8.78407 12.7325 8.76792 12.6768 8.72754 12.653L7.39504 11.894C7.35062 11.8702 7.29813 11.8861 7.2739 11.9258Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M16.3199 14.4866L14.9874 15.2456C14.947 15.2694 14.8904 15.2535 14.8662 15.2138L12.3345 10.9023C13.1057 11.105 13.8729 11.3077 14.6441 11.5103C14.6684 11.5143 14.6845 11.5302 14.6966 11.5501L16.3481 14.3674C16.3764 14.4111 16.3643 14.4628 16.3199 14.4866Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M8.99121 12.7983L10.4004 11.9956C10.4408 11.9717 10.4973 11.9876 10.5216 12.0274L11.2282 13.2354C11.2686 13.3029 11.204 13.3824 11.1272 13.3625C10.4166 13.1758 9.70188 12.989 8.99121 12.7983Z", fill: "#61C699" }), /* @__PURE__ */ import_react5.default.createElement("path", { d: "M10.7077 11.9285L12.3349 14.7021C12.3592 14.7418 12.4117 14.7577 12.4561 14.7339L13.7886 13.9749C13.829 13.9511 13.8451 13.8994 13.8209 13.8557L12.1936 11.0821C12.1694 11.0423 12.1169 11.0264 12.0725 11.0503L10.74 11.8092C10.6996 11.8331 10.6834 11.8847 10.7077 11.9285Z", fill: "#61C699" }))))
|
709
|
+
), /* @__PURE__ */ import_react5.default.createElement(
|
947
710
|
CustomModal2_default,
|
948
711
|
{
|
949
712
|
open: showConfirmationModal,
|
950
713
|
onClose: handleCloseConfirmationModal
|
951
714
|
},
|
952
|
-
/* @__PURE__ */
|
715
|
+
/* @__PURE__ */ import_react5.default.createElement("div", { className: "fractal-popup-content", style: { padding: "0px" } }, /* @__PURE__ */ import_react5.default.createElement("div", { className: "request-payment-success-container" }, /* @__PURE__ */ import_react5.default.createElement("span", { className: "request-payment-close-popup", onClick: handleCloseConfirmationModal }, /* @__PURE__ */ import_react5.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ import_react5.default.createElement("g", { "clip-path": "url(#clip0_12425_52336)" }, /* @__PURE__ */ import_react5.default.createElement("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" })), /* @__PURE__ */ import_react5.default.createElement("defs", null, /* @__PURE__ */ import_react5.default.createElement("clipPath", { id: "clip0_12425_52336" }, /* @__PURE__ */ import_react5.default.createElement("rect", { width: "16", height: "16", fill: "white" }))))), /* @__PURE__ */ import_react5.default.createElement("div", { className: "request-payment-success-tick-div" }, /* @__PURE__ */ import_react5.default.createElement("div", { className: "request-payment-success-tick" }, /* @__PURE__ */ import_react5.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ import_react5.default.createElement("path", { d: "M6.12669 13.9774C5.97396 14.131 5.76558 14.2167 5.54913 14.2167C5.33267 14.2167 5.1243 14.131 4.97157 13.9774L0.359012 9.36408C-0.119671 8.8854 -0.119671 8.10919 0.359012 7.6314L0.936573 7.05369C1.4154 6.57501 2.19072 6.57501 2.6694 7.05369L5.54913 9.93357L13.3306 2.15198C13.8094 1.6733 14.5855 1.6733 15.0634 2.15198L15.641 2.72969C16.1196 3.20837 16.1196 3.98444 15.641 4.46237L6.12669 13.9774Z", fill: "#61C699" })))), /* @__PURE__ */ import_react5.default.createElement("h6", { className: "request-payment-success-text" }, "The request ", /* @__PURE__ */ import_react5.default.createElement("br", null), "was sent"), /* @__PURE__ */ import_react5.default.createElement("h6", { className: "request-payment-success-subtext" }, "Please wait for the customer to pay"), /* @__PURE__ */ import_react5.default.createElement("div", { className: "request-payment-success-btn-div" }, /* @__PURE__ */ import_react5.default.createElement("button", { onClick: handleCloseConfirmationModal, className: "request-payment-success-btn2" }, "Close"))))
|
953
716
|
)));
|
954
717
|
}
|
955
718
|
|
@@ -958,6 +721,262 @@ var import_react7 = __toESM(require("react"));
|
|
958
721
|
var import_react_bootstrap = require("react-bootstrap");
|
959
722
|
var import_react_toastify = require("react-toastify");
|
960
723
|
var import_ReactToastify = require("react-toastify/dist/ReactToastify.css");
|
724
|
+
|
725
|
+
// src/app/components/RequestPayment/RequestPaymentstyles.tsx
|
726
|
+
var import_react6 = __toESM(require("react"));
|
727
|
+
var RequestPaymentstyles = (props) => {
|
728
|
+
return /* @__PURE__ */ import_react6.default.createElement("style", null, `
|
729
|
+
body {
|
730
|
+
font-family: 'Inter', sans-serif;
|
731
|
+
}
|
732
|
+
|
733
|
+
.paymentBtn {
|
734
|
+
background-color: black;
|
735
|
+
border: none;
|
736
|
+
color: white;
|
737
|
+
padding: 15px 32px;
|
738
|
+
text-align: center;
|
739
|
+
text-decoration: none;
|
740
|
+
display: inline-block;
|
741
|
+
font-size: 16px;
|
742
|
+
margin: 4px 2px;
|
743
|
+
cursor: pointer;
|
744
|
+
border-radius: 180px;
|
745
|
+
/* width: auto; */
|
746
|
+
}
|
747
|
+
/*****************************************REDESIGNING STYLES **************************************/
|
748
|
+
|
749
|
+
.request-payment-amount {
|
750
|
+
color: #161616;
|
751
|
+
text-align: center;
|
752
|
+
font-family: Inter;
|
753
|
+
font-size: 42px;
|
754
|
+
font-style: normal;
|
755
|
+
font-weight: 600;
|
756
|
+
text-transform: uppercase;
|
757
|
+
margin: 8px 0px !important;
|
758
|
+
}
|
759
|
+
|
760
|
+
.request-payment-orderid {
|
761
|
+
color: #727272;
|
762
|
+
text-align: center;
|
763
|
+
font-family: Inter;
|
764
|
+
font-size: 14px;
|
765
|
+
font-style: normal;
|
766
|
+
font-weight: 500;
|
767
|
+
margin: 0px;
|
768
|
+
}
|
769
|
+
|
770
|
+
.request-payment-pre-auth-merchantname {
|
771
|
+
color: #727272;
|
772
|
+
text-align: center;
|
773
|
+
font-family: Inter;
|
774
|
+
font-size: 14px;
|
775
|
+
font-style: normal;
|
776
|
+
font-weight: 500;
|
777
|
+
margin-top: 10px !important;
|
778
|
+
margin-bottom: 0px !important;
|
779
|
+
}
|
780
|
+
|
781
|
+
.request-payment-merchantname {
|
782
|
+
color: #727272;
|
783
|
+
text-align: center;
|
784
|
+
font-family: Inter;
|
785
|
+
font-size: 14px;
|
786
|
+
font-style: normal;
|
787
|
+
font-weight: 500;
|
788
|
+
margin-top: 20px !important;
|
789
|
+
margin-bottom: 0px !important;
|
790
|
+
}
|
791
|
+
|
792
|
+
.request-payment-close-popup {
|
793
|
+
position: absolute;
|
794
|
+
right: 20px;
|
795
|
+
top: 20px;
|
796
|
+
cursor: pointer;
|
797
|
+
}
|
798
|
+
|
799
|
+
.request-payment-amount-detail {
|
800
|
+
padding: 32px 0px;
|
801
|
+
border-bottom: 1px solid #E0DFE2;
|
802
|
+
}
|
803
|
+
|
804
|
+
.request-payment-popup-container {
|
805
|
+
padding: 0px !important;
|
806
|
+
border-radius: 12px !important;
|
807
|
+
}
|
808
|
+
|
809
|
+
.request-payment-input-form {
|
810
|
+
padding: 24px 48px 32px 48px;
|
811
|
+
}
|
812
|
+
|
813
|
+
.request-payment-input-label {
|
814
|
+
color: #727272;
|
815
|
+
font-family: Inter;
|
816
|
+
font-size: 12px;
|
817
|
+
font-style: normal;
|
818
|
+
font-weight: 500;
|
819
|
+
margin-bottom: 6px !important;
|
820
|
+
text-align: start !important;
|
821
|
+
width: 100% !important;
|
822
|
+
margin-bottom: 6px !important;
|
823
|
+
text-transform: uppercase;
|
824
|
+
}
|
825
|
+
|
826
|
+
.request-payment-input-box {
|
827
|
+
border-radius: 8px;
|
828
|
+
border: 1px solid #E0DFE2;
|
829
|
+
padding: 11px;
|
830
|
+
display: block;
|
831
|
+
width: 100%;
|
832
|
+
color: #161616;
|
833
|
+
margin-top: 6px !important;
|
834
|
+
font-family: Inter;
|
835
|
+
font-size: 14px;
|
836
|
+
font-style: normal;
|
837
|
+
font-weight: 500;
|
838
|
+
}
|
839
|
+
|
840
|
+
.request-payment-list-div {
|
841
|
+
margin-bottom: 12px;
|
842
|
+
}
|
843
|
+
|
844
|
+
.request-payment-submit-button {
|
845
|
+
border-radius: 80px;
|
846
|
+
background: #161616;
|
847
|
+
height: 48px;
|
848
|
+
padding: 12px 24px;
|
849
|
+
margin-top: 20px;
|
850
|
+
color: #fff;
|
851
|
+
width: 100% !important;
|
852
|
+
border: none !important;
|
853
|
+
font-family: Inter;
|
854
|
+
font-size: 16px;
|
855
|
+
font-style: normal;
|
856
|
+
font-weight: 500;
|
857
|
+
cursor: pointer;
|
858
|
+
}
|
859
|
+
|
860
|
+
.request-payment-submit-button:disabled {
|
861
|
+
cursor: not-allowed;
|
862
|
+
}
|
863
|
+
|
864
|
+
.request-payment-fractal-powerd-by {
|
865
|
+
color: #727272;
|
866
|
+
font-family: Inter;
|
867
|
+
font-size: 14px;
|
868
|
+
font-style: normal;
|
869
|
+
font-weight: 500;
|
870
|
+
margin-top: 16px;
|
871
|
+
display: flex;
|
872
|
+
text-align: center;
|
873
|
+
align-items: center;
|
874
|
+
justify-content: center;
|
875
|
+
gap: 6px;
|
876
|
+
}
|
877
|
+
|
878
|
+
.request-payment-fractal-powerd-by span {
|
879
|
+
color: #61C699;
|
880
|
+
}
|
881
|
+
|
882
|
+
.request-payment-success-container {
|
883
|
+
display: flex;
|
884
|
+
padding: 120px 48px 32px 48px;
|
885
|
+
flex-direction: column;
|
886
|
+
justify-content: center;
|
887
|
+
align-items: center;
|
888
|
+
}
|
889
|
+
|
890
|
+
.request-payment-success-tick {
|
891
|
+
border-radius: 1000px;
|
892
|
+
background: rgba(97, 198, 153, 0.14);
|
893
|
+
display: flex;
|
894
|
+
width: 60px;
|
895
|
+
height: 60px;
|
896
|
+
justify-content: center;
|
897
|
+
align-items: center;
|
898
|
+
}
|
899
|
+
|
900
|
+
.request-payment-success-text {
|
901
|
+
color: #161616;
|
902
|
+
text-align: center;
|
903
|
+
font-family: Inter;
|
904
|
+
font-size: 32px;
|
905
|
+
font-style: normal;
|
906
|
+
font-weight: 500;
|
907
|
+
line-height: 36px;
|
908
|
+
/* 112.5% */
|
909
|
+
letter-spacing: -0.64px;
|
910
|
+
margin-top: 20px;
|
911
|
+
margin-bottom: 5px !important;
|
912
|
+
}
|
913
|
+
|
914
|
+
.request-payment-success-subtext {
|
915
|
+
color: #727272;
|
916
|
+
text-align: center;
|
917
|
+
font-family: Inter;
|
918
|
+
font-size: 14px;
|
919
|
+
font-style: normal;
|
920
|
+
font-weight: 500;
|
921
|
+
line-height: 18px;
|
922
|
+
letter-spacing: -0.28px;
|
923
|
+
margin-bottom: 6rem !important;
|
924
|
+
margin-top: 8px !important;
|
925
|
+
}
|
926
|
+
|
927
|
+
.request-payment-success-btn-div {
|
928
|
+
display: flex;
|
929
|
+
align-items: flex-start;
|
930
|
+
justify-content: center;
|
931
|
+
gap: 8px;
|
932
|
+
}
|
933
|
+
|
934
|
+
.request-payment-success-tick-div {
|
935
|
+
display: flex;
|
936
|
+
justify-content: center;
|
937
|
+
align-items: center;
|
938
|
+
margin-top: 32px;
|
939
|
+
}
|
940
|
+
|
941
|
+
.request-payment-success-btn1 {
|
942
|
+
cursor: pointer;
|
943
|
+
border-radius: 80px;
|
944
|
+
border: 1px solid #E0DFE2;
|
945
|
+
display: flex;
|
946
|
+
padding: 12px 32px;
|
947
|
+
justify-content: center;
|
948
|
+
align-items: center;
|
949
|
+
gap: 6px;
|
950
|
+
background-color: #fff;
|
951
|
+
}
|
952
|
+
|
953
|
+
.request-payment-success-btn2 {
|
954
|
+
border-radius: 80px;
|
955
|
+
cursor: pointer;
|
956
|
+
border: 1px solid #E0DFE2;
|
957
|
+
display: flex;
|
958
|
+
padding: 12px 32px;
|
959
|
+
justify-content: center;
|
960
|
+
align-items: center;
|
961
|
+
gap: 6px;
|
962
|
+
background-color: #161616;
|
963
|
+
color: #fff;
|
964
|
+
font-family: Inter;
|
965
|
+
font-size: 14px;
|
966
|
+
font-style: normal;
|
967
|
+
font-weight: 500;
|
968
|
+
}
|
969
|
+
|
970
|
+
.request-payment-error-msg{
|
971
|
+
color: #dc3545;
|
972
|
+
font-family: Inter;
|
973
|
+
font-size: 12px;
|
974
|
+
}
|
975
|
+
`);
|
976
|
+
};
|
977
|
+
var RequestPaymentstyles_default = RequestPaymentstyles;
|
978
|
+
|
979
|
+
// src/app/components/RequestPayment/RequestPaymentAllInput.tsx
|
961
980
|
function RequestPaymentAllInput({ fractalpayClientKey }) {
|
962
981
|
const [isLoading, setIsLoading] = (0, import_react7.useState)(false);
|
963
982
|
const [show, setShow] = (0, import_react7.useState)(false);
|