It is unlawful for any candidate for nomination or election in any state, county, city or district office, to expend, pay, promise, or loan or become pecuniarily liable in any way for money or other thing of value, either directly or indirectly, or to agree to enter into any contract with any person to vote for or support any particular policy or measure, in consideration of the vote or support, moral or financial, of such person. A violation of this section shall be punished as provided in §2-19-123.