diff --git a/.github/workflows/dotnet_pull_request.yml b/.github/workflows/dotnet_pull_request.yml index f0e7e8a..b3726c0 100644 --- a/.github/workflows/dotnet_pull_request.yml +++ b/.github/workflows/dotnet_pull_request.yml @@ -19,7 +19,3 @@ jobs: run: dotnet build -c Release Iyzipay - name: NET45 Tests run: dotnet test -c Release Iyzipay.Tests -f net45 - - name: NETCORE2 Tests - run: dotnet test -c Release Iyzipay.Tests -f netcoreapp2.0 - #- name: NETCORE1 Tests - #run: dotnet test -c Release Iyzipay.Tests -f netcoreapp1.1 diff --git a/Iyzipay.Samples/Iyzipay.Samples.csproj b/Iyzipay.Samples/Iyzipay.Samples.csproj index dc08e1d..cf3c0c1 100644 --- a/Iyzipay.Samples/Iyzipay.Samples.csproj +++ b/Iyzipay.Samples/Iyzipay.Samples.csproj @@ -1,7 +1,7 @@  - net45;netcoreapp2.0;netcoreapp1.1 + net45 @@ -28,25 +28,7 @@ - - - - - - - - - - - - - $(DefineConstants);NETCORE2 - - - - $(DefineConstants);NETCORE1 - \ No newline at end of file diff --git a/Iyzipay.Samples/Sample.cs b/Iyzipay.Samples/Sample.cs index 0c9da28..56168f4 100644 --- a/Iyzipay.Samples/Sample.cs +++ b/Iyzipay.Samples/Sample.cs @@ -22,12 +22,7 @@ public void Initialize() protected void PrintResponse(T resource) { -#if NETCORE1 || NETCORE2 - TraceListener consoleListener = new TextWriterTraceListener(System.Console.Out); -#else TraceListener consoleListener = new ConsoleTraceListener(); -#endif - Trace.Listeners.Add(consoleListener); Trace.WriteLine(JsonConvert.SerializeObject(resource, new JsonSerializerSettings() { diff --git a/Iyzipay.Tests/Functional/BaseTest.cs b/Iyzipay.Tests/Functional/BaseTest.cs index f75b012..4d84f91 100644 --- a/Iyzipay.Tests/Functional/BaseTest.cs +++ b/Iyzipay.Tests/Functional/BaseTest.cs @@ -20,16 +20,7 @@ public void Initialize() protected void PrintResponse(T resource) { -#if RELEASE - return; -#endif - -#if NETCORE1 || NETCORE2 - TraceListener consoleListener = new TextWriterTraceListener(System.Console.Out); -#else TraceListener consoleListener = new ConsoleTraceListener(); -#endif - Trace.Listeners.Add(consoleListener); Trace.WriteLine(JsonConvert.SerializeObject(resource, new JsonSerializerSettings() { diff --git a/Iyzipay.Tests/Functional/Builder/Request/CreatePaymentRequestBuilder.cs b/Iyzipay.Tests/Functional/Builder/Request/CreatePaymentRequestBuilder.cs index c6d0ab6..ea1e02d 100644 --- a/Iyzipay.Tests/Functional/Builder/Request/CreatePaymentRequestBuilder.cs +++ b/Iyzipay.Tests/Functional/Builder/Request/CreatePaymentRequestBuilder.cs @@ -32,13 +32,13 @@ public static CreatePaymentRequestBuilder Create() return new CreatePaymentRequestBuilder(); } - public new CreatePaymentRequestBuilder Locale(string locale) + public CreatePaymentRequestBuilder Locale(string locale) { base._locale = locale; return this; } - public new CreatePaymentRequestBuilder ConversationId(string conversationId) + public CreatePaymentRequestBuilder ConversationId(string conversationId) { base._conversationId = conversationId; return this; diff --git a/Iyzipay.Tests/Iyzipay.Tests.csproj b/Iyzipay.Tests/Iyzipay.Tests.csproj index 60bf2d6..8a92f5f 100644 --- a/Iyzipay.Tests/Iyzipay.Tests.csproj +++ b/Iyzipay.Tests/Iyzipay.Tests.csproj @@ -1,7 +1,7 @@ - net45;netcoreapp2.0;netcoreapp1.1 + net45 true @@ -37,25 +37,8 @@ - - - - - - - - - - - - $(DefineConstants);NETCORE2 - - - - $(DefineConstants);NETCORE1 - \ No newline at end of file diff --git a/Iyzipay/HashGenerator.cs b/Iyzipay/HashGenerator.cs index a4155b1..147892d 100644 --- a/Iyzipay/HashGenerator.cs +++ b/Iyzipay/HashGenerator.cs @@ -12,11 +12,7 @@ private HashGenerator() public static String GenerateHash(String apiKey, String secretKey, String randomString, BaseRequest request) { -#if NETSTANDARD - SHA1 algorithm = SHA1.Create(); -#else HashAlgorithm algorithm = new SHA1Managed(); -#endif string hashStr = apiKey + randomString + secretKey + request.ToPKIRequestString(); byte[] computeHash = algorithm.ComputeHash(Encoding.UTF8.GetBytes(hashStr)); return Convert.ToBase64String(computeHash); diff --git a/Iyzipay/HttpClient.cs b/Iyzipay/HttpClient.cs index 6c71cea..763c35f 100644 --- a/Iyzipay/HttpClient.cs +++ b/Iyzipay/HttpClient.cs @@ -12,9 +12,6 @@ public class HttpClient : System.Net.Http.HttpClient { public HttpClient() -#if NETSTANDARD - : base(new HttpClientHandler(){ SslProtocols = SslProtocols.Tls12 } ) -#endif { } } diff --git a/Iyzipay/Iyzipay.csproj b/Iyzipay/Iyzipay.csproj index 5ce6527..d4d316b 100644 --- a/Iyzipay/Iyzipay.csproj +++ b/Iyzipay/Iyzipay.csproj @@ -1,7 +1,7 @@  - net45;netstandard2.0;netstandard1.3 + net45;netstandard2.1 Iyzipay Iyzipay 2.1.49 @@ -29,20 +29,8 @@ - + - - - - - - - $(DefineConstants);NETSTANDARD2 - - - - $(DefineConstants);NETSTANDARD - \ No newline at end of file diff --git a/Iyzipay/RestHttpClient.cs b/Iyzipay/RestHttpClient.cs index 07ddb29..275a4ab 100644 --- a/Iyzipay/RestHttpClient.cs +++ b/Iyzipay/RestHttpClient.cs @@ -12,10 +12,7 @@ public class RestHttpClient private static readonly HttpClient HttpClient; static RestHttpClient() { -#if !NETSTANDARD ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; -#endif - HttpClient = new HttpClient(); } diff --git a/Iyzipay/RestHttpClientV2.cs b/Iyzipay/RestHttpClientV2.cs index 647a760..87a3104 100644 --- a/Iyzipay/RestHttpClientV2.cs +++ b/Iyzipay/RestHttpClientV2.cs @@ -13,10 +13,7 @@ class RestHttpClientV2 private static readonly HttpClient HttpClient; static RestHttpClientV2() { -#if !NETSTANDARD ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; -#endif - HttpClient = new HttpClient(); } diff --git a/README.md b/README.md index b56144e..19f2d59 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,6 @@ You can sign up for an iyzico account at https://iyzico.com # Requirements One of the runtime environment is required from below * .NET Framework 4.5 -* .NET Core 1.1 -* .NET Core 2.0 # Installation @@ -22,13 +20,9 @@ Install-Package Iyzipay Or you can download the latest .dll from: https://github.com/iyzico/iyzipay-dotnet/releases/latest For .NET Framework: -* Newtonsoft.Json 8.0.2 from http://www.newtonsoft.com/json# +* Newtonsoft.Json 13.0.2 from http://www.newtonsoft.com/json# -For .NET Standard 1.3: -* Newtonsoft.Json 11.0.2 from http://www.newtonsoft.com/json# -* System.Security.Cryptography.Algorithms 4.3.0 - -For .NET Standard 2.0: +For .NET Standard 2.1: * Newtonsoft.Json 11.0.2 from http://www.newtonsoft.com/json# diff --git a/build.cmd b/build.cmd index 30c1fb9..7edc0f3 100644 --- a/build.cmd +++ b/build.cmd @@ -6,16 +6,4 @@ echo -------------------- dotnet test -c Release ./Iyzipay.Tests -f net45 -echo -------------------- -echo Running NETCORE2 Tests -echo -------------------- - -dotnet test -c Release ./Iyzipay.Tests -f netcoreapp2.0 - -echo -------------------- -echo Running NETCORE1 Tests -echo -------------------- - -dotnet test -c Release ./Iyzipay.Tests -f netcoreapp1.1 - dotnet pack -c Release ./Iyzipay \ No newline at end of file diff --git a/build.sh b/build.sh index f590d4a..d35cd3e 100644 --- a/build.sh +++ b/build.sh @@ -19,16 +19,4 @@ echo -------------------- echo Running NET45 Tests echo -------------------- -mono ./testrunner/NUnit.ConsoleRunner.*/tools/nunit3-console.exe ./Iyzipay.Tests/bin/Release/net45/Iyzipay.Tests.dll - -echo -------------------- -echo Running NETCORE2 Tests -echo -------------------- - -dotnet test ./Iyzipay.Tests -c Release -f netcoreapp2.0 - -echo -------------------- -echo Running NETCORE1 Tests -echo -------------------- - -dotnet test ./Iyzipay.Tests -c Release -f netcoreapp1.1 \ No newline at end of file +mono ./testrunner/NUnit.ConsoleRunner.*/tools/nunit3-console.exe ./Iyzipay.Tests/bin/Release/net45/Iyzipay.Tests.dll \ No newline at end of file