Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 5 |
| Mecom\Transaction\Exceptions\TransactionServiceUnauthorizedException | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 5 |
| render | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 5 |
|||
| <?php | |
| namespace Mecom\Transaction\Exceptions; | |
| use Exception; | |
| class TransactionServiceUnauthorizedException extends Exception | |
| { | |
| protected $code = 'unauthorized'; | |
| protected $message = 'Transaction service unauthorized.'; | |
| public $status = 401; | |
| public function render() | |
| { | |
| return response()->json( | |
| [ | |
| 'error' => $this->code, | |
| 'message' => $this->message, | |
| 'error_description' => $this->message, | |
| ], | |
| $this->status | |
| ); | |
| } | |
| } |