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

[Solved] Receipt Validation Null Error on GooglePlay

Discussion in 'Unity IAP' started by sa_rdml, Sep 1, 2016.

Thread Status:
Not open for further replies.
  1. sa_rdml

    sa_rdml

    Joined:
    Jul 25, 2016
    Posts:
    4
    This is I get.. Receipt = args.purchasedProduct.receipt .. on Purchase proccess
    I changed package name to "xxx" for this thread
    then I get this error.
    Receipt validation works on APPLE iap, but not work on GOOGLE PLAY iap.
    The key is registered to the receipt validation obfuscator already!
    How can I solve this problem ?
     
  2. erika_d

    erika_d

    Unity Technologies

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @sakiraykurt_radmule,

    There are a number of possibilities for causing a null reference in Mono's Encode_v15 method. You can see the code of the method here: https://github.com/mono/mono/blob/m...rity/Mono.Security.Cryptography/PKCS1.cs#L343

    Some users have reported an issue with the security class getting stripped causing this issue: http://forum.unity3d.com/threads/so...enceexception-when-validating-receipt.393161/

    It could also be a malformed or missing key, to check that I would suggest recopying your Google Play API key into the Obfuscator again in case there was any issue there.
     
  3. sa_rdml

    sa_rdml

    Joined:
    Jul 25, 2016
    Posts:
    4
    Hi @erika_d ,
    Second one that xml trick has solved my problem!
    Thank you!
     
    erika_d likes this.
Thread Status:
Not open for further replies.