Changing Payment Method on a Transaction causes fatal error
Overview
Changing the Payment Method on a Transaction causes fatal error with the message: "Mandatory key(s) missing from params array: contribution_id"
.
Reproduction steps
- Go to Contribution Dashboard
- Click the discovery triangle to reveal Transactions
- Click the pencil icon to edit a Transaction
- Change the Payment Method, e.g. from Credit Card to Debit Card
- Click "Update"
- Log shows "Fatal error: Mandatory key(s) missing from params array: contribution_id"".
Current behaviour
Changing the Payment Method on a Transaction cancels existing Payment but causes fatal error when trying to create a new replacement Payment.
Expected behaviour
Changing the Payment Method on a Transaction should replace (or update) the existing Payment.
Environment information
Replicated on Drupal Master.