Index: src/main/java/org/example/dormallocationsystem/Service/IPaymentService.java
===================================================================
--- src/main/java/org/example/dormallocationsystem/Service/IPaymentService.java	(revision 317b00e49025125d4f8fe5b19f55f390daccce98)
+++ src/main/java/org/example/dormallocationsystem/Service/IPaymentService.java	(revision 65b15e396afd31e8efa6d4d84b46c8a9ee2be862)
@@ -7,3 +7,4 @@
 public interface IPaymentService {
     List<Payment> findByStudentId(Long studentId);
+    void recordPayment(Long studentId, List<String> paymentMonths);
 }
Index: src/main/java/org/example/dormallocationsystem/Service/Impl/EmployeeServiceImpl.java
===================================================================
--- src/main/java/org/example/dormallocationsystem/Service/Impl/EmployeeServiceImpl.java	(revision 317b00e49025125d4f8fe5b19f55f390daccce98)
+++ src/main/java/org/example/dormallocationsystem/Service/Impl/EmployeeServiceImpl.java	(revision 65b15e396afd31e8efa6d4d84b46c8a9ee2be862)
@@ -8,4 +8,5 @@
 import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.time.LocalDate;
@@ -58,4 +59,5 @@
     }
     @Override
+    @Transactional
     public void assignRoomToStudent(Long studentId, RoomId roomId) {
         Optional<Room> optionalRoom = roomRepository.findById(roomId);
@@ -130,5 +132,4 @@
                     studentTookRoom.setId(studentTookRoomId);
                     studentTookRoom.setStudent(student);
-                    //TODO: UPDATE STUDENT ROOM TIME TAKEN EXPECTANCY OPTION - SET CHOSEN STARTDATE AND SET END DATE IF EXISTENT HERE
                     studentTookRoom.setStartDate(LocalDate.now());
                     room.setCapacity(room.getCapacity() - 1);
@@ -200,16 +201,4 @@
             document.setEmployee(employee.get());
             dormDocumentRepository.save(document);
-
-            Long studentId = document.getStudent().getId();
-            boolean hasDeclinedDoc = dormDocumentRepository.findByStudentId(studentId)
-                    .stream()
-                    .anyMatch(doc -> "Declined".equals(doc.getDStatus()));
-
-            if (hasDeclinedDoc && roomRequestRepository.existsByStudentId(studentId)) {
-                Roomrequest request = roomRequestRepository.findByStudent(document.getStudent());
-                request.setStatus("Declined");
-                request.setEmployee(employee.get());
-                roomRequestRepository.save(request);
-            }
         }
     }
Index: src/main/java/org/example/dormallocationsystem/Service/Impl/PaymentServiceImpl.java
===================================================================
--- src/main/java/org/example/dormallocationsystem/Service/Impl/PaymentServiceImpl.java	(revision 317b00e49025125d4f8fe5b19f55f390daccce98)
+++ src/main/java/org/example/dormallocationsystem/Service/Impl/PaymentServiceImpl.java	(revision 65b15e396afd31e8efa6d4d84b46c8a9ee2be862)
@@ -2,8 +2,12 @@
 
 import org.example.dormallocationsystem.Domain.Payment;
+import org.example.dormallocationsystem.Domain.Student;
 import org.example.dormallocationsystem.Repository.PaymentRepository;
+import org.example.dormallocationsystem.Repository.StudentRepository;
 import org.example.dormallocationsystem.Service.IPaymentService;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
+import java.time.LocalDate;
 import java.util.List;
 
@@ -12,7 +16,9 @@
 
     private final PaymentRepository paymentRepository;
+    private final StudentRepository studentRepository;
 
-    public PaymentServiceImpl(PaymentRepository paymentRepository) {
+    public PaymentServiceImpl(PaymentRepository paymentRepository, StudentRepository studentRepository) {
         this.paymentRepository = paymentRepository;
+        this.studentRepository = studentRepository;
     }
 
@@ -21,3 +27,18 @@
         return paymentRepository.findByStudentId(studentId);
     }
+
+    @Transactional
+    @Override
+    public void recordPayment(Long studentId, List<String> paymentMonths) {
+        Student student = studentRepository.findById(studentId).orElseThrow();
+
+        for (String month : paymentMonths) {
+            Payment payment = new Payment();
+            payment.setAmount(50);
+            payment.setPaymentDate(LocalDate.now());
+            payment.setPaymentMonth(month);
+            payment.setStudent(student);
+            paymentRepository.save(payment);
+        }
+    }
 }
Index: src/main/java/org/example/dormallocationsystem/Web/PaymentController.java
===================================================================
--- src/main/java/org/example/dormallocationsystem/Web/PaymentController.java	(revision 317b00e49025125d4f8fe5b19f55f390daccce98)
+++ src/main/java/org/example/dormallocationsystem/Web/PaymentController.java	(revision 65b15e396afd31e8efa6d4d84b46c8a9ee2be862)
@@ -9,4 +9,5 @@
 import org.example.dormallocationsystem.Repository.PaymentRepository;
 import org.example.dormallocationsystem.Repository.StudentRepository;
+import org.example.dormallocationsystem.Service.IPaymentService;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
@@ -22,13 +23,11 @@
 public class PaymentController {
 
-    private final PaymentRepository paymentRepository;
-    private final StudentRepository studentRepository;
+    private final IPaymentService paymentService;
 
     @Value("${stripe.api.key}")
     private String stripeApiKey;
 
-    public PaymentController(PaymentRepository paymentRepository, StudentRepository studentRepository) {
-        this.paymentRepository = paymentRepository;
-        this.studentRepository = studentRepository;
+    public PaymentController(IPaymentService paymentService) {
+        this.paymentService = paymentService;
     }
 
@@ -74,16 +73,6 @@
     @GetMapping("/success")
     public String paymentSuccess(@RequestParam Long studentId, @RequestParam String paymentMonths) {
-        Student student = studentRepository.findById(studentId).orElseThrow();
-
-        for (String month : paymentMonths.split(",")) {
-            Payment payment = new Payment();
-            payment.setAmount(50);
-            payment.setPaymentDate(LocalDate.now());
-            payment.setPaymentMonth(month);
-            payment.setStudent(student);
-            paymentRepository.save(payment);
-        }
-
-
+        List<String> months = List.of(paymentMonths.split(","));
+        paymentService.recordPayment(studentId, months);
         return "redirect:/dashboard?studentId=" + studentId;
     }
