get('/', function () { return new Response( 200, ['Content-Type' => 'application/json'], json_encode(['message' => 'Webhook Service is up']) ); }); $app->post('/genial/cashin', function ($request) { $body = (string) $request->getBody(); writeLog('/genial/cashin', $body); return new Response(200, ['Content-Type' => 'application/json'], json_encode(['status' => 'success'])); }); $app->post('/genial/cashout', function ($request) { $body = (string) $request->getBody(); writeLog('/genial/cashout', $body); return new Response(200, ['Content-Type' => 'application/json'], json_encode(['status' => 'success'])); }); $app->post('/{webhook}', function ($request, string $webhook) { $body = (string) $request->getBody(); writeLog($webhook, $body); return new Response(200, ['Content-Type' => 'application/json'], json_encode(['status' => 'success'])); }); $app->run();