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

Calling #loadProducts with different productId resets previously loaded products #212

Open
pfeiffer opened this issue Aug 1, 2019 · 0 comments

Comments

@pfeiffer
Copy link

pfeiffer commented Aug 1, 2019

We're seeing an error with 'invalid_product', and digging into the issue, it seems that calling loadProducts multiple times does not add the new products to the cached products, but rather resets it.

Say you load your main products upon app load:

InAppUtils.loadProducts(['product1', 'product2'], ..)

.. and then later on in a different part of the app load another product:

InAppUtils.loadProducts(['another_product'], ..)

Now trying to purchase product1 will result in an invalid_product error, even though the product is perfectly valid and purchasable.

The reason is that the productsRequest:request didReceiveResponse:response delegate does not merge in the newly fetched products with the previously fetched products.

I would expect this to have been the case.

My guess is that this is causing a lot of issue with invalid_product that are still both open and closed here in the issue list.

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

1 participant