aba-payway 0.2.0 → 0.2.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 +37 -5
- package/package.json +14 -2
package/README.md
CHANGED
|
@@ -1,16 +1,36 @@
|
|
|
1
1
|
# aba-payway
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/aba-payway)
|
|
4
|
+
[](https://github.com/Joselay/aba-payway/actions)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://www.npmjs.com/package/aba-payway)
|
|
7
|
+
[](https://www.npmjs.com/package/aba-payway)
|
|
8
|
+
|
|
3
9
|
Type-safe TypeScript SDK for [ABA PayWay](https://www.payway.com.kh/) — Cambodia's #1 payment gateway.
|
|
4
10
|
|
|
5
11
|
> **Unofficial community SDK.** Not affiliated with ABA Bank.
|
|
6
12
|
|
|
13
|
+
## Why aba-payway?
|
|
14
|
+
|
|
15
|
+
ABA PayWay's official SDK is a raw REST API with no official Node.js/TypeScript client. That means you're left dealing with manual HMAC hashing, snake_case field ordering, base64 encoding, and zero type safety. This SDK handles all of that for you.
|
|
16
|
+
|
|
17
|
+
| | `aba-payway` | Rolling your own |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| Type safety | Full TypeScript with strict types | None — guess the field names |
|
|
20
|
+
| Hash computation | Automatic, correct field ordering | Manual HMAC-SHA512, easy to get wrong |
|
|
21
|
+
| Base64 encoding | Automatic for items, URLs, payout | Do it yourself, hope you didn't miss one |
|
|
22
|
+
| Dependencies | **Zero** — only Node.js built-ins | Probably `axios` + `crypto-js` + glue code |
|
|
23
|
+
| API coverage | 15+ methods | Build each one from scratch |
|
|
24
|
+
| Runtime support | Node.js, Bun, Deno, Cloudflare Workers | Whatever you tested |
|
|
25
|
+
|
|
7
26
|
## Features
|
|
8
27
|
|
|
9
|
-
- Zero runtime dependencies — uses Node.js built-in `crypto` and native `fetch`
|
|
10
|
-
- Full TypeScript support with strict types
|
|
11
|
-
- Dual ESM + CJS output
|
|
12
|
-
-
|
|
13
|
-
-
|
|
28
|
+
- **Zero runtime dependencies** — uses Node.js built-in `crypto` and native `fetch`
|
|
29
|
+
- **Full TypeScript support** with strict types and autocomplete
|
|
30
|
+
- **Dual ESM + CJS output** — works everywhere
|
|
31
|
+
- **15+ API methods** — checkout, QR payments, refunds, pre-auth, payouts, and more
|
|
32
|
+
- **Runs anywhere** — Node.js, Bun, Deno, Next.js, Express, Hono, Cloudflare Workers
|
|
33
|
+
- **Tested against ABA's sandbox** — not just unit tests, real API integration tests
|
|
14
34
|
|
|
15
35
|
## Installation
|
|
16
36
|
|
|
@@ -275,6 +295,18 @@ app.post('/pay', (req, res) => {
|
|
|
275
295
|
|
|
276
296
|
For the full ABA PayWay API documentation, see [aba-payway-docs](https://github.com/Joselay/aba-payway-docs).
|
|
277
297
|
|
|
298
|
+
## Contributing
|
|
299
|
+
|
|
300
|
+
Found a bug or have a feature request? [Open an issue](https://github.com/Joselay/aba-payway/issues) — all feedback is welcome.
|
|
301
|
+
|
|
302
|
+
Pull requests are also welcome. Please make sure tests pass before submitting:
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
bun run test
|
|
306
|
+
bun run typecheck
|
|
307
|
+
bun run lint
|
|
308
|
+
```
|
|
309
|
+
|
|
278
310
|
## License
|
|
279
311
|
|
|
280
312
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aba-payway",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Type-safe TypeScript SDK for ABA PayWay — Cambodia's #1 payment gateway",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -33,11 +33,23 @@
|
|
|
33
33
|
"keywords": [
|
|
34
34
|
"aba",
|
|
35
35
|
"payway",
|
|
36
|
+
"aba-payway",
|
|
36
37
|
"cambodia",
|
|
37
38
|
"payment",
|
|
38
39
|
"payment-gateway",
|
|
39
40
|
"typescript",
|
|
40
|
-
"sdk"
|
|
41
|
+
"sdk",
|
|
42
|
+
"khqr",
|
|
43
|
+
"qr-payment",
|
|
44
|
+
"checkout",
|
|
45
|
+
"aba-bank",
|
|
46
|
+
"nodejs",
|
|
47
|
+
"fintech",
|
|
48
|
+
"cambodia-payment",
|
|
49
|
+
"bun",
|
|
50
|
+
"deno",
|
|
51
|
+
"esm",
|
|
52
|
+
"cloudflare-workers"
|
|
41
53
|
],
|
|
42
54
|
"engines": {
|
|
43
55
|
"node": ">=18.0.0"
|