npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

securenet-js

v0.9.6

Published

A library to process ACH and credit card transactions through the SecureNet gateway a WorldPay company. Include unit tests and code quality.

Downloads

22

Readme

securenet-js

SecureNet PayOS API community library for Node.js. All features and commands of the SecureNet PayOS API payment gateway are supported. SecureNet is a WorldPay company.

  • Credit Card Present
  • Credit Card Not Present
  • ACH
  • Settlement
  • Credits
  • Refunds
  • Voids
  • SecureNet Vault
  • Recurring Billing
  • Transaction Reporting and Management
  • Tokenization
    • For unit testing purposes.
    • For browser tokenization see PayOS.js.

Installation

npm install securenet-js --save

Features

The following features are supported:

  • Multiple client instances.
  • Can change mode between live and sandbox.
    • At initialization of the client.
  • All PayOS API features and commands are supported.
  • Fully unit tested.

Usage

Initialize the payment gateway client:


var config = {
	credentials: {
		secureNetId: ' your SecureNet Id ', //provided via signup email
		secureNetKey: ' your SecureNet secure Key ' //provided inside virtual terminal
	},
	developerApplication: {
		developerId: 12345678, // provided by SecureNet after certification
		version: '1.2'
	},
	mode: 'live' //live or test
};

var SecureNet = require('securenet');
var payos = new SecureNet(config);

See the unit tests for common application workflows.

Unit Tests

We are using Mocha for unit testing.

The unit test spec requires you to set your api credentials as environment variables.

export SECURENET_ID=xxxx
export SECURENET_SECURE_KEY=yyyy

Install with npm:

$ npm install -g mocha
$ npm install -g chai

Run unit tests:

$ npm test

Code Coverage

$ npm install istanbul -g
$ istanbul cover _mocha

Code Quality

npm install -g eslint
eslint .

SecureNet Feature Limitations

I have identified the following feature limitations with SecureNet's payment gateway.

  1. During tokenization errors their documentation indicates the response parameters will return resultType. However, during testing on the sandbox their api only seemed to return 'BAD_REQUEST' which does not allow for field specific error messages.

  2. During tokenization you can immediately save the customer and payment method into the vault (addToVault = true). However, if there customer or the payment method fail to be saved in the vault response paramers will return success = true. You need to look for the presence of the customerId and paymentMethodId in order to confirm the customer and payment method was saved in the vault. Their is no error message return in this case to indicate why the customer or payment method was not saved in the vault. This makes messaging to the end user difficult.

People

The original author of securenet-node is Richard Stanford.

The current lead maintainer is Dan Hollenbeck.

LICENSE

BSD-2-Clause