//public void TestSendReqPurchaseVault(Action<string, string> response, Action<string> timeout) //{ // PK.PurchaseVault.SendData data = new PK.PurchaseVault.SendData(); // //data.uid = USER.I.GetUserInfo().GetId(); // data.status = "completed"; // data.quantity = "1"; // data.currency = "USD"; // data.amount = "1.00"; // data.purchase_type = "vault"; // //data.product_url = productUrl; // int prID = UnityEngine.Random.Range(1, 10000000); // data.payment_id = prID; // data.signed_request = "test"; // PK.PurchaseVault.SEND command = new PK.PurchaseVault.SEND(PKID.PurchaseVault, data); // _NetSocket.SendData(xLitJson.JsonMapper.ToJson(command), PKID.PurchaseVault, response, timeout); //} //public void SendReqPurchaseVault(Action<string, string> response, Action<string> timeout, string productUrl, // GooglePlayReceipt google, AppleInAppPurchaseReceipt apple) //{ // if (CONFIG.IsRunningAndroid()) // { // PK.PurchaseVault.SendDataAndroid data = new PK.PurchaseVault.SendDataAndroid(); // data.status = "completed"; // data.currency = "USD"; // data.amount = 1.0; // data.quantity = "1"; // data.purchase_type = "coin"; // data.product_url = productUrl; // data.packageName = google.packageName; // data.productId = google.productID; // data.transactionID = google.transactionID; // data.purchaseTime = (double)google.purchaseDate.Ticks; // data.purchaseState = (int)google.purchaseState; // data.purchaseToken = google.purchaseToken; // PK.PurchaseVault.SENDAndroid command = new PK.PurchaseVault.SENDAndroid(PKID.PurchaseVaultAndroid, data); // _NetSocket.SendData(xLitJson.JsonMapper.ToJson(command), PKID.PurchaseVaultAndroid, response, timeout); // } // else if (CONFIG.IsRunningiOS()) // { // PK.PurchaseVault.SendDataIOS data = new PK.PurchaseVault.SendDataIOS(); // data.status = "completed"; // data.currency = "USD"; // data.quantity = "1"; // data.product_url = productUrl; // data.purchase_type = "coin"; // data.amount = 1.0; // data.receiptdata = apple.originalTransactionIdentifier; // PK.PurchaseVault.SENDIOS command = new PK.PurchaseVault.SENDIOS(PKID.PurchaseVaultIOS, data); // _NetSocket.SendData(xLitJson.JsonMapper.ToJson(command), PKID.PurchaseVaultIOS, response, timeout); // } //} public void TestSendReqWheelPurchase(Action <string, string> response, Action <string> timeout, string productUrl) { PK.WheelPurchase.SendData data = new PK.WheelPurchase.SendData(); data.status = "completed"; data.quantity = "1"; data.currency = "USD"; data.amount = "1.00"; data.purchase_type = "coin"; data.product_url = productUrl; int prID = UnityEngine.Random.Range(1, 10000000); data.payment_id = prID; data.signed_request = "test"; PK.WheelPurchase.SEND command = new PK.WheelPurchase.SEND(PKID.WheelPurchase, data); _NetSocket.SendData(xLitJson.JsonMapper.ToJson(command), PKID.WheelPurchase, response, timeout); }