Openbravo Issue Tracking System - Retail Modules
View Issue Details
0044615Retail ModulesNexo Implementationpublic2020-07-15 16:432020-07-22 19:01
lmonreal 
adrianromero 
urgentcriticalalways
closedfixed 
5
 
RR20Q4 
jorge-garcia
No
0044615: ACI- Timestamp for the request missing microseconds (.sss as per dev guide)
There is an issue with ACI due to the time stamp format.

Ensure the format:
So without a time zone sending the current local time should look like this should be:
<SaleTransactionID TransactionID="00792000004241594045784233" TimeStamp="2020-07-06T16:29:44.233"/>

The same time send in UTC offset should look like this:
<SaleTransactionID TransactionID="00792000004241594045784233" TimeStamp="2020-07-06T16:29:44.233+02:00"/>
See image attached, it is a must to ensure the timezone.

You are sending a payment transaction with an incorrectly formatted Timestamp and then immediately attempt to abort it .
The error for this can be seen in the log file:

2020-07-09 14:48:04,025 [EpasFrontEndProcessor worker thread - 3] ERROR eSocket.POS - 0. A software failure occurred and the following exception was thrown:%njava.text.ParseException: Unparseable date: "2020-07-09T12:48:04Z.000"
at java.text.DateFormat.parse(DateFormat.java:366)
at postilion.esposcar.sepafast.util.SepaUtils.translateEpasTimeStampIntoUTCTimezone(SepaUtils.java:1646)
at postilion.esposcar.sepafast.util.SepaUtils.translateEpasTimeStampToIso(SepaUtils.java:1613)
at postilion.esposcar.epas.handlers.AMessageHandler.constructTimeStampFieldsFromSaleDataToIso(AMessageHandler.java:1688)
at postilion.esposcar.epas.handlers.PaymentHandler.mapPaymentRequestFromEpasToIso(PaymentHandler.java:1247)
at postilion.esposcar.epas.handlers.PaymentHandler.processRequest(PaymentHandler.java:462)
at postilion.esposcar.epas.posinterface.EpasInterface.processRequest(EpasInterface.java:309)
at postilion.esocketpos.ESocketPOS.processRequest(ESocketPOS.java:813)
at postilion.esocketpos.ESocketPOS.processRequest(ESocketPOS.java:780)
at postilion.esocketpos.ESocketPOS.processRequest(ESocketPOS.java:723)
at postilion.esposcar.epas.posinterface.EpasFrontEndProcessor.processDataEventFromPosEntity(EpasFrontEndProcessor.java:261)
at postilion.esposcar.epas.posinterface.EpasFrontEndProcessor.processEvent(EpasFrontEndProcessor.java:108)
at postespos.core.util.Processor.run(Processor.java:209)

2020-07-09 14:48:04,026 [EpasFrontEndProcessor worker thread - 3] ERROR eSocket.POS - 0. A software failure occurred and the following exception was thrown:%njava.lang.NullPointerException
at postilion.esocketpos.ESocketPOS.processRequest(ESocketPOS.java:848)
at postilion.esocketpos.ESocketPOS.processRequest(ESocketPOS.java:780)
at postilion.esocketpos.ESocketPOS.processRequest(ESocketPOS.java:723)
at postilion.esposcar.epas.posinterface.EpasFrontEndProcessor.processDataEventFromPosEntity(EpasFrontEndProcessor.java:261)
at postilion.esposcar.epas.posinterface.EpasFrontEndProcessor.processEvent(EpasFrontEndProcessor.java:108)
at postespos.core.util.Processor.run(Processor.java:209)

I believe because of this error our epas frontend believes it is still busy processing a request (esocket never send a response for the request at 14:48 because of the format error) so by the time the 14:52 transaction is send and it is just declined straight off.

Solution:
A restart of the terminal will be needed to get it out of this state.

OB needs to see why the timstamp for the request at 14:48 was not according to dev guide. It is missing the microseconds (.sss as per dev guide).

Store made few EFT payment this afternoon (working well at the beginning).
Then, for one customer, they had an issue :

1) scan items using RFId basket --> normal behaviour
2) press on total
3) total amount in EFT
The pop up saying the EFT payment has been launched is diplayed
1s after, it says that the payment was rejected
But nothing had been displayed on the EFT device.

