telebirr-nodejs 1.1.0 → 1.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.
Files changed (2) hide show
  1. package/README.md +13 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -49,13 +49,13 @@ import { C2B } from "telebirr-nodejs";
49
49
 
50
50
  const c2bClient = new C2B({
51
51
  mode: "sandbox", // "simulate" | "sandbox" | "production"
52
- appId: process.env.FABRIC_APP_ID!,
53
- appSecret: process.env.FABRIC_APP_SECRET!,
54
- merchantAppId: process.env.MERCHANT_APP_ID!,
55
- merchantCode: process.env.MERCHANT_CODE!,
56
- merchantPrivateKey: process.env.MERCHANT_PRIVATE_KEY!,
57
- notifyUrl: process.env.TELEBIRR_NOTIFY_URL!,
58
- redirectUrl: process.env.TELEBIRR_REDIRECT_URL!,
52
+ appId: process.env.FABRIC_APP_ID,
53
+ appSecret: process.env.FABRIC_APP_SECRET,
54
+ merchantAppId: process.env.MERCHANT_APP_ID,
55
+ merchantCode: process.env.MERCHANT_CODE,
56
+ privateKey: process.env.MERCHANT_PRIVATE_KEY,
57
+ notifyUrl: process.env.TELEBIRR_NOTIFY_URL,
58
+ redirectUrl: process.env.TELEBIRR_REDIRECT_URL,
59
59
  http: true, // allow HTTP in simulator mode
60
60
  });
61
61
  ```
@@ -108,7 +108,7 @@ If you are using a frontend framework (for example React) and do not want to los
108
108
  Used to check the payment result using the merchant order ID.
109
109
 
110
110
  ```bash
111
- app.get("/payment/status/:merchOrderId", async (req, res) => {
111
+ app.get("/payment/status", async (req, res) => {
112
112
  const { merchOrderId } = req.body;
113
113
 
114
114
  const info = await c2bClient.queryOrder(merchOrderId);
@@ -154,11 +154,11 @@ import { C2B } from "telebirr-nodejs";
154
154
 
155
155
  const c2bClient = new C2B({
156
156
  mode: "simulate",
157
- appId: process.env.FABRIC_APP_ID!,
158
- appSecret: process.env.FABRIC_APP_SECRET!,
159
- merchantAppId: process.env.MERCHANT_APP_ID!,
160
- merchantCode: process.env.MERCHANT_CODE!,
161
- merchantPrivateKey: process.env.MERCHANT_PRIVATE_KEY!,
157
+ appId: process.env.FABRIC_APP_ID,
158
+ appSecret: process.env.FABRIC_APP_SECRET,
159
+ merchantAppId: process.env.MERCHANT_APP_ID,
160
+ merchantCode: process.env.MERCHANT_CODE,
161
+ privateKey: process.env.MERCHANT_PRIVATE_KEY,
162
162
  notifyUrl: "https://example.com/notify",
163
163
  redirectUrl: "https://example.com/redirect",
164
164
  http: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telebirr-nodejs",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Unofficial Node.js SDK for Telebirr C2B payments with automatic request signing, Fabric token handling, checkout URL generation, simulator support, and simplified refunds & payment status APIs.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",