New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eway-rapid

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

eway-rapid

eWAY Rapid Node.js library

1.2.1
latest
Source
npm
Version published
Weekly downloads
1.3K
12.44%
Maintainers
1
Weekly downloads
 
Created
Source

eWAY Rapid Node.js Library

Latest version on npm Software License Build Status

A Node.js library to integrate with eWAY's Rapid Payment API.

Sign up with eWAY at:

For testing, get a free eWAY Partner account: https://www.eway.com.au/developers

Installation

$ npm install eway-rapid

Usage

See the eWAY Rapid API Reference for usage details.

A simple Direct payment example:

var rapid = require('eway-rapid');

var key      = '60CF3Ce97nRS1Z1Wp5m9kMmzHHEh8Rkuj31QCtVxjPWGYA9FymyqsK0Enm1P6mHJf0THbR',
    password = 'API-P4ss',
    endpoint = 'sandbox';

var client = rapid.createClient(key, password, endpoint);

client.createTransaction(rapid.Enum.Method.DIRECT,{
  "Customer": {
    "CardDetails": {
      "Name": "John Smith",
      "Number": "4444333322221111",
      "ExpiryMonth": "12",
      "ExpiryYear": "25",
      "CVN": "123"
    }
  },
  "Payment": {
    "TotalAmount": 1000
  },
  "TransactionType": "Purchase"
}).then(function (response) {
  if (response.get('TransactionStatus')) {
    console.log('Payment successful! ID: ' + response.get('TransactionID'));
  }
});

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

This library can be tested using npm:

$ npm install
$ npm test

Integration tests can also be run - first copy .env.dist to .env and add your eWAY Sandbox API Key & Password. Then run:

$ npm run test:integration

License

The MIT License (MIT). Please see License File for more information.

Keywords

eway

FAQs

Package last updated on 03 Mar 2016

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