android-browser-helper
android-browser-helper copied to clipboard
Support subscription upgrades/downgrades for Play Billing
Play Billing normally supports subscription upgrades and downgrades on Android: https://developer.android.com/google/play/billing/subscriptions#change
On Android, this is done by passing the old SKU and the associated purchaseToken when building the BillingFlow:
Android also allows specifying the proration mode in the same flow with setReplaceSkusProrationMode.
Developers can pass old SKU and the proration mode with Payment Request API on Web, but Android Browser Helper isn't set up to consume them yet.
Android Browser Helper should read these optional field when constructing the BillingFlow in PlayBillingWrapper.java
See https://bugs.chromium.org/p/chromium/issues/detail?id=1169203#c1 for implementation.
I see that a PR for this was completed a few weeks ago. @ibrahimkarahan @PEConn do you have any idea when this will be available in 'androidbrowserhelper:billing'?
alpha06
was released yesterday: https://maven.google.com/web/index.html?q=#com.google.androidbrowserhelper:billing:1.0.0-alpha06
I have tried the latest package and found an invalid dependency in the package pom file, which causes the build to break. We are trying a workaround to exclude the invalid dependency so we can test upgrades. The issue is logged as https://github.com/GoogleChrome/android-browser-helper/issues/267