#When I purchase consumable from iOS (Testflight internal testing) I got same transactionId.

1 messages · Page 1 of 1 (latest)

full flume
#

I wanna validate purchases on my server, but I got same transactionId each time I purchase until restart app and after restart first transactionId is unique. This is not good if I face same behavior in production. Will apple provide unique ID for each consumable purchase?

full flume
#

It is not even same TransitionId it is not add new purchase after first one done in game session, the purchases list have same elements count.

full flume
#

I use internal testing when I open app and do purchase it is sending correct values but all next purchases retun the same list I got from first one. Is it Sandbox bug or Sandbox working exactly as production? there is my code here

{
    var requestJson = new JObject
    {
        ["receipt-data"] = base64Receipt,
        ["password"] = SharedSecret
    };

    var content = new StringContent(requestJson.ToString(), Encoding.UTF8, "application/json");

    // First try production
    var response = await client.PostAsync(ProductionUrl, content);
    var json = JObject.Parse(await response.Content.ReadAsStringAsync());

    int status = (int)json["status"];

    if (status == 21007) // Receipt from sandbox
    {
        response = await client.PostAsync(SandboxUrl, content);
        json = JObject.Parse(await response.Content.ReadAsStringAsync());
        status = (int)json["status"];
        Debug.Log("status=" + status);
    }
    Debug.Log("status=" + status);
    if (status != 0)
        return null;

    // Get the last in-app purchase
    var latestReceipt = json["receipt"]?["in_app"]?.Last;
    var returnValue = new List<AppleReceipts>();
    foreach (var r in json["receipt"]?["in_app"])
    {
        returnValue.Add(new AppleReceipts(r["transaction_id"]?.ToString(), r["product_id"]?.ToString()));
    }
    return returnValue;
}```
 Receipt i get from Unity3d PendingOrder order.Info.Apple.AppReceipt
paper patrol
#

There’s no mystery here, the product wasn’t correctly configured as a consumable
Also, your code looks very odd.

full flume
#

Do you know how to configure it correctly?