Change donation to another donor
There is an extension called Move Contribution that will allow you to move the contribution, however, it does not appear to have been updated since Aug. 2016 and last compatible version was 4.7, so there is a chance that the extension will not work with whatever version of Civi you are on.

In the absence of the above, and assuming that the correct credit card was charged but just recorded on the wrong contact, the correct way to manage this is to:


Navigate to the original contribution and click the Edit hyperlink
Change the Contribution Status to "Cancelled" (financial transactions should never be deleted, especially where electronic ones are concerned)
Since transaction IDs must be unique, make note of the transaction ID, then add a "-C" in the original contribution's transaction ID field
(OPTIONAL): If your version tracks the information, make note of the card type and last 4 digits of the card
Click the Save button
Navigate to the correct contact record's contribution tab and click Add Cash/Check... Contribution
Record the contribution details, selecting the payment method of credit card
Enter the original transaction ID you noted in item 3 above and any additional card details as desired
Click the Save button


If the incorrect credit card was charged, then you will need to issue a refund directly through the payment processor, change the original contribution status to "Refunded" in CiviCRM, and then process the correct credit card on the correct contact record accordingly.

Hope this helps!

Tamar