Skip to content

Commit

Permalink
Merge pull request #502 from Adyen/develop
Browse files Browse the repository at this point in the history
Release 8.0.0
  • Loading branch information
AlexandrosMor authored Oct 8, 2021
2 parents e72ce78 + 377e1a1 commit 5444687
Show file tree
Hide file tree
Showing 10 changed files with 2,272 additions and 51 deletions.
8 changes: 4 additions & 4 deletions Adyen.Test/Adyen.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

<IsPackable>false</IsPackable>

<AssemblyVersion>7.3.0</AssemblyVersion>
<AssemblyVersion>8.0.0</AssemblyVersion>

<FileVersion>7.3.0</FileVersion>
<FileVersion>8.0.0</FileVersion>

<Version>8.0.0</Version>

<Version>7.3.0</Version>

<LangVersion>7.2</LangVersion>
</PropertyGroup>

Expand Down
25 changes: 25 additions & 0 deletions Adyen.Test/CheckoutTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ public void FraudResultParsingTest()
Assert.AreEqual(0, fraudResults[1].FraudCheckResult.AccountScore);
Assert.AreEqual(3, fraudResults[1].FraudCheckResult.CheckId);
}

/// <summary>
/// Test if the fraud result are properly deseriazed
/// POST /payments
Expand All @@ -666,5 +667,29 @@ public void ThreeDS2Test()
Assert.AreEqual(ResultCodeEnum.IdentifyShopper, paymentResponse.ResultCode);
Assert.AreEqual("threeDS2", paymentResponseThreeDs2Action.Type);
}

/// <summary>
/// Test success sessions
/// POST /sessions
/// </summary>
[TestMethod]
public void CheckoutSessionSuccessTest()
{
var checkoutSessionRequest = new CreateCheckoutSessionRequest
{
merchantAccount = "TestMerchant",
reference = "TestReference",
returnUrl = "http://test-url.com",
amount = new Amount("EUR", 10000L)
};
var client = CreateMockTestClientApiKeyBasedRequest("Mocks/checkout/sessions-success.json");
var checkout = new Checkout(client);
var checkoutSessionResponse = checkout.Sessions(checkoutSessionRequest);
Assert.AreEqual("TestMerchant", checkoutSessionResponse.merchantAccount);
Assert.AreEqual("TestReference", checkoutSessionResponse.reference);
Assert.AreEqual("http://test-url.com", checkoutSessionResponse.returnUrl);
Assert.AreEqual("EUR", checkoutSessionResponse.amount.Currency);
Assert.AreEqual("1000", checkoutSessionResponse.amount.Value.ToString());
}
}
}
11 changes: 11 additions & 0 deletions Adyen.Test/Mocks/checkout/sessions-success.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"id": "session-test-id",
"amount": {
"currency": "EUR",
"value": 1000
},
"reference": "TestReference",
"returnUrl": "http://test-url.com",
"expiresAt": "2021-09-30T06:45:06Z",
"merchantAccount": "TestMerchant"
}
8 changes: 4 additions & 4 deletions Adyen/Adyen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Copyright>Adyen</Copyright>
<Version>7.3.0</Version>
<AssemblyVersion>7.3.0</AssemblyVersion>
<FileVersion>7.3.0</FileVersion>
<Version>8.0.0</Version>
<AssemblyVersion>8.0.0</AssemblyVersion>
<FileVersion>8.0.0</FileVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Description>The Adyen API Library for .net core enables you to work with Adyen APIs, Hosted Payment Pages and terminal api with any .net application.</Description>
<PackageProjectUrl>https://github.com/Adyen/adyen-dotnet-api-library</PackageProjectUrl>
<RepositoryUrl>https://github.com/Adyen/adyen-dotnet-api-library</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>7.3.0</PackageTags>
<PackageTags>8.0.0</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Authors>Adyen</Authors>
<Company>Adyen</Company>
Expand Down
44 changes: 22 additions & 22 deletions Adyen/Constants/ClientConfig.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#region License
// /*
// * ######
// * ######
// * ############ ####( ###### #####. ###### ############ ############
// * ############# #####( ###### #####. ###### ############# #############
// * ###### #####( ###### #####. ###### ##### ###### ##### ######
// * ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
// * ###### ###### #####( ###### #####. ###### ##### ##### ######
// * ############# ############# ############# ############# ##### ######
// * ############ ############ ############# ############ ##### ######
// * ######
// * #############
// * ############
// *
// * Adyen Dotnet API Library
// *
// * Copyright (c) 2020 Adyen B.V.
// * This file is open source and available under the MIT license.
// * See the LICENSE file for more info.
// */
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Dotnet API Library
*
* Copyright (c) 2021 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
#endregion

namespace Adyen.Constants
Expand Down Expand Up @@ -49,7 +49,7 @@ public class ClientConfig
public static string RecurringApiVersion = "v49";
public static string ApiVersion = "v51";
public static string PayoutApiVersion = "v51";
public static string CheckoutApiVersion = "v67";
public static string CheckoutApiVersion = "v68";
public static string PosTerminalManagementVersion = "v1";
public static string UserAgentSuffix = "adyen-dotnet-api-library/";
public static string EndpointProtocol = "https://";
Expand All @@ -58,6 +58,6 @@ public class ClientConfig
public static string BinLookupApiVersion = "v50";

public static string LibName = "adyen-dotnet-api-library";
public static string LibVersion = "7.3.0";
public static string LibVersion = "8.0.0";
}
}
Loading

0 comments on commit 5444687

Please sign in to comment.