purchases-android icon indicating copy to clipboard operation
purchases-android copied to clipboard

Allow passing old purchase id and GoogleReplacementMode to paywalls purchase flow

Open AlexGrafl opened this issue 3 weeks ago • 0 comments

Checklist

  • [x] If applicable, unit tests
  • [ ] If applicable, create follow-up issues for purchases-ios and hybrids

Motivation

As per this issue #2479 , setting the GoogleReplacementMode is currently not possible when using Paywalls v2. This PR allows developers to change the proration mode and pass the old purchase id to the purchasing flow.

Description

  • Add new ReplaceProductData data class
  • Pass data to PurchaseParamsBuilder on purchase
  • Extend PaywallOptions and PaywallDialogOptions to support new parameter
  • Add tests in PaywallViewModelTest to verify correct parameters are passed to purchase flow

AlexGrafl avatar Dec 02 '25 16:12 AlexGrafl