AlexDisler / cordova-plugin-inapppurchase

A lightweight cordova plugin for in app purchases on iOS/Android
316 stars 192 forks source link

Question: Does this plugin support auto renewable subscriptions in iOS and Android? #212

Open ultisoftmeta opened 6 years ago

ultisoftmeta commented 6 years ago

Has anyone tried this plugin for auto-renewable subscriptions in iOS and Android? Thanks in advance for your response.

Defcon0 commented 6 years ago

It seems so. Since I have massive problems with https://github.com/j3k0/cordova-plugin-purchase I'll try this plugin on weekend.

ultisoftmeta commented 6 years ago

Thanks Defcon0 for your response. Are you trying for auto-renewable subscriptions? Which platforms?

Defcon0 commented 6 years ago

Yes, auto-renewable for iOS and Android.

ultisoftmeta commented 6 years ago

Thanks for your quick response. I need a favor. It will be great help if you can share your experience with this plugin for auto-renewable subscriptions. I request you to please give details about how are you validating subscriptions here? Thanks again for all your help.

Defcon0 commented 6 years ago

At the moment, I myself need help using this plugin since it leaves some critical questions open in my opinion. I already opened some tickets for this.

ultisoftmeta commented 6 years ago

Thanks for responding.

ultisoftmeta commented 6 years ago

I will be happy to help with any scenario you want me to try or test out. Please let me know. Thanks.

Textras commented 6 years ago

@Defcon0 which plugin did you prefer? I see many issues by you in both plugins. Would love your quick experience to save many hours of work.

Defcon0 commented 6 years ago

@Textras No problem, I can confirm that the implementation of the purchase plugins has been ... challenging ;-)

After all I ended up using this plugin here since its API is very much more straight forward. As an example: this plugin has one callback with the latest receipt (getReceipt()). In the plugin of j3k0 your validation function (which must contact your server to verify) is called for every purchase done before. Some of the receipt tokens result in outdated receipt data from the validation server of Apple's and you have to check every (even outdated) receipt token to check if an active subscription is in place.

In addition I had sporadic app crashes happening with j3k0/cordova-plugin-purchase which forced me to switch to this plugin here. So all in all I gave cordova-plugin-inapppurchase a try and it worked without issues at all (I can only speak for myself).

Now my app is live in Play Store and AppStore and subscriptions are working, it seems. At least I made two production environment subscriptions (with actual money transfer) with accounts not associated in any way to my dev account.

Since my app is unknown at the moment (not much promotion done due to time constraints ;-) ), I don't have any other subscriptions, but I didn't find a device not showing up my IAP products, yet.

ultisoftmeta commented 6 years ago

Thanks Defcon0 for sharing your experience and all the information. I really appreciate it.

I request your inputs as have few questions related to this plugin(cordova-plugin-inapppurchase).

1)How did you implement receipt validation here? Is it done according to following documentation? https://alexdisler.com/2016/03/20/validating-cordova-in-app-purchases-on-ios-and-android-using-nodejs/ 2) In this plugin, can we store receipt in our DB and chose when to call Validate? I mean if there is a way to store expiry date for a purchase in my DB then I will prefer to call Validate only when the subscription is getting expired rather than every time app loads. 3) Does restore purchase work here?

Thank you for your time