AlexDisler / cordova-plugin-inapppurchase

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

[Android] How to pass in Android developer payload and oldPurchasedSkus (i.e. extra data)? #215

Open Defcon0 opened 6 years ago

Defcon0 commented 6 years ago

Hello,

I have a backend where users can create an account.

Since this is essential in order to avoid restoring subscription purchases for more than one account in my backend service: How can I pass in Android developer payload and oldPurchasedSkus (i.e. extra data) to the Android subscribe interface?

I see in the Android code this is already implemented but I can't see any chance in the JavaScript.

Thanks in advance.

Bye Defcon0

lincolnthree commented 6 years ago

I also need to know how to do this. @Defcon0 did you ever figure out a solution? Thanks!

Defcon0 commented 6 years ago

Unfortunately not. @AlexDisler doesn’t seem to maintain this repo anymore. What a shame!

I ended up using this plugin only for iOS and the other one for Android. Not cool but working.

lincolnthree commented 6 years ago

:( Yeah. I'm spending the day trying to figure out https://github.com/j3k0/cordova-plugin-purchase

API is a bit more opaque, but seems like it handles the necessities for recurring subscriptions.

lincolnthree commented 6 years ago

@Defcon0 Is that the plugin you ended up using on Android?

Defcon0 commented 6 years ago

Yup this it. But the plugin threw exceptions over exceptions on iOS for me so I had to use this plugin here for iOS

lincolnthree commented 6 years ago

Oh boy :(

Defcon0 commented 6 years ago

Yup, purchase was by far the most annoying part of the app development. Hopefully we don‘t get some api change and these plugins don’t work anymore