Skip to content

Commit

Permalink
Merge pull request #89 from cb-venkateshravichandran/feat/retrieve-pr…
Browse files Browse the repository at this point in the history
…oducts-bl5

ProductsList changes for Billing Library 5 support
  • Loading branch information
cb-haripriyan committed Oct 9, 2023
2 parents c721f27 + e6a1430 commit 7a1901b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion chargebee/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0.25"
versionName "1.1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import com.chargebee.android.resources.ReceiptResource
object CBPurchase {

private var billingClientManager: BillingClientManager? = null
val productIdList = arrayListOf<String>()
val productIdList = mutableSetOf<String>()
private var customer: CBCustomer? = null
internal var includeInActivePurchases = false
internal var productType = OneTimeProductType.UNKNOWN
Expand Down Expand Up @@ -305,7 +305,7 @@ object CBPurchase {

}
}
completion(CBProductIDResult.ProductIds(productIdList))
completion(CBProductIDResult.ProductIds(ArrayList(productIdList)))
}
is ChargebeeResult.Error -> {
Log.e(
Expand All @@ -326,9 +326,10 @@ object CBPurchase {
val productsList = (it.data as ItemsWrapper).list
productIdList.clear()
for (item in productsList) {
productIdList.add(item.item.id)
val id = item.item.id.split("-")
productIdList.add(id[0])
}
completion(CBProductIDResult.ProductIds(productIdList))
completion(CBProductIDResult.ProductIds(ArrayList(productIdList)))
}
is ChargebeeResult.Error -> {
Log.e(
Expand Down

0 comments on commit 7a1901b

Please sign in to comment.