1. nuxt-paystack

nuxt-paystack

💳 Nuxt-Paystack

Paystack payment gateway integration for Nuxt.js

Table of Contents

Requirements

  • npm
  • NuxtJS
  • NodeJS

Install

 # npm
$ npm install nuxt-paystack

# yarn
$ yarn add nuxt-paystack

Usage

Add 'nuxt-paystack' to the modules section of your nuxt.config.js file.

 {
  modules: ['nuxt-paystack']
}

this.$paystack is now available and can be used in your components.

 {
  ...
  methods: {
    initializePaystack() {
      this.$paystack({
        key: '', // Replace with your public key.
        email: '',
        amount: 0,
        ref: '',
        currency: '',
        callback: () => {
          // Do something.
        },
        onClose: () => {
          // Do something.
        }
      })
    }
  }
  ...
}

Note: that $paystack is a function which takes in an object as its argument with your paystack details in it, for more information on this you can check here.

License

This project is licensed under MIT