Problem/Motivation

We are developing a multi-step donation flow using the Webform module and need to embed the "Stripe Express Checkout" element directly within it.

While the "commerce_stripe" module provides this element out of the box, it is currently hard-coded to attach to the default commerce cart form via a hook. This implementation doesn't support the mentioned use case, so we need a way to decouple the element and integrate it into the Webform steps.

Proposed resolution

Develop a Webform element that renders the "Stripe Express Checkout" element by leveraging the same logic found in the "views_form_commerce_cart_form_default" hook.

The goal is to encapsulate the existing "commerce_stripe" functionality within a reusable Webform element, allowing us to place the "Stripe Express Checkout" flow directly into our multi-step donation flow.

example

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

beloglazov91 created an issue. See original summary.

beloglazov91’s picture

Issue summary: View changes
StatusFileSize
new40.33 KB

beloglazov91’s picture

Status: Active » Needs review
facine’s picture

Status: Needs review » Needs work
Related issues: +#3583285: Support payments within Webform

Hello, thanks a lot for working on this. I’ve added some comments that need to be addressed. In addition to those comments, we also need to add tests.

beloglazov91’s picture

Issue summary: View changes