It's not necessarily illegal to do the work without a contractor's license. However, if the customer doesn't pay, there's no way you can make him -- he has no enforceable legal obligation to pay for work for which a contractor's license was required that was performed by an unlicensed person.