android-browser-helper icon indicating copy to clipboard operation
android-browser-helper copied to clipboard

Support subscription upgrades/downgrades for Play Billing

Open ibrahimkarahan opened this issue 4 years ago • 3 comments

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.

ibrahimkarahan avatar Feb 08 '21 20:02 ibrahimkarahan

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'?

rwolski avatar Mar 02 '21 01:03 rwolski

alpha06 was released yesterday: https://maven.google.com/web/index.html?q=#com.google.androidbrowserhelper:billing:1.0.0-alpha06

andreban avatar Mar 02 '21 15:03 andreban

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

rwolski avatar Mar 03 '21 01:03 rwolski