Sorry last time i checked paying someone in cash was not illegal at all.
If the contractor provides you with a Tax invoice and then decides not to show your payment as a income when he lodges his Tax return that is not your issue.
Tax avoidance is a criminal offence however paying someone...