Skip to content

Commit

Permalink
Add missing return to stripe error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielKerekes committed Oct 29, 2023
1 parent 3b283da commit e530491
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pages/checkout/[courseSlug]/[courseProductId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ const useStripe = (
const {error: submitError} = await elements.submit()
if (submitError) {
setIsSubmitting(false)
onStripeError(submitError.message || 'Nastala neočakávaná chyba')
return
}

const {error} = await stripe.confirmPayment({
Expand Down

0 comments on commit e530491

Please sign in to comment.