Skip to content

Commit

Permalink
v1.3.4 processNumericButtonPressed() now checks the PMXPN fit record …
Browse files Browse the repository at this point in the history
…to get the PIN length
  • Loading branch information
timgabets committed Dec 1, 2017
1 parent c399bb8 commit 4c9f978
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
December 2017
1.3.4 processNumericButtonPressed() now checks the PMXPN fit record to get the PIN length
1.3.3 Fixed bug with undisplayed numeric data stored in buffer B on state H

Novemeber 2017
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "electron-atm",
"productName": "Electron ATM",
"version": "1.3.3",
"version": "1.3.4",
"description": "A simple APTRA Advance NDC ATM emulator",
"main": "main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/atm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ class ATM {
switch(this.current_state.get('type')){
case 'B':
this.PIN_buffer += button;
if(this.PIN_buffer.length === this.max_pin_length)
if(this.PIN_buffer.length === this.FITs.getMaxPINLength(this.card.number) || this.PIN_buffer.length === 6 )
this.processState(this.current_state.get('number'));
this.display.insertText(this.PIN_buffer, '*');
break;
Expand Down
1 change: 1 addition & 0 deletions tests/controllers/processPinpadButtonPressed.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ test('should put the entered numbers into PIN buffer', t => {
state.set('number', '230');
state.set('type', 'B');
atm.current_state = state;
atm.card = {number: '8888999900001111'};

atm.max_pin_length = 6;
atm.initBuffers();
Expand Down

0 comments on commit 4c9f978

Please sign in to comment.