Smart Cards and the Open Terminal Architecture
By Edward K. Conklin
Dr. Dobb's Journal December 1998
:INIT-PURCHASE ( S: -- ) ( Initialize the purchase transaction. Perform all common steps for online and offline transactions. ) NEEDS-UPLOADING? ERR-DENIED ?THROW \ Transaction log full ? LOAD-APPLICATION-DATA \ Load application data 5 TRS-TRANSACTION-AMOUNT \ Determine transaction amount EMV-INITIATE-APPLICATION \ Initiate application on card EMV-PROCESS-COMPLETE? \ $9000 returned ? GET-CURRENT-BALANCE \ Get current balance from card MSG-BALANCE TRS-CONSTRUCT-CH-MESSAGE \ Display balance for cardholder [ FLG-SECONDARY-DISPLAY ] [IF] MSG-PLEASE-WAIT TRS-CONSTRUCT-MRCH-MESSAGE \ Ask merchant to wait [THEN] EMV-READ-APPLICATION-DATA \ Read data from the card EMV-PROCESS-COMPLETE? \ $9000 returned ? ICC-PUBLIC-KEY-AUTH \ Authenticate ICC public key EMV-PROCESSING-RESTRICTIONS \ Check restrictions TRS-CHECK-STATUS \ Check transaction has not \ been canceled ;
Example 2: A sample OTA application.
Copyright © 1998, Dr. Dobb's Journal