npm.io
1.5.0 • Published 5 months ago

@ponchopay/pp-nodejs

Licence
MIT
Version
1.5.0
Deps
2
Size
42 kB
Vulns
0
Weekly
0

pp-nodejs

Tools to integrate PonchoPay on NodeJS

Installation

Install it from npm:

npm i @ponchopay/pp-nodejs

You can also use your favourite package manger like yarn or pnpm.

Usage

This package declares the following functions:

  • createToken: This function allows the creation of tokens for the initialisation endpoints.
  • createJWT: This function allows the creation of JWTs for the payment manipulation endpoints.
  • isValidCallback: Verifies that a request from Poncho does indeed come from Poncho and hasn't been tampered in any way.
  • parseCallback: Securely parses a callback received from Poncho only if the callback is verified to come from Poncho.

And the Client class which provides the following methods:

Development

Linting and formatting

To scan the project for linting and formatting errors, run

npm run lint

To automatically fix linting and formatting errors, run

npm run format
Testing

To ensure the project is bug-free, run

npm run test

Keywords