Skip to content

Commit

Permalink
✨ redirect to stripe on checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
neilitalia committed Oct 17, 2021
1 parent 5404e13 commit 3afe57e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default {
listingStatus: (state) => state.sell.listingStatus,
profileStatus: (state) => state.profile.profileStatus,
user: (state) => state.auth.user,
stripe: (state) => state.stripe.stripe,
}),
},
watch: {
Expand Down Expand Up @@ -200,6 +201,22 @@ export default {
});
}
},
stripe() {
if (this.stripe.url) {
this.$vs.notification({
classNotification: "checkout-notification",
duration: "3000",
progress: "auto",
color: "#17C964",
position: "bottom-center",
title: "Generating a secure checkout",
text: "Hang tight, we'll handle this for you.",
onDestroy: () => {
window.location.href = this.stripe.url;
},
});
}
},
},
methods: {
...mapActions("auth", ["checkSession"]),
Expand Down Expand Up @@ -340,4 +357,7 @@ button.vs-navbar__item {
div.vs-navbar__line {
color: #28164f;
}
.checkout-notification {
color: #ffffff;
}
</style>

0 comments on commit 3afe57e

Please sign in to comment.