Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@chuva.io/sisp
Advanced tools
This module simplifies getting started with processing Vinti4, Visa, and Mastercard payments using SISP on Node.js.
This module simplifies getting started with processing Vinti4, Visa, and Mastercard payments using SISP on Node.js.
Note: You can request SISP credentials, view their documentation, and more here.
// Credentials that should be provided by SISP
const posID = "";
const posAutCode = "";
const url = "";
These credentials are used to allow you to process the payment using SISP payment services.
Import sisp-payments
and create a new instance using your credentials. (obtained from SISP):
const Sisp = require('sisp-payments');
const posID = 900512;
const posAutCode = "123456789ssA";
const url = "https://mc.vinti4net.cv/payments";
const sisp = new Sisp({ posID, posAutCode, url });
sisp.generatePaymentRequestForm(referenceId, total, webhookUrl);
Generates and returns an HTML form that can be used to process payments.
referenceId
: Client-generated payment reference ID. This value is sent via a POST
request to the webhookUrl
and allows the client to correlate the payment request and response.total
: Payment amount (in CVE).webhookUrl
: The url where SISP should send the payment response. You should expect a POST
request with payment information in the body. See the SISP documentation for more information.const referenceId = 'abc-123';
const total = 1200;
const webhookUrl = 'https://samba.chuva.io/webhooks/sisp-payment';
const htmlForm = sisp.generatePaymentRequestForm(referenceId, total, webhookUrl);
Check whether or not a payment was processed successfully. Note: This method is provided as a convenience. See the SISP documentation for the request structure.
Pass the Webhook request body to validatePayment
. Returns an error object containing code
and description
if there is an error, otherwise returns undefined
.
validatePayment(responseBody)
Code: string | Description: string |
---|---|
001 | Payment processing error: Invalid fingerprint |
002 | Payment processing error: Cancelled by user |
003 | Payment processing error: Processing error |
app.post("/webhook-handler", (request, response) => {
const error = sisp.validatePayment(request.body);
if(error === undefined) {
// Payment processed successfully
}
else {
// Payment processing error
console.log(error.code);
console.log(error.description);
}
}
FAQs
This module simplifies getting started with processing Vinti4, Visa, and Mastercard payments using SISP on Node.js.
The npm package @chuva.io/sisp receives a total of 0 weekly downloads. As such, @chuva.io/sisp popularity was classified as not popular.
We found that @chuva.io/sisp 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.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.