I can confirm with Jewelm of this also for myself
https://mysite.com/dev/square_handler.php?code= (an OAuth that is different than mine that changes with each attempt) &state= (set of random numbers that also change after each attempt)#_=_
@DrByte this
You can do some basic debugging by editing line 11 of the square_handler.php and setting false to true.
whether authorizing or simply loading the page in my browser simply says failure