Update gateway.class.php

updates default gateway url
fixes response signature checking
fixes undefined variable error