chargebee / chargebee-react-native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

restorePurchases doesn't work

zhulduz opened this issue · comments

Hi guys, I found out that in 2.4.4 version API restorePurchases doesn't work,
I also tried an example with own config credentials.

Could you please try also, maybe something missing in docs.

hi @zhulduz
Can you give us the error message/payload that you are seeing?
Also does this happen for both iOS and Android?

I have checked on iOS only, there wasn't any error.
The process starts but without any issues and without any results from callback function.

In the example below nothing happens after calling Chargebee.restorePurchases(...)

try {
  console.log('Restoring purchases for ', customer);
  const restoredSubscriptions = await Chargebee.restorePurchases(includeInActiveProducts, customer)
  console.log('Restored purchases', restoredSubscriptions);
} catch (error) {
  console.log('Restore Purchases failed', error);
}

@zhulduz If there aren't any errors returned, could it be because there are no active subscriptions found to restore?
If the problem still persist, can you reach out to us so that we can look into your specific case?

@cb-haripriyan Hello, I tried for different customers: with/without active subscriptions, the result the same.
Anyway, if customer doesn't have active subscriptions, the process should be stopped somehow, but in my cases nothing happens after calling Chargebee.restorePurchases: nor success logs, nor error logs.