RevenueCat / purchases-android

Android in-app purchases and subscriptions made easy.
https://www.revenuecat.com/
MIT License
247 stars 50 forks source link

[WIP] paywall custom purchase #1776

Closed jamesrb1 closed 3 months ago

jamesrb1 commented 3 months ago

Callbacks are added to the PaywallViewModel in a new model struct MyAppPurchaseLogic, via itsPaywallOptions.

When the VM's purchase/restore methods are called, the MyAppPurchaseLogic struct (which holds the purchase/restore handlers) is passed down to the purchase orchestrator that calls the customer handlers if finishTransactions is false, skipping its built-in logic.

RevenueCat-Danger-Bot commented 3 months ago
1 Error
:no_entry_sign: Label the PR using one of the change type labels
Label Description
breaking Changes that are breaking
build Changes that affect the build system
ci Changes to our CI configuration files and scripts
docs Documentation only changes
feat A new feature
fix A bug fix
perf A code change that improves performance
RevenueCatUI A change to the RevenueCatUI library
refactor A code change that neither fixes a bug nor adds a feature
style Changes that don't affect the meaning of the code (white-space, formatting, missing semi-colons, etc
test Adding missing tests or correcting existing tests
next_release Preparing a new release
dependencies Updating a dependency
phc_dependencies Updating purchases-hybrid-common dependency

Generated by :no_entry_sign: Danger

jamesrb1 commented 3 months ago

Created a new branch from earlier in this series of commits based off advice received here https://revenuecat.slack.com/archives/C03HPN9UE80/p1720051171704469