docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CrossPlatformValidator

    Stub cross-platform receipt validator class for platforms not supported by this feature. Will always throw exceptions if used.

    Inheritance
    object
    CrossPlatformValidator
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Purchasing.Security
    Assembly: Unity.Purchasing.SecurityStub.dll
    Syntax
    public class CrossPlatformValidator

    Constructors

    CrossPlatformValidator(byte[], byte[], string)

    Constructs an instance and checks the validity of the certification keys which only takes input parameters for the supported platforms and uses a common bundle ID for Apple and GooglePlay.

    Declaration
    public CrossPlatformValidator(byte[] googlePublicKey, byte[] appleRootCert, string appBundleId)
    Parameters
    Type Name Description
    byte[] googlePublicKey

    The GooglePlay public key.

    byte[] appleRootCert

    The Apple certification key.

    string appBundleId

    The bundle ID for all platforms.

    CrossPlatformValidator(byte[], byte[], string, string)

    Constructs an instance and checks the validity of the certification keys which only takes input parameters for the supported platforms.

    Declaration
    public CrossPlatformValidator(byte[] googlePublicKey, byte[] appleRootCert, string googleBundleId, string appleBundleId)
    Parameters
    Type Name Description
    byte[] googlePublicKey

    The GooglePlay public key.

    byte[] appleRootCert

    The Apple certification key.

    string googleBundleId

    The GooglePlay bundle ID.

    string appleBundleId

    The Apple bundle ID.

    CrossPlatformValidator(byte[], string)

    Constructs an instance and checks the validity of the certification keys for GooglePlay.

    Declaration
    public CrossPlatformValidator(byte[] googlePublicKey, string googleBundleId)
    Parameters
    Type Name Description
    byte[] googlePublicKey

    The GooglePlay public key.

    string googleBundleId

    The GooglePlay bundle ID.

    Methods

    Validate(string)

    Validates a receipt.

    Declaration
    public IPurchaseReceipt[] Validate(string unityIAPReceipt)
    Parameters
    Type Name Description
    string unityIAPReceipt

    The receipt to be validated.

    Returns
    Type Description
    IPurchaseReceipt[]

    An array of receipts parsed from the validation process

    Exceptions
    Type Condition
    IAPSecurityException

    The exception thrown if unityIAPReceipt is deemed invalid.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)