1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

allow paymentfailed exception for guest middleware

This commit is contained in:
Benjamin Beganović 2020-12-07 14:49:11 +01:00
parent 4a4a974a8d
commit 2609e0027a

View File

@ -13,7 +13,14 @@ class PaymentFailed extends Exception
public function render($request)
{
return render('gateways.unsuccessful', [
if (auth()->user()) {
return render('gateways.unsuccessful', [
'message' => $this->getMessage(),
'code' => $this->getCode(),
]);
}
return response([
'message' => $this->getMessage(),
'code' => $this->getCode(),
]);