Skip to content

Commit

Permalink
[refactor] kakaopay kotlin & feign으로 리펙토링 #29
Browse files Browse the repository at this point in the history
- KakaoPay 관련 kt 파일 패키지 변경
- payReady 기능을 kotlin & feign으로 제작
  • Loading branch information
HYEONSIKOH committed Jan 28, 2025
1 parent 246df9d commit 6572580
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ package org.washcode.washpang.domain.order.controller

import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.*
import org.washcode.washpang.domain.order.dto.OrderDto
import org.washcode.washpang.domain.order.service.OrderService
import org.washcode.washpang.global.domain.kakao.dto.KakaoDto
import org.washcode.washpang.global.domain.kakaopay.client.KakaoPayClient
import org.washcode.washpang.global.domain.kakaopay.dto.KakaoPayDto
import org.washcode.washpang.global.exception.ResponseResult
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class KakaoPayClient(
@Value("\${kakaopay.key.secret-dev}")
private val secretDev = ""

@Transactional
fun payReady(userId: Int, dto: KakaoPayDto.ReqDto): ResponseResult {
val reqDto = KakaoPayDto.ReadyReq(cid, clientSecret, dto.paymentId, userId.toString(), dto.name, dto.quantity, dto.totalPrice)
var resBody: KakaoPayDto.ReadyRes? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ enum class ErrorCode (
KAKAOPAY_READY_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "카카오페이 결제 준비 에러"),
KAKAOPAY_APPROVE_REDIS_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "TID가 REDIS 안에 없습니다."),
KAKAOPAY_APPROVE_FEIGN_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "카카오페이 승인 API 통신 실패"),
KAKAOPAY_APPROVE_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "카카오페이 결제 승인 에러");
}
KAKAOPAY_APPROVE_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "카카오페이 결제 승인 에러");

0 comments on commit 6572580

Please sign in to comment.