An open API service indexing awesome lists of open source software.

https://github.com/ecj222/nuxt-paystack

Paystack module for Nuxt.js
https://github.com/ecj222/nuxt-paystack

nuxt nuxt-module payment-gateway paystack

Last synced: 7 months ago
JSON representation

Paystack module for Nuxt.js

Awesome Lists containing this project

README

          

💳 Nuxt-Paystack


Paystack payment gateway integration for Nuxt.js














## Table of Contents

- [✨  Requirements](#requirements)
- [✨  Install](#install)
- [✨  Usage](#usage)
- [📖  License](#license)

## Requirements

- npm
- NuxtJS
- NodeJS

## Install

```bash
# npm
$ npm install nuxt-paystack

# yarn
$ yarn add nuxt-paystack
```

## Usage

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

```js
{
modules: ['nuxt-paystack']
}
```

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

```js
{
...
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](https://paystack.com/docs/payments/accept-payments/#collect-customer-information).

## License

This project is licensed under [MIT](./LICENSE)