From 325aaa32721889539f5658a061e2621fe3cc2c52 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 7 Aug 2016 22:42:24 +0300 Subject: [PATCH] Added back error method --- app/Http/Controllers/NinjaController.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/Http/Controllers/NinjaController.php b/app/Http/Controllers/NinjaController.php index 635207d76282..2a0725239eec 100644 --- a/app/Http/Controllers/NinjaController.php +++ b/app/Http/Controllers/NinjaController.php @@ -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); + } }