2

I am working on MasterCard Acquisition project using emv Module 6.2. I can successfully generate 1st Ac and retrieve tags from it properly but i am asked to include also the result of the 2nd AC in my ICC data before transmission to the issuer.

How can i generate the 2nd AC and include it in my field 55?

knk
  • 45
  • 2
  • 9

1 Answers1

5

There looks to be some misunderstanding in what you need. can you explain the complete context. Below is how you deal in ideal environment. In first generate AC

  1. if you get ARQC you send it online to issuer.
  2. If you receive TC you approve the transaction offline.
  3. If it is AAC you decline offline.

Now assume you get ARQC and you are not able to go online, you check default action codes and if allowed you request for TC in second generate. If you get TC your transaction is approved offline, else you get AAC and transaction is declined!!!


---------------------05-Dec-2016-----------------------


Ok then i guess this is what you are looking for. CVR Byte 1 Bit 8 will tell whether second generate AC was requested or not. In an online transaction(after 1st Gen AC) this will be 1.Can you check what is it that you are sending now ?. Check the image for more information. enter image description here

Now you may not need action codes but fyi, you have three types of action codes. denial (to decline the transaction offline), online( to send transactions to issuer), default( to decide on how to proceed when online was opted but unable to. There are two sets of action codes - Terminal( which is used in terminal action analysis) and issuer( which is used by card action analysis). download emv books here to read more.

Btw, are you doing M-TIP ?

Adarsh Nanu
  • 2,133
  • 1
  • 13
  • 18
  • In my first generate AC i am getting an ARQC but they want to see also the result of the second generate AC in their logs once i send the request to the issuer in my field 55. How can i check the default action codes? and when is the second AC requested? – knk Dec 05 '16 at 07:58
  • I have edited my answer. Start reading from the line 05-Dec-2016 – Adarsh Nanu Dec 05 '16 at 09:17
  • ok. in the iteration result FIME would clearly mention what is expected. correct? to my knowledge there is no other place in online request where you mention about second gen ac. – Adarsh Nanu Dec 05 '16 at 16:20
  • so you mean that the second AC is only mentionned in offline transactions? – knk Dec 06 '16 at 09:42
  • no. second gen ac is performed after online transactions or when offline is allowed by default action code when unable to go online. you did not answer me regarding what is mentioned in iteration result. what is the cvr you are getting from card? – Adarsh Nanu Dec 06 '16 at 10:02
  • I am getting this 9F1012021020800F240000000000000000000001FF and the returned result is Byte 1 Bit 8 = 0, Byte 1 Bit 7 = 0 AAC Returned in Second Generate AC Byte 1 Bit 6 = 1, Byte 1 Bit 5 = 0 ARQC Returned in First Generate AC Byte 2 Bit 8 = 1 DDA Returned Byte 3 Bits 8-5 Right nibble of Script Counter = 0 Byte 3 Bits 4-1 Right nibble of PIN Try Counter = 15 Byte 4 Bit 6 = 1 Offline PIN Verification Not Performed Byte 4 Bit 3 = 1 International Transaction DAC/ICC Dynamic Number 2 Bytes 0000 Plaintext/Encrypted Counters 00000000000001FF – knk Dec 06 '16 at 10:28
  • you mean to say you are getting AAC and still you are moving ahead with the transaction? once you receive AAC you have to close the transaction. Correct? – Adarsh Nanu Dec 06 '16 at 10:54
  • Yes i am going ahead with transaction, i mean i send the transaction to the host..What should i receive in the second AC in order to continue with the transaction instead? – knk Dec 06 '16 at 12:32
  • Should i get a TC? – knk Dec 06 '16 at 12:38
  • you should send transaction to host only if you receive arqc. check tag 9f27( cryptogram information data) to identify this. if you receive AAC you should decline the transaction right away and end. – Adarsh Nanu Dec 06 '16 at 15:34
  • And also i wanted to understand how you decode EMV bytes-bits how is 1A giving for example Byte 1 Bit 8=0,Byte 1 Bit 7=0 And Byte 1 Bit 6 =0, Byte=1 Bit 5=1 – knk Dec 06 '16 at 16:03
  • But i am receiving ARQC in all of my first generate AC and the AAC just on the second AC. – knk Dec 06 '16 at 16:04
  • 1A = 0001 1010 bit 1=0, bit 2=1, bit 3 = 0.. from right to left. you are correct. ok to send transaction online if you are getting arqc. you still don't explaim what is given on iteration result and what correction is expected. – Adarsh Nanu Dec 06 '16 at 16:53
  • Those responses from FIME: i have to solve it by monday or tuesday EMV TAG 95 (TVR) is not correct for the Floor limit bit: Expected behavior TVR Byte 4 bit 8 = 1 Current behavior TVR Byte 4 bit 8 = 0 How should i set the Byte 4 bit 8 to 1? – knk Dec 09 '16 at 15:24
  • The card approves the transaction in response to the 1st Generate AC, therefore the terminal shall not send a 2nd Generate AC command – knk Dec 09 '16 at 15:24
  • Terminal does not provide the IAD value to the card Expected behavior : The terminal shall forward the IAD value to the card in the 2nd Generate AC command data, Current behavior : the IAD values is all zeroes in the 2nd Generate AC command data – knk Dec 09 '16 at 15:25
  • Terminal does not request an ARQC at 1st GENERATE AC Expected behavior : The test case expects the terminal to request an ARQC at 1st Generate AC. Current behavior : The terminal requests a TC at 1st Generate AC – knk Dec 09 '16 at 15:25
  • Regarding floor limit bit in TVR, does your terminal support offline sale? if yes and if the acquirer currency and card currency are same and the amount exceeds floor limit, then you turn on this bit. If no, then floor limit is zero and hence for all transactions this bit will be on. When you fix this issue this MAY solve your next issue. now you send all zeros instead of issuer authentication data since you do not have any ARPC. If this floor limit bit is ON it may not succeed offline action code and will match online action code. – Adarsh Nanu Dec 09 '16 at 16:08
  • Then you send for ARQC and you send to issuer. You get ARPC from issuer which you pass to card in second gen AC. This will solve your second issue also correct? Don't forget to upvote comments which helped you. – Adarsh Nanu Dec 09 '16 at 16:09