Describe your bug or feature request.

We recently added order details to the payment add form, including the order items and payment history. However, the capture and refund forms are still just the amount field and a submit button.

I think the same information shown on the payment add form would be useful here, so I’d like to see these forms use the same format.

Desired capture payment form

Please note that the fieldset title should be “Payment details”. We need to correct the fieldset title on the add payment form as well.

CommentFileSizeAuthor
desired-capture-payment-form.png35.88 KBjsacksick

Issue fork commerce-3569547

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

jsacksick created an issue. See original summary.

tbkot made their first commit to this issue’s fork.

jsacksick’s picture

Status: Active » Needs work

Weird that the tests are failing.

Let's rename the trait to PaymentOrderSummaryFormTrait, like the following:

/**
 * Provides a trait for rendering an order summary in payment-related forms.
 */
trait PaymentOrderSummaryFormTrait {

Also, let's add a weight to the "order_summary" form element:

$form['order_summary'] = [
      '#type' => 'container',
      '#attributes' => ['class' => ['order-summary', 'payment-order-summary']],
      '#weight' => -10,
    ];
tbkot’s picture

Status: Needs work » Needs review

@jsacksick, trait name is updated. Not sure why the test is failing for D10, I've checked it locally with the same settings (D10, PHP8.1, PHPUnit 9.6) and it works well.

  • jsacksick committed 81ba73ba on 3.x authored by tbkot
    feat: #3569547 Include order details on the payment capture and refund...
jsacksick’s picture

Status: Needs review » Fixed

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

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

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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