...
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);
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
}
|
...