Skip to content

dassiorleando/paykickstart-ipn-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published