Skip to content

gary-britland/eway-rapid-node-47

This branch is 2 commits ahead of eWAYPayment/eway-rapid-node:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

297e076 · Oct 17, 2022

History

13 Commits
Oct 17, 2022
Jan 13, 2016
Mar 3, 2016
Sep 23, 2015
Sep 23, 2015
Sep 23, 2015
Sep 23, 2015
Apr 8, 2020
Jan 13, 2016
Sep 23, 2015
Apr 8, 2020
Sep 23, 2015
Oct 17, 2022

Repository files navigation

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.

About

eWAY Rapid Node.js library - API Version 47

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%