feat: Enhance donation system with new components and improved dialog

This commit is contained in:
2025-04-22 15:35:24 -04:00
parent 524b429170
commit aa59d293cf

View File

@@ -103,9 +103,14 @@ async function handleSubmit({ amount, message }) {
isPaymentDialogActive.value = true;
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({