Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

AgnosEP

See entrypoint.h, loader.h

enpConnectPaymentServices

Code Block
languagec
DLLEXPORT void enpConnectPaymentServices(const tString path)

Connect entry point onto available L2 CL kernels This call shall be performed only when the system is cycled up

enpDisconnectPaymentServices

Code Block
languagec
DLLEXPORT void enpDisconnectPaymentServices(void);

Disconnect entry point from connected L2 CL kernels. This call shall be performed only when the system is cycled up

enpInitialize

Code Block
languagec
DLLEXPORT void enpInitialize(
	tString		readerName,
	tString		pinpadName,
	tBoolean	signal,
	tBoolean	fallbackOnAID,	// DEPRECATED
	tBoolean	entryPoint,		// DEPRECATED
	tPaymentContext 	*payment //In: may be NULL is not autorun (contactless mechanism)
);

Set internal context to prepare the entry point for the subsequent transaction

enpSetLegacyXXXStatus

Code Block
languagec
DLLEXPORT void enpSetLegacyZIPStatus(tBoolean status);
Code Block
languagec
DLLEXPORT void enpSetLegacyPayPassStatus(tBoolean status);
Code Block
languagec
DLLEXPORT void enpSetLegacyAMEXStatus(tBoolean status);
Code Block
languagec
DLLEXPORT void enpSetLegacyJCBStatus(tBoolean status);
Code Block
languagec
DLLEXPORT void enpSetLegacyCUPStatus(tBoolean status);
Code Block
languagec
DLLEXPORT void enpSetLegacyDPASStatus(tBoolean status);
Code Block
languagec
DLLEXPORT void enpSetLegacyVISAStatus(tBoolean status);

Set legacy selection rule for a given payment scheme. Payment schemes' specifications, outside Book Cx, use selection rules that might differ for error management. it is important to set appropriate flag duting TA

enpSetPollingTimeout

Code Block
languagec
DLLEXPORT void enpSetPollingTimeout(int timeout);

Set timeout used during gpiPolling to detect a card presentation

enpSetLongTapTimeoutExpired

Code Block
languagec
DLLEXPORT void enpSetLongTapTimeoutExpired(void);

enpGetPollingTimeout

Code Block
languagec
DLLEXPORT int enpGetPollingTimeout(void);

enpPSESelectionPerformed

Code Block
languagec
DLLEXPORT tBoolean enpPSESelectionPerformed(void);

enpGetPPSEFCI

Code Block
languagec
DLLEXPORT tPSE* enpGetPPSEFCI(tWord *SW1SW2);

PPSE’s FCI is stored so payment application can fetch any proprietary tags like 9F0A (example: ASPRD)

enpGetMutualList

Code Block
languagec
DLLEXPORT tADFList *enpGetMutualList(void);

enpAreAllCLAppplicationsNotAllowed

Code Block
languagec
DLLEXPORT tBoolean enpAreAllCLAppplicationsNotAllowed(void);

enpResetAreAllCLAppplicationsNotAllowed

Code Block
languagec
DLLEXPORT void enpResetAreAllCLAppplicationsNotAllowed(void);

If no CL application is selectable, provide a specific status so payment application which may fallback to CT or magstrtipe depeding on interfaces supported by the device

enpGetLastCardDetectionStatus

Code Block
languagec
DLLEXPORT tGPIError enpGetLastCardDetectionStatus(void);

enpSkipPollingOnNextStartB

Code Block
languagec
DLLEXPORT void enpSkipPollingOnNextStartB(tGPIError detectedStatus);

When gpiPolling is performed from outside the entry point, skip gpiPolling call from inside the entry point to avoid double tap

enpReleasePaymentServices

Code Block
languagec
DLLEXPORT void enpReleasePaymentServices(const tBoolean sdk);

Broadcast afsRelease to all L2 CL kernels. This call shall be performed only when the system is cycled down.

enpExecutePaymentTransaction

Code Block
languagec
DLLEXPORT void enpExecutePaymentTransaction (
	tStartingPoint 		sp,
	tPaymentContext		*payment,
	tOutComeParameter	*outcome
);

Main point of entry to initiate a CL transaction.

tPaymentContext shall be set accordingly

tOutcomeParameter provides final status

Set sp to:

  • spSTART_A: to initiate a new transaction

  • spSTART_D: to activate the kernel used for the current transaction

  • spNO_START: to clean the context

enpGetTerminalAID

Code Block
languagec
void enpGetTerminalAID(tByte aidId, tByte **aid, tByte *len);

enpGetCurrentTerminalAID

Code Block
languagec
void enpGetCurrentTerminalAID(tByte **aid, tByte *len);

Code Sample

See entrypoint.h

Code Block
languagec
// Payment contexts
static tPaymentContext paymentCtx;
static tOutComeParameter outcome;
// Transaction amounts
static tAmount amount, cashBack;

char path[250] = "./AGNOS/"; // Configuration files here
unsigned char defaultTxnType = 0x00; // Default 9C value

  enpConnectPaymentServices(PATH);
  enpInitialize("","",bTRUE,bFALSE,bFALSE,pay);
  
  // Init payment context and payment outcome
  pmwInitializePaymentContext(&paymentCtx);
  pmwInitializeOutComeParameter(&outcome);
		
  // Important to perform these initializations after pmwInitializePaymentContext
  paymentCtx.mAmount = &amount;
  paymentCtx.mCashBack = &cashBack;
  paymentCtx.mTransactionType = (tTransactionType)defaultTxnType;
  amount = cashBack = NULL;
  
  // Set payment context from TRD...
  // ...
  
  // Initialize transient data model
  /// Only CL combinations refering to paymentCtx.mTransactionType will be loaded
  dtmInitializeFromFile(path,0,0,0,0,0,paymentCtx.mTransactionType,bFALSE);
  
  enpExecutePaymentTransaction(spSTART_A,paymentCtx,outcome);
  
  if(enpAreAllCLApplicationNotAllowed)
  {
    // Fallback to other technology if any
  }
  else
  {
    // Process outcome
  }

...