Paystack Inline component for Vue 3.
npm install @toneflix/paystack-inline

Simple Paystack Inline component for Vue 3

Read the full documentation here: http://greysoft.toneflix.net/paystack-inline
``bash`
npm install @toneflix/paystack-inline
#or
yarn add @toneflix/paystack-inline
#or
pnpm add @toneflix/paystack-inline
You can make Paystack Inline available throughout your Vue project.
main.js or main.ts
`js
import '@toneflix/paystack-inline/dist/style.css'
import { createApp } from 'vue'
import App from './app.vue'
import PaystackInline from '@toneflix/paystack-inline'
const app = createApp(App)
app.use(PaystackInline)
app.mount('#app')
`
You can also import the component in your Vue component.
SomeComponent.vue
`vue`
SomeComponent.vue
`vue
:amount="1000"
:customer="{
email: 'john@example.com'
}"
:public-key="pKey"
/>
`
To verify a payment, simply set the value of the reference model attribute and provide the verify-callback attribute which is a function that returns a promise that resolves to an object of {status: boolean, message: string}. Also set the hidden attribute if you do not want to display the payment button.
VerifyComponent.vue
`vue
:amount="1000"
:customer="{
email: 'john@example.com'
}"
v-model:reference="reference"
:verify-callback="
() => {
return new Promise((resolve) =>
resolve({
status: true,
message: 'Verified'
})
)
}
"
/>
`
SlutComponent.vue
`vue
:amount="1000"
:customer="{
email: 'john@example.com'
}"
:public-key="pKey"
>
``