gpiMemSet(gEMVCoCtx.mTransactionalContext,0x00,sizeof(tTransactionalContext));
// Set now default parameters for transactional context and using proprietary tags
gEMVCoCtx.mTransactionalContext->mForceTRM = bTRUE; // Always bTRUE for L2 TA. If AIP is missing then do TRM depending on DF12, DF13, DF14
gEMVCoCtx.mTransactionalContext->mSkipTACIACDefault = bTRUE; // DF11. If online only terminal and unable to go online then ARC = Z3 + AAC at 2nd GenAC
gEMVCoCtx.mTransactionalContext->mVelocityChecking = bTRUE; // DF12
gEMVCoCtx.mTransactionalContext->mRandomTransactionSelection = bTRUE; // DF13
gEMVCoCtx.mTransactionalContext->mFloorLimitChecking = bTRUE; // DF14
gEMVCoCtx.mTransactionalContext->mTAC = bTRUE; // DF15
gEMVCoCtx.mTransactionalContext->mPinTimeOut = 10; // DF27
gpiMemCpy(gEMVCoCtx.mTransactionalContext->mTransactionDate,payCtx->mTransactionDate,sizeof(gEMVCoCtx.mTransactionalContext->mTransactionDate));
gpiMemCpy(gEMVCoCtx.mTransactionalContext->mTransactionTime,payCtx->mTransactionTime,sizeof(gEMVCoCtx.mTransactionalContext->mTransactionTime));
agnosError = agnOpenSession("","",(const tString)"EMVCO CT Example",(const tTransactionalContext*)gEMVCoCtx.mTransactionalContext,
bTRUE /*DirectExecution -> reach GenAC - no granular calls*/,
bFALSE /*setEMVTag calls are performed by L3*/,
&payCtx->mSession,
bFALSE /*clipping*/,
bFALSE /*sred*/);
agnSetEMVTag(payCtx->mSession,0x9C,1,(uint8_t*)"\x00"); // Transaction type: depends on Transaction Related Data (TRD)
agnSetEMVTag(payCtx->mSession,0x9F1A,2,(uint8_t*)"\x00\x00"); // Terminal Country Code: depends on merchant context
agnSetEMVTag(payCtx->mSession,0x9F33,3,(uint8_t*)"\x00\x00\x00"); // Terminal Capabilities: depends on ICS
agnSetEMVTag(payCtx->mSession,0x9F35,1,(uint8_t*)"\x00"); // Terminal Type: depends on TRD
agnSetEMVTag(payCtx->mSession,0x9F40,5,uint8_t*)"\x00\x00\x00\x00\x00"); // Additional Terminal Capabilities: depends on TRD
agnSetEMVTag(payCtx->mSession,0x9F39,1,"\x05"); // POS Entry Mode |