@pinerohit11/testwidget 0.1.35 → 0.1.37

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -1,15 +1,1431 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+
1
21
  // src/app/components/RequestPayment/RequestPayment.tsx
2
- import { useState } from "react";
22
+ import React4, { useState } from "react";
3
23
  import axios from "axios";
4
24
 
5
25
  // src/app/components/Loader/Loader.tsx
6
- import React3 from "react";
26
+ import React2 from "react";
7
27
 
8
28
  // src/app/components/Loader/LoaderStyle.tsx
9
- import React2 from "react";
29
+ import React from "react";
30
+ var LoaderStyle = (props) => {
31
+ return /* @__PURE__ */ React.createElement("style", null, `
32
+ .loader {
33
+ position: fixed;
34
+ /* Fixed position to cover the viewport */
35
+ top: 0;
36
+ left: 0;
37
+ width: 100%;
38
+ height: 100%;
39
+ display: flex;
40
+ justify-content: center;
41
+ align-items: center;
42
+ /* background: rgba(255, 255, 0, 0.01); Adjust the blur effect */
43
+ background-color: rgba(255, 255, 255, 0.521);
44
+ /* Semi-transparent black background */
45
+
46
+ backdrop-filter: blur(.5px);
47
+ /* Blur effect */
48
+ z-index: 9999;
49
+ /* Ensure it's on top of other elements */
50
+ }
51
+
52
+ .lds-ellipsis {
53
+ display: inline-block;
54
+ position: relative;
55
+ width: 80px;
56
+ height: 80px;
57
+ }
58
+
59
+ .lds-ellipsis div {
60
+ position: absolute;
61
+ top: 33px;
62
+ width: 13px;
63
+ height: 13px;
64
+ border-radius: 50%;
65
+ background: #000;
66
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
67
+ }
68
+
69
+ .lds-ellipsis div:nth-child(1) {
70
+ left: 8px;
71
+ animation: lds-ellipsis1 0.6s infinite;
72
+ }
73
+
74
+ .lds-ellipsis div:nth-child(2) {
75
+ left: 8px;
76
+ animation: lds-ellipsis2 0.6s infinite;
77
+ }
78
+
79
+ .lds-ellipsis div:nth-child(3) {
80
+ left: 32px;
81
+ animation: lds-ellipsis2 0.6s infinite;
82
+ }
83
+
84
+ .lds-ellipsis div:nth-child(4) {
85
+ left: 56px;
86
+ animation: lds-ellipsis3 0.6s infinite;
87
+ }
88
+
89
+ @keyframes lds-ellipsis1 {
90
+ 0% {
91
+ transform: scale(0);
92
+ }
93
+
94
+ 100% {
95
+ transform: scale(1);
96
+ }
97
+ }
98
+
99
+ @keyframes lds-ellipsis2 {
100
+ 0% {
101
+ transform: translate(0, 0);
102
+ }
103
+
104
+ 100% {
105
+ transform: translate(24px, 0);
106
+ }
107
+ }
108
+
109
+ @keyframes lds-ellipsis3 {
110
+ 0% {
111
+ transform: scale(1);
112
+ }
113
+
114
+ 100% {
115
+ transform: scale(0);
116
+ }
117
+ }
118
+ `);
119
+ };
120
+ var LoaderStyle_default = LoaderStyle;
121
+
122
+ // src/app/components/Loader/Loader.tsx
123
+ var Loader = (props) => {
124
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(LoaderStyle_default, null), (props == null ? void 0 : props.loading) && /* @__PURE__ */ React2.createElement("div", { className: "loader" }, /* @__PURE__ */ React2.createElement("div", { className: "lds-ellipsis" }, /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement("div", null))));
125
+ };
126
+ var Loader_default = Loader;
10
127
 
11
128
  // src/app/components/RequestPayment/RequestPayment.tsx
12
129
  import { Button, Form, Modal } from "react-bootstrap";
13
130
 
14
131
  // src/app/components/RequestPayment/RequestPaymentstyles.tsx
