Skip to content

Commit

Permalink
refactor: debug 메시지 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
lja3723 committed Nov 18, 2024
1 parent 662e934 commit e37c927
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.ktc2.cokaen.wouldyouin.auth.api;

import lombok.extern.slf4j.Slf4j;
import org.ktc2.cokaen.wouldyouin._common.api.ApiResponse;
import org.ktc2.cokaen.wouldyouin._common.api.ApiResponseBody;
import org.ktc2.cokaen.wouldyouin._common.exception.BusinessException;
Expand All @@ -14,6 +15,7 @@
import org.springframework.web.bind.annotation.RestController;

//@RestController
@Slf4j
@Controller
public class AuthRedirectController {

Expand All @@ -36,7 +38,9 @@ private String getRedirectUri(AccountType accountType) {

@GetMapping("/auth/redirect/social/{accountType}")
public String/*ResponseEntity<ApiResponseBody<String>>*/ redirect(@PathVariable("accountType")AccountType accountType, @RequestParam("code") String code) {
return "redirect:" + getRedirectUri(accountType) + "?code=" + code;
String redirectDeeplink = "redirect:" + getRedirectUri(accountType) + "?code=" + code;
log.debug("#### redirectDeeplink = {}", redirectDeeplink);
return redirectDeeplink;
// return ApiResponse.ok("redirect:" + getRedirectUri(accountType) + "?code=" + code);
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package org.ktc2.cokaen.wouldyouin.reservation.api;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Slf4j
@Controller
@RequiredArgsConstructor
public class KakaoPaymentRedirectController {
Expand All @@ -21,16 +23,22 @@ public class KakaoPaymentRedirectController {

@GetMapping("/kakaopay/redirect/approval")
public String redirectKakaopayApproval(@RequestParam("pg_token") String pgToken) {
return "redirect:" + approvalDeepLink + "?pg_token=" + pgToken;
String redirectDeeplink = "redirect:" + approvalDeepLink + "?pg_token=" + pgToken;
log.debug("#### redirectDeeplink = {}", redirectDeeplink);
return redirectDeeplink;
}

@GetMapping("/kakaopay/redirect/cancel")
public String redirectKakaopayCancel(@RequestParam("pg_token") String pgToken) {
return "redirect:" + cancelDeepLink + "?pg_token=" + pgToken;
String redirectDeeplink = "redirect:" + cancelDeepLink + "?pg_token=" + pgToken;
log.debug("#### redirectDeeplink = {}", redirectDeeplink);
return redirectDeeplink;
}

@GetMapping("/kakaopay/redirect/fail")
public String redirectKakaopayFail(@RequestParam("pg_token") String pgToken) {
return "redirect:" + failDeepLink + "?pg_token=" + pgToken;
String redirectDeeplink = "redirect:" + failDeepLink + "?pg_token=" + pgToken;
log.debug("#### redirectDeeplink = {}", redirectDeeplink);
return redirectDeeplink;
}
}

0 comments on commit e37c927

Please sign in to comment.