Problem/Motivation

#3489666: PHP error trying to add a new checkout flow without payment module installed introduced a checkout pane to be shown when the commerce_payment is not installed. However, the logic is applied in reverse. As a result, the payment is processed twice.

Steps to reproduce

Setup a commerce site with Commerce payment. Notice the the duplicate Payment process in the checkout flow:

Proposed resolution

Remove the duplicate checkout pane

Remaining tasks

  1. Write a merge request
  2. Review
  3. Commit

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
Screenshot 2025-06-30 at 16.27.41.png25.24 KBidebr
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

idebr created an issue. See original summary.

idebr’s picture

Status: Active » Needs work

Settings to 'Needs work' to fix the test failures

divyansh.gupta’s picture

Assigned: Unassigned » divyansh.gupta

Working on it!!

divyansh.gupta’s picture

Assigned: divyansh.gupta » Unassigned
Status: Needs work » Needs review

Made some changes in tests, now the pipeline's all green,
Please review!!

facine’s picture

Status: Needs review » Needs work

The logic is fine, what is wrong is the comment. If the commerce_payment module does not exist we cannot process payments.
The wrong comment is in the checkout pane.

The fix should be:
- Update the comment in: \Drupal\commerce_webform_order\Plugin\Commerce\CheckoutPane\PaymentProcess
- Make sure that only one of the two checkout panes is active in the checkout flow.

Thanks for reporting the issue.

divyansh.gupta’s picture

Status: Needs work » Needs review

Made some changes.
Please review

facine’s picture

Status: Needs review » Fixed

Merged! It looks great, thanks @divyanshgupta

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.