Section 27. All fees for licenses and permits authorized to be granted by the commission under this chapter, and all moneys payable under section twenty-one, shall be paid into the state treasury and shall be credited to the General Fund. All fees for licenses and permits authorized to be granted by the local licensing authorities under this chapter shall be paid into the treasuries of their respective cities and towns.