Download & Extend

Support voiding / refunding payment transactions before deleting them

Project:Drupal Commerce
Version:7.x-1.x-dev
Component:Payment
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

This may simply be a documentation task as far as core is concerned, but if an admin deletes a payment transaction, he or she ought to receive a prompt to void or refund the transaction prior to deletion. Any payment method module could alter this form as is if they wanted to, but it might be better to have a centralized way of managing this - like a pre-delete options / behavior callback that prevents deletion if the desired behavior doesn't complete successfully.

Comments

#1

Status:active» needs review

Hi,

Here is a quick WIP of what we can do to allow this. That certainly needs more work.

Let me know if it's a good way or not

AttachmentSizeStatusTest resultOperations
commerce_payment-pre_deleting_transaction_callbacks-1897240-1.patch5.3 KBIdlePASSED: [[SimpleTest]]: [MySQL] 3,557 pass(es).View details | Re-test

#2

Status:needs review» active

Sorry, I don't think I'd go that way. This is already a basic form that can be altered by payment method modules via hook_form_alter(). It's pretty trivial to determine the payment method represented by a delete confirmation form by looking at the transaction in the form state.

#3

Ok, I admit It's a little bit overkill, but your description made me think that you were waiting for something like this.

To fix this issue you are waiting more for documentation on how altering this form ?

nobody click here