After that, all EFT payments had the same behaviour
Please see attached films (2 smartphone, 1 on WebPOS the other on the EFT)
No tags attached.
png image.png (60,060) 2020-07-15 21:20
https://issues.openbravo.com/file_download.php?file_id=14771&type=bug
png
Issue History
2020-07-15 16:43lmonrealNew Issue
2020-07-15 16:43lmonrealAssigned To => Retail
2020-07-15 16:43lmonrealResolution time => 1595196000
2020-07-15 16:43lmonrealTriggers an Emergency Pack => No
2020-07-15 16:45guillermogilCategoryWeb POS => Nexo Implementation
2020-07-15 16:45guillermogilDescription Updatedbug_revision_view_page.php?rev_id=21347#r21347
2020-07-15 21:20guillermogilDescription Updatedbug_revision_view_page.php?rev_id=21348#r21348
2020-07-15 21:20guillermogilFile Added: image.png
2020-07-15 21:21guillermogilDescription Updatedbug_revision_view_page.php?rev_id=21349#r21349
2020-07-20 17:16hgbotCheckin
2020-07-20 17:16hgbotNote Added: 0121540
2020-07-20 17:16hgbotStatusnew => resolved
2020-07-20 17:16hgbotResolutionopen => fixed
2020-07-20 17:16hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.nexoprovider/rev/0df8754f07b94f5782f3800a10f3139e77c9b7b5 [^]
2020-07-20 17:34guillermogilNote Added: 0121542
2020-07-20 17:34guillermogilAssigned ToRetail => adrianromero
2020-07-20 17:34guillermogilStatusresolved => new
2020-07-20 17:34guillermogilResolutionfixed => open
2020-07-20 17:35guillermogilNote Edited: 0121542bug_revision_view_page.php?bugnote_id=0121542#r21376
2020-07-20 17:52hgbotCheckin
2020-07-20 17:52hgbotNote Added: 0121543
2020-07-20 17:52hgbotStatusnew => resolved
2020-07-20 17:52hgbotResolutionopen => fixed
2020-07-20 17:52hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.nexoprovider/rev/0df8754f07b94f5782f3800a10f3139e77c9b7b5 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.nexoprovider/rev/90590516bea1b522dbe139c42fb47047a2f53a69 [^]
2020-07-21 10:16adrianromeroReview Assigned To => jorge-garcia
2020-07-22 09:07jorge-garciaNote Added: 0121557
2020-07-22 09:07jorge-garciaStatusresolved => closed
2020-07-22 09:07jorge-garciaFixed in Version => RR20Q4
2020-07-22 19:01hgbotCheckin
2020-07-22 19:01hgbotNote Added: 0121569
2020-07-22 19:01hgbotCheckin
2020-07-22 19:01hgbotNote Added: 0121570

Notes
(0121540)
hgbot   
2020-07-20 17:16   
Repository: erp/pmods/org.openbravo.retail.nexoprovider
Changeset: 0df8754f07b94f5782f3800a10f3139e77c9b7b5
Author: Adrián Romero <adrian.romero <at> openbravo.com>
Date: Mon Jul 20 17:13:33 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.nexoprovider/rev/0df8754f07b94f5782f3800a10f3139e77c9b7b5 [^]

Fixes ISSUE-0044615: ACI- Timestamp for the request missing microseconds
* Fixes formatting date function to fit ACI requirements

---
M web/org.openbravo.retail.nexoprovider/js/models/loginNexoModel.js
M web/org.openbravo.retail.nexoprovider/js/models/paymentNexoModel.js
M web/org.openbravo.retail.nexoprovider/js/models/serializer.js
M web/org.openbravo.retail.nexoprovider/js/websocket/mockWebsocket.js
---
(0121542)
guillermogil   
2020-07-20 17:34   
(edited on: 2020-07-20 17:35)
Fix is not OK, the local time is not being sent:

new Date()
Mon Jul 20 2020 17:33:30 GMT+0200 (Central European Summer Time)

convertDateTime(new Date())
"2020-07-20T15:33:34.438"

convertDateTime should return "2020-07-20T17:33:34.438" in the above example

So without a time zone sending the current local time should look like this should be:
<SaleTransactionID TransactionID="00792000004241594045784233" TimeStamp="2020-07-06T16:29:44.233"/>

The same time send in UTC offset should look like this:
<SaleTransactionID TransactionID="00792000004241594045784233" TimeStamp="2020-07-06T16:29:44.233+02:00"/>

(0121543)
hgbot   
2020-07-20 17:52   
Repository: erp/pmods/org.openbravo.retail.nexoprovider
Changeset: 90590516bea1b522dbe139c42fb47047a2f53a69
Author: Adrián Romero <adrian.romero <at> openbravo.com>
Date: Mon Jul 20 17:52:10 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.nexoprovider/rev/90590516bea1b522dbe139c42fb47047a2f53a69 [^]

Fixes ISSUE-0044615: ACI- Timestamp for the request missing microseconds
* Uses Local time instead of UTC time

---
M web/org.openbravo.retail.nexoprovider/js/models/serializer.js
---
(0121557)
jorge-garcia   
2020-07-22 09:07   
Code reviewed ok
(0121569)
hgbot   
2020-07-22 19:01   
Repository: erp/pmods/org.openbravo.retail.nexoprovider
Changeset: 27cb9ed4f7a12ca094c540486ecf42c890b77911
Author: Adrián Romero <adrian.romero <at> openbravo.com>
Date: Wed Jul 22 18:59:52 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.nexoprovider/rev/27cb9ed4f7a12ca094c540486ecf42c890b77911 [^]

Related to ISSUE-0044615: ACI- Timestamp for the request missing microseconds * Uses Local time instead of UTC time
* Reorganize code for unit testing purposes

---
M src/org/openbravo/retail/nexoprovider/NEXOComponentProvider.java
M web/org.openbravo.retail.nexoprovider/js/models/serializer.js
A web/org.openbravo.retail.nexoprovider/js/utils/getdatetime.js
---
(0121570)
hgbot   
2020-07-22 19:01   
Repository: erp/pmods/org.openbravo.retail.nexoprovider
Changeset: 76947e7d7ed6762c172927e06fccdce06e412baf
Author: Adrián Romero <adrian.romero <at> openbravo.com>
Date: Wed Jul 22 19:00:30 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.nexoprovider/rev/76947e7d7ed6762c172927e06fccdce06e412baf [^]

Related to ISSUE-0044615: ACI- Timestamp for the request missing microseconds * Uses Local time instead of UTC time
* Fixes unit tests according new timestamp functions

---
M web-test/modellogin.test.js
M web-test/modelpayment.test.js
M web-test/nexoprocess.test.js
M web-test/payment.test.js
M web-test/rootnexo.js
---