mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 13:42:49 +01:00
Added back error method
This commit is contained in:
parent
3c731b72ec
commit
030a4ec356
@ -264,4 +264,14 @@ class NinjaController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function error($type, $error, $accountGateway = false, $exception = false)
|
||||||
|
{
|
||||||
|
$message = '';
|
||||||
|
if ($accountGateway && $accountGateway->gateway) {
|
||||||
|
$message = $accountGateway->gateway->name . ': ';
|
||||||
|
}
|
||||||
|
$message .= $error ?: trans('texts.payment_error');
|
||||||
|
Session::flash('error', $message);
|
||||||
|
Utils::logError("Payment Error [{$type}]: " . ($exception ? Utils::getErrorString($exception) : $message), 'PHP', true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user