diff --git a/chargebee/build.gradle b/chargebee/build.gradle index a186d1a..838961e 100644 --- a/chargebee/build.gradle +++ b/chargebee/build.gradle @@ -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" diff --git a/chargebee/src/main/java/com/chargebee/android/billingservice/CBPurchase.kt b/chargebee/src/main/java/com/chargebee/android/billingservice/CBPurchase.kt index d839966..34e871f 100644 --- a/chargebee/src/main/java/com/chargebee/android/billingservice/CBPurchase.kt +++ b/chargebee/src/main/java/com/chargebee/android/billingservice/CBPurchase.kt @@ -16,7 +16,7 @@ import com.chargebee.android.resources.ReceiptResource object CBPurchase { private var billingClientManager: BillingClientManager? = null - val productIdList = arrayListOf() + val productIdList = mutableSetOf() private var customer: CBCustomer? = null internal var includeInActivePurchases = false internal var productType = OneTimeProductType.UNKNOWN @@ -305,7 +305,7 @@ object CBPurchase { } } - completion(CBProductIDResult.ProductIds(productIdList)) + completion(CBProductIDResult.ProductIds(ArrayList(productIdList))) } is ChargebeeResult.Error -> { Log.e( @@ -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(