Openbravo Issue Tracking System - POS2
View Issue Details
0047245POS2POSpublic2021-06-24 15:592021-10-04 12:14
timothee_catteeuw 
adrianromero 
normalminorhave not tried
closedfixed 
5
 
TAP 
No
0047245: JIRA 2124 - Axis C3 initialization start for every login
For every login to Webpos, Axis C3 initialization start, here there are 2 possible behaviors :
- If the AxisC3 init configuration was not done, an error message appears
--> that case has to be correctly managed if no AxiC3 is configured on the related touchpoint
- Otherwise Axis C3 initialization start and check every components related to payment methods

In both cases, this initialization has not to be done for each login, it is really annoying because that will waste cashier's time as soon as he want to use the till.

2 possibilities in order to avoid this behavior :
- launch the initialization just once a day (or less frequently)
--> ideally trough a parameter in channel touchpoint menu allowing to configure the time between 2 init
- launch the initialization in background mode. It will allow to use WebPOS but the card payment method will not be available in that case before finishing the process
Tested with a channel touchpoint correctly configured in Axis C3 terminal configuration available in the related menu on BO (cf. this doc http://wiki.openbravo.com/wiki/Retail:AXISC3_Payment_Provider [^])
- Host : localhost
- Port : 9518
- Terminal : 00000165
- Prints info checked
- interface : network

Log in WebPOS
The application launch an initialization of payment terminal
Log out
Login
The application launch an initialization of payment terminal
and so on.
The proposal is to continue executing the initialization in the login but only if the device has not been initialized in a period of X hours. X will be a value configured at POS terminal level. If value equals to 0 (the default to not to change the current behaviour), initialization will be executed in every login. A good configuration value to guarantee the initialization will be executed every day can be 16 hours instead of 24 hours to be sure that initialization will happen every day even if one day the cashier logs in some minutes before the previous day.

This way if for example, the configuration value is 16 hours, if the POS terminal logs in at 9:00am and executes the initialization, in the next logins during the day the initialization will not be executed. But if the cashier logs in after 1:00am of the day after, in that moment the initialization will be executed.

This solution must be implemented in the module org.openbravo.retail.asyncpayprovider. As this module is currently in charge of managing the initialization of the device. Now, the function isLoggedIn() is used to check whether the initialization is executed or not. And the flag is set to true in the login, and to false in the logout.

The idea is to add a new check and execute the initialization not only if !isLoggedIn() but also if the previous initialization has happened before than the number of hours configured, and then save the last time the initialization has been executed in the localstorage the same way the logged in flag is saved in the local storage. This way it can be checked when the last initialization has been executed.

Note that the loggedin flag must be set to true and stored whether the initialization has been executed or not.

Note also that there is a menu option to execute the initialization. Saving the last time initialization has been executed must be done in both cases no matter when the initialization happens, in the login, or executing the menu option. I mean the initialization process must be responsible of saving in the local storage the last time the initialization has been executed.

No tags attached.
depends on backport 0047614TAP closed adrianromero JIRA 2124 - Axis C3 initialization start for every login 
Issue History
2021-06-24 15:59timothee_catteeuwNew Issue
2021-06-24 15:59timothee_catteeuwAssigned To => timothee_catteeuw
2021-06-24 15:59timothee_catteeuwTriggers an Emergency Pack => No
2021-06-24 15:59timothee_catteeuwSummaryJIRA 2124 - Axis C3 initialization done for every login => ISSUE NOT FINISHED / IN PROGRESS (JIRA 2124 - Axis C3 initialization done for every login)
2021-06-24 16:24timothee_catteeuwDescription Updatedbug_revision_view_page.php?rev_id=22777#r22777
2021-06-24 16:24timothee_catteeuwSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22779#r22779
2021-06-24 16:54timothee_catteeuwDescription Updatedbug_revision_view_page.php?rev_id=22780#r22780
2021-06-24 16:55timothee_catteeuwAssigned Totimothee_catteeuw =>
2021-06-24 16:55timothee_catteeuwSummaryISSUE NOT FINISHED / IN PROGRESS (JIRA 2124 - Axis C3 initialization done for every login) => JIRA 2124 - Axis C3 initialization start for every login
2021-06-24 16:57timothee_catteeuwDescription Updatedbug_revision_view_page.php?rev_id=22781#r22781
2021-06-24 16:57timothee_catteeuwAssigned To => Retail
2021-06-25 12:21adrianromeroNote Added: 0129793
2021-06-25 12:25adrianromeroNote Edited: 0129793bug_revision_view_page.php?bugnote_id=0129793#r22789
2021-06-25 13:01dmiguelezNote Added: 0129794
2021-06-25 13:01dmiguelezSeveritymajor => minor
2021-06-25 13:01dmiguelezTypedefect => feature request
2021-06-29 17:44timothee_catteeuwNote Added: 0129961
2021-07-20 11:08adrianromeroProposed Solution updated
2021-07-20 11:13adrianromeroProposed Solution updated
2021-08-23 09:56dmiguelezResolution time => 1630274400
2021-08-24 13:19dmiguelezStatusnew => scheduled
2021-08-24 13:19dmiguelezAssigned ToRetail => adrianromero
2021-08-24 13:43hgbotNote Added: 0131312
2021-08-24 13:45hgbotNote Added: 0131322
2021-09-01 12:19hgbotResolutionopen => fixed
2021-09-01 12:19hgbotStatusscheduled => closed
2021-09-01 12:19hgbotNote Added: 0131472
2021-09-01 12:19hgbotNote Added: 0131473
2021-09-01 12:19hgbotNote Added: 0131474
2021-09-01 12:19hgbotNote Added: 0131475
2021-09-01 12:21hgbotNote Added: 0131476
2021-09-01 12:21hgbotNote Added: 0131477
2021-09-01 12:21hgbotNote Added: 0131478
2021-09-01 12:21hgbotNote Added: 0131479
2021-09-01 13:21hgbotNote Added: 0131483
2021-09-01 14:03guilleaerStatusclosed => new
2021-09-01 14:03guilleaerResolutionfixed => open
2021-09-01 14:03guilleaerStatusnew => scheduled
2021-09-01 14:03guilleaerStatusscheduled => resolved
2021-09-01 14:03guilleaerResolutionopen => fixed
2021-09-01 14:03guilleaerStatusresolved => closed
2021-10-04 12:01hgbotNote Added: 0132120
2021-10-04 12:14hgbotNote Added: 0132121

Notes
(0129793)
adrianromero   
2021-06-25 12:21   
(edited on: 2021-06-25 12:25)
This is the intended behaviour. As especified by the he AXISC3 integration documentation by Ingenico, the POS APPLICATION must send an initialization command to the C3 to initialize the payment. And it is recomended upon the opening and closing of each sales session.

Actually the normal operation of a POS is to login one time or two a day. Initalization takes few seconds.

(0129794)
dmiguelez   
2021-06-25 13:01   
Updated as Feature Request and minor due to the comment from Adrian.

The feature request would be to try to store information for one day, for example, to avoid some of the actual calls
(0129961)
timothee_catteeuw   
2021-06-29 17:44   
Feedback received by email :

→ Indeed, initialization must be performed daily at the start and end of the day. Therefore, initialization at the start of each session is not useful if the initialization has already been performed at the start of the day

So behavior to adapt and as a reminder :
2 things to keep in mind → in restaurant context, users close and open their sessions frequently in comparaison with retail. And secondly, according to my tests we need to wait for at least 15-20 seconds, that’s very long.

Correction to plan.
(0131312)
hgbot   
2021-08-24 13:43   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider/-/merge_requests/10 [^]
(0131322)
hgbot   
2021-08-24 13:45   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.axisc3/-/merge_requests/10 [^]
(0131472)
hgbot   
2021-09-01 12:19   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider [^]
Changeset: 4ca2f632bc729c463044d116f3d9920836a32847
Author: Adrián Romero <adrian.romero@openbravo.com>
Date: 2021-08-24T13:42:25+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider/-/commit/4ca2f632bc729c463044d116f3d9920836a32847 [^]

Fixes ISSUE-0047245: Initialization required after a period of time

---
M web/org.openbravo.retail.asyncpayprovider/source/hook/loginhook.js
M web/org.openbravo.retail.asyncpayprovider/source/utils/paymentterminal.js
---
(0131473)
hgbot   
2021-09-01 12:19   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider [^]
Changeset: 4a869c0849844424e5e42fb45cd3086f8df2dd84
Author: Adrián Romero <adrian.romero@openbravo.com>
Date: 2021-08-31T20:09:36+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider/-/commit/4a869c0849844424e5e42fb45cd3086f8df2dd84 [^]

Fixes ISSUE-0047245: Initialization required after a period of time
* Refactor to allow initialization default by integration provider and comment central function isInitValid()

---
M web/org.openbravo.retail.asyncpayprovider/source/hook/loginhook.js
M web/org.openbravo.retail.asyncpayprovider/source/utils/paymentterminal.js
---
(0131474)
hgbot   
2021-09-01 12:19   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider [^]
Changeset: e0656aca9bd40a77eac1a98aebbc4ddc7d89dbe4
Author: Adrián Romero <adrian.romero@openbravo.com>
Date: 2021-09-01T12:18:20+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider/-/commit/e0656aca9bd40a77eac1a98aebbc4ddc7d89dbe4 [^]

Fixes ISSUE-0047245: Initialization required after a period of time

---
M web/org.openbravo.retail.asyncpayprovider/source/hook/loginhook.js
M web/org.openbravo.retail.asyncpayprovider/source/utils/paymentterminal.js
---
(0131475)
hgbot   
2021-09-01 12:19   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider/-/merge_requests/10 [^]
(0131476)
hgbot   
2021-09-01 12:21   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.axisc3 [^]
Changeset: ccfa7a6c0af794404469c2ab3bc0ac17cdf86da5
Author: Adrián Romero <adrian.romero@openbravo.com>
Date: 2021-08-24T13:41:54+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.axisc3/-/commit/ccfa7a6c0af794404469c2ab3bc0ac17cdf86da5 [^]

Fixes ISSUE-0047245: Initialization required after a period of time

---
M src-db/database/model/modifiedTables/OBPOS_APPLICATIONS.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/retail/axisc3/AC3TerminalProperties.java
M web-jspack/org.openbravo.retail.axisc3/src/components/PaymentIntegration/LoginProvider.jsx
M web/org.openbravo.retail.axisc3/source/terminal/terminalinstance.js
---
(0131477)
hgbot   
2021-09-01 12:21   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.axisc3 [^]
Changeset: 9dec72c837cfb81649efed4a28ab77bd102ecace
Author: Adrián Romero <adrian.romero@openbravo.com>
Date: 2021-08-31T20:11:06+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.axisc3/-/commit/9dec72c837cfb81649efed4a28ab77bd102ecace [^]

Fixes ISSUE-0047245: Initialization required after a period of time
* Set AXISC3 default initialization to 24 hours

---
M web-jspack/org.openbravo.retail.axisc3/src/components/PaymentIntegration/LoginProvider.jsx
M web/org.openbravo.retail.axisc3/source/hooks/openSessionHook.js
M web/org.openbravo.retail.axisc3/source/terminal/terminalinstance.js
---
(0131478)
hgbot   
2021-09-01 12:21   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.axisc3 [^]
Changeset: 463a4d164cd91548458e1ada082bed4202edde50
Author: Adrián Romero <adrian.romero@openbravo.com>
Date: 2021-09-01T12:20:22+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.axisc3/-/commit/463a4d164cd91548458e1ada082bed4202edde50 [^]

Fixes ISSUE-0047245: Initialization required after a period of time

---
M src-db/database/model/modifiedTables/OBPOS_APPLICATIONS.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/retail/axisc3/AC3TerminalProperties.java
M web-jspack/org.openbravo.retail.axisc3/src/components/PaymentIntegration/LoginProvider.jsx
M web/org.openbravo.retail.axisc3/source/hooks/openSessionHook.js
M web/org.openbravo.retail.axisc3/source/terminal/terminalinstance.js
---
(0131479)
hgbot   
2021-09-01 12:21   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.axisc3/-/merge_requests/10 [^]
(0131483)
hgbot   
2021-09-01 13:21   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider [^]
Changeset: 3d7b5fc22091bfd0ffb09ac6cdcc24fc01398749
Author: Adrián Romero <adrian.romero@openbravo.com>
Date: 2021-09-01T13:21:11+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider/-/commit/3d7b5fc22091bfd0ffb09ac6cdcc24fc01398749 [^]

Related ISSUE-0047245: Initialization required after a period of time
* Fixes differences in summer and winter times

---
M web/org.openbravo.retail.asyncpayprovider/source/utils/paymentterminal.js
---
(0132120)
hgbot   
2021-10-04 12:01   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.axisc3 [^]
Changeset: 15ba98090a563dee4e0055dd574f129eba239f5c
Author: Adrián Romero <adrian.romero@openbravo.com>
Date: 2021-10-04T12:00:41+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.axisc3/-/commit/15ba98090a563dee4e0055dd574f129eba239f5c [^]

Fixes ISSUE-0047245: JIRA 2368 - AXISC3 payment integration does not have defined the UserActions in the dictionary
* Adds the definition of the AXISC3 user actions in the dictionary

---
A src-db/database/sourcedata/OBC2_USER_ACTION.xml
---
(0132121)
hgbot   
2021-10-04 12:14   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.axisc3 [^]
Changeset: 3cfa26166e1f8d76918e2b6479496f283a436b8d
Author: Adrián Romero <adrian.romero@openbravo.com>
Date: 2021-10-04T12:10:07+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.axisc3/-/commit/3cfa26166e1f8d76918e2b6479496f283a436b8d [^]

Revert "Fixes ISSUE-0047245: JIRA 2368 - AXISC3 payment integration does not have defined the UserActions in the dictionary"

This reverts commit 15ba98090a563dee4e0055dd574f129eba239f5c.

---
R src-db/database/sourcedata/OBC2_USER_ACTION.xml
---