1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00

Added back error method

This commit is contained in:
Hillel Coren 2016-08-07 22:42:24 +03:00
parent f844d623d3
commit 325aaa3272

View File

@ -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);
}
}