adonisjs-flutterwave-rave

0.0.2 • Public • Published

adonis-flutterwave-rave

An addon/plugin package to provide Flutterwave (Rave) payment services in AdonisJS 4.0+

NPM Version Build Status Coveralls

Getting Started

Install from the NPM Registry

 
    $ adonis install adonisjs-flutterwave-rave
 

Import and use

 
  'use strict'
  
  const Rave = use('FlutterwaveRave')
  
  class PaymentsController {
  
      constructor(BillsHistory){
          this.bills_history = BillsHistory
      }
      
      static get inject(){
          return [
              'App/Models/BillsHistory'
          ]
      }
      
      async chargeCard({ request, session, response }){
      
          let response = await Rave.Card.charge({
              cardno: "5273938738903039399"
          })
          
          console.log("RESULT: ", response.body.data)
          
          return response.status(200).json({
             data:response.body.data
          })
      }
  }
  
  module.exports = PaymentsController
 

License

MIT

Running Tests

 
    npm i
 
 
    npm run lint
    
    npm run test
 

Credits

Contributing

See the CONTRIBUTING.md file for info

Package Sidebar

Install

npm i adonisjs-flutterwave-rave

Weekly Downloads

3

Version

0.0.2

License

MIT

Unpacked Size

7.93 kB

Total Files

10

Last publish

Collaborators

  • stitchng