original gateways.php