15
- import React4 from "react";
132
+ import React3 from "react";
133
+ var RequestPaymentstyles = (props) => {
134
+ return /* @__PURE__ */ React3.createElement("style", null, `
135
+ .paymentBtn {
136
+ background-color: black;
137
+ border: none;
138
+ color: white;
139
+ padding: 15px 32px;
140
+ text-align: center;
141
+ text-decoration: none;
142
+ display: inline-block;
143
+ font-size: 16px;
144
+ margin: 4px 2px;
145
+ cursor: pointer;
146
+ border-radius: 180px;
147
+ /* width: auto; */
148
+ }
149
+ .modal-backdrop {
150
+ display: none !important;
151
+ }
152
+ /* CSS for modal */
153
+ .modal {
154
+ /* display: none; */
155
+ position: fixed;
156
+ z-index: 5555;
157
+ left: 0;
158
+ top: 0;
159
+ width: 100%;
160
+ height: 100%;
161
+ overflow: auto;
162
+ background-color: rgba(0, 0, 0, 0.4);
163
+ }
164
+
165
+ .input-container {
166
+ position: relative;
167
+ }
168
+ .error {
169
+ border: 1px solid red;
170
+ background-color: #ffe6e6; /* light red background color */
171
+ }
172
+ .form-group {
173
+ margin-bottom: 15px;
174
+ }
175
+ .input-container input {
176
+ padding-right: 25px;
177
+ }
178
+
179
+ .modal-header {
180
+ border-bottom: 0 !important;
181
+ padding-top: 0 !important;
182
+ }
183
+
184
+ /* CSS for modal content */
185
+ .modal-content {
186
+ /* height: 90vh !important; */
187
+ height: auto;
188
+ padding: 20px 5px;
189
+ /* background: #fff; */
190
+ border-radius: 20px !important;
191
+ position: relative;
192
+ width: 430px;
193
+ margin: 30px auto;
194
+ overflow: inherit !important;
195
+ }
196
+ .input-container {
197
+ display: flex;
198
+ align-items: baseline;
199
+ }
200
+
201
+ .input-error-container {
202
+ flex: 1;
203
+ }
204
+
205
+ .paymentBtn {
206
+ margin-left: 10px;
207
+ }
208
+
209
+ .PayButton {
210
+ outline: 0 !important;
211
+ height: 46px;
212
+ font-size: 16px;
213
+ background-color: #161616 !important;
214
+ border: none;
215
+ display: block;
216
+ width: 100%;
217
+ border-radius: 180px;
218
+ margin: 10px 0;
219
+ }
220
+
221
+ #PayButton:hover {
222
+ background-color: #61c699 !important;
223
+ }
224
+
225
+ #PayButton:active {
226
+ background-color: #61c699 !important;
227
+ }
228
+
229
+ #PayButton:disabled {
230
+ background: rgb(172, 44, 170) !important;
231
+ color: #fff !important;
232
+ }
233
+
234
+ label {
235
+ color: rgba(53, 37, 77, 0.6);
236
+ margin-bottom: 2px;
237
+ text-transform: uppercase;
238
+ font-family: "IBM Plex Mono", monospace;
239
+ font-weight: 500;
240
+ font-size: 12px;
241
+ }
242
+
243
+ .input-container {
244
+ position: relative;
245
+ }
246
+
247
+ .input-container input {
248
+ padding-right: 25px;
249
+ }
250
+
251
+ #Checkout {
252
+ /* z-index: 100001; */
253
+ width: 100%;
254
+ /* height: 100%; */
255
+ /* background: 0 0 #ffffff; */
256
+ border-radius: 24px;
257
+ border: 1px solid #e0dfe2;
258
+ display: block;
259
+ }
260
+
261
+ .container {
262
+ margin-top: 10px;
263
+ }
264
+
265
+ .powered-logo {
266
+ width: 18px;
267
+ height: 18px;
268
+ /* float: right; */
269
+ padding: 2px;
270
+ background: #000000;
271
+ border-radius: 4px;
272
+ /* margin-left: 5px; */
273
+ }
274
+
275
+ .modal-content .container {
276
+ width: 100%;
277
+ }
278
+
279
+ .powerd-by-part {
280
+ display: flex;
281
+ justify-content: center;
282
+ align-items: center;
283
+ gap: 5px;
284
+ }
285
+
286
+ .errorText {
287
+ color: red;
288
+ }
289
+
290
+ .input-group {
291
+ position: relative;
292
+ }
293
+
294
+ .paynowbtn {
295
+ outline: 0 !important;
296
+ padding: 7px 25px !important;
297
+ font-size: 13px;
298
+ background-color: #161616 !important;
299
+ border: #161616 1px solid !important;
300
+ color: #fff !important;
301
+ display: inline-block !important;
302
+ border-radius: 180px !important;
303
+ }
304
+
305
+ .paynowbtn:hover {
306
+ background-color: #fff !important;
307
+ border: #161616 1px solid !important;
308
+ color: #161616 !important;
309
+ }
310
+
311
+ .ButtonGroup__root.btn-group {
312
+ margin: 10px 0 20px 0;
313
+ }
314
+
315
+ .ButtonGroup__root.btn-group button {
316
+ background: #000;
317
+ border: 0;
318
+ margin: 0 5px;
319
+ border-radius: 4px !important;
320
+ }
321
+
322
+ .ButtonGroup__root.btn-group button:hover,
323
+ .ButtonGroup__root.btn-group button:focus {
324
+ background: #333 !important;
325
+ }
326
+
327
+ .input-group button {
328
+ background: #000;
329
+ border: 0;
330
+ margin: 0 5px;
331
+ border-radius: 0 4px 4px 0 !important;
332
+ }
333
+
334
+ .input-group button:hover,
335
+ .input-group button:focus {
336
+ background: #333 !important;
337
+ }
338
+
339
+ .payment-suc {
340
+ text-align: center;
341
+ }
342
+
343
+ .payment-suc .modal-dialog {
344
+ min-width: 600px;
345
+ padding: 50px 0;
346
+ }
347
+
348
+ .payment-suc h2 {
349
+ font-size: 24px;
350
+ color: #35254d;
351
+ font-weight: 500;
352
+ padding: 15px 0;
353
+ }
354
+
355
+ .payment-suc p {
356
+ font-size: 14px;
357
+ color: #9a92a6;
358
+ font-weight: 500;
359
+ }
360
+
361
+ .payment-suc .btn-close {
362
+ position: absolute;
363
+ right: 20px;
364
+ }
365
+
366
+ .Checkout.container iframe {
367
+ width: 100%;
368
+ overflow: hidden !important;
369
+ }
370
+
371
+ .responsive-tbl {
372
+ overflow-x: auto;
373
+ }
374
+ body {
375
+ position: relative !important;
376
+ }
377
+ thead,
378
+ tbody,
379
+ tfoot,
380
+ tr,
381
+ td,
382
+ th {
383
+ white-space: nowrap;
384
+ }
385
+
386
+ .button-group {
387
+ display: flex;
388
+ gap: 10px;
389
+ }
390
+ .rqstonClickbtn {
391
+ color: #fff;
392
+ background-color: #337ab7;
393
+ border-color: #2e6da4;
394
+ }
395
+ .loading-animation {
396
+ position: absolute;
397
+ top: 50%;
398
+ left: 50%;
399
+ transform: translate(-50%, -50%);
400
+ }
401
+
402
+ .spinner {
403
+ width: 40px;
404
+ height: 40px;
405
+ border-radius: 50%;
406
+ border: 4px solid #f3f3f3;
407
+ border-top: 4px solid black;
408
+ animation: spin 1s linear infinite;
409
+ }
410
+
411
+ @keyframes spin {
412
+ 0% {
413
+ transform: rotate(0deg);
414
+ }
415
+ 100% {
416
+ transform: rotate(360deg);
417
+ }
418
+ }
419
+ /* .border-container {
420
+ display: flex;
421
+ flex-direction: column;
422
+ border: 0px solid #ccc;
423
+ padding: 20px;
424
+ border-radius: 10px;
425
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
426
+ align-items: baseline;
427
+ }
428
+ .payment-container {
429
+ border: 0px solid #ccc;
430
+ padding: 20px;
431
+ border-radius: 10px;
432
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
433
+ } */
434
+
435
+ .payment-row {
436
+ display: flex;
437
+ align-items: center;
438
+ margin-bottom: 20px;
439
+ }
440
+
441
+ .payment-row label {
442
+ width: 150px;
443
+ font-weight: bold;
444
+ margin-right: 10px;
445
+ }
446
+
447
+ .payment-row input {
448
+ flex-grow: 1;
449
+ margin-right: 10px;
450
+ }
451
+
452
+ .payment-row button {
453
+ flex-grow: 1;
454
+ }
455
+ .payment-row {
456
+ display: flex;
457
+ flex-direction: column;
458
+ border-radius: 10px;
459
+ margin-top: 10px;
460
+ }
461
+
462
+ .input-wrapper {
463
+ flex: 1;
464
+ }
465
+
466
+ .button-wrapper {
467
+ margin-left: 10px;
468
+ }
469
+ .input-container {
470
+ display: flex;
471
+ flex-direction: column;
472
+ }
473
+
474
+ .export-btn1 {
475
+ background: black;
476
+ color: white;
477
+ height: 35px;
478
+ width: 68px;
479
+ border-radius: 5px;
480
+ margin-top: 20px;
481
+ }
482
+
483
+ .export-btn {
484
+ background: black;
485
+ color: white;
486
+ height: 35px;
487
+ width: 68px;
488
+ border-radius: 5px;
489
+ margin-left: 14px;
490
+ }
491
+
492
+ .payment-popup {
493
+ padding: 12px 20px;
494
+ background: #fff;
495
+ border-radius: 20px;
496
+ position: relative;
497
+ width: 100%;
498
+ margin: 0 auto;
499
+ }
500
+
501
+ .modal-content {
502
+ max-width: 420px;
503
+ margin-top: 5%;
504
+ }
505
+ @media (max-width: 460px) {
506
+ .payment-popup {
507
+ padding: 35px 25px;
508
+ width: 98%;
509
+ }
510
+ }
511
+
512
+ .close-pop {
513
+ position: absolute;
514
+ right: 8px;
515
+ top: 8px;
516
+ border: 0;
517
+ padding: 0;
518
+ background: none !important;
519
+ }
520
+
521
+ .amex {
522
+ background-image: url("../amex.svg");
523
+ }
524
+
525
+ .visa {
526
+ background-image: url("../visa.svg");
527
+ }
528
+
529
+ .mastercard {
530
+ background-image: url("../mastercard.svg");
531
+ }
532
+
533
+ .discover {
534
+ background-image: url("../discover.svg");
535
+ }
536
+
537
+ .expiry-date-group {
538
+ float: left;
539
+ width: 30%;
540
+ }
541
+
542
+ .expiry-date-group input {
543
+ width: calc(100% + 1px);
544
+ border-top-right-radius: 0;
545
+ border-bottom-right-radius: 0;
546
+ }
547
+
548
+ .expiry-date-group input:focus {
549
+ position: relative;
550
+ z-index: 10;
551
+ }
552
+
553
+ .security-code-group {
554
+ float: right;
555
+ width: 40%;
556
+ position: relative;
557
+ }
558
+
559
+ .security-code-group input {
560
+ border-top-left-radius: 0;
561
+ border-bottom-left-radius: 0;
562
+ }
563
+
564
+ .zip-code-group {
565
+ clear: both;
566
+ }
567
+
568
+ #submitButton {
569
+ outline: 0 !important;
570
+ height: 46px;
571
+ font-size: 16px;
572
+ background-color: #161616 !important;
573
+ border: none;
574
+ display: block;
575
+ width: 100%;
576
+ border-radius: 180px;
577
+ }
578
+ #submitRequestButton {
579
+ outline: 0 !important;
580
+ height: 46px;
581
+ font-size: 16px;
582
+ background-color: #161616 !important;
583
+ border: none;
584
+ display: block;
585
+ width: 100%;
586
+ border-radius: 180px;
587
+ }
588
+ #PayButton {
589
+ outline: 0 !important;
590
+ height: 46px;
591
+ font-size: 16px;
592
+ background-color: #161616 !important;
593
+ border: none;
594
+ display: block;
595
+ width: 100%;
596
+ border-radius: 180px;
597
+ }
598
+
599
+ #PayButton:hover {
600
+ background-color: #61c699 !important;
601
+ }
602
+
603
+ #PayButton:active {
604
+ background-color: #61c699 !important;
605
+ }
606
+
607
+ #PayButton:disabled {
608
+ background: rgb(172, 44, 170) !important;
609
+ color: #fff !important;
610
+ }
611
+
612
+ .form-control {
613
+ color: #35254d;
614
+ }
615
+
616
+ .container {
617
+ margin-top: 10px;
618
+ }
619
+
620
+ #Checkout {
621
+ z-index: 100001;
622
+ width: 100%;
623
+ height: 100%;
624
+ min-height: 100%;
625
+ background: 0 0 #ffffff;
626
+ border-radius: 24px;
627
+ border: 1px solid #e0dfe2;
628
+ margin-left: auto;
629
+ margin-right: auto;
630
+ display: block;
631
+ }
632
+
633
+ #Checkout .header {
634
+ display: flex;
635
+ /* Enables Flexbox */
636
+ justify-content: center;
637
+ /* Centers content horizontally */
638
+ align-items: center;
639
+ /* Centers content vertically */
640
+ text-align: center;
641
+ padding: 8px;
642
+ border-bottom: 1px solid #dedede;
643
+ margin: 0 10px 20px 10px;
644
+ }
645
+
646
+ #Checkout .header button {
647
+ border: 0;
648
+ background: none;
649
+ padding: 0;
650
+ }
651
+
652
+ #Checkout h1 {
653
+ margin: 0;
654
+ flex: 1;
655
+ padding: 10px;
656
+ /* Allows the title to grow and fill the space for centering */
657
+ font-size: 23px;
658
+ font-weight: 500;
659
+ color: #35254d;
660
+ align-items: start;
661
+ display: flex;
662
+ }
663
+
664
+ #Checkout > form {
665
+ margin: 0 25px 10px 25px;
666
+ }
667
+
668
+ label {
669
+ color: rgba(53, 37, 77, 0.6);
670
+ margin-bottom: 2px;
671
+ text-transform: uppercase;
672
+ font-family: "IBM Plex Mono", monospace;
673
+ font-weight: 500;
674
+ font-size: 12px;
675
+ }
676
+
677
+ .input-container {
678
+ position: relative;
679
+ }
680
+
681
+ .input-container input {
682
+ padding-right: 25px;
683
+ }
684
+
685
+ #zipcode {
686
+ text-transform: capitalize !important;
687
+ }
688
+
689
+ #zipcode {
690
+ width: 18px;
691
+ position: absolute;
692
+ right: 8px;
693
+ top: 9px;
694
+ }
695
+
696
+ #zipcode .zip-tip {
697
+ display: none;
698
+ background-color: rgb(0, 0, 0, 0.4);
699
+ padding: 5px 8px;
700
+ border-radius: 6px;
701
+ position: absolute;
702
+ right: 26px;
703
+ top: -9px;
704
+ font-size: 12.5px;
705
+ text-transform: capitalize !important;
706
+ color: #fff;
707
+ width: 240px;
708
+ line-height: 16px;
709
+ }
710
+
711
+ #zipcode .zip-tip:before {
712
+ width: 0;
713
+ height: 0;
714
+ border-top: 7px solid transparent;
715
+ border-bottom: 7px solid transparent;
716
+ border-left: 7px solid #000;
717
+ opacity: 0.4;
718
+ position: absolute;
719
+ right: -7px;
720
+ top: 50%;
721
+ transform: translateY(-50%);
722
+ content: "";
723
+ }
724
+
725
+ #zipcode:hover .zip-tip {
726
+ display: block;
727
+ }
728
+
729
+ .input-container > i,
730
+ a[role="button"] {
731
+ color: #d3d3d3;
732
+ width: 25px;
733
+ height: 30px;
734
+ line-height: 30px;
735
+ font-size: 16px;
736
+ position: absolute;
737
+ top: 5px;
738
+ right: 6px;
739
+ cursor: pointer;
740
+ text-align: center;
741
+ }
742
+
743
+ .input-container > i:hover,
744
+ a[role="button"]:hover {
745
+ color: #777;
746
+ }
747
+
748
+ .amount-placeholder {
749
+ white-space: nowrap;
750
+ font-size: 44px;
751
+ /* height: 35px; */
752
+ font-weight: 600;
753
+ line-height: 40px;
754
+ }
755
+
756
+ .amount-placeholder > button {
757
+ float: right;
758
+ width: 60px;
759
+ }
760
+
761
+ .amount-placeholder > span {
762
+ line-height: 34px;
763
+ }
764
+
765
+ .top-amnt {
766
+ display: flex;
767
+ margin-bottom: 10px;
768
+ align-items: center;
769
+ justify-content: space-between;
770
+ }
771
+
772
+ .amtleft {
773
+ text-align: center;
774
+ }
775
+
776
+ .amtleft span {
777
+ color: #35254d;
778
+ margin: 0 -5px;
779
+ }
780
+
781
+ .card-row {
782
+ text-align: right;
783
+ margin: 22px 0 0 0;
784
+ max-width: 85px;
785
+ line-height: 20px;
786
+ }
787
+
788
+ .yer {
789
+ border-radius: 0;
790
+ }
791
+
792
+ .card-row span {
793
+ width: 33px;
794
+ height: 21px;
795
+ margin: 0 2px;
796
+ background-repeat: no-repeat;
797
+ display: inline-block;
798
+ background-size: contain;
799
+ }
800
+
801
+ .card-image {
802
+ background-repeat: no-repeat;
803
+ padding-right: 50px;
804
+ background-position: right 2px center;
805
+ background-size: auto 90%;
806
+ }
807
+
808
+ /* .cvc-preview-container {
809
+ overflow: hidden;
810
+ } */
811
+
812
+ .cvc-preview-container {
813
+ /* overflow: hidden; */
814
+ position: absolute;
815
+ z-index: 9999;
816
+ right: -71px;
817
+ top: -54px;
818
+ width: 165px;
819
+ border-radius: 5px;
820
+ padding: 5px;
821
+ background-color: rgb(0, 0, 0, 0.3);
822
+ display: none;
823
+ }
824
+
825
+ .cvc-preview-container:before {
826
+ position: absolute;
827
+ left: 50%;
828
+ transform: translate(-50%);
829
+ bottom: -5px;
830
+ width: 0;
831
+ height: 0;
832
+ border-left: 5px solid transparent;
833
+ border-right: 5px solid transparent;
834
+ border-top: 5px solid #000;
835
+ opacity: 0.3;
836
+ content: "";
837
+ }
838
+
839
+ .security-code-group #cvc:hover .cvc-preview-container {
840
+ display: block;
841
+ }
842
+
843
+ .cvc-preview-container.two-card div {
844
+ width: 50%;
845
+ height: 45px;
846
+ }
847
+
848
+ .cvc-preview-container.two-card div.amex-cvc-preview {
849
+ float: right;
850
+ }
851
+
852
+ .cvc-preview-container.two-card div.visa-mc-dis-cvc-preview {
853
+ float: left;
854
+ }
855
+
856
+ /* .cvc-preview-container div {
857
+ height: 160px;
858
+ } */
859
+
860
+ .amex-cvc-preview {
861
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOYAAACOCAYAAAAlzXSMAAAAAXNSR0IArs4c6QAAFg9JREFUeNrtnfeTFcXaxw+ZBZacM0oGySBIXECiSBQQAQFhJaclo+SgAsuS2QVBlrCLSlQBAVGCCpK5XiW4vFVvvXX/gPvDe9+qt+r2Pd9eeuiZ6TkBzuI563erPgVn5jk93T397X76mTndPl+Qv0+v3I/PuHW/MiEkMkBTvnD/3vr883wZdx6NyriX9XXmvax/Zt57LAghkSbrn9AYtAbNBRTlwTuP22Tce/wbK42QFwc0B+0ZRXno9h8D/Ab/YkUR8qeI81/QoE2U++8+apF59/H/soII+RPxaxBaVLrMk3k36yYrhpBoEGfWTWjSl3H30ZusEEKiyK31a9IvzMfprAxCokmYj9N9B289/Acrg5DoAZr0Zdz54/9ZGYRE0Yjp16SPFUFI9EFhEkJhEkIoTEIoTEIIhUkIhUkIoTAJoTBZCYRQmIQQCpMQCpMQQmESQmESQihMQihMEsFfn2eJTad+ENvP/8z6iEIO3flDpHx9QWw5c1kcuv0o4vYxJcx1R06LPHnzSuJLlhLp13832jVt38myA/O27radT0pJtZ1v1qGLda5VQnfbOROVatay7Nt072W0KRRXRJSuUFG07NJNLE//wnb9es1bSZvqdeq78p588rxo0q6D/L7P55PEFYsXvUeOFXt/vudZN598eSqkumnbo4+0yV+goPyO83zF6jXl+b6jxwe8F60SXg9eTzWy62lx2n6RN18+eaxByzay09HTavJaR+s7i9PSjfWK7xcoVEiWrU6T5mL6J5uN5fK6Dy06dxPLPjts+86rr/cOWobyVavZvoOy4PoFCxe27g/y1q5nX5HyzfeueoJ93aYtXPbIL4SaK4SJxqkKByav3mC0e6VtB5td73fG2M73HD7adh4NQ53DDdTPmahQrYatgQazhwhWZxy3voMbheNVX65jy9f0jzfZbqATNJJdl26a68ZfRt12yhpz3aAxKhvkwykSXAPn+owaF/BeoMMJWk9Vq1v2nfsPto6/v/wj6/iMdVus4x3fGGAdb921R9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ZRJqxUwAAAAASUVORK5CYII=")
862
+ center center/contain no-repeat;
863
+ }
864
+
865
+ .visa-mc-dis-cvc-preview {
866
+ 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=")
867
+ center center/contain no-repeat;
868
+ }
869
+
870
+ .submit-button-lock {
871
+ height: 15px;
872
+ margin-top: -2px;
873
+ margin-right: 7px;
874
+ vertical-align: middle;
875
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAgCAMAAAA7dZg3AAAKQWlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUU9kWh8+9N73QEiIgJfQaegkg0jtIFQRRiUmAUAKGhCZ2RAVGFBEpVmRUwAFHhyJjRRQLg4Ji1wnyEFDGwVFEReXdjGsJ7601896a/cdZ39nnt9fZZ+9917oAUPyCBMJ0WAGANKFYFO7rwVwSE8vE9wIYEAEOWAHA4WZmBEf4RALU/L09mZmoSMaz9u4ugGS72yy/UCZz1v9/kSI3QyQGAApF1TY8fiYX5QKUU7PFGTL/BMr0lSkyhjEyFqEJoqwi48SvbPan5iu7yZiXJuShGlnOGbw0noy7UN6aJeGjjAShXJgl4GejfAdlvVRJmgDl9yjT0/icTAAw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qeVMrvRfuXflBNeTu4f7kufGK+eN8V34ZfyRBJeEsoTRRJfEXYljSa5JFUnjAk9BteB1sl/ygeSplJCUoykzqdGpzWmEtPi000IlYYqwK10zPSe9L8M0ozBDuspp1e5VE6JA0ZFMKHNZZruYjv5M9UiMJJslg1kLs2qy3mdHZZ/KUcwR5vTkmuRuyx3J88n7fjVmNXd1Z752/ob8wTXuaw6thdauXNu5Tnddwbrh9b7rj20gbUjZ8MtGy41lG99uit7UUaBRsL5gaLPv5sZCuUJR4b0tzlsObMVsFWzt3WazrWrblyJe0fViy+KK4k8l3JLr31l9V/ndzPaE7b2l9qX7d+B2CHfc3em681iZYlle2dCu4F2t5czyovK3u1fsvlZhW3FgD2mPZI+0MqiyvUqvakfVp+qk6oEaj5rmvep7t+2d2sfb17/fbX/TAY0DxQc+HhQcvH/I91BrrUFtxWHc4azDz+ui6rq/Z39ff0TtSPGRz0eFR6XHwo911TvU1zeoN5Q2wo2SxrHjccdv/eD1Q3sTq+lQM6O5+AQ4ITnx4sf4H++eDDzZeYp9qukn/Z/2ttBailqh1tzWibakNml7THvf6YDTnR3OHS0/m/989Iz2mZqzymdLz5HOFZybOZ93fvJCxoXxi4kXhzpXdD66tOTSna6wrt7LgZevXvG5cqnbvfv8VZerZ645XTt9nX297Yb9jdYeu56WX+x+aem172296XCz/ZbjrY6+BX3n+l37L972un3ljv+dGwOLBvruLr57/17cPel93v3RB6kPXj/Mejj9aP1j7OOiJwpPKp6qP6391fjXZqm99Oyg12DPs4hnj4a4Qy//lfmvT8MFz6nPK0a0RupHrUfPjPmM3Xqx9MXwy4yX0+OFvyn+tveV0auffnf7vWdiycTwa9HrmT9K3qi+OfrW9m3nZOjk03dp76anit6rvj/2gf2h+2P0x5Hp7E/4T5WfjT93fAn88ngmbWbm3/eE8/syOll+AAAAYFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////98JRy6AAAAH3RSTlMAAgYMEyIzOUpTVFViY3N2gJmcnaipq7fX3ebx+Pn8eTEuDQAAAI9JREFUKM/N0UkOglAQRdFHDyK90n64+9+lAyQgookjuaNKTlJJpaQlO2n6sW8SW/uCjrku2EloWDLhi3gDa4O3pTtA5Tt+BXDbiDsBmSQpAyZ3pRhoLUmS1QLxSilQPOcCSFfKgfxgPgfZ9ch7Y21LCcdd5wVH5SckEzkXc0ylpPJnMpETmX/d9eUpH1/5AKrsQVrz7YPBAAAAAElFTkSuQmCC")
876
+ center center/contain no-repeat;
877
+ width: 14px;
878
+ display: inline-block;
879
+ }
880
+
881
+ .align-middle {
882
+ vertical-align: middle;
883
+ }
884
+
885
+ input {
886
+ box-shadow: none !important;
887
+ }
888
+
889
+ .powerd-by-part {
890
+ display: flex;
891
+ font-size: 12px;
892
+ text-align: center;
893
+ align-items: center;
894
+ justify-content: center;
895
+ margin: 5px 0 20px 0;
896
+ }
897
+
898
+ .powered-logo {
899
+ width: 18px;
900
+ height: auto;
901
+ float: right;
902
+ padding: 2px;
903
+ background: #000000;
904
+ border-radius: 4px;
905
+ margin-left: 5px;
906
+ }
907
+
908
+ .comp-name {
909
+ display: block;
910
+ margin-bottom: 8px;
911
+ }
912
+
913
+ .client-logo {
914
+ max-width: 140px;
915
+ display: block;
916
+ margin: auto;
917
+ padding: 5px;
918
+ }
919
+
920
+ #qrCode {
921
+ text-align: center;
922
+ }
923
+
924
+ #qrIcon {
925
+ cursor: pointer;
926
+ border: 1px solid rgb(252, 252, 252);
927
+ padding: 10px;
928
+ border-radius: 5px;
929
+ background: #ffffff;
930
+ }
931
+
932
+ #target {
933
+ display: none;
934
+ text-align: center;
935
+ transition: all 5s;
936
+ padding: 5px;
937
+ transition: max-height 0.5s, overflow 0.5s 0.5s;
938
+ }
939
+
940
+ /* input:focus {
941
+ border-color: #acc6db !important;
942
+ background-color: #acc6db !important;
943
+ } */
944
+
945
+ `);
946
+ };
947
+ var RequestPaymentstyles_default = RequestPaymentstyles;
948
+
949
+ // src/app/components/RequestPayment/RequestPayment.tsx
950
+ function RequestPayment(props) {
951
+ const fractalpayClientKey = props.fractalpayClientKey;
952
+ const masterBaseUrl = "https://testapi.fractalpay.com/";
953
+ const baseUrl = "https://staging-widget.fractalpay.com/";
954
+ const [show, setShow] = useState(false);
955
+ const [loading, setLoading] = useState(false);
956
+ const [errors, setErrors] = useState({});
957
+ const [requestDetails, setRequestDetails] = useState({
958
+ email: "",
959
+ amount: "",
960
+ phone_number: "",
961
+ order_id: "",
962
+ name: "",
963
+ fractalpayPublicKey: fractalpayClientKey
964
+ });
965
+ const [showConfirmationModal, setShowConfirmationModal] = useState(false);
966
+ const phoneNumberRegex = (value) => /^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/.test(value);
967
+ const amountRegex = /[+-]?([0-9]*[.])?[0-9]+/;
968
+ const isValidEmail = (value) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value);
969
+ const isAlpha = (value) => /^[A-Za-z\s]*$/.test(value);
970
+ const handleClose = () => {
971
+ setShow(false);
972
+ emptyFields();
973
+ setErrors({});
974
+ };
975
+ const handleShow = () => setShow(true);
976
+ const handleCloseConfirmationModal = () => setShowConfirmationModal(false);
977
+ const emptyFields = () => {
978
+ setRequestDetails({
979
+ email: "",
980
+ amount: "",
981
+ phone_number: "",
982
+ order_id: "",
983
+ name: "",
984
+ fractalpayPublicKey: fractalpayClientKey
985
+ });
986
+ };
987
+ const handleSubmit = (event) => {
988
+ const message = {
989
+ type: "preview.compiledcheck",
990
+ other: __spreadProps(__spreadValues({}, event), { status: true })
991
+ };
992
+ console.log("message: ", message);
993
+ window.parent.postMessage(message, "*");
994
+ };
995
+ const sendRequestPayment = async () => {
996
+ setErrors({});
997
+ if (!(requestDetails == null ? void 0 : requestDetails.email) && requestDetails.phone_number && !phoneNumberRegex(requestDetails.phone_number)) {
998
+ setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
999
+ phone_number: "Phone number should be 10 digits"
1000
+ }));
1001
+ return;
1002
+ }
1003
+ if (!validateForm()) {
1004
+ return;
1005
+ }
1006
+ try {
1007
+ setLoading(true);
1008
+ const formData = {
1009
+ fractalpayPublicKey: fractalpayClientKey,
1010
+ amount: requestDetails.amount,
1011
+ phone_number: requestDetails.phone_number,
1012
+ order_id: requestDetails.order_id,
1013
+ action: "request",
1014
+ name: requestDetails.name,
1015
+ email: requestDetails.email
1016
+ };
1017
+ let response = await axios.post(`${baseUrl}create-widget-order`, formData);
1018
+ if ((response == null ? void 0 : response.status) === 200) {
1019
+ setShowConfirmationModal(true);
1020
+ setShow(false);
1021
+ emptyFields();
1022
+ handleSubmit(response == null ? void 0 : response.data);
1023
+ }
1024
+ console.log(response == null ? void 0 : response.data);
1025
+ setLoading(false);
1026
+ } catch (error) {
1027
+ console.log(error);
1028
+ setLoading(false);
1029
+ }
1030
+ };
1031
+ const validateAmount = (amount) => {
1032
+ return amountRegex.test(amount);
1033
+ };
1034
+ const handleChange = (e) => {
1035
+ const { value } = e.target;
1036
+ const token = e.target.dataset.token;
1037
+ setRequestDetails(__spreadProps(__spreadValues({}, requestDetails), { [token]: value }));
1038
+ if (token === "name" && !isAlpha(value)) {
1039
+ setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
1040
+ [token]: "Only letters are allowed"
1041
+ }));
1042
+ return;
1043
+ }
1044
+ if (token === "phone_number" && !phoneNumberRegex(value)) {
1045
+ setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
1046
+ [token]: "Phone number should be 10 digits"
1047
+ }));
1048
+ return;
1049
+ }
1050
+ if (token === "email" && !isValidEmail(value)) {
1051
+ setErrors((prevErrors) => __spreadProps(__spreadValues({}, prevErrors), {
1052
+ email: "Invalid email format"
1053
+ }));
1054
+ return;
1055
+ }
1056
+ if (value) {
1057
+ setErrors(__spreadProps(__spreadValues({}, errors), { [token]: "" }));
1058
+ }
1059
+ };
1060
+ const handleAmountBlur = () => {
1061
+ const value = requestDetails.amount;
1062
+ if (value && !value.includes(".")) {
1063
+ setRequestDetails((prev) => __spreadProps(__spreadValues({}, prev), {
1064
+ amount: `${value}.00`
1065
+ }));
1066
+ }
1067
+ };
1068
+ const validateForm = () => {
1069
+ let newErrors = {};
1070
+ if (!requestDetails.name) newErrors.name = "Full Name is required";
1071
+ if (!requestDetails.amount) newErrors.amount = "Amount is required";
1072
+ if (!requestDetails.phone_number && !(requestDetails == null ? void 0 : requestDetails.email)) newErrors.phone_number = "Phone or Email is required";
1073
+ if (!requestDetails.email && !requestDetails.phone_number) newErrors.email = "Phone or Email is required";
1074
+ if (!requestDetails.phone_number && requestDetails.email && !isValidEmail(requestDetails == null ? void 0 : requestDetails.email)) newErrors.email = "Invalid email";
1075
+ setErrors(newErrors);
1076
+ return Object.keys(newErrors).length === 0;
1077
+ };
1078
+ return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ React4.createElement(Loader_default, { loading }), /* @__PURE__ */ React4.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Request Payment"), /* @__PURE__ */ React4.createElement(Modal, { show, onHide: handleClose }, /* @__PURE__ */ React4.createElement(Modal.Header, { closeButton: true }, /* @__PURE__ */ React4.createElement(Modal.Title, null, "Request Payment")), /* @__PURE__ */ React4.createElement(Modal.Body, { id: "Checkout" }, /* @__PURE__ */ React4.createElement(Form, null, /* @__PURE__ */ React4.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React4.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "FULL NAME *"), /* @__PURE__ */ React4.createElement(
1079
+ "input",
1080
+ {
1081
+ className: "form-control",
1082
+ type: "text",
1083
+ placeholder: "Full Name",
1084
+ "data-token": "name",
1085
+ onChange: handleChange
1086
+ }
1087
+ ), errors.name && /* @__PURE__ */ React4.createElement("small", { className: "text-danger" }, errors.name)), /* @__PURE__ */ React4.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React4.createElement("label", { htmlFor: "requestPhoneNumber", className: "form-label" }, "Phone Number"), /* @__PURE__ */ React4.createElement(
1088
+ "input",
1089
+ {
1090
+ maxLength: 10,
1091
+ className: "form-control",
1092
+ onChange: (e) => {
1093
+ handleChange(e);
1094
+ },
1095
+ placeholder: "Phone Number",
1096
+ type: "text",
1097
+ "data-token": "phone_number"
1098
+ }
1099
+ ), errors.phone_number && /* @__PURE__ */ React4.createElement("small", { className: "text-danger" }, errors.phone_number)), /* @__PURE__ */ React4.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React4.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "EMAIL"), /* @__PURE__ */ React4.createElement(
1100
+ "input",
1101
+ {
1102
+ className: "form-control",
1103
+ type: "text",
1104
+ placeholder: "Email",
1105
+ onChange: handleChange,
1106
+ "data-token": "email"
1107
+ }
1108
+ ), errors.email && /* @__PURE__ */ React4.createElement("small", { className: "text-danger" }, errors.email)), /* @__PURE__ */ React4.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React4.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "AMOUNT *"), /* @__PURE__ */ React4.createElement("div", { className: "input-group" }, /* @__PURE__ */ React4.createElement("span", { className: "input-group-text" }, "$"), /* @__PURE__ */ React4.createElement(
1109
+ "input",
1110
+ {
1111
+ "data-token": "amount",
1112
+ type: "number",
1113
+ className: "form-control",
1114
+ value: requestDetails.amount,
1115
+ onChange: handleChange,
1116
+ onBlur: handleAmountBlur
1117
+ }
1118
+ )), errors.amount && /* @__PURE__ */ React4.createElement("small", { className: "text-danger" }, errors.amount)), /* @__PURE__ */ React4.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React4.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "ORDER ID"), /* @__PURE__ */ React4.createElement(
1119
+ "input",
1120
+ {
1121
+ className: "form-control",
1122
+ type: "text",
1123
+ placeholder: "Order Id",
1124
+ onChange: handleChange,
1125
+ "data-token": "order_id"
1126
+ }
1127
+ ), errors.order_id && /* @__PURE__ */ React4.createElement("small", { className: "text-danger" }, errors.order_id)), /* @__PURE__ */ React4.createElement(
1128
+ Button,
1129
+ {
1130
+ type: "button",
1131
+ className: "PayButton",
1132
+ onClick: sendRequestPayment,
1133
+ disabled: loading
1134
+ },
1135
+ loading ? "Loading..." : "Send Request"
1136
+ )), /* @__PURE__ */ React4.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ React4.createElement(
1137
+ "svg",
1138
+ {
1139
+ xmlns: "http://www.w3.org/2000/svg",
1140
+ width: "20",
1141
+ height: "20",
1142
+ viewBox: "0 0 26 26"
1143
+ },
1144
+ /* @__PURE__ */ React4.createElement(
1145
+ "path",
1146
+ {
1147
+ fill: "currentColor",
1148
+ 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"
1149
+ }
1150
+ )
1151
+ ), "Secure payments powered by Fractal", /* @__PURE__ */ React4.createElement(
1152
+ "img",
1153
+ {
1154
+ src: "https://ui.fractalpay.com/favicon.ico",
1155
+ alt: "Fractal logo",
1156
+ className: "powered-logo"
1157
+ }
1158
+ )))), /* @__PURE__ */ React4.createElement(
1159
+ Modal,
1160
+ {
1161
+ className: "payment-suc",
1162
+ show: showConfirmationModal,
1163
+ onHide: handleCloseConfirmationModal
1164
+ },
1165
+ /* @__PURE__ */ React4.createElement(Modal.Header, { closeButton: true }),
1166
+ /* @__PURE__ */ React4.createElement(Modal.Body, null, /* @__PURE__ */ React4.createElement(
1167
+ "svg",
1168
+ {
1169
+ width: "60",
1170
+ height: "60",
1171
+ viewBox: "0 0 60 60",
1172
+ fill: "none",
1173
+ xmlns: "http://www.w3.org/2000/svg"
1174
+ },
1175
+ /* @__PURE__ */ React4.createElement(
1176
+ "rect",
1177
+ {
1178
+ x: "0.5",
1179
+ y: "0.5",
1180
+ width: "59",
1181
+ height: "59",
1182
+ rx: "29.5",
1183
+ stroke: "#31B379"
1184
+ }
1185
+ ),
1186
+ /* @__PURE__ */ React4.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ React4.createElement(
1187
+ "path",
1188
+ {
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",
1190
+ fill: "#31B379"
1191
+ }
1192
+ )),
1193
+ /* @__PURE__ */ React4.createElement("defs", null, /* @__PURE__ */ React4.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React4.createElement(
1194
+ "rect",
1195
+ {
1196
+ width: "22",
1197
+ height: "22",
1198
+ fill: "white",
1199
+ transform: "translate(19.5 19.0039)"
1200
+ }
1201
+ )))
1202
+ ), /* @__PURE__ */ React4.createElement("h2", null, "Payment link has been ", /* @__PURE__ */ React4.createElement("br", null), " sent successfully"))
1203
+ ));
1204
+ }
1205
+
1206
+ // src/app/components/Greet.tsx
1207
+ import axios2 from "axios";
1208
+ import React5, { useEffect, useState as useState2 } from "react";
1209
+ import "bootstrap/dist/css/bootstrap.min.css";
1210
+ function PaywithFractal({ name, amount, orderId, fractalPayClientKey }) {
1211
+ const baseUrl = "http://192.168.1.52:8082/";
1212
+ const masterBaseUrl = "http://192.168.1.52:8081/";
1213
+ console.log(name, "name", window == null ? void 0 : window.DatacapWebToken);
1214
+ const [dcToken, setDcToken] = useState2("");
1215
+ const [error, setError] = useState2({});
1216
+ const [toggleQr, setToggleQr] = useState2(false);
1217
+ const [formData, setFormData] = useState2({
1218
+ name: "John Doe",
1219
+ card_number: "4761 7310 0000 0043",
1220
+ exp_month: "12",
1221
+ exp_year: "2024",
1222
+ cvv: "201",
1223
+ zip: ""
1224
+ });
1225
+ const [loading, setLoading] = useState2(false);
1226
+ const [show, setShow] = useState2(false);
1227
+ const handleSubmit = async (e) => {
1228
+ var _a, _b, _c, _d, _e, _f, _g;
1229
+ e.preventDefault();
1230
+ const data = {
1231
+ description: "widget payment",
1232
+ amount: amount || "1.00",
1233
+ phone_number: "1234567908",
1234
+ zip: formData.zip,
1235
+ orderId: orderId || "",
1236
+ fractalpayPublicKey: fractalPayClientKey
1237
+ };
1238
+ if (Object.keys(error).length < 1) {
1239
+ try {
1240
+ setLoading(true);
1241
+ const res = await axios2.post(`${baseUrl}create-widget-order`, data, {
1242
+ headers: {
1243
+ "Content-Type": "application/json"
1244
+ }
1245
+ });
1246
+ if (res.data && ((_a = res.data) == null ? void 0 : _a.result)) {
1247
+ console.log("token", (_b = res.data) == null ? void 0 : _b.data);
1248
+ setDcToken((_d = (_c = res.data) == null ? void 0 : _c.data) == null ? void 0 : _d.dctoken);
1249
+ const tokenCallback = async (response) => {
1250
+ var _a2, _b2, _c2;
1251
+ console.log("response for token call back", response);
1252
+ if (response.Error) {
1253
+ alert("if");
1254
+ console.log("Error: ", response);
1255
+ setLoading(false);
1256
+ } else {
1257
+ const headers = {
1258
+ "Content-Type": "application/x-www-form-urlencoded"
1259
+ };
1260
+ const quickData = __spreadValues({
1261
+ name: formData.name,
1262
+ postal_code: formData.zip
1263
+ }, response);
1264
+ try {
1265
+ const resp = await axios2.post(`${masterBaseUrl}quick-pay/${(_b2 = (_a2 = res.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.posSalesIdEncode}`, quickData, {
1266
+ headers
1267
+ });
1268
+ setLoading(false);
1269
+ console.log("quick response", resp);
1270
+ if (((_c2 = resp == null ? void 0 : resp.data) == null ? void 0 : _c2.result) && (resp == null ? void 0 : resp.status) === 200) {
1271
+ console.log("Payment success!", resp == null ? void 0 : resp.data);
1272
+ setFormData({
1273
+ name: "John Doe",
1274
+ card_number: "4761 7310 0000 0043",
1275
+ exp_month: "12",
1276
+ exp_year: "2024",
1277
+ cvv: "201",
1278
+ zip: ""
1279
+ });
1280
+ } else {
1281
+ console.log("Payment failed!", resp == null ? void 0 : resp.data);
1282
+ }
1283
+ } catch (error2) {
1284
+ console.log("Error: ", error2);
1285
+ setLoading(false);
1286
+ }
1287
+ }
1288
+ };
1289
+ window == null ? void 0 : window.DatacapWebToken.requestToken((_f = (_e = res.data) == null ? void 0 : _e.data) == null ? void 0 : _f.dctoken, "PaymentForm", tokenCallback);
1290
+ } else {
1291
+ setLoading(false);
1292
+ console.log("res", (_g = res.data) == null ? void 0 : _g.data);
1293
+ }
1294
+ } catch (error2) {
1295
+ setLoading(false);
1296
+ console.log(error2);
1297
+ }
1298
+ }
1299
+ };
1300
+ const handleCardFormat = (numericValue) => {
1301
+ const cleaned = ("" + numericValue).replace(/\D/g, "");
1302
+ const match = cleaned.match(/^(\d{4})(\d{4})(\d{4})(\d{4})$/);
1303
+ if (match) {
1304
+ return `${match[1]} ${match[2]} ${match[3]} ${match[4]}`;
1305
+ }
1306
+ return numericValue;
1307
+ };
1308
+ const handleCardNumberChange = (value) => {
1309
+ setError((prev) => __spreadProps(__spreadValues({}, prev), { card_number: "" }));
1310
+ if (value && value.match(/[a-zA-Z]/)) {
1311
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
1312
+ card_number: "Invalid input. Please enter only numbers."
1313
+ }));
1314
+ } else if (value.length > 12 && !(window == null ? void 0 : window.DatacapWebToken.validateCardNumber(value == null ? void 0 : value.replaceAll(" ", "")))) {
1315
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
1316
+ card_number: "Invalid Card Number"
1317
+ }));
1318
+ } else if (!value.length) {
1319
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
1320
+ card_number: "Card Number required"
1321
+ }));
1322
+ } else {
1323
+ setError({});
1324
+ }
1325
+ };
1326
+ const handleMonthChange = (value) => {
1327
+ setError((prev) => __spreadProps(__spreadValues({}, prev), { exp_month: "" }));
1328
+ if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 1 && parseInt(value, 10) <= 12)) {
1329
+ setError({});
1330
+ } else if (!value.length) {
1331
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
1332
+ exp_month: "Month is required"
1333
+ }));
1334
+ } else {
1335
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
1336
+ exp_month: "Value should be between 1 and 12"
1337
+ }));
1338
+ }
1339
+ };
1340
+ const handleYearChange = (value) => {
1341
+ setError((prev) => __spreadProps(__spreadValues({}, prev), { exp_year: "" }));
1342
+ if (window == null ? void 0 : window.DatacapWebToken.validateExpirationDate(formData.exp_month, value)) {
1343
+ setError({});
1344
+ } else if (!value.length) {
1345
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
1346
+ exp_year: "Year is required"
1347
+ }));
1348
+ } else {
1349
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
1350
+ exp_year: "Invalid Expiration Date."
1351
+ }));
1352
+ }
1353
+ };
1354
+ const handleCVVChange = (value) => {
1355
+ setError((prev) => __spreadProps(__spreadValues({}, prev), { cvv: "" }));
1356
+ if (window == null ? void 0 : window.DatacapWebToken.validateCVV(value)) {
1357
+ setError({});
1358
+ } else if (!value.length) {
1359
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
1360
+ cvv: "CVV is required"
1361
+ }));
1362
+ } else {
1363
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
1364
+ cvv: "Invalid CVV."
1365
+ }));
1366
+ }
1367
+ };
1368
+ const handleChange = (e) => {
1369
+ const token = e.target.getAttribute("data-token") || "";
1370
+ const value = e.target.value;
1371
+ setFormData((prev) => __spreadProps(__spreadValues({}, prev), { [token]: value }));
1372
+ if (token === "card_number") {
1373
+ handleCardNumberChange(value);
1374
+ }
1375
+ if (token === "exp_month") {
1376
+ handleMonthChange(value);
1377
+ }
1378
+ if (token === "exp_year") {
1379
+ handleYearChange(value);
1380
+ }
1381
+ if (token === "cvv") {
1382
+ handleCVVChange(value);
1383
+ }
1384
+ };
1385
+ useEffect(() => {
1386
+ const scriptId = "my-script";
1387
+ const existingScript = document.getElementById(scriptId);
1388
+ if (!existingScript) {
1389
+ const script = document.createElement("script");
1390
+ script.src = "https://token-cert.dcap.com/v1/client";
1391
+ script.id = scriptId;
1392
+ script.async = true;
1393
+ script.onload = () => {
1394
+ if (typeof window !== "undefined" && window.DatacapWebToken) {
1395
+ console.log("DatacapWebToken", window.DatacapWebToken);
1396
+ } else {
1397
+ console.log("DatacapWebToken is not loaded yet.");
1398
+ }
1399
+ };
1400
+ document.head.appendChild(script);
1401
+ }
1402
+ return () => {
1403
+ const script = document.getElementById(scriptId);
1404
+ if (script) {
1405
+ document.head.removeChild(script);
1406
+ }
1407
+ };
1408
+ }, []);
1409
+ useEffect(() => {
1410
+ const link = document.createElement("link");
1411
+ link.rel = "stylesheet";
1412
+ link.href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css";
1413
+ document.head.appendChild(link);
1414
+ return () => {
1415
+ document.head.removeChild(link);
1416
+ };
1417
+ }, []);
1418
+ const handleClose = () => {
1419
+ setShow(false);
1420
+ };
1421
+ const handleOpen = () => {
1422
+ console.log("open");
1423
+ setShow(true);
1424
+ };
1425
+ console.log(show, "open");
1426
+ return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Loader_default, { loading: true }));
1427
+ }
1428
+ export {
1429
+ PaywithFractal,
1430
+ RequestPayment
1431
+ };