From a98a41efabf9b0d1376c55fd40aa1996e5d5bb52 Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Sun, 16 Nov 2025 17:06:44 +0500 Subject: [PATCH] wip --- .../Repositories/OnlinePaymentRepository.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/Modules/OnlinePayment/Repositories/OnlinePaymentRepository.php b/app/Modules/OnlinePayment/Repositories/OnlinePaymentRepository.php index 98a2bca..b32388e 100644 --- a/app/Modules/OnlinePayment/Repositories/OnlinePaymentRepository.php +++ b/app/Modules/OnlinePayment/Repositories/OnlinePaymentRepository.php @@ -8,6 +8,8 @@ use App\Modules\OnlinePayment\Models\OnlinePayment; use Illuminate\Contracts\View\View; use Illuminate\Database\Eloquent\Model; use Illuminate\Http\Client\Response; +use Illuminate\Support\Facades\Config; +use Illuminate\Support\Facades\Log; class OnlinePaymentRepository { @@ -166,6 +168,21 @@ class OnlinePaymentRepository $this->paymentLink = string($this->response['formUrl']); $this->createHistory(); + } else { + Config::set('logging.channels.halkbank_payment_error', [ + 'driver' => 'single', + 'path' => storage_path('logs/halkbank_payment_error.log'), + 'level' => 'debug', + ]); + + Log::channel('halkbank_payment_error') + ->error('Payment error', [ + 'response' => [ + 'title' => 'REGISTER', + 'error' => $this->response->body(), + 'file_line' => __FILE__.':'.__LINE__, + ], + ]); } return $this;