Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

iOS receipt

Discussion in 'Unity IAP' started by Galimski, Jun 30, 2020 at 7:14 PM.

  1. Galimski

    Galimski

    Joined:
    Apr 11, 2019
    Posts:
    19
    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:
    7,372
    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:
    19
    Like this
     

    Attached Files:

  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,372
  5. Galimski

    Galimski

    Joined:
    Apr 11, 2019
    Posts:
    19
    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:
    7,372
unityunity