get('/', function () { return new Response( 200, ['Content-Type' => 'application/json'], json_encode(['message' => 'Webhook Service is up']) ); }); $app->post('/edi', function ($request) { $body = (string) $request->getBody(); writeLog('edi', $body); return new Response(200, ['Content-Type' => 'application/json'], json_encode(['status' => 'success'])); }); $app->post('/qrcode/cash-in', function ($request) { $body = (string) $request->getBody(); writeLog('qrcode:cash-in', $body); return new Response(200, ['Content-Type' => 'application/json'], json_encode(['status' => 'success'])); }); $app->post('/cash-in', function ($request) { $body = (string) $request->getBody(); writeLog('cash-in', $body); return new Response(200, ['Content-Type' => 'application/json'], json_encode(['status' => 'success'])); }); $app->post('/cash-out', function ($request) { $body = (string) $request->getBody(); writeLog('cash-out', $body); return new Response(200, ['Content-Type' => 'application/json'], json_encode(['status' => 'success'])); }); $app->post('/refunds', function ($request) { $body = (string) $request->getBody(); writeLog('refunds', $body); return new Response(200, ['Content-Type' => 'application/json'], json_encode(['status' => 'success'])); }); $app->post('/ted', function ($request) { $body = (string) $request->getBody(); writeLog('ted', $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();