Image caption Rowling wrote The Cuckoo's Calling under the pen name Robert Galbraith 
 
 Harry Potter creator JK Rowling has accepted a substantial charity donation from the law firm that revealed she was writing under a pseudonym. 
 
 The writer brought a legal action against Chris Gossage, a partner at Russells Solicitors, and his friend, Judith Callegari. 
 
 Rowling was revealed as the writer of crime novel The Cuckoo's Calling in a Sunday Times article. 
 
 The author had published the book under the pen name Robert Galbraith. 
 
 Rowling's solicitor told Mr Justice Tugendhat that Russells had contacted the writer's agent after the story was published, revealing it was Mr Gossage who had divulged the confidential information to Ms Callegari. 
 
 Ms Callegari then revealed the information in the course of a Twitter exchange with a journalist. 
 
 The court heard Rowling had been "left dismayed and distressed by such a fundamental betrayal of trust". 
 
 Mr Gossage, Ms Callegari and Russells all apologised and the firm agreed to pay the author's legal costs. 
 
 It also agreed to make a payment, by way of damages, to The Soldiers' Charity, formerly known as the Army Benevolent Fund. 
 
 Rowling explained that she was donating the money "partly as a thank you to the army people" who helped her with research. 
 
 "But also because writing a hero who is a veteran has given me an even greater appreciation and understanding of exactly how much this charity does for ex-servicemen and their families, and how much that support is needed," she said. 
 
 'Extraordinary generosity' 
 
 The Cuckoo's Calling, about a war veteran turned private investigator called Cormoran Strike, had sold 1,500 copies before it was revealed that Rowling was its author. 
 
 Within hours, the novel rose more than 5,000 places to top Amazon's sales list. 
 
 Rowling said she would be donating all the royalties for the book to The Soldiers' Charity. 
 
 She said she had "always intended" to give the charity "a donation out of Robert's royalties" but "had not anticipated him making the bestseller list a mere three months after publication". 
 
 Major General Martin Rutledge, chief executive of ABF The Soldiers' Charity, said they were "absolutely thrilled" by the author's "extraordinary generosity". 
 
 "This donation will make a huge difference to the lives of thousands of soldiers, former soldiers and their families who are in real need. 
 
 "Her tremendous show of support for The Soldiers' Charity will help to remind people of the many sacrifices made by our soldiers, long after any news of Afghanistan has left the front page." 

 The Harry Potter author brought proceedings against Chris Gossage, who works for law firm Russells, and a friend of his, Judith Callegari. 
 
 Her solicitor, Jenny Afia, told Mr Justice Tugendhat that Rowling was revealed in the Sunday Times as the writer of crime novel The Cuckoo's Calling , which was published under the name of Robert Galbraith. 
 
 A few days later, Russells contacted her agent disclosing that it was Mr Gossage who had divulged the confidential information to his wife's best friend, Ms Callegari, during a private conversation. Ms Callegari later revealed the news in a public Twitter message to a Sunday Times journalist 
 
 Ms Afia said that Ms Rowling, who was not in court, "has been left dismayed and distressed by such a fundamental betrayal of trust". 
 
 Mr Gossage, Ms Callegari and Russells all apologised, with the firm agreeing to reimburse Ms Rowling's legal costs and make a payment, by way of damages, to the Soldiers' Charity, formerly the Army Benevolent Fund. 
 
 Rowling, 47, previously issued a statement saying she was “disappointed” and “very angry” that her trust was "misplaced". 
 
 "A tiny number of people knew my pseudonym and it has not been pleasant to wonder for days how a woman whom I had never heard of prior to Sunday night could have found out something that many of my oldest friends did not know," she said. 
 
 "To say that I am disappointed is an understatement. I had assumed that I could expect total confidentiality from Russells, a reputable professional firm, and I feel very angry that my trust turned out to be misplaced." 
 
 After it was identified as being written by J K Rowling, sales rocketed as publishers commissioned another 300,000 copies to keep up with demand. 
 
 Afterwards, a statement issued on the author's behalf said that all global net royalties which would otherwise have been paid to her from book sales of The Cuckoo's Calling would be donated to The Soldiers' Charity for a period of three years, dating from July 14 - the day that Galbraith's identity was made known. 
 
 She said: "This donation is being made to The Soldiers' Charity partly as a thank you to the Army people who helped me with research, but also because writing a hero who is a veteran has given me an even greater appreciation and understanding of exactly how much this charity does for ex-servicemen and their families, and how much that support is needed. 
 
 "I always intended to give The Soldiers' Charity a donation out of Robert's royalties but I had not anticipated him making the bestseller list a mere three months after publication - indeed, I had not counted on him ever being there! " 
 
 Major General Martin Rutledge, chief executive of the charity, said: "We are absolutely thrilled by the extraordinary generosity of JK Rowling who is such an internationally renowned author. 
 
 "This donation will make a huge difference to the lives of thousands of soldiers, former soldiers and their families who are in real need. 
 
 "Her tremendous show of support for The Soldiers' Charity will help to remind people of the many sacrifices made by our soldiers, long after any news of Afghanistan has left the front page." 
 
 Follow @TelegraphBooks
– The law firm whose partner spilled the beans on JK Rowling's crime-writing pseudonym has agreed to pay damages, after the writer took the lawyer and his friend, who spilled the beans even further, to court. Russells Solicitors will pay Rowling's legal costs and make a donation to the Soldiers' Charity, reports the BBC. Though Rowling didn't appear in court, her lawyer told the judge she "has been left dismayed and distressed by such a fundamental betrayal of trust," reports the Telegraph. In fairness, notes the BBC, she was also left even richer than before: the book, The Cuckoo's Calling, went from having sold 1,500 copies to a No. 1 seller on Amazon within hours of the news leaking. Rowling chose Soldiers' Charity "partly as a thank you to the army people" who aided her research for the book.