Class CrossPlatformValidator
Class that validates receipts on multiple platforms that support the Security module. Note that this currently only supports GooglePlay and Apple platforms.
Inherited Members
Namespace: UnityEngine .Purchasing.Security
Assembly: solution.dll
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 |
---|---|
IPurchase |
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 |
---|---|
IPurchase |
An array of receipts parsed from the validation process |