
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
autoft-qris
Advanced tools
Package untuk generate QRIS dengan 2 tema (Biru & Hijau) dan cek payment status secara realtime dengan API OrderKuota
Node.js package untuk generate QRIS, cek status pembayaran, dan otomatis generate PDF receipt menggunakan API OrderKuota.
Updated by AlfiDev as contributor - Version 0.0.9
npm install autoft-qris
import { QRISGenerator, PaymentChecker, ReceiptGenerator } from 'autoft-qris';
import { writeFileSync } from 'fs';
const config = {
storeName: 'Nama Toko Contoh',
auth_username: '#',
auth_token: '#',
baseQrString: '#',
logoPath: './logo-agin.png'
};
const qrisGen = new QRISGenerator(config, 'theme1');
const paymentChecker = new PaymentChecker({
auth_token: config.auth_token,
auth_username: config.auth_username
});
const receiptGen = new ReceiptGenerator(config);
const amount = 50000;
const qrString = qrisGen.generateQrString(amount);
const qrBuffer = await qrisGen.generateQRWithLogo(qrString);
writeFileSync('qris.png', qrBuffer);
const paymentResult = await paymentChecker.checkPaymentStatus('REF123', amount);
if (paymentResult.success && paymentResult.data.status === 'PAID') {
const receipt = await receiptGen.generateReceipt(paymentResult.data);
console.log('Receipt generated:', receipt.filePath);
}
const { QRISGenerator, PaymentChecker, ReceiptGenerator } = require('autoft-qris');
const fs = require('fs');
const config = {
storeName: 'Nama Toko Contoh',
auth_username: '#',
auth_token: '#',
baseQrString: '#',
logoPath: './logo-agin.png'
};
const qrisGen = new QRISGenerator(config, 'theme1');
const paymentChecker = new PaymentChecker({
auth_token: config.auth_token,
auth_username: config.auth_username
});
const receiptGen = new ReceiptGenerator(config);
async function main() {
const amount = 50000;
const qrString = qrisGen.generateQrString(amount);
const qrBuffer = await qrisGen.generateQRWithLogo(qrString);
fs.writeFileSync('qris.png', qrBuffer);
const paymentResult = await paymentChecker.checkPaymentStatus('REF123', amount);
if (paymentResult.success && paymentResult.data.status === 'PAID') {
const receipt = await receiptGen.generateReceipt(paymentResult.data);
console.log('Receipt generated:', receipt.filePath);
}
}
main();
const { QRISGenerator } = require('autoft-qris');
const fs = require('fs');
const config = {
storeName: 'Nama Toko Contoh',
auth_username: '#',
auth_token: '#',
baseQrString: '#',
logoPath: './logo-agin.png'
};
const qrGenerator1 = new QRISGenerator(config, 'theme1');
const qrString1 = qrGenerator1.generateQrString(50000);
const qrBuffer1 = await qrGenerator1.generateQRWithLogo(qrString1);
fs.writeFileSync('qris-theme1.png', qrBuffer1);
const qrGenerator2 = new QRISGenerator(config, 'theme2');
const qrString2 = qrGenerator2.generateQrString(50000);
const qrBuffer2 = await qrGenerator2.generateQRWithLogo(qrString2);
fs.writeFileSync('qris-theme2.png', qrBuffer2);
const qrGenerator = new QRISGenerator(config, 'theme1');
qrGenerator.setTheme('theme2');
const themes = QRISGenerator.getAvailableThemes();
console.log(themes);
const { QRISGenerator, PaymentChecker, ReceiptGenerator } = require('autoft-qris');
const fs = require('fs');
const config = {
storeName: 'Nama Toko Contoh',
auth_username: '#',
auth_token: '#',
baseQrString: '#',
logoPath: './logo-agin.png'
};
const qrisGen = new QRISGenerator(config, 'theme1');
const paymentChecker = new PaymentChecker({
auth_token: config.auth_token,
auth_username: config.auth_username
});
const receiptGen = new ReceiptGenerator(config);
async function main() {
try {
console.log('=== TEST REALTIME QRIS PAYMENT ===\n');
const randomAmount = Math.floor(Math.random() * 99) + 1;
const amount = 100 + randomAmount;
const reference = 'REF' + Date.now();
const qrString = qrisGen.generateQrString(amount);
const qrBuffer = await qrisGen.generateQRWithLogo(qrString);
fs.writeFileSync('qr.png', qrBuffer);
console.log('=== TRANSACTION DETAILS ===');
console.log('Reference:', reference);
console.log('Amount:', amount);
console.log('QR Image:', 'qr.png');
console.log('\nSilakan scan QR code dan lakukan pembayaran');
console.log('\nMenunggu pembayaran...\n');
const startTime = Date.now();
const timeout = 5 * 60 * 1000;
while (Date.now() - startTime < timeout) {
const result = await paymentChecker.checkPaymentStatus(reference, amount);
if (result.success && result.data.status === 'PAID') {
console.log('✓ Pembayaran berhasil!');
const receipt = await receiptGen.generateReceipt(result.data);
console.log('✓ Bukti transaksi:', receipt.filePath);
return;
}
await new Promise(resolve => setTimeout(resolve, 3000));
console.log('Menunggu pembayaran...');
}
throw new Error('Timeout: Pembayaran tidak diterima dalam 5 menit');
} catch (error) {
console.error('Error:', error.message);
}
}
main();
const qrisGen = new QRISGenerator(config, theme)
qrisGen.generateQrString(amount)
await qrisGen.generateQRWithLogo(qrString)
qrisGen.calculateCRC16(str)
qrisGen.setTheme(theme)
qrisGen.getCurrentTheme()
QRISGenerator.getAvailableThemes()
const paymentChecker = new PaymentChecker(config)
await paymentChecker.checkPaymentStatus(reference, amount)
await paymentChecker.checkSaldo()
const receiptGen = new ReceiptGenerator(config)
await receiptGen.generateReceipt(transactionData)
const paymentChecker = new PaymentChecker({
auth_token: 'your_token',
auth_username: 'your_username'
});
const saldo = await paymentChecker.checkSaldo();
if (saldo.success) {
console.log('Saldo:', saldo.data.saldo);
}
Package ini mendukung both ESM dan CommonJS:
.mjs
files dan import
statements.cjs
files dan require()
statementsPackage ini akan menampilkan warning jika menggunakan Node.js 21+ karena masalah kompatibilitas dengan chalk package. Recommended menggunakan Node.js 20.18.3 LTS.
Package ini menggunakan API OrderKuota untuk cek status pembayaran. Pastikan Anda memiliki:
auth_username
: Username autentikasiauth_token
: Token autentikasiUntuk mendapatkan kredensial API, hubungi @AutoFtBot69
Q: Apakah receipt bisa custom logo dan nama toko?
A: Bisa, cukup atur logoPath
dan storeName
di config.
Q: Apakah receipt otomatis dibuat saat pembayaran sukses?
A: Ya, receipt PDF otomatis dibuat dan path-nya bisa diambil dari paymentResult.receipt.filePath
.
Q: Apakah bisa polling pembayaran lebih cepat/lebih lama?
A: Bisa, atur parameter interval
dan maxAttempts
pada fungsi polling.
Q: Bagaimana cara mendapatkan kredensial API OrderKuota?
A: Hubungi @AutoFtBot69 untuk mendapatkan username dan token autentikasi.
Q: Apakah support ESM dan CommonJS?
A: Ya, package ini fully support both module systems dengan auto-detection.
Pull request sangat diterima!
Buka issue untuk diskusi fitur/bug sebelum submit PR.
Jika ada pertanyaan, silakan buka issue di GitHub
MIT # AutoFT QRIS Generator
Package untuk generate QRIS dengan 2 tema (Biru & Hijau) dan cek payment status secara realtime dengan API OrderKuota.
Updated by AlfiDev as contributor - Version 0.0.7
npm install autoft-qris
import { QRISGenerator } from 'autoft-qris';
const config = {
baseQrString: 'your_base_qris_string_here',
logoPath: './path/to/logo.png' // optional
};
const qrisGen = new QRISGenerator(config, 'theme1');
const amount = 50000;
const qrString = qrisGen.generateQrString(amount);
const qrImage = await qrisGen.generateQRWithLogo(qrString);
console.log('QR String:', qrString);
const { QRISGenerator } = require('autoft-qris');
const config = {
baseQrString: 'your_base_qris_string_here',
logoPath: './path/to/logo.png' // optional
};
const qrisGen = new QRISGenerator(config, 'theme2');
const amount = 50000;
const qrString = qrisGen.generateQrString(amount);
const qrImage = await qrisGen.generateQRWithLogo(qrString);
console.log('QR String:', qrString);
// Get available themes
const themes = QRISGenerator.getAvailableThemes();
console.log(themes);
// Switch theme
qrisGen.setTheme('theme2');
console.log('Current theme:', qrisGen.getCurrentTheme());
import QRISGeneratorTheme1 from 'autoft-qris/src/qr-generator.mjs';
import QRISGeneratorTheme2 from 'autoft-qris/src/qr-generator2.mjs';
const QRISGeneratorTheme1 = require('autoft-qris/src/qr-generator.cjs');
const QRISGeneratorTheme2 = require('autoft-qris/src/qr-generator2.cjs');
new QRISGenerator(config, theme)
config
(Object): Configuration object
baseQrString
(String): Base QRIS string (required)logoPath
(String): Path to logo image (optional)theme
(String): Theme selection ('theme1' or 'theme2', default: 'theme1')generateQrString(amount)
Generate QRIS string with specified amount.
Parameters:
amount
(Number): Payment amountReturns: String - Complete QRIS string with checksum
generateQRWithLogo(qrString)
Generate QR code image with optional logo.
Parameters:
qrString
(String): QRIS string to encodeReturns: Promise - PNG image buffer
calculateCRC16(str)
Calculate CRC16 checksum for QRIS string.
Parameters:
str
(String): String to calculate checksum forReturns: String - 4-character uppercase hex checksum
setTheme(theme)
Switch between themes.
Parameters:
theme
(String): 'theme1' or 'theme2'getCurrentTheme()
Get current active theme.
Returns: String - Current theme name
static getAvailableThemes()
Get list of available themes.
Returns: Array - Available themes with descriptions
This package supports both ESM and CommonJS:
.mjs
files and import
statements.cjs
files and require()
statementsMIT
FAQs
Package untuk generate QRIS dengan 2 tema (Biru & Hijau) dan cek payment status secara realtime dengan API OrderKuota
The npm package autoft-qris receives a total of 43 weekly downloads. As such, autoft-qris popularity was classified as not popular.
We found that autoft-qris demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.