Created
March 11, 2024 21:42
-
-
Save LethalMaus/9d2e4d02022cdfa43c40f8f1b52c9947 to your computer and use it in GitHub Desktop.
monetization.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| override fun onPurchasesUpdated(billingResult: BillingResult, purchases: List<Purchase>?) { | |
| if (billingResult.responseCode == BillingResponseCode.OK && purchases != null) { | |
| for (purchase in purchases) { | |
| handlePurchase(purchase) | |
| } | |
| } else if (billingResult.responseCode == BillingResponseCode.USER_CANCELED) { | |
| // Handle an error caused by a user cancelling the purchase flow. | |
| } else { | |
| // Handle any other error codes. | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment