I want to implement Paypal into my WPF-Application and created a TestProject. Everything works fine but when I transfer the written code into my existing project, I get a MethodAccessException at line
var accessToken = new OAuthTokenCredential(clientID, clientSecret, sdkConfig).GetAccessToken();
Fehler beim Versuch der SecurityTransparent-Methode "PayPal.Api.OAuthTokenCredential.GenerateOAuthToken()", auf die sicherheitskritische Methode "Newtonsoft.Json.JsonConvert.DeserializeObject(System.String)" zuzugreifen. Die Assembly "PayPal, Version=1.8.0.0, Culture=neutral, PublicKeyToken=5b4afc1ccaef40fb" ist mit "AllowPartiallyTrustedCallersAttribute" markiert und verwendet das Sicherheitstransparenzmodell der Stufe 2. Bei Festlegung der Transparenz auf Stufe 2 werden alle Methoden in AllowPartiallyTrustedCallers-Assemblys standardmäßig sicherheitstransparent, was die Ursache der Ausnahme sein kann.
I don't know what this message would look like in english, so sorry for writing it in german.
Hopefully someone could tell me what is happening here
Thanks!