A wager is a contract by which two or more parties agree that a certain sum of money or other thing shall be paid or delivered to one of them on the happening of an uncertain event or upon the ascertainment of a fact which is in dispute between them. A contract in which the parties stipulate that they shall gain or lose upon the happening of an uncertain event in which they have no interest except that arising from the possibility of such gain or loss.