@pinerohit11/testwidget 0.1.20 → 0.1.22

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