Skip to content

Commit

Permalink
feat: 카카오페이 api 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
lja3723 committed Nov 18, 2024
1 parent 6ea93f0 commit 22271b2
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.ktc2.cokaen.wouldyouin.reservation.api;

import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.ktc2.cokaen.wouldyouin.auth.Authorize;
import org.ktc2.cokaen.wouldyouin.auth.MemberIdentifier;
import org.ktc2.cokaen.wouldyouin.member.persist.MemberType;
import org.ktc2.cokaen.wouldyouin.reservation.api.dto.ReservationRequest;
import org.ktc2.cokaen.wouldyouin.reservation.application.ReservationService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequiredArgsConstructor
public class KakaoPaymentRedirectController {

@Value("${oauth.payment.approval_url}")
private String approvalUrl;

@PostMapping("/kakaopay/redirect")
public String createReservation1(@RequestParam("pg_token") String pgToken) {
return "redirect:" + approvalUrl + "?pg_token=" + pgToken;
}
}

This file was deleted.

13 changes: 9 additions & 4 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,14 @@ oauth:
- email
- profile
payment:
"approval_url": ${SERVER_DOMAIN_NAME}/api/events
"cancel_url": ${SERVER_DOMAIN_NAME}/api/events
"fail_url": ${SERVER_DOMAIN_NAME}/api/events
"approval_url": wouldyouin://booking/payment/check/payment_approve
"cancel_url": wouldyouin://booking/payment/check/payment_cancel
"fail_url": wouldyouin://booking/payment/check/payment_failed
"secret_key": ${KAKAOPAY_SECRET_KEY}
"kakao_pay_single_payment_url": online/v1/payment/ready
"kakao-pay-request-host": https://open-api.kakaopay.com
"kakao-pay-request-host": https://open-api.kakaopay.com





0 comments on commit 22271b2

Please sign in to comment.