feat: Enhance donation system with new components and improved dialog
This commit is contained in:
@@ -104,8 +104,13 @@ async function handleSubmit({ amount, message }) {
|
||||
|
||||
const response = await createCheckoutSession(amount, message);
|
||||
|
||||
// Redirect to the Stripe Checkout page
|
||||
window.location.href = response.stripeCheckoutUrl;
|
||||
if (response && response.url) {
|
||||
// Redirect to the Stripe Checkout page
|
||||
window.location.href = response.url;
|
||||
} else {
|
||||
errorMessage.value = t('creator.donation.errors.payment');
|
||||
isPaymentDialogActive.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
||||
Reference in New Issue
Block a user