2024-06-18 03:33:56 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Exceptions;
|
|
|
|
|
|
|
|
use Exception;
|
|
|
|
use Illuminate\Http\JsonResponse;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
|
|
|
class DuplicatePaymentException extends Exception
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Report the exception.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function report()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Render the exception into an HTTP response.
|
|
|
|
*
|
|
|
|
* @param Request $request
|
|
|
|
* @return JsonResponse
|
|
|
|
*/
|
|
|
|
public function render($request)
|
|
|
|
{
|
|
|
|
|
|
|
|
return response()->json([
|
|
|
|
'message' => 'Duplicate request',
|
|
|
|
], 400);
|
2024-08-22 08:45:06 +02:00
|
|
|
|
2024-06-18 03:33:56 +02:00
|
|
|
}
|
|
|
|
}
|