Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
static tEntryPointIndicators riskParameters[numberOfMaxSession]; // Store TTQ copy (among other flags) so that it can be fetched during actual card processing
// NumberOfMaxSession reflects the maximum number of times the entry point will be calling the preprocessing for a given transaction type
tPaymentContext payment;
tByte i; // session identifier corresponding to a CL combination
 
//
// At EACH ENTRY POINT CALL triggering, start preprocessing (i.e. once per eligible [kernel Identifier,AID Identifier] for a given transaction type)
//
// BEGIN ------------------------
 
// Reset payment context
pmwInitializePaymentContext(&payment);
 
//
// Prepare payment context
// Set tPaymentContext data members like
// 9F02, 9F03, 9C, 9A, 9F21, 5F2A, 5F36, 9F7C (see paymentMW.h, tPaymentContext structure/Information provide by Level3 section)
//
 
// Open session
afsWhatIsYourVersion(version);
agnOpenSessionCL((char*)"smartcardReaderName",(char*)"pinPadName",version,&txnContext,setEMVTag,&i,clipping,sred); // Where i is in [1..numberOfMaxSession]
 
// Depending of the kernel, some proprietary tags need to be converted
 
// Prepare session data
agnSetAgnosDataBaseStrategy(payment->mSession,STRATEGY); // STRATEGY value depends on Agnos kernel
xxxSetUpdateCondition(); // xxx prefix varies on Agnos kernel
adbSetAddTagContactlessCallback(&_xxxAddTag); // xxx prefix varies on Agnos kernel
agnSetAgnosDatabase(i,TLV,TLVLengh); // TLV contains selected CL combination for the preprocessing, where i is in [1..numberOfMaxSession]
 
// Card processing
afsPreprocessing(NULL,&riskParameters[i],&payment); // where i is in [1..numberOfMaxSession]
 
// Process preprocessing results like
// riskParameters->mExtendedSelectionFlagSupported
// riskParameters->mTTQCopy
// riskParameters->mContactlessApplicationNotAllowed
// riskParameters->mStatusCheckRequested
 
 
// END ------------------------

Pseudo-code Sequence (performing a transaction)

The following sequence is a generic example that may be used to encapsulate any Agnos kernel from a specific entry point framework.

...