Skip to content
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

Provide the package in the paywallFooter closures like PurchaseOrRestoreCompletedHandler, PurchaseCancelledHandler or PurchaseFailureHandler #4017

Open
alpennec opened this issue Jul 3, 2024 · 3 comments

Comments

@alpennec
Copy link

alpennec commented Jul 3, 2024

Hello,

I'm using the paywallFooter ViewModifier in my SwiftUI app.
I want to track some analytics regarding the package being purchased.

As of today, we don't have access to this package in all closures, it's only available in the PurchaseOfPackageStartedHandler.
Can you please add the package in the PurchaseOrRestoreCompletedHandler, PurchaseCancelledHandler and PurchaseFailureHandler?

Thanks,
Axel

@mshmoustafa
Copy link
Contributor

Hey @alpennec,
I'll ask the engineering team if we can add the package to PurchaseFailureHandler and PurchaseCancelledHandler, but I'm curious how you would want the package to be added to PurchaseOrRestoreCompletedHandler. The restore operation is not package specific. Purchases of none, one, or some products might be restored as a result of restorePurchases and it's also not always possible to map purchases of products to packages since you typically don't need to display an offering in order to restore purchases. Was there something you had in mind for PurchaseOrRestoreCompletedHandler?

@alpennec
Copy link
Author

Hey @mshmoustafa,

Thanks for answering.

You're right, the PurchaseOrRestoreCompletedHandler when restoring is not package specific. But is it necessary that this handler is used for both purchase success and restore success? I would imagine a PurchaseCompletedHandler and a PurchasesRestoredHandler that could be used for specific logic. Like I want to show a specific success alert to my users when they purchase and another one when they restore. This is not necessarily the same logic in apps.

Thanks.
Axel

@joshdholtz
Copy link
Member

I think this request make sense! I'll add to our list of things to get to 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants