solidus
solidus copied to clipboard
Refund created for uncompleted payments
Steps to reproduce
- Create order with check payment method.
- Create refund in admin -> order -> payments.
Expected behavior
I expect error when creating refund from uncompleted payment. Also do not show refund icon for uncompleted payments and do not run refunds#new action.
Actual behavior
Refund created for payment in "invalid" state.

System configuration
Solidus Version:
"2.8.0.alpha" master, latest commit 622aa25e6c351c4de16af87e9cba70de596ad959
Is this the right behavior? If not I can fix it. Also refund model doesn't validate amount on updates.
I don't think it is expected, it does not make sense to refund a payment that never happened. Feel free to submit a patch, thanks!