Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
node-yandex-kassa
Advanced tools
Readme
by Zero One
JavaScript utilities to integrate Yandex.Kassa payment API with your app
npm install --save node-yandex-kassa
Example usage with Express in route handler:
import { checkMD5, buildResponse } from 'node-yandex-kassa';
const { KASSA_SHOP_PASSWORD } = process.env; // ... if you store such things there
app.post('/payments/check_order', (req, res, next) => {
const { body } = req;
const { invoiceId, shopId } = body;
if (!checkMD5(body, KASSA_SHOP_PASSWORD)) {
return res.status(400).send('Validation of MD5 failed');
}
// ...
//
// Here you might validate request params (orderNumber of customerNumber, for example)
// if these parameters were passed to payment form
// ...
res.set('Content-Type', 'text/xml');
res.send(buildResponse('checkOrder', 0, shopId, invoiceId));
});
Returns boolean
.
Checks request body for valid md5
param.
Requests are being made by Yandex.Kassa service and have standart format (with sample data):
Key | Value |
---|---|
requestDatetime | 2011-05-04T20:38:00.000+04:00 |
action | checkOrder |
md5 | 8256D2A032A35709EAF156270C9EFE2E |
shopId | 13 |
shopArticleId | 456 |
invoiceId | 1234567 |
customerNumber | 8123294469 |
orderCreatedDatetime | 2011-05-04T20:38:00.000+04:00 |
orderSumAmount | 87.10 |
orderSumCurrencyPaycash | 643 |
orderSumBankPaycash | 1001 |
shopSumAmount | 86.23 |
shopSumCurrencyPaycash | 643 |
shopSumBankPaycash | 1001 |
paymentPayerCode | 42007148320 |
paymentType | AC |
Returns string
.
Generates string with valid XML required by Yandex.Kassa API.
Example of successful response:
<?xml version="1.0" encoding="UTF-8"?>
<checkOrderResponse performedDatetime="2011-05-04T20:38:01.000+04:00"
code="0" invoiceId="1234567"
shopId="13"/>
Example of response with error:
<?xml version="1.0" encoding="UTF-8"?>
<checkOrderResponse performedDatetime="2011-05-04T20:38:01.000+04:00"
code="100" invoiceId="1234567"
shopId="13"
message="Given customerNumber does not exist"
techMessage="Wrong phone number"/>
For now, for more info on usage and itegration refer to official integration guide and API spec.
This project rocks and uses MIT License
Copyright (c) 2015 Zero One
FAQs
Node.js utilities to integrate Yandex.Kassa with your app
We found that node-yandex-kassa 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.