Compare commits

..

No commits in common. "300f784f7d5c4b837a3c75e15b82097f7519084b" and "67a045eae629e36ac618aa6c178a921f7a85727d" have entirely different histories.

1 changed files with 21 additions and 26 deletions

View File

@ -210,35 +210,30 @@ class ChargeService(
?: throw SodaException("로그인 정보를 확인해주세요.")
if (charge.payment!!.paymentGateway == PaymentGateway.GOOGLE_IAP) {
try {
androidPublisher.purchases().products()
.consume("kr.co.vividnext.sodalive", request.productId, request.purchaseToken)
.execute()
androidPublisher.purchases().products()
.consume("kr.co.vividnext.sodalive", request.productId, request.purchaseToken)
.execute()
val response = androidPublisher.purchases().products()
.get("kr.co.vividnext.sodalive", request.productId, request.purchaseToken)
.execute() ?: throw SodaException("결제정보에 오류가 있습니다.")
if (
response.purchaseState == 0 &&
response.consumptionState == 1 &&
charge.payment?.status == PaymentStatus.REQUEST
) {
charge.payment?.receiptId = response.purchaseToken
charge.payment?.method = "구글(인 앱 결제)"
charge.payment?.status = PaymentStatus.COMPLETE
member.charge(charge.chargeCan, charge.rewardCan, "aos")
val response = androidPublisher.purchases().products()
.get("kr.co.vividnext.sodalive", request.productId, request.purchaseToken)
.execute() ?: throw SodaException("결제정보에 오류가 있습니다.")
if (
response.purchaseState == 0 &&
response.consumptionState == 1 &&
charge.payment?.status == PaymentStatus.REQUEST
) {
charge.payment?.receiptId = response.purchaseToken
charge.payment?.method = "구글(인 앱 결제)"
charge.payment?.status = PaymentStatus.COMPLETE
member.charge(charge.chargeCan, charge.rewardCan, "aos")
applicationEventPublisher.publishEvent(
ChargeSpringEvent(
chargeId = charge.id!!,
memberId = member.id!!
)
applicationEventPublisher.publishEvent(
ChargeSpringEvent(
chargeId = charge.id!!,
memberId = member.id!!
)
} else {
throw SodaException("결제정보에 오류가 있습니다.")
}
} catch (e: Exception) {
e.printStackTrace()
)
} else {
throw SodaException("결제정보에 오류가 있습니다.")
}
} else {