Amadis

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 40 Next »

AgnosMW provides a set of primitives to manage the transient data model. It also defines the C structures used to manage transaction flows:

  • tPaymentContext

  • tOutComeParameter

C Structures

tPaymentContext (paymentMW.h)

  • Information provided by Level3: these data members must be filled up by the payment application integrating Agnos API. These data members are provided by a TRD trigggered by a sales system or a test environment (ACE)

  • Information set by Payment System:

    • mEMVContact/mEMVContactless/mMagstripe: these data members are initialized from TERMINAL file by AgnosEP at enpInitialize calling time. They are mandatory only when integrating a CL acceptance system supporting contact and/or magstripe

    • Tags 9F3A/9F3C/9F3D (meant for contact only): not used yet

    • Tag 5F57, account type (meant for contact and contacless): this data is used to set AgnosDB with from a TRD trigggered by a sales system or a test environment (ACE). If missing or lenth invalid 5F57 is systematically set to empty

    • Tag 9F39, POS entry mode (meant for contact and contactless):

      • Magstripe: set by payment application to MAG_MODE = 0x90

      • Contact: set by payment application to MAG_MODE = 0x05

      • Fallback from Contact to Magstripe: set by payment application to FALLBACK_MODE=0x80

      • Contactless: set by contactless card processing to EMV_CL_MODE=0x07 or MAG_CL_MODE=0x91

    • Tag 9F41, Transaction Counter (meant for contact only): this data member is used by emvco.c to demonstrate that each subsequent transsction can be indexed by a counter (for the purpose of L2 TA)

    • mARC (meant for contact and contactless): this data member is set by payment application just before completion from issuer response. It is used to set mCID to TC or AAC

    • mUnableToGoOnline (meant for contact only): this data member is set by payment application just before completion to indicate how to manage risk at GenAC2 time

  • Information set by Payment Application (from Agnos primitives):

    • mRID:

    • mADF:

    • mADFOrder:

  • Information set by EMV Library:

    • mSession

    • mCID

  • Information calculated by Level3: these data members are set automatically on at pmwSetEMVResult calling time. It shall be called at the end of any EMV contact transactions by payment application. It is systematically called by AgnosEP at the end of any contactless transaction

  • Level3<->Level2 communication: this data member is only meant for contactless transaction when supporting data exchange. Even if it is mandatory for few payment schemes during L2 TA, it is not mandatory to support it in production

