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.
Простейший клиент для API сервиса ЕКАМ:
Клиент работает с версией ЕКАМ API v0.0.1
Добавьте следующую строку в Gemfile вашего приложения:
gem 'ecwid_api'
Затем выполните команду:
$ bundle
Или установите gem самостоятельно:
$ gem install ecwid_api
require 'ekam-ruby'
client = Ekam::Client.new(token)
Где token
- авторизационный токен для вашего приложения ЕКАМ (подробнее тут: https://www.ekam.ru/page/online-api#creation).
# Получить все чеки без ограничений
client.get_receipt_requests
# Получить последние 10 чеков
client.get_receipt_requests({limit: 10})
# Получить только возвраты
client.get_receipt_requests({type: 'returns'})
# Получить все продажи в статусе "error"
client.get_receipt_requests({type: 'sales', status: 'error'})
# Получить чек по заказу с указанным ID
order_id = '12345'
client.get_receipt_requests({order_id: order_id})
Описание параметров: https://www.ekam.ru/page/online-api#reg
receipt_params = {
"order_id" => "91421af3",
"order_number" => "1014",
"type" => "sale",
"email" => "john@example.net",
"phone_number" => "79650000000",
"should_print" => true,
"cash_amount" => 201.1,
"electron_amount" => 0,
"lines" => [
{
"price" => 10,
"quantity" => 2,
"title"=> "Плюшевый мишка",
"total_price" => 20,
"vat_rate" => null
}
]
}
client.create_receipt_request!(receipt_params)
receipt_params = {
"order_id" => "91421af3",
"order_number" => "1014",
"type" => "return",
"email" => "john@example.net",
"phone_number" => "79650000000",
"should_print" => true,
"cash_amount" => 201.1,
"electron_amount" => 0,
"lines" => [
{
"price" => 10,
"quantity" => 2,
"title"=> "Плюшевый мишка",
"total_price" => 20,
"vat_rate" => null
}
]
}
client.create_receipt_request!(receipt_params)
client.close_shift!
FAQs
Unknown package
We found that ekam-ruby 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.