@katorymnd/pawapay-node-sdk 1.1.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,36 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.1.0] - 2025-12-22
9
+
10
+ ### Added
11
+ - **Security Layer:** Implemented surgical JavaScript obfuscation for core API and License logic.
12
+ - **Integrity Checker:** Added a new background process to detect if SDK files have been tampered with or modified.
13
+ - **Server-Side Validation:** Integrated a heartbeat and domain activation system with `katorymnd.com`.
14
+ - **Installation Imprint:** Implemented a unique installation "Soul" (TOFU - Trust On First Use) via the `.pawapay-imprint` system.
15
+ - **Path Locking:** Added hardware and project-path fingerprinting to prevent unauthorized SDK migration between servers.
16
+
17
+ ### Changed
18
+ - **Build Pipeline:** Moved production builds to a `/dist` folder strategy to ensure development secrets (like `.env`) are never published.
19
+ - **Deployment:** Updated the publishing workflow to use `pnpm publish:secure`.
20
+ - **License Logic:** Strict domain enforcement via `PAWAPAY_SDK_LICENSE_DOMAIN` environment variable.
21
+
22
+ ### Fixed
23
+ - Fixed an issue where the SDK would occasionally fail to detect the environment in Docker containers.
24
+ - Improved error messaging when a license key is missing or the domain is unauthorized.
25
+
26
+ ### Removed
27
+ - Removed localhost forgiveness; all environments now require a valid domain configuration for security.
28
+ - Removed development scripts and backup files from the final production distribution.
29
+
30
+ ---
31
+
32
+ ## [1.0.0] - 2025-11-15
33
+ - Initial release of the PawaPay Node.js SDK.
34
+ - Core API client for mobile money deposits and payments.
35
+ - Basic error handling and logging.
36
+
package/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ PROPRIETARY SOFTWARE LICENSE AGREEMENT
2
+
3
+ Copyright (c) 2025 Katorymnd Web Solutions. All Rights Reserved.
4
+
5
+ NOTICE: This software is the proprietary property of Katorymnd Web Solutions. The intellectual property contained herein is protected by copyright and other intellectual property laws.
6
+
7
+ 1. LICENSE GRANT
8
+ Subject to the terms of this Agreement and payment of the applicable fees, Katorymnd Web Solutions grants you a limited, non-exclusive, non-transferable, revocable license to use the PawaPay Node SDK ("Software") solely for the purpose of integrating PawaPay services into your applications.
9
+
10
+ 2. RESTRICTIONS
11
+ You may NOT:
12
+
13
+ * Distribute, sub-license, rent, lease, or lend the Software to any third party.
14
+ * Make the Software available to the public in any form (including open-source repositories).
15
+ * Reverse engineer, decompile, or disassemble the Software (except strictly to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation).
16
+ * Remove or alter any copyright notices or proprietary markings on the Software.
17
+
18
+ 3. DISCLAIMER OF WARRANTIES
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. KATORYMND WEB SOLUTIONS DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
package/README.md ADDED
@@ -0,0 +1,252 @@
1
+ # pawaPay Node.js SDK
2
+
3
+ A professional, commercial Node.js SDK for integrating with the **pawaPay API**.
4
+ This SDK enables seamless payment processing with **mobile money deposits, refunds, payouts**, and **real-time transaction verification**, designed for production-grade systems.
5
+
6
+ > **Commercial Software**
7
+ > This SDK is a premium product. A valid license key is required to operate it in production environments.
8
+
9
+ > **Versioning Note**
10
+ > V1 is the default main codebase. V2 has been surgically integrated and can run alongside V1, selectable through configuration without breaking existing implementations.
11
+
12
+ ---
13
+
14
+ ## Folder Structure
15
+
16
+ ```
17
+ example/
18
+ data/
19
+ src/
20
+ tests/
21
+ logs/
22
+ ```
23
+
24
+ * **example**
25
+ Contains live and demo samples for each major workflow, including deposits, refunds, payouts, and configuration fetching. Both frontend and backend usage patterns are demonstrated.
26
+
27
+ * **data**
28
+ Stores generated and cached configuration files such as `mno_availability` and `active_conf` JSON files for both V1 and V2.
29
+ ![configuration](https://katorymnd.com/tqc_images/pawapay-node-config.png)
30
+ * **src**
31
+ Core SDK source code and internal architecture.
32
+
33
+ * **logs**
34
+ Cotains logs files for any request - failed or successful.
35
+
36
+ * **tests**
37
+ Automated test suites using Mocha or Jest, covering SDK logic and transaction workflows.
38
+
39
+ ---
40
+
41
+ ## Available Features
42
+
43
+ The pawaPay Node.js SDK provides a comprehensive, production-ready feature set with real-time validation at every stage.
44
+
45
+ ### Mobile Money Deposit Request
46
+
47
+ ![Mobile Money Deposit](https://katorymnd.com/tqc_images/pawapay-node-deposit.png)
48
+
49
+ Initiate deposit requests to mobile money accounts with built-in real-time transaction verification. Each deposit is validated immediately, ensuring accurate and current status reporting.
50
+
51
+ ---
52
+
53
+ ### Mobile Money Refund Request
54
+
55
+ ![Mobile Money Refund](https://katorymnd.com/tqc_images/pawapay-node-refund.png)
56
+
57
+ Process refunds for completed deposits using the original `depositId`. Refund availability depends on your pawaPay merchant configuration, and all refund requests are verified in real time.
58
+
59
+ ---
60
+
61
+ ### Mobile Money Payout Request
62
+
63
+ ![Mobile Money Payout](https://katorymnd.com/tqc_images/pawapay-node-payout.png)
64
+
65
+ Execute payouts to single or multiple recipients within one request. This feature is optimized for bulk payments and includes real-time payout status tracking.
66
+
67
+ ---
68
+
69
+ ### Real-Time Transaction Verification
70
+
71
+ All operations, deposits, refunds, and payouts, are verified in real time. This ensures reliable, up-to-date transaction states without polling delays or stale responses.
72
+
73
+ ---
74
+
75
+ ### Country-Specific Payment Configuration
76
+
77
+ The SDK dynamically fetches supported Mobile Network Operators (MNOs) based on the country associated with your merchant account. This prevents attempts against inactive or unsupported operators.
78
+
79
+ ---
80
+
81
+ ### Mobile Network Operator (MNO) Status Checks
82
+
83
+ Before initiating a transaction, the SDK verifies MNO availability in real time. This minimizes failed payments caused by inactive networks.
84
+
85
+ ---
86
+
87
+ ### Owner Name Notification
88
+
89
+ ![Owner Name Notification](https://katorymnd.com/tqc_images/pay-request-from.png)
90
+
91
+ Supports displaying the organization or owner name in payment notifications, helping end users easily identify payment requests.
92
+
93
+ ---
94
+
95
+ ### Deposit via Hosted Payment Page
96
+ ![Deposit via Hosted Payment Page](https://katorymnd.com/tqc_images/pawapay-node-payPage.png)
97
+ Use the hosted payment widget to collect payments through a secure redirect flow.
98
+
99
+ 1. Your application creates a payment session.
100
+ 2. pawaPay returns a `redirectUrl`.
101
+ 3. The customer completes payment on the hosted page.
102
+ 4. Upon success, the customer is redirected back to your application:
103
+
104
+ ```
105
+ deposit-page-success?depositId=951e084a-005c-4976-ad4e-205ddedb914e
106
+ ```
107
+
108
+ You may then activate services, store customer details, or trigger post-payment workflows as required.
109
+
110
+ ---
111
+
112
+ ### Sandbox and Live Environments
113
+
114
+ Easily switch between sandbox and production environments using environment variables. No code changes are required.
115
+
116
+ ---
117
+
118
+ ## Table of Contents
119
+
120
+ * [Overview](#overview)
121
+ * [Licensing & Pricing](#licensing--pricing)
122
+ * [Installation](#installation)
123
+ * [Configuration (.env)](#configuration-env)
124
+ * [Usage](#usage)
125
+
126
+ * [Initializing the SDK](#initializing-the-sdk)
127
+ * [MNO Configuration & Version Switching](#mno-configuration--version-switching)
128
+
129
+ * [Support](#support)
130
+
131
+ ---
132
+
133
+ ## Overview
134
+
135
+ The pawaPay Node.js SDK integrates seamlessly with Node.js frameworks such as **Express**, **NestJS**, and **Fastify**.
136
+ It abstracts pawaPay’s payment APIs into a clean, predictable interface focused on correctness, security, and operational clarity.
137
+
138
+ ---
139
+
140
+ ## Licensing & Pricing
141
+
142
+ This is a **paid commercial SDK**.
143
+
144
+ * **License Model:** One-time payment
145
+ * **Validity:** Lifetime license
146
+ * **Scope:** One licensed domain per key
147
+
148
+ To purchase a license and obtain your credentials:
149
+
150
+ 👉 **[https://katorymnd.com/pawapay-payment-sdk/nodejs](https://katorymnd.com/pawapay-payment-sdk/nodejs)**
151
+
152
+ You will receive:
153
+
154
+ * `KATORYMND_PAWAPAY_SDK_LICENSE_KEY`
155
+ * `PAWAPAY_SDK_LICENSE_SECRET`
156
+
157
+ ---
158
+
159
+ ## Installation
160
+
161
+ ```bash
162
+ npm install pawapay-node-sdk
163
+ # or
164
+ yarn add pawapay-node-sdk
165
+ ```
166
+
167
+ ---
168
+
169
+ ## Configuration (.env)
170
+
171
+ Create a `.env` file in your project root and configure both pawaPay API credentials and SDK licensing keys.
172
+
173
+ ```bash
174
+ # ===============================
175
+ # pawaPay API Tokens
176
+ # ===============================
177
+
178
+ PAWAPAY_SANDBOX_API_TOKEN=your_sandbox_api_token_here
179
+ PAWAPAY_PRODUCTION_API_TOKEN=your_production_api_token_here
180
+
181
+ # ===============================
182
+ # Katorymnd pawaPay SDK Licensing
183
+ # ===============================
184
+
185
+ KATORYMND_PAWAPAY_SDK_LICENSE_KEY=your_sdk_license_key_here
186
+ PAWAPAY_SDK_LICENSE_DOMAIN=your-licensed-domain.com
187
+ PAWAPAY_SDK_LICENSE_SECRET=your_sdk_license_secret_here
188
+ ```
189
+
190
+ ---
191
+
192
+ ## Usage
193
+
194
+ ### Initializing the SDK
195
+
196
+ Ensure the licensed domain is present in your `.env` file:
197
+
198
+ ```bash
199
+ PAWAPAY_SDK_LICENSE_DOMAIN=your-licensed-domain.com
200
+ ```
201
+
202
+ On first initialization, the SDK securely binds:
203
+
204
+ * Your license key
205
+ * Your license secret
206
+ * Your domain
207
+
208
+ This binding is permanent for that license and prevents unauthorized reuse across domains.
209
+
210
+ ---
211
+
212
+ ### MNO Configuration & Version Switching
213
+
214
+ The SDK ships with default configuration templates. However, you are expected to maintain **up-to-date MNO and active configuration files**.
215
+
216
+ * Use the example script:
217
+
218
+ ```
219
+ example/fetchMnoConf.js
220
+ ```
221
+ * This script fetches and generates:
222
+
223
+ * `active_conf_v1.json`
224
+ * `mno_availability_v1.json`
225
+ * `active_conf_v2.json`
226
+ * `mno_availability_v2.json`
227
+
228
+ You may toggle **V1 or V2** behavior through these configuration files.
229
+
230
+ > **Important**
231
+ > You should configure a cron job to periodically refresh these files to ensure MNO availability and configuration data remain current.
232
+
233
+ This approach keeps runtime fast, predictable, and independent of unnecessary API calls.
234
+
235
+ ## Support
236
+
237
+ For any issues, questions, or guidance:
238
+
239
+ * **Documentation:** Visit the [official documentation](https://katorymnd.com/pawapay-payment-sdk/nodejs)
240
+
241
+ * **Community Support:** Available with Starter and higher licenses
242
+ * **Priority Support:** Included with Professional (6 months) and Agency (1 year) licenses
243
+ * **Urgent Assistance:** Available as an add-on for production outages
244
+
245
+ **Commercial Support:**
246
+ For licensed users experiencing production issues or needing implementation guidance.
247
+
248
+ **Contact:** [support@katorymnd.com](mailto:support@katorymnd.com)
249
+ _Backup:_ [katorymnd@gmail.com](mailto:katorymnd@gmail.com)
250
+
251
+
252
+ ----