Is there any assurance that if you pay someone to take my online class for me they’ll enroll in my online class instead of you? Even worse, there is no assurance that they will complete the task or even carry it out correctly. Your life is being put in danger by a total stranger. Despite collecting payment, this person is not committed to you. Furthermore, you have no recourse if they violate the conditions of your contract.
Using a pay-as-you-go system is one way to guarantee a good outcome. This person may get weekly or project-based compensation in installments. This person has the right to accept your money and never complete the course as long as you pay in advance.