Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

card-connect-api

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

card-connect-api

Node Wrapper for CardConnectApi

  • 1.0.2
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

CardConnect Bolt P2PE API Wrapper

Install

yarn add card-connect-api

Usage

const CardConnectApi = require("card-connect-api");

List all terminals

await this.api.listTerminals()

Connect to a terminal

await this.api.connectTerminal({
  hsn: process.env.TESTABLE_TERMINAL,
  force: true
});

Ping terminal

await this.api.connectTerminal({
  hsn: process.env.TESTABLE_TERMINAL,
  force: true
});
 await this.api.ping({
  hsn: process.env.TESTABLE_TERMINAL
});

Read Card

await this.api.connectTerminal({
  hsn: process.env.TESTABLE_TERMINAL,
  force: true
});
await this.api.readCard({
  hsn: process.env.TESTABLE_TERMINAL,
  amount: 1
});

Sample Response

{
 token: '<redacted 16 digit number>',
 expiry: '<redacted 4 digit expiry date>',
 name: '<redacted company name? maybe?>'
}

Set terminal message

await this.api.connectTerminal({
  hsn: process.env.TESTABLE_TERMINAL,
  force: true
});
 await this.api.sendMessage({
  hsn: process.env.TESTABLE_TERMINAL,
  text: "hacked bro"
});

Clear terminal message

await this.api.connectTerminal({
  hsn: process.env.TESTABLE_TERMINAL,
  force: true
});
await this.api.sendMessage({
  hsn: process.env.TESTABLE_TERMINAL,
  text: ""
});

Errors

This wrapper returns errors for

  • User cancelled
  • Terminal is offline
  • Terminal is in use
  • Something went wrong

more information can be found here

FAQs

Package last updated on 23 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc