The county treasurer or other official, accepting checks, drafts, or money orders in payment of any tax, assessment, fee, or license, shall deposit the same in the manner provided by law. If thereafter any check, draft, or money order is returned unpaid to the bank with which it was deposited, such bank shall return such unpaid check, draft, or money order to the officer who deposited the same and if such amount has been included in any cashier’s check given by said bank, such bank is entitled to a refund in the amount of such unpaid check, draft, or money order.