Skip to content

Conversation

@Kwok-he-Chu
Copy link
Member

@Kwok-he-Chu Kwok-he-Chu commented Jul 30, 2025

Updated a bunch of descriptions: Transanction, Acs, NegativeBalanceCompensationWarning & ReportWebhooks

New changes

Configuration Webhooks


  • Added usage-field - Specifies how many times the card can be used: singleUse or multiUse.
  • Added transactionRulesResult in NetworkTokenNotificationDataV2
  • Added NetworkTokenRiskRuleData, NetworkTokenRiskRuleSource and NetworkTokenTriggeredRiskRule.java
  • Added approvalExpired to SweepConfigurationV2 webhook


Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @Kwok-he-Chu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily updates and expands Adyen's C# SDK models, focusing on the Checkout API, along with minor documentation adjustments for Balance Platform webhooks. It introduces new data fields to various request and response objects, adds support for new payment methods, and refines existing documentation for clarity and accuracy. While the PR title mentions 'LegalEntityManagement API', the provided changes do not include modifications to that specific API.

Highlights

  • API Model Enhancements: New fields such as EnhancedSchemeData are introduced across several payment request models (e.g., PaymentAmountUpdateRequest, PaymentCancelRequest, PaymentRefundRequest, PaymentReversalRequest, StandalonePaymentCancelRequest). Additionally, a Subtype field is added to RivertyDetails and a Promoted boolean field to PaymentMethod.
  • New Payment Method Support: The PaymentDetails.TypeEnum is updated to include Payme and PaymePos, expanding the range of supported payment methods.
  • Expanded Session Results: A new Payment model is added and integrated into SessionResultResponse, providing more detailed payment information within session results, including additionalData, payments, and reference.
  • Documentation Refinements: Extensive updates to XML documentation comments improve clarity for various parameters, including specific requirements for 3D Secure 2 authentication (e.g., shopperEmail, shopperIP, telephoneNumber), updated example dates, and refined descriptions for authentication flows and return URLs.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces new fields and models for the Balance Platform and Legal Entity Management APIs, and updates documentation across various Checkout API models. The changes are mostly additions and documentation improvements. I've identified a critical issue in PaymentDetails.cs where enum values are renumbered, which is a breaking change. There's also a high-severity issue in PaymentRequest.cs due to an inconsistency between documentation and validation logic for ReturnUrl. Additionally, I've pointed out several medium-severity formatting issues in XML comments that affect documentation readability, and a missing newline at the end of one of the new files. Addressing these will improve code quality and consistency.

Comment on lines +288 to +574
/// <summary>
/// Enum Payme for value: payme
/// </summary>
[EnumMember(Value = "payme")]
Payme = 42,

/// <summary>
/// Enum PaymePos for value: payme_pos
/// </summary>
[EnumMember(Value = "payme_pos")]
PaymePos = 43,

/// <summary>
/// Enum Konbini for value: konbini
/// </summary>
[EnumMember(Value = "konbini")]
Konbini = 42,
Konbini = 44,

/// <summary>
/// Enum DirectEbanking for value: directEbanking
/// </summary>
[EnumMember(Value = "directEbanking")]
DirectEbanking = 43,
DirectEbanking = 45,

/// <summary>
/// Enum Boletobancario for value: boletobancario
/// </summary>
[EnumMember(Value = "boletobancario")]
Boletobancario = 44,
Boletobancario = 46,

/// <summary>
/// Enum Neteller for value: neteller
/// </summary>
[EnumMember(Value = "neteller")]
Neteller = 45,
Neteller = 47,

/// <summary>
/// Enum Cashticket for value: cashticket
/// </summary>
[EnumMember(Value = "cashticket")]
Cashticket = 46,
Cashticket = 48,

/// <summary>
/// Enum Ikano for value: ikano
/// </summary>
[EnumMember(Value = "ikano")]
Ikano = 47,
Ikano = 49,

/// <summary>
/// Enum Karenmillen for value: karenmillen
/// </summary>
[EnumMember(Value = "karenmillen")]
Karenmillen = 48,
Karenmillen = 50,

/// <summary>
/// Enum Oasis for value: oasis
/// </summary>
[EnumMember(Value = "oasis")]
Oasis = 49,
Oasis = 51,

/// <summary>
/// Enum Warehouse for value: warehouse
/// </summary>
[EnumMember(Value = "warehouse")]
Warehouse = 50,
Warehouse = 52,

/// <summary>
/// Enum PrimeiropayBoleto for value: primeiropay_boleto
/// </summary>
[EnumMember(Value = "primeiropay_boleto")]
PrimeiropayBoleto = 51,
PrimeiropayBoleto = 53,

/// <summary>
/// Enum Mada for value: mada
/// </summary>
[EnumMember(Value = "mada")]
Mada = 52,
Mada = 54,

/// <summary>
/// Enum Benefit for value: benefit
/// </summary>
[EnumMember(Value = "benefit")]
Benefit = 53,
Benefit = 55,

