Fourier series on the ring of integers in a $p$-series field