@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.
- package/.next/cache/webpack/client-development/10.pack.gz +0 -0
- package/.next/cache/webpack/client-development/11.pack.gz +0 -0
- package/.next/cache/webpack/client-development/12.pack.gz +0 -0
- package/.next/cache/webpack/client-development/13.pack.gz +0 -0
- package/.next/cache/webpack/client-development/14.pack.gz +0 -0
- package/.next/cache/webpack/client-development/15.pack.gz +0 -0
- package/.next/cache/webpack/client-development/5.pack.gz +0 -0
- package/.next/cache/webpack/client-development/7.pack.gz +0 -0
- package/.next/cache/webpack/client-development/9.pack.gz +0 -0
- package/.next/cache/webpack/client-development/index.pack.gz +0 -0
- package/.next/cache/webpack/client-development/index.pack.gz.old +0 -0
- package/.next/cache/webpack/server-development/0.pack.gz +0 -0
- package/.next/cache/webpack/server-development/1.pack.gz +0 -0
- package/.next/cache/webpack/server-development/2.pack.gz +0 -0
- package/.next/cache/webpack/server-development/3.pack.gz +0 -0
- package/.next/cache/webpack/server-development/4.pack.gz +0 -0
- package/.next/cache/webpack/server-development/5.pack.gz +0 -0
- package/.next/cache/webpack/server-development/6.pack.gz +0 -0
- package/.next/cache/webpack/server-development/7.pack.gz +0 -0
- package/.next/cache/webpack/server-development/8.pack.gz +0 -0
- package/.next/cache/webpack/server-development/9.pack.gz +0 -0
- package/.next/cache/webpack/server-development/index.pack.gz +0 -0
- package/.next/cache/webpack/server-development/index.pack.gz.old +0 -0
- package/.next/server/app/page.js +1 -1
- package/.next/server/app-paths-manifest.json +0 -1
- package/.next/server/vendor-chunks/next.js +0 -120
- package/.next/server/webpack-runtime.js +1 -6
- package/.next/static/chunks/app/layout.js +2 -2
- package/.next/static/chunks/app/page.js +1 -1
- package/.next/static/chunks/webpack.js +1 -1
- package/.next/static/webpack/1dc8bb4faa862342.webpack.hot-update.json +1 -0
- package/.next/static/webpack/2b7d71482ca7a5b0.webpack.hot-update.json +1 -0
- package/.next/static/webpack/3fffc4287d1af227.webpack.hot-update.json +1 -0
- package/.next/static/webpack/98ceb1d86c3608da.webpack.hot-update.json +1 -0
- package/.next/static/webpack/a09fb847fbd6c830.webpack.hot-update.json +1 -0
- package/.next/static/webpack/a495282bd4f45272.webpack.hot-update.json +1 -0
- package/.next/static/webpack/app/layout.2b7d71482ca7a5b0.hot-update.js +31 -0
- package/.next/static/webpack/app/layout.3fffc4287d1af227.hot-update.js +31 -0
- package/.next/static/webpack/app/layout.a09fb847fbd6c830.hot-update.js +31 -0
- package/.next/static/webpack/app/layout.a495282bd4f45272.hot-update.js +31 -0
- package/.next/static/webpack/app/layout.dcebba06ee4c3470.hot-update.js +31 -0
- package/.next/static/webpack/app/page.1dc8bb4faa862342.hot-update.js +22 -0
- package/.next/static/webpack/app-pages-internals.98ceb1d86c3608da.hot-update.js +186 -0
- package/.next/static/webpack/app-pages-internals.dcebba06ee4c3470.hot-update.js +21 -0
- package/.next/static/webpack/dcebba06ee4c3470.webpack.hot-update.json +1 -0
- package/.next/static/webpack/webpack.1dc8bb4faa862342.hot-update.js +18 -0
- package/.next/static/webpack/webpack.2b7d71482ca7a5b0.hot-update.js +18 -0
- package/.next/static/webpack/webpack.3fffc4287d1af227.hot-update.js +18 -0
- package/.next/static/webpack/webpack.98ceb1d86c3608da.hot-update.js +18 -0
- package/.next/static/webpack/webpack.a09fb847fbd6c830.hot-update.js +18 -0
- package/.next/static/webpack/webpack.a495282bd4f45272.hot-update.js +18 -0
- package/.next/static/webpack/webpack.dcebba06ee4c3470.hot-update.js +18 -0
- package/.next/trace +11 -0
- package/dist/index.cjs +1 -524
- package/dist/index.css +1 -544
- package/dist/index.js +1 -492
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -1,524 +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
|
-
var import_Modal = __toESM(require("react-bootstrap/Modal"), 1);
|
60
|
-
function PaywithFractal({ name, amount, orderId, fractalPayClientKey }) {
|
61
|
-
const baseUrl = "http://192.168.1.52:8082/";
|
62
|
-
const masterBaseUrl = "http://192.168.1.52:8081/";
|
63
|
-
console.log(name, "name", window == null ? void 0 : window.DatacapWebToken);
|
64
|
-
const [dcToken, setDcToken] = (0, import_react.useState)("");
|
65
|
-
const [error, setError] = (0, import_react.useState)({});
|
66
|
-
const [toggleQr, setToggleQr] = (0, import_react.useState)(false);
|
67
|
-
const [formData, setFormData] = (0, import_react.useState)({
|
68
|
-
name: "John Doe",
|
69
|
-
card_number: "4761 7310 0000 0043",
|
70
|
-
exp_month: "12",
|
71
|
-
exp_year: "2024",
|
72
|
-
cvv: "201",
|
73
|
-
zip: ""
|
74
|
-
});
|
75
|
-
const [loading, setLoading] = (0, import_react.useState)(false);
|
76
|
-
const [show, setShow] = (0, import_react.useState)(false);
|
77
|
-
const handleSubmit = async (e) => {
|
78
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
79
|
-
e.preventDefault();
|
80
|
-
const data = {
|
81
|
-
description: "widget payment",
|
82
|
-
amount: amount || "1.00",
|
83
|
-
phone_number: "1234567908",
|
84
|
-
zip: formData.zip,
|
85
|
-
orderId: orderId || "",
|
86
|
-
fractalpayPublicKey: fractalPayClientKey
|
87
|
-
};
|
88
|
-
if (Object.keys(error).length < 1) {
|
89
|
-
try {
|
90
|
-
setLoading(true);
|
91
|
-
const res = await import_axios.default.post(`${baseUrl}create-widget-order`, data, {
|
92
|
-
headers: {
|
93
|
-
"Content-Type": "application/json"
|
94
|
-
}
|
95
|
-
});
|
96
|
-
if (res.data && ((_a = res.data) == null ? void 0 : _a.result)) {
|
97
|
-
console.log("token", (_b = res.data) == null ? void 0 : _b.data);
|
98
|
-
setDcToken((_d = (_c = res.data) == null ? void 0 : _c.data) == null ? void 0 : _d.dctoken);
|
99
|
-
const tokenCallback = async (response) => {
|
100
|
-
var _a2, _b2, _c2;
|
101
|
-
console.log("response for token call back", response);
|
102
|
-
if (response.Error) {
|
103
|
-
alert("if");
|
104
|
-
console.log("Error: ", response);
|
105
|
-
setLoading(false);
|
106
|
-
} else {
|
107
|
-
const headers = {
|
108
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
109
|
-
};
|
110
|
-
const quickData = __spreadValues({
|
111
|
-
name: formData.name,
|
112
|
-
postal_code: formData.zip
|
113
|
-
}, response);
|
114
|
-
try {
|
115
|
-
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, {
|
116
|
-
headers
|
117
|
-
});
|
118
|
-
setLoading(false);
|
119
|
-
console.log("quick response", resp);
|
120
|
-
if (((_c2 = resp == null ? void 0 : resp.data) == null ? void 0 : _c2.result) && (resp == null ? void 0 : resp.status) === 200) {
|
121
|
-
console.log("Payment success!", resp == null ? void 0 : resp.data);
|
122
|
-
setFormData({
|
123
|
-
name: "John Doe",
|
124
|
-
card_number: "4761 7310 0000 0043",
|
125
|
-
exp_month: "12",
|
126
|
-
exp_year: "2024",
|
127
|
-
cvv: "201",
|
128
|
-
zip: ""
|
129
|
-
});
|
130
|
-
} else {
|
131
|
-
console.log("Payment failed!", resp == null ? void 0 : resp.data);
|
132
|
-
}
|
133
|
-
} catch (error2) {
|
134
|
-
console.log("Error: ", error2);
|
135
|
-
setLoading(false);
|
136
|
-
}
|
137
|
-
}
|
138
|
-
};
|
139
|
-
window == null ? void 0 : window.DatacapWebToken.requestToken((_f = (_e = res.data) == null ? void 0 : _e.data) == null ? void 0 : _f.dctoken, "PaymentForm", tokenCallback);
|
140
|
-
} else {
|
141
|
-
setLoading(false);
|
142
|
-
console.log("res", (_g = res.data) == null ? void 0 : _g.data);
|
143
|
-
}
|
144
|
-
} catch (error2) {
|
145
|
-
setLoading(false);
|
146
|
-
console.log(error2);
|
147
|
-
}
|
148
|
-
}
|
149
|
-
};
|
150
|
-
const handleCardFormat = (numericValue) => {
|
151
|
-
const cleaned = ("" + numericValue).replace(/\D/g, "");
|
152
|
-
const match = cleaned.match(/^(\d{4})(\d{4})(\d{4})(\d{4})$/);
|
153
|
-
if (match) {
|
154
|
-
return `${match[1]} ${match[2]} ${match[3]} ${match[4]}`;
|
155
|
-
}
|
156
|
-
return numericValue;
|
157
|
-
};
|
158
|
-
const handleCardNumberChange = (value) => {
|
159
|
-
setError((prev) => __spreadProps(__spreadValues({}, prev), { card_number: "" }));
|
160
|
-
if (value && value.match(/[a-zA-Z]/)) {
|
161
|
-
setError((prev) => __spreadProps(__spreadValues({}, prev), {
|
162
|
-
card_number: "Invalid input. Please enter only numbers."
|
163
|
-
}));
|
164
|
-
} else if (value.length > 12 && !(window == null ? void 0 : window.DatacapWebToken.validateCardNumber(value == null ? void 0 : value.replaceAll(" ", "")))) {
|
165
|
-
setError((prev) => __spreadProps(__spreadValues({}, prev), {
|
166
|
-
card_number: "Invalid Card Number"
|
167
|
-
}));
|
168
|
-
} else if (!value.length) {
|
169
|
-
setError((prev) => __spreadProps(__spreadValues({}, prev), {
|
170
|
-
card_number: "Card Number required"
|
171
|
-
}));
|
172
|
-
} else {
|
173
|
-
setError({});
|
174
|
-
}
|
175
|
-
};
|
176
|
-
const handleMonthChange = (value) => {
|
177
|
-
setError((prev) => __spreadProps(__spreadValues({}, prev), { exp_month: "" }));
|
178
|
-
if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 1 && parseInt(value, 10) <= 12)) {
|
179
|
-
setError({});
|
180
|
-
} else if (!value.length) {
|
181
|
-
setError((prev) => __spreadProps(__spreadValues({}, prev), {
|
182
|
-
exp_month: "Month is required"
|
183
|
-
}));
|
184
|
-
} else {
|
185
|
-
setError((prev) => __spreadProps(__spreadValues({}, prev), {
|
186
|
-
exp_month: "Value should be between 1 and 12"
|
187
|
-
}));
|
188
|
-
}
|
189
|
-
};
|
190
|
-
const handleYearChange = (value) => {
|
191
|
-
setError((prev) => __spreadProps(__spreadValues({}, prev), { exp_year: "" }));
|
192
|
-
if (window == null ? void 0 : window.DatacapWebToken.validateExpirationDate(formData.exp_month, value)) {
|
193
|
-
setError({});
|
194
|
-
} else if (!value.length) {
|
195
|
-
setError((prev) => __spreadProps(__spreadValues({}, prev), {
|
196
|
-
exp_year: "Year is required"
|
197
|
-
}));
|
198
|
-
} else {
|
199
|
-
setError((prev) => __spreadProps(__spreadValues({}, prev), {
|
200
|
-
exp_year: "Invalid Expiration Date."
|
201
|
-
}));
|
202
|
-
}
|
203
|
-
};
|
204
|
-
const handleCVVChange = (value) => {
|
205
|
-
setError((prev) => __spreadProps(__spreadValues({}, prev), { cvv: "" }));
|
206
|
-
if (window == null ? void 0 : window.DatacapWebToken.validateCVV(value)) {
|
207
|
-
setError({});
|
208
|
-
} else if (!value.length) {
|
209
|
-
setError((prev) => __spreadProps(__spreadValues({}, prev), {
|
210
|
-
cvv: "CVV is required"
|
211
|
-
}));
|
212
|
-
} else {
|
213
|
-
setError((prev) => __spreadProps(__spreadValues({}, prev), {
|
214
|
-
cvv: "Invalid CVV."
|
215
|
-
}));
|
216
|
-
}
|
217
|
-
};
|
218
|
-
const handleChange = (e) => {
|
219
|
-
const token = e.target.getAttribute("data-token") || "";
|
220
|
-
const value = e.target.value;
|
221
|
-
setFormData((prev) => __spreadProps(__spreadValues({}, prev), { [token]: value }));
|
222
|
-
if (token === "card_number") {
|
223
|
-
handleCardNumberChange(value);
|
224
|
-
}
|
225
|
-
if (token === "exp_month") {
|
226
|
-
handleMonthChange(value);
|
227
|
-
}
|
228
|
-
if (token === "exp_year") {
|
229
|
-
handleYearChange(value);
|
230
|
-
}
|
231
|
-
if (token === "cvv") {
|
232
|
-
handleCVVChange(value);
|
233
|
-
}
|
234
|
-
};
|
235
|
-
(0, import_react.useEffect)(() => {
|
236
|
-
const scriptId = "my-script";
|
237
|
-
const existingScript = document.getElementById(scriptId);
|
238
|
-
if (!existingScript) {
|
239
|
-
const script = document.createElement("script");
|
240
|
-
script.src = "https://token-cert.dcap.com/v1/client";
|
241
|
-
script.id = scriptId;
|
242
|
-
script.async = true;
|
243
|
-
script.onload = () => {
|
244
|
-
if (typeof window !== "undefined" && window.DatacapWebToken) {
|
245
|
-
console.log("DatacapWebToken", window.DatacapWebToken);
|
246
|
-
} else {
|
247
|
-
console.log("DatacapWebToken is not loaded yet.");
|
248
|
-
}
|
249
|
-
};
|
250
|
-
document.head.appendChild(script);
|
251
|
-
}
|
252
|
-
return () => {
|
253
|
-
const script = document.getElementById(scriptId);
|
254
|
-
if (script) {
|
255
|
-
document.head.removeChild(script);
|
256
|
-
}
|
257
|
-
};
|
258
|
-
}, []);
|
259
|
-
const handleClose = () => {
|
260
|
-
setShow(false);
|
261
|
-
};
|
262
|
-
const handleOpen = () => {
|
263
|
-
console.log("open");
|
264
|
-
setShow(true);
|
265
|
-
};
|
266
|
-
console.log(show, "open");
|
267
|
-
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(
|
268
|
-
import_Modal.default,
|
269
|
-
{
|
270
|
-
show,
|
271
|
-
onHide: handleClose,
|
272
|
-
backdrop: "static",
|
273
|
-
keyboard: false,
|
274
|
-
size: "lg"
|
275
|
-
},
|
276
|
-
/* @__PURE__ */ import_react.default.createElement(import_Modal.default.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(
|
277
|
-
"button",
|
278
|
-
{
|
279
|
-
className: "close-pop",
|
280
|
-
onClick: () => {
|
281
|
-
setShow(false);
|
282
|
-
}
|
283
|
-
},
|
284
|
-
/* @__PURE__ */ import_react.default.createElement(
|
285
|
-
"svg",
|
286
|
-
{
|
287
|
-
xmlns: "http://www.w3.org/2000/svg",
|
288
|
-
width: 37,
|
289
|
-
height: 37,
|
290
|
-
viewBox: "0 0 21 21"
|
291
|
-
},
|
292
|
-
/* @__PURE__ */ import_react.default.createElement(
|
293
|
-
"path",
|
294
|
-
{
|
295
|
-
fill: "none",
|
296
|
-
stroke: "currentColor",
|
297
|
-
strokeLinecap: "round",
|
298
|
-
strokeLinejoin: "round",
|
299
|
-
d: "m7.5 7.5l6 6m0-6l-6 6"
|
300
|
-
}
|
301
|
-
)
|
302
|
-
)
|
303
|
-
), /* @__PURE__ */ import_react.default.createElement("div", { className: "row" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "comp-name" }, /* @__PURE__ */ import_react.default.createElement(
|
304
|
-
"img",
|
305
|
-
{
|
306
|
-
src: "https://invoicestaging.skysystemz.com/assets/products/65c49a2740ff1.png",
|
307
|
-
alt: "",
|
308
|
-
className: "client-logo"
|
309
|
-
}
|
310
|
-
)), /* @__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(
|
311
|
-
"i",
|
312
|
-
{
|
313
|
-
className: "fa fa-qrcode fa-2x",
|
314
|
-
id: "qrIcon",
|
315
|
-
title: "Show QR Code",
|
316
|
-
onClick: () => setToggleQr(!toggleQr)
|
317
|
-
}
|
318
|
-
)), /* @__PURE__ */ import_react.default.createElement("div", { id: "qrCode", style: {
|
319
|
-
display: toggleQr ? "block" : "none"
|
320
|
-
} }, /* @__PURE__ */ import_react.default.createElement(
|
321
|
-
"img",
|
322
|
-
{
|
323
|
-
src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARQAAAEUCAYAAADqcMl5AAAAAklEQVR4AewaftIAABJaSURBVO3BQY7gRhLAQFLo/3+ZO8c8FSCoemwvMsL+YK21LnhYa61LHtZa65KHtda65GGttS55WGutSx7WWuuSh7XWuuRhrbUueVhrrUse1lrrkoe11rrkYa21LnlYa61LHtZa65KHtda65IePVP6miknlpGJSualiUjmpOFGZKk5UpopJ5YuKE5WpYlI5qZhU3qiYVKaKSeWkYlI5qXhD5aRiUvmbKr54WGutSx7WWuuSh7XWuuSHyypuUvlNFW+oTCpTxRsqU8UXKlPFicqJylRxonJScVLxhspU8UbFGxX/pIqbVG56WGutSx7WWuuSh7XWuuSHX6byRsVNKlPFpPJGxW9SmSreqJhUTiomlROVk4ovVL5QOak4UTlR+TdReaPiNz2stdYlD2utdcnDWmtd8sN/XMWkMlVMKlPFpHKiMlWcqJxUTCqTyk0Vk8pJxaQyVUwqN1WcqEwVk8qk8kXFpPJGxaTy/+RhrbUueVhrrUse1lrrkh/+z6lMFScVN1VMKpPKVD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oe11rrkYa21LvnhMpV/UsWkMlVMKicqJxVTxRcqU8VJxRsVJypTxRsqX1S8oTJVnKhMFZPKScVUMalMFScqU8WkclIxqfyTHtZa65KHtda65GGttS6xP1hrrQse1lrrkoe11rrkYa21LnlYa61LHtZa65KHtda65GGttS55WGutSx7WWuuSh7XWuuRhrbUueVhrrUse1lrrkoe11rrkYa21Lvkf/C+HzIiJCzEAAAAASUVORK5CYII=",
|
324
|
-
alt: "QRCode",
|
325
|
-
srcSet: ""
|
326
|
-
}
|
327
|
-
)), /* @__PURE__ */ import_react.default.createElement(
|
328
|
-
"form",
|
329
|
-
{
|
330
|
-
id: "PaymentForm",
|
331
|
-
className: "payment-form",
|
332
|
-
onSubmit: handleSubmit
|
333
|
-
},
|
334
|
-
/* @__PURE__ */ import_react.default.createElement(
|
335
|
-
"input",
|
336
|
-
{
|
337
|
-
type: "hidden",
|
338
|
-
id: "dctoken",
|
339
|
-
defaultValue: dcToken,
|
340
|
-
name: "dctoken"
|
341
|
-
}
|
342
|
-
),
|
343
|
-
/* @__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" }))),
|
344
|
-
/* @__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(
|
345
|
-
"input",
|
346
|
-
{
|
347
|
-
"data-token": "name",
|
348
|
-
id: "NameOnCard",
|
349
|
-
className: "form-control required",
|
350
|
-
type: "text",
|
351
|
-
maxLength: 100,
|
352
|
-
placeholder: "name",
|
353
|
-
value: formData == null ? void 0 : formData.name,
|
354
|
-
onChange: handleChange
|
355
|
-
}
|
356
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
357
|
-
"span",
|
358
|
-
{
|
359
|
-
id: "NameOnCard-error",
|
360
|
-
style: { color: "red" }
|
361
|
-
}
|
362
|
-
)),
|
363
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "form-group" }, /* @__PURE__ */ import_react.default.createElement(
|
364
|
-
"input",
|
365
|
-
{
|
366
|
-
"data-token": "card_number",
|
367
|
-
className: "null card-image form-control required",
|
368
|
-
type: "text",
|
369
|
-
maxLength: 19,
|
370
|
-
placeholder: "0000 0000 0000 0000",
|
371
|
-
value: handleCardFormat(formData == null ? void 0 : formData.card_number),
|
372
|
-
onChange: handleChange
|
373
|
-
}
|
374
|
-
), error.card_number && /* @__PURE__ */ import_react.default.createElement(
|
375
|
-
"span",
|
376
|
-
{
|
377
|
-
id: "card_number-error",
|
378
|
-
style: { color: "red" }
|
379
|
-
},
|
380
|
-
error.card_number
|
381
|
-
)),
|
382
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ import_react.default.createElement(
|
383
|
-
"input",
|
384
|
-
{
|
385
|
-
"data-token": "exp_month",
|
386
|
-
className: "form-control required",
|
387
|
-
type: "text",
|
388
|
-
placeholder: "MM",
|
389
|
-
maxLength: 2,
|
390
|
-
value: formData == null ? void 0 : formData.exp_month,
|
391
|
-
onChange: handleChange
|
392
|
-
}
|
393
|
-
), error.exp_month && /* @__PURE__ */ import_react.default.createElement(
|
394
|
-
"span",
|
395
|
-
{
|
396
|
-
id: "exp_month-error",
|
397
|
-
style: { color: "red" }
|
398
|
-
},
|
399
|
-
error.exp_month
|
400
|
-
)),
|
401
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ import_react.default.createElement(
|
402
|
-
"input",
|
403
|
-
{
|
404
|
-
"data-token": "exp_year",
|
405
|
-
className: "form-control required",
|
406
|
-
type: "text",
|
407
|
-
placeholder: "YYYY",
|
408
|
-
maxLength: 4,
|
409
|
-
value: formData == null ? void 0 : formData.exp_year,
|
410
|
-
onChange: handleChange
|
411
|
-
}
|
412
|
-
), error.exp_year && /* @__PURE__ */ import_react.default.createElement(
|
413
|
-
"span",
|
414
|
-
{
|
415
|
-
id: "exp_year-error",
|
416
|
-
style: { color: "red" }
|
417
|
-
},
|
418
|
-
error.exp_year
|
419
|
-
)),
|
420
|
-
/* @__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(
|
421
|
-
"input",
|
422
|
-
{
|
423
|
-
"data-token": "cvv",
|
424
|
-
className: "form-control required",
|
425
|
-
type: "text",
|
426
|
-
maxLength: 4,
|
427
|
-
placeholder: "CVC",
|
428
|
-
value: formData == null ? void 0 : formData.cvv,
|
429
|
-
onChange: handleChange
|
430
|
-
}
|
431
|
-
), /* @__PURE__ */ import_react.default.createElement("i", { id: "cvc", className: "fa fa-question-circle" })), error.cvv && /* @__PURE__ */ import_react.default.createElement(
|
432
|
-
"span",
|
433
|
-
{
|
434
|
-
id: "cvv-error",
|
435
|
-
style: { color: "red" }
|
436
|
-
},
|
437
|
-
error.cvv
|
438
|
-
), /* @__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" }))),
|
439
|
-
/* @__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(
|
440
|
-
"input",
|
441
|
-
{
|
442
|
-
id: "ZIPCode",
|
443
|
-
"data-token": "zip",
|
444
|
-
className: "form-control required",
|
445
|
-
type: "text",
|
446
|
-
maxLength: 7,
|
447
|
-
placeholder: "000000",
|
448
|
-
value: formData == null ? void 0 : formData.zip,
|
449
|
-
onChange: handleChange
|
450
|
-
}
|
451
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
452
|
-
"a",
|
453
|
-
{
|
454
|
-
tabIndex: 0,
|
455
|
-
role: "button",
|
456
|
-
"data-toggle": "popover",
|
457
|
-
"data-trigger": "focus",
|
458
|
-
"data-placement": "left",
|
459
|
-
"data-content": "Enter the ZIP/Postal code for your credit card billing address."
|
460
|
-
},
|
461
|
-
/* @__PURE__ */ import_react.default.createElement("i", { className: "fa fa-question-circle" })
|
462
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
463
|
-
"span",
|
464
|
-
{
|
465
|
-
id: "ZIPCode-error",
|
466
|
-
style: { color: "red", display: "none" }
|
467
|
-
},
|
468
|
-
"This field is required"
|
469
|
-
))),
|
470
|
-
/* @__PURE__ */ import_react.default.createElement(
|
471
|
-
"button",
|
472
|
-
{
|
473
|
-
id: "PayButton",
|
474
|
-
className: "btn btn-block btn-success submit-button",
|
475
|
-
type: "submit"
|
476
|
-
},
|
477
|
-
/* @__PURE__ */ import_react.default.createElement("span", { className: "submit-button-lock" }),
|
478
|
-
/* @__PURE__ */ import_react.default.createElement("span", { className: "align-middle" }, "Pay $", amount || 1)
|
479
|
-
)
|
480
|
-
), /* @__PURE__ */ import_react.default.createElement("div", { className: "powerd-by-part", style: {
|
481
|
-
display: "flex",
|
482
|
-
fontSize: "12px",
|
483
|
-
textAlign: "center",
|
484
|
-
alignItems: "center",
|
485
|
-
justifyContent: "center",
|
486
|
-
margin: "8px 0 20px 0"
|
487
|
-
} }, /* @__PURE__ */ import_react.default.createElement(
|
488
|
-
"svg",
|
489
|
-
{
|
490
|
-
xmlns: "http://www.w3.org/2000/svg",
|
491
|
-
width: 20,
|
492
|
-
height: 20,
|
493
|
-
viewBox: "0 0 26 26"
|
494
|
-
},
|
495
|
-
/* @__PURE__ */ import_react.default.createElement(
|
496
|
-
"path",
|
497
|
-
{
|
498
|
-
fill: "currentColor",
|
499
|
-
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"
|
500
|
-
}
|
501
|
-
)
|
502
|
-
), "Secure payments powered by Fractal", /* @__PURE__ */ import_react.default.createElement(
|
503
|
-
"img",
|
504
|
-
{
|
505
|
-
src: "https://ui.fractalpay.com/favicon.ico",
|
506
|
-
alt: "Fractal logo",
|
507
|
-
className: "powered-logo",
|
508
|
-
style: {
|
509
|
-
width: "18px",
|
510
|
-
height: "18px",
|
511
|
-
float: "right",
|
512
|
-
padding: "2px",
|
513
|
-
background: "#000",
|
514
|
-
borderRadius: "4px",
|
515
|
-
marginLeft: "5px"
|
516
|
-
}
|
517
|
-
}
|
518
|
-
))))))))))))
|
519
|
-
));
|
520
|
-
}
|
521
|
-
// Annotate the CommonJS export names for ESM import in node:
|
522
|
-
0 && (module.exports = {
|
523
|
-
PaywithFractal
|
524
|
-
});
|
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 ke=require("bootstrap/dist/css/bootstrap.min.css");var U=N(require("axios"),1),e=N(require("react"),1),b=require("react-bootstrap");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+UJlqjhROamYVCaV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THtZa65KHtda65GGttS6xP1hrrQse1lrrkoe11rrkYa21LnlYa61LHtZa65KHtda65GGttS55WGutSx7WWuuSh7XWuuRhrbUueVhrrUse1lrrkoe11rrkYa21Lvkf/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});
|