Harry Potter author JK Rowling has accepted an undisclosed "substantial" charity donation from the law firm that leaked her new book's true authorship. The bestselling novelist sued a partner at Russells law firm and his friend for revealing that Robert Galbraith is her pseudonym.

In July, The Sunday Times revealed that newly published detective book, The Cuckoo's Calling, is actually Ms Rowling's work. She has been using the decidedly male pen name Robert Galbraith to hide her real identity.

When the book came out in April, it was met with critical acclaim but enjoyed mediocre commercial success, only selling around 1,500 copies. However, when it was made known that Galbraith is actually the famed author, the sales of the books have gone up to 156,866% on Amazon, and have climbed to number three on the Web sites' bestsellers list.

Ms Rowling was forced to admit that she was indeed Galbraith, saying that she would have kept the secret longer if she could.

"I feel very angry that my trust turned out to be misplaced," she told The Sunday Times, via the BBC. "To say that I am disappointed is an understatement."

According to the London-based law firm, the wife of one of its partners, Chris Gossage, had told Ms Rowling's secret to her best friend, Judith Callegari. It added in a statement it was leaked "during a private conversation" and was "made in confidence to someone he trusted implicitly."

Ms Callegari is understood to have revealed Galbraith's real identity to a Sunday Times journalist via Twitter on July 9.

Ms Rowling had brought proceedings at London's High Court against Mr Gossage and Ms Callegari for the breach, with her solicitor, Jenny Afia, telling the court that she "has been left dismayed and distressed by such a fundamental betrayal of trust."

The law firm will now pay damages to The Soldiers' Charity, which supports soldiers and their families, and will also pay for the complainant's legal costs. It did not disclose how much their charity payment would be, but said that it is "substantial."

Furthermore, the mega author, who turned 48 on July 31, Wednesday, also announced on Wednesday that she would donate the global royalties for The Cuckoo's Calling for the next three years to the charity.

The Cuckoo's Calling centres on a war veteran-turned-private investigator named Cormoran Strike, who is looking into the death of a supermodel with the help of his office temp assistant Robin Ellacott.

It was published under Sphere, the same imprint at Little, Brown that also published The Casual Vacancy, Ms Rowling's other non-Harry Potter book.

Related:

'Harry Potter' Author JK Rowling Done With Sequel, Film Adaptation Reportedly In The Works [Read]

JK Rowling 'Very Angry' At Law Firm That Revealed Her New Book's Authorship [Read]

JK Rowling Admits To Using Pen Name Robert Galbraith To Sell New Book, Sales For 'The Cuckoo's Calling' Shot Up After Revelation [Read]