0.1.4 • Published 3 months ago

node-wayforpay-library v0.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

npm

WayForPay nodejs library

Installation

You can install the component using yarn:

npm install node-wayforpay-library

or

yarn add node-wayforpay-library

Usage

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.

License

This project is licensed under the MIT License.

Author

Viacheslav Angel

0.1.2

3 months ago

0.1.4

3 months ago

0.1.3

3 months ago

0.0.91

4 months ago

0.0.9

4 months ago

0.0.3

4 months ago

0.0.8

4 months ago

0.0.5

4 months ago

0.0.4

4 months ago

0.0.7

4 months ago

0.0.6

4 months ago

0.0.2

5 months ago

0.0.1

5 months ago

1.0.0

5 months ago