From bf3616c7f2bfd63907eb0edb466ad76835c178ed Mon Sep 17 00:00:00 2001 From: Jinseong Date: Sun, 24 Nov 2024 04:41:59 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=98=88=EC=95=BD=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit resolve: #23 --- .../reservation/service/ReservationService.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/main/java/univ/goormthon/kongju/domain/reservation/service/ReservationService.java b/src/main/java/univ/goormthon/kongju/domain/reservation/service/ReservationService.java index 2a455dc..96465f8 100644 --- a/src/main/java/univ/goormthon/kongju/domain/reservation/service/ReservationService.java +++ b/src/main/java/univ/goormthon/kongju/domain/reservation/service/ReservationService.java @@ -31,7 +31,6 @@ public class ReservationService { private final ParkingRepository parkingRepository; private final VehicleRepository vehicleRepository; private final MemberRepository memberRepository; - private final KakaoPayService kakaoPayService; @Transactional public ReservationResponse reserve(String memberId, ReservationRequest request) { @@ -54,22 +53,11 @@ public ReservationResponse reserve(String memberId, ReservationRequest request) .reservationDate(request.reservationDate()) .startTime(request.startTime()) .endTime(request.endTime()) - .reservationStatus(ReservationStatus.WAITING) + .reservationStatus(ReservationStatus.ACCEPTED) .build(); reservationRepository.save(reservation); - // 카카오페이 결제 성공 시 예약 상태 변경 - PayReadyResponse response = kakaoPayService.ready(reservation, totalFee); - if(response != null) { - reservation.setReservationStatus(ReservationStatus.ACCEPTED); - } - else { - reservation.setReservationStatus(ReservationStatus.CANCELED); - } - - reservationRepository.save(reservation); - return ReservationResponse.builder() .id(reservation.getId()) .parkingId(reservation.getParkingId())