- Home /
IAP return {"status":21002}
Hi, I use unity iap to work in unity5.3
i have a problom,
when i get receipt from payload,and Send Receipt Data to App Store,
always return {"status":21002}
This is my code:
SimpleJson.JsonObject jsonObject = SimpleJson.SimpleJson.DeserializeObject(json) as SimpleJson.JsonObject; string data = jsonObject["Payload"].ToString();
byte[] recBytes = System.Text.Encoding.UTF8.GetBytes(data); string receipt = Convert.ToBase64String(recBytes);
SimpleJson.JsonObject obj = new SimpleJson.JsonObject(); obj.Add("receipt-data",receipt); string sendJson = SimpleJson.SimpleJson.SerializeObject(obj);
WWWForm wwwForm = new WWWForm(); wwwForm.AddField("receipt",sendJson); WWW www = new WWW("https://sandbox.itunes.apple.com/verifyReceipt", wwwForm);
when i use
string data = jsonObject["Payload"].ToString(); obj.Add("receipt-data",receipt);
it’s same
something am i wrong?
I got it!!!!
Don't Deserialize json data!! Don't use www to validation receipt!!!
www always return {"status":21002}
Hi, @jevin05 I got the same problem. How can you get the string payload when you didn't deserialize it? And what did you use then after you didn't use www?
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
iOS Restoring Purchases through Playfab 0 Answers
How to access receipt product with codeless IAP 0 Answers
Can't set ProductID of IAPButton 0 Answers