- stripe redirection into checkout fix

- show Websocket connection test only when broadcasting is set
This commit is contained in:
Čarodej
2022-06-13 10:55:28 +02:00
parent a61d8434be
commit 8ec2d5402b
7 changed files with 19 additions and 25 deletions

View File

@@ -139,17 +139,13 @@ export default {
planCode: this.selectedPlan.data.meta.driver_plan_id.stripe,
})
.then((response) => {
window.location = response.data.data.url
window.location = response.data.url
})
.catch((error) => {
if (error.response.status === 500 && error.response.data.type) {
events.$emit('alert:open', {
title: error.response.data.title,
message: error.response.data.message,
})
} else {
this.$isSomethingWrong()
}
events.$emit('alert:open', {
title: error.response.data.title || this.$t('popup_error.title'),
message: error.response.data.message || this.$t('popup_error.message'),
})
})
}

View File

@@ -256,23 +256,16 @@ export default {
planCode: this.selectedPlan.data.meta.driver_plan_id.stripe,
})
.then((response) => {
window.location = response.data.data.url
window.location = response.data.url
})
.catch((error) => {
this.$closePopup()
setTimeout(() => {
if (error.response.status === 500 && error.response.data.type) {
events.$emit('alert:open', {
title: error.response.data.title,
message: error.response.data.message,
})
} else {
events.$emit('alert:open', {
title: this.$t('popup_error.title'),
message: this.$t('popup_error.message'),
})
}
events.$emit('alert:open', {
title: error.response.data.title || this.$t('popup_error.title'),
message: error.response.data.message || this.$t('popup_error.message'),
})
}, 100)
})
.finally(() => {

View File

@@ -29,7 +29,7 @@
</div>
<!--Broadcasting-->
<div class="card shadow-card">
<div v-if="config.broadcasting" class="card shadow-card">
<FormLabel icon="info">Broadcasting</FormLabel>
<div class="lg:flex lg:space-y-0 space-y-3 items-center justify-between">