Skip to content

Commit

Permalink
Merge pull request #46 from epegasus/master
Browse files Browse the repository at this point in the history
InAppBilling
  • Loading branch information
hypersoftdev authored Jul 22, 2024
2 parents 7a35c72 + 16c6735 commit c8a47a5
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 c8a47a5

Please sign in to comment.