
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Package untuk generate QRIS dan cek payment status secara realtime dengan API OrderKuota dari https://api.wahdx.co
Package untuk generate QRIS dan cek payment status secara realtime dengan API OrderKuota dari https://api.wahdx.co.
npm install wahdx-api
Buat file .env
di root project Anda:
WAHDX_TOKENKEY=your_wahdx_token_key
ORKUT_TOKEN_AUTH=your_orkut_token_auth
ORKUT_USERNAME=your_orkut_username
Catatan: Untuk mendapatkan tokenKey, Anda bisa membelinya di halaman https://api.wahdx.co
Opsi | Deskripsi | Default |
---|---|---|
storeName | Nama toko yang akan ditampilkan pada receipt | - |
defaultQrPath | Path ke QRIS static yang didownload di merchant orderkuota | - |
tokenKey | Token key dari WAHDX | - |
auth_token | Token autentikasi OrderKuota | - |
auth_username | Username OrderKuota | - |
autoGenerateReceipt | Mengaktifkan/menonaktifkan pembuatan receipt otomatis | true |
import QRISPayment from 'wahdx-api';
import '@dotenvx/dotenvx/config';
import fs from 'fs';
// Konfigurasi
const config = {
storeName: 'AHDX STORE',
defaultQrPath: 'QRIS.png', // Path ke QRIS static yang didownload di merchant orderkuota
tokenKey: process.env.WAHDX_TOKENKEY,
auth_token: process.env.ORKUT_TOKEN_AUTH,
auth_username: process.env.ORKUT_USERNAME,
autoGenerateReceipt: true // Atur false jika tidak ingin otomatis membuat receipt
};
// Membuat instance QRISPayment
const qrisPayment = new QRISPayment(config);
async function main() {
try {
console.log('=== TEST REALTIME QRIS PAYMENT ===\n');
const randomAmount = Math.floor(Math.random() * 99) + 1; // Random 1-99
const amount = 100 + randomAmount; // Base 100 + random amount
const reference = 'REF' + Date.now();
// Generate QR code
const { qrBuffer } = await qrisPayment.generateQRFromImage(amount);
// Save QR code image
fs.writeFileSync(`qr-${amount}.png`, qrBuffer);
console.log('=== TRANSACTION DETAILS ===');
console.log('Reference:', reference);
console.log('Amount:', amount);
console.log('QR Image:', `qr-${amount}.png`);
console.log('\nSilakan scan QR code dan lakukan pembayaran');
console.log('\nMenunggu pembayaran...\n');
// Check payment status with 5 minutes timeout
const startTime = Date.now();
const timeout = 5 * 60 * 1000;
while (Date.now() - startTime < timeout) {
const result = await qrisPayment.checkPayment(reference, amount);
if (result.success && result.data.status === 'PAID') {
console.log('✓ Pembayaran berhasil!');
if (result.receipt) {
console.log('✓ Bukti transaksi:', result.receipt.filePath);
}
return;
}
await new Promise(resolve => setTimeout(resolve, 10000)); // delay 10 detik
console.log('Menunggu pembayaran...');
}
throw new Error('Timeout: Pembayaran tidak diterima dalam 5 menit');
} catch (error) {
console.error('Error:', error.message);
}
}
main();
import QRISPayment from 'wahdx-api';
const config = {
storeName: 'NAMA TOKO',
defaultQrPath: 'path/to/qris/template.png',
tokenKey: 'your_wahdx_token_key',
auth_token: 'your_orkut_token_auth',
auth_username: 'your_orkut_username',
autoGenerateReceipt: true // Atur false jika tidak ingin otomatis membuat receipt
};
const qrisPayment = new QRISPayment(config);
const amount = 10000; // Rp 10.000
// Menggunakan default QR yang sudah diatur
const { qrString, qrBuffer } = await qrisPayment.generateQRFromImage(amount);
// Atau dengan path QR spesifik
// const { qrString, qrBuffer } = await qrisPayment.generateQRFromImage(amount, 'path/to/qris/template.png');
// Simpan QR ke file
fs.writeFileSync('qr-output.png', qrBuffer);
const reference = 'REF' + Date.now();
const amount = 10000;
const result = await qrisPayment.checkPayment(reference, amount);
console.log(result);
/*
Output jika berhasil:
{
success: true,
data: {
status: 'PAID',
amount: 10000,
reference: 'REF1234567890',
...
},
receipt: {
filePath: 'path/to/receipt.pdf',
...
}
}
*/
Jika Anda telah menonaktifkan autoGenerateReceipt
dalam konfigurasi, Anda dapat menghasilkan receipt secara manual dengan metode berikut:
// Ketika pembayaran sudah diterima
const result = await qrisPayment.checkPayment(reference, amount);
if (result.success && result.data.status === 'PAID') {
// Generate receipt secara manual
const receipt = await qrisPayment.generateReceipt(result.data);
console.log('Receipt berhasil dibuat:', receipt.filePath);
}
A: Anda bisa membeli tokenKey di halaman utama https://api.wahdx.co
A: Silahkan kunjungi dokumentasi api https://api.wahdx.co/api-docs untuk mendapatkan token pada akun orderkuota anda.
A: Ya! Package ini mendukung dual module system (ESM dan CommonJS). Anda bisa menggunakan dengan dua cara:
type: "module"
di package.json):import QRISPayment from 'wahdx-api';
const qrisPayment = new QRISPayment(config);
// gunakan qrisPayment
type: "module"
):const QRISPayment = require('wahdx-api');
const qrisPayment = new QRISPayment(config);
// gunakan qrisPayment
Package secara otomatis mendeteksi format yang digunakan dan menyediakan versi yang sesuai.
MIT
FAQs
Package untuk generate QRIS dan cek payment status secara realtime dengan API OrderKuota dari https://api.wahdx.co
The npm package wahdx-api receives a total of 9 weekly downloads. As such, wahdx-api popularity was classified as not popular.
We found that wahdx-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.