Skip to content

Commit

Permalink
InAppBilling
Browse files Browse the repository at this point in the history
  • Loading branch information
epegasus committed Jul 22, 2024
1 parent 7a35c72 commit 16c6735
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ open class BillingRepository(context: Context) {
response.isOk -> {
Result.setResultState(ResultState.PURCHASING_SUCCESSFULLY)
handlePurchase(purchasesList)
fetchPurchases()
//fetchPurchases()
return@PurchasesUpdatedListener
}

Expand Down Expand Up @@ -630,22 +630,23 @@ open class BillingRepository(context: Context) {

// State = PURCHASE
Result.setResultState(ResultState.PURCHASING_SUCCESSFULLY)
onPurchaseResultMain(true, ResultState.PURCHASE_CONSUME.message)

if (purchase.isAcknowledged) {
onPurchaseResultMain(true, ResultState.PURCHASING_SUCCESSFULLY.message)
//onPurchaseResultMain(true, ResultState.PURCHASING_SUCCESSFULLY.message)
} else {
if (isConsumable) {
queryUtils.checkForAcknowledgementsAndConsumable(purchasesList) {
if (it) {
Result.setResultState(ResultState.PURCHASE_CONSUME)
onPurchaseResultMain(true, ResultState.PURCHASE_CONSUME.message)
//onPurchaseResultMain(true, ResultState.PURCHASE_CONSUME.message)
} else {
Result.setResultState(ResultState.PURCHASE_FAILURE)
onPurchaseResultMain(false, ResultState.PURCHASE_FAILURE.message)
//onPurchaseResultMain(false, ResultState.PURCHASE_FAILURE.message)
}
}
} else {
onPurchaseResultMain(true, ResultState.PURCHASING_SUCCESSFULLY.message)
//onPurchaseResultMain(true, ResultState.PURCHASING_SUCCESSFULLY.message)
queryUtils.checkForAcknowledgements(purchasesList)
}
}
Expand Down

0 comments on commit 16c6735

Please sign in to comment.