ED/EP series 5 consumption instructions

Source: Internet
Author: User
1. Consumption transactions


The consumption transaction allows the cardholder to use the remaining amount of the electronic Passbook or wallet for shopping or obtaining services.

Features:
1) -- can be performed offline at the point of sale terminal (POS)
2) -- The personal identification code (PIN) must be submitted for consumption transactions using the electronic Passbook.


Steps:
1) -- Consumer test compound application consumption transaction



CPURESET () JE = 00000001 // consumption amount DPK = 000000000000000000000000000000000000005500a40000021001805c000204 (amount before consumption + 9000) // (see article 5.2.9 of JR/T 0025.2) 805001020B + 01 + JE + 000000000001 + 0F (XYSJ2 + 9000) YE = COPY (XYSJ2,) // ED or EP remaining amount 4 TJJYXH = COPY (XYSJ2, 9,4) // offline transaction No. 2 // overdraft limit 3 // key algorithm version (DPK) 1 // algorithm ID (DPK) 1 WSJS = LAST (XYSJ2, 8) // pseudo-random number (IC card) 4ECB_3DES_EN (WSJS + TJJYXH + 0011, DPK, SESLK) // transaction amount + transaction type identification + terminal number + transaction date (terminal) + transaction time (terminal) 3DES_MAC (0000000000000000 + JE + 06 + 000000000001 + 20090225 + 153030 + 800000000000, SESLK, MAC1) // debit for purchase/cash withdraw (see article 5.2.3 of JR/T 0025.2) // terminal transaction serial number + transaction date (terminal) + transaction time (terminal) + MAC1805401000F + 00000011 + 20090225 + 153030 + MAC1 + 08 // TAC4 // MAC24805C000204 (after consumption + 9000)




2. Compound application consumption transactions
The compound application purchase transaction allows the cardholder to use the remaining amount of the e-wallet for shopping or obtaining services. This transaction can be performed offline on terminal devices or other card reading devices. No need to submit a PIN for this transaction -- (for e-wallet ).

Features:
-- Can be performed offline on the terminal device or other card reading devices;
-- No need to submit a PIN)

Steps:
-- Terminal: issue the initialize for capp purchase command to start the composite application consumption transaction.
-- IC card: check the provided key index metadata (NO: 9403); check whether the wallet is locked (NO: 9408 ); check whether the remaining amount of the e-wallet is greater than or equal to the transaction amount (NO: 9401); generate a pseudo random number (ICC) and a process key
-- SESPK: pseudo-random number (ICC) | electronic wallet transaction No. | the rightmost two bytes of the terminal transaction No.
-- Terminal: generate MAC1 for IC card to verify the validity of PSAM
-- Terminal sends the update capp data cache command
-- IC card: Check whether there is a file with the same SFI value (NO: 6A82); query the record of the identifier (NO: 6A83); check the application lock Mark byte (NO: 9407 ); check whether the Data Domain length is greater than the corresponding record length (NO: 6A84)
-- Terminal: issue the debit for capp purchase command
-- IC card: verify the validity of MAC1 (NO: 9302)
-- IC card: Transaction processing, deduction of consumption amount, transaction serial number plus 1, update consumption transaction records, generate message signature code (MAC2)
-- Terminal: verify MAC2

Note: If the cardholder needs to use a non-contact financial IC card to trade in a specific application environment, the cardholder must first add the corresponding compound application type to the card, that is, enable this type of compound application. -- Transaction type identification '09'


CPURESET () 00A40000021001 // DPK consumption key DPK = 000000000000000000000000000000000055je = 00000001 // intialize for capp purchase (see article 5.2.12 of JR/T 0025.9) 805003020B + 01 + JE + 000000000001 + 0F (DATA + 9000) YE = COPY (DATA,) // The remaining amount of the e-wallet is 4 xh = COPY (DATA, 9, 4) // Electronic Wallet transaction No. 2 // overdraft limit 3 // key algorithm version (DPK) 1 // key ID (DPK) 1WS = LAST (DATA, 8) // pseudo-random number (IC card) 4 ZDJYXH = 00000001 // SESLK ECB_3DES_EN (WS + XH + 0001, DPK, SESLK) of the computing process key. // calculate MAC1. The data is: transaction amount + transaction type (social security must be converted to acⅱ code) + terminal number + transaction date + transaction time + 80 (supplemental length) 3DES_MAC (0000000000000000 + JE + 09 + 000000000001 + 20110106 + 120000 + 800000000000, SESLK, MAC1) // update capp data CACHE80DC01C8 + 20 + 011e00030b200905261_00000000000000000000000000000000000000 // debit for capp PURCHASE805401000F + ZDJYXH + 20110106 + 120000 + MAC1 + 08




3. Change overdraft quota transactions
Overdraft is a limited credit function based on the electronic Passbook application. If the overdraft limit exists, the remaining amount of the electronic Passbook is the sum of the actual deposit amount and the overdraft limit.

Features:
1) -- must be online on the financial terminal;
2) -- The personal identification code (PIN) must be submitted)
    
Steps:
1) -- terminal: issue the initialize for update command to start the overdraft quota change transaction.
2) -- IC card: Check whether the provided key index pair (NO: 9403) is supported to generate a pseudo-random number (ICC), a process key SESUK, and a packet authentication code (MAC1)
3) -- terminal: verify MAC1.
4) -- terminal: use SESUK to encrypt data to generate MAC2, and issue the update overdrawlimit command
5) -- IC card: verify the validity of MAC2
6) -- IC card: Transaction processing

-------------------- See Article 5.5.6 of JR/T 0025.2 (not)



CPURESET () JE = 00000001 // consumption amount DUK = 7dae5e53140a9170c21d5805eadb7e9a00a400000210020000003 + 888888 // Verify password // (see article 5.2.9 of JR/T 0025.2) secret key index + terminal number 8050040107 + 01 + 000000000001 (XYSJ2 + 9000) YE = COPY (XYSJ2,) // The remaining amount of ED 4 TJJYXH = COPY (XYSJ2, 9,4) // ED online transaction No. 2 YZXE = COPY (XYSJ2, 13, 6) // original overdraft limit 3 // key version (DUK) 1 // algorithm ID (DUK) 1 WSJS = COPY (XYSJ2, 23,8) // pseudo-random number (IC card) 4MAC1 = LAST (XYSJ2, 8) // MAC1 4 // SESUK: pseudo-random number (ICC) | online transaction No. Of the electronic Passbook | '000000' ECB _ 3DES_EN (WSJS + TJJYXH + 8000, DUK, SESLK) // remaining amount of the electronic Passbook + overdraft quota + transaction type identification + Terminal No. 3DES_MAC (0000000000000000 + YE + YZXE + 07 + 000000000001 + 8000, SESLK, _ MAC1) // overdraft quota + transaction type identification + terminal number + transaction date + transaction time 3DES_MAC (0000000000000000 + YE + YZXE + 07 + 000000000001 + 20090225 + 153030 + 800000, SESLK, MAC2) // New overdraft quota + transaction date (issuer) + transaction time (issuer) + MAC2805800000E + 20090225 + 153030 + MAC2 (TAC + 9000)

Text/Xin Xinyuan Chong  Reprinted please indicate the source http://blog.csdn.net/yxstars/article/details/38225043


ED/EP series 5 consumption instructions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.