/// <summary>
/// Enum Knet for value: knet
/// </summary>
[EnumMember(Value = "knet")]
Knet = 54,
Knet = 56,

/// <summary>
/// Enum Omannet for value: omannet
/// </summary>
[EnumMember(Value = "omannet")]
Omannet = 55,
Omannet = 57,

/// <summary>
/// Enum GopayWallet for value: gopay_wallet
/// </summary>
[EnumMember(Value = "gopay_wallet")]
GopayWallet = 56,
GopayWallet = 58,

/// <summary>
/// Enum KcpNaverpay for value: kcp_naverpay
/// </summary>
[EnumMember(Value = "kcp_naverpay")]
KcpNaverpay = 57,
KcpNaverpay = 59,

/// <summary>
/// Enum OnlinebankingIN for value: onlinebanking_IN
/// </summary>
[EnumMember(Value = "onlinebanking_IN")]
OnlinebankingIN = 58,
OnlinebankingIN = 60,

/// <summary>
/// Enum Fawry for value: fawry
/// </summary>
[EnumMember(Value = "fawry")]
Fawry = 59,
Fawry = 61,

/// <summary>
/// Enum Atome for value: atome
/// </summary>
[EnumMember(Value = "atome")]
Atome = 60,
Atome = 62,

/// <summary>
/// Enum Moneybookers for value: moneybookers
/// </summary>
[EnumMember(Value = "moneybookers")]
Moneybookers = 61,
Moneybookers = 63,

/// <summary>
/// Enum Naps for value: naps
/// </summary>
[EnumMember(Value = "naps")]
Naps = 62,
Naps = 64,

/// <summary>
/// Enum Nordea for value: nordea
/// </summary>
[EnumMember(Value = "nordea")]
Nordea = 63,
Nordea = 65,

/// <summary>
/// Enum BoletobancarioBradesco for value: boletobancario_bradesco
/// </summary>
[EnumMember(Value = "boletobancario_bradesco")]
BoletobancarioBradesco = 64,
BoletobancarioBradesco = 66,

/// <summary>
/// Enum BoletobancarioItau for value: boletobancario_itau
/// </summary>
[EnumMember(Value = "boletobancario_itau")]
BoletobancarioItau = 65,
BoletobancarioItau = 67,

/// <summary>
/// Enum BoletobancarioSantander for value: boletobancario_santander
/// </summary>
[EnumMember(Value = "boletobancario_santander")]
BoletobancarioSantander = 66,
BoletobancarioSantander = 68,

/// <summary>
/// Enum BoletobancarioBancodobrasil for value: boletobancario_bancodobrasil
/// </summary>
[EnumMember(Value = "boletobancario_bancodobrasil")]
BoletobancarioBancodobrasil = 67,
BoletobancarioBancodobrasil = 69,

/// <summary>
/// Enum BoletobancarioHsbc for value: boletobancario_hsbc
/// </summary>
[EnumMember(Value = "boletobancario_hsbc")]
BoletobancarioHsbc = 68,
BoletobancarioHsbc = 70,

/// <summary>
/// Enum MolpayMaybank2u for value: molpay_maybank2u
/// </summary>
[EnumMember(Value = "molpay_maybank2u")]
MolpayMaybank2u = 69,
MolpayMaybank2u = 71,

/// <summary>
/// Enum MolpayCimb for value: molpay_cimb
/// </summary>
[EnumMember(Value = "molpay_cimb")]
MolpayCimb = 70,
MolpayCimb = 72,

/// <summary>
/// Enum MolpayRhb for value: molpay_rhb
/// </summary>
[EnumMember(Value = "molpay_rhb")]
MolpayRhb = 71,
MolpayRhb = 73,

/// <summary>
/// Enum MolpayAmb for value: molpay_amb
/// </summary>
[EnumMember(Value = "molpay_amb")]
MolpayAmb = 72,
MolpayAmb = 74,

/// <summary>
/// Enum MolpayHlb for value: molpay_hlb
/// </summary>
[EnumMember(Value = "molpay_hlb")]
MolpayHlb = 73,
MolpayHlb = 75,

/// <summary>
/// Enum MolpayAffinEpg for value: molpay_affin_epg
/// </summary>
[EnumMember(Value = "molpay_affin_epg")]
MolpayAffinEpg = 74,
MolpayAffinEpg = 76,

/// <summary>
/// Enum MolpayBankislam for value: molpay_bankislam
/// </summary>
[EnumMember(Value = "molpay_bankislam")]
MolpayBankislam = 75,
MolpayBankislam = 77,

/// <summary>
/// Enum MolpayPublicbank for value: molpay_publicbank
/// </summary>
[EnumMember(Value = "molpay_publicbank")]
MolpayPublicbank = 76,
MolpayPublicbank = 78,

/// <summary>
/// Enum FpxAgrobank for value: fpx_agrobank
/// </summary>
[EnumMember(Value = "fpx_agrobank")]
FpxAgrobank = 77,
FpxAgrobank = 79,

