From fcbab2fd0239e7939992946a56fe971a56172831 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 11 Mar 2018 12:36:24 +0200 Subject: [PATCH] Working on tests --- app/Ninja/PaymentDrivers/BasePaymentDriver.php | 2 +- app/Services/PaymentService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Ninja/PaymentDrivers/BasePaymentDriver.php b/app/Ninja/PaymentDrivers/BasePaymentDriver.php index 1601f9d3d789..5ab9d0d185bc 100644 --- a/app/Ninja/PaymentDrivers/BasePaymentDriver.php +++ b/app/Ninja/PaymentDrivers/BasePaymentDriver.php @@ -266,7 +266,7 @@ class BasePaymentDriver public function completeOnsitePurchase($input = false, $paymentMethod = false) { - $this->input = count($input) ? $input : false; + $this->input = $input && $input->count() ? $input : false; $gateway = $this->gateway(); if ($input) { diff --git a/app/Services/PaymentService.php b/app/Services/PaymentService.php index 728011ad482d..0e7ed3de7dc9 100644 --- a/app/Services/PaymentService.php +++ b/app/Services/PaymentService.php @@ -139,7 +139,7 @@ class PaymentService extends BaseService } catch (Exception $exception) { $subject = trans('texts.auto_bill_failed', ['invoice_number' => $invoice->invoice_number]); $message = sprintf('%s: %s', ucwords($paymentDriver->providerName()), $exception->getMessage()); - $message .= $exception->getTraceAsString(); + //$message .= $exception->getTraceAsString(); Utils::logError($message, 'PHP', true); if (! Auth::check()) { $mailer = app('App\Ninja\Mailers\UserMailer');