
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
payment-checkout-js
Advanced tools
Nodejs API for that fixed any Checkout Process.
npm install payment-checkout-js
var url = "endpoint";
// Require the library
var payment = require('payment-checkout-js')(process.env.APP_ID, process.env.APP_KEY, url);
The resource methods accepts are promisified, but can receive optional callback as the last argument.
// payment.{resource}
payment.checkout.createPayment({})
.then((body)=> {
console.log(body);
})
.catch((error)=> {
console.log(error);
});
For all resource methods, the JSON body can be passed as the argument.
Method to Initiation a checkout payment.
payment.checkout.createCheckout({
name: 'Firstname Lastname',
mobile: '+233540000000',
mobile_network: 'MTN || AIRTEL || TIGO || VODAFONE',
email: 'harmony@cross-switch.com',
currency: 'GHS',
amount: 0.1,
order_id: `${Math.ceil(Math.random() * 10e8)}`,
order_desc: 'Testing',
account: '',
customerid: '',
callback: ''
}).then((body)=> {
console.log(body);
}).catch((error)=> {
console.log(error);
});
Method to process mobile Money on Checkout.
payment.checkout.ProcessMomoCheckout({
code: '+233540000000',
mobile_network: 'MTN || AIRTEL || TIGO || VODAFONE',
email: 'harmony@icloud.com',
amount: 1,
}).then((body)=> {
console.log(body);
}).catch((error)=> {
console.log(error);
});
Method to Get Cashout Balance.
payment.checkout.getCheckout({})
.then((body)=> {
console.log(body);
}).catch((error)=> {
console.log(error);
});
Method to Verify Transaction status.
payment.checkout.verifyPayment({
order_id: `${data.transaction_no}`,
}).then((body)=> {
console.log(body);
}).catch((error)=> {
console.log(error);
});
FAQs
Standard Checkout
We found that payment-checkout-js 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.