Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
Expand Down Expand Up @@ -38,14 +39,19 @@ public ResponseEntity<ApiResponse<String>> success(
@RequestParam Long paymentId,
@RequestParam("pg_token") String pgToken) {

log.info("[KAKAO SUCCESS] paymentId={}, pg_token={}", paymentId, pgToken);

String deepLink = UriComponentsBuilder.newInstance()
.scheme(scheme).host(host).path("/success")
.scheme("myapp").host("pay").path("/success")
.queryParam("paymentId", paymentId)
.queryParam("pg_token", pgToken)
.build().toUriString();
.build(true).toUriString();

log.info("DeepLink constructed: {}", deepLink);

HttpHeaders headers = new HttpHeaders();
headers.setLocation(URI.create(deepLink));
log.info("Responding 302 with Location: {}", headers.getLocation());
return ResponseEntity.status(HttpStatus.FOUND)
.headers(headers)
.body(ApiResponse.success(deepLink));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public static class MyReservationDTO {
private Long childCount;
private int nightCount;
private ReservationStatus status;

private boolean canWriteReview;
private boolean reviewWritten;
}
Expand Down