update controllers logic

This commit is contained in:
root
2026-04-23 00:04:35 -04:00
parent 1977a513df
commit ca4ba272fc
353 changed files with 13402 additions and 1301 deletions
@@ -5,6 +5,7 @@ namespace App\Services\Refunds;
use App\Models\Configuration;
use App\Models\Refund;
use App\Models\User;
use App\Services\ApplicationUrlService;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
@@ -15,7 +16,8 @@ class RefundRequestService
public function __construct(
private RefundPolicyService $policyService,
private RefundSummaryService $summaryService,
private RefundNotificationService $notifications
private RefundNotificationService $notifications,
private ApplicationUrlService $urls,
) {
}
@@ -49,7 +51,7 @@ class RefundRequestService
}
if (($result['refund_amount'] ?? 0) > 0) {
$this->notifications->notifyPending($parentId, (float) $result['refund_amount'], url('/login'));
$this->notifications->notifyPending($parentId, (float) $result['refund_amount'], $this->urls->webLoginUrl());
}
return [
@@ -114,7 +116,7 @@ class RefundRequestService
return ['ok' => false, 'message' => 'Failed to create refund request.'];
}
$this->notifications->notifyPending($parentId, $amount, url('/login'));
$this->notifications->notifyPending($parentId, $amount, $this->urls->webLoginUrl());
return [
'ok' => true,