@pinerohit11/testwidget 0.1.8 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (248) hide show
  1. package/.next/app-build-manifest.json +15 -0
  2. package/.next/build-manifest.json +20 -0
  3. package/.next/cache/.rscinfo +1 -0
  4. package/.next/cache/webpack/client-development/0.pack.gz +0 -0
  5. package/.next/cache/webpack/client-development/1.pack.gz +0 -0
  6. package/.next/cache/webpack/client-development/10.pack.gz +0 -0
  7. package/.next/cache/webpack/client-development/11.pack.gz +0 -0
  8. package/.next/cache/webpack/client-development/2.pack.gz +0 -0
  9. package/.next/cache/webpack/client-development/3.pack.gz +0 -0
  10. package/.next/cache/webpack/client-development/4.pack.gz +0 -0
  11. package/.next/cache/webpack/client-development/5.pack.gz +0 -0
  12. package/.next/cache/webpack/client-development/6.pack.gz +0 -0
  13. package/.next/cache/webpack/client-development/7.pack.gz +0 -0
  14. package/.next/cache/webpack/client-development/8.pack.gz +0 -0
  15. package/.next/cache/webpack/client-development/9.pack.gz +0 -0
  16. package/.next/cache/webpack/client-development/index.pack.gz +0 -0
  17. package/.next/cache/webpack/client-development/index.pack.gz.old +0 -0
  18. package/.next/cache/webpack/server-development/0.pack.gz +0 -0
  19. package/.next/cache/webpack/server-development/1.pack.gz +0 -0
  20. package/.next/cache/webpack/server-development/10.pack.gz +0 -0
  21. package/.next/cache/webpack/server-development/11.pack.gz +0 -0
  22. package/.next/cache/webpack/server-development/12.pack.gz +0 -0
  23. package/.next/cache/webpack/server-development/13.pack.gz +0 -0
  24. package/.next/cache/webpack/server-development/14.pack.gz +0 -0
  25. package/.next/cache/webpack/server-development/2.pack.gz +0 -0
  26. package/.next/cache/webpack/server-development/3.pack.gz +0 -0
  27. package/.next/cache/webpack/server-development/4.pack.gz +0 -0
  28. package/.next/cache/webpack/server-development/5.pack.gz +0 -0
  29. package/.next/cache/webpack/server-development/6.pack.gz +0 -0
  30. package/.next/cache/webpack/server-development/7.pack.gz +0 -0
  31. package/.next/cache/webpack/server-development/8.pack.gz +0 -0
  32. package/.next/cache/webpack/server-development/9.pack.gz +0 -0
  33. package/.next/cache/webpack/server-development/index.pack.gz +0 -0
  34. package/.next/cache/webpack/server-development/index.pack.gz.old +0 -0
  35. package/.next/package.json +1 -0
  36. package/.next/react-loadable-manifest.json +1 -0
  37. package/.next/server/app/favicon.ico/route.js +86 -0
  38. package/.next/server/app/page.js +383 -0
  39. package/.next/server/app/page_client-reference-manifest.js +1 -0
  40. package/.next/server/app-paths-manifest.json +4 -0
  41. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  42. package/.next/server/middleware-build-manifest.js +22 -0
  43. package/.next/server/middleware-manifest.json +6 -0
  44. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  45. package/.next/server/next-font-manifest.js +1 -0
  46. package/.next/server/next-font-manifest.json +1 -0
  47. package/.next/server/pages-manifest.json +1 -0
  48. package/.next/server/server-reference-manifest.js +1 -0
  49. package/.next/server/server-reference-manifest.json +5 -0
  50. package/.next/server/vendor-chunks/@swc.js +55 -0
  51. package/.next/server/vendor-chunks/asynckit.js +114 -0
  52. package/.next/server/vendor-chunks/axios.js +555 -0
  53. package/.next/server/vendor-chunks/combined-stream.js +24 -0
  54. package/.next/server/vendor-chunks/debug.js +54 -0
  55. package/.next/server/vendor-chunks/delayed-stream.js +24 -0
  56. package/.next/server/vendor-chunks/follow-redirects.js +34 -0
  57. package/.next/server/vendor-chunks/form-data.js +34 -0
  58. package/.next/server/vendor-chunks/has-flag.js +25 -0
  59. package/.next/server/vendor-chunks/mime-db.js +35 -0
  60. package/.next/server/vendor-chunks/mime-types.js +25 -0
  61. package/.next/server/vendor-chunks/ms.js +24 -0
  62. package/.next/server/vendor-chunks/next.js +3185 -0
  63. package/.next/server/vendor-chunks/proxy-from-env.js +25 -0
  64. package/.next/server/vendor-chunks/supports-color.js +25 -0
  65. package/.next/server/webpack-runtime.js +220 -0
  66. package/.next/static/chunks/app/layout.js +146 -0
  67. package/.next/static/chunks/app/page.js +610 -0
  68. package/.next/static/chunks/app-pages-internals.js +193 -0
  69. package/.next/static/chunks/main-app.js +2398 -0
  70. package/.next/static/chunks/polyfills.js +1 -0
  71. package/.next/static/chunks/webpack.js +1411 -0
  72. package/.next/static/css/app/layout.css +713 -0
  73. package/.next/static/development/_buildManifest.js +1 -0
  74. package/.next/static/development/_ssgManifest.js +1 -0
  75. package/.next/static/media/4473ecc91f70f139-s.p.woff +0 -0
  76. package/.next/static/media/463dafcda517f24f-s.p.woff +0 -0
  77. package/.next/static/webpack/0463e0d10a76f0e1.webpack.hot-update.json +1 -0
  78. package/.next/static/webpack/14eb1ee43b84ca5f.webpack.hot-update.json +1 -0
  79. package/.next/static/webpack/1f1fe21203e4c68b.webpack.hot-update.json +1 -0
  80. package/.next/static/webpack/213fdb98a15e3455.webpack.hot-update.json +1 -0
  81. package/.next/static/webpack/228b69a2a9a20202.webpack.hot-update.json +1 -0
  82. package/.next/static/webpack/255aea9c6475b746.webpack.hot-update.json +1 -0
  83. package/.next/static/webpack/2d35c83f0037d0e3.webpack.hot-update.json +1 -0
  84. package/.next/static/webpack/309e2d9634152b60.webpack.hot-update.json +1 -0
  85. package/.next/static/webpack/329e12e211658503.webpack.hot-update.json +1 -0
  86. package/.next/static/webpack/456a8cdc4e32bb1b.webpack.hot-update.json +1 -0
  87. package/.next/static/webpack/4a9375b8e793c38e.webpack.hot-update.json +1 -0
  88. package/.next/static/webpack/500c5340fb4c6cd5.webpack.hot-update.json +1 -0
  89. package/.next/static/webpack/5031cfaa2d3d892d.webpack.hot-update.json +1 -0
  90. package/.next/static/webpack/51f0e2a03e8d18a6.webpack.hot-update.json +1 -0
  91. package/.next/static/webpack/5ad56258b0e90bef.webpack.hot-update.json +1 -0
  92. package/.next/static/webpack/5c7e83ae2adb882e.webpack.hot-update.json +1 -0
  93. package/.next/static/webpack/5c8dada5acec56f7.webpack.hot-update.json +1 -0
  94. package/.next/static/webpack/5e709b5694e5ad26.webpack.hot-update.json +1 -0
  95. package/.next/static/webpack/6246449706d4b449.webpack.hot-update.json +1 -0
  96. package/.next/static/webpack/633457081244afec._.hot-update.json +1 -0
  97. package/.next/static/webpack/6498563004a57942.webpack.hot-update.json +1 -0
  98. package/.next/static/webpack/65c43818d6f690fe.webpack.hot-update.json +1 -0
  99. package/.next/static/webpack/681ce36f0645d689.webpack.hot-update.json +1 -0
  100. package/.next/static/webpack/6f00711e3d258954.webpack.hot-update.json +1 -0
  101. package/.next/static/webpack/81f6646c28a82804.webpack.hot-update.json +1 -0
  102. package/.next/static/webpack/8522f92ca02de0c8.webpack.hot-update.json +1 -0
  103. package/.next/static/webpack/8894e91a6b3fd5cb.webpack.hot-update.json +1 -0
  104. package/.next/static/webpack/893ddc36c19de1ea.webpack.hot-update.json +1 -0
  105. package/.next/static/webpack/896c5501cdf537b3.webpack.hot-update.json +1 -0
  106. package/.next/static/webpack/8cc442b31ec27e60.webpack.hot-update.json +1 -0
  107. package/.next/static/webpack/8ed684f639abe58b.webpack.hot-update.json +1 -0
  108. package/.next/static/webpack/97615cc2d368fba4.webpack.hot-update.json +1 -0
  109. package/.next/static/webpack/9775f51aeb80d3b2.webpack.hot-update.json +1 -0
  110. package/.next/static/webpack/9bbf208246a2eebb.webpack.hot-update.json +1 -0
  111. package/.next/static/webpack/a74f1afad4b7a8a2.webpack.hot-update.json +1 -0
  112. package/.next/static/webpack/aed2ae614f6605ed.webpack.hot-update.json +1 -0
  113. package/.next/static/webpack/app/layout.228b69a2a9a20202.hot-update.js +22 -0
  114. package/.next/static/webpack/app/layout.2d35c83f0037d0e3.hot-update.js +31 -0
  115. package/.next/static/webpack/app/layout.456a8cdc4e32bb1b.hot-update.js +22 -0
  116. package/.next/static/webpack/app/layout.8894e91a6b3fd5cb.hot-update.js +22 -0
  117. package/.next/static/webpack/app/layout.a74f1afad4b7a8a2.hot-update.js +98 -0
  118. package/.next/static/webpack/app/layout.bb4485d5c54b0ed1.hot-update.js +22 -0
  119. package/.next/static/webpack/app/layout.e5533e94660e066c.hot-update.js +31 -0
  120. package/.next/static/webpack/app/layout.eabe83a6bd680d72.hot-update.js +31 -0
  121. package/.next/static/webpack/app/layout.f3f79b681eb03ce7.hot-update.js +22 -0
  122. package/.next/static/webpack/app/page.0463e0d10a76f0e1.hot-update.js +22 -0
  123. package/.next/static/webpack/app/page.14eb1ee43b84ca5f.hot-update.js +22 -0
  124. package/.next/static/webpack/app/page.1f1fe21203e4c68b.hot-update.js +21 -0
  125. package/.next/static/webpack/app/page.213fdb98a15e3455.hot-update.js +22 -0
  126. package/.next/static/webpack/app/page.255aea9c6475b746.hot-update.js +22 -0
  127. package/.next/static/webpack/app/page.309e2d9634152b60.hot-update.js +22 -0
  128. package/.next/static/webpack/app/page.329e12e211658503.hot-update.js +22 -0
  129. package/.next/static/webpack/app/page.4a9375b8e793c38e.hot-update.js +22 -0
  130. package/.next/static/webpack/app/page.500c5340fb4c6cd5.hot-update.js +22 -0
  131. package/.next/static/webpack/app/page.5031cfaa2d3d892d.hot-update.js +22 -0
  132. package/.next/static/webpack/app/page.51f0e2a03e8d18a6.hot-update.js +22 -0
  133. package/.next/static/webpack/app/page.5ad56258b0e90bef.hot-update.js +22 -0
  134. package/.next/static/webpack/app/page.5c7e83ae2adb882e.hot-update.js +22 -0
  135. package/.next/static/webpack/app/page.5c8dada5acec56f7.hot-update.js +22 -0
  136. package/.next/static/webpack/app/page.5e709b5694e5ad26.hot-update.js +22 -0
  137. package/.next/static/webpack/app/page.6246449706d4b449.hot-update.js +22 -0
  138. package/.next/static/webpack/app/page.6498563004a57942.hot-update.js +22 -0
  139. package/.next/static/webpack/app/page.65c43818d6f690fe.hot-update.js +22 -0
  140. package/.next/static/webpack/app/page.681ce36f0645d689.hot-update.js +22 -0
  141. package/.next/static/webpack/app/page.6f00711e3d258954.hot-update.js +22 -0
  142. package/.next/static/webpack/app/page.81f6646c28a82804.hot-update.js +22 -0
  143. package/.next/static/webpack/app/page.8522f92ca02de0c8.hot-update.js +54 -0
  144. package/.next/static/webpack/app/page.893ddc36c19de1ea.hot-update.js +22 -0
  145. package/.next/static/webpack/app/page.896c5501cdf537b3.hot-update.js +22 -0
  146. package/.next/static/webpack/app/page.8cc442b31ec27e60.hot-update.js +22 -0
  147. package/.next/static/webpack/app/page.8ed684f639abe58b.hot-update.js +603 -0
  148. package/.next/static/webpack/app/page.97615cc2d368fba4.hot-update.js +22 -0
  149. package/.next/static/webpack/app/page.9775f51aeb80d3b2.hot-update.js +22 -0
  150. package/.next/static/webpack/app/page.9bbf208246a2eebb.hot-update.js +22 -0
  151. package/.next/static/webpack/app/page.aed2ae614f6605ed.hot-update.js +22 -0
  152. package/.next/static/webpack/app/page.b4b25d4db23dbc5a.hot-update.js +22 -0
  153. package/.next/static/webpack/app/page.b728482f9b82d921.hot-update.js +571 -0
  154. package/.next/static/webpack/app/page.b7a42026022db1f3.hot-update.js +22 -0
  155. package/.next/static/webpack/app/page.b90118a4d57e76ad.hot-update.js +54 -0
  156. package/.next/static/webpack/app/page.c0a3bb4128bc91cb.hot-update.js +22 -0
  157. package/.next/static/webpack/app/page.c5880161e6d8c38b.hot-update.js +22 -0
  158. package/.next/static/webpack/app/page.c91faac87e6e5e7d.hot-update.js +21 -0
  159. package/.next/static/webpack/app/page.cb281b61855d3afc.hot-update.js +22 -0
  160. package/.next/static/webpack/app/page.cc723ec7106788b2.hot-update.js +22 -0
  161. package/.next/static/webpack/app/page.d00ead7a6d6dd27a.hot-update.js +22 -0
  162. package/.next/static/webpack/app/page.d5492b6ce3aff19a.hot-update.js +22 -0
  163. package/.next/static/webpack/app/page.e1a0b7850e69b555.hot-update.js +22 -0
  164. package/.next/static/webpack/app/page.e6094793daace46f.hot-update.js +22 -0
  165. package/.next/static/webpack/app/page.ef9190246958611b.hot-update.js +22 -0
  166. package/.next/static/webpack/b4b25d4db23dbc5a.webpack.hot-update.json +1 -0
  167. package/.next/static/webpack/b728482f9b82d921.webpack.hot-update.json +1 -0
  168. package/.next/static/webpack/b7a42026022db1f3.webpack.hot-update.json +1 -0
  169. package/.next/static/webpack/b90118a4d57e76ad.webpack.hot-update.json +1 -0
  170. package/.next/static/webpack/bb4485d5c54b0ed1.webpack.hot-update.json +1 -0
  171. package/.next/static/webpack/c0a3bb4128bc91cb.webpack.hot-update.json +1 -0
  172. package/.next/static/webpack/c5880161e6d8c38b.webpack.hot-update.json +1 -0
  173. package/.next/static/webpack/c91faac87e6e5e7d.webpack.hot-update.json +1 -0
  174. package/.next/static/webpack/cb281b61855d3afc.webpack.hot-update.json +1 -0
  175. package/.next/static/webpack/cc723ec7106788b2.webpack.hot-update.json +1 -0
  176. package/.next/static/webpack/d00ead7a6d6dd27a.webpack.hot-update.json +1 -0
  177. package/.next/static/webpack/d5492b6ce3aff19a.webpack.hot-update.json +1 -0
  178. package/.next/static/webpack/e1a0b7850e69b555.webpack.hot-update.json +1 -0
  179. package/.next/static/webpack/e5533e94660e066c.webpack.hot-update.json +1 -0
  180. package/.next/static/webpack/e6094793daace46f.webpack.hot-update.json +1 -0
  181. package/.next/static/webpack/eabe83a6bd680d72.webpack.hot-update.json +1 -0
  182. package/.next/static/webpack/ef9190246958611b.webpack.hot-update.json +1 -0
  183. package/.next/static/webpack/f3f79b681eb03ce7.webpack.hot-update.json +1 -0
  184. package/.next/static/webpack/webpack.0463e0d10a76f0e1.hot-update.js +18 -0
  185. package/.next/static/webpack/webpack.14eb1ee43b84ca5f.hot-update.js +18 -0
  186. package/.next/static/webpack/webpack.1f1fe21203e4c68b.hot-update.js +18 -0
  187. package/.next/static/webpack/webpack.213fdb98a15e3455.hot-update.js +18 -0
  188. package/.next/static/webpack/webpack.228b69a2a9a20202.hot-update.js +18 -0
  189. package/.next/static/webpack/webpack.255aea9c6475b746.hot-update.js +18 -0
  190. package/.next/static/webpack/webpack.2d35c83f0037d0e3.hot-update.js +18 -0
  191. package/.next/static/webpack/webpack.309e2d9634152b60.hot-update.js +18 -0
  192. package/.next/static/webpack/webpack.329e12e211658503.hot-update.js +18 -0
  193. package/.next/static/webpack/webpack.456a8cdc4e32bb1b.hot-update.js +18 -0
  194. package/.next/static/webpack/webpack.4a9375b8e793c38e.hot-update.js +18 -0
  195. package/.next/static/webpack/webpack.500c5340fb4c6cd5.hot-update.js +18 -0
  196. package/.next/static/webpack/webpack.5031cfaa2d3d892d.hot-update.js +18 -0
  197. package/.next/static/webpack/webpack.51f0e2a03e8d18a6.hot-update.js +18 -0
  198. package/.next/static/webpack/webpack.5ad56258b0e90bef.hot-update.js +18 -0
  199. package/.next/static/webpack/webpack.5c7e83ae2adb882e.hot-update.js +18 -0
  200. package/.next/static/webpack/webpack.5c8dada5acec56f7.hot-update.js +18 -0
  201. package/.next/static/webpack/webpack.5e709b5694e5ad26.hot-update.js +18 -0
  202. package/.next/static/webpack/webpack.6246449706d4b449.hot-update.js +18 -0
  203. package/.next/static/webpack/webpack.6498563004a57942.hot-update.js +18 -0
  204. package/.next/static/webpack/webpack.65c43818d6f690fe.hot-update.js +18 -0
  205. package/.next/static/webpack/webpack.681ce36f0645d689.hot-update.js +18 -0
  206. package/.next/static/webpack/webpack.6f00711e3d258954.hot-update.js +18 -0
  207. package/.next/static/webpack/webpack.81f6646c28a82804.hot-update.js +18 -0
  208. package/.next/static/webpack/webpack.8522f92ca02de0c8.hot-update.js +30 -0
  209. package/.next/static/webpack/webpack.8894e91a6b3fd5cb.hot-update.js +18 -0
  210. package/.next/static/webpack/webpack.893ddc36c19de1ea.hot-update.js +18 -0
  211. package/.next/static/webpack/webpack.896c5501cdf537b3.hot-update.js +18 -0
  212. package/.next/static/webpack/webpack.8cc442b31ec27e60.hot-update.js +18 -0
  213. package/.next/static/webpack/webpack.8ed684f639abe58b.hot-update.js +18 -0
  214. package/.next/static/webpack/webpack.97615cc2d368fba4.hot-update.js +18 -0
  215. package/.next/static/webpack/webpack.9775f51aeb80d3b2.hot-update.js +18 -0
  216. package/.next/static/webpack/webpack.9bbf208246a2eebb.hot-update.js +18 -0
  217. package/.next/static/webpack/webpack.a74f1afad4b7a8a2.hot-update.js +18 -0
  218. package/.next/static/webpack/webpack.aed2ae614f6605ed.hot-update.js +18 -0
  219. package/.next/static/webpack/webpack.b4b25d4db23dbc5a.hot-update.js +18 -0
  220. package/.next/static/webpack/webpack.b728482f9b82d921.hot-update.js +18 -0
  221. package/.next/static/webpack/webpack.b7a42026022db1f3.hot-update.js +18 -0
  222. package/.next/static/webpack/webpack.b90118a4d57e76ad.hot-update.js +30 -0
  223. package/.next/static/webpack/webpack.bb4485d5c54b0ed1.hot-update.js +18 -0
  224. package/.next/static/webpack/webpack.c0a3bb4128bc91cb.hot-update.js +18 -0
  225. package/.next/static/webpack/webpack.c5880161e6d8c38b.hot-update.js +18 -0
  226. package/.next/static/webpack/webpack.c91faac87e6e5e7d.hot-update.js +18 -0
  227. package/.next/static/webpack/webpack.cb281b61855d3afc.hot-update.js +18 -0
  228. package/.next/static/webpack/webpack.cc723ec7106788b2.hot-update.js +18 -0
  229. package/.next/static/webpack/webpack.d00ead7a6d6dd27a.hot-update.js +18 -0
  230. package/.next/static/webpack/webpack.d5492b6ce3aff19a.hot-update.js +18 -0
  231. package/.next/static/webpack/webpack.e1a0b7850e69b555.hot-update.js +18 -0
  232. package/.next/static/webpack/webpack.e5533e94660e066c.hot-update.js +18 -0
  233. package/.next/static/webpack/webpack.e6094793daace46f.hot-update.js +18 -0
  234. package/.next/static/webpack/webpack.eabe83a6bd680d72.hot-update.js +18 -0
  235. package/.next/static/webpack/webpack.ef9190246958611b.hot-update.js +18 -0
  236. package/.next/static/webpack/webpack.f3f79b681eb03ce7.hot-update.js +18 -0
  237. package/.next/trace +116 -0
  238. package/.next/types/app/layout.ts +84 -0
  239. package/.next/types/app/page.ts +84 -0
  240. package/.next/types/cache-life.d.ts +139 -0
  241. package/.next/types/package.json +1 -0
  242. package/.vscode/settings.json +22 -0
  243. package/dist/index.d.mts +5 -2
  244. package/dist/index.d.ts +5 -2
  245. package/dist/index.js +415 -4
  246. package/dist/index.mjs +418 -4
  247. package/global.d.ts +3 -0
  248. package/package.json +4 -3
