Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@notchpay/payment
Advanced tools
Nodejs API wrapper for Notch Pay.
npm install @notchpay/payment
Authenticate
// Require the library
var notchpay = require("@notchpay/payment")("business_key");
Allows you to perform transactions on your nodejs and JavaScript applications.
// Initiate transaction
await notchpay
.transaction()
.init(500, "usd", {
name: "Chapdel KAMGA",
email: "hello@chapdel.me",
})
.then((r) => {
console.log("success", r.data);
})
.catch((e) => {
console.log("error", e);
});
// Check transaction
await notchpay
.transaction()
.check("transaction_reference")
.then((r) => {
console.log("success", r.data);
})
.catch((e) => {
console.log("error", e);
});
// Complete transaction
await notchpay
.transaction()
.complete("transaction_reference", "notchpay", {
number: 123456789,
code: 12345,
})
.then((r) => {
console.log("success", r.data);
})
.catch((e) => {
console.log("error", e);
});
This method offers you the possibility to complete the transaction in a new window. It is necessary to follow our instructions.
// Complete transaction
await notchpay
.transaction()
.complete("transaction_reference", "notchpay", {
number: 123456789,
code: 12345,
})
.then((r) => {
var _transaction = notchpay
.transaction()
.completeWithWindow(r.data.authorization_url, r.data.transaction);
var watcher = setInterval(() => {
console.log(_transaction);
if (_transaction.status != null && _transaction.status != "pending") {
clearInterval(watcher);
// your code here
/*switch (transaction.status) {
}*/
}
}, 2000);
})
.catch((e) => {
console.log("error", e);
});
FAQs
Notch Pay API wrapper.
We found that @notchpay/payment demonstrated a not healthy version release cadence and project activity because the last version was released 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
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.