diff --git a/app/Services/Payment/RefundPayment.php b/app/Services/Payment/RefundPayment.php index 57e8de922f05..2b4b36df758f 100644 --- a/app/Services/Payment/RefundPayment.php +++ b/app/Services/Payment/RefundPayment.php @@ -79,7 +79,10 @@ class RefundPayment TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $this->payment->company->db); - SystemLogger::dispatch(['user' => auth()->user() ? auth()->user()->email : '', 'paymentables' => $this->payment->paymentables->makeHidden(['id','payment_id', 'paymentable_id','paymentable_type', 'deleted_at'])->toArray(), 'request' => request() ? request()->all() : []], SystemLog::CATEGORY_LOG, SystemLog::EVENT_USER, SystemLog::TYPE_GENERIC, $this->payment->client, $this->payment->company); + $notes = ctrans('texts.refunded') . " : {$this->total_refund} - " . ctrans('texts.gateway_refund') . " : "; + $notes .= $this->refund_data['gateway_refund'] !== false ? ctrans('texts.yes') : ctrans('texts.no'); + + $this->createActivity($notes); return $this->payment; } @@ -98,8 +101,6 @@ class RefundPayment $this->payment->refunded += $this->total_refund; - $this->createActivity($this->payment); - if ($response['success'] == false) { $this->payment->save(); @@ -133,7 +134,7 @@ class RefundPayment $fields->company_id = $this->payment->company_id; $fields->activity_type_id = Activity::REFUNDED_PAYMENT; // $fields->credit_id = $this->credit_note->id; // TODO - $fields->notes = json_encode($notes); + $fields->notes = $notes; if (isset($this->refund_data['invoices'])) { foreach ($this->refund_data['invoices'] as $invoice) { diff --git a/config/mail.php b/config/mail.php index 2b778f378dfe..0cd235b4048f 100644 --- a/config/mail.php +++ b/config/mail.php @@ -43,6 +43,7 @@ return [ 'password' => env('MAIL_PASSWORD'), 'timeout' => null, 'local_domain' => env('MAIL_EHLO_DOMAIN'), + 'verify_peer' => env('MAIL_VERIFY_PEER', true), ], 'ses' => [