[#18] 코드 정리 및 일부 컨벤션 통일 #19

Merged
pricelees merged 24 commits from refactor/#18 into main 2025-07-22 09:05:31 +00:00
3 changed files with 5 additions and 17 deletions
Showing only changes of commit 13730d339c - Show all commits

View File

@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
import org.springframework.http.HttpStatus
enum class ErrorType(
@JvmField val description: String
val description: String
) {
// 400 Bad Request
REQUEST_DATA_BLANK("요청 데이터에 유효하지 않은 값(null OR 공백)이 포함되어있습니다."),

View File

@ -4,8 +4,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties
@ConfigurationProperties(prefix = "payment")
data class PaymentProperties(
@JvmField val apiBaseUrl: String,
@JvmField val confirmSecretKey: String,
@JvmField val readTimeout: Int,
@JvmField val connectTimeout: Int
val apiBaseUrl: String,
val confirmSecretKey: String,
val readTimeout: Int,
val connectTimeout: Int
)

View File

@ -6,22 +6,16 @@ import roomescape.payment.web.PaymentCancel
import kotlin.math.roundToLong
object SampleTossPaymentConst {
@JvmField
val paymentKey: String = "5EnNZRJGvaBX7zk2yd8ydw26XvwXkLrx9POLqKQjmAw4b0e1"
@JvmField
val orderId: String = "MC4wODU4ODQwMzg4NDk0"
@JvmField
val amount: Long = 1000L
@JvmField
val paymentType: String = "카드"
@JvmField
val cancelReason: String = "테스트 결제 취소"
@JvmField
val paymentRequest: PaymentApprove.Request = PaymentApprove.Request(
paymentKey,
orderId,
@ -29,7 +23,6 @@ object SampleTossPaymentConst {
paymentType
)
@JvmField
val paymentRequestJson: String = """
{
"paymentKey": "$paymentKey",
@ -39,21 +32,18 @@ object SampleTossPaymentConst {
}
""".trimIndent()
@JvmField
val cancelRequest: PaymentCancel.Request = PaymentCancel.Request(
paymentKey,
amount,
cancelReason
)
@JvmField
val cancelRequestJson: String = """
{
"cancelReason": "$cancelReason"
}
""".trimIndent()
@JvmField
val tossPaymentErrorJson: String = """
{
"code": "ERROR_CODE",
@ -61,7 +51,6 @@ object SampleTossPaymentConst {
}
""".trimIndent()
@JvmField
val confirmJson: String = """
{
"mId": "tosspayments",
@ -127,7 +116,6 @@ object SampleTossPaymentConst {
}
""".trimIndent()
@JvmField
val cancelJson: String = """
{
"mId": "tosspayments",