mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
stripe checkout button
This commit is contained in:
@@ -10,6 +10,15 @@
|
||||
<div v-if="isPaymentOptionPage">
|
||||
|
||||
<PopupContent class="px-4">
|
||||
<b class="text-center block mb-3 mt-8">
|
||||
Stripe
|
||||
</b>
|
||||
<ButtonBase @click.native="payByStripe" class="block w-full mb-6" button-style="theme" type="button">
|
||||
<span class="text-theme">
|
||||
Pay With Stripe
|
||||
</span>
|
||||
</ButtonBase>
|
||||
|
||||
<b class="text-center block mb-3 mt-8">
|
||||
PayStack
|
||||
</b>
|
||||
@@ -102,6 +111,7 @@
|
||||
import paystack from 'vue-paystack';
|
||||
import {mapGetters} from "vuex";
|
||||
import {events} from "../../bus";
|
||||
import axios from "axios";
|
||||
|
||||
export default {
|
||||
name: 'SelectPlanSubscriptionPopup',
|
||||
@@ -156,6 +166,14 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
payByStripe() {
|
||||
axios.post('/api/subscriptions/stripe/checkout', {
|
||||
planCode: this.selectedPlan.data.meta.driver_plan_id.stripe
|
||||
})
|
||||
.then(response => {
|
||||
window.location = response.data.url
|
||||
})
|
||||
},
|
||||
async showPaymentOptions() {
|
||||
// Show payment buttons page
|
||||
this.isPaymentOptionPage = true
|
||||
|
||||
Reference in New Issue
Block a user