Open source contribution to Adyen: the bug I fixed that they couldn’t merge

AI-generated image for Orbitant's blog about open source contribution, featuring an open laptop in low light displaying source code with cyan highlighted annotations.

Due to security reasons, we can not directly accept 3rd party PR’s.

GUILHERME RIBEIRO
Maintainer de adyen-web

You can find a bug in Adyen’s payments SDK, get their own team to confirm it and propose a two-line fix — and still not be able to get your code merged. That’s what happened to me. My open source contribution had been waiting for eight days when a reply arrived with no technical reason at all: for security reasons, they no longer accept third-party pull requests.

It’s the first time this has happened to me, and I don’t think it’s an Adyen thing: put yourself in the shoes of someone who maintains the project and receives AI-generated patches every week that look flawless until you actually read them. Even so, the fix ended up shipping by another route.

A shopper in Taiwan seeing the checkout in the wrong Chinese

Adyen is the payment gateway behind charges you make every day: its public customers include Netflix, Spotify and Uber. Its web library renders the payment form in the browser, so if that screen breaks, there’s no sale.

The problem showed up while I was working on a feature for a client with international payment methods. When we configured the payment screen in Traditional Chinese (the one used in Taiwan), the text came out in Simplified Chinese, which is the one used in mainland China. It’s the same written language with two different writing systems, and someone reading in Taiwan doesn’t expect to see simplified characters.

What was curious was how it failed:

  • Amounts and dates were displayed correctly. The library knew perfectly well which country the shopper was in.
  • Only the text was wrong. It was downloading the wrong translation file.

The cause is one of those that’s infuriating precisely because it’s so small: to decide which translations to load, the library only looked at the first two letters of the language code. Both Chinese variants share those two letters, so it picked the first one it found in its list: Simplified Chinese. Portuguese had the same problem: the library loaded Brazilian Portuguese even when European Portuguese had been configured.

What makes this bug interesting beyond the specific case is that it didn’t break anything. There were no errors in the logs, no blank screen, no red test: everything worked, it just showed the shopper the wrong variant of their own language. That kind of failure slips past monitoring and only gets caught by someone from that market. Meanwhile, your checkout conversion can drop without showing up on any dashboard.

How I prepared my open source contribution so approving it took twenty minutes

A maintainer who receives code from a stranger first has to decide whether they can trust it. That check costs them time, so my goal was to make verifying the fix as cheap as possible. I followed this order:

  1. I started with the issue. I opened a report with a full reproduction: the exact steps, screenshots and the root cause pointing to the specific line. Nobody on their team had to investigate anything to confirm it.
  2. Before touching the code, I read their guidelines. Their pull request template says a lot about what they expect from a contribution. Straying from it guarantees an extra round of review — or silence.
  3. Tests, within their structure. This was by far the part that took the longest. I didn’t add new files: I figured out how theirs were set up so I could put the cases where they’d look for them.
  4. The fix, last and small. The proposal was two lines of real change; the rest was tests.

There’s a decision in there worth explaining, and it has little to do with purism: the fix wasn’t written by an AI. The value of this contribution lay in understanding why a behaviour contradicted itself, which is something you do by reading code with your own head. I used AI afterwards, once the development was done, only to check whether I’d missed any test case. That’s the split that works for us at Orbitant, and one we’ve already discussed when asking whether best practices still matter when you code with agents: AI is good at extending what you already understand and bad at replacing understanding.

“We can’t accept third-party PRs”: what has changed in open source

Eight days later, an Adyen maintainer closed my proposal, but didn’t discard it: they copied the fix into one of their own, merged it the next day, and it shipped in version 6.40.2 of the library, with credit in the release notes. They polished it a bit, including a slip of mine in the tests.

Due to security reasons, we can not directly accept 3rd party PR’s. Anyway, I cherry-picked your fix and adjusted some tests.

GUILHERME RIBEIRO
Maintainer de adyen-web

That first sentence stuck with me: I read those “security reasons” as a tangible consequence of the flood of AI-generated code. Reviewing other people’s code costs more today than it did two years ago, because you can no longer assume that whoever sent it understands what they sent. Ulises Gascón, software engineer and the person who has written the most here about AI-driven npm package attacks, agrees with the diagnosis: on top of the risk of malicious packages, there’s now the sheer volume of plausible contributions that nobody can audit at that pace.

It makes me a little sad, because getting your code merged into a big project used to be part of how you learned to work in the open. Still, closing that door doesn’t close off contribution: what still matters is the diagnosis, the reproduction and the tests — everything someone on the inside can verify and rewrite in twenty minutes. Writing the patch is the easy part: precisely the part that has become cheap.

The client solved their problem by updating a dependency, with no custom patches that someone would have to maintain forever. That same update also fixed it for every company in the world taking payments in Traditional Chinese or European Portuguese.

What we’ve changed from here on is our default when the failure lives in a dependency rather than in our own code: before patching locally, we weigh how much it costs to report it properly. It almost always costs less than it seems.

Follow our journey building AI agents from the inside

    Newsletter language: