wahdx-api 2.0.1 → 2.0.2
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 +14 -6
- package/dist/payment-checker.cjs +7 -5
- package/dist/payment-checker.mjs +7 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Package untuk generate QRIS dan cek payment status secara realtime dengan API OrderKuota dari [https://eqris.com](https://eqris.com).
|
|
4
4
|
|
|
5
|
-
>
|
|
5
|
+
> **PENTING: Perubahan di Versi 2.0.2**
|
|
6
|
+
>
|
|
7
|
+
> Endpoint mutasi OrderKuota terbaru membutuhkan `captcha_key`. Nilai ini adalah API key dari 2Captcha yang diperlukan untuk auto resolve captcha. Tambahkan `ORKUT_CAPTCHA_KEY` di `.env` dan kirim sebagai `captcha_key` pada konfigurasi package.
|
|
8
|
+
|
|
9
|
+
> **PENTING: Perubahan di Versi 2.0.0**
|
|
6
10
|
>
|
|
7
11
|
> Pada versi 2.0.0, kami melakukan perubahan besar pada package ini:
|
|
8
12
|
> - Fitur `generateQRFromImage` telah **DIHAPUS** sepenuhnya
|
|
@@ -32,6 +36,7 @@ Buat file `.env` di root project Anda:
|
|
|
32
36
|
WAHDX_TOKENKEY=your_wahdx_token_key
|
|
33
37
|
ORKUT_TOKEN_AUTH=your_orkut_token_auth
|
|
34
38
|
ORKUT_USERNAME=your_orkut_username
|
|
39
|
+
ORKUT_CAPTCHA_KEY=your_2captcha_api_key
|
|
35
40
|
```
|
|
36
41
|
|
|
37
42
|
> **Catatan:** Untuk mendapatkan tokenKey, Anda bisa membelinya di halaman [https://eqris.com](https://eqris.com)
|
|
@@ -45,6 +50,7 @@ ORKUT_USERNAME=your_orkut_username
|
|
|
45
50
|
| tokenKey | Token key dari WAHDX | - |
|
|
46
51
|
| auth_token | Token autentikasi OrderKuota | - |
|
|
47
52
|
| auth_username | Username OrderKuota | - |
|
|
53
|
+
| captcha_key | API key 2Captcha untuk auto resolve captcha pada endpoint mutasi OrderKuota | - |
|
|
48
54
|
| autoGenerateReceipt | Mengaktifkan/menonaktifkan pembuatan receipt otomatis | true |
|
|
49
55
|
|
|
50
56
|
## Penggunaan
|
|
@@ -61,8 +67,9 @@ const config = {
|
|
|
61
67
|
storeName: 'AHDX STORE',
|
|
62
68
|
baseQrString: 'base-qr-string-anda', // Diperlukan untuk generateQR secara lokal
|
|
63
69
|
tokenKey: process.env.WAHDX_TOKENKEY, // Diperlukan untuk generateQRFromAPI
|
|
64
|
-
auth_token: process.env.ORKUT_TOKEN_AUTH, // Diperlukan untuk generateQRFromAPI
|
|
65
|
-
auth_username: process.env.ORKUT_USERNAME, // Diperlukan untuk generateQRFromAPI
|
|
70
|
+
auth_token: process.env.ORKUT_TOKEN_AUTH, // Diperlukan untuk generateQRFromAPI dan checkPayment
|
|
71
|
+
auth_username: process.env.ORKUT_USERNAME, // Diperlukan untuk generateQRFromAPI dan checkPayment
|
|
72
|
+
captcha_key: process.env.ORKUT_CAPTCHA_KEY, // API key 2Captcha untuk auto resolve captcha endpoint mutasi
|
|
66
73
|
autoGenerateReceipt: true // Atur false jika tidak ingin otomatis membuat receipt
|
|
67
74
|
};
|
|
68
75
|
|
|
@@ -129,8 +136,9 @@ const config = {
|
|
|
129
136
|
storeName: 'NAMA TOKO',
|
|
130
137
|
baseQrString: 'base-qr-string-anda', // Diperlukan untuk generateQR secara lokal
|
|
131
138
|
tokenKey: 'your_wahdx_token_key', // Diperlukan untuk generateQRFromAPI
|
|
132
|
-
auth_token: 'your_orkut_token_auth', // Diperlukan untuk generateQRFromAPI
|
|
133
|
-
auth_username: 'your_orkut_username', // Diperlukan untuk generateQRFromAPI
|
|
139
|
+
auth_token: 'your_orkut_token_auth', // Diperlukan untuk generateQRFromAPI dan checkPayment
|
|
140
|
+
auth_username: 'your_orkut_username', // Diperlukan untuk generateQRFromAPI dan checkPayment
|
|
141
|
+
captcha_key: 'your_2captcha_api_key', // API key 2Captcha untuk auto resolve captcha endpoint mutasi
|
|
134
142
|
autoGenerateReceipt: true // Atur false jika tidak ingin otomatis membuat receipt
|
|
135
143
|
};
|
|
136
144
|
|
|
@@ -237,4 +245,4 @@ Package secara otomatis mendeteksi format yang digunakan dan menyediakan versi y
|
|
|
237
245
|
|
|
238
246
|
## Lisensi
|
|
239
247
|
|
|
240
|
-
MIT
|
|
248
|
+
MIT
|
package/dist/payment-checker.cjs
CHANGED
|
@@ -3,13 +3,14 @@ const moment = require("moment-timezone");
|
|
|
3
3
|
|
|
4
4
|
class PaymentChecker {
|
|
5
5
|
constructor(config) {
|
|
6
|
-
if (!config.tokenKey || !config.auth_username || !config.auth_token) {
|
|
7
|
-
throw new Error('tokenKey, auth_username, dan
|
|
6
|
+
if (!config.tokenKey || !config.auth_username || !config.auth_token || !config.captcha_key) {
|
|
7
|
+
throw new Error('tokenKey, auth_username, auth_token, dan captcha_key harus diisi');
|
|
8
8
|
}
|
|
9
9
|
this.config = {
|
|
10
10
|
tokenKey: config.tokenKey,
|
|
11
11
|
auth_username: config.auth_username,
|
|
12
|
-
auth_token: config.auth_token
|
|
12
|
+
auth_token: config.auth_token,
|
|
13
|
+
captcha_key: config.captcha_key
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
16
|
|
|
@@ -23,7 +24,8 @@ class PaymentChecker {
|
|
|
23
24
|
'https://eqris.com/api/mutasi-orkut-v2',
|
|
24
25
|
{
|
|
25
26
|
username_orkut: this.config.auth_username,
|
|
26
|
-
token_orkut: this.config.auth_token
|
|
27
|
+
token_orkut: this.config.auth_token,
|
|
28
|
+
captcha_key: this.config.captcha_key
|
|
27
29
|
},
|
|
28
30
|
{
|
|
29
31
|
headers: {
|
|
@@ -89,4 +91,4 @@ class PaymentChecker {
|
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
module.exports = PaymentChecker;
|
|
94
|
+
module.exports = PaymentChecker;
|
package/dist/payment-checker.mjs
CHANGED
|
@@ -3,13 +3,14 @@ import moment from 'moment-timezone';
|
|
|
3
3
|
|
|
4
4
|
class PaymentChecker {
|
|
5
5
|
constructor(config) {
|
|
6
|
-
if (!config.tokenKey || !config.auth_username || !config.auth_token) {
|
|
7
|
-
throw new Error('tokenKey, auth_username, dan
|
|
6
|
+
if (!config.tokenKey || !config.auth_username || !config.auth_token || !config.captcha_key) {
|
|
7
|
+
throw new Error('tokenKey, auth_username, auth_token, dan captcha_key harus diisi');
|
|
8
8
|
}
|
|
9
9
|
this.config = {
|
|
10
10
|
tokenKey: config.tokenKey,
|
|
11
11
|
auth_username: config.auth_username,
|
|
12
|
-
auth_token: config.auth_token
|
|
12
|
+
auth_token: config.auth_token,
|
|
13
|
+
captcha_key: config.captcha_key
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
16
|
|
|
@@ -23,7 +24,8 @@ class PaymentChecker {
|
|
|
23
24
|
'https://eqris.com/api/mutasi-orkut-v2',
|
|
24
25
|
{
|
|
25
26
|
username_orkut: this.config.auth_username,
|
|
26
|
-
token_orkut: this.config.auth_token
|
|
27
|
+
token_orkut: this.config.auth_token,
|
|
28
|
+
captcha_key: this.config.captcha_key
|
|
27
29
|
},
|
|
28
30
|
{
|
|
29
31
|
headers: {
|
|
@@ -89,4 +91,4 @@ class PaymentChecker {
|
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
export default PaymentChecker;
|
|
94
|
+
export default PaymentChecker;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wahdx-api",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Package untuk generate QRIS dan cek payment status secara realtime dengan API OrderKuota dari https://eqris.com",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -45,4 +45,4 @@
|
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=20.18.3"
|
|
47
47
|
}
|
|
48
|
-
}
|
|
48
|
+
}
|