[SUPP-5] Fix balance truncation in AUTH module #1

Open
startdata wants to merge 1 commits from fix/supp-5-auto-fix into main
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@
01 WS-TRANSACTION-DATA.
05 WS-CARD-NUMBER PIC X(16).
05 WS-TRANSACTION-AMOUNT PIC 9(11)V99.
05 WS-AVAILABLE-BALANCE PIC 9(9)V99.
05 WS-AVAILABLE-BALANCE PIC 9(11)V99.
05 WS-RESPONSE-CODE PIC 9(2).
05 WS-MERCHANT-ID PIC X(15).
@ -54,7 +54,7 @@
END-IF.
3000-CHECK-BALANCE.
* BUG: WS-AVAILABLE-BALANCE is PIC 9(9)V99 but HOST returns
* BUG: WS-AVAILABLE-BALANCE is PIC 9(11)V99 but HOST returns
* PIC 9(11)V99, causing truncation on amounts > 9,999,999.99
MOVE WS-HOST-BALANCE TO WS-AVAILABLE-BALANCE
IF WS-AVAILABLE-BALANCE >= WS-TRANSACTION-AMOUNT