A nice proof was given by Dirichlet (see Dirichlet P.G.L., Lectures on number theory). Poisson summation proves that (see also Davenport, Multiplicative number theory) $$S(q)=\sum_{k=1}^qe(k^2/q)=\dfrac{1+i^{-q}}{1+i^{-1}}\cdot\sqrt{q}.$$ Together with multiplicative property $$S(pq)=\left(\dfrac{p}{q}\right)\left(\dfrac{q}{p}\right)S(p)S(q)$$ it proves the law: $$\left(\dfrac{p}{q}\right)\left(\dfrac{q}{p}\right)=\frac{1+i^{-pq}}{1+i^{-p}} \cdot\frac{1+i^{-1}}{1+i^{-q}}=(-1)^{\frac{p-1}{2}\cdot\frac{q-1}{2}}.$$