package/dist/index.mjs CHANGED
@@ -1,8 +1,422 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+
1
21
  // src/app/components/Greet.tsx
2
- import React from "react";
3
- function Greet({ name }) {
4
- return /* @__PURE__ */ React.createElement("h1", null, "Hello, ", name, "!");
22
+ import axios from "axios";
23
+ import React, { useState } from "react";
24
+ function PaywithFractal({ name, amount, orderId, fractalPayClientKey }) {
25
+ const baseUrl = "http://192.168.1.52:8082/";
26
+ const masterBaseUrl = "http://192.168.1.52:8081/";
27
+ console.log(name, "name");
28
+ const [dcToken, setDcToken] = useState("");
29
+ const [error, setError] = useState({});
30
+ const [toggleQr, setToggleQr] = useState(false);
31
+ const [formData, setFormData] = useState({
32
+ name: "John Doe",
33
+ card_number: "4761 7310 0000 0043",
34
+ exp_month: "12",
35
+ exp_year: "2024",
36
+ cvv: "201",
37
+ zip: ""
38
+ });
39
+ const [loading, setLoading] = useState(false);
40
+ const handleSubmit = async (e) => {
41
+ var _a, _b, _c, _d, _e, _f, _g;
42
+ e.preventDefault();
43
+ const data = {
44
+ description: "widget payment",
45
+ amount: amount || "1.00",
46
+ phone_number: "1234567908",
47
+ zip: formData.zip,
48
+ orderId: orderId || "",
49
+ fractalpayPublicKey: fractalPayClientKey
50
+ };
51
+ if (Object.keys(error).length < 1) {
52
+ try {
53
+ setLoading(true);
54
+ const res = await axios.post(`${baseUrl}create-widget-order`, data, {
55
+ headers: {
56
+ "Content-Type": "application/json"
57
+ }
58
+ });
59
+ if (res.data && ((_a = res.data) == null ? void 0 : _a.result)) {
60
+ console.log("token", (_b = res.data) == null ? void 0 : _b.data);
61
+ setDcToken((_d = (_c = res.data) == null ? void 0 : _c.data) == null ? void 0 : _d.dctoken);
62
+ const tokenCallback = async (response) => {
63
+ var _a2, _b2, _c2;
64
+ console.log("response for token call back", response);
65
+ if (response.Error) {
66
+ alert("if");
67
+ console.log("Error: ", response);
68
+ setLoading(false);
69
+ } else {
70
+ const headers = {
71
+ "Content-Type": "application/x-www-form-urlencoded"
72
+ };
73
+ const quickData = __spreadValues({
74
+ name: formData.name,
75
+ postal_code: formData.zip
76
+ }, response);
77
+ try {
78
+ const resp = await axios.post(`${masterBaseUrl}quick-pay/${(_b2 = (_a2 = res.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.posSalesIdEncode}`, quickData, {
79
+ headers
80
+ });
81
+ setLoading(false);
82
+ console.log("quick response", resp);
83
+ if (((_c2 = resp == null ? void 0 : resp.data) == null ? void 0 : _c2.result) && (resp == null ? void 0 : resp.status) === 200) {
84
+ console.log("Payment success!", resp == null ? void 0 : resp.data);
85
+ setFormData({
86
+ name: "John Doe",
87
+ card_number: "4761 7310 0000 0043",
88
+ exp_month: "12",
89
+ exp_year: "2024",
90
+ cvv: "201",
91
+ zip: ""
92
+ });
93
+ } else {
94
+ console.log("Payment failed!", resp == null ? void 0 : resp.data);
95
+ }
96
+ } catch (error2) {
97
+ console.log("Error: ", error2);
98
+ setLoading(false);
99
+ }
100
+ }
101
+ };
102
+ window == null ? void 0 : window.DatacapWebToken.requestToken((_f = (_e = res.data) == null ? void 0 : _e.data) == null ? void 0 : _f.dctoken, "PaymentForm", tokenCallback);
103
+ } else {
104
+ setLoading(false);
105
+ console.log("res", (_g = res.data) == null ? void 0 : _g.data);
106
+ }
107
+ } catch (error2) {
108
+ setLoading(false);
109
+ console.log(error2);
110
+ }
111
+ }
112
+ };
113
+ const handleCardFormat = (numericValue) => {
114
+ const cleaned = ("" + numericValue).replace(/\D/g, "");
115
+ const match = cleaned.match(/^(\d{4})(\d{4})(\d{4})(\d{4})$/);
116
+ if (match) {
117
+ return `${match[1]} ${match[2]} ${match[3]} ${match[4]}`;
118
+ }
119
+ return numericValue;
120
+ };
121
+ const handleCardNumberChange = (value) => {
122
+ setError((prev) => __spreadProps(__spreadValues({}, prev), { card_number: "" }));
123
+ if (value && value.match(/[a-zA-Z]/)) {
124
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
125
+ card_number: "Invalid input. Please enter only numbers."
126
+ }));
127
+ } else if (value.length > 12 && !(window == null ? void 0 : window.DatacapWebToken.validateCardNumber(value == null ? void 0 : value.replaceAll(" ", "")))) {
128
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
129
+ card_number: "Invalid Card Number"
130
+ }));
131
+ } else if (!value.length) {
132
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
133
+ card_number: "Card Number required"
134
+ }));
135
+ } else {
136
+ setError({});
137
+ }
138
+ };
139
+ const handleMonthChange = (value) => {
140
+ setError((prev) => __spreadProps(__spreadValues({}, prev), { exp_month: "" }));
141
+ if (/^\d{0,2}$/.test(value) && (value === "" || parseInt(value, 10) >= 1 && parseInt(value, 10) <= 12)) {
142
+ setError({});
143
+ } else if (!value.length) {
144
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
145
+ exp_month: "Month is required"
146
+ }));
147
+ } else {
148
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
149
+ exp_month: "Value should be between 1 and 12"
150
+ }));
151
+ }
152
+ };
153
+ const handleYearChange = (value) => {
154
+ setError((prev) => __spreadProps(__spreadValues({}, prev), { exp_year: "" }));
155
+ if (window == null ? void 0 : window.DatacapWebToken.validateExpirationDate(formData.exp_month, value)) {
156
+ setError({});
157
+ } else if (!value.length) {
158
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
159
+ exp_year: "Year is required"
160
+ }));
161
+ } else {
162
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
163
+ exp_year: "Invalid Expiration Date."
164
+ }));
165
+ }
166
+ };
167
+ const handleCVVChange = (value) => {
168
+ setError((prev) => __spreadProps(__spreadValues({}, prev), { cvv: "" }));
169
+ if (window == null ? void 0 : window.DatacapWebToken.validateCVV(value)) {
170
+ setError({});
171
+ } else if (!value.length) {
172
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
173
+ cvv: "CVV is required"
174
+ }));
175
+ } else {
176
+ setError((prev) => __spreadProps(__spreadValues({}, prev), {
177
+ cvv: "Invalid CVV."
178
+ }));
179
+ }
180
+ };
181
+ const handleChange = (e) => {
182
+ const token = e.target.getAttribute("data-token") || "";
183
+ const value = e.target.value;
184
+ setFormData((prev) => __spreadProps(__spreadValues({}, prev), { [token]: value }));
185
+ if (token === "card_number") {
186
+ handleCardNumberChange(value);
187
+ }
188
+ if (token === "exp_month") {
189
+ handleMonthChange(value);
190
+ }
191
+ if (token === "exp_year") {
192
+ handleYearChange(value);
193
+ }
194
+ if (token === "cvv") {
195
+ handleCVVChange(value);
196
+ }
197
+ };
198
+ const handlePay = () => {
199
+ console.log("pay", name, baseUrl, masterBaseUrl);
200
+ };
201
+ return /* @__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("button", { className: "close-pop", style: { display: "none" } }, /* @__PURE__ */ React.createElement(
202
+ "svg",
203
+ {
204
+ xmlns: "http://www.w3.org/2000/svg",
205
+ width: 37,
206
+ height: 37,
207
+ viewBox: "0 0 21 21"
208
+ },
209
+ /* @__PURE__ */ React.createElement(
210
+ "path",
211
+ {
212
+ fill: "none",
213
+ stroke: "currentColor",
214
+ strokeLinecap: "round",
215
+ strokeLinejoin: "round",
216
+ d: "m7.5 7.5l6 6m0-6l-6 6"
217
+ }
218
+ )
219
+ )), /* @__PURE__ */ React.createElement("div", { className: "row" }, /* @__PURE__ */ React.createElement("div", { className: "comp-name" }, /* @__PURE__ */ React.createElement(
220
+ "img",
221
+ {
222
+ src: "https://invoicestaging.skysystemz.com/assets/products/65c49a2740ff1.png",
223
+ alt: "",
224
+ className: "client-logo"
225
+ }
226
+ )), /* @__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(
227
+ "i",
228
+ {
229
+ className: "fa fa-qrcode fa-2x",
230
+ id: "qrIcon",
231
+ title: "Show QR Code",
232
+ onClick: () => setToggleQr(!toggleQr)
233
+ }
234
+ )), /* @__PURE__ */ React.createElement("div", { id: "qrCode", style: {
235
+ display: toggleQr ? "block" : "none"
236
+ } }, /* @__PURE__ */ React.createElement(
237
+ "img",
238
+ {
239
+ src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARQAAAEUCAYAAADqcMl5AAAAAklEQVR4AewaftIAABJaSURBVO3BQY7gRhLAQFLo/3+ZO8c8FSCoemwvMsL+YK21LnhYa61LHtZa65KHtda65GGttS55WGutSx7WWuuSh7XWuuRhrbUueVhrrUse1lrrkoe11rrkYa21LnlYa61LHtZa65KHtda65IePVP6miknlpGJSualiUjmpOFGZKk5UpopJ5YuKE5WpYlI5qZhU3qiYVKaKSeWkYlI5qXhD5aRiUvmbKr54WGutSx7WWuuSh7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nKVPGbVKaKSWWqmFROKiaVqeKkYlKZKk5UTiomlZOKk4qTikllqphUTipOVKaKm1RuelhrrUse1lrrkoe11rrkh/8zFZPKVDGpTConFZPKVDGpnFRMKlPFpDJVfFExqZxUnKi8oXJSMalMFVPFFyonFVPFpDJVnKhMFVPFpPJFxW96WGutSx7WWuuSh7XWuuSHX1bxmyomlaliUnmj4qRiUpkqJpWTipOKSWWqOFF5Q+WkYqqYVKaKSeVE5QuVqWJSmSreUJkqJpWTikllqpgq/s0e1lrrkoe11rrkYa21LvnhMpV/UsWkMlVMKicqJxVTxRcqU8VJxRsVJypTxRsqX1S8oTJVnKhMFZPKScVUMalMFScqU8WkclIxqfyTHtZa65KHtda65GGttS6xP1hrrQse1lrrkoe11rrkYa21LnlYa61LHtZa65KHtda65GGttS55WGutSx7WWuuSh7XWuuRhrbUueVhrrUse1lrrkoe11rrkYa21Lvkf/C+HzIiJCzEAAAAASUVORK5CYII=",
240
+ alt: "QRCode",
241
+ srcSet: ""
242
+ }
243
+ )), /* @__PURE__ */ React.createElement(
244
+ "form",
245
+ {
246
+ id: "PaymentForm",
247
+ className: "payment-form",
248
+ onSubmit: handleSubmit
249
+ },
250
+ /* @__PURE__ */ React.createElement(
251
+ "input",
252
+ {
253
+ type: "hidden",
254
+ id: "dctoken",
255
+ defaultValue: dcToken,
256
+ name: "dctoken"
257
+ }
258
+ ),
259
+ /* @__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, " 1.00 "))), /* @__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" }))),
260
+ /* @__PURE__ */ React.createElement("div", { className: "form-group" }, /* @__PURE__ */ React.createElement("label", { htmlFor: "NameOnCard" }, "Name on card"), /* @__PURE__ */ React.createElement(
261
+ "input",
262
+ {
263
+ "data-token": "name",
264
+ id: "NameOnCard",
265
+ className: "form-control required",
266
+ type: "text",
267
+ maxLength: 100,
268
+ placeholder: "name",
269
+ value: formData == null ? void 0 : formData.name,
270
+ onChange: handleChange
271
+ }
272
+ ), /* @__PURE__ */ React.createElement(
273
+ "span",
274
+ {
275
+ id: "NameOnCard-error",
276
+ style: { color: "red" }
277
+ }
278
+ )),
279
+ /* @__PURE__ */ React.createElement("div", { className: "form-group" }, /* @__PURE__ */ React.createElement(
280
+ "input",
281
+ {
282
+ "data-token": "card_number",
283
+ className: "null card-image form-control required",
284
+ type: "text",
285
+ maxLength: 19,
286
+ placeholder: "0000 0000 0000 0000",
287
+ value: handleCardFormat(formData == null ? void 0 : formData.card_number),
288
+ onChange: handleChange
289
+ }
290
+ ), error.card_number && /* @__PURE__ */ React.createElement(
291
+ "span",
292
+ {
293
+ id: "card_number-error",
294
+ style: { color: "red" }
295
+ },
296
+ error.card_number
297
+ )),
298
+ /* @__PURE__ */ React.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React.createElement(
299
+ "input",
300
+ {
301
+ "data-token": "exp_month",
302
+ className: "form-control required",
303
+ type: "text",
304
+ placeholder: "MM",
305
+ maxLength: 2,
306
+ value: formData == null ? void 0 : formData.exp_month,
307
+ onChange: handleChange
308
+ }
309
+ ), error.exp_month && /* @__PURE__ */ React.createElement(
310
+ "span",
311
+ {
312
+ id: "exp_month-error",
313
+ style: { color: "red" }
314
+ },
315
+ error.exp_month
316
+ )),
317
+ /* @__PURE__ */ React.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React.createElement(
318
+ "input",
319
+ {
320
+ "data-token": "exp_year",
321
+ className: "form-control required",
322
+ type: "text",
323
+ placeholder: "YYYY",
324
+ maxLength: 4,
325
+ value: formData == null ? void 0 : formData.exp_year,
326
+ onChange: handleChange
327
+ }
328
+ ), error.exp_year && /* @__PURE__ */ React.createElement(
329
+ "span",
330
+ {
331
+ id: "exp_year-error",
332
+ style: { color: "red" }
333
+ },
334
+ error.exp_year
335
+ )),
336
+ /* @__PURE__ */ React.createElement("div", { className: "security-code-group form-group" }, /* @__PURE__ */ React.createElement("div", { className: "input-container" }, /* @__PURE__ */ React.createElement(
337
+ "input",
338
+ {
339
+ "data-token": "cvv",
340
+ className: "form-control required",
341
+ type: "text",
342
+ maxLength: 4,
343
+ placeholder: "CVC",
344
+ value: formData == null ? void 0 : formData.cvv,
345
+ onChange: handleChange
346
+ }
347
+ ), /* @__PURE__ */ React.createElement("i", { id: "cvc", className: "fa fa-question-circle" })), error.cvv && /* @__PURE__ */ React.createElement(
348
+ "span",
349
+ {
350
+ id: "cvv-error",
351
+ style: { color: "red" }
352
+ },
353
+ error.cvv
354
+ ), /* @__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" }))),
355
+ /* @__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(
356
+ "input",
357
+ {
358
+ id: "ZIPCode",
359
+ "data-token": "zip",
360
+ className: "form-control required",
361
+ type: "text",
362
+ maxLength: 7,
363
+ placeholder: "000000",
364
+ value: formData == null ? void 0 : formData.zip,
365
+ onChange: handleChange
366
+ }
367
+ ), /* @__PURE__ */ React.createElement(
368
+ "a",
369
+ {
370
+ tabIndex: 0,
371
+ role: "button",
372
+ "data-toggle": "popover",
373
+ "data-trigger": "focus",
374
+ "data-placement": "left",
375
+ "data-content": "Enter the ZIP/Postal code for your credit card billing address."
376
+ },
377
+ /* @__PURE__ */ React.createElement("i", { className: "fa fa-question-circle" })
378
+ ), /* @__PURE__ */ React.createElement(
379
+ "span",
380
+ {
381
+ id: "ZIPCode-error",
382
+ style: { color: "red", display: "none" }
383
+ },
384
+ "This field is required"
385
+ ))),
386
+ /* @__PURE__ */ React.createElement(
387
+ "button",
388
+ {
389
+ id: "PayButton",
390
+ className: "btn btn-block btn-success submit-button",
391
+ type: "submit"
392
+ },
393
+ /* @__PURE__ */ React.createElement("span", { className: "submit-button-lock" }),
394
+ /* @__PURE__ */ React.createElement("span", { className: "align-middle" }, "Pay $1.00")
395
+ )
396
+ ), /* @__PURE__ */ React.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ React.createElement(
397
+ "svg",
398
+ {
399
+ xmlns: "http://www.w3.org/2000/svg",
400
+ width: 20,
401
+ height: 20,
402
+ viewBox: "0 0 26 26"
403
+ },
404
+ /* @__PURE__ */ React.createElement(
405
+ "path",
406
+ {
407
+ fill: "currentColor",
408
+ 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"
409
+ }
410
+ )
411
+ ), "Secure payments powered by Fractal", /* @__PURE__ */ React.createElement(
412
+ "img",
413
+ {
414
+ src: "https://ui.fractalpay.com/favicon.ico",
415
+ alt: "Fractal logo",
416
+ className: "powered-logo"
417
+ }
418
+ )))))))))));
5
419
  }
6
420
  export {
7
- Greet
421
+ PaywithFractal
8
422
  };
package/global.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ interface Window {
2
+ DatacapWebToken: any; // Replace with the actual type of DatacapWebToken if it's not a string
3
+ }
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@pinerohit11/testwidget",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "next dev",
7
7
  "build": "next build",
8
8
  "start": "next start",
9
9
  "lint": "next lint",
10
- "bundle":"tsup src/app/index.ts"
10
+ "bundle": "tsup src/app/index.ts"
11
11
  },
12
12
  "dependencies": {
13
+ "axios": "^1.7.7",
13
14
  "next": "15.0.3",
14
15
  "react": "18.3.1",
15
16
  "react-dom": "18.3.1"
@@ -37,4 +38,4 @@
37
38
  "tailwindcss"
38
39
  ],
39
40
  "main": "dist/index.js"
40
- }
41
+ }