A Vue Plugin for Shockinflux-Payview Payment Gateway.
npm install vue vue-shockinflux-payview --save
<!-- Vue -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- Vue-shockinflux-payview -->
<script src="https://unpkg.com/[email protected]/dist/shockinflux.min.js"></script>
<template>
<ShockinfluxPayview
:email="email"
:amount="amount"
currency="ngn"
template="modern"
language="en"
action="float"
:transactionid="transactionid"
:storeid="storeid"
:comment="comment"
:callback="callback"
:close="close"
><i>Pay Now!</i></ShockinfluxPayview>
</template>
<script type="text/javascript">
import ShockinfluxPayview from "vue-shockinflux-payview";
export default {
components: {
ShockinfluxPayview
},
data() {
return {
email: "[email protected]",
amount: 10000,
transactionid: "836327236732632671009",
storeid: "g1xq8y87************9XBJbKXuZo+x3uqw=",
comment: "This is a test",
};
},
methods: {
callback: function(response) {
console.log(response);
},
close: function() {
console.log("Payment closed");
}
}
};
</script>
<style>
.shockinflux-inline-btn {
color: #04193d;
width: 250px;
height: 50px;
font-weight: 800;
}
</style>
new Vue({
el: "#app",
components: {
ShockinfluxPayview: ShockinfluxPayview.default
},
methods: {
callback: function(response) {
console.log(response);
},
close: function() {
console.log("Payment canceled");
}
},
data: {
email: "[email protected]",
amount: 10000,
transactionid: "836327236732632671009",
storeid: "g1xq8y87************9XBJbKXuZo+x3uqw=",
comment: "This is a test",
}
});
import Vue from 'vue'
import ShockinfluxPayview from "vue-shockinflux-payview";
Vue.component('ShockinfluxPayview', ShockinfluxPayview);
plugins: [{ src: "~plugins/vue-shockinflux", ssr: false }]
<shockinflux-payview
:email="email"
:amount="amount"
currency="ngn"
template="modern"
language="en"
action="float"
:transactionid="transactionid"
:storeid="storeid"
:comment="comment"
:callback="callback"
style-class="shockinflux-inline-btn"
:close="close"
><i>Pay Now!</i></shockinflux-payview>
- Fork it!
- Create your feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -am 'Some commit message'
- Push to the branch:
git push origin feature-name
- Submit a pull request 😋
Don't forget to give me a star and follow me on twitter!
Thanks! Adesoji Temitope.
This project is licensed under the MIT License - see LICENSE.md