Compare commits
5 Commits
d3222ce083
...
2a79903a28
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a79903a28 | |||
| 34b5dcccfc | |||
| 4023476685 | |||
| df690dae0e | |||
| d17f76261e |
@@ -213,8 +213,15 @@ class ChargeService(
|
|||||||
val response = androidPublisher.purchases().products()
|
val response = androidPublisher.purchases().products()
|
||||||
.get("kr.co.vividnext.sodalive", request.productId, request.purchaseToken)
|
.get("kr.co.vividnext.sodalive", request.productId, request.purchaseToken)
|
||||||
.execute() ?: throw SodaException("결제정보에 오류가 있습니다.")
|
.execute() ?: throw SodaException("결제정보에 오류가 있습니다.")
|
||||||
|
if (
|
||||||
|
response.purchaseState == 0 &&
|
||||||
|
response.consumptionState == 0 &&
|
||||||
|
charge.payment?.status == PaymentStatus.REQUEST
|
||||||
|
) {
|
||||||
|
androidPublisher.purchases().products()
|
||||||
|
.consume("kr.co.vividnext.sodalive", request.productId, request.purchaseToken)
|
||||||
|
.execute() ?: throw SodaException("결제정보에 오류가 있습니다.")
|
||||||
|
|
||||||
if (response.purchaseState == 0 && charge.payment?.status == PaymentStatus.REQUEST) {
|
|
||||||
charge.payment?.receiptId = response.purchaseToken
|
charge.payment?.receiptId = response.purchaseToken
|
||||||
charge.payment?.method = "구글(인 앱 결제)"
|
charge.payment?.method = "구글(인 앱 결제)"
|
||||||
charge.payment?.status = PaymentStatus.COMPLETE
|
charge.payment?.status = PaymentStatus.COMPLETE
|
||||||
|
|||||||
Reference in New Issue
Block a user