chargebee / chargebee-react-native

MIT License
8 stars 15 forks source link

restorePurchases doesn't work #168

Open zhulduz opened 7 months ago

zhulduz commented 7 months ago

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.

cb-haripriyan commented 7 months ago

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

zhulduz commented 7 months ago

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);
}
cb-haripriyan commented 7 months ago

@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?

zhulduz commented 7 months ago

@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.