Paradox

Riddle:
Maimonides tells a student to whom he has taught law for several months:
*"You will pay me for the lessons I have given you on the day you win your very first lawsuit."*
However, the disciple fails to find any clients to represent. Losing patience, Maimonides decides to take legal action to recover his tuition fees and sues his former student in court.
During the hearing, Maimonides declares:
*"If I win this case, you must pay me by order of the court. If you win it, you must pay me under our contract. Either way, I will be paid."*
*"Not at all!"* his pupil shoots back. *"If I win, I won't have to pay you by order of the court. If you win, I won't have to pay you under our contract. Either way, I won't have to pay you."*
Question: Which of the two is wrong?
Solution:
The student is the one who is wrong. If he wins the lawsuit, he will not have to pay Maimonides by court order, *but* he will be bound to pay him under their original contract. Conversely, if Maimonides wins the lawsuit, the student will not owe him under their contract, *but* he will still be forced to pay by the court's judgment.
Either way, the student ends up having to pay his master!
Well done if you cracked this classic paradox!