донат шоп, управление магазином, яндекс метрика

This commit is contained in:
2026-07-19 19:17:29 +04:00
parent 8bf1b852f0
commit df7f98fe8b
48 changed files with 1859 additions and 18 deletions
@@ -0,0 +1,30 @@
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Services\RobokassaService;
use Illuminate\Http\Request;
use InvalidArgumentException;
use Symfony\Component\HttpFoundation\Response;
use Throwable;
class RobokassaController extends Controller
{
public function result(Request $request, RobokassaService $robokassa): Response
{
try {
$invoice = $robokassa->processResult($request->all());
} catch (InvalidArgumentException $exception) {
report($exception);
return response('bad signature', 400)->header('Content-Type', 'text/plain');
} catch (Throwable $exception) {
report($exception);
return response('temporary error', 503)->header('Content-Type', 'text/plain');
}
return response('OK'.$invoice->id)->header('Content-Type', 'text/plain');
}
}