-
Notifications
You must be signed in to change notification settings - Fork 8
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
How does restorePurchases()
determine the correct chargebee customer?
#79
Comments
Speculation: |
Can someone please look at this? |
@ciriousjoker Thanks for raising the issue, we will fix this for flutter soon. |
@cb-anurags
|
@ciriousjoker |
Im specifically talking about this function: We call that package's restore purchase functionality which gives us all the receipts in a stream. This is our way to ensure that users get access to the app even chargebee has the incorrect status. In the past we tried relying on Chargebee alone but that lead to trust issues because lots of customer complained due to incorrect data and we therefore decided to keep the fallback mechanism permanently. |
@ciriousjoker That method should restore the user subscriptions and return the stream of purchase tokens/receipts. |
@cb-haripriyan |
I was just wondering if the stream is also picked up by the Chargebee sdk and since we don't pass a customer id anywhere it might break something. |
@cb-haripriyan |
@ciriousjoker We have released a patch today with the 0.4.2 version, which takes in the customer object and restores the subscriptions. Would you be able to give it a try and let us know if this works? |
@cb-haripriyan perfect, thanks for the investigation and the quick fix! We'll roll out an update over the coming days. Unfortunately it'll be hard to evaluate if the error comes back since there's no way to find affected users directly, users just contacted our support with the issue. |
@cb-haripriyan I've reviewed the v1.0.28 of the ios sdk as well as the v0.4.2 of the flutter sdk. I couldn't find any code that prevents the ios callback from being called in cases where the What am I missing here. We cannot call Chargebee's sdk method directly, we need to call the method from |
@ciriousjoker The version 0.4.2 fixes the originally raised issue which was that the Now with regards to using Also when the A couple of workarounds I can think of right now:
|
@cb-haripriyan However, one change I would suggest for the Chargebee sdk on iOS is this:
This would make the sdk more robust. Unfortunately we can't fork the iOS sdk directly, but I can create a PR nonetheless if you'd like me to. |
@ciriousjoker Thanks for the input. |
As per ios sdk documentation:
The ios sdk requires a customer, but the flutter sdk doesn't. How is that possible?? If we call this function without a customer, which customer is the subscription restored to?
The text was updated successfully, but these errors were encountered: