Indeed and indeed...
Of course a question like this one is nothing to do with flying training. Its about commercial reality. You have entered into a contract with a provider of a service, and paid for it. If you wish to terminate the contract early that's OK, but there will be fine print somewhere to say that they won't refund you your money. And why should they? They are able and willing to fulfil their side of the contract.
You could maybe argue that they had in some way failed to fulfil their part of the contract. But what grounds have you got?
Your problem, if you just walk away (assuming you can afford to do that), will be to get them to release certified copies of your training record and exam results. If you can't get them you are back to square one.
Sorry, but the others are right - never pay up front!!