@vqiqi/vue-paystack2

0.1.0 • Public • Published


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

使用vue-demi开发的同时兼容vue2和vue3组件,test

Table of Contents

Install

Install this as your plugin's dependency:

npm i @vqiqi/vue-paystack2
# or
yarn add @vqiqi/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 @vqiqi/vue-paystack2

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

10.5 kB

Total Files

5

Last publish

Collaborators

  • tiandashu