# unitpay

> Unitpay merchant

Latest version **2.0.2** (published 2017-03-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install unitpay
pnpm add unitpay
yarn add unitpay
bun add unitpay
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2017-03-07 |
| First published | 2015-11-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Andrew Mensky |
| Maintainers | men232 |
| Keywords | unitpay, merchant |

## Links

- npm: https://www.npmjs.com/package/unitpay
- Repository: https://github.com/men232/node-unitpay
- Homepage: https://github.com/men232/node-unitpay#readme
- Issues: https://github.com/men232/node-unitpay/issues
- npm.io page: https://npm.io/package/unitpay

## Dependencies (1)

- [qs](https://npm.io/package/qs.md) ^6.3.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2017-03-07
- 2.0.0 — 2017-01-24
- 1.0.0 — 2015-11-28

## README

# Unitpay
Module for checking and forming order for payment service **UnitPay.ru**

# Installation
`npm install unitpay`

# Using
```js
const UnitPay = require('unitpay');

var u = new UnitPay({
    secretKey: 'SECRET',
    publicKey: 'PUBLIC_KEY'
});

// Generate merchat link
let price = 10;
let orderId = 'SE-123Q-WE412';
let description = 'Awsome product';

// return
// https://unitpay.ru/pay/PUBLIC_KEY?account=SE-123Q-WE412&currency=RUB&desc=Awsome%20product&sum=10&signature=d3f05773a162c0f7f9e572b73eaec8d19918b8ffda6ab08aaf90154f6c46e8ba&locale=ru
let payLink = u.form(price, orderId, description);
```

# API

### UnitPay.form(sum, account, desc, [currency = 'RUB'], [locale = 'ru'])
**Description:** Get URL for pay through the form<br />
**Return:** {String}<br />

**Arguments:**
- `{Number}: sum` - Payment sum
- `{String}: account` - Unique service order id
- `{String}: currency` - Payment currecncy
- `{String}: locale` - Payment form language interface

### UnitPay.api(method, params = {}, [callback])
**Description:** Call API<br />
**Return:** {Promise}<br />

**Arguments:**
- `{String}: method` - API menthod name
- `{Object}: params` - method parameters
- `{Function}: callback` - callback function

---
_Source: https://npm.io/package/unitpay · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
