That would be technically illegal rather than merely repugnant. It would not however be illegal if the criminal dropped a hint in the news that he would donate to, say, a ballroom that was to be named after the president.
And even if it were outright illegal, the Supreme Court has now ruled that the president is personally immune from criminal prosecution as long as they claim that their illegal activity was carried out in the course of their presidential duties, and not a personal crime committed on the side. Which leaves congressional impeachment and conviction as the sole recourse against presidential misbehavior. Which becomes a problem when the majority in Congress doesn't care that the president is doing illegal things. We haven't had a constitutional crisis like this since the FDR administration.