generated from pricelees/issue-pr-template
[#18] 코드 정리 및 일부 컨벤션 통일 #19
@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
|||||||
import org.springframework.http.HttpStatus
|
import org.springframework.http.HttpStatus
|
||||||
|
|
||||||
enum class ErrorType(
|
enum class ErrorType(
|
||||||
@JvmField val description: String
|
val description: String
|
||||||
) {
|
) {
|
||||||
// 400 Bad Request
|
// 400 Bad Request
|
||||||
REQUEST_DATA_BLANK("요청 데이터에 유효하지 않은 값(null OR 공백)이 포함되어있습니다."),
|
REQUEST_DATA_BLANK("요청 데이터에 유효하지 않은 값(null OR 공백)이 포함되어있습니다."),
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties
|
|||||||
|
|
||||||
@ConfigurationProperties(prefix = "payment")
|
@ConfigurationProperties(prefix = "payment")
|
||||||
data class PaymentProperties(
|
data class PaymentProperties(
|
||||||
@JvmField val apiBaseUrl: String,
|
val apiBaseUrl: String,
|
||||||
@JvmField val confirmSecretKey: String,
|
val confirmSecretKey: String,
|
||||||
@JvmField val readTimeout: Int,
|
val readTimeout: Int,
|
||||||
@JvmField val connectTimeout: Int
|
val connectTimeout: Int
|
||||||
)
|
)
|
||||||
|
|||||||
@ -6,22 +6,16 @@ import roomescape.payment.web.PaymentCancel
|
|||||||
import kotlin.math.roundToLong
|
import kotlin.math.roundToLong
|
||||||
|
|
||||||
object SampleTossPaymentConst {
|
object SampleTossPaymentConst {
|
||||||
@JvmField
|
|
||||||
val paymentKey: String = "5EnNZRJGvaBX7zk2yd8ydw26XvwXkLrx9POLqKQjmAw4b0e1"
|
val paymentKey: String = "5EnNZRJGvaBX7zk2yd8ydw26XvwXkLrx9POLqKQjmAw4b0e1"
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val orderId: String = "MC4wODU4ODQwMzg4NDk0"
|
val orderId: String = "MC4wODU4ODQwMzg4NDk0"
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val amount: Long = 1000L
|
val amount: Long = 1000L
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val paymentType: String = "카드"
|
val paymentType: String = "카드"
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val cancelReason: String = "테스트 결제 취소"
|
val cancelReason: String = "테스트 결제 취소"
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val paymentRequest: PaymentApprove.Request = PaymentApprove.Request(
|
val paymentRequest: PaymentApprove.Request = PaymentApprove.Request(
|
||||||
paymentKey,
|
paymentKey,
|
||||||
orderId,
|
orderId,
|
||||||
@ -29,7 +23,6 @@ object SampleTossPaymentConst {
|
|||||||
paymentType
|
paymentType
|
||||||
)
|
)
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val paymentRequestJson: String = """
|
val paymentRequestJson: String = """
|
||||||
{
|
{
|
||||||
"paymentKey": "$paymentKey",
|
"paymentKey": "$paymentKey",
|
||||||
@ -39,21 +32,18 @@ object SampleTossPaymentConst {
|
|||||||
}
|
}
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val cancelRequest: PaymentCancel.Request = PaymentCancel.Request(
|
val cancelRequest: PaymentCancel.Request = PaymentCancel.Request(
|
||||||
paymentKey,
|
paymentKey,
|
||||||
amount,
|
amount,
|
||||||
cancelReason
|
cancelReason
|
||||||
)
|
)
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val cancelRequestJson: String = """
|
val cancelRequestJson: String = """
|
||||||
{
|
{
|
||||||
"cancelReason": "$cancelReason"
|
"cancelReason": "$cancelReason"
|
||||||
}
|
}
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val tossPaymentErrorJson: String = """
|
val tossPaymentErrorJson: String = """
|
||||||
{
|
{
|
||||||
"code": "ERROR_CODE",
|
"code": "ERROR_CODE",
|
||||||
@ -61,7 +51,6 @@ object SampleTossPaymentConst {
|
|||||||
}
|
}
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val confirmJson: String = """
|
val confirmJson: String = """
|
||||||
{
|
{
|
||||||
"mId": "tosspayments",
|
"mId": "tosspayments",
|
||||||
@ -127,7 +116,6 @@ object SampleTossPaymentConst {
|
|||||||
}
|
}
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
|
|
||||||
@JvmField
|
|
||||||
val cancelJson: String = """
|
val cancelJson: String = """
|
||||||
{
|
{
|
||||||
"mId": "tosspayments",
|
"mId": "tosspayments",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user