vue-paystack2

0.0.9 • Public • Published


Vue-Paystack2 is a Paystack payment gateway integration for Vue which
provides Universal support for Vue 2 & 3

Table of Contents

Install

Install this as your plugin's dependency:

npm i vue-paystack2
# or
yarn add vue-paystack2

If you are using Vue2 you would need to install Vue's Composition API:

npm i @vue/composition-api
# or
yarn add @vue/composition-api

Usage

<template>
    <VuePaystack :paystack-key="paystackKey" :firstname="firstname" :lastname="lastname" :email="email" :amount="amount"  :reference="reference" :callback="onSuccess" :close="onClose">
      Button
    </VuePaystack>
</template>

<script>
import VuePaystack from "vue-paystack2"

export default {
  name: 'App',
  components: {
    VuePaystack
  },
  data () {
    return {
      paystackKey: '...',
      email: '...',
      firstname: '...',
      lastname: '...',
      amount: 0,
      reference: '...'
    }
  },
  methods: {
    onSuccess (event) {
      // ...
    },
    onClose () {
      // ...
    }
  }
}
</script>

License

Inspired by vue-paystack

MIT License © 2021 Enoch Chejieh

Package Sidebar

Install

npm i vue-paystack2

Weekly Downloads

5

Version

0.0.9

License

MIT

Unpacked Size

10.8 kB

Total Files

6

Last publish

Collaborators

  • ecj222