performFinishTransaction

Performs crucial concluding steps of an EMV transaction after the first Generate AC. This function handles:

  1. External Authentication (if applicable): If the card requests it (indicated in the response from the first Generate AC), this step involves sending an authentication request to the card using data from the issuer (Authorization Response Cryptogram - ARPC and potentially Issuer Authentication Data).

  2. Second Generate AC (if applicable): If the transaction was approved online or referred online by the issuer, and issuer authentication was successful (or not required), this function sends a command to the card to generate a second cryptogram (Transaction Certificate - TC for approvals, or Application Authentication Cryptogram - AAC for declines if issuer declined after an online referral that initially generated an ARQC).

  3. Issuer Script Processing (if applicable): If the issuer included any commands (issuer scripts) in the authorization response (e.g., to update card parameters, block the card), this function processes those scripts by sending them to the card.

This function must be called after a successful performTransaction call, particularly when an online authorization has been obtained or if issuer scripts need to be processed.

Return

TypeOutputFinishTransaction object containing the results of the performed operations, including the decision and the outcome of issuer script processing.

Parameters

tInputFinishTransaction

An object of type TypeInputFinishTransaction containing the necessary data for completing the transaction, such as Authorization Response Code, ARPC, Issuer Authentication Data, and Issuer Scripts.