generated from pricelees/issue-pr-template
feat: TosspayClient에 소요시간 로그 추가
This commit is contained in:
parent
a64371b3d2
commit
6fe3945129
@ -29,13 +29,13 @@ class TosspayClient(
|
||||
orderId: String,
|
||||
amount: Int,
|
||||
): PaymentClientConfirmResponse {
|
||||
val startTime = System.currentTimeMillis()
|
||||
log.info { "[TosspayClient.confirm] 결제 승인 요청: paymentKey=$paymentKey, orderId=$orderId, amount=$amount" }
|
||||
|
||||
return confirmClient.request(paymentKey, orderId, amount)
|
||||
.also {
|
||||
log.info { "[TosspayClient.confirm] 결제 승인 완료: response=$it" }
|
||||
log.info { "[TosspayClient.confirm] 결제 승인 완료: duration_ms=${System.currentTimeMillis() - startTime}ms, paymentKey=$paymentKey" }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun cancel(
|
||||
@ -43,10 +43,11 @@ class TosspayClient(
|
||||
amount: Int,
|
||||
cancelReason: String
|
||||
): PaymentClientCancelResponse {
|
||||
val startTime = System.currentTimeMillis()
|
||||
log.info { "[TosspayClient.cancel] 결제 취소 요청: paymentKey=$paymentKey, amount=$amount, cancelReason=$cancelReason" }
|
||||
|
||||
return cancelClient.request(paymentKey, amount, cancelReason).also {
|
||||
log.info { "[TosspayClient.cancel] 결제 취소 완료: response=$it" }
|
||||
log.info { "[TosspayClient.cancel] 결제 취소 완료: duration_ms=${System.currentTimeMillis() - startTime}ms, paymentKey=$paymentKey" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user