This commit is contained in:
2025-11-16 17:06:44 +05:00
parent 3911e8e21a
commit a98a41efab

View File

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