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

Don't auto finish transactions #444

Merged
merged 7 commits into from
Feb 13, 2022

Conversation

jamesmontemagno
Copy link
Owner

Give ability to turn it on though if we want to for back compat for non-consumeables.

Please take a moment to fill out the following:

Fixes #414.

Changes Proposed in this pull request:

  • Add back compat to auto finish ios transactions
  • Consume on iOS now calls Finish
  • Finish still finishes on iOS, but would need to be called for all of them

Give ability to turn it on though if we want to for back compat for non-consumeables.
@edgiardina
Copy link

It's been a while since I've had this top of mind, so forgive me if the answer is obvious, but shouldn't we just finish all non-consumable transactions automatically, and if the product is consumable on apple, then Finish the transaction when ConsumePurchaseAsync is called, like in android? Or am I missing something?

@jamesmontemagno
Copy link
Owner Author

Yes, I would have to know if your transaction is consumable or not... else maybe I pass in a flag... let me see here

@jamesmontemagno
Copy link
Owner Author

The other ting is that I also Finish all transactions on restore as well as that was a recommended pattern...

@jamesmontemagno
Copy link
Owner Author

Alright... so check the code now...

I introduced a new ItemType of Consumable. If it is consumable then we don't autofinish the transaction.

Now on restore it is tricky. I am goign to make the getpurchases take in a list of ids not to finish. so a bit of work, but I think smoother

@jamesmontemagno
Copy link
Owner Author

@edgiardina now finished with the implementation. let me know what you think there.

I also updated documentation

@jamesmontemagno jamesmontemagno merged commit f162268 into productdiscounts Feb 13, 2022
@jamesmontemagno jamesmontemagno deleted the update-finishtransaction branch April 12, 2022 21:08
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

Successfully merging this pull request may close these issues.

None yet

2 participants