Android/Ios in-app billing. unique ID -
i made cordova 3.3 app android , ios, , want sell premium version permit save settings , data every on distant database easy recovery if change phones.
initially thought google/apple account email seems not possible.
so thought need unique id item purchased should use userid on distant database.
i use plugin android: https://github.com/poiuytrez/androidinappbilling/tree/master/v3
so, inappbilling.buy(success, fail, productid) , inappbilling.getpurchases(success, fail) both return json object 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 confirm me orderid strictly unique on android? (with source link or proof pls) ?
i have same issue on ios, know if value can make deal on ios? can't see return value of restore function in plugin: https://github.com/j3k0/phonegap-inapppurchase-ios
if it's ok both, regist id : "android_" + orderid or "ios_" + ??? user id
ok found answer on ref... sorry. http://developer.android.com/google/play/billing/billing_reference.html
"orderid : unique order identifier transaction. corresponds google wallet order id." think it's ok android. on ios ref.
if think better idea case, feel free add answer.
Comments
Post a Comment