When receiving a manual payment, a contributor should be able to set the completed time for the payment.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | commerce-set_manual_payment_completed-3281159-3.patch | 5.07 KB | aerzas |
Issue fork commerce-3281159
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
Comment #2
aerzas commentedHere is a patch proposition.
Comment #3
aerzas commentedFunctional test timezone fix.
Comment #4
jsacksick commentedThere is already logic in
Payment::presave()that is supposed to be taking care of that already, see:If the state is updated to completed, the completed time is set to the current time.
Comment #5
aerzas commentedBut the logic you describe only allows the request time to be set while the patch exposes the time to the contributor so they can set a date (in the past for example) in the payment receive form. In our case, contributors handle payment receptions once a week while the payment (a bank transfer) may have arrived earlier.
Note that this doesn't break the default mechanism if no date is provided or if the payment is completed programmatically.
Comment #7
aerzas commentedI rebased the MR against commerce 3.0.x
Comment #8
jsacksick commentedI'm generally not against the change, but this is a breaking change, so it can't be committed as is. Any implementation extending the Manual payment gateway would suddenly break, so not really sure how we should be handling this.