update controllers logic
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user