Kris Humphries' former friend has been ordered to repay him after swindling him out of hundreds of thousands of dollars.

The Brooklyn Nets player - who has accused his estranged wife Kim Kardashian of fraud ahead of their upcoming divorce trial - will get back all of the money he invested in Andrey C. Hicks bogus hedge fund.

Hicks, who was a guest at the 28-year-old player's wedding to the 32-year-old reality TV star in 2011, pled guilty after being arrested and charged with fraudulently obtaining millions of dollars from Kris and a number of other friends after convincing them to invest in his fake investment firm.

The judge has now ordered him to repay all of the $2,375,204.60 he scammed from his victims, according to gossip website

It is not known how much money Kris will get back, but he reportedly lost a lot of money in the scam.

Hicks was also sentenced to 40 months in jail.

Kris is currently gearing up for his divorce battle against Kim, who is pregnant with her first child with her boyfriend of almost one year Kanye West, on May 6. The former couple have been fighting about how to end their 72-day marriage since October 2011, as Kris wants an annulment as he claims Kim duped him in marrying her for TV ratings.