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

Payments made in Background #12

Open
benedictstrube opened this issue Nov 29, 2021 · 2 comments
Open

Payments made in Background #12

benedictstrube opened this issue Nov 29, 2021 · 2 comments

Comments

@benedictstrube
Copy link

benedictstrube commented Nov 29, 2021

First of all: awesome job to have an official payment library, much needed, thank you for that!

First question: does the plugin supports purchases made in background? E.g. it is possible to redeem offer codes in the respective stores what triggers a purchase event as soon as the app starts. Is it sufficient to connect to the observable right after app start to retrieve those events triggered in background opposed to those triggered in the app by a user?

Second: Also I would highly appreciate some documentation on the purpose of the different values of PaymentEvent.Context (especially FINALIZING_ORDER and CONNECTING_STORE).

Third: How would you rate the state of development of the plugin regarding test coverage and open (internal) issues? We currently use the ProPlugin purchase plugin and consider switching to this one since it is more up to date and we have ongoing issues with the ProPlugin implementation.

Thank you so much for the effort put into this!

@edusperoni
Copy link
Collaborator

edusperoni commented Dec 7, 2021

  1. should work on android (it restores purchases during the CONNECTING_STORE flow) , not 100% sure on iOS. Best approach is to, after init, call restoreOrders in both cases.
  2. You need to finalize orders (hence FINALIZING_ORDER) so that the stores know that the product is consumed (Android automatically refunds non-finalized orders). CONNECTING_STORE is the flow called after you init the library (success means it successfully bound the delegates and connected to the stores)
  3. I'm currently using it in production apps, and I know others are too.

@benedictstrube
Copy link
Author

Thank you very much for your detailed reply, very much appreciated! Is consuming the product also a thing for auto-renewable subscriptions or only for one time purchases?

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

No branches or pull requests

2 participants