typedef struct {
////////////////////////////////////////////////////////////////////
// Information provided by Level3
tAmount *mAmount;// EMV Tag 9F02 = "Amount, Authorized"  + "Amount, Other"
tAmount *mCashBack;// EMV Tag 9F03 = "Amount, Other"
tTransactionType mTransactionType;// EMV Tag 9C
tNumericDate mTransactionDate[3];// EMV Tag 9A
tNumericDate mTransactionTime[3];// EMV Tag 9F21
tByte mMerchantCustomData[20];// EMV Tag 9F7C
tByte mTransactionCurrencyCode[2];// EMV Tag 5F2A
tByte mTransactionCurrencyExponent;// EMV Tag 5F36
tByte mTransactionCategoryCode;// EMV Tag 9F53
tByte mMerchantCategoryCode[2];// EMV Tag 9F15
tByte mMerchantID[15];// EMV Tag 9F16
tBoolean mForcedOnline;// As per merchant decision. Proprietary tag: DF7F
char mWorkingPath[2*MAX_NAME_LENGTH]; // Correspond to path referencing where configuration files are stored

////////////////////////////////////////////////////////////////////
// Information set by Payment System
tBoolean mEMVContact;// by configuration (terminal)
tBoolean mEMVContactless;// by configuration	(terminal)
tBoolean mMagstripe;// by configuration	(terminal)

tAmount mAmountReferenceCurrency;// EMV Tag 9F3A - not used yet
tByte mTransactionReferenceCurrencyCode[2];// EMV Tag 9F3C - not used yet
tByte mTransactionReferenceCurrencyExponent;// EMV Tag 9F3D - not used yet
tByte mTerminalRiskManagementData[8];// EMV Tag 9F1D - not used yet
tAccountType mAccountType;// EMV Tag 5F57 - payment application specific
tByte mPOSEntryMode;// EMV Tag 9F39 - payment application specific

tCounter mTransactionSequenceCounter;
tARC mARC;//Authorization Response Code, eg mapping from Issuer's Response Code (ISO8583:DE39)
tBoolean mUnableToGoOnline;

////////////////////////////////////////////////////////////////////
// Information set by Payment Application (from Agnos primitives)
tByte mRID[RID_LENGTH];
tADF mADF;
tByte mADFOrderNumber;// For a given configuration, AID's order number

 tBoolean mAdvice;
 tBoolean mBatchData;
 tBoolean mReversal;

////////////////////////////////////////////////////////////////////
// Information set by EMV Library
tSessionId mSession;
tByte mCID;// Information used by Level3 to detect transaction's outcome requested by ICC
	
////////////////////////////////////////////////////////////////////
// Information calculated by Level3 once transaction is completed (from paymentMW primitives)
tByte mFinal9F02[6];
tByte mCVMResult[3];
tByte mTVR[5];
tByte mTSI[2];
tByte mAC[8];
tByte mUN[4];
tByte mAID[MAX_AID_LENGTH];
tByte mAIDLen;
tByte mPANSHA[20];
tByte mCardholderNameLen;
tByte mCardholderName[26];
tByte mAgnosTVR[AGNOS_TVR_SIZE];
#ifdef _AGNOSISR_
tBoolean mIsScriptExecuted;
tByte mIssuerScriptResultLen;
tByte mIssuerScriptResult[2*MAX_SCRIPT*sizeof(tScriptResult)];
#endif

////////////////////////////////////////////////////////////////////
// Level3 <-> Level2 communication
tDataExchange mDataExchange;

} tPaymentContext;

tOutComeParameter (paymentMW.h)

typedef struct {
tOutCome mOutCome;

tStartingPoint mStartingPoint;
tOnlineResponseData mOnlineResponseData;
tCVM mCVM;
tBoolean mUIReqOnOutcomePresent; // If bTRUE, found in DataExchange
tBoolean mUIReqOnRestartPresent; // If bTRUE, found in DataExchange
tBoolean mReceipt;
tBoolean mDRPresent;	// Data record. If present, found in DataExchange
tBoolean mDDPresent;	// Discretionary Data. If present, found in DataExchange
tAlternateInterfacePreference mAlternateInterfacePreference;
tWord mFieldOffReq;
tWord mRemovalTimeout;

} tOutComeParameter;

Primitives

Names

Comments

Initialization

pmwGetPaymentMiddlewareVersionNumber

Get AgnosMW version

pmwGetKernelVersion

Get EMV core engine version

pmwInitializePaymentContext

Shall be called before any new transaction

pmwIntializeOutComeParameter

Shall be called before any new transaction

dtmInitializeFromFile

Agnos uses three files to persit the data model:

  • TERMINAL

  • PROCESSING

  • ENTRY_POINT

Use this primitive ahead any transaction flow in order to initialize the transient data model.

Data Model

dtmSetTransactionalContext

dtmSetData

  • TERMINAL_CTX

  • CONTACT_PROCESSING_CTX

  • CONTACTLESS_PROCESSING_CTX

  • ENTRY_POINT

dtmGetData

  • TERMINAL_CTX

  • CONTACT_PROCESSING_CTX

  • CONTACTLESS_PROCESSING_CTX

  • ENTRY_POINT

EMV Selection

pmwProceedToUniversalFinalSelection

Proceed to standard final selection following EMVCo specs. This function call can be overloaded in CT and hooked in contactless in order to implement specific selection logic (US, Canada, France)

Others

dtmSelectCTKernel

pmwSetEMVResult

Set EMV parameters after a transaction within tPaymentContext based on Agnos status.

In contact, this shall be systematically called by payment application.

In contactless, AgnosEP encapsulated that call.

pmwCloseSession

Close Agnos session

  • No labels