i made a cordova 3.3 app for Android and Ios, and i want to sell a premium version that permit to save settings and data for every on my distant database for an easy recovery if they change their phones.
Initially i thought to get their google/apple account email but it seems to not be possible.
So i thought that i just need an unique ID from the item purchased that i should use as an userID on my distant database.
I use this plugin for android: https://github.com/poiuytrez/AndroidInAppBilling/tree/master/v3
So, the inappbilling.buy(success, fail, productId) and inappbilling.getPurchases(success, fail) both return a json object like this ex:
{"orderId":"12999763169054705758.1385463868367493", "packageName":"com.example.myPackage", "productId":"example_subscription", "purchaseTime":1397590291362, "purchaseState":0, "purchaseToken":"ndglbpnjmbfccnaocnppjjfa.AO-J1Ozv857LtAk32HbtVNaK5BVnDm9sMyHFJkl-R_hJ7dCSVTazsnPGgnwNOajDm-Q3DvKEXLRWQXvucyW2rrEvAGr3wiG3KnMayn5yprqYCkMNhFl4KgZWt-4-b4Gr29_Lq8kcfKCkI57t5rUmFzTdj5fAdvX5KQ"}
Can someone confirm me than orderId is strictly unique on android? (with source link or proof pls) ?
I will have the same issue on Ios, so do you know a if a value will can make the deal on Ios? I can't see the return value of the restore function in this plugin: https://github.com/j3k0/PhoneGap-InAppPurchase-iOS
If it's ok for both, i could regist an ID like this : "android_" + orderId Or "ios_" + ??? as user ID