@pinerohit11/testwidget 0.1.19 → 0.1.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. package/.next/cache/webpack/client-development/10.pack.gz +0 -0
  2. package/.next/cache/webpack/client-development/11.pack.gz +0 -0
  3. package/.next/cache/webpack/client-development/12.pack.gz +0 -0
  4. package/.next/cache/webpack/client-development/13.pack.gz +0 -0
  5. package/.next/cache/webpack/client-development/14.pack.gz +0 -0
  6. package/.next/cache/webpack/client-development/15.pack.gz +0 -0
  7. package/.next/cache/webpack/client-development/5.pack.gz +0 -0
  8. package/.next/cache/webpack/client-development/7.pack.gz +0 -0
  9. package/.next/cache/webpack/client-development/9.pack.gz +0 -0
  10. package/.next/cache/webpack/client-development/index.pack.gz +0 -0
  11. package/.next/cache/webpack/client-development/index.pack.gz.old +0 -0
  12. package/.next/cache/webpack/server-development/0.pack.gz +0 -0
  13. package/.next/cache/webpack/server-development/1.pack.gz +0 -0
  14. package/.next/cache/webpack/server-development/2.pack.gz +0 -0
  15. package/.next/cache/webpack/server-development/3.pack.gz +0 -0
  16. package/.next/cache/webpack/server-development/4.pack.gz +0 -0
  17. package/.next/cache/webpack/server-development/5.pack.gz +0 -0
  18. package/.next/cache/webpack/server-development/6.pack.gz +0 -0
  19. package/.next/cache/webpack/server-development/7.pack.gz +0 -0
  20. package/.next/cache/webpack/server-development/8.pack.gz +0 -0
  21. package/.next/cache/webpack/server-development/9.pack.gz +0 -0
  22. package/.next/cache/webpack/server-development/index.pack.gz +0 -0
  23. package/.next/cache/webpack/server-development/index.pack.gz.old +0 -0
  24. package/.next/server/app/page.js +1 -1
  25. package/.next/server/app-paths-manifest.json +0 -1
  26. package/.next/server/vendor-chunks/next.js +0 -120
  27. package/.next/server/webpack-runtime.js +1 -6
  28. package/.next/static/chunks/app/layout.js +2 -2
  29. package/.next/static/chunks/app/page.js +1 -1
  30. package/.next/static/chunks/webpack.js +1 -1
  31. package/.next/static/webpack/1dc8bb4faa862342.webpack.hot-update.json +1 -0
  32. package/.next/static/webpack/2b7d71482ca7a5b0.webpack.hot-update.json +1 -0
  33. package/.next/static/webpack/3fffc4287d1af227.webpack.hot-update.json +1 -0
  34. package/.next/static/webpack/98ceb1d86c3608da.webpack.hot-update.json +1 -0
  35. package/.next/static/webpack/a09fb847fbd6c830.webpack.hot-update.json +1 -0
  36. package/.next/static/webpack/a495282bd4f45272.webpack.hot-update.json +1 -0
  37. package/.next/static/webpack/app/layout.2b7d71482ca7a5b0.hot-update.js +31 -0
  38. package/.next/static/webpack/app/layout.3fffc4287d1af227.hot-update.js +31 -0
  39. package/.next/static/webpack/app/layout.a09fb847fbd6c830.hot-update.js +31 -0
  40. package/.next/static/webpack/app/layout.a495282bd4f45272.hot-update.js +31 -0
  41. package/.next/static/webpack/app/layout.dcebba06ee4c3470.hot-update.js +31 -0
  42. package/.next/static/webpack/app/page.1dc8bb4faa862342.hot-update.js +22 -0
  43. package/.next/static/webpack/app-pages-internals.98ceb1d86c3608da.hot-update.js +186 -0
  44. package/.next/static/webpack/app-pages-internals.dcebba06ee4c3470.hot-update.js +21 -0
  45. package/.next/static/webpack/dcebba06ee4c3470.webpack.hot-update.json +1 -0
  46. package/.next/static/webpack/webpack.1dc8bb4faa862342.hot-update.js +18 -0
  47. package/.next/static/webpack/webpack.2b7d71482ca7a5b0.hot-update.js +18 -0
  48. package/.next/static/webpack/webpack.3fffc4287d1af227.hot-update.js +18 -0
  49. package/.next/static/webpack/webpack.98ceb1d86c3608da.hot-update.js +18 -0
  50. package/.next/static/webpack/webpack.a09fb847fbd6c830.hot-update.js +18 -0
  51. package/.next/static/webpack/webpack.a495282bd4f45272.hot-update.js +18 -0
  52. package/.next/static/webpack/webpack.dcebba06ee4c3470.hot-update.js +18 -0
  53. package/.next/trace +11 -0
  54. package/dist/index.cjs +1 -524
  55. package/dist/index.css +1 -544
  56. package/dist/index.js +1 -492
  57. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,492 +1 @@
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
-
21
- // src/app/index.ts
22
- import "bootstrap/dist/css/bootstrap.min.css";
23
-
24
- // src/app/components/Greet.tsx
25
- import axios from "axios";
26
- import React, { useEffect, useState } from "react";
27
- import { Button } from "react-bootstrap";
28
- import Modal from "react-bootstrap/Modal";
29
- function PaywithFractal({ name, amount, orderId, fractalPayClientKey }) {
30
- const baseUrl = "http://192.168.1.52:8082/";
31
- const masterBaseUrl = "http://192.168.1.52:8081/";
32
- console.log(name, "name", window == null ? void 0 : window.DatacapWebToken);
33
- const [dcToken, setDcToken] = useState("");
34
- const [error, setError] = useState({});
35
- const [toggleQr, setToggleQr] = useState(false);
36
- const [formData, setFormData] = useState({
37
- name: "John Doe",
38
- card_number: "4761 7310 0000 0043",
39
- exp_month: "12",
40
- exp_year: "2024",
41
- cvv: "201",
42
- zip: ""
43
- });
44
- const [loading, setLoading] = useState(false);
45
- const [show, setShow] = useState(false);
46
- const handleSubmit = async (e) => {
47
- var _a, _b, _c, _d, _e, _f, _g;
48
- e.preventDefault();
49
- const data = {
50
- description: "widget payment",
51
- amount: amount || "1.00",
52
- phone_number: "1234567908",
53
- zip: formData.zip,
54
- orderId: orderId || "",
55
- fractalpayPublicKey: fractalPayClientKey
56
- };
57
- if (Object.keys(error).length < 1) {
58
- try {
59
- setLoading(true);
60
- const res = await axios.post(`${baseUrl}create-widget-order`, data, {
61
- headers: {
62
- "Content-Type": "application/json"
63
- }
64
- });
65
- if (res.data && ((_a = res.data) == null ? void 0 : _a.result)) {
66
- console.log("token", (_b = res.data) == null ? void 0 : _b.data);
67
- setDcToken((_d = (_c = res.data) == null ? void 0 : _c.data) == null ? void 0 : _d.dctoken);
68
- const tokenCallback = async (response) => {
69
- var _a2, _b2, _c2;
70
- console.log("response for token call back", response);
71
- if (response.Error) {
72
- alert("if");
73
- console.log("Error: ", response);
74
- setLoading(false);
75
- } else {
76
- const headers = {
77
- "Content-Type": "application/x-www-form-urlencoded"
78
- };
79
- const quickData = __spreadValues({
80
- name: formData.name,
81
- postal_code: formData.zip
82
- }, response);
83
- try {
84
- const resp = await axios.post(`${masterBaseUrl}quick-pay/${(_b2 = (_a2 = res.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.posSalesIdEncode}`, quickData, {
85
- headers
86
- });
87
- setLoading(false);
88
- console.log("quick response", resp);
89
- if (((_c2 = resp == null ? void 0 : resp.data) == null ? void 0 : _c2.result) && (resp == null ? void 0 : resp.status) === 200) {
90
- console.log("Payment success!", resp == null ? void 0 : resp.data);
91
- setFormData({
92
- name: "John Doe",
93
- card_number: "4761 7310 0000 0043",
94
- exp_month: "12",
95
- exp_year: "2024",
96
- cvv: "201",
97
- zip: ""
98
- });
99
- } else {
100
- console.log("Payment failed!", resp == null ? void 0 : resp.data);
101
- }
102
- } catch (error2) {
103
- console.log("Error: ", error2);
104
- setLoading(false);
105
- }
106
- }
107
- };
108
- window == null ? void 0 : window.DatacapWebToken.requestToken((_f = (_e = res.data) == null ? void 0 : _e.data) == null ? void 0 : _f.dctoken, "PaymentForm", tokenCallback);
109
- } else {
110
- setLoading(false);
111
- console.log("res", (_g = res.data) == null ? void 0 : _g.data);
112
- }
113
- } catch (error2) {
114
- setLoading(false);
115
- console.log(error2);
116
- }
117
- }
118
- };
119
- const handleCardFormat = (numericValue) => {
120
- const cleaned = ("" + numericValue).replace(/\D/g, "");
121
- const match = cleaned.match(/^(\d{4})(\d{4})(\d{4})(\d{4})$/);
122
- if (match) {
123
- return `${match[1]} ${match[2]} ${match[3]} ${match[4]}`;
124
- }
125
- return numericValue;
126
- };
127
- const handleCardNumberChange = (value) => {
128
- setError((prev) => __spreadProps(__spreadValues({}, prev), { card_number: "" }));
129
- if (value && value.match(/[a-zA-Z]/)) {
130
- setError((prev) => __spreadProps(__spreadValues({}, prev), {
131
- card_number: "Invalid input. Please enter only numbers."
132
- }));
133
- } else if (value.length > 12 && !(window == null ? void 0 : window.DatacapWebToken.validateCardNumber(value == null ? void 0 : value.replaceAll(" ", "")))) {
134
- setError((prev) => __spreadProps(__spreadValues({}, prev), {
135
- card_number: "Invalid Card Number"
136
- }));
137
- } else if (!value.length) {
138
- setError((prev) => __spreadProps(__spreadValues({}, prev), {
139
- card_number: "Card Number required"
140
- }));
141
- } else {
142
- setError({});
143
- }
144
- };
145
- const handleMonthChange = (value) => {
146
- setError((prev) => __spreadProps(__spreadValues({}, prev), { exp_month: "" }));
147
- if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 1 && parseInt(value, 10) <= 12)) {
148
- setError({});
149
- } else if (!value.length) {
150
- setError((prev) => __spreadProps(__spreadValues({}, prev), {
151
- exp_month: "Month is required"
152
- }));
153
- } else {
154
- setError((prev) => __spreadProps(__spreadValues({}, prev), {
155
- exp_month: "Value should be between 1 and 12"
156
- }));
157
- }
158
- };
159
- const handleYearChange = (value) => {
160
- setError((prev) => __spreadProps(__spreadValues({}, prev), { exp_year: "" }));
161
- if (window == null ? void 0 : window.DatacapWebToken.validateExpirationDate(formData.exp_month, value)) {
162
- setError({});
163
- } else if (!value.length) {
164
- setError((prev) => __spreadProps(__spreadValues({}, prev), {
165
- exp_year: "Year is required"
166
- }));
167
- } else {
168
- setError((prev) => __spreadProps(__spreadValues({}, prev), {
169
- exp_year: "Invalid Expiration Date."
170
- }));
171
- }
172
- };
173
- const handleCVVChange = (value) => {
174
- setError((prev) => __spreadProps(__spreadValues({}, prev), { cvv: "" }));
175
- if (window == null ? void 0 : window.DatacapWebToken.validateCVV(value)) {
176
- setError({});
177
- } else if (!value.length) {
178
- setError((prev) => __spreadProps(__spreadValues({}, prev), {
179
- cvv: "CVV is required"
180
- }));
181
- } else {
182
- setError((prev) => __spreadProps(__spreadValues({}, prev), {
183
- cvv: "Invalid CVV."
184
- }));
185
- }
186
- };
187
- const handleChange = (e) => {
188
- const token = e.target.getAttribute("data-token") || "";
189
- const value = e.target.value;
190
- setFormData((prev) => __spreadProps(__spreadValues({}, prev), { [token]: value }));
191
- if (token === "card_number") {
192
- handleCardNumberChange(value);
193
- }
194
- if (token === "exp_month") {
195
- handleMonthChange(value);
196
- }
197
- if (token === "exp_year") {
198
- handleYearChange(value);
199
- }
200
- if (token === "cvv") {
201
- handleCVVChange(value);
202
- }
203
- };
204
- useEffect(() => {
205
- const scriptId = "my-script";
206
- const existingScript = document.getElementById(scriptId);
207
- if (!existingScript) {
208
- const script = document.createElement("script");
209
- script.src = "https://token-cert.dcap.com/v1/client";
210
- script.id = scriptId;
211
- script.async = true;
212
- script.onload = () => {
213
- if (typeof window !== "undefined" && window.DatacapWebToken) {
214
- console.log("DatacapWebToken", window.DatacapWebToken);
215
- } else {
216
- console.log("DatacapWebToken is not loaded yet.");
217
- }
218
- };
219
- document.head.appendChild(script);
220
- }
221
- return () => {
222
- const script = document.getElementById(scriptId);
223
- if (script) {
224
- document.head.removeChild(script);
225
- }
226
- };
227
- }, []);
228
- const handleClose = () => {
229
- setShow(false);
230
- };
231
- const handleOpen = () => {
232
- console.log("open");
233
- setShow(true);
234
- };
235
- console.log(show, "open");
236
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { style: { width: "100%", textAlign: "center" } }, /* @__PURE__ */ React.createElement(Button, { onClick: handleOpen }, "Show")), /* @__PURE__ */ React.createElement(
237
- Modal,
238
- {
239
- show,
240
- onHide: handleClose,
241
- backdrop: "static",
242
- keyboard: false,
243
- size: "lg"
244
- },
245
- /* @__PURE__ */ React.createElement(Modal.Body, null, /* @__PURE__ */ React.createElement("div", { className: "bg-black" }, /* @__PURE__ */ React.createElement("div", { className: "container bg-black" }, /* @__PURE__ */ React.createElement("div", { className: "row bg-light no-gutters" }, /* @__PURE__ */ React.createElement("div", { className: "col-sm-12" }, /* @__PURE__ */ React.createElement("div", { className: "bd-example bd-example-tabs right-tabs mttabs m-3 " }, /* @__PURE__ */ React.createElement("div", { className: "payment-popup" }, /* @__PURE__ */ React.createElement(
246
- "button",
247
- {
248
- className: "close-pop",
249
- onClick: () => {
250
- setShow(false);
251
- }
252
- },
253
- /* @__PURE__ */ React.createElement(
254
- "svg",
255
- {
256
- xmlns: "http://www.w3.org/2000/svg",
257
- width: 37,
258
- height: 37,
259
- viewBox: "0 0 21 21"
260
- },
261
- /* @__PURE__ */ React.createElement(
262
- "path",
263
- {
264
- fill: "none",
265
- stroke: "currentColor",
266
- strokeLinecap: "round",
267
- strokeLinejoin: "round",
268
- d: "m7.5 7.5l6 6m0-6l-6 6"
269
- }
270
- )
271
- )
272
- ), /* @__PURE__ */ React.createElement("div", { className: "row" }, /* @__PURE__ */ React.createElement("div", { className: "comp-name" }, /* @__PURE__ */ React.createElement(
273
- "img",
274
- {
275
- src: "https://invoicestaging.skysystemz.com/assets/products/65c49a2740ff1.png",
276
- alt: "",
277
- className: "client-logo"
278
- }
279
- )), /* @__PURE__ */ React.createElement("div", { className: "" }, /* @__PURE__ */ React.createElement("div", { id: "Checkout", className: "inline" }, /* @__PURE__ */ React.createElement("div", { className: "header" }, /* @__PURE__ */ React.createElement("h1", null, "Pay"), /* @__PURE__ */ React.createElement(
280
- "i",
281
- {
282
- className: "fa fa-qrcode fa-2x",
283
- id: "qrIcon",
284
- title: "Show QR Code",
285
- onClick: () => setToggleQr(!toggleQr)
286
- }
287
- )), /* @__PURE__ */ React.createElement("div", { id: "qrCode", style: {
288
- display: toggleQr ? "block" : "none"
289
- } }, /* @__PURE__ */ React.createElement(
290
- "img",
291
- {
292
- src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARQAAAEUCAYAAADqcMl5AAAAAklEQVR4AewaftIAABJaSURBVO3BQY7gRhLAQFLo/3+ZO8c8FSCoemwvMsL+YK21LnhYa61LHtZa65KHtda65GGttS55WGutSx7WWuuSh7XWuuRhrbUueVhrrUse1lrrkoe11rrkYa21LnlYa61LHtZa65KHtda65IePVP6miknlpGJSualiUjmpOFGZKk5UpopJ5YuKE5WpYlI5qZhU3qiYVKaKSeWkYlI5qXhD5aRiUvmbKr54WGutSx7WWuuSh7XWuuSHyypuUvlNFW+oTCpTxRsqU8UXKlPFicqJylRxonJScVLxhspU8UbFGxX/pIqbVG56WGutSx7WWuuSh7XWuuSHX6byRsVNKlPFpPJGxW9SmSreqJhUTiomlROVk4ovVL5QOak4UTlR+TdReaPiNz2stdYlD2utdcnDWmtd8sN/XMWkMlVMKlPFpHKiMlWcqJxUTCqTyk0Vk8pJxaQyVUwqN1WcqEwVk8qk8kXFpPJGxaTy/+RhrbUueVhrrUse1lrrkh/+z6lMFScVN1VMKpPKVDGpTBWTyknFFyonKlPFpDJVTConKjdVnKhMFZPKScWkMqlMFf9PHtZa65KHtda65GGttS754ZdV/CaVqWJS+UJlqjhROamYVCaVE5WpYlKZKt6oeEPlpGJSmSreUJkq3lCZKt6omFTeqLip4t/kYa21LnlYa61LHtZa65IfLlP5L1GZKt5QmSomlTcqJpWpYlKZKiaVqeINlaniDZWpYlKZKiaVqWJSmSpOKiaVqWJSmSpuUpkqTlT+zR7WWuuSh7XWuuRhrbUu+eGjin+zipOKSeWNikllqjipmFS+UJkqJpU3Kr6omFROVN6omFSmikllqphUpopJZaqYVKaKSeWNiv+Sh7XWuuRhrbUueVhrrUvsD36RyhsVk8pUMamcVJyofFHx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iMlVMKlPFicobKv8lD2utdcnDWmtd8rDWWpfYH/yHqUwVv0llqjhRmSpOVKaKSWWqmFSmihOVqeINlaliUpkqJpWTikllqjhROak4UfmbKt5QOan4mx7WWuuSh7XWuuRhrbUu+eEjlb+pYqqYVE4q3lCZKiaVL1SmikllqphUpooTlTdUporfVHFSMam8UTGpTBUnFTepnKhMFW+onFTc9LDWWpc8rLXWJQ9rrXXJD5dV3KTyRsWk8obKP0llqnhD5aaKN1SmipOKSWWqOKmYVKaKN1Smiknlb6p4o2JS+Zse1lrrkoe11rrkYa21Lvnhl6m8UfGGym+qmFROKiaVSWWqOFE5qZhUvlD5omJS+UJlqphUpopJ5aRiUnmjYlKZKiaVE5UvVN5QmSq+eFhrrUse1lrrkoe11rrkh/9zFZPKScVJxYnKVPGbVKaKSWWqmFROKiaVqeKkYlKZKk5UTiomlZOKk4qTikllqphUTipOVKaKm1RuelhrrUse1lrrkoe11rrkh/8zFZPKVDGpTConFZPKVDGpnFRMKlPFpDJVfFExqZxUnKi8oXJSMalMFVPFFyonFVPFpDJVnKhMFVPFpPJFxW96WGutSx7WWuuSh7XWuuSHX1bxmyomlaliUnmj4qRiUpkqJpWTipOKSWWqOFF5Q+WkYqqYVKaKSeVE5QuVqWJSmSreUJkqJpWTikllqpgq/s0e1lrrkoe11rrkYa21LvnhMpV/UsWkMlVMKicqJxVTxRcqU8VJxRsVJypTxRsqX1S8oTJVnKhMFZPKScVUMalMFScqU8WkclIxqfyTHtZa65KHtda65GGttS6xP1hrrQse1lrrkoe11rrkYa21LnlYa61LHtZa65KHtda65GGttS55WGutSx7WWuuSh7XWuuRhrbUueVhrrUse1lrrkoe11rrkYa21Lvkf/C+HzIiJCzEAAAAASUVORK5CYII=",
293
- alt: "QRCode",
294
- srcSet: ""
295
- }
296
- )), /* @__PURE__ */ React.createElement(
297
- "form",
298
- {
299
- id: "PaymentForm",
300
- className: "payment-form",
301
- onSubmit: handleSubmit
302
- },
303
- /* @__PURE__ */ React.createElement(
304
- "input",
305
- {
306
- type: "hidden",
307
- id: "dctoken",
308
- defaultValue: dcToken,
309
- name: "dctoken"
310
- }
311
- ),
312
- /* @__PURE__ */ React.createElement("div", { className: "form-group top-amnt" }, /* @__PURE__ */ React.createElement("div", { className: "amtleft" }, /* @__PURE__ */ React.createElement("label", { htmlFor: "Amount" }, "Payment amount"), /* @__PURE__ */ React.createElement("div", { className: "amount-placeholder" }, /* @__PURE__ */ React.createElement("span", null, "$"), /* @__PURE__ */ React.createElement("span", null, " ", amount || 1, " "))), /* @__PURE__ */ React.createElement("div", { className: "card-row" }, /* @__PURE__ */ React.createElement("span", { className: "visa" }), /* @__PURE__ */ React.createElement("span", { className: "mastercard" }), /* @__PURE__ */ React.createElement("span", { className: "amex" }), /* @__PURE__ */ React.createElement("span", { className: "discover" }))),
313
- /* @__PURE__ */ React.createElement("div", { className: "form-group" }, /* @__PURE__ */ React.createElement("label", { htmlFor: "NameOnCard" }, "Name on card"), /* @__PURE__ */ React.createElement(
314
- "input",
315
- {
316
- "data-token": "name",
317
- id: "NameOnCard",
318
- className: "form-control required",
319
- type: "text",
320
- maxLength: 100,
321
- placeholder: "name",
322
- value: formData == null ? void 0 : formData.name,
323
- onChange: handleChange
324
- }
325
- ), /* @__PURE__ */ React.createElement(
326
- "span",
327
- {
328
- id: "NameOnCard-error",
329
- style: { color: "red" }
330
- }
331
- )),
332
- /* @__PURE__ */ React.createElement("div", { className: "form-group" }, /* @__PURE__ */ React.createElement(
333
- "input",
334
- {
335
- "data-token": "card_number",
336
- className: "null card-image form-control required",
337
- type: "text",
338
- maxLength: 19,
339
- placeholder: "0000 0000 0000 0000",
340
- value: handleCardFormat(formData == null ? void 0 : formData.card_number),
341
- onChange: handleChange
342
- }
343
- ), error.card_number && /* @__PURE__ */ React.createElement(
344
- "span",
345
- {
346
- id: "card_number-error",
347
- style: { color: "red" }
348
- },
349
- error.card_number
350
- )),
351
- /* @__PURE__ */ React.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React.createElement(
352
- "input",
353
- {
354
- "data-token": "exp_month",
355
- className: "form-control required",
356
- type: "text",
357
- placeholder: "MM",
358
- maxLength: 2,
359
- value: formData == null ? void 0 : formData.exp_month,
360
- onChange: handleChange
361
- }
362
- ), error.exp_month && /* @__PURE__ */ React.createElement(
363
- "span",
364
- {
365
- id: "exp_month-error",
366
- style: { color: "red" }
367
- },
368
- error.exp_month
369
- )),
370
- /* @__PURE__ */ React.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React.createElement(
371
- "input",
372
- {
373
- "data-token": "exp_year",
374
- className: "form-control required",
375
- type: "text",
376
- placeholder: "YYYY",
377
- maxLength: 4,
378
- value: formData == null ? void 0 : formData.exp_year,
379
- onChange: handleChange
380
- }
381
- ), error.exp_year && /* @__PURE__ */ React.createElement(
382
- "span",
383
- {
384
- id: "exp_year-error",
385
- style: { color: "red" }
386
- },
387
- error.exp_year
388
- )),
389
- /* @__PURE__ */ React.createElement("div", { className: "security-code-group form-group" }, /* @__PURE__ */ React.createElement("div", { className: "input-container" }, /* @__PURE__ */ React.createElement(
390
- "input",
391
- {
392
- "data-token": "cvv",
393
- className: "form-control required",
394
- type: "text",
395
- maxLength: 4,
396
- placeholder: "CVC",
397
- value: formData == null ? void 0 : formData.cvv,
398
- onChange: handleChange
399
- }
400
- ), /* @__PURE__ */ React.createElement("i", { id: "cvc", className: "fa fa-question-circle" })), error.cvv && /* @__PURE__ */ React.createElement(
401
- "span",
402
- {
403
- id: "cvv-error",
404
- style: { color: "red" }
405
- },
406
- error.cvv
407
- ), /* @__PURE__ */ React.createElement("div", { className: "cvc-preview-container two-card hide" }, /* @__PURE__ */ React.createElement("div", { className: "amex-cvc-preview" }), /* @__PURE__ */ React.createElement("div", { className: "visa-mc-dis-cvc-preview" }))),
408
- /* @__PURE__ */ React.createElement("div", { className: "zip-code-group form-group" }, /* @__PURE__ */ React.createElement("label", { htmlFor: "ZIPCode" }, "Postal code"), /* @__PURE__ */ React.createElement("div", { className: "input-container" }, /* @__PURE__ */ React.createElement(
409
- "input",
410
- {
411
- id: "ZIPCode",
412
- "data-token": "zip",
413
- className: "form-control required",
414
- type: "text",
415
- maxLength: 7,
416
- placeholder: "000000",
417
- value: formData == null ? void 0 : formData.zip,
418
- onChange: handleChange
419
- }
420
- ), /* @__PURE__ */ React.createElement(
421
- "a",
422
- {
423
- tabIndex: 0,
424
- role: "button",
425
- "data-toggle": "popover",
426
- "data-trigger": "focus",
427
- "data-placement": "left",
428
- "data-content": "Enter the ZIP/Postal code for your credit card billing address."
429
- },
430
- /* @__PURE__ */ React.createElement("i", { className: "fa fa-question-circle" })
431
- ), /* @__PURE__ */ React.createElement(
432
- "span",
433
- {
434
- id: "ZIPCode-error",
435
- style: { color: "red", display: "none" }
436
- },
437
- "This field is required"
438
- ))),
439
- /* @__PURE__ */ React.createElement(
440
- "button",
441
- {
442
- id: "PayButton",
443
- className: "btn btn-block btn-success submit-button",
444
- type: "submit"
445
- },
446
- /* @__PURE__ */ React.createElement("span", { className: "submit-button-lock" }),
447
- /* @__PURE__ */ React.createElement("span", { className: "align-middle" }, "Pay $", amount || 1)
448
- )
449
- ), /* @__PURE__ */ React.createElement("div", { className: "powerd-by-part", style: {
450
- display: "flex",
451
- fontSize: "12px",
452
- textAlign: "center",
453
- alignItems: "center",
454
- justifyContent: "center",
455
- margin: "8px 0 20px 0"
456
- } }, /* @__PURE__ */ React.createElement(
457
- "svg",
458
- {
459
- xmlns: "http://www.w3.org/2000/svg",
460
- width: 20,
461
- height: 20,
462
- viewBox: "0 0 26 26"
463
- },
464
- /* @__PURE__ */ React.createElement(
465
- "path",
466
- {
467
- fill: "currentColor",
468
- 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"
469
- }
470
- )
471
- ), "Secure payments powered by Fractal", /* @__PURE__ */ React.createElement(
472
- "img",
473
- {
474
- src: "https://ui.fractalpay.com/favicon.ico",
475
- alt: "Fractal logo",
476
- className: "powered-logo",
477
- style: {
478
- width: "18px",
479
- height: "18px",
480
- float: "right",
481
- padding: "2px",
482
- background: "#000",
483
- borderRadius: "4px",
484
- marginLeft: "5px"
485
- }
486
- }
487
- ))))))))))))
488
- ));
489
- }
490
- export {
491
- PaywithFractal
492
- };
1
+ var _=Object.defineProperty,$=Object.defineProperties;var ee=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var ae=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var A=(c,n,s)=>n in c?_(c,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):c[n]=s,l=(c,n)=>{for(var s in n||(n={}))ae.call(n,s)&&A(c,s,n[s]);if(w)for(var s of w(n))oe.call(n,s)&&A(c,s,n[s]);return c},d=(c,n)=>$(c,ee(n));import"bootstrap/dist/css/bootstrap.min.css";import P from"axios";import e,{useEffect as re,useState as g}from"react";import{Button as ne,Modal as Z}from"react-bootstrap";function he({name:c,amount:n,orderId:s,fractalPayClientKey:E}){let M="http://192.168.1.52:8082/",C="http://192.168.1.52:8081/";console.log(c,"name",window==null?void 0:window.DatacapWebToken);let[X,N]=g(""),[m,r]=g({}),[f,Q]=g(!1),[i,k]=g({name:"John Doe",card_number:"4761 7310 0000 0043",exp_month:"12",exp_year:"2024",cvv:"201",zip:""}),[le,h]=g(!1),[v,q]=g(!1),G=async o=>{var t,y,U,V,K,T,J;o.preventDefault();let a={description:"widget payment",amount:n||"1.00",phone_number:"1234567908",zip:i.zip,orderId:s||"",fractalpayPublicKey:E};if(Object.keys(m).length<1)try{h(!0);let x=await P.post(`${M}create-widget-order`,a,{headers:{"Content-Type":"application/json"}});if(x.data&&((t=x.data)!=null&&t.result)){console.log("token",(y=x.data)==null?void 0:y.data),N((V=(U=x.data)==null?void 0:U.data)==null?void 0:V.dctoken);let B=async b=>{var W,S,F;if(console.log("response for token call back",b),b.Error)alert("if"),console.log("Error: ",b),h(!1);else{let L={"Content-Type":"application/x-www-form-urlencoded"},H=l({name:i.name,postal_code:i.zip},b);try{let p=await P.post(`${C}quick-pay/${(S=(W=x.data)==null?void 0:W.data)==null?void 0:S.posSalesIdEncode}`,H,{headers:L});h(!1),console.log("quick response",p),(F=p==null?void 0:p.data)!=null&&F.result&&(p==null?void 0:p.status)===200?(console.log("Payment success!",p==null?void 0:p.data),k({name:"John Doe",card_number:"4761 7310 0000 0043",exp_month:"12",exp_year:"2024",cvv:"201",zip:""})):console.log("Payment failed!",p==null?void 0:p.data)}catch(p){console.log("Error: ",p),h(!1)}}};window==null||window.DatacapWebToken.requestToken((T=(K=x.data)==null?void 0:K.data)==null?void 0:T.dctoken,"PaymentForm",B)}else h(!1),console.log("res",(J=x.data)==null?void 0:J.data)}catch(x){h(!1),console.log(x)}},Y=o=>{let t=(""+o).replace(/\D/g,"").match(/^(\d{4})(\d{4})(\d{4})(\d{4})$/);return t?`${t[1]} ${t[2]} ${t[3]} ${t[4]}`:o},j=o=>{r(a=>d(l({},a),{card_number:""})),o&&o.match(/[a-zA-Z]/)?r(a=>d(l({},a),{card_number:"Invalid input. Please enter only numbers."})):o.length>12&&!(window!=null&&window.DatacapWebToken.validateCardNumber(o==null?void 0:o.replaceAll(" ","")))?r(a=>d(l({},a),{card_number:"Invalid Card Number"})):o.length?r({}):r(a=>d(l({},a),{card_number:"Card Number required"}))},z=o=>{r(a=>d(l({},a),{exp_month:""})),/^\d{0,2}$/.test(o)&&(o===""||parseInt(o,10)>=1&&parseInt(o,10)<=12)?r({}):o.length?r(a=>d(l({},a),{exp_month:"Value should be between 1 and 12"})):r(a=>d(l({},a),{exp_month:"Month is required"}))},R=o=>{r(a=>d(l({},a),{exp_year:""})),window!=null&&window.DatacapWebToken.validateExpirationDate(i.exp_month,o)?r({}):o.length?r(a=>d(l({},a),{exp_year:"Invalid Expiration Date."})):r(a=>d(l({},a),{exp_year:"Year is required"}))},D=o=>{r(a=>d(l({},a),{cvv:""})),window!=null&&window.DatacapWebToken.validateCVV(o)?r({}):o.length?r(a=>d(l({},a),{cvv:"Invalid CVV."})):r(a=>d(l({},a),{cvv:"CVV is required"}))},u=o=>{let a=o.target.getAttribute("data-token")||"",t=o.target.value;k(y=>d(l({},y),{[a]:t})),a==="card_number"&&j(t),a==="exp_month"&&z(t),a==="exp_year"&&R(t),a==="cvv"&&D(t)};re(()=>{let o="my-script";if(!document.getElementById(o)){let t=document.createElement("script");t.src="https://token-cert.dcap.com/v1/client",t.id=o,t.async=!0,t.onload=()=>{typeof window!="undefined"&&window.DatacapWebToken?console.log("DatacapWebToken",window.DatacapWebToken):console.log("DatacapWebToken is not loaded yet.")},document.head.appendChild(t)}return()=>{let t=document.getElementById(o);t&&document.head.removeChild(t)}},[]);let I=()=>{q(!1)},O=()=>{console.log("open"),q(!0)};return console.log(v,"open"),e.createElement(e.Fragment,null,e.createElement("div",{style:{width:"100%",textAlign:"center"}},e.createElement(ne,{onClick:O},"Show")),e.createElement(Z,{show:v,onHide:I,backdrop:"static",keyboard:!1,size:"lg"},e.createElement(Z.Body,null,e.createElement("div",{className:"bg-black"},e.createElement("div",{className:"container bg-black"},e.createElement("div",{className:"row bg-light no-gutters"},e.createElement("div",{className:"col-sm-12"},e.createElement("div",{className:"bd-example bd-example-tabs right-tabs mttabs m-3 "},e.createElement("div",{className:"payment-popup"},e.createElement("button",{className:"close-pop",onClick:()=>{q(!1)}},e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:37,height:37,viewBox:"0 0 21 21"},e.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m7.5 7.5l6 6m0-6l-6 6"}))),e.createElement("div",{className:"row"},e.createElement("div",{className:"comp-name"},e.createElement("img",{src:"https://invoicestaging.skysystemz.com/assets/products/65c49a2740ff1.png",alt:"",className:"client-logo"})),e.createElement("div",{className:""},e.createElement("div",{id:"Checkout",className:"inline"},e.createElement("div",{className:"header"},e.createElement("h1",null,"Pay"),e.createElement("i",{className:"fa fa-qrcode fa-2x",id:"qrIcon",title:"Show QR Code",onClick:()=>Q(!f)})),e.createElement("div",{id:"qrCode",style:{display:f?"block":"none"}},e.createElement("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARQAAAEUCAYAAADqcMl5AAAAAklEQVR4AewaftIAABJaSURBVO3BQY7gRhLAQFLo/3+ZO8c8FSCoemwvMsL+YK21LnhYa61LHtZa65KHtda65GGttS55WGutSx7WWuuSh7XWuuRhrbUueVhrrUse1lrrkoe11rrkYa21LnlYa61LHtZa65KHtda65IePVP6miknlpGJSualiUjmpOFGZKk5UpopJ5YuKE5WpYlI5qZhU3qiYVKaKSeWkYlI5qXhD5aRiUvmbKr54WGutSx7WWuuSh7XWuuSHyypuUvlNFW+oTCpTxRsqU8UXKlPFicqJylRxonJScVLxhspU8UbFGxX/pIqbVG56WGutSx7WWuuSh7XWuuSHX6byRsVNKlPFpPJGxW9SmSreqJhUTiomlROVk4ovVL5QOak4UTlR+TdReaPiNz2stdYlD2utdcnDWmtd8sN/XMWkMlVMKlPFpHKiMlWcqJxUTCqTyk0Vk8pJxaQyVUwqN1WcqEwVk8qk8kXFpPJGxaTy/+RhrbUueVhrrUse1lrrkh/+z6lMFScVN1VMKpPKVDGpTBWTyknFFyonKlPFpDJVTConKjdVnKhMFZPKScWkMqlMFf9PHtZa65KHtda65G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TJVnKhMFZPKScVUMalMFScqU8WkclIxqfyTHtZa65KHtda65GGttS6xP1hrrQse1lrrkoe11rrkYa21LnlYa61LHtZa65KHtda65GGttS55WGutSx7WWuuSh7XWuuRhrbUueVhrrUse1lrrkoe11rrkYa21Lvkf/C+HzIiJCzEAAAAASUVORK5CYII=",alt:"QRCode",srcSet:""})),e.createElement("form",{id:"PaymentForm",className:"payment-form",onSubmit:G},e.createElement("input",{type:"hidden",id:"dctoken",defaultValue:X,name:"dctoken"}),e.createElement("div",{className:"form-group top-amnt"},e.createElement("div",{className:"amtleft"},e.createElement("label",{htmlFor:"Amount"},"Payment amount"),e.createElement("div",{className:"amount-placeholder"},e.createElement("span",null,"$"),e.createElement("span",null," ",n||1," "))),e.createElement("div",{className:"card-row"},e.createElement("span",{className:"visa"}),e.createElement("span",{className:"mastercard"}),e.createElement("span",{className:"amex"}),e.createElement("span",{className:"discover"}))),e.createElement("div",{className:"form-group"},e.createElement("label",{htmlFor:"NameOnCard"},"Name on card"),e.createElement("input",{"data-token":"name",id:"NameOnCard",className:"form-control required",type:"text",maxLength:100,placeholder:"name",value:i==null?void 0:i.name,onChange:u}),e.createElement("span",{id:"NameOnCard-error",style:{color:"red"}})),e.createElement("div",{className:"form-group"},e.createElement("input",{"data-token":"card_number",className:"null card-image form-control required",type:"text",maxLength:19,placeholder:"0000 0000 0000 0000",value:Y(i==null?void 0:i.card_number),onChange:u}),m.card_number&&e.createElement("span",{id:"card_number-error",style:{color:"red"}},m.card_number)),e.createElement("div",{className:"expiry-date-group form-group"},e.createElement("input",{"data-token":"exp_month",className:"form-control required",type:"text",placeholder:"MM",maxLength:2,value:i==null?void 0:i.exp_month,onChange:u}),m.exp_month&&e.createElement("span",{id:"exp_month-error",style:{color:"red"}},m.exp_month)),e.createElement("div",{className:"expiry-date-group form-group"},e.createElement("input",{"data-token":"exp_year",className:"form-control required",type:"text",placeholder:"YYYY",maxLength:4,value:i==null?void 0:i.exp_year,onChange:u}),m.exp_year&&e.createElement("span",{id:"exp_year-error",style:{color:"red"}},m.exp_year)),e.createElement("div",{className:"security-code-group form-group"},e.createElement("div",{className:"input-container"},e.createElement("input",{"data-token":"cvv",className:"form-control required",type:"text",maxLength:4,placeholder:"CVC",value:i==null?void 0:i.cvv,onChange:u}),e.createElement("i",{id:"cvc",className:"fa fa-question-circle"})),m.cvv&&e.createElement("span",{id:"cvv-error",style:{color:"red"}},m.cvv),e.createElement("div",{className:"cvc-preview-container two-card hide"},e.createElement("div",{className:"amex-cvc-preview"}),e.createElement("div",{className:"visa-mc-dis-cvc-preview"}))),e.createElement("div",{className:"zip-code-group form-group"},e.createElement("label",{htmlFor:"ZIPCode"},"Postal code"),e.createElement("div",{className:"input-container"},e.createElement("input",{id:"ZIPCode","data-token":"zip",className:"form-control required",type:"text",maxLength:7,placeholder:"000000",value:i==null?void 0:i.zip,onChange:u}),e.createElement("a",{tabIndex:0,role:"button","data-toggle":"popover","data-trigger":"focus","data-placement":"left","data-content":"Enter the ZIP/Postal code for your credit card billing address."},e.createElement("i",{className:"fa fa-question-circle"})),e.createElement("span",{id:"ZIPCode-error",style:{color:"red",display:"none"}},"This field is required"))),e.createElement("button",{id:"PayButton",className:"btn btn-block btn-success submit-button",type:"submit"},e.createElement("span",{className:"submit-button-lock"}),e.createElement("span",{className:"align-middle"},"Pay $",n||1))),e.createElement("div",{className:"powerd-by-part",style:{display:"flex",fontSize:"12px",textAlign:"center",alignItems:"center",justifyContent:"center",margin:"8px 0 20px 0"}},e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 26 26"},e.createElement("path",{fill:"currentColor",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"})),"Secure payments powered by Fractal",e.createElement("img",{src:"https://ui.fractalpay.com/favicon.ico",alt:"Fractal logo",className:"powered-logo",style:{width:"18px",height:"18px",float:"right",padding:"2px",background:"#000",borderRadius:"4px",marginLeft:"5px"}}))))))))))))))}export{he as PaywithFractal};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pinerohit11/testwidget",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "next dev",