/// <summary>
/// Enum Touchngo for value: touchngo
/// </summary>
[EnumMember(Value = "touchngo")]
Touchngo = 78,
Touchngo = 80,

/// <summary>
/// Enum Maybank2uMae for value: maybank2u_mae
/// </summary>
[EnumMember(Value = "maybank2u_mae")]
Maybank2uMae = 79,
Maybank2uMae = 81,

/// <summary>
/// Enum Duitnow for value: duitnow
/// </summary>
[EnumMember(Value = "duitnow")]
Duitnow = 80,
Duitnow = 82,

/// <summary>
/// Enum Promptpay for value: promptpay
/// </summary>
[EnumMember(Value = "promptpay")]
Promptpay = 81,
Promptpay = 83,

/// <summary>
/// Enum TwintPos for value: twint_pos
/// </summary>
[EnumMember(Value = "twint_pos")]
TwintPos = 82,
TwintPos = 84,

/// <summary>
/// Enum AlipayHk for value: alipay_hk
/// </summary>
[EnumMember(Value = "alipay_hk")]
AlipayHk = 83,
AlipayHk = 85,

/// <summary>
/// Enum AlipayHkWeb for value: alipay_hk_web
/// </summary>
[EnumMember(Value = "alipay_hk_web")]
AlipayHkWeb = 84,
AlipayHkWeb = 86,

/// <summary>
/// Enum AlipayHkWap for value: alipay_hk_wap
/// </summary>
[EnumMember(Value = "alipay_hk_wap")]
AlipayHkWap = 85,
AlipayHkWap = 87,

/// <summary>
/// Enum AlipayWap for value: alipay_wap
/// </summary>
[EnumMember(Value = "alipay_wap")]
AlipayWap = 86,
AlipayWap = 88,

/// <summary>
/// Enum Balanceplatform for value: balanceplatform
/// </summary>
[EnumMember(Value = "balanceplatform")]
Balanceplatform = 87
Balanceplatform = 89

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Adding new enum members (Payme, PaymePos) has caused the integer values of subsequent members to shift. This is a breaking change for any consumers of the API who might rely on the integer values of these enums. To avoid breaking changes, new enum members should always be appended to the end of the list, or explicit values should be assigned to all members to ensure they are stable. For example, the new members should be added after Balanceplatform and have values 88 and 89 respectively.

}

// ReturnUrl (string) maxLength
if (this.ReturnUrl != null && this.ReturnUrl.Length > 8000)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

There's an inconsistency between the XML documentation for ReturnUrl and its validation logic. The comment (lines 285, 607) recommends a maximum length of 1024 characters, but the validation check allows up to 8000 characters. Please align the validation with the documented limit to prevent unexpected behavior.

            if (this.ReturnUrl != null && this.ReturnUrl.Length > 1024)
            {
                yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReturnUrl, length must be less than 1024.", new [] { "ReturnUrl" });
            }

/// <param name="metadata">Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \&quot;177\&quot; error occurs: \&quot;Metadata size exceeds limit\&quot;. * Maximum 20 characters per key. * Maximum 80 characters per value. .</param>
/// <param name="mpiData">mpiData.</param>
/// <param name="origin">Required for the 3D Secure 2 &#x60;channel&#x60; **Web** integration. Set this parameter to the origin URL of the page that you are loading the 3D Secure Component from..</param>
/// <param name="origin">&gt; Required for browser-based (&#x60;channel&#x60; **Web**) 3D Secure 2 transactions.Set this to the origin URL of the page where you are rendering the Drop-in/Component. Do not include subdirectories and a trailing slash..</param>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's a minor formatting issue in the XML comment. A space is missing after the period, which affects readability. This issue also appears on line 393, and in PaymentRequest.cs on lines 255 and 618.

        /// <param name="origin">&gt; Required for browser-based (&#x60;channel&#x60; **Web**) 3D Secure 2 transactions. Set this to the origin URL of the page where you are rendering the Drop-in/Component. Do not include subdirectories and a trailing slash..</param>

@Kwok-he-Chu Kwok-he-Chu marked this pull request as ready for review July 30, 2025 13:06
@Kwok-he-Chu Kwok-he-Chu requested a review from a team as a code owner July 30, 2025 13:06
@Kwok-he-Chu Kwok-he-Chu changed the title Release new Balance Platform fields - LegalEntityManagement API, Release new Balance Platform fields - LegalEntityManagement API, Configuration Webhooks Jul 30, 2025
@Kwok-he-Chu Kwok-he-Chu changed the title Release new Balance Platform fields - LegalEntityManagement API, Configuration Webhooks Release new Balance Platform fields - Configuration Webhooks Jul 30, 2025
ayodejidev
ayodejidev previously approved these changes Jul 30, 2025
@Kwok-he-Chu Kwok-he-Chu dismissed ayodejidev’s stale review July 30, 2025 13:21

The merge-base changed after approval.

@Kwok-he-Chu
Copy link
Member Author

duplicate #1175

@Kwok-he-Chu Kwok-he-Chu deleted the release-new-balanceplatform-fields branch August 1, 2025 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants