@mopay/node-sdk 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -205,42 +205,3 @@ Use these only while your MoPay project is in sandbox mode.
205
205
  | EcoCash | `63233333` | Failed |
206
206
  | EcoCash | `63244444` | Cancelled |
207
207
  | EcoCash | `63255555` | Expired |
208
-
209
- ## Development
210
-
211
- ```sh
212
- pnpm install
213
- pnpm test
214
- ```
215
-
216
- ## Simple HTML Example
217
-
218
- This repository includes an Express-backed checkout example outside the publishable SDK package.
219
- From the repository root:
220
-
221
- ```sh
222
- cp examples/simple-checkout/.env.example examples/simple-checkout/.env
223
- pnpm example:simple-checkout
224
- ```
225
-
226
- Open `http://127.0.0.1:4173/`.
227
-
228
- Put your real MoPay secret key in `examples/simple-checkout/.env`:
229
-
230
- ```env
231
- MOPAY_API_KEY=sk_live_or_test_xxx
232
- ```
233
-
234
- Optional environment variables:
235
-
236
- - `MOPAY_BASE_URL`: defaults to `https://mopay.co.ls`.
237
- - `MERCHANT_PUBLIC_URL`: public URL for the merchant demo, used to build the MoPay `redirectUrl`.
238
- - `MOPAY_REDIRECT_URL`: full redirect URL override.
239
- - `PORT`: defaults to `4173`.
240
- - `HOST`: defaults to `127.0.0.1`.
241
-
242
- The example serves a tiny merchant backend with Express:
243
-
244
- - `POST /api/create-mopay-checkout` creates a MoPay checkout session through `mopay.createPaymentSession`.
245
- - `GET /api/mopay-session/:sessionId` retrieves transaction data through `mopay.getTransaction`.
246
- - `GET /api/mopay-session/:sessionId/success` verifies whether the session is paid through `mopay.isSuccessful`.
package/dist/base.js CHANGED
@@ -16,7 +16,7 @@ export class Base {
16
16
  this.baseUrl = normalizeBaseUrl(config.baseUrl || DEFAULT_BASE_URL);
17
17
  this.timeoutMs = config.timeoutMs ?? DEFAULT_TIMEOUT_MS;
18
18
  this.fetchImpl = config.fetch || getNativeFetch();
19
- this.userAgent = config.userAgent || "@mopay/node-sdk/0.1.0";
19
+ this.userAgent = config.userAgent || "@mopay/node-sdk/0.1.1";
20
20
  this.checkoutOptions = config.checkout || {};
21
21
  }
22
22
  getDefaultCheckoutOptions() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mopay/node-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Official TypeScript SDK for the MoPay payment API.",
5
5
  "type": "module",
6
6
  "source": "src/index.ts",