@hypersokrat/hyper-pay 1.0.35 → 1.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 David Tavadze
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 David Tavadze
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,65 +1,231 @@
1
- # HyperPay System Documentation
1
+ # HyperPay
2
2
 
3
- Welcome to the HyperPay system documentation. This guide provides a detailed walkthrough for administrators and developers, explaining how to integrate cryptocurrency payments seamlessly into applications using HyperPay and MetaMask.
3
+ [![npm version](https://img.shields.io/npm/v/@hypersokrat/hyper-pay.svg)](https://www.npmjs.com/package/@hypersokrat/hyper-pay)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@hypersokrat/hyper-pay.svg)](https://www.npmjs.com/package/@hypersokrat/hyper-pay)
5
+ [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)
4
6
 
5
- ## Admin Registration and Configuration
7
+ A powerful React component library for seamlessly integrating cryptocurrency payments into your applications using MetaMask and blockchain technology.
8
+
9
+ ## Features
10
+
11
+ - 🔐 **Secure MetaMask Integration** - Direct wallet connection for secure transactions
12
+ - 💰 **Cryptocurrency Payments** - Accept payments in various cryptocurrencies
13
+ - 🎨 **Customizable Styling** - Fully customizable component styles
14
+ - ⚡ **Easy Integration** - Simple setup with minimal configuration
15
+ - 🌐 **Web3 Ready** - Built for the decentralized web
16
+ - 📦 **Lightweight** - Optimized bundle size
17
+
18
+ ## Installation
19
+
20
+ Install HyperPay using npm or yarn:
21
+
22
+ ```bash
23
+ npm install @hypersokrat/hyper-pay
24
+ ```
25
+
26
+ or
27
+
28
+ ```bash
29
+ yarn add @hypersokrat/hyper-pay
30
+ ```
31
+
32
+ ## Quick Start
33
+
34
+ ### Basic Usage
35
+
36
+ ```jsx
37
+ import { HyperPay } from "@hypersokrat/hyper-pay";
38
+
39
+ function App() {
40
+ const modulStyles = {
41
+ // Your custom styles
42
+ };
43
+
44
+ return (
45
+ <HyperPay
46
+ projectId="your_project_id_here"
47
+ amount={100}
48
+ modulStyles={modulStyles}
49
+ />
50
+ );
51
+ }
52
+ ```
53
+
54
+ ## Admin Setup Guide
6
55
 
7
56
  ### 1. Admin Account Creation
8
57
 
9
58
  To get started with HyperPay, administrators need to create an account:
10
59
 
11
- - Visit the [HyperPay admin page](https://hyper-payment-admin.vercel.app/login) and sign up.
12
- - Provide necessary details: username, email, and password.
60
+ 1. Visit the [HyperPay admin page](https://hyper-payment-admin.vercel.app/login) and sign up
61
+ 2. Provide necessary details: username, email, and password
13
62
 
14
63
  ### 2. MetaMask Address Registration
15
64
 
16
- After logging in, administrators should register their MetaMask address:
65
+ After logging in to the [admin panel](https://hyper-payment-admin.vercel.app/login), administrators should register their MetaMask address:
17
66
 
18
- - Navigate to the Company section in the admin panel.
19
- - Register the MetaMask address that will receive cryptocurrency payments.
20
- - This address will automatically generate a unique project ID for identification purposes.
67
+ 1. Navigate to the **Company** section in the admin panel
68
+ 2. Register the MetaMask address that will receive cryptocurrency payments
69
+ 3. This address will automatically generate a unique **Project ID** for identification purposes
21
70
 
22
71
  ### 3. Project ID Generation
23
72
 
24
73
  Upon registering the MetaMask address:
25
74
 
26
- - A unique project ID is generated automatically.
27
- - This project ID will be used to associate payments with your company's account.
28
-
29
- ## Integration into User Applications
75
+ - A unique **Project ID** is generated automatically
76
+ - This Project ID will be used to associate payments with your company's account
77
+ - Use this Project ID in your application integration
30
78
 
31
- Developers can integrate HyperPay's cryptocurrency payment functionality into applications:
79
+ ## Integration Guide
32
80
 
33
- ### 1. Install Library
34
-
35
- Install the HyperPay library using npm or yarn package managers:
81
+ ### Step 1: Install the Library
36
82
 
37
83
  ```bash
38
- npm install hyperpay-library
84
+ npm install @hypersokrat/hyper-pay
39
85
  ```
40
86
 
41
- Once installed, import the payment module into your application:
87
+ ### Step 2: Import the Component
42
88
 
43
- ```javascript
44
- import { HyperPay } from "hyperpay-library";
89
+ ```jsx
90
+ import { HyperPay } from "@hypersokrat/hyper-pay";
45
91
  ```
46
92
 
47
- ## Connect MetaMask
93
+ ### Step 3: Connect MetaMask
48
94
 
49
95
  Users initiate payments securely through MetaMask:
50
96
 
51
- - Click the module button to connect to MetaMask.
52
- - This connection authorizes transactions securely.
97
+ - Click the module button to connect to MetaMask
98
+ - This connection authorizes transactions securely
99
+ - Users must have MetaMask installed in their browser
100
+
101
+ ### Step 4: Implement the Payment Component
102
+
103
+ ```jsx
104
+ import React from "react";
105
+ import { HyperPay } from "@hypersokrat/hyper-pay";
106
+
107
+ function PaymentPage() {
108
+ // Custom styles for the payment module
109
+ const modulStyles = {
110
+ container: {
111
+ padding: "20px",
112
+ borderRadius: "8px",
113
+ backgroundColor: "#f5f5f5"
114
+ },
115
+ button: {
116
+ backgroundColor: "#007bff",
117
+ color: "white",
118
+ padding: "10px 20px",
119
+ borderRadius: "4px"
120
+ }
121
+ };
122
+
123
+ return (
124
+ <div>
125
+ <h1>Complete Your Payment</h1>
126
+ <HyperPay
127
+ projectId="your_project_id_here"
128
+ amount={100}
129
+ modulStyles={modulStyles}
130
+ />
131
+ </div>
132
+ );
133
+ }
134
+
135
+ export default PaymentPage;
136
+ ```
137
+
138
+ ## API Reference
53
139
 
54
- ## Invoke Payment Component
140
+ ### HyperPay Component Props
55
141
 
56
- Developers integrate payment components:
142
+ | Prop | Type | Required | Default | Description |
143
+ |------|------|----------|---------|-------------|
144
+ | `projectId` | `string` | Yes | - | Your unique project ID obtained from the [admin panel](https://hyper-payment-admin.vercel.app/login) |
145
+ | `amount` | `number` | Yes | - | The amount to be paid in cryptocurrency |
146
+ | `modulStyles` | `object` | No | `{}` | Custom styles object for styling the payment module |
57
147
 
58
- ```javascript
59
- // Example usage of HyperPay component
148
+ ### Example with All Props
149
+
150
+ ```jsx
60
151
  <HyperPay
61
- projectId="your_project_id_here"
62
- amount={100} // Amount to be paid in cryptocurrency
63
- modulStyles={modulStyles} //custom styles
152
+ projectId="abc123xyz789"
153
+ amount={250.50}
154
+ modulStyles={{
155
+ container: {
156
+ maxWidth: "500px",
157
+ margin: "0 auto"
158
+ },
159
+ button: {
160
+ backgroundColor: "#28a745",
161
+ color: "#fff"
162
+ }
163
+ }}
64
164
  />
65
- ```
165
+ ```
166
+
167
+ ## Requirements
168
+
169
+ - **React** >= 18.0.2
170
+ - **React DOM** >= 18.0.2
171
+ - **MetaMask** browser extension (for users making payments)
172
+
173
+ ## Browser Support
174
+
175
+ - Chrome (recommended)
176
+ - Firefox
177
+ - Edge
178
+ - Brave
179
+ - Other MetaMask-compatible browsers
180
+
181
+ ## Security
182
+
183
+ HyperPay ensures secure transactions through:
184
+
185
+ - Direct MetaMask integration (no third-party payment processors)
186
+ - Blockchain-based transaction verification
187
+ - Encrypted communication
188
+ - Project ID-based authentication
189
+
190
+ ## Troubleshooting
191
+
192
+ ### MetaMask Not Detected
193
+
194
+ If users encounter issues connecting MetaMask:
195
+
196
+ 1. Ensure MetaMask extension is installed
197
+ 2. Check that MetaMask is unlocked
198
+ 3. Verify the correct network is selected
199
+ 4. Refresh the page and try again
200
+
201
+ ### Payment Not Processing
202
+
203
+ 1. Verify your Project ID is correct
204
+ 2. Check that the MetaMask address is registered in the [admin panel](https://hyper-payment-admin.vercel.app/login)
205
+ 3. Ensure sufficient balance in the user's wallet
206
+ 4. Check network connectivity
207
+
208
+ ## Contributing
209
+
210
+ Contributions are welcome! Please feel free to submit a Pull Request.
211
+
212
+ ## License
213
+
214
+ ISC License - see [LICENSE](LICENSE) file for details
215
+
216
+ ## Support
217
+
218
+ For support and questions:
219
+
220
+ - Check the [documentation](#)
221
+ - Open an issue on GitHub
222
+ - Contact support through the [admin panel](https://hyper-payment-admin.vercel.app/login)
223
+
224
+ ## Keywords
225
+
226
+ cryptocurrency, payments, blockchain, web3, React, crypto-payments, smart-contracts, DeFi, wallet-integration, crypto, decentralized, payment-gateway, crypto-integration, HyperPay
227
+
228
+ ---
229
+
230
+ Made with ❤️ by [HyperSokrat](https://www.npmjs.com/~hypersokrat)
231
+
@@ -1,99 +1,99 @@
1
- /* @font-face {
2
- /* font-family: "UberMove-Medium";*/
3
- /* src: url("../fonts/UberMove/UberMove-Medium.eot");*/
4
- /* src: url("../fonts/UberMove/UberMove-Medium.eot?#iefix") format("embedded-opentype"),*/
5
- /* url("../fonts/UberMove/UberMove-Medium.svg#Lack-Regular") format("svg"),*/
6
- /* url("../fonts/UberMove/UberMove-Medium.ttf") format("truetype"),*/
7
- /* url("../fonts/UberMove/UberMove-Medium.woff") format("woff"),*/
8
- /* url("../fonts/UberMove/UberMove-Medium.woff2") format("woff2");*/
9
- /* font-weight: normal;*/
10
- /* font-style: normal;*/
11
- /*}*/
12
- /* @font-face {
13
- font-family: "Marcellus";
14
- src: url("../fonts/Marcellus/Marcellus-Regular.eot");
15
- src: url("../fonts/Marcellus/Marcellus-Regular.eot?#iefix")
16
- format("embedded-opentype"),
17
- url("../fonts/Marcellus/Marcellus-Regular.woff2") format("woff2"),
18
- url("../fonts/Marcellus/Marcellus-Regular.woff") format("woff"),
19
- url("../fonts/Marcellus/Marcellus-Regular.ttf") format("truetype"),
20
- url("../fonts/Marcellus/Marcellus-Regular.svg#Marcellus-Regular")
21
- format("svg");
22
- font-weight: normal;
23
- font-style: normal;
24
- font-display: swap;
25
- }
26
-
27
- @font-face {
28
- font-family: "Poppins";
29
- src: url("../fonts/Poppins/Poppins-Regular.eot");
30
- src: url("../fonts/Poppins/Poppins-Regular.eot?#iefix")
31
- format("embedded-opentype"),
32
- url("../fonts/Poppins/Poppins-Regular.svg#Lack-Regular") format("svg"),
33
- url("../fonts/Poppins/Poppins-Regular.ttf") format("truetype"),
34
- url("../fonts/Poppins/Poppins-Regular.woff") format("woff"),
35
- url("../fonts/Poppins/Poppins-Regular.woff2") format("woff2");
36
- font-weight: normal;
37
- font-style: normal;
38
- }
39
-
40
- * {
41
- font-family: "Poppins";
42
- font-size: 14px;
43
- line-height: 24px;
44
- color: rgba(255, 255, 255, 1);
45
- text-decoration: none;
46
- outline-color: none;
47
- box-sizing: border-box;
48
- padding: 0;
49
- margin: 0;
50
- }
51
- .main_ttl {
52
- font-family: "Marcellus";
53
- }
54
- html {
55
- overflow-x: hidden;
56
- -webkit-text-size-adjust: none;
57
- text-size-adjust: none;
58
- }
59
- body {
60
- margin: 0;
61
- -webkit-text-size-adjust: 100%;
62
- -moz-text-size-adjust: 100%;
63
- -ms-text-size-adjust: 100%;
64
- text-size-adjust: 100%;
65
- padding: 0 !important;
66
- }
67
-
68
- ul,
69
- li,
70
- p,
71
- img,
72
- h1,
73
- h2,
74
- h3,
75
- h4,
76
- h5,
77
- h6,
78
- input,
79
- button,
80
- nav {
81
- padding: 0;
82
- margin: 0;
83
- list-style: none;
84
- font-weight: normal;
85
- }
86
- input,
87
- textarea {
88
- outline: none;
89
- box-shadow: none;
90
- -webkit-appearance: none;
91
- -moz-appearance: none;
92
- appearance: none;
93
- }
94
- button {
95
- border: none;
96
- background: none;
97
- cursor: pointer;
98
- outline: none;
99
- } */
1
+ /* @font-face {
2
+ /* font-family: "UberMove-Medium";*/
3
+ /* src: url("../fonts/UberMove/UberMove-Medium.eot");*/
4
+ /* src: url("../fonts/UberMove/UberMove-Medium.eot?#iefix") format("embedded-opentype"),*/
5
+ /* url("../fonts/UberMove/UberMove-Medium.svg#Lack-Regular") format("svg"),*/
6
+ /* url("../fonts/UberMove/UberMove-Medium.ttf") format("truetype"),*/
7
+ /* url("../fonts/UberMove/UberMove-Medium.woff") format("woff"),*/
8
+ /* url("../fonts/UberMove/UberMove-Medium.woff2") format("woff2");*/
9
+ /* font-weight: normal;*/
10
+ /* font-style: normal;*/
11
+ /*}*/
12
+ /* @font-face {
13
+ font-family: "Marcellus";
14
+ src: url("../fonts/Marcellus/Marcellus-Regular.eot");
15
+ src: url("../fonts/Marcellus/Marcellus-Regular.eot?#iefix")
16
+ format("embedded-opentype"),
17
+ url("../fonts/Marcellus/Marcellus-Regular.woff2") format("woff2"),
18
+ url("../fonts/Marcellus/Marcellus-Regular.woff") format("woff"),
19
+ url("../fonts/Marcellus/Marcellus-Regular.ttf") format("truetype"),
20
+ url("../fonts/Marcellus/Marcellus-Regular.svg#Marcellus-Regular")
21
+ format("svg");
22
+ font-weight: normal;
23
+ font-style: normal;
24
+ font-display: swap;
25
+ }
26
+
27
+ @font-face {
28
+ font-family: "Poppins";
29
+ src: url("../fonts/Poppins/Poppins-Regular.eot");
30
+ src: url("../fonts/Poppins/Poppins-Regular.eot?#iefix")
31
+ format("embedded-opentype"),
32
+ url("../fonts/Poppins/Poppins-Regular.svg#Lack-Regular") format("svg"),
33
+ url("../fonts/Poppins/Poppins-Regular.ttf") format("truetype"),
34
+ url("../fonts/Poppins/Poppins-Regular.woff") format("woff"),
35
+ url("../fonts/Poppins/Poppins-Regular.woff2") format("woff2");
36
+ font-weight: normal;
37
+ font-style: normal;
38
+ }
39
+
40
+ * {
41
+ font-family: "Poppins";
42
+ font-size: 14px;
43
+ line-height: 24px;
44
+ color: rgba(255, 255, 255, 1);
45
+ text-decoration: none;
46
+ outline-color: none;
47
+ box-sizing: border-box;
48
+ padding: 0;
49
+ margin: 0;
50
+ }
51
+ .main_ttl {
52
+ font-family: "Marcellus";
53
+ }
54
+ html {
55
+ overflow-x: hidden;
56
+ -webkit-text-size-adjust: none;
57
+ text-size-adjust: none;
58
+ }
59
+ body {
60
+ margin: 0;
61
+ -webkit-text-size-adjust: 100%;
62
+ -moz-text-size-adjust: 100%;
63
+ -ms-text-size-adjust: 100%;
64
+ text-size-adjust: 100%;
65
+ padding: 0 !important;
66
+ }
67
+
68
+ ul,
69
+ li,
70
+ p,
71
+ img,
72
+ h1,
73
+ h2,
74
+ h3,
75
+ h4,
76
+ h5,
77
+ h6,
78
+ input,
79
+ button,
80
+ nav {
81
+ padding: 0;
82
+ margin: 0;
83
+ list-style: none;
84
+ font-weight: normal;
85
+ }
86
+ input,
87
+ textarea {
88
+ outline: none;
89
+ box-shadow: none;
90
+ -webkit-appearance: none;
91
+ -moz-appearance: none;
92
+ appearance: none;
93
+ }
94
+ button {
95
+ border: none;
96
+ background: none;
97
+ cursor: pointer;
98
+ outline: none;
99
+ } */