Search Unity

Base64 encoding of iOS auto-renewing subscription receipt?

Discussion in 'Unity IAP' started by Harrishun, Mar 2, 2020.

  1. Harrishun

    Harrishun

    Joined:
    Apr 13, 2016
    Posts:
    59
    Hi all,

    Currently, I am in contact with a Technical Support representative from Apple, in relation to an issue where certain auto-renewing subscriptions do not validate correctly. According to this rep, the issues that we are reporting used to be much more common when apps performed the base64 encoding themselves, but since the release of the NSData base64EncodedString option, this has been extremely rare.

    I am wondering whether the way in which Unity IAP encodes the receipt is publicly available. As Unity IAP is a passthrough service, I assume native code is being run inside the Unity IAP "black box" that then outputs the data for access in our C# implementations. The Apple representative also gave me two examples of how it should be done in native code, which I have attached at the end of this message.

    In any case, we will likely have to implement a workaround for the issues that we are having, in order to gain another version of the invalid receipts, but having this information would go a long way in discovering why we are facing these validation issues.

    Thanks for reading, hope to hear back from someone soon!

     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I am checking...
     
  3. Harrishun

    Harrishun

    Joined:
    Apr 13, 2016
    Posts:
    59
    Much appreciated, thanks Jeff! You're a lifesaver.
     
  4. JeffDUnity3D

    JeffDUnity3D

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

    Harrishun

    Joined:
    Apr 13, 2016
    Posts:
    59
    Thanks for that Jeff. Just going back and forth now with the Apple representative, it seems like the method in which this encoding is being performed might be slightly outdated, considering this article is from 2009. I'll report back with any other information that might help yourself and the team strengthen the reliability of the Unity IAP package.