@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.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 React5, { useState, useEffect } from "react";
|
24
24
|
|
25
25
|
// src/app/components/Loader/Loader.tsx
|
26
26
|
import React2 from "react";
|
@@ -151,256 +151,6 @@ var Loader = (props) => {
|
|
151
151
|
};
|
152
152
|
var Loader_default = Loader;
|
153
153
|
|
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 **************************************/
|
173
|
-
|
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;
|
183
|
-
}
|
184
|
-
|
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;
|
193
|
-
}
|
194
|
-
|
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;
|
204
|
-
}
|
205
|
-
|
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;
|
215
|
-
}
|
216
|
-
|
217
|
-
.request-payment-close-popup {
|
218
|
-
position: absolute;
|
219
|
-
right: 20px;
|
220
|
-
top: 20px;
|
221
|
-
cursor: pointer;
|
222
|
-
}
|
223
|
-
|
224
|
-
.request-payment-amount-detail {
|
225
|
-
padding: 32px 0px;
|
226
|
-
border-bottom: 1px solid #E0DFE2;
|
227
|
-
}
|
228
|
-
|
229
|
-
.request-payment-popup-container {
|
230
|
-
padding: 0px !important;
|
231
|
-
border-radius: 12px !important;
|
232
|
-
}
|
233
|
-
|
234
|
-
.request-payment-input-form {
|
235
|
-
padding: 24px 48px 32px 48px;
|
236
|
-
}
|
237
|
-
|
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;
|
249
|
-
}
|
250
|
-
|
251
|
-
.request-payment-input-box {
|
252
|
-
border-radius: 8px;
|
253
|
-
border: 1px solid #E0DFE2;
|
254
|
-
padding: 11px;
|
255
|
-
display: block;
|
256
|
-
width: 100%;
|
257
|
-
color: #161616;
|
258
|
-
margin-top: 6px !important;
|
259
|
-
font-family: Inter;
|
260
|
-
font-size: 14px;
|
261
|
-
font-style: normal;
|
262
|
-
font-weight: 500;
|
263
|
-
}
|
264
|
-
|
265
|
-
.request-payment-list-div {
|
266
|
-
margin-bottom: 12px;
|
267
|
-
}
|
268
|
-
|
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;
|
283
|
-
}
|
284
|
-
|
285
|
-
.request-payment-submit-button:disabled {
|
286
|
-
cursor: not-allowed;
|
287
|
-
}
|
288
|
-
|
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;
|
301
|
-
}
|
302
|
-
|
303
|
-
.request-payment-fractal-powerd-by span {
|
304
|
-
color: #61C699;
|
305
|
-
}
|
306
|
-
|
307
|
-
.request-payment-success-container {
|
308
|
-
display: flex;
|
309
|
-
padding: 120px 48px 32px 48px;
|
310
|
-
flex-direction: column;
|
311
|
-
justify-content: center;
|
312
|
-
align-items: center;
|
313
|
-
}
|
314
|
-
|
315
|
-
.request-payment-success-tick {
|
316
|
-
border-radius: 1000px;
|
317
|
-
background: rgba(97, 198, 153, 0.14);
|
318
|
-
display: flex;
|
319
|
-
width: 60px;
|
320
|
-
height: 60px;
|
321
|
-
justify-content: center;
|
322
|
-
align-items: center;
|
323
|
-
}
|
324
|
-
|
325
|
-
.request-payment-success-text {
|
326
|
-
color: #161616;
|
327
|
-
text-align: center;
|
328
|
-
font-family: Inter;
|
329
|
-
font-size: 32px;
|
330
|
-
font-style: normal;
|
331
|
-
font-weight: 500;
|
332
|
-
line-height: 36px;
|
333
|
-
/* 112.5% */
|
334
|
-
letter-spacing: -0.64px;
|
335
|
-
margin-top: 20px;
|
336
|
-
margin-bottom: 5px !important;
|
337
|
-
}
|
338
|
-
|
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;
|
350
|
-
}
|
351
|
-
|
352
|
-
.request-payment-success-btn-div {
|
353
|
-
display: flex;
|
354
|
-
align-items: flex-start;
|
355
|
-
justify-content: center;
|
356
|
-
gap: 8px;
|
357
|
-
}
|
358
|
-
|
359
|
-
.request-payment-success-tick-div {
|
360
|
-
display: flex;
|
361
|
-
justify-content: center;
|
362
|
-
align-items: center;
|
363
|
-
margin-top: 32px;
|
364
|
-
}
|
365
|
-
|
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;
|
376
|
-
}
|
377
|
-
|
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;
|
388
|
-
color: #fff;
|
389
|
-
font-family: Inter;
|
390
|
-
font-size: 14px;
|
391
|
-
font-style: normal;
|
392
|
-
font-weight: 500;
|
393
|
-
}
|
394
|
-
|
395
|
-
.request-payment-error-msg{
|
396
|
-
color: #dc3545;
|
397
|
-
font-family: Inter;
|
398
|
-
font-size: 12px;
|
399
|
-
}
|
400
|
-
`);
|
401
|
-
};
|
402
|
-
var RequestPaymentstyles_default = RequestPaymentstyles;
|
403
|
-
|
404
154
|
// src/app/components/baseurl.ts
|
405
155
|
var baseUrl = "https://staging-widget.fractalpay.com/";
|
406
156
|
|
@@ -431,12 +181,12 @@ var ErrorText = {
|
|
431
181
|
};
|
432
182
|
|
433
183
|
// src/app/components/CustomModal/CustomModal2.tsx
|
434
|
-
import
|
184
|
+
import React4 from "react";
|
435
185
|
|
436
186
|
// src/app/components/CustomModal/CustomModal2styles.tsx
|
437
|
-
import
|
187
|
+
import React3 from "react";
|
438
188
|
var CustomModal2styles = (props) => {
|
439
|
-
return /* @__PURE__ */
|
189
|
+
return /* @__PURE__ */ React3.createElement("style", null, `
|
440
190
|
.fractal-input::placeholder {
|
441
191
|
color: #35254D;
|
442
192
|
opacity: 1;
|
@@ -679,15 +429,28 @@ var CustomModal2 = ({
|
|
679
429
|
children
|
680
430
|
}) => {
|
681
431
|
if (!open) return null;
|
682
|
-
return /* @__PURE__ */
|
432
|
+
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(CustomModal2styles_default, null), /* @__PURE__ */ React4.createElement("div", { className: "fractal-popup" }, /* @__PURE__ */ React4.createElement("div", { className: "fractal-popup-content request-payment-popup-container" }, children)));
|
683
433
|
};
|
684
434
|
var CustomModal2_default = CustomModal2;
|
685
435
|
|
686
436
|
// src/app/components/RequestPayment/RequestPayment.tsx
|
687
437
|
import axios from "axios";
|
688
438
|
import { PatternFormat } from "react-number-format";
|
689
|
-
|
690
|
-
|
439
|
+
import styled from "styled-components";
|
440
|
+
var Label = styled.label`
|
441
|
+
color: #727272;
|
442
|
+
font-family: Inter;
|
443
|
+
font-size: 12px;
|
444
|
+
font-style: normal;
|
445
|
+
font-weight: 500;
|
446
|
+
margin-bottom: 6px !important;
|
447
|
+
text-align: start !important;
|
448
|
+
width: 100% !important;
|
449
|
+
margin-bottom: 6px !important;
|
450
|
+
text-transform: uppercase;
|
451
|
+
`;
|
452
|
+
function RequestPayment(props) {
|
453
|
+
const fractalpayClientKey = props.fractalpayClientKey;
|
691
454
|
const [show, setShow] = useState(false);
|
692
455
|
const [loading, setLoading] = useState(false);
|
693
456
|
const [errors, setErrors] = useState({});
|
@@ -700,7 +463,7 @@ function RequestPayment(props) {
|
|
700
463
|
fractalpayPublicKey: fractalpayClientKey
|
701
464
|
});
|
702
465
|
const [amount, setAmount] = useState("");
|
703
|
-
const [showConfirmationModal, setShowConfirmationModal] = useState(
|
466
|
+
const [showConfirmationModal, setShowConfirmationModal] = useState(false);
|
704
467
|
const [apiResponse, setApiResponse] = useState(null);
|
705
468
|
const phoneNumberRegex = (value) => /^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/.test(value);
|
706
469
|
const amoutRegex = /[+-]?([0-9]*[.])?[0-9]+/;
|
@@ -854,14 +617,14 @@ function RequestPayment(props) {
|
|
854
617
|
maximumFractionDigits: 2
|
855
618
|
}).format(Number(amount2));
|
856
619
|
}
|
857
|
-
return /* @__PURE__ */
|
620
|
+
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Loader_default, { loading }), /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Request Payment"), /* @__PURE__ */ React5.createElement(
|
858
621
|
CustomModal2_default,
|
859
622
|
{
|
860
623
|
open: show,
|
861
624
|
onClose: () => setShow(false)
|
862
625
|
},
|
863
|
-
/* @__PURE__ */
|
864
|
-
/* @__PURE__ */
|
626
|
+
/* @__PURE__ */ React5.createElement("div", { className: "request-payment-amount-detail" }, /* @__PURE__ */ React5.createElement("p", { className: "request-payment-merchantname" }, "Pay ", props == null ? void 0 : props.webname), /* @__PURE__ */ React5.createElement("p", { className: "request-payment-amount" }, formatAmount(props == null ? void 0 : props.amount)), (props == null ? void 0 : props.from) === "merchant" && /* @__PURE__ */ React5.createElement("p", { className: "request-payment-orderid" }, requestDetails == null ? void 0 : requestDetails.order_id), /* @__PURE__ */ React5.createElement("span", { className: "request-payment-close-popup", onClick: handleClose }, /* @__PURE__ */ React5.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React5.createElement("g", { "clip-path": "url(#clip0_12425_52336)" }, /* @__PURE__ */ React5.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__ */ React5.createElement("defs", null, /* @__PURE__ */ React5.createElement("clipPath", { id: "clip0_12425_52336" }, /* @__PURE__ */ React5.createElement("rect", { width: "16", height: "16", fill: "white" })))))),
|
627
|
+
/* @__PURE__ */ React5.createElement("form", { className: "request-payment-input-form" }, /* @__PURE__ */ React5.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ React5.createElement(Label, { htmlFor: "exampleFormControlInput2", className: "request-payment-input-label" }, "FULL NAME"), /* @__PURE__ */ React5.createElement(
|
865
628
|
"input",
|
866
629
|
{
|
867
630
|
className: "request-payment-input-box",
|
@@ -871,7 +634,7 @@ function RequestPayment(props) {
|
|
871
634
|
onChange: handleChange,
|
872
635
|
value: requestDetails == null ? void 0 : requestDetails.name
|
873
636
|
}
|
874
|
-
), errors.name && /* @__PURE__ */
|
637
|
+
), errors.name && /* @__PURE__ */ React5.createElement("small", { className: "request-payment-error-msg" }, errors.name)), /* @__PURE__ */ React5.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ React5.createElement(Label, { htmlFor: "requestPhoneNumber", className: "request-payment-input-label" }, "Phone Number"), /* @__PURE__ */ React5.createElement(
|
875
638
|
PatternFormat,
|
876
639
|
{
|
877
640
|
className: "request-payment-input-box",
|
@@ -882,7 +645,7 @@ function RequestPayment(props) {
|
|
882
645
|
handlePhoneChange(e);
|
883
646
|
}
|
884
647
|
}
|
885
|
-
), errors.phone && /* @__PURE__ */
|
648
|
+
), errors.phone && /* @__PURE__ */ React5.createElement("small", { className: "request-payment-error-msg" }, errors.phone)), /* @__PURE__ */ React5.createElement("div", { className: "request-payment-list-div" }, /* @__PURE__ */ React5.createElement(Label, { htmlFor: "exampleFormControlInput2", className: "request-payment-input-label" }, "EMAIL"), /* @__PURE__ */ React5.createElement(
|
886
649
|
"input",
|
887
650
|
{
|
888
651
|
className: "request-payment-input-box",
|
@@ -892,7 +655,7 @@ function RequestPayment(props) {
|
|
892
655
|
"data-token": "email",
|
893
656
|
value: requestDetails == null ? void 0 : requestDetails.email
|
894
657
|
}
|
895
|
-
), errors.email && /* @__PURE__ */
|
658
|
+
), errors.email && /* @__PURE__ */ React5.createElement("small", { className: "request-payment-error-msg" }, errors.email)), /* @__PURE__ */ React5.createElement(
|
896
659
|
"button",
|
897
660
|
{
|
898
661
|
type: "button",
|
@@ -901,14 +664,14 @@ function RequestPayment(props) {
|
|
901
664
|
disabled: loading
|
902
665
|
},
|
903
666
|
loading ? "Loading..." : "Send Request"
|
904
|
-
), /* @__PURE__ */
|
905
|
-
), /* @__PURE__ */
|
667
|
+
), /* @__PURE__ */ React5.createElement("div", { className: "request-payment-fractal-powerd-by" }, /* @__PURE__ */ React5.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17", height: "16", viewBox: "0 0 17 16", fill: "none" }, /* @__PURE__ */ React5.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__ */ React5.createElement("span", null, "Fractal"), /* @__PURE__ */ React5.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none" }, /* @__PURE__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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__ */ React5.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" }))))
|
668
|
+
), /* @__PURE__ */ React5.createElement(
|
906
669
|
CustomModal2_default,
|
907
670
|
{
|
908
671
|
open: showConfirmationModal,
|
909
672
|
onClose: handleCloseConfirmationModal
|
910
673
|
},
|
911
|
-
/* @__PURE__ */
|
674
|
+
/* @__PURE__ */ React5.createElement("div", { className: "fractal-popup-content", style: { padding: "0px" } }, /* @__PURE__ */ React5.createElement("div", { className: "request-payment-success-container" }, /* @__PURE__ */ React5.createElement("span", { className: "request-payment-close-popup", onClick: handleCloseConfirmationModal }, /* @__PURE__ */ React5.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React5.createElement("g", { "clip-path": "url(#clip0_12425_52336)" }, /* @__PURE__ */ React5.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__ */ React5.createElement("defs", null, /* @__PURE__ */ React5.createElement("clipPath", { id: "clip0_12425_52336" }, /* @__PURE__ */ React5.createElement("rect", { width: "16", height: "16", fill: "white" }))))), /* @__PURE__ */ React5.createElement("div", { className: "request-payment-success-tick-div" }, /* @__PURE__ */ React5.createElement("div", { className: "request-payment-success-tick" }, /* @__PURE__ */ React5.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React5.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__ */ React5.createElement("h6", { className: "request-payment-success-text" }, "The request ", /* @__PURE__ */ React5.createElement("br", null), "was sent"), /* @__PURE__ */ React5.createElement("h6", { className: "request-payment-success-subtext" }, "Please wait for the customer to pay"), /* @__PURE__ */ React5.createElement("div", { className: "request-payment-success-btn-div" }, /* @__PURE__ */ React5.createElement("button", { onClick: handleCloseConfirmationModal, className: "request-payment-success-btn2" }, "Close"))))
|
912
675
|
)));
|
913
676
|
}
|
914
677
|
|
@@ -917,6 +680,262 @@ import React7, { useState as useState2 } from "react";
|
|
917
680
|
import { Modal } from "react-bootstrap";
|
918
681
|
import { toast, ToastContainer } from "react-toastify";
|
919
682
|
import "react-toastify/dist/ReactToastify.css";
|
683
|
+
|
684
|
+
// src/app/components/RequestPayment/RequestPaymentstyles.tsx
|
685
|
+
import React6 from "react";
|
686
|
+
var RequestPaymentstyles = (props) => {
|
687
|
+
return /* @__PURE__ */ React6.createElement("style", null, `
|
688
|
+
body {
|
689
|
+
font-family: 'Inter', sans-serif;
|
690
|
+
}
|
691
|
+
|
692
|
+
.paymentBtn {
|
693
|
+
background-color: black;
|
694
|
+
border: none;
|
695
|
+
color: white;
|
696
|
+
padding: 15px 32px;
|
697
|
+
text-align: center;
|
698
|
+
text-decoration: none;
|
699
|
+
display: inline-block;
|
700
|
+
font-size: 16px;
|
701
|
+
margin: 4px 2px;
|
702
|
+
cursor: pointer;
|
703
|
+
border-radius: 180px;
|
704
|
+
/* width: auto; */
|
705
|
+
}
|
706
|
+
/*****************************************REDESIGNING STYLES **************************************/
|
707
|
+
|
708
|
+
.request-payment-amount {
|
709
|
+
color: #161616;
|
710
|
+
text-align: center;
|
711
|
+
font-family: Inter;
|
712
|
+
font-size: 42px;
|
713
|
+
font-style: normal;
|
714
|
+
font-weight: 600;
|
715
|
+
text-transform: uppercase;
|
716
|
+
margin: 8px 0px !important;
|
717
|
+
}
|
718
|
+
|
719
|
+
.request-payment-orderid {
|
720
|
+
color: #727272;
|
721
|
+
text-align: center;
|
722
|
+
font-family: Inter;
|
723
|
+
font-size: 14px;
|
724
|
+
font-style: normal;
|
725
|
+
font-weight: 500;
|
726
|
+
margin: 0px;
|
727
|
+
}
|
728
|
+
|
729
|
+
.request-payment-pre-auth-merchantname {
|
730
|
+
color: #727272;
|
731
|
+
text-align: center;
|
732
|
+
font-family: Inter;
|
733
|
+
font-size: 14px;
|
734
|
+
font-style: normal;
|
735
|
+
font-weight: 500;
|
736
|
+
margin-top: 10px !important;
|
737
|
+
margin-bottom: 0px !important;
|
738
|
+
}
|
739
|
+
|
740
|
+
.request-payment-merchantname {
|
741
|
+
color: #727272;
|
742
|
+
text-align: center;
|
743
|
+
font-family: Inter;
|
744
|
+
font-size: 14px;
|
745
|
+
font-style: normal;
|
746
|
+
font-weight: 500;
|
747
|
+
margin-top: 20px !important;
|
748
|
+
margin-bottom: 0px !important;
|
749
|
+
}
|
750
|
+
|
751
|
+
.request-payment-close-popup {
|
752
|
+
position: absolute;
|
753
|
+
right: 20px;
|
754
|
+
top: 20px;
|
755
|
+
cursor: pointer;
|
756
|
+
}
|
757
|
+
|
758
|
+
.request-payment-amount-detail {
|
759
|
+
padding: 32px 0px;
|
760
|
+
border-bottom: 1px solid #E0DFE2;
|
761
|
+
}
|
762
|
+
|
763
|
+
.request-payment-popup-container {
|
764
|
+
padding: 0px !important;
|
765
|
+
border-radius: 12px !important;
|
766
|
+
}
|
767
|
+
|
768
|
+
.request-payment-input-form {
|
769
|
+
padding: 24px 48px 32px 48px;
|
770
|
+
}
|
771
|
+
|
772
|
+
.request-payment-input-label {
|
773
|
+
color: #727272;
|
774
|
+
font-family: Inter;
|
775
|
+
font-size: 12px;
|
776
|
+
font-style: normal;
|
777
|
+
font-weight: 500;
|
778
|
+
margin-bottom: 6px !important;
|
779
|
+
text-align: start !important;
|
780
|
+
width: 100% !important;
|
781
|
+
margin-bottom: 6px !important;
|
782
|
+
text-transform: uppercase;
|
783
|
+
}
|
784
|
+
|
785
|
+
.request-payment-input-box {
|
786
|
+
border-radius: 8px;
|
787
|
+
border: 1px solid #E0DFE2;
|
788
|
+
padding: 11px;
|
789
|
+
display: block;
|
790
|
+
width: 100%;
|
791
|
+
color: #161616;
|
792
|
+
margin-top: 6px !important;
|
793
|
+
font-family: Inter;
|
794
|
+
font-size: 14px;
|
795
|
+
font-style: normal;
|
796
|
+
font-weight: 500;
|
797
|
+
}
|
798
|
+
|
799
|
+
.request-payment-list-div {
|
800
|
+
margin-bottom: 12px;
|
801
|
+
}
|
802
|
+
|
803
|
+
.request-payment-submit-button {
|
804
|
+
border-radius: 80px;
|
805
|
+
background: #161616;
|
806
|
+
height: 48px;
|
807
|
+
padding: 12px 24px;
|
808
|
+
margin-top: 20px;
|
809
|
+
color: #fff;
|
810
|
+
width: 100% !important;
|
811
|
+
border: none !important;
|
812
|
+
font-family: Inter;
|
813
|
+
font-size: 16px;
|
814
|
+
font-style: normal;
|
815
|
+
font-weight: 500;
|
816
|
+
cursor: pointer;
|
817
|
+
}
|
818
|
+
|
819
|
+
.request-payment-submit-button:disabled {
|
820
|
+
cursor: not-allowed;
|
821
|
+
}
|
822
|
+
|
823
|
+
.request-payment-fractal-powerd-by {
|
824
|
+
color: #727272;
|
825
|
+
font-family: Inter;
|
826
|
+
font-size: 14px;
|
827
|
+
font-style: normal;
|
828
|
+
font-weight: 500;
|
829
|
+
margin-top: 16px;
|
830
|
+
display: flex;
|
831
|
+
text-align: center;
|
832
|
+
align-items: center;
|
833
|
+
justify-content: center;
|
834
|
+
gap: 6px;
|
835
|
+
}
|
836
|
+
|
837
|
+
.request-payment-fractal-powerd-by span {
|
838
|
+
color: #61C699;
|
839
|
+
}
|
840
|
+
|
841
|
+
.request-payment-success-container {
|
842
|
+
display: flex;
|
843
|
+
padding: 120px 48px 32px 48px;
|
844
|
+
flex-direction: column;
|
845
|
+
justify-content: center;
|
846
|
+
align-items: center;
|
847
|
+
}
|
848
|
+
|
849
|
+
.request-payment-success-tick {
|
850
|
+
border-radius: 1000px;
|
851
|
+
background: rgba(97, 198, 153, 0.14);
|
852
|
+
display: flex;
|
853
|
+
width: 60px;
|
854
|
+
height: 60px;
|
855
|
+
justify-content: center;
|
856
|
+
align-items: center;
|
857
|
+
}
|
858
|
+
|
859
|
+
.request-payment-success-text {
|
860
|
+
color: #161616;
|
861
|
+
text-align: center;
|
862
|
+
font-family: Inter;
|
863
|
+
font-size: 32px;
|
864
|
+
font-style: normal;
|
865
|
+
font-weight: 500;
|
866
|
+
line-height: 36px;
|
867
|
+
/* 112.5% */
|
868
|
+
letter-spacing: -0.64px;
|
869
|
+
margin-top: 20px;
|
870
|
+
margin-bottom: 5px !important;
|
871
|
+
}
|
872
|
+
|
873
|
+
.request-payment-success-subtext {
|
874
|
+
color: #727272;
|
875
|
+
text-align: center;
|
876
|
+
font-family: Inter;
|
877
|
+
font-size: 14px;
|
878
|
+
font-style: normal;
|
879
|
+
font-weight: 500;
|
880
|
+
line-height: 18px;
|
881
|
+
letter-spacing: -0.28px;
|
882
|
+
margin-bottom: 6rem !important;
|
883
|
+
margin-top: 8px !important;
|
884
|
+
}
|
885
|
+
|
886
|
+
.request-payment-success-btn-div {
|
887
|
+
display: flex;
|
888
|
+
align-items: flex-start;
|
889
|
+
justify-content: center;
|
890
|
+
gap: 8px;
|
891
|
+
}
|
892
|
+
|
893
|
+
.request-payment-success-tick-div {
|
894
|
+
display: flex;
|
895
|
+
justify-content: center;
|
896
|
+
align-items: center;
|
897
|
+
margin-top: 32px;
|
898
|
+
}
|
899
|
+
|
900
|
+
.request-payment-success-btn1 {
|
901
|
+
cursor: pointer;
|
902
|
+
border-radius: 80px;
|
903
|
+
border: 1px solid #E0DFE2;
|
904
|
+
display: flex;
|
905
|
+
padding: 12px 32px;
|
906
|
+
justify-content: center;
|
907
|
+
align-items: center;
|
908
|
+
gap: 6px;
|
909
|
+
background-color: #fff;
|
910
|
+
}
|
911
|
+
|
912
|
+
.request-payment-success-btn2 {
|
913
|
+
border-radius: 80px;
|
914
|
+
cursor: pointer;
|
915
|
+
border: 1px solid #E0DFE2;
|
916
|
+
display: flex;
|
917
|
+
padding: 12px 32px;
|
918
|
+
justify-content: center;
|
919
|
+
align-items: center;
|
920
|
+
gap: 6px;
|
921
|
+
background-color: #161616;
|
922
|
+
color: #fff;
|
923
|
+
font-family: Inter;
|
924
|
+
font-size: 14px;
|
925
|
+
font-style: normal;
|
926
|
+
font-weight: 500;
|
927
|
+
}
|
928
|
+
|
929
|
+
.request-payment-error-msg{
|
930
|
+
color: #dc3545;
|
931
|
+
font-family: Inter;
|
932
|
+
font-size: 12px;
|
933
|
+
}
|
934
|
+
`);
|
935
|
+
};
|
936
|
+
var RequestPaymentstyles_default = RequestPaymentstyles;
|
937
|
+
|
938
|
+
// src/app/components/RequestPayment/RequestPaymentAllInput.tsx
|
920
939
|
function RequestPaymentAllInput({ fractalpayClientKey }) {
|
921
940
|
const [isLoading, setIsLoading] = useState2(false);
|
922
941
|
const [show, setShow] = useState2(false);
|