Amount sent to Adyen is wrong unless it has exactly two decimal places (e.g. 10 is charged as 0.10)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 76/100
Direzione di ricerca
Start by reading the amount conversion in src/main/java/org/killbill/billing/plugin/adyen/client/AdyenSDKClientImpl.java around lines 133–138, then check how sessions, refunds, and purchases use it. Verify the conversion against the CHF examples in the issue, including amounts with zero or more than two decimal places and currencies with different minor units; done means Adyen receives the correct minor-unit value for all three flows.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
The plugin converts the Kill Bill amount to Adyen minor units by removing the decimal point from the amount's string form. The result is correct only when the amount has exactly two decimals. Any other scale changes the amount sent to Adyen: 10 is sent as 10 minor units (0.10), and 10.5 as 105 (1.05). Currencies whose minor unit is not 2 decimals (e.g. JPY, KWD) are always converted incorrectly. Checkout sessions, purchases and refunds are affected.
Environment
- killbill-adyen-plugin 0.10.x (
maint-for-0-24-x) and 0.11.0 (master) - Kill Bill 0.24.x, Adyen TEST
Steps to reproduce
- Create a payment through the plugin with an amount that has no decimals:
POST /1.0/kb/accounts/{accountId}/paymentswith{"transactionType":"PURCHASE","amount":10,"currency":"CHF"} - Check the amount on the Adyen side (Customer Area or the AUTHORISATION webhook
amount.value).
Expected
Adyen receives amount.value = 1000 (CHF 10.00). Kill Bill and Adyen amounts match.
Actual
Adyen receives amount.value = 10 (CHF 0.10). Kill Bill records 10.00.
| Kill Bill amount | Sent to Adyen (amount.value) |
Charged |
|---|---|---|
10.00 |
1000 | 10.00 |
10 |
10 | 0.10 |
10.5 |
105 | 1.05 |
1.000000000 |
1000000000 | 10,000,000.00 |
Evidence
- Conversion:
AdyenSDKClientImpl.java#L133-L138String minorUnit = amount.toString().replace(".", ""); return Long.valueOf(minorUnit); - Used for:
- Observed:
- Local test: a demo-app checkout of
20was recorded in Kill Bill as 20.00 USD, while the Adyen AUTHORISATION webhook showedamount.value = 20.
- Local test: a demo-app checkout of
- Lingua principale
- Java
- Stelle
- 11
- Fork
- 31
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di killbill/killbill-adyen-plugin
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
-
Plugin cannot connect to Adyen LIVE: no setting for the live endpoint URL prefixForse già presa @kccrcodes l’ha presa 2 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 74/100
killbill/killbill-adyen-plugin#151 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 56/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
Tutte le issue di killbill/killbill-adyen-plugin
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
-
status:pending type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
bug level:trivial
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
exoego/keycloak-fuhito#666 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ant-media/Ant-Media-Server#8185 ·
I maintainer di solito rispondono entro 4 giorni
-
desktop grp:about type:graphics-bug ui-public
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno