diff --git a/resources/assets/images/errors/402.svg b/resources/assets/images/errors/402.svg new file mode 100644 index 000000000..801584bf8 --- /dev/null +++ b/resources/assets/images/errors/402.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/lang/en/errors.php b/resources/lang/en/errors.php index 95a332032..78c2360e0 100644 --- a/resources/lang/en/errors.php +++ b/resources/lang/en/errors.php @@ -6,6 +6,7 @@ 'heading' => 'Oops, something went wrong ...', 'message' => 'Please try again or get in touch if the issue persists.', '401' => 'Unauthorized', + '402' => 'Payment Required', '403' => 'Forbidden', '403_heading' => 'Oops, this is a restricted area!', '403_message' => 'You don\'t have the proper security clearance to access this part of the site.', diff --git a/resources/views/errors/402.blade.php b/resources/views/errors/402.blade.php new file mode 100644 index 000000000..d1f4e766e --- /dev/null +++ b/resources/views/errors/402.blade.php @@ -0,0 +1 @@ +@extends('errors::layout', ['code' => 402]) diff --git a/resources/views/errors/layout.blade.php b/resources/views/errors/layout.blade.php index 2c9c49b03..72e5a2153 100644 --- a/resources/views/errors/layout.blade.php +++ b/resources/views/errors/layout.blade.php @@ -2,6 +2,7 @@ @php $code = match ($code) { 401 => 401, + 402 => 402, 403 => 403, 404 => 404, 419 => 419, diff --git a/tests/UserInterface/Exceptions/HandlerTest.php b/tests/UserInterface/Exceptions/HandlerTest.php index ae52c262d..bf5331de6 100644 --- a/tests/UserInterface/Exceptions/HandlerTest.php +++ b/tests/UserInterface/Exceptions/HandlerTest.php @@ -18,7 +18,6 @@ $this->assertStringContainsString(''.trans('ui::errors.500').' | Laravel', $response->getContent()); })->with([ - [402, 'Oops, something went wrong'], [408, 'Oops, something went wrong'], [501, 'Oops, something went wrong'], [519, 'Oops, something went wrong'], @@ -38,6 +37,7 @@ $this->assertStringContainsString(''.trans("ui::errors.${errorCode}").' | Laravel', $response->getContent()); })->with([ [401, 'Oops, something went wrong'], + [402, 'Payment Required'], [403, 'Oops, this is a restricted area!'], [404, 'Oops, something went wrong'], [419, 'Oops, something went wrong'],