1.0.3 • Published 4 years ago

paykickstart-ipn-validator v1.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

PayKickStart IPN Validator

Build Status npm npm

A zero-dependency package that verifies incoming IPN notifications from PayKickStart.

To better the funnel of your App sold via a third-party service you often need to do further actions once payment/refund/subscribe/unsubscribe operations are made via your sales/dashboard/landing pages, doing this without confirming the validity of the notification will fail your workflow as not only the intended party can send IPN requests to your server (receiver/controller).

Here's their official guide regarding IPN with a good description of the data being sent.

Install

$ npm install paykickstart-ipn-validator --save

Usage

const paykickstartIPNValidator = require('paykickstart-ipn-validator');

paykickstartIPNValidator(ipn, secret);
// => true or false

paykickstartIPNValidator(ipn);  // Assuming the secret is defined as an env var
// => true or false

Note: The secret is optional, its default value is the env var PAYKICKSTART_SECRET_KEY. Good so that you keep your precious secretKey out of your repo.

License

MIT

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.9.0

4 years ago