Skip to content

Conversation

@johnayeni
Copy link
Contributor

@johnayeni johnayeni commented Dec 8, 2025

📋 Pull Request Checklist

  • I have added unit tests to cover my changes.
  • I have added or updated Storybook stories where applicable.
  • I have tested the changes manually in the local environment.
  • I have checked that no PII data is being sent on analytics events
  • All E2E tests are passing, and I have added new tests if necessary.
  • All interfaces and types introduced or updated are strictly typed.

📝 Summary

IRIS Payment is a real-time bank transfer system, popular in Greece, allowing direct payments from a customer's bank account via their mobile banking app, often by scanning a QR code or by selecting an bank issuer to be redirected to. This PR adds proper support for this Payment method to the SDK.

Screenshot 2025-12-17 at 15 05 42 Screenshot 2025-12-17 at 15 05 49 Screenshot 2025-12-17 at 15 06 48

🧪 Tested scenarios

Both the redirect flow and the qr code flow for the IRIS payment method have been covered by the following tests

  • Manual tests
  • Unit tests
  • E2E tests

🔗 Related GitHub Issue / Internal Ticket number

COSDK-861

Closes:


@changeset-bot
Copy link

changeset-bot bot commented Dec 8, 2025

🦋 Changeset detected

Latest commit: 15be82f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@adyen/adyen-web Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Dec 8, 2025

Deploy Preview for adyen-web ready!

Name Link
🔨 Latest commit 15be82f
🔍 Latest deploy log https://app.netlify.com/projects/adyen-web/deploys/694bdb56a237930008f698f5
😎 Deploy Preview https://deploy-preview-3708.checkout-web-dev.adyen.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @johnayeni, 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 introduces the Iris payment component, expanding the available payment methods within the system. The component is designed to handle both traditional issuer list selections and QR code payment processes, leveraging existing helper utilities. Accompanying this addition are minor adjustments to the IssuerListContainer's validation logic and updates to Storybook for component demonstration and testing.

Highlights

  • New Iris Payment Component: Introduced a new Iris payment component, which supports both issuer list selection and QR code-based payment flows.
  • IssuerListContainer Simplification: The isValid getter in IssuerListContainer has been simplified to always return true, potentially affecting validation logic for issuer list components.
  • Component Integration: The new Iris component has been integrated into the main component exports and added to the TxVariants enum for proper type identification.
  • Storybook Updates: Storybook configurations were updated to include the Iris component, setting 'GR' (Greece) as the default country code for its story and adjusting the DEFAULT_AMOUNT_VALUE.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

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
Contributor

@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

The pull request introduces a new Iris payment component, including its Storybook configuration and integration into the existing component structure. The changes involve adding new files for the Iris component, updating the TxVariants enum, and exporting the new component. A significant change was made to the IssuerListContainer.tsx file, specifically to the isValid getter, which now unconditionally returns true. This change needs careful consideration as it bypasses the intended validation logic for components extending IssuerListContainer.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

size-limit report 📦

Path Size
UMD 114.49 KB (+0.51% 🔺)
Auto 120.94 KB (+0.62% 🔺)
ESM - Core 25.47 KB (+0.09% 🔺)
ESM - Core + Card 64.64 KB (-0.07% 🔽)
ESM - Core + Dropin with Card 71.21 KB (-0.08% 🔽)

@johnayeni
Copy link
Contributor Author

/gemini review

Copy link
Contributor

@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 the new Iris payment component, which is a significant and well-executed addition. The implementation is robust, featuring two distinct modes (Bank List and QR Code) with a responsive default based on the device type. The changes are thoroughly supported by a comprehensive suite of Storybook stories, unit tests, and end-to-end accessibility tests, which is excellent. I also appreciate the thoughtful refactoring of existing components like IssuerListContainer and the creation of the reusable SegmentedControlRegion to improve type safety and accessibility. My feedback includes a minor suggestion to improve module organization for cleaner imports.

@ScottiBR ScottiBR force-pushed the add-iris-payment-component branch from 0990430 to 97917a6 Compare December 17, 2025 09:54
@johnayeni johnayeni marked this pull request as ready for review December 17, 2025 16:17
@johnayeni johnayeni requested a review from a team as a code owner December 17, 2025 16:17
@johnayeni johnayeni requested review from ScottiBR, m1aw and ribeiroguilherme and removed request for ScottiBR December 17, 2025 16:17
@johnayeni johnayeni changed the title Add iris payment component Add IRIS payment component Dec 17, 2025
@johnayeni johnayeni requested a review from ScottiBR December 22, 2025 13:57
@johnayeni johnayeni requested a review from m1aw December 22, 2025 14:18

// Select an issuer from the dropdown (opens the listbox)
await iris.selectIssuerOnSelectorDropdown('Piraeus Bank');
await iris.pay();
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure that the interceptAndValidatePaymentResponse() is being executed and performing its assertions right after the await iris.pay() is called?

Asking because it seems weird by reading the code . I would expect to see the assertions of the payments response right after the payment step, but they are added as first thing in the function block. Feels like they might be ignored.

Copy link
Contributor

Choose a reason for hiding this comment

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

The assertions do run page.route() sets up an interceptor that fires when the request is made during iris.pay(). So the callback executes at the right time.

However, you raise a valid concern: if the request never happens, the test would pass silently with no assertions executed.

/**
* Number of milliseconds that the component will switch to throttled mode
*/
throttleTime?: number;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we add in the JSDoc what is the default value of these fields

@@ -0,0 +1,15 @@
import { IssuerListConfiguration, QRLoaderConfiguration } from '../types';

export type IrisConfiguration = IssuerListConfiguration & Pick<QRLoaderConfiguration, 'countdownTime' | 'qrCodeData' | 'paymentData' | 'delay'>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it expected to not expose the throttleTime and throttleInterval?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that is intentional. We decided to handle the throttleTime and throttleInterval exports in a separate PR, similar to how we managed the recent onKeyPress fix.

This approach allows us to keep this PR focused while we refine the logic for other payment methods. Specifically, we want to ensure we implement guardrails, such as enforcing a minimum throttle interval and validating related props, before exposing them to the public API.

Comment on lines +5 to +15
export interface IrisData {
paymentMethod: {
type: string;
issuer?: string;
};
}

export enum IrisMode {
QR_CODE = 'qrCode',
BANK_LIST = 'bankList'
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This types will be exposed in the public typescript definitions, although they are not needed to be there.

Perhaps add a description marking them as @internal and we add this feature in the near future , or move these types to a different file.

export { default as BillDeskWallet } from './BillDesk/BillDeskWallet';
export { default as Dotpay } from './Dotpay'; // add other tx variants
export { default as EPS } from './EPS';
export { default as Iris } from './Iris';
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Component is being exported here, but it is not added to the component-map.ts and component-name-map.ts files.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch, Done!

}, [props.setComponentRef, irisRef.current]);

useEffect(() => {
if (!props.issuers.length) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it even possible that the issuer list is empty when using this payment method ?

If that is not the case, I would rather not add custom logic for this scenario. That also simplifies upstream on Iris.tsx where we are checking a boolean flag to know if analytic events need to be sent or not.

}

export const SegmentedControlRegion = ({ id, ariaLabelledBy, className, children }: SegmentedControlRegionProps) => {
return (
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a sonarcloud issue about this specific div . Is it something that we need to look into?

@sonarqubecloud
Copy link

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.

4 participants