When any sale of real estate on foreclosure shall be set aside as invalid or void and money and interest have been refunded thereon, or when any refunding shall have been made under the provisions of law, the proportions thereof which have been paid as taxes to the state, township, city, school district, or other taxing districts, with interest as provided in K.S.A. 79-2804c, or amendments thereto, and costs thereon, shall be refunded to the county, and on the next settlement thereafter the county treasurer of such county shall be credited therewith, on the certificate of the board of the county commissioners.
K.S.A. 79-2804d