Problem/Motivation

Steps to reproduce

  1. Have an order without a payment_method set on order completition, e.g. because payment failed (in our case due to a bug) and order was transitioned to complete manually in the admin area
  2. Add a (manual) payment on the order (via /admin/commerce/orders/12345/payments/add)
  3. See that payment in the "Payments" tab at /admin/commerce/orders/12345/payments correctly, but not represented in the order at
    $order->get('payment_method')
    

    - which may lead to data inconsistencies in follow-up processes

Proposed resolution

  • If adding a payment manually, ensure it's also set in the order "payment_method" field.
  • If it makes sense to have this optionally, add a checkbox in to the Payment add admin form

Remaining tasks

Discuss the behavior on multiple payments - I think it should just get updated as an array, representing the (undeleted, see #2898218: Implement soft deletes for payment methods) payments

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Describe your bug or feature request.

If a bug, provide steps to reproduce it from a clean install.

Issue fork commerce-3593468

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

anybody created an issue. See original summary.

anybody’s picture

Issue summary: View changes
StatusFileSize
new19.11 KB

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

jsacksick’s picture

Hm... You mean "payment_gateway" probably? Cause in case of manual payments there isn't supposed to be a payment_method?

anybody’s picture

Status: Active » Closed (works as designed)

Thank you so much @jsacksick!! You're absolutely right, I didn't see that, as we always used payment_method in the past and didn't have manual payments. THANKS!

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.