Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

iOS receipt

Discussion in 'Unity IAP' started by Galimski, Jun 30, 2020.

  1. Galimski

    Galimski

    Joined:
    Apr 11, 2019
    Posts:
    25
    Hi! I've update from version 1.23.1 to 1.23.2. And I faced with a problem - on version 1.23.1 i've parsed ios recept as
    Code (CSharp):
    1.                     var receiptDict = JsonUtil.Deserialize<Dictionary<string, string>>(product.receipt);
    2.  
    3.                     var payload = receiptDict[PAYLOAD_KEY];
    4.  
    5.                         var payloadDict = JsonUtil.Deserialize<Dictionary<string, string>>(payload);
    6.                         developerPayload = payloadDict[DEVELOPER_PAYLOAD_KEY];
    7.                         receiptData = payloadDict[RECEIPT_DATA_KEY];
    And everything worked fine, but after the update, I stopped receiving a JSON. Now I receive some string. How can I get JSON as it was in the previous version?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    There should be no changes in the receipt, it comes from Apple. What string are you receiving?
     
  3. Galimski

    Galimski

    Joined:
    Apr 11, 2019
    Posts:
    25
    Like this
     

    Attached Files:

  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
  5. Galimski

    Galimski

    Joined:
    Apr 11, 2019
    Posts:
    25
    Thanks! How can I decode it like it was in previous version? I need to get 'developerPayload' and 'receiptData' to validate them on my server
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446