Route_Action vs. Custom File

You may use Route_Action server event, see: https://discourse.hkvstore.com/t/using-route-action-server-event-v2021/3393/1 your payment gateway posts data to your site by HTTP POST, the route arguments are unimportant, you just get the data by $_POST or by POST Parameters and then do what you want with the data.You may just put your code in your route action and change echo to:

$body = $response->getBody();
$body->write('Hello');

and return the $response in your route action.Please re-read the example in https://discourse.hkvstore.com/t/using-route-action-server-event-v2021/3393/1 and see The Response Body.