Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

v26.1.0: Library allows to provide small negative request amounts like -0.1, while -1.00 is returning failure #1105

Open
captador opened this issue Jan 21, 2025 · 0 comments

Comments

@captador
Copy link

Describe the bug
Library allows to provide small negative request amounts like -0.1, while -1.00 is returning failure about incorrect value of total amount. Moreover terminal will show 0,10 EUR amount as minus sign dropped at some point.

{"SaleToPOIRequest":{"MessageHeader":{"MessageClass":"Service","MessageCategory":"Payment","MessageType":"Request","ServiceID":"8D4415B5FA","SaleID":"SystemTests","POIID":"P400Plus-806***882","ProtocolVersion":"3.0"},"PaymentRequest":{"SaleData":{"SaleTransactionID":{"TransactionID":"b85fe4ea-c8ab-4b8c-aa63-9d88fe98afb6","TimeStamp":"2025-01-21T12:26:32"},"SaleToPOIData":"eyJPcGVyYXRpb24iOlt7IlR5cGUiOiJQYXltZW50In1dLCJWQVNNb2RlT3ZlcnJpZGUiOiJWQVNNb2RlUGF5bWVudE9ubHkifQ==","SaleToAcquirerData":"eyJhcHBsaWNhdGlvbkluZm8iOnsiYWR5ZW5MaWJyYXJ5Ijp7Im5hbWUiOiJhZHllbi1kb3RuZXQtYXBpLWxpYnJhcnkiLCJ2ZXJzaW9uIjoiMjYuMS4wIn19fQ==","OperatorID":"autotest_dev","SaleReferenceID":"systemTestaac5bf54-7cc5-47be-9be6-764a2e606dc8","TokenRequestedType":"Transaction"},"PaymentTransaction":{"AmountsReq":{"Currency":"EUR","RequestedAmount":-0.1},"TransactionConditions":{"CustomerLanguage":"fi"}},"PaymentData":{"CardAcquisitionReference":{"TransactionID":"bLEO001737462386004","TimeStamp":"2025-01-21T12:26:26"},"PaymentType":"Normal"}}}}

Expected behavior
Same failure is returned as for -1.00 requested amount

{"MessageHeader":{"MessageClass":"Service","MessageCategory":"CardAcquisition","MessageType":"Response","SaleID":"SystemTests","POIID":"P400Plus-806698882","ProtocolVersion":"3.0"},"MessagePayload":{"Response":{"AdditionalResponse":"{\"errors\":\"At SaleToPOIRequest.CardAcquisitionRequest.CardAcquisitionTransaction.TotalAmount: Invalid value\"}","Result":"Failure","ErrorCondition":"MessageFormat"},"SaleData":{"SaleTransactionID":{"TransactionID":"1915b3fa-fd3b-40f2-9963-a4c4448b4eaa","TimeStamp":"2025-01-21T12:31:08Z"},"SaleToAcquirerData":"eyJhcHBsaWNhdGlvbkluZm8iOnsiYWR5ZW5MaWJyYXJ5Ijp7Im5hbWUiOiJhZHllbi1kb3RuZXQtYXBpLWxpYnJhcnkiLCJ2ZXJzaW9uIjoiMjYuMS4wIn19fQ==","SaleReferenceID":"systemTest0f02dde9-9b35-434c-800e-9c4f7d761ff0","TokenRequestedType":"Transaction"},"POIData":{"POITransactionID":{"TransactionID":"bLEO001737462668001","TimeStamp":"2025-01-21T12:31:08.867Z"}}}}

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant