How do you process credit card refunds for a closed invoice?

We have an issue where we have a completed invoice that was paid for and the product was shipped, and now the customer wants to make a return and have the funds credited back to their card. This seems pretty common scenario but is one that is rare for our business. When we attempt to process the refund we get an error: 

"You cannot use credit card or ACH payment when credit memo is not applied to an invoice."

I think this is because we haven't applied the credit memo to an invoice, but on the entry screen the "Apply to Inv No." field is grayed out (see screen shot), possibly because the invoice is closed (?). What is the correct procedure for processing a CC refund for a completed invoice?