Handle card declined errors before webform submission

Created on 19 September 2018, about 6 years ago
Updated 21 August 2023, over 1 year ago

When using a known declined test card, forms with a stripe element are still able to be submitted successfully. The error is not captured until the Stripe webhook receives a response, and then the error displayed in the Drupal message queue after the form is submitted.

There should be a way to validate successful charges before the form gets submitted, and the error should be available to the webform to display to users.

Using one of the following cards can help you test this issue: https://stripe.com/docs/testing#cards-responses

πŸ’¬ Support request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States AdamBernstein

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States jbarone716

    Using 2.0.0-beta4 forms can still easily be submitted without verifying payment or even filling out the field at all. Even on webforms with a single element and the Stripe element the form can just be submitted and the Stripe error will appear below the input field, then the webform will submit anyways. Because there is no way to mark the field as "required", any submissions can simply bypass payment by hitting the submit button and waiting. Validation will appear for incorrect cards, etc, but will not stop submission. This combined with the creation of payment_intents every time someone opens the webform containing the Stripe element really makes it difficult to justify the use of this module. Is there any fix being looked at or have we been stagnant for years?

Production build 0.71.5 2024