IAP Validation

This part of code:
var validator = new CrossPlatformValidator(GooglePlayTangle.Data(),
AppleTangle.Data(), Application.bundleIdentifier);

Throw me this:
The type or namespace name ‘CrossPlatformValidator’ could not be found (are you missing a using directive or an assembly reference?)
The name ‘GooglePlayTangle’ does not exist in the current context
The name ‘AppleTangle’ does not exist in the current context
‘Application’ does not contain a definition for ‘bundleIdentifier’

Shall i use any specific libraries (except using UnityEngine.Purchasing)?

using UnityEngine.Purchasing.Security;

//Unity IAP’s validation logic is only included on these platforms.

#if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE_OSX

var validator = new CrossPlatformValidator(GooglePlayTangle.Data(),
AppleTangle.Data(), Application.identifier);

You create the Tangle files from Window/Unity IAP/Receipt Obfuscation Validator. More information here:

Unity 2018.3.7f1. After adding - using UnityEngine.Purchasing.Security; Still have this errors when compiling script with this code:
#if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE_OSX
var validator = new CrossPlatformValidator(GooglePlayTangle.Data(),
AppleTangle.Data(), Application.bundleIdentifier);
#endif
Errors:
The name ‘GooglePlayTangle’ does not exist in the current context
The name ‘AppleTangle’ does not exist in the current context
‘Application’ does not contain a definition for ‘bundleIdentifier’

Did you create the tangle files?

I missed this step (thought it was enought that i put my Google API key into Services-IAP-Options). Now 1 error with Application.bundleIdentifier:
‘Application’ does not contain a definition for ‘bundleIdentifier’
I can replace it with Application.identifier: No errors since now but does it returns the same thing?
I also can replace it with UnityEditor.PlayerSettings.applicationIdentifier will it work on Android or IOS? (I`m scared oif this “UnityEditor”)

As always, Google is your friend. “unity iap Application does not contain a definition for bundleIdentifier”

Ok I found that Application.bundleidentifier returns package name (that probably previously was called “bundle identifier”) so now I`m using Application.identifier that returns it (or we can use UnityEditor.PlayerSettings.applicationIdentifier - same result in debug logs: com.company.prodname)

If I understood correctly, the Public Key we have to add is just like a password/code to encrypt/decrypt right? we can set there whatever we want?

¿Any advice on how to generate a safe one?

Thanks in advance

For a new topic, please open a new thread. Ensure to state which key you are referring to .