
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
qlink-pdi-client
Advanced tools
A Node.js library to interact with the QLINK Standard Electronic Payroll Deduction Interface API (version 7.x.x). This is the initial release tailored for QLINK's payroll deduction services.
This library provides a client for sending requests to the QLink API, specifically supporting payroll deductions (SEPDI, FEPDI) and error handling.
To use the qlink-pdi-client
, ensure you have the following environment variables configured in a .env
file:
QLINK_USER=yourUsername
QLINK_PASSWORD=yourPassword
QLINK_URL=https://govtest.qlink.co.za/cgi-bin/XmlProc
QLINK_INSTITUTION_ID=9999
QLINK_LOG_LEVEL=DEBUG
Here’s how to use the library to establish a connection, send a SEPDI deduction, and perform bulk FEPDI deductions. Note: All SEPDI and FEPDI transactions types (TRX) must be set to Q_LINK_TRANSACTIONS (5)
import dotenv from 'dotenv';
import { Configuration, CreateInsurancePayrollDeductionFields, DeductionType, DeleteInsurancePayrollDeductionFields, MandateCapture, PayrollIdentifier, QLinkClient, UpdateAmountFields, UpdateReferenceFields } from 'qlink-pdi-client';
dotenv.config();
const main = async () => {
const qlink = new QLinkClient(
{
institution: Number(process.env.QLINK_INSTITUTION_ID),
password: process.env.QLINK_PASSWORD,
username: process.env.QLINK_USERNAME,
baseUrl: process.env.QLINK_URL,
} as Configuration
)
await qlink.testConnection();
const governmentEmployeeNumber = "84177942";
const employee = await qlink.queryEmployeeInfo({ employeeNumber: governmentEmployeeNumber, payrollIdentifier: PayrollIdentifier.PERSAL });
console.log(employee);
const beginDeductionFrom = new Date("2024-12");
let amount: number = 10000;
let refNumber: string = "ASQ6543FHAHDCS1";
const deductionFields: CreateInsurancePayrollDeductionFields = {
employeeNumber: governmentEmployeeNumber,
amount: amount,
beginDeductionFrom: beginDeductionFrom,
referenceNumber: refNumber,
deductionType: DeductionType.SEPDI_INSURANCE_LIFE,
payrollIdentifier: PayrollIdentifier.PERSAL,
mandateCapturedOn: MandateCapture.PAPER_MANDATE,
}
const results1 = await qlink.createInsurancePayrollDeduction(deductionFields);
console.log(results1);
amount += 10000;
const updateDeductionFields: UpdateAmountFields = {
employeeNumber: governmentEmployeeNumber,
amount: amount,
beginDeductionFrom: beginDeductionFrom,
referenceNumber: refNumber,
deductionType: DeductionType.SEPDI_INSURANCE_LIFE,
payrollIdentifier: PayrollIdentifier.PERSAL,
}
console.log(updateDeductionFields);
const results2 = await qlink.updateDeductionAmount(updateDeductionFields);
console.log(results2);
refNumber = "A222222";
const fixDeductionFields: UpdateReferenceFields = {
employeeNumber: governmentEmployeeNumber,
amount: amount,
beginDeductionFrom: beginDeductionFrom,
referenceNumber: refNumber,
deductionType: DeductionType.SEPDI_INSURANCE_LIFE,
payrollIdentifier: PayrollIdentifier.PERSAL,
}
console.log(fixDeductionFields);
const results3 = await qlink.updateDeductionReferences(fixDeductionFields);
console.log(results3);
const delDeductionFields: DeleteInsurancePayrollDeductionFields = {
employeeNumber: governmentEmployeeNumber,
payrollIdentifier: PayrollIdentifier.PERSAL,
referenceNumber: refNumber,
amount: amount,
cancelDeductionFrom: beginDeductionFrom,
deductionType: DeductionType.SEPDI_INSURANCE_LIFE,
}
console.log(delDeductionFields);
const results4 = await qlink.deleteDeduction(delDeductionFields);
console.log(results4);
};
main();
QLinkClient
with environment-based configuration and transaction details. QlinkClient
exposes service methods for retrieving employee information and managing payroll deductions.QLinkError
or unexpected errors.Ensure your public IP address is registered with QLink by running:
curl ifconfig.me
Set up the development environment:
curl -o setup-remote-env.sh https://raw.githubusercontent.com/RootBank/qlink-pdi-client/refs/heads/main/setup-remote-env.sh
chmod +x setup-remote-env.sh
sudo ./setup-remote-env.sh
Configure SSH access for your remote EC2 environment:
# ~/.ssh/config
Host sandbox-dev
HostName <ip address> # from private subnet
User ec2-user
IdentityFile ~/.ssh/id_ed25519
ProxyJump sandbox-jumphost
Host sandbox-jumphost
HostName <ip address> # from public subnet
User ec2-user
IdentityFile ~/.ssh/id_ed25519
ForwardAgent yes
institution
, transactionType
) for code clarity.Make sure to include these environment variables in your .env
file:
QLINK_USER=yourUsername
QLINK_PASSWORD=yourPassword
QLINK_URL=https://govtest.qlink.co.za/cgi-bin/XmlProc
QLINK_INSTITUTION_ID=9999
QLINK_LOG_LEVEL=DEBUG
Now you’re all set to integrate with the QLink API using qlink-pdi-client
!
FAQs
A Node.js library to interact with the QLINK Standard Electronic Payroll Deduction Interface API (version 7.x.x). This is the initial release tailored for QLINK's payroll deduction services.
We found that qlink-pdi-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.