Skip to content

Latest commit

 

History

History
134 lines (105 loc) · 3.03 KB

README.md

File metadata and controls

134 lines (105 loc) · 3.03 KB

Gladepay NodeJS

Build Status Coverage Status Software License npm npm

💳 📦 💰 A NodeJS library that simplifies payment with Gladepay APIs

Installation

For Yarn

yarn add gladepay-node

For NPM

npm install gladepay-node --save

Usage

// Require the library
// mode defaults to false for test mode and could be `boolean` true or false
const gladepay = require('gladepay-node')('MERCHANT-ID', 'MERCHANT-KEY', mode);

Making calls

The resource methods promisified

Format → gladepay.{resource}.{method}

// gladepay.{resource}.{method}
gladepay.resource
  .supportedChargableBanks()
  .then(function(body) {
    console.log(body);
  })
  .catch(function(error) {
    console.log(error);
  });

All Resource methods parameters are provided as the only argument

Resources 📔

  • payment
    • cardPayment
    • recurrent
    • installment
    • chargeCard
    • chargeToken
    • validateOtp
    • verify
    • accountPayment
    • validateAccount
  • disbursement
    • transfer
  • resources
    • supportedChargableBanks
    • banks
    • accountName
    • verifyBVN
    • cardDetails
    • cardCharge
    • accountCharge
    • personlizedAccount
  • loansAndInvestments
    • loans
      • request
      • process
      • list
      • view
      • payment
        • repay
        • validate
    • investments
      • savings
        • create
        • list
        • view
        • cashout
        • deposit
        • validate
      • thrift
        • create
        • list
        • subscriptions
        • subscribe
    • client
      • createProfile
      • updateProfile
      • listProfiles
      • viewProfile

Tests

npm test

Contributing 🎸 💻

  • Please do 🧡

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Kindly follow me on twitter!

TODO ✍

  • Add continuous integration
  • Add code coverage statistics
  • Add some sweet badges

License

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