2020-10-26 11:02:23 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Exceptions;
|
|
|
|
|
|
|
|
use Exception;
|
|
|
|
|
|
|
|
class PaymentFailed extends Exception
|
|
|
|
{
|
|
|
|
public function report()
|
|
|
|
{
|
|
|
|
// ..
|
|
|
|
}
|
|
|
|
|
|
|
|
public function render($request)
|
|
|
|
{
|
2022-07-11 10:24:49 +02:00
|
|
|
if (auth()->guard('contact')->user() || ($request->has('cko-session-id') && $request->query('cko-session-id') )) {
|
2022-07-15 09:41:30 +02:00
|
|
|
|
2020-12-07 14:49:11 +01:00
|
|
|
return render('gateways.unsuccessful', [
|
|
|
|
'message' => $this->getMessage(),
|
|
|
|
'code' => $this->getCode(),
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
return response([
|
2020-10-26 11:02:23 +01:00
|
|
|
'message' => $this->getMessage(),
|
|
|
|
'code' => $this->getCode(),
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|