Page MenuHomePhabricator

Error 1099 : INVALID_VALUE: '2001.0000000000002' bug on local paymentswiki
Closed, ResolvedPublic

Description

I ran into this bug when clicking this link locally on vagrant:

https://payments.wiki.local.wmftest.net:4430/w/index.php?title=Special:IngenicoGateway&appeal=JimmyQuote&ffname=rcc-vmad&payment_method=cc&recurring=1&uselang=en&language=en&currency=EUR&country=NL&amount=20.01&first_name=Jimmy&last_name=Wales&street_address=1+Montgomery+Street&city=San+Francisco&state_province=CA&postal_code=94104&email=jwales%40example.com

syslog shows:

`Raw Response:{"errorId":"5ec54f963fb9c4db2bddb5e6910d98ad","errors":[{"code":"1099","id":"INVALID_VALUE","category":"CONNECT_PLATFORM_ERROR","message":"INVALID_VALUE: '2001.0000000000002' is not a valid value for field 'amount'","httpStatusCode":400}]}
May 20 15:41:10 mwv ingenico_gateway: 2147340749:2147340749.2 processResponse Error 1099 : INVALID_VALUE: '2001.0000000000002' is not a valid value for field 'amount'`

Event Timeline

I ran into this on docker too:

Trying to donate 4.23
2022-03-15T04:38:06+00:00 d708e8105c02 ingenico_gateway: 24:24.1 Raw Response:{"errorId":"6230182e9fb0adbfa8ec64c39fd7a527","errors":[{"code":"1099","id":"INVALID_VALUE","category":"CONNECT_PLATFORM_ERROR","message":"INVALID_VALUE: '423.00000000000006' is not a valid value for field 'amount'","httpStatusCode":400}]}

Trying to donate 4.11
2022-03-15T04:39:17+00:00 d708e8105c02 ingenico_gateway: 24:24.2 Raw Response:{"errorId":"62301875fc665d77b8f1619e4fdd3c0d","errors":[{"code":"1099","id":"INVALID_VALUE","category":"CONNECT_PLATFORM_ERROR","message":"INVALID_VALUE: '411.00000000000006' is not a valid value for field 'amount'","httpStatusCode":400}]}

Donating 10.00 went through

Change 772971 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/DonationInterface@master] AmountInCents should always round

https://gerrit.wikimedia.org/r/772971

Change 772971 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] AmountInCents should round after multiplying

https://gerrit.wikimedia.org/r/772971

Ejegg triaged this task as Medium priority.
DStrine set Final Story Points to 1.
  NODES
Note 3
Project 4