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

equityjs

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

equityjs

A Node.js Library For The Equity Eazzy API

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

npm Travis Coverage Status Telegram npm

🏛 EquityJs

A light Node.js Library For The Equity Bank's Eazzy API

Documentation

Installation

$ npm install equityjs --save

Usage


const Equity = require('equityjs');

const equity = new Equity({
  consumerKey: 'YOUR_CONSUMER_KEY',
  consumerSecret: 'YOUR_CONSUMER_SECRET'
);

Both are required parameters. You can obtain your keys from here, by creating an app.

Refer to examples.js for more usage indformation.

API

All Sandbox Endpoints are supported at the moment. In-production Endpoints will be added soon.

Callback from API calls return 2 parameters, that is:

  • error
  • response

The response is always the original JSON Object sent by the Equity API

An example of a callback function:

function callback (e, r) {
  if (e) {
    console.error(e);
   else {
    console.log(r);
  

Methods

  • All parameters for all methods are required!
  • All opts take a JSON Object structure!

Identity API

equity.changePassword(opts, callback)

ParameterDescription
merchantIdYour merchant ID
currentPasswordYour current password
newPasswordYour new password

equity.getToken(opts, callback)

ParameterDescription
usernameMerchant Username, provided by Equity Bank
passwordMerchant Password, provided by Equity Bank
grant_typeOAuth 2.0 Grant Type - must be 'password'

Transaction API

equity.purcahseAirtime(opts, callback)

ParameterDescription
mobileNumberMobile Number For Which To Purchase Airtime
amountAirtime Amount
referenceAirtime Reference
telcoNetwork Provider

equity.createPayment(opts, callback)

ParameterDescription
mobileNumberMobile Number For Which To PSend Money
amountAmount
descriptionTransaction Description
typeType
auditNumberAudit Number

equity.paymentStatus(opts, callback)

ParameterDescription
transactionIdTransactionId

equity.onlineRemit(opts, callback)

ParameterDescription
transactionReferenceTransaction Reference
senderNameSender Name
accountNumberAccount Number
bicCodeBIC CODE
mobileNumberMobile Number
walletNameWallet Name
bankCodeBank Code
branchCodeBranch Code
countryCodeCountry Code
currencyCodeCurrency Code
amountAmmount
paymentTypePayment Type
paymentReferencesPayment References
remarksRemarks

Issues And Contribution

Fork the repository and submit a pull request for whatever change you want to be added to this project. If you have any questions, just open an issue.

FAQs

Package last updated on 09 Dec 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

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