paykickstart-ipn-validator

1.0.3 • Public • Published

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

Package Sidebar

Install

npm i paykickstart-ipn-validator

Weekly Downloads

19

Version

1.0.3

License

MIT

Unpacked Size

4.5 kB

Total Files

4

Last publish

Collaborators

  • dassiorleando