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

yookassa-ts

v0.1.14

Published

YooKassa TypeScript API for Node.js

Downloads

167

Readme

Yookassa API для Node.js

Клиент для работы с платежами по API Yookassa. Подходит тем, у кого способ подключения называется API.

Требования

  1. Node.js
  2. npm

Установка

npm i yookassa-ts

Начало работы

import YooKassa from 'yookassa-ts/lib/yookassa'

const yooKassa = new Yookassa({
shopId: '<Идентификатор магазина>',
secretKey: '<Секретный ключ>'
});

const payment = await yooKassa.createPayment({
amount: {
value: "2.00",
currency: "RUB"
},
payment_method_data: {
type: "bank_card"
},
confirmation: {
type: "redirect",
return_url: "https://www.merchant-website.com/return_url"
},
description: "Заказ №72"
});

API кассы

| Метод | Описание | | --- | --- | | createPayment | Создание платежа | | getPayment | Информация о платеже | | capturePayment | Подтверждение платежа | | cancelPayment | Отмена платежа | | createRefund | Создание возврата | | getRefund | Информация о возврате |

API платежа

Свойства

| Название | Описание | | --- | --- | | isPending | Равен ли статус платежа pending | | isWaitingForCapture | Равен ли статус платежа waiting_for_capture | | isSucceeded | Равен ли статус платежа succeeded | | isCanceled | Равен ли статус платежа canceled | | isResolved | Равен ли статус платежа succeeded или canceled | | confirmationUrl | URL для подтверждения |

Методы

| Название | Аргументы | Описание | | --- | --- | --- | | reload | | Получить информацию о платеже | | capture | amount | Подтвердить платеж | | cancel | | Отменить платеж | | refund | amount | Вернуть платеж |

API возврата

Методы

| Название | Аргументы | Описание | | --- | --- | --- | | reload | | Получить информацию о возврате |

История версий

0.1.14 @ 24 May 2023  
- Fix usage tips in README  
- Upgrade app version to 0.1.14

0.1.13 @ 22 May 2023  
- Upgrade app version to 0.1.13  
- Release version 0.1.13  
- Fix non required idempotenceKey for createPayment method

0.1.12 @ 22 May 2023  
- Release version 0.1.12  
- Upgrade app version to 0.1.12

0.1.11 @ 22 May 2023  
- Upgrade app version to 0.1.11  
- Release version 0.1.11  
- Fix publish script

0.1.10 @ 22 May 2023  
- Upgrade app version to 0.1.8  
- Release version 0.1.9  
- Fix publish script  
- Release version 0.1.10  
- Upgrade app version to 0.1.10  
- Upgrade app version to 0.1.9  
- Fix publish script  
- Fix publish script

0.1.7 @ 22 May 2023  
- Fix publish script  
- Upgrade app version

0.1.6 @ 22 May 2023  
- Upgrade app version

0.1.5 @ 22 May 2023  
- Upgrade app version

0.1.4 @ 22 May 2023  
- Fix bank_card structure  
- Upgrade app version

0.1.3 @ 21 May 2023  
- Fix publish  
- Fix Amount types  
- Add new build  
- Upgrade app version

0.1.2 @ 21 May 2023  
- Initial commit  
- Restore original logics with injected typings  
- WIP: Add almost all of used types, enums and annotations  
- Initial commit  
- Fix typings in main module, add publish script and changelog  
- Fix publish script  
- Update Readme  
- Refactor YooKassa class  
- Fix version  
- Upgrade app version  
- Fix publish script  
- Fix publish script  
- Update version  
- Update README.md

Контакты

Почта: [email protected]
Сайт: its.bz

Лицензия

MIT