Problem/Motivation

We are developing a multi-step donation flow using the Webform module and need to embed the "PayPal Smart Buttons" element directly within it.

While the "commerce_paypal" 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 "PayPal Smart Buttons" element by leveraging the same logic found in the "views_form_commerce_cart_form_default" hook.

The goal is to encapsulate the existing "commerce_paypal" functionality within a reusable Webform element, allowing us to place the "PayPal Smart" flow directly into our multi-step donation flow.

This is somewhat related to: https://www.drupal.org/node/3584613/edit

CommentFileSizeAuthor
#3 46.patch6.75 KBelaman
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

elaman created an issue. See original summary.

elaman’s picture

StatusFileSize
new6.75 KB

Disregard this patch, its a composite patch to include Stripe changes.