Index: src/main/java/com/example/skychasemk/controller/BookingController.java
===================================================================
--- src/main/java/com/example/skychasemk/controller/BookingController.java	(revision 986830465c15053d3a25484f02e6e5ef26ceae2e)
+++ src/main/java/com/example/skychasemk/controller/BookingController.java	(revision de83113e09d4c6a32e066d85e3adf027088a2433)
@@ -27,6 +27,6 @@
     }
 
-    @PutMapping("/flights/{id}")
-    public Booking updateBooking(@PathVariable("id") Integer bookingID, @RequestBody Booking booking) {
+    @PutMapping("/flights/{bookingId}")
+    public Booking updateBooking(@PathVariable("bookingId") Integer bookingID, @RequestBody Booking booking) {
         return bookingService.updateBooking(bookingID, booking);
     }
@@ -40,9 +40,9 @@
     public Booking createBooking(@RequestBody BookingDTO bookingRequest) {
         Booking newBooking = new Booking();
-        newBooking.setUserID(bookingRequest.getUserID());
+        newBooking.setUserId(bookingRequest.getUserId());
         newBooking.setFlightId(bookingRequest.getFlightId());
         newBooking.setBookingDate(LocalDate.now());
         newBooking.setStatus(Booking.payment_status.PENDING);
-        newBooking.setTotalCost(bookingRequest.getTotalCost());
+        newBooking.setTotal_cost(bookingRequest.getTotalCost());
         newBooking.setSeatNumber(bookingRequest.getSeatNumber());
         System.out.println("Saving Booking: " + newBooking);
Index: src/main/java/com/example/skychasemk/dto/BookingDTO.java
===================================================================
--- src/main/java/com/example/skychasemk/dto/BookingDTO.java	(revision 986830465c15053d3a25484f02e6e5ef26ceae2e)
+++ src/main/java/com/example/skychasemk/dto/BookingDTO.java	(revision de83113e09d4c6a32e066d85e3adf027088a2433)
@@ -1,5 +1,6 @@
 package com.example.skychasemk.dto;
 
-import com.example.skychasemk.model.Flight;
+import lombok.Getter;
+import lombok.Setter;
 
 import java.math.BigDecimal;
@@ -8,19 +9,24 @@
 public class BookingDTO {
 
-    private Integer bookingID;
-    private Integer userID;
+    @Setter
+    private Integer bookingId;
+
+    @Getter
+    private Integer userId;
+    @Setter
+    @Getter
     private Integer flightId;
+    @Setter
+    @Getter
     private LocalDate bookingDate;
+    @Setter
+    @Getter
     private PaymentStatus status;
+    @Setter
+    @Getter
     private BigDecimal totalCost;
+    @Setter
+    @Getter
     private Integer seatNumber;
-
-    public Integer getFlightId() {
-        return flightId;
-    }
-
-    public void setFlightId(Integer flightId) {
-        this.flightId = flightId;
-    }
 
     public enum PaymentStatus {
@@ -30,59 +36,7 @@
     }
 
-    // Getters and Setters
-    public Integer getBookingID() {
-        return bookingID;
+    public void setUserID(Integer userId) {
+        this.userId = userId;
     }
 
-    public void setBookingID(Integer bookingID) {
-        this.bookingID = bookingID;
-    }
-
-    public Integer getUserID() {
-        return userID;
-    }
-
-    public void setUserID(Integer userID) {
-        this.userID = userID;
-    }
-
-    public Integer getFlightID() {
-        return flightId;
-    }
-
-    public void setFlightID(Integer flightId) {
-        this.flightId = flightId;
-    }
-
-    public LocalDate getBookingDate() {
-        return bookingDate;
-    }
-
-    public void setBookingDate(LocalDate bookingDate) {
-        this.bookingDate = bookingDate;
-    }
-
-    public PaymentStatus getStatus() {
-        return status;
-    }
-
-    public void setStatus(PaymentStatus status) {
-        this.status = status;
-    }
-
-    public BigDecimal getTotalCost() {
-        return totalCost;
-    }
-
-    public void setTotalCost(BigDecimal totalCost) {
-        this.totalCost = totalCost;
-    }
-
-    public Integer getSeatNumber() {
-        return seatNumber;
-    }
-
-    public void setSeatNumber(Integer seatNumber) {
-        this.seatNumber = seatNumber;
-    }
 }
Index: src/main/java/com/example/skychasemk/dto/PaymentDTO.java
===================================================================
--- src/main/java/com/example/skychasemk/dto/PaymentDTO.java	(revision 986830465c15053d3a25484f02e6e5ef26ceae2e)
+++ src/main/java/com/example/skychasemk/dto/PaymentDTO.java	(revision de83113e09d4c6a32e066d85e3adf027088a2433)
@@ -1,4 +1,5 @@
 package com.example.skychasemk.dto;
 
+import com.example.skychasemk.model.Booking;
 import lombok.Getter;
 import lombok.Setter;
@@ -10,15 +11,20 @@
 
     // Getters and Setters
+    @Setter
     @Getter
     private Long paymentID;
     @Getter
     private Integer bookingId;
-    private Integer userID;
+    @Setter
+    private Integer userId;
+    @Setter
     @Getter
     private PaymentMethod method;
+    @Setter
     @Getter
     private BigDecimal amount;
     @Getter
     private LocalDate transactionDate;
+    @Setter
     @Getter
     private PaymentStatus status;
@@ -38,35 +44,10 @@
         CREDIT
     }
-    public Integer getBookingID() {
-        return bookingId;
-    }
-    public void setPaymentID(Long paymentID) {
-        this.paymentID = paymentID;
+
+
+    public Long getUserId() {
+        return Long.valueOf(userId);
     }
 
-
-    public Long getUserID() {
-        return Long.valueOf(userID);
-    }
-
-    public void setUserID(Integer userID) {
-        this.userID = userID;
-    }
-
-    public void setMethod(PaymentMethod method) {
-        this.method = method;
-    }
-
-    public void setAmount(BigDecimal amount) {
-        this.amount = amount;
-    }
-
-    public void setTransactionDate(LocalDate transactionDate) {
-        this.transactionDate = transactionDate;
-    }
-
-    public void setStatus(PaymentStatus status) {
-        this.status = status;
-    }
 }
 
Index: src/main/java/com/example/skychasemk/model/Booking.java
===================================================================
--- src/main/java/com/example/skychasemk/model/Booking.java	(revision 986830465c15053d3a25484f02e6e5ef26ceae2e)
+++ src/main/java/com/example/skychasemk/model/Booking.java	(revision de83113e09d4c6a32e066d85e3adf027088a2433)
@@ -12,22 +12,17 @@
 public class Booking {
 
-    @Setter
-    @Getter
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
     @Column(name = "bookingid")
 
-    private Integer bookingID;
-    @Setter
-    @Getter
+    private Integer bookingId;
     @Column(name = "userid")
 
-    private Integer userID;
+    private Integer userId;
 
     @Column(name = "booking_date")
 
     private LocalDate booking_date;
-    @Setter
-    @Getter
+
     @Column(name = "payment_status")
 
@@ -62,18 +57,18 @@
     }
 
-    public Integer getBookingID() {
-        return bookingID;
+    public Integer getBookingId() {
+        return bookingId;
     }
 
-    public void setBookingID(Integer bookingID) {
-        this.bookingID = bookingID;
+    public void setBookingId(Integer bookingID) {
+        this.bookingId = bookingID;
     }
 
-    public Integer getUserID() {
-        return userID;
+    public Integer getUserId() {
+        return userId;
     }
 
-    public void setUserID(Integer userID) {
-        this.userID = userID;
+    public void setUserId(Integer userId) {
+        this.userId = userId;
     }
 
@@ -114,12 +109,4 @@
     }
 
-    public BigDecimal getTotalCost() {
-        return total_cost;
-    }
-
-    public void setTotalCost(BigDecimal totalCost) {
-        this.total_cost = totalCost;
-    }
-
     public Integer getSeatNumber() {
         return seat_number;
Index: src/main/java/com/example/skychasemk/model/Payment.java
===================================================================
--- src/main/java/com/example/skychasemk/model/Payment.java	(revision 986830465c15053d3a25484f02e6e5ef26ceae2e)
+++ src/main/java/com/example/skychasemk/model/Payment.java	(revision de83113e09d4c6a32e066d85e3adf027088a2433)
@@ -13,4 +13,5 @@
 public class Payment {
 
+    @Setter
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
@@ -19,10 +20,12 @@
     private Integer paymentID;
 
-    @Column(name = "bookingid")
+    //@Column(name = "bookingId")
+    @Setter
+    @Column(name="bookingid")
+    private Integer bookingId;
+    @Getter
+    @Column(name = "userid")
 
-    private Integer bookingID;
-    @Column(name = "UserID")
-
-    private Integer userID;
+    private Integer userId;
     @Setter
     @Column(name = "payment_method")
@@ -39,8 +42,11 @@
 
     private LocalDate transactionDate;
+    @Setter
+    @Getter
     @Column(name = "payment_status")
 
     @Enumerated(EnumType.STRING)
     private PaymentStatus status;
+
 
     public enum PaymentStatus {
@@ -56,62 +62,14 @@
     }
 
-    public Integer getPaymentID() {
-        return paymentID;
+    public Integer getBookingID() {
+        return bookingId;
     }
 
-    public Integer getBookingID() {
-        return bookingID;
+    public void setUserID(Integer userId) {
+        this.userId = userId;
     }
 
-    public Integer getUserID() {
-        return userID;
-    }
-
-    public void setUserID(Integer userID) {
-        this.userID = userID;
-    }
-
-    public PaymentMethod getMethod() {
-        return method;
-    }
-
-    public void setMethod(PaymentMethod method) {
-        this.method = method;
-    }
-
-    public BigDecimal getAmount() {
-        return amount;
-    }
-
-    public void setPaymentID(Integer paymentID) {
-        this.paymentID = paymentID;
-    }
-
-    public void setBookingID(Integer bookingID) {
-        this.bookingID = bookingID;
-    }
-
-    public void setAmount(BigDecimal amount) {
-        this.amount = amount;
-    }
-
-    public LocalDate getTransactionDate() {
-        return transactionDate;
-    }
-
-    public void setTransactionDate(LocalDate transactionDate) {
-        this.transactionDate = transactionDate;
-    }
-
-    public PaymentStatus getStatus() {
-        return status;
-    }
-
-    public void setStatus(PaymentStatus status) {
-        this.status = status;
-    }
-
-    public void setUserID(Long userID) {
-        this.userID = Math.toIntExact(userID);
+    public void setUserId(Long userId) {
+        this.userId = Math.toIntExact(userId);
     }
 
Index: src/main/java/com/example/skychasemk/repository/PaymentRepository.java
===================================================================
--- src/main/java/com/example/skychasemk/repository/PaymentRepository.java	(revision 986830465c15053d3a25484f02e6e5ef26ceae2e)
+++ src/main/java/com/example/skychasemk/repository/PaymentRepository.java	(revision de83113e09d4c6a32e066d85e3adf027088a2433)
@@ -9,6 +9,8 @@
 
 public interface PaymentRepository extends JpaRepository<Payment, Integer> {
-    @Query("SELECT p FROM Payment p WHERE p.userID = :userID")
-    List<Payment> findByUserId(@Param("userID") Long userID);
+    @Query("SELECT p FROM Payment p WHERE p.userId = :userId")
+    List<Payment> findByUserId(@Param("userID") Long userId);
 }
 
+
+
Index: src/main/java/com/example/skychasemk/services/BookingService.java
===================================================================
--- src/main/java/com/example/skychasemk/services/BookingService.java	(revision 986830465c15053d3a25484f02e6e5ef26ceae2e)
+++ src/main/java/com/example/skychasemk/services/BookingService.java	(revision de83113e09d4c6a32e066d85e3adf027088a2433)
@@ -8,4 +8,7 @@
 import java.util.List;
 import java.util.Optional;
+
+import static com.example.skychasemk.model.Booking.payment_status.COMPLETED;
+
 
 @Service
@@ -29,5 +32,9 @@
     public Booking updateBooking(Integer bookingID, Booking booking) {
         if (bookingRepository.existsById(bookingID)) {
-            booking.setBookingID(bookingID);
+            booking.setStatus(COMPLETED);
+            booking.setUserId(booking.getUserId());
+            booking.setTotal_cost(booking.getTotal_cost());
+            booking.setFlightId(booking.getFlightId());
+            booking.setBooking_date(booking.getBooking_date());
             return bookingRepository.save(booking);
         } else {
Index: src/main/java/com/example/skychasemk/services/PaymentService.java
===================================================================
--- src/main/java/com/example/skychasemk/services/PaymentService.java	(revision 986830465c15053d3a25484f02e6e5ef26ceae2e)
+++ src/main/java/com/example/skychasemk/services/PaymentService.java	(revision de83113e09d4c6a32e066d85e3adf027088a2433)
@@ -55,11 +55,9 @@
 
     public Payment createTransaction(PaymentDTO dto){
-        //ApplicationUser user = userRepository.findById(dto.getUserID())
-        //        .orElseThrow(() -> new RuntimeException("User not found"));
-
+        System.out.println( dto);
         Payment payment = new Payment();
         payment.setAmount(dto.getAmount());
-        payment.setBookingID(dto.getBookingID());
-        //payment.setUserID(dto.getUserID());
+        payment.setBookingId(dto.getBookingId());
+        payment.setUserId(dto.getUserId());
         payment.setStatus(COMPLETED);
         payment.setMethod(CREDIT);
Index: src/main/resources/static/FlightSearch.html
===================================================================
--- src/main/resources/static/FlightSearch.html	(revision 986830465c15053d3a25484f02e6e5ef26ceae2e)
+++ src/main/resources/static/FlightSearch.html	(revision de83113e09d4c6a32e066d85e3adf027088a2433)
@@ -252,5 +252,5 @@
             <h2>Available Flights</h2>
             <div class="flights-list">
-                <div class="flight-item" v-for="flight in flights" :key="flight.flightId">
+                <div class="flight-item" v-for="flight in flights" :key="flight.flightID">
                     <input type="checkbox" v-model="flight.selected" />
                     <span>{{ flight.departureTime }} | {{ flight.arrivalTime }} | ${{ flight.price }} | {{ flight.availableSeats }}</span>
@@ -295,5 +295,6 @@
             showReturnDate: false,
             showPopup: false,
-            issueDescription: ""
+            issueDescription: '',
+            userId:''
         },
         computed: {
@@ -302,4 +303,5 @@
             }
         },
+
         methods: {
             async searchFlights() {
@@ -337,17 +339,19 @@
 
                 const flight = this.selectedFlights[0];
+                console.log(flight);
                 const totalCost = flight.price;
+
                 const bookingData = {
-                    flightId: flight.flightId,
+                    flightId: flight.flightID,
                     bookingDate: new Date().toISOString().split('T')[0],
                     status: 'PENDING',
-                    totalCost: totalCost
+                    totalCost: totalCost,
+                    userId:this.userId
                 };
-
                 axios.post('/api/bookings', bookingData)
                     .then(response => {
-                        const bookingID = response.data.bookingID;
+                        const bookingID = response.data.bookingId;
                         alert("Booked successfully!");
-                        window.location.href = `/transaction?amount=${encodeURIComponent(totalCost)}&bookingId=${encodeURIComponent(bookingID)}&flightId=${encodeURIComponent(flight.flightId)}`;
+                        window.location.href = `/transaction?amount=${encodeURIComponent(totalCost)}&bookingId=${encodeURIComponent(bookingID)}&flightId=${encodeURIComponent(flight.flightID)}&userId=${encodeURIComponent(this.userId)}`;
                     })
                     .catch(error => {
@@ -383,5 +387,5 @@
                 if (this.issueDescription.trim()) {
                     const reviewData = {
-                        userID: 1,
+                        userID: this.userId,
                         subject: "Issue Report",
                         description: this.issueDescription
@@ -413,4 +417,6 @@
         mounted() {
             this.fetchFlights();
+            const params = new URLSearchParams(window.location.search);
+            this.userId = params.get("userId");
             axios.get('api/flights')
                 .then(response => {
@@ -420,4 +426,5 @@
                     console.error("Error fetching flights", error);
                 });
+
         }
     });
Index: src/main/resources/static/TransactionPage.html
===================================================================
--- src/main/resources/static/TransactionPage.html	(revision 986830465c15053d3a25484f02e6e5ef26ceae2e)
+++ src/main/resources/static/TransactionPage.html	(revision de83113e09d4c6a32e066d85e3adf027088a2433)
@@ -263,16 +263,7 @@
             expiration: '',
             amount: '',
-            paymentSuccess: false
-        },
-        created(){
-            const urlParams = new URLSearchParams(window.location.search);
-            this.flightId = urlParams.get('flightId');
-            this.amount = urlParams.get('amount');
-            this.bookingId = urlParams.get('bookingId')
-
-            const user = JSON.parse(localStorage.getItem("user"));
-            if(user){
-                this.userId = user.id;
-            }
+            paymentSuccess: false,
+            flightId:'',
+            userId:''
         },
         methods: {
@@ -282,7 +273,7 @@
                     transaction_date:paymentDate,
                     payment_status:'SUCCESS',
-                    amount:this.amount,
-                    userId:this.userId,
-                    bookingId:this.bookingId
+                    amount:Number(this.amount) || null,
+                    userId:Number(this.userId) || null,
+                    bookingId:Number(this.bookingId) || null
                 };
                 console.log(transaction);
@@ -291,10 +282,27 @@
                         console.log(response.data);
                         this.paymentSuccess = true;
+                        this.updateBooking();
                         setTimeout(() => window.location.href = '/flights',2000);
                 })
                     .catch(error => console.error("Payment failed", error));
             },
+            updateBooking() {
+                const booking = {
+                    bookingDate: new Date().toISOString().split('T')[0],
+                    flightId:this.flightId,
+                    payment_status:'SUCCESS',
+                    total_cost:Number(this.amount) || null,
+                    userId:Number(this.userId) || null,
+                    bookingId:Number(this.bookingId) || null
+                };
+                console.log(booking);
+                axios.put(`api/flights/${this.bookingId}`, booking)
+                    .then(response => {
+                        console.log(response.data);
+                    })
+                    .catch(error => console.error("Booking update failed", error));
+            },
             cancelPayment() {
-                window.location.href = '/flights'; // Redirecting to flight search on cancel
+                window.location.href = '/flights';
             },
             validateForm() {
@@ -305,4 +313,11 @@
                 );
             }
+        },
+        mounted(){
+            const params = new URLSearchParams(window.location.search);
+            this.userId = params.get("userId");
+            this.bookingId = params.get("bookingId");
+            this.flightId = params.get("flightId");
+            this.amount=params.get("amount");
         }
     });
