MB3 4a: What Work Can a Gentile Do For You on Shabbos (244:1)

When can or can't a non-Jew do melacha for you on Shabbos? The difference between paying by the job rather than by the hour. Even if he gets paid by the job, there is a maris ayin issue if it's clear he's doing it for you.