Create a Journal to DB cash and CR a custom liability account for the payment from Customer C. Then post a credit memo (applied to the Invoice) for Customer A that DB the same custom liability account and CR A/R
OR
Create the Invoice set to Customer C but make the Ship To and Billing address to Customer A