Skip to content

Commit

Permalink
Release 7.3.0 (#498)
Browse files Browse the repository at this point in the history
* [PW-4729] Add region based cloud api endpoints (#479)

* Add region based cloud api endpoints

* Correct Endpoint to CloudApiEndPoint

* Revert helper method

* Remone /sync and /async as it is added by terminal api

* Update README.md

Co-authored-by: Alessio Zampatti <alessio.zampatti@adyen.com>

* Update Adyen/Constants/ClientConfig.cs

Co-authored-by: Alessio Zampatti <alessio.zampatti@adyen.com>

Co-authored-by: Alessio Zampatti <alessio.zampatti@adyen.com>

* Add more constants for additional data  (#476)

* [PW-3744] Release 6.0.0 (#361)

* [PW-2298]Remove the travis file (#327)

* Remove the travis file

* Update README.md

* Update .gitignore (#331)

* Bump Moq from 4.14.5 to 4.14.6 (#329)

Bumps [Moq](https://github.com/moq/moq4) from 4.14.5 to 4.14.6.
- [Release notes](https://github.com/moq/moq4/releases)
- [Changelog](https://github.com/moq/moq4/blob/master/CHANGELOG.md)
- [Commits](devlooped/moq@v4.14.5...v4.14.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update dependency Moq to v4.14.6 (#328)

* Update dependency Moq to v4.14.7 (#334)

* [PW-3266] Add BACS direct debit details class (#335)

* Add bacs direct debit

* Change EUR to GBP

This change is because the bacs is applicable only in GB

* Add RecurringProcessingModel to CreatePaymentLinkRequest (#337)

* Add RecurringProcessingModel to CreatePaymentLinkRequest.
* Add unit test for addition of RecurringProcessingModel to CreatePaymentLinkRequest.

* Bump System.ComponentModel.Annotations from 4.7.0 to 5.0.0 (#341)

Bumps [System.ComponentModel.Annotations](https://github.com/dotnet/runtime) from 4.7.0 to 5.0.0.
- [Release notes](https://github.com/dotnet/runtime/releases)
- [Commits](https://github.com/dotnet/runtime/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update dependency System.ComponentModel.Annotations to v5 (#340)

* Bump Moq from 4.14.7 to 4.15.1 (#343)

Bumps [Moq](https://github.com/moq/moq4) from 4.14.7 to 4.15.1.
- [Release notes](https://github.com/moq/moq4/releases)
- [Changelog](https://github.com/moq/moq4/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moq/moq4/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Correct the property name for Apple Pay tokens (#338)

* Corrects the property name for Apple Pay tokens

* Adds test to confirm can deserialize paymentmethod.

* [PW-2640] Deserialize the response of dropin into the correct paymentMethod model (#347)

* Add the payment method details json deserializer

* Rename PaymentMethodDetailsConverter

* Update Adyen/Util/PaymentMethodDetailsConverter.cs

Co-authored-by: Alessio Zampatti <alessio.zampatti@adyen.com>

Co-authored-by: Alessio Zampatti <alessio.zampatti@adyen.com>

* Add optional RequestOptions object to PaymentDetails calls (same as existing Payments call) so that the idempotency key can be passed to the API in order to prevent duplicates. (#346)

* [PW-3125] Rename namespace Adyen.CloudApiSerialization to Adyen.ApiSerialization (#349)

* Rename namespace Adyen.CloudApiSerialization to Adyen.Serialization

* Rename namespace Serialization to ApiSerialization

* [PW-2616]Test the escape string with encryption (#353)

* Test the escape string with encryption

* Apply suggestions from code review

Remove underscore from internal method

* Bump Moq from 4.15.1 to 4.15.2 (#351)

Bumps [Moq](https://github.com/moq/moq4) from 4.15.1 to 4.15.2.
- [Release notes](https://github.com/moq/moq4/releases)
- [Changelog](https://github.com/moq/moq4/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moq/moq4/commits/v4.15.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update dependency Moq to v4.15.2 (#350)

* Add async version of Recurring.ListRecurringDetails (#344)

* Add async version of Recurring.ListRecurringDetails

* Add unit test for ListRecurringDetailsAsync

Co-authored-by: Karol Grodzicki <karol.grodzicki@speeron.com>

* Add paypal unit test (#355)

* Add paypal unit test

* Apply suggestions from code review

* Add shopper locale to GetOnboardingUrlRequest (#360)

* [PW-3441]- Update to version 66 (#359)

* Commit the models from v65 to compare

* Add the draft models to be able to modify them

* Add the license header

* Add deserializer for action respone, add details folder

* Add the rest paymentmethods

* Finalize payment methods details methods json converter

* Add the PaymentResponse action Json Converter

* Move the actions payment response classes to action folder

* Update the library checkout version

* Remove additional data classes

* Fix the unit tests

* Revert class names similar to endpoints

* Remove autogenerated class OneOfPaymentResponseAction

* Remove the redundant application fields

* Remove oneof autogenerated class

* Update test project to 2.1 dotnetcore, fix the multibanco test

* Update dotnetcore.yml

Update to test with 2.1 dotnet core version

* Update Adyen.Test.csproj

* Update Adyen.Test.csproj

* Update dotnetcore.yml

* Update Adyen.Test.csproj

* Update dotnetcore.yml

* Update Adyen.Test.csproj

* Correct the string representation in checkout classes using extensions

* Correct more in checkout the string representation inclasses using extensions

* Correct last class in checkout the string representation using extensions

* Correct PaymentResponse in checkout the string representation using extensions

* Update README.md

* Add MobilePayDetails and UpiDetails to json converter

* Add CheckoutThreeDS2Action to the action json converter

* Originkeys endpoint uses checkout CheckoutUtilityRequest and CheckoutUtilityResponse

* Move origin keys endpoint to checkout

* Bump the version 6.0.0

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: WhiteSource Renovate <bot@renovateapp.com>
Co-authored-by: gtodde <giulia.todde@overapp.it>
Co-authored-by: James Simm <587226+jimmah@users.noreply.github.com>
Co-authored-by: Alessio Zampatti <alessio.zampatti@adyen.com>
Co-authored-by: Ryan O'Neill <r@ryanoneill.com>
Co-authored-by: qj0n <karol.gro@gmail.com>
Co-authored-by: Karol Grodzicki <karol.grodzicki@speeron.com>

* Revert "[PW-3744] Release 6.0.0 (#361)"

This reverts commit 9746f0d.

* Update constants for additional data

* Apply suggestions from code review

* Remove custom constants for additional data

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: WhiteSource Renovate <bot@renovateapp.com>
Co-authored-by: gtodde <giulia.todde@overapp.it>
Co-authored-by: James Simm <587226+jimmah@users.noreply.github.com>
Co-authored-by: Alessio Zampatti <alessio.zampatti@adyen.com>
Co-authored-by: Ryan O'Neill <r@ryanoneill.com>
Co-authored-by: qj0n <karol.gro@gmail.com>
Co-authored-by: Karol Grodzicki <karol.grodzicki@speeron.com>

* Update CODEOWNERS (#491)

* Update PaymentResponse.cs (#494)

* Update PaymentResponse.cs

* Update PaymentDetailResponse

Added missing value in ResultCodeEnum

* Update PaymentDetailsResponse.cs

* Update PaymentResponse.cs

* Update mstest monorepo to v2.2.7 (#485)

* Update dependency Microsoft.NET.Test.Sdk to v16.11.0 (#483)

* Update CODEOWNERS

* Modify the PaymentMethodDetailsConverter to public class (#497)

* Remove null check CreateAccountHolderResponse.cs (#496)

* Bump the version

Co-authored-by: Alessio Zampatti <alessio.zampatti@adyen.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: WhiteSource Renovate <bot@renovateapp.com>
Co-authored-by: gtodde <giulia.todde@overapp.it>
Co-authored-by: James Simm <587226+jimmah@users.noreply.github.com>
Co-authored-by: Ryan O'Neill <r@ryanoneill.com>
Co-authored-by: qj0n <karol.gro@gmail.com>
Co-authored-by: Karol Grodzicki <karol.grodzicki@speeron.com>
Co-authored-by: Deepu K Sasidharan <d4udts@gmail.com>
Co-authored-by: bobesh77 <90173783+bobesh77@users.noreply.github.com>
  • Loading branch information
11 people authored Oct 4, 2021
1 parent f1c6dc3 commit e72ce78
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @Aleffio @AlexandrosMor @martinsrenato @rikterbeek @deepu105
* @Aleffio @AlexandrosMor @martinsrenato @rikterbeek @zaiddreakh @wboereboom
12 changes: 6 additions & 6 deletions Adyen.Test/Adyen.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

<IsPackable>false</IsPackable>

<AssemblyVersion>7.2.0</AssemblyVersion>
<AssemblyVersion>7.3.0</AssemblyVersion>

<FileVersion>7.2.0</FileVersion>
<FileVersion>7.3.0</FileVersion>

<Version>7.2.0</Version>
<Version>7.3.0</Version>

<LangVersion>7.2</LangVersion>
</PropertyGroup>
Expand All @@ -33,12 +33,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />

<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.5" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.7" />

<PackageReference Include="MSTest.TestFramework" Version="2.2.5" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.7" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Adyen.Test/BaseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ protected Client CreateAsyncMockTestClientApiKeyBasedRequest(string fileName)
/// <returns>IClient implementation</returns>
protected Client CreateMockTestClientPosCloudApiRequest(string fileName)
{
var config = new Config { Endpoint = ClientConfig.CloudApiEndPointTest };
var config = new Config { CloudApiEndPoint = ClientConfig.CloudApiEndPointTest };
var mockPath = GetMockFilePath(fileName);
var response = MockFileToString(mockPath);
//Create a mock interface
Expand Down
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.2.0</Version>
<AssemblyVersion>7.2.0</AssemblyVersion>
<FileVersion>7.2.0</FileVersion>
<Version>7.3.0</Version>
<AssemblyVersion>7.3.0</AssemblyVersion>
<FileVersion>7.3.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.2.0</PackageTags>
<PackageTags>7.3.0</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Authors>Adyen</Authors>
<Company>Adyen</Company>
Expand Down
6 changes: 3 additions & 3 deletions Adyen/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public Client(string username, string password, Environment environment)
};
this.SetEnvironment(environment);
}

public Client(string xapikey, Environment environment)
{
Config = new Config
Expand All @@ -69,7 +69,7 @@ public Client(string xapikey, Environment environment, string liveEndpointUrlPre
Environment = environment,
XApiKey = xapikey
};
this.SetEnvironment(environment,liveEndpointUrlPrefix);
this.SetEnvironment(environment, liveEndpointUrlPrefix);
}

public Client(Config config)
Expand Down Expand Up @@ -103,7 +103,7 @@ public void SetEnvironment(Environment environment, string liveEndpointUrlPrefix

Config.Endpoint = ClientConfig.EndpointProtocol + liveEndpointUrlPrefix + ClientConfig.EndpointLiveSuffix;
Config.HppEndpoint = ClientConfig.HppLive;
Config.CloudApiEndPoint = ClientConfig.CloudApiEndPointLive;
Config.CloudApiEndPoint = ClientConfig.CloudApiEndPointEULive;
Config.CheckoutEndpoint = ClientConfig.EndpointProtocol + liveEndpointUrlPrefix + ClientConfig.CheckoutEndpointLiveSuffix;
Config.MarketPayEndpoint = ClientConfig.MarketpayEndPointLive;
Config.PosTerminalManagementEndpoint = ClientConfig.PosTerminalManagementEndpointLive;
Expand Down
2 changes: 2 additions & 0 deletions Adyen/Constants/AdditionalData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,7 @@ public class AdditionalData
public const string RecurringShopperReference = "recurring.shopperReference";
public const string RecurringDetailReference = "recurring.recurringDetailReference";
public const string AllowThreeDS2 = "allow3DS2";
public const string PaymentLinkId = "paymentLinkId";
public const string MerchantOrderReference = "merchantOrderReference";
}
}
9 changes: 7 additions & 2 deletions Adyen/Constants/ClientConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ public class ClientConfig
public static string HppLive = "https://live.adyen.com/hpp";
public static string CheckoutEndpointTest = "https://checkout-test.adyen.com";
public static string CheckoutEndpointLiveSuffix = "-checkout-live.adyenpayments.com/checkout";
//Test cloud api endpoints
public static string CloudApiEndPointTest = "https://terminal-api-test.adyen.com";
public static string CloudApiEndPointLive = "https://terminal-api-live.adyen.com";
//Live cloud api endpoints
public static string CloudApiEndPointEULive = "https://terminal-api-live.adyen.com";
public static string CloudApiEndPointAULive = "https://terminal-api-live-au.adyen.com";
public static string CloudApiEndPointUSLive = "https://terminal-api-live-us.adyen.com";

public static string MarketpayEndPointTest = "https://cal-test.adyen.com/cal/services";
public static string MarketpayEndPointLive = "https://cal-live.adyen.com/cal/services";
public static string PosTerminalManagementEndpointTest = "https://postfmapi-test.adyen.com/postfmapi/terminal";
Expand All @@ -53,6 +58,6 @@ public class ClientConfig
public static string BinLookupApiVersion = "v50";

public static string LibName = "adyen-dotnet-api-library";
public static string LibVersion = "7.2.0";
public static string LibVersion = "7.3.0";
}
}
6 changes: 5 additions & 1 deletion Adyen/Model/Checkout/PaymentDetailsResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ public enum ResultCodeEnum
/// Enum Success for value: Success
/// </summary>
[EnumMember(Value = "Success")]
Success = 12
Success = 12,
/// <summary>
/// Enum Refused for value: AuthenticationNotRequired
/// </summary>
[EnumMember(Value = "AuthenticationNotRequired")] AuthenticationNotRequired = 13
}
/// <summary>
/// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the &#x60;refusalReason&#x60; field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper&#x27;s device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the &#x60;refusalReason&#x60; field. This is a final state.
Expand Down
9 changes: 7 additions & 2 deletions Adyen/Model/Checkout/PaymentResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ public enum ResultCodeEnum
/// <summary>
/// Enum Refused for value: Refused
/// </summary>
[EnumMember(Value = "Refused")] Refused = 11
[EnumMember(Value = "Refused")] Refused = 11,

/// <summary>
/// Enum Refused for value: AuthenticationNotRequired
/// </summary>
[EnumMember(Value = "AuthenticationNotRequired")] AuthenticationNotRequired = 12,
}

/// <summary>
Expand Down Expand Up @@ -460,4 +465,4 @@ public override int GetHashCode()
yield break;
}
}
}
}
10 changes: 1 addition & 9 deletions Adyen/Model/MarketPay/CreateAccountHolderResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,7 @@ public enum LegalEntityEnum
/// <param name="verification">verification (required).</param>
public CreateAccountHolderResponse(string accountCode = default(string), string accountHolderCode = default(string), AccountHolderDetails accountHolderDetails = default(AccountHolderDetails), AccountHolderStatus accountHolderStatus = default(AccountHolderStatus), string description = default(string), List<ErrorFieldType> invalidFields = default(List<ErrorFieldType>), LegalEntityEnum legalEntity = default(LegalEntityEnum), string primaryCurrency = default(string), string pspReference = default(string), string resultCode = default(string), KYCVerificationResult verification = default(KYCVerificationResult))
{
// to ensure "pspReference" is required (not null)
if (pspReference == null)
{
throw new InvalidDataException("pspReference is a required property for CreateAccountHolderResponse and cannot be null");
}
else
{
this.PspReference = pspReference;
}
this.PspReference = pspReference;
this.AccountHolderStatus = accountHolderStatus;
this.LegalEntity = legalEntity;
this.Verification = verification;
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Util/PaymentMethodDetailsConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace Adyen.Util
{
internal class PaymentMethodDetailsConverter : JsonConverter
public class PaymentMethodDetailsConverter : JsonConverter
{
public override bool CanConvert(Type objectType)
{
Expand Down
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ The library supports all APIs under the following services:
* [Payouts API](https://docs.adyen.com/api-explorer/#/Payout/v51/overview): Endpoints for sending funds to your customers. Current supported version: **v51**
* [Adyen BinLookup API](https://docs.adyen.com/api-explorer/#/BinLookup/v50/overview): Endpoints for retrieving information, such as cost estimates, and 3D Secure supported version based on a given BIN. Current supported version: **v50**
* [Utility API](https://docs.adyen.com/api-explorer/#/CheckoutService/v67/post/originKeys): This operation takes the origin domains and returns a JSON object containing the corresponding origin keys for the domains. Current supported version: **v67**
* [Platforms APIs](https://docs.adyen.com/platforms/api): Set of APIs when using Adyen for Platforms.
* [Platforms APIs](https://docs.adyen.com/platforms/api): Set of APIs when using Adyen for Platforms.
* [Hosted Onboarding API](https://docs.adyen.com/api-explorer/#/Hop/v1/overview) Current supported version: **v1**
* [Account API](https://docs.adyen.com/api-explorer/#/Account/v5/overview) Current supported version: **v5**
* [Fund API](https://docs.adyen.com/api-explorer/#/Fund/v5/overview) Current supported version: **v5**
* [Fund API](https://docs.adyen.com/api-explorer/#/Fund/v5/overview) Current supported version: **v5**
* [Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/choose-your-architecture/cloud): Our point-of-sale integration.
* [Local-based Terminal API](https://docs.adyen.com/point-of-sale/choose-your-architecture/local): Our point-of-sale integration.
* [POS Terminal Management API](https://docs.adyen.com/api-explorer/#/postfmapi/v1/overview): Endpoints for managing your point-of-sale payment terminals **v1**
* [POS Terminal Management API](https://docs.adyen.com/api-explorer/#/postfmapi/v1/overview): Endpoints for managing your point-of-sale payment terminals **v1**

For more information, refer to our [documentation](https://docs.adyen.com/) or the [API Explorer](https://docs.adyen.com/api-explorer/).

Expand All @@ -32,7 +32,7 @@ For more information, refer to our [documentation](https://docs.adyen.com/) or t

## Installation
Simply download and restore nuget packages https://www.nuget.org/packages/Adyen/
or install it from package manager
or install it from package manager
~~~~ bash
PM> Install-Package Adyen -Version x.x.x
~~~~
Expand Down Expand Up @@ -72,6 +72,19 @@ dotnet build
dotnet test
~~~~

### Using the Cloud API for post
In order to submit POS request with Cloud API you need to initialize the client with the Endpoints that it is closer to your region. The Endpoints are available as contacts in [ClientConfig](https://github.com/Adyen/adyen-dotnet-api-library/blob/develop/Adyen/Constants/ClientConfig.cs#L35)
For more information please read our [documentation](https://docs.adyen.com/point-of-sale/terminal-api-fundamentals#cloud)
~~~~ csharp
//Example for EU based Endpoint Syncronous
var config = new Config
{
XApiKey = "Your merchant XAPI key",
CloudApiEndPoint = ClientConfig.CloudApiEndPointEULive
};
var client = new Client(config);
~~~~

## Contributing

We encourage you to contribute to this repository, so everyone can benefit from new features, bug fixes, and any other improvements.
Expand Down

0 comments on commit e72ce78

Please sign in to comment.