...
AgnosEP provides the main point of entry to initiate EMV transactions for CL acceptance system (enpExecutePaymentTransaction): enExecutePaymentTransaction.
It shall be called from the payment application which shall manage two structures:
tPaymentContext (in/out)
tOutComeParameter (out)
Each time a new transaction is triggered these two structures shall be initialized .That call shall be performed once the system has been properly initialized (see AgnosMW API).
Primitives
...
Names
...
Comments
...
enpInitialize
...
Set internal context to prepare the entry point. This call shall be performed only when the system is cycled up.
...
API _Version _Revision | Description |
---|
_AgnosEP _version 3.5.23 _revision 23782 | Agnos EP Interface provides a set of primitives to manage EMV contactless card processing. It encapsulates EMVCo Book A and B. Image Added |
...
enpDisconnectPaymentServicesAgnos Entry Point |
---|
See entrypoint.h, loader.h |
#include
| Code Block |
---|
| //---- AgnosMW Headers ----
#include "paymentMW.h"
//---- Global Headers ----
#include "gpi_agnos_framework_globals.h" |
| -- |
ApplicationSelectionMethod
| Code Block |
---|
typedef tPaymentError (*ApplicationSelectionMethod)
(
tADFList *mutualList,
tByte *MLIndex, tBoolean CL
); |
| Callback definition. Called after PPSE selection if defined |
KernelSelectionMethod
| Code Block |
---|
typedef tBoolean (*KernelSelectionMethod)
(
tByte* kernelIdentifier,
tByte kernelIdentifierLen,
tByte* requestedKernelIdentifier
); |
| Callback definition. Called during combination selection if defined |
enpConnectPaymentServices
| Code Block |
---|
| 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 |
enpReleasePaymentServices | Broadcast afsRelease to all L2 CL kernels. This call shall be performed only when the system is cycled down. |
enpDisconnectPaymentServices
| Code Block |
---|
| DLLEXPORT void enpDisconnectPaymentServices(void); |
| Disconnect entry point from connected L2 CL kernels. This call shall be performed only when the system is cycled up |
enpExecutePaymentTransaction | 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
|
enpSetPollingTimeout | Set time used during gpiPolling to detect a card presentation |
enpSkipPollingOnNextStartB | When gpiPolling is performed from outside the entry point, skip gpiPolling call from inside the entry point to avoid double tap |
enpSetKernelSelectionMethod | N/A |
enpSetApplicationSelectionMethod | Set callback hooked after PPSE selection |
enpSetLegacyXXXStatus | Set |
enpInitialize
| Code Block |
---|
| 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 Code Block |
---|
| // Standard call for a payment application
enpInitialize("","",bFALSE,bFALSE,bFALSE,NULL); |
Important: Prior to that call: |
enpSetLegacyXXXStatus
| Code Block |
---|
| DLLEXPORT void enpSetLegacyZIPStatus(tBoolean status); |
Code Block |
---|
| DLLEXPORT void enpSetLegacyPayPassStatus(tBoolean status); |
Code Block |
---|
| DLLEXPORT void enpSetLegacyAMEXStatus(tBoolean status); |
Code Block |
---|
| DLLEXPORT void enpSetLegacyJCBStatus(tBoolean status); |
Code Block |
---|
| DLLEXPORT void enpSetLegacyCUPStatus(tBoolean status); |
Code Block |
---|
| DLLEXPORT void enpSetLegacyDPASStatus(tBoolean status); |
Code Block |
---|
| DLLEXPORT void enpSetLegacyVISAStatus(tBoolean status); |
| Enable 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 |
enpAreAllCLApplicationNotAllowed | |
enpSetPollingTimeout
| Code Block |
---|
| DLLEXPORT void enpSetPollingTimeout(int timeout); |
| Set timeout value used during gpiPolling to detect a card presentation |
enpSetLongTapTimeoutExpired
| Code Block |
---|
| DLLEXPORT void enpSetLongTapTimeoutExpired(void); |
| Indicate to the entry point that the online transaction has timed out and consequently the long tap has timed out |
enpGetPollingTimeout
| Code Block |
---|
| DLLEXPORT int enpGetPollingTimeout(void); |
| Return timeout value used during gpiPolling to detect a card presentation |
| Code Block |
---|
| DLLEXPORT tBoolean enpPSESelectionPerformed(void); |
| Deprecated |
enpGetPPSEFCI
| Code Block |
---|
| DLLEXPORT tPSE* enpGetPPSEFCI(tWord *SW1SW2); |
| Return PPSE’s FCI stored at PPSE selection so payment application can fetch any proprietary tags (for example, tag 9F0A, ASPRD). If SW1SW2 is defined then the entry point returns the status word |
enpGetMutualList
| Code Block |
---|
| DLLEXPORT tADFList *enpGetMutualList(void); |
| Return the mutual list calculated at PPSE selection time. See Agnos and Selection module to get details on tADFList |
enpAreAllCLAppplicationsNotAllowed
| Code Block |
---|
| DLLEXPORT tBoolean enpAreAllCLAppplicationsNotAllowed(void); |
| Return bTRUE if there is no elligible contactless application after preprocessing. If no CL application is |
selectableelligible, provide a specific status so payment application |
which CT magstrtipe magstripe depeding on interfaces supported by the device |
enpGetPPSEFCI | PPSE’s FCI is stored so payment application can fetch any proprietary tags like 9F0A (example: ASPRD) |
C Example
|
enpResetAreAllCLAppplicationsNotAllowed
| Code Block |
---|
| DLLEXPORT void enpResetAreAllCLAppplicationsNotAllowed(void); |
| Reset corresponding state |
enpGetLastCardDetectionStatus
| Code Block |
---|
| DLLEXPORT tGPIError enpGetLastCardDetectionStatus(void); |
| Return the last gpiPolling error obtain at the last START_B |
enpSkipPollingOnNextStartB
| Code Block |
---|
| 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 |
---|
| 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 |
---|
| 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 in lign with L2 TA’s test plans 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 |
---|
| void enpGetTerminalAID(tByte aidId, tByte **aid, tByte *len); |
| |
enpGetCurrentTerminalAID
| Code Block |
---|
| void enpGetCurrentTerminalAID(tByte **aid, tByte *len); |
| |
Code Example |
---|
See entrypoint.h |
Code Block |
---|
| // 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);
// 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 = |
|
...
0;
// 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);
enpInitialize("CTLSS", "", bTRUE, bFALSE, bFALSE, paymentCtx); // Using signal in the scope of L2 TA
enpExecutePaymentTransaction(spSTART_A, paymentCtx, outcome);
if (enpAreAllCLApplicationNotAllowed)
{
// Fallback to other technology if any
}
else
{
// Process outcome
} |
|
...