You may argue there was no malicious code there, but what other reason exists to try this code injection?
He could have wanted to add Google Analytics tracking to the ad or similar.
Attempted theft is also a crime.
I think trying to inject whatever code to an advertisement is enough reason to assume they wanted to scam.
No need to display the ad or refund imo.
Your friend walks into a shop with a loaded gun and fails to rob it.
Turns out you owe this person money, now you feel that you no longer have an obligation to pay them?
Displaying the ad also has a high risk that they might set up new malicious code on that site, they have proven that they want to do that.
You may argue there was no malicious code there, but what other reason exists to try this code injection?
That site is not his, it's owned by another member here, he was using a referral link.
And what malicious code exactly could he add? last time the code was embedded onto bitcointalk.org which means he could've altered text on the website or steal peoples passwords, but this time its not, so there isn't much he can do.