All the expenses of printing the tickets, paying the poll managers, clerks and returning officer of a municipal primary election shall be paid by the municipality from the general funds thereof, but such officers of primary elections shall receive only such compensation as is authorized by law or ordinance to be paid poll managers, clerks and returning officer for like services rendered in the general elections held in the municipality.