Hayter scored twice and made another as boss Sean O’Driscoll handed Barrow striker Jason Walker a chance to prove himself.
Doncaster went ahead when a free-kick from trialist Quinton Fortune found its way through to Sam Hird, who smashed home from inside the area.
The League Two side threatened to find an equaliser but Hayter doubled the lead in the 52nd minute when he headed home a Gareth Roberts corner.
Hayter then headed another set-piece against the post and Walker was on hand to head home the rebound.
And Hayter completed the scoring with 10 minutes remaining when Walker squared the ball to allow him to slot into an empty net.