-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support BC7 #1737
Support BC7 #1737
Conversation
Adds the minimum required changes to be able to compile with BC7. - Bumps the version to `8.0.0-SNAPSHOT`. - Bumps the `minSdkVersion` to 21 (Android 5.0). - `UpgradeInfo` now takes a `ReplacementMode` instead of the now-removed `ProrationMode`. - Removed the deprecated `GoogleProrationMode`, as it was using the now-removed `ProrationMode`. - Removes deprecated `StoreTransaction` constructor taking a `GoogleProrationMode`. - Removes `PurchaseParams.Builder.googleProrationMode()`. - Uses Billing Library `7.0.0`. - Added `GoogleReplacementModeAPI.java`
### Description This exposes the info for installment plans so developers can use it. The new API looks like: - New `InstallmentsInfo` interface with `commitmentPaymentsCount` and `subsequentCommitmentPaymentsCount` fields. - New `GoogleInstallmentsInfo` data class implementing previous interface. - New method in `SubscriptionOption`/`GoogleSubscriptionOption` exposing the installments info.
PR to support pending prepaid purchase as a new feature added in BC7. This will be enabled by default but can be disabled through an option in `PurchasesConfiguration`: `pendingTransactionsForPrepaidPlansEnabled `.
Generated by 🚫 Danger |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 8.0.0-dev #1737 +/- ##
============================================
Coverage ? 82.99%
============================================
Files ? 222
Lines ? 7576
Branches ? 1070
============================================
Hits ? 6288
Misses ? 872
Partials ? 416 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -51,7 +51,7 @@ Or view / build our Android sample app: | |||
## Requirements | |||
- Java 8+ | |||
- Kotlin 1.5.0+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh do we need to update this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh good catch! Will update that since I'm writing the migration docs.
@@ -277,6 +277,7 @@ class Purchases internal constructor( | |||
val configuration = PurchasesConfiguration.Builder(context, apiKey) | |||
.appUserID(appUserID) | |||
.dangerousSettings(DangerousSettings(customEntitlementComputation = true)) | |||
.pendingTransactionsForPrepaidPlansEnabled(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this always true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we want to enable it by default for companies using customEntitlementComputation
. We can provide an option to disable it later if needed though, but we try to keep the API very small in the customEntitlementComputation
flavor I think.
For a full migration guide check [v8-MIGRATION.md](migrations/v8-MIGRATION.md) ### Breaking Changes * Support BC7 (#1737) via Toni Rico (@tonidero) #### New APIs: - `SubscriptionOption.installmentInfo` which contains information about installment plans you might want to display in your paywall. - `PurchasesConfiguration.pendingTransactionsForPrepaidPlansEnabled` allows to enable pending prepaid subscriptions. #### Breaking changes - Increase min Sdk to 21. This was increased in BC7 - Increase min kotlin version to 1.7.0 - Remove `UpgradeInfo` - Remove all `purchasePackage` and `purchaseProduct` methods using `UpgradeInfo`. If you want to perform upgrades/downgrades, please migrate to use the `purchase(PurchaseParams)` method, which has options to perform that operation. ### Other Changes * Bump kotlin to 1.8 (#1726)
Description
This PR adds support for BC7 and related new features.
New APIs:
SubscriptionOption.installmentInfo
which contains information about installment plans you might want to display in your paywall.PurchasesConfiguration.pendingTransactionsForPrepaidPlansEnabled
allows to enable pending prepaid subscriptions.Breaking changes
UpgradeInfo
purchasePackage
andpurchaseProduct
methods usingUpgradeInfo
. If you want to perform upgrades/downgrades, please migrate to use thepurchase(PurchaseParams)
method, which has options to perform that operation.