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

iso-8583

v1.0.7

Published

Packing and unpacking ISO 8583 messages

Downloads

55

Readme

iso-8583

A native Node module to process ISO 8583 Financial transaction card originated messages

NPM Version Build Status Dependency Status devDependency Status NPM Downloads Massachusetts Institute of Technology (MIT) Donate

ISO 8583 Financial transaction card originated messages — Interchange message specifications is the International Organization for Standardization standard for systems that exchange electronic transactions made by cardholders using payment cards.

Installation

npm install iso-8583

API

The main namespace

	var ISO8583 = require('iso-8583');

ISO8583 Message Constructor

ISO8583.Message()

Methods of ISO8583.Message

ISO8583.Message().packSync()

A native method to pack a message.

Example:

	var msg = [
		[0, "1234"],
		[2, "1234567890123456"],
		[4, "000000005699"],
		[11, "000234"],
		[39, "004"],
		[41, "12345"],
		[42, "678901234"],
		[125, "BLAH BLAH"]
	];

	var message = new ISO8583.Message();
	var packedMessage = message.packSync(msg);
	console.log(packedMessage);

Yields:

[
	"12", "34", "D0", "20", "00", "00", "02", "C0", "00", "00", "00", "00", "00", "00", "00", "00", "00", "08", "16", "12", "34", "56", "78", "90", "12", "34", "56", "00", "00", "00", "00", "56", "99", "00", "02", "34", "00", "04", "31", "32", "33", "34", "35", "20", "20", "20", "36", "37", "38", "39", "30", "31", "32", "33", "34", "20", "20", "20", "20", "20", "20", "00", "09", "42", "4C", "41", "48", "20", "42", "4C", "41", "48"
]

ISO8583.Message().unpackSync()

A native method to parse and unpack a message.

Example:

	var message = new ISO8583.Message();
	var data = "1234D020000002C000000000000000000008161234567890123456000000005699000234000431323334352020203637383930313233342020202020200009424C414820424C4148";
	var msg = new Buffer(data, "hex");
	var len = msg.length;
  	var unpackedMessage = message.unpackSync(msg, len);
  	console.log(unpackedMessage);

Yields:

[
	[0, "1234"],
	[2, "1234567890123456"],
	[4, "000000005699"],
	[11, "000234"],
	[39, "004"],
	[41, "12345"],
	[42, "678901234"],
	[125, "BLAH BLAH"]
]

ISO8583.Message().parseSync()

A JavaScript wrapper helper method calling unpackSync()

Example:

	var message = new ISO8583.Message();
	var data = "1234D020000002C000000000000000000008161234567890123456000000005699000234000431323334352020203637383930313233342020202020200009424C414820424C4148";
  	var unpackedMessage = message.parseSync(data);
  	console.log(unpackedMessage);

Yields:

[
	[0, "1234"],
	[2, "1234567890123456"],
	[4, "000000005699"],
	[11, "000234"],
	[39, "004"],
	[41, "12345"],
	[42, "678901234"],
	[125, "BLAH BLAH"]
]

Usage

This section need improvements. So far please take a look at the unit tests to learn how to use this module.

Background

This module is based on the efforts of Oscar Sanderson.

ISO 8583 is a messaging standard used for payment card originated financial transactions. At present there are three different versions of the standard, as follows:

1987 (used by Visa / MasterCard)
1993 (used by Amex)
2003
Each version is named based on the year that it was published.

Whilst ISO 8583 is an official standard, it is important to note that most implementations are derivatives and do not fully comply with the published standard, however the variations are typically minor and it is generally quite a trivial task to modify an existing ISO 8583 version handler to accommodate such variations.

Source: http://www.oscarsanderson.com/iso-8583/

More details

List of ISO 8583-like specifications used by Card Payment System associations:

  • AMEX / American Express Payment Services Ltd.:
    • Global Credit Authorization Guide (GCAG)
    • Global Electronic Data Capture (GEDC) Terminal Message Specification
    • Plural Interface Processing (PIP) Terminal Interface
  • CUP / China UnionPay / UnionPay International:
    • CUP Online Message.
  • DCI / Diners Club International Ltd.:
    • Diners Club International Service Centre (DCISC) Relay Authorisation System
    • Diners Club International Relay Xpress Authorization System.
  • DFS / Discover Financial Services:
    • Authorization Interface Technical Specifications.
  • JCB / JCB International:
    • J-Link Online Interface Guide.
  • MasterCard International:
    • Customer Interface Specification (CIS)
    • Global Clearing Management System (GCMS) Reference
    • Integrated Product Messages (IPM) Clearing Formats
    • MasterCard Debit Switch (MDS) Online Specifications
    • Single Message System (SMS) Specifications.
  • Visa International / Visa Europe:
    • BASE I Technical Specifications
    • Single Message System (SMS) ATM/POS Technical Specifications
    • Dual Message System Authorization (DMSA) Technical Specifications.

A huge list of different acquirers national and domestic payment services which also used ISO 8583 messages are not in this list.
Specifications available for the members of these associations. They are confidential usually but could be found in the web if you know which specification to search.
The services around payments industry like iso8583.info providing details about the messages content with data parsing and test hosts.