Skip to content

Commit

Permalink
add popup blocked error
Browse files Browse the repository at this point in the history
  • Loading branch information
Cabecinha84 committed Sep 10, 2024
1 parent 2a46f0c commit 58e1f49
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
14 changes: 12 additions & 2 deletions HomeUI/src/views/apps/Management.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10660,7 +10660,12 @@ export default {
}
this.fiatCheckoutURL = checkoutURL.data.data;
this.checkoutLoading = false;
this.openSite(checkoutURL.data.data);
try {
this.openSite(checkoutURL.data.data);
} catch (error) {
console.log(error);
this.showToast('error', 'Failed to open Stripe checkout, pop-up blocked?');
}
} catch (error) {
console.log(error);
this.showToast('error', 'Failed to create stripe checkout');
Expand Down Expand Up @@ -10715,7 +10720,12 @@ export default {
}
this.fiatCheckoutURL = checkoutURL.data.data;
this.checkoutLoading = false;
this.openSite(checkoutURL.data.data);
try {
this.openSite(checkoutURL.data.data);
} catch (error) {
console.log(error);
this.showToast('error', 'Failed to open Paypal checkout, pop-up blocked?');
}
} catch (error) {
console.log(error);
this.showToast('error', 'Failed to create PayPal checkout');
Expand Down
14 changes: 12 additions & 2 deletions HomeUI/src/views/apps/RegisterFluxApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3861,7 +3861,12 @@ export default {
}
this.fiatCheckoutURL = checkoutURL.data.data;
this.checkoutLoading = false;
this.openSite(checkoutURL.data.data);
try {
this.openSite(checkoutURL.data.data);
} catch (error) {
console.log(error);
this.showToast('error', 'Failed to open Stripe checkout, pop-up blocked?');
}
} catch (error) {
console.log(error);
this.showToast('error', 'Failed to create stripe checkout');
Expand Down Expand Up @@ -3916,7 +3921,12 @@ export default {
}
this.fiatCheckoutURL = checkoutURL.data.data;
this.checkoutLoading = false;
this.openSite(checkoutURL.data.data);
try {
this.openSite(checkoutURL.data.data);
} catch (error) {
console.log(error);
this.showToast('error', 'Failed to open Paypal checkout, pop-up blocked?');
}
} catch (error) {
console.log(error);
this.showToast('error', 'Failed to create PayPal checkout');
Expand Down
14 changes: 12 additions & 2 deletions HomeUI/src/views/apps/marketplace/AppView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,12 @@ export default {
}
fiatCheckoutURL.value = checkoutURL.data.data;
checkoutLoading.value = false;
openSite(checkoutURL.data.data);
try {
openSite(checkoutURL.data.data);
} catch (error) {
console.log(error);
showToast('error', 'Failed to open Stripe checkout, pop-up blocked?');
}
} catch (error) {
console.log(error);
showToast('error', 'Failed to create stripe checkout');
Expand Down Expand Up @@ -1207,7 +1212,12 @@ export default {
}
fiatCheckoutURL.value = checkoutURL.data.data;
checkoutLoading.value = false;
openSite(checkoutURL.data.data);
try {
openSite(checkoutURL.data.data);
} catch (error) {
console.log(error);
showToast('error', 'Failed to open PayPal checkout, pop-up blocked?');
}
} catch (error) {
console.log(error);
showToast('error', 'Failed to create PayPal checkout');
Expand Down

0 comments on commit 58e1f49

Please sign in to comment.