Shopify/active_merchant — pull request #614 by duff (2013-03-05 23:51:51+00:00)
Title: Worldpay: Fix error messages for some failures

In particular, their docs state:

"A payment can only be cancelled after it has reached the status
AUTHORISED and can no longer be cancelled after it has reached the
status of CAPTURED."

and:

"Refunds can be processed after a payment has reached the CAPTURED
status. If a payment still has the AUTHORISED status, it can be
cancelled but not refunded."

Previously, if a transaction was in the wrong state, the error message
we were giving back was "SUCCESS", which was confusing to everyone. Now
we explain why the operation failed.

We also now have some unit tests for the void operation.