Compare commits

...

4 Commits

Author SHA1 Message Date
klaus ff255dbfae Merge pull request 'test' (#207) from test into main
Reviewed-on: #207
2024-08-27 07:31:05 +00:00
Klaus c8d7bdb8b7 pg 결제
- pg사가 카카오페이이면 "카카오페이-'결제수단'"으로 기록
2024-08-27 16:24:17 +09:00
Klaus bb897fe965 pg 결제
- 결제수단 pg사 이름으로 추가
2024-08-27 16:14:29 +09:00
Klaus 1551e3231c pg 결제
- pg 사 기록시 pg로 기록하지 않고 결제에서 받아오는 pg사 이름으로 수정
2024-08-27 16:04:20 +09:00
2 changed files with 6 additions and 1 deletions

View File

@ -18,6 +18,7 @@ data class VerifyResult(
@JsonProperty("receipt_id") @JsonProperty("receipt_id")
val receiptId: String, val receiptId: String,
val method: String, val method: String,
val pg: String,
val status: Int, val status: Int,
val price: Int val price: Int
) )

View File

@ -160,7 +160,11 @@ class ChargeService(
if (verifyResult.status == 1 && verifyResult.price == charge.can?.price) { if (verifyResult.status == 1 && verifyResult.price == charge.can?.price) {
charge.payment?.receiptId = verifyResult.receiptId charge.payment?.receiptId = verifyResult.receiptId
charge.payment?.method = verifyResult.method charge.payment?.method = if (verifyResult.pg.contains("카카오")) {
"${verifyResult.pg}-${verifyResult.method}"
} else {
verifyResult.method
}
charge.payment?.status = PaymentStatus.COMPLETE charge.payment?.status = PaymentStatus.COMPLETE
member.charge(charge.chargeCan, charge.rewardCan, "pg") member.charge(charge.chargeCan, charge.rewardCan, "pg")