# node-wayforpay-library

> WayForPay api library

Latest version **0.1.4** (published 2024-01-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-wayforpay-library
pnpm add node-wayforpay-library
yarn add node-wayforpay-library
bun add node-wayforpay-library
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2024-01-28 |
| First published | 2023-12-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 31.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Viacheslav Angel |
| Maintainers | viacheslav.angel |

## Links

- npm: https://www.npmjs.com/package/node-wayforpay-library
- Repository: https://github.com/AngelSlava/node-wayforpay-library
- Issues: https://github.com/AngelSlava/node-wayforpay-library/issues
- npm.io page: https://npm.io/package/node-wayforpay-library

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^1.6.2
- [dotenv](https://npm.io/package/dotenv.md) ^16.3.1
- [@types/jsdom](https://npm.io/package/@types/jsdom.md) ^21.1.6

## Recent versions

- 0.1.4 (latest) — 2024-01-28
- 0.1.3 — 2024-01-28
- 0.1.2 — 2024-01-28
- 0.0.91 — 2024-01-20
- 0.0.9 — 2024-01-20
- 0.0.8 — 2023-12-26
- 0.0.7 — 2023-12-26
- 0.0.6 — 2023-12-26
- 0.0.5 — 2023-12-26
- 0.0.4 — 2023-12-26
- 0.0.3 — 2023-12-26
- 0.0.2 — 2023-12-16
- 0.0.1 — 2023-12-16
- 1.0.0 — 2023-12-16

## README

![npm](https://img.shields.io/npm/v/vue-custom-range-input)

# WayForPay nodejs library

## Installation
You can install the component using yarn:
```bash
npm install node-wayforpay-library
```
or
```bash
yarn add node-wayforpay-library
```

## Usage
```javascript
import WayForPayAPI from 'node-wayforpay-library';

const merchantAccount: string = 'YOUR_MERCHANT_ACCOUNT';
const merchantPassword: string = 'YOUR_MERCHANT_PASSWORD';

// Init api
const wfp = new WayForPayAPI({ merchantAccount, merchantPassword })

// Check status
const response = await wfp.regularPayments.status('ORDER_REFERENCE')

// Create payment
const payment = await wfp.regularPayments.create({
  regularMode: 'weekly', // once, daily, quarterly, weekly, monthly, halfyearly, yearly 
  amount: '100',
  dateBegin: 'DD.MM.YYYY',
  dateEnd: 'DD.MM.YYYY',
  orderReference: 'ORDER_REFERENCE',
  email: 'CLIENT_EMAIL'
})

// ...
```

## Regular Payment methods
- `create`: Create regular payment
- `status`: Check regular payment status
- `suspend`: To suspend the possibility of recurrent payments from the card, the merchant may pause the payment.
- `resume`: In order to resume previously suspended recurrent payment
- `change`: Change regular payment.

## Purchase methods
- `generatePurchaseData`: Generate data (JSON) for payment form with signature
- `generateVerifyData`: Generate data (JSON) for card verification form with signature


## Changelog
For detailed information on changes between versions, please refer to our [changelog](./CHANGELOG.md).

## License
This project is licensed under the MIT License.

## Author
Viacheslav Angel

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