The popular site GoFundMe said Monday that it has given refunds to people who donated money to a charity fund for a homeless man that prosecutors say was a scam.

"All donors who contributed to this GoFundMe campaign have been fully refunded," spokesman Bobby Whithorne said in an email.

People donated more than $400,000 to a campaign that hinged on a story of a homeless man who purportedly gave his last $20 to help a stranded motorist on a Pennsylvania freeway ramp in November 2017.

Prosecutors say that never happened, and the "the entire campaign was predicated on a lie."

The homeless man, Johnny Bobbitt Jr., 35, the supposed motorist Kate McClure, 28, and her boyfriend, Mark D'Amico, 39, were charged with second-degree theft by deception and conspiracy to commit theft by deception in November of this year.

"Less than an hour after the GoFundMe campaign went live, McClure, in a text exchange with a friend, stated that the story about Bobbitt assisting her was 'completely made up.'" Burlington County Prosecutor Scott Coffina said in a statement in announcing the charges for all three. "She did not run out of gas on an I-95 off-ramp, and he did not spend his last $20 to help her.

"Rather, D’Amico, McClure and Bobbitt conspired to fabricate and promote a feel-good story that would compel donors to contribute to their cause," Coffina continued.

An attorney for McClure has claimed she "was used by Mr. D’Amico and Mr. Bobbitt, and she thought throughout that this money was going to a homeless veteran.”

An attorney for D'Amico has said he was surprised by McClure's defense.

"I don't know how Kate is playing the victim now. I will be curious to see how this defense plays out for her in court," he said.

Whitmore, of GoFundMe, said that "while this type of behavior by an individual is extremely rare, it's unacceptable and clearly it has consequences," and that the company is cooperating with investigators.

The alleged scheme unraveled after Bobbitt sued the couple, saying McClure, a receptionist for the New Jersey Department of Transportation, and D'Amico, a carpenter, had kept most of the money for themselves.

Whitmore said fraud is very rare on the platform, but that if fraud occurs, donors are refunded their money and GoFundme works with law enforcement to recover the funds.