npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kiraind/gost-r-56042-2014

v1.0.0

Published

Генератор QR-кодов для оплаты банковским переводом

Downloads

7

Readme

Strict TypeScript Checked JavaScript Style Guide

ГОСТ Р 56042-2014 JavaScript

Генератор QR-кодов по ГОСТ Р 56042-2014 для оплаты банковским переводом от физлица юрлицу.

Установка

npm i @kiraind/gost-r-56042-2014

Пример использования:

import * as PaymentCode from '@kiraind/gost-r-56042-2014'

const pngBuffer = await PaymentCode.toBuffer({
  Name: 'ООО "Три кита"',
  PersonalAcc: '40702810138250123017',
  CorrespAcc: '30101810400000000225',
  PayeeINN: '6200098765',
  
  BankName: 'ОАО "БАНК"',
  BIC: '044525225',

  LastName: 'Иванов',
  FirstName: 'Иван',
  MiddleName: 'Иванович',
  Purpose: 'Оплата членского взноса',
  PayerAddress: 'г.Рязань, ул.Ленина, д.10, кв.15',

  Sum: 1000_00
}, {
  scale: 20,
  errorCorrectionLevel: 'L'
})

Доступные методы вывода QR-кода

toBuffer

toBuffer(details: PaymentDetails, options?: QRCodeToBufferOptions): Promise<Buffer>

Defined in index.ts:31

Генерирует Buffer с QR-кодом в формате png

Parameters:

Name | Type | Default value | Description | ------ | ------ | ------ | ------ | details | PaymentDetails | - | | options | QRCodeToBufferOptions | {} | параметры генерации qr-кода |

Returns: Promise<Buffer>


toCanvas

toCanvas(canvas: HTMLCanvasElement, details: PaymentDetails, options?: QRCodeRenderersOptions): Promise<any>

Defined in index.ts:44

Рисует QR-код на HTMLCanvasElement

Parameters:

Name | Type | Default value | Description | ------ | ------ | ------ | ------ | canvas | HTMLCanvasElement | - | | details | PaymentDetails | - | | options | QRCodeRenderersOptions | {} | параметры генерации qr-кода |

Returns: Promise<any>


toDataURL

toDataURL(details: PaymentDetails, options?: QRCodeToDataURLOptions): Promise<string>

Defined in index.ts:54

Генерирует DataURL с QR-кодом в формате png/jpeg/webp

Parameters:

Name | Type | Default value | Description | ------ | ------ | ------ | ------ | details | PaymentDetails | - | | options | QRCodeToDataURLOptions | {} | параметры генерации qr-кода |

Returns: Promise<string>


toFile

toFile(path: string, details: PaymentDetails, options?: QRCodeToFileOptions): Promise<any>

Defined in index.ts:66

Записывает файл с QR-кодом в формате на основе расширения файла

Parameters:

Name | Type | Default value | Description | ------ | ------ | ------ | ------ | path | string | - | | details | PaymentDetails | - | | options | QRCodeToFileOptions | {} | параметры генерации qr-кода |

Returns: Promise<any>


toFileStream

toFileStream(stream: stream.Writable, details: PaymentDetails, options?: QRCodeToFileStreamOptions): Promise<any>

Defined in index.ts:78

Записывает в WritableStream файл с QR-кодом в формате png

Parameters:

Name | Type | Default value | Description | ------ | ------ | ------ | ------ | stream | stream.Writable | - | | details | PaymentDetails | - | | options | QRCodeToFileStreamOptions | {} | параметры генерации qr-кода |

Returns: Promise<any>

Кодируемые реквизиты

Обязательные

| Параметр | Тип | Описание | |-------------|--------|--------------------------------------------------------| | Name | string | Наименование получателя платежа, макс. 160 знаков | | PersonalAcc | string | Расчетный счет получателя платежа | | BankName | string | Наименование банка получателя платежа, макс. 45 знаков | | BIC | string | БИК | | CorrespAcc | string | Номер кор./сч. банка получателя платежа |

Дополнительные

| Параметр | Тип | Описание | |-----------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| | Sum | number | Сумма платежа, в копейках, макс. 18 знаков | | Purpose | string | Наименование платежа (назначение), макс. 210 знаков | | PayeeINN | string | ИНН получателя платежа | | PayerINN | string | ИНН плательщика | | DrawerStatus | string | Статус составителя платежного документа, макс. 2 знака | | KPP | string | КПП получателя платежа | | СВС | string | КБК | | OKTMO | string | Общероссийский классификатор территорий муниципальных образований (ОКТМО) | | PaytReason | string | Основание налогового платежа, макс. 2 знака | | TaxPeriod | string | Налоговый период, макс. 10 знаков | | DocNo | string | Номер документа, макс. 15 знаков | | DocDate | string | Дата документа, макс. 10 знаков | | TaxPaytKind | string | Тип платежа, макс. 2 знака | | LastName | string | Фамилия плательщика | | FirstName | string | Имя плательщика | | MiddleName | string | Отчество плательщика | | PayerAddress | string | Адрес плательщика | | PersonalAccount | string | Лицевой счет бюджетного получателя | | Contract | string | Номер договора | | PersAcc | string | Номер лицевого счета плательщика в организации (в системе учета ПУ) | | Phone | string | Номер телефона | | PaymTerm | string | Срок платежа/дата выставления счета | | PaymPeriod | string | Период оплаты | | Category | string | Вид платежа | | ServiceName | string | Код услуги/название прибора учета | | SpecFio | string | ФИО преподавателя, специалиста, оказывающего услугу | | AddAmount | number | Сумма страховки/дополнительной услуги/Сумма пени (в копейках) | | UIN | string | Уникальный идентификатор начисления | | TechCode | number | Технический код, рекомендуемый для заполнения поставщиком услуг. Перечень значений кода представлен в приложении Г. |