Checkout countryCode comes from the server-wide org.killbill.server.region, not from the tenant or the account
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 56/100
Research direction
Start with AdyenSDKClientImpl.java, especially the countryCode assignment at line 69, then trace how AdyenActivator.java and AdyenConfigProperties supply configuration. Check the checkout session tests and add coverage for country selection across accounts or tenants. Done means each session uses the intended shopper or merchant country and invalid country values no longer cause the described checkout failure.
Written by the indexing model from the issue text.
Description
Symptoms
Every /sessions request the plugin sends to Adyen carries the same countryCode, the value of the Kill Bill server property org.killbill.server.region.
The value is the same for all tenants and all accounts on the server. The account’s country and the per-tenant Adyen config are not used.
Drop-in shows the payment methods of that one country for every shopper. For example, TWINT (CH only) appears only when the server region is CH.
When the region is not a valid ISO 3166 two-letter code, Adyen rejects the session and the checkout fails.
Steps to reproduce
- Set org.killbill.server.region=US and restart Kill Bill.
- Create an account with country=CH on a tenant configured for an Adyen merchant account that has TWINT enabled.
- Start a checkout for that account through the plugin (/plugins/adyen-plugin/checkout).
- Open Drop-in with the returned session.
Expected
- The session’s countryCode matches the shopper or merchant context (account country, or tenant setting), so CH payment methods (e.g. TWINT) are offered to a CH account.
- Different tenants or accounts on the same server can use different countries.
Actual
- countryCode=US is sent. TWINT is not offered.
- Changing the country requires changing a server-wide property and restarting, which affects every tenant.
- With a non-ISO region value, Adyen returns 422 "Field 'countryCode' is not valid", and the checkout call returns HTTP 500.
Evidence
-
AdyenSDKClientImpl.java line 69: checkoutSession.setCountryCode(adyenConfigProperties.getRegion());
-
AdyenActivator.java line 55: region read from PluginEnvironmentConfig.getRegion(...), i.e. the server property, passed to AdyenConfigurationHandler for all tenants.
-
AdyenConfigProperties: no tenant-level country setting.
-
Reproduced locally: the first checkout attempt failed with Adyen 422 countryCode invalid (logged in catalina.out). TWINT appeared in Drop-in only after setting the server region to CH.
- Dominant language
- Java
- Stars
- 11
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from killbill/killbill-adyen-plugin
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Amount sent to Adyen is wrong unless it has exactly two decimal places (e.g. 10 is charged as 0.10)Open
Difficulty 3/5 1-2 days Newbie friendliness 76/100
killbill/killbill-adyen-plugin#152 · 1 comment ·
-
Plugin cannot connect to Adyen LIVE: no setting for the live endpoint URL prefixPossibly taken @kccrcodes claimed this 2 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 74/100
killbill/killbill-adyen-plugin#151 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
All issues in killbill/killbill-adyen-plugin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
RegistryExceptionHandler uses self-referencing basePackageClasses instead of a controller classOpenbug finsim-registry good-first-issue
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
status:pending type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug level:trivial
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
exoego/keycloak-fuhito#666 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
hammy275/immersive-mc#669 ·