🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

adonisjs-paystack

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adonisjs-paystack

An addon/plugin package to provide PayStack payment services in AdonisJS 4.1+

0.1.3
Source
npm
Version published
Weekly downloads
2
-87.5%
Maintainers
1
Weekly downloads
 
Created
Source

adonis-paystack

An addon/plugin package to provide PayStack payment services in AdonisJS 4.1+

NPM Version Build Status Coveralls

Getting Started

Install from the NPM Registry


    $ adonis install adonisjs-paystack

Make use of it inside a HTTP/Web Socket Controller(s)


const paystack = use('PayStack')

/**
 * This class handles all requests for 
 * the checkout flow of the app
 *
 * @class CheckOutController
 */
class CheckOutController {
	/**
	 * Begin Transaction Process
	 *
	 * @method initTransaction
	 *
	 * @param  {Object} context.request
	 * @param  {Object} context.response
	 *
	 * @return {Promise}
	 */
	async initTransaction({ request, response }) {

		     //.....

		    let response = await paystack.initializeTransaction({
		      callback_url:"https://example.com/hooks/paystack", 
		      amount: 3000, 
		      email: "xyz@abc.com"
		    })

		    return await response.status(200).json({
		      data: response.body
		    })
	}

}

module.exports = CheckOutController

License

MIT

Running Tests


    npm i


	npm run lint

    npm run test

Credits

Contributing

See the CONTRIBUTING.md file for info

Keywords

paystack

FAQs

Package last updated on 18 Apr 2019

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