It shall be unlawful for the County Treasurer be it a banking corporation or an individual, to receive directly or indirectly any rebate discount, or profit on any county warrant or order paid by the county of Johnson; and any violation of the provision of this section shall be a misdemeanor and upon conviction shall be punished as prescribed by [law], and shall forfeit his office.