849.26 Gambling contracts declared void; exception.—All promises, agreements, notes, bills, bonds or other contracts, mortgages or other securities, when the whole or part of the consideration if for money or other valuable thing won or lost, laid, staked, betted or wagered in any gambling transaction whatsoever, regardless of its name or nature, whether heretofore prohibited or not, or for the repayment of money lent or advanced at the time of a gambling transaction for the purpose of being laid, betted, staked or wagered, are void and of no effect; provided, that this act shall not apply to wagering on pari-mutuels or any gambling transaction expressly authorized by law.