docs.unity3d.com
    Show / Hide Table of Contents

    Class CrossPlatformValidator

    Class that validates receipts on multiple platforms that support the Security module. Note that this currently only supports GooglePlay and Apple platforms.

    Inheritance
    Object
    CrossPlatformValidator
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.Purchasing.Security
    Syntax
    public class CrossPlatformValidator

    Constructors

    CrossPlatformValidator(Byte[], Byte[], Byte[], String)

    Constructs an instance and checks the validity of the certification keys which uses a common bundle ID for Apple and GooglePlay.

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

    The GooglePlay public key.

    Byte[] appleRootCert

    The Apple certification key.

    Byte[] unityChannelPublicKey_not_used

    The Unity Channel public key. Not used because Unity Channel is no longer supported.

    String appBundleId

    The bundle ID for all platforms.

    CrossPlatformValidator(Byte[], Byte[], Byte[], String, String, String)

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

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

    The GooglePlay public key.

    Byte[] appleRootCert

    The Apple certification key.

    Byte[] unityChannelPublicKey_not_used

    The Unity Channel public key. Not used because Unity Channel is no longer supported.

    String googleBundleId

    The GooglePlay bundle ID.

    String appleBundleId

    The Apple bundle ID.

    String xiaomiBundleId_not_used

    The Xiaomi bundle ID. Not used because Xiaomi is no longer supported.

    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)

    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[], 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.

    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

    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

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023