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 22 Next »

API _Version _Revision

Description

_OLA _version 2.1.6 _revision 23819

ola

See ola.h

#include

#include "ola_tags_dictionary.h"
#include "ola_emv.h" /// Generic EMV API
#include "ola_publickey.h" /// Generic Public Key configuration API
#include "ola_contactless.h" /// Generic Contacless Processing API
#include "ola_contact.h" /// Generic Contact Processing API

#define

#define OLA_API_VERSION "2.1.6"

logf_function

typedef void (*logf_function)(char* str);

ola_get_api_version

const char *ola_get_api_version(void);

ola_get_implementation_version

const char *ola_get_implementation_version(void);

ola_initialize_at_start_up

tOLAError ola_initialize_at_start_up(uint8_t *tlv, uint16_t tlvLength);

ola_set_trace_function

void ola_set_trace_function(logf_function fct);

ola_emv

See ola_emv.h

#include

#include <stdint.h>

tOLAError

typedef enum
{
	OLA_OK,
	OLA_CARD_MUTE,
	OLA_CARD_BLOCKED,
	OLA_MAX_REACHED,
	OLA_NO_CANDIDATE,
	OLA_CONTACT_NEW_SELECTION,
	OLA_CONTACT_SELECTION_ERROR,
	OLA_CONDITIONS_NOT_SATISFIED,
	OLA_ACCEPTED,
	OLA_NOT_ACCEPTED,
	OLA_OFFLINE_ACCEPTED,
	OLA_OFFLINE_DECLINED,
	OLA_GO_ONLINE,
	OLA_DECLINED,
	OLA_MISSING_DATA,
	OLA_PINPAD_ERROR,
	OLA_PARAM_ERROR,
	OLA_NOT_IMPLEMENTED,
	OLA_ERROR,
	OLA_CARD_ERROR,
	OLA_CANCEL,
	OLA_PUBLIC_KEY_OK,
	OLA_PUBLIC_KEY_MISSING,
	OLA_PUBLIC_KEY_MAX_REACHED,
	OLA_PUBLIC_KEY_END,
	OLA_PUBLIC_KEY_ERROR,
	OLA_CARD_REMOVED
} tOLAError;

tOlaEMVCoCVM

typedef enum
{
    cvmNone,
    cvmNoCvm,
    cvmSignature,
    cvmOnlinePin,
    cvmOnlinePin_Signature,
    cvmOfflinePinPlaintext,
    cvmOfflinePinPlaintext_Signature,
    cvmOfflinePinCiphered,
    cvmOfflinePinCiphered_Signature
} tOlaEMVCoCVM;

ola_emv_set_tag

tOLAError ola_emv_set_tag(
	uint32_t tag,
    uint8_t *value,
    uint16_t length
);

ola_emv_get_tag

tOLAError ola_emv_get_tag(
	uint32_t tag,
    uint8_t *value,
    uint16_t *length
);

ola_emv_get_cvm_results

tOLAError ola_emv_get_cvm_results(
	tOlaEMVCoCVM *cvm
);

ola_contact

See ola_contact.h

#include

#include "ola_emv.h"
#include <stdint.h>

tOlaModeContactTransaction

typedef enum
{
    metUndef = 0,
    metFull,
    metExtractPAN,
    metUnknown
} tOlaModeContactTransaction;

ola_contact_flush_aid_supported

void ola_contact_flush_aid_supported(void);

ola_contact_answer_to_reset

tOLAError ola_contact_answer_to_reset(const char* reader);

ola_contact_add_aid_supported

tOLAError  ola_contact_add_aid_supported(
		const uint8_t *aid,
	    uint8_t aidLength,
		int partial
);

ola_contact_build_candidate_list

tOLAError ola_contact_build_candidate_list(
		uint8_t *nb_candidates,
	    int *pse
);

ola_contact_get_tag_from_candidate

tOLAError ola_contact_get_tag_from_candidate(
		uint8_t candidate,
	    uint32_t tag,
		uint8_t *value,
	    uint16_t *length
);

ola_contact_final_select_candidate

tOLAError ola_contact_final_select_candidate(uint8_t candidate);

ola_contact_initiate_transaction

tOLAError ola_contact_initiate_transaction(
		tOlaModeContactTransaction mode
);

ola_contact_complete_transaction

tOLAError ola_contact_complete_transaction(
		const uint8_t *authorResponseCode,
	    const uint8_t *issuerAuthenticationData,
	    uint8_t issuerAuthenticationData_length
);

ola_contact_clean

void  ola_contact_clean(void);

ola_contactless

See ola_contactless.h

#include

#include "ola_emv.h"
#include <stdint.h>

#define

#define OLA_KERNEL_ID_MASTERCARD                    2
#define OLA_KERNEL_ID_VISA                          3
#define OLA_KERNEL_ID_AMEX                          4
#define OLA_KERNEL_ID_JCB                           5
#define OLA_KERNEL_ID_DISCOVER                      6
#define OLA_KERNEL_ID_CUP                           7

#define OLA_MSD_ID_APPROVED                         0x03
#define OLA_MSD_ID_NOT_AUTHORISED                   0x07
#define OLA_MSD_ID_PLEASE_INSERT_OR_SWIPE_CARD      0x18
#define OLA_MSD_ID_AUTHORISING_PLEASE_WAIT          0x1B
#define OLA_MSD_ID_INSERT_SWIPE_OR_TRY_ANOTHER_CARD 0x1C
#define OLA_MSD_ID_SEE_PHONE_FOR_INSTRUCTIONS       0x20

tOlaContactlessTransactionStep

typedef enum
{
	ctsNone,
	ctsPreprocess,
	ctsBuildCandidate,
	ctsFinalSelect,
	ctsActivate
} tOlaContactlessTransactionStep;

tOlaOutcome

typedef enum
{
	outcNone,
	outcSelectNext,
	outcTryAgain,
	outcApproved,
	outcDeclined,
	outcOnlineRequest,
	outcTryAnotherInterface,
	outcEndApplication
} tOlaOutcome;

tOlaStartPoint

typedef enum
{
	spNoStart,
	spStartA,
	spStartB,
	spStartC,
	spStartD,
} tOlaStartPoint;

tOlaOnlineResponseData

typedef enum
{
	ordNone,
	ordEmv,
	ordAny
} tOlaOnlineResponseData;

tOlaAlternateInterfacePreference

typedef enum
{
	aipNone,
	aipContactChip,
	aipMagneticStripe
} tOlaAlternateInterfacePreference;

tOlaCVMethodContactless

typedef enum
{
	cvmclNone,
	cvmclNoCvm,
	cvmclSignature,
	cvmclOnlinePin,
	cvmclConfirmationCodeVerified
} tOlaCVMethodContactless;

tOlaStatus

typedef enum
{
	staNone,
	staNotReady,
	staIdle,
	staReadyToRead,
	staProcessing,
	staCardReadSuccessfully,
	staProcessingError
} tOlaStatus;

tOlaValueQualifier

typedef enum
{
	vqNone,
	vqAmount,
	vqBalance
} tOlaValueQualifier;

tOlaOutcomeParameter

typedef struct
{
	tOlaOutcome outCome;
	tOlaStartPoint startingPoint;
	tOlaOnlineResponseData onlineResponseData;
	tOlaCVMethodContactless cvm;
	int UIReqOnOutcomePresent;
	int UIReqOnRestartPresent;
	int receipt;
	int dataRecordPresent;
	int discretionaryDataPresent;
	tOlaAlternateInterfacePreference alternateInterfacePreference;
	uint32_t fieldOffReq;
	uint32_t removalTimeout;
} tOlaOutcomeParameter;

tOlaUIRequest

typedef struct
{
	uint8_t messageIdentifier;
	tOlaStatus status;
	uint32_t holdTime;
	uint8_t languagePreference[8];  // List of languages, ISO 639-1 representation
	tOlaValueQualifier valueQualifier;
	uint8_t value[6];               // BCD
	uint8_t currencyCode[2];        // Numeric ISO 4217
} tOlaUIRequest;

ola_contactless_flush_aid_supported

void ola_contactless_flush_aid_supported(void);

ola_contactless_add_aid_supported

tOLAError ola_contactless_add_aid_supported(
        const uint8_t *aid,
        uint8_t aidLength,
        int partial,
        uint8_t kernelId,
        uint8_t *tlv,
        uint16_t tlvLength
);

ola_contactless_add_drl_supported

uint16_t ola_contactless_add_drl_supported(
        const uint8_t *programId,
        uint8_t programIdLength,
        const uint8_t *transactionLimit,
        const uint8_t *floorLimit,
        const uint8_t *CVMLimit,
        int statusCheck,
        int isZeroAllowed,
        uint8_t kernelId
);

ola_contactless_commit_supported_aids

void ola_contactless_commit_supported_aids(void);

ola_contactless_build_candidate_list

uint16_t ola_contactless_build_candidate_list(
        uint8_t *nb_candidates
);

ola_contactless_get_tag_from_candidate

uint16_t ola_contactless_get_tag_from_candidate(
        uint8_t candidate,
        uint32_t tag,
        uint8_t *value,
        uint16_t *length
);

ola_contactless_final_select_candidate

tOLAError ola_contactless_final_select_candidate(
        uint8_t candidate,
        uint8_t *kernelId
);

ola_contactless_get_card_preferred_language

tOLAError ola_contactless_get_card_preferred_language(
        char *language
);

ola_contactless_preprocess

tOLAError ola_contactless_preprocess(void);

ola_contactless_do_transaction

tOLAError ola_contactless_do_transaction(void);

ola_contactless_clean

void  ola_contactless_clean(void);

ola_contactless_get_outcome

tOLAError ola_contactless_get_outcome(
        tOlaOutcomeParameter *outcome
);

ola_contactless_get_UI_request_upon_outcome

tOLAError ola_contactless_get_UI_request_upon_outcome(
        tOlaUIRequest *uiRequest
);

ola_contactless_get_UI_request_restart

tOLAError ola_contactless_get_UI_request_restart(
        tOlaUIRequest *uiRequest
);

ola_publickey

See ola_publickey.h

ola_terminal

See ola_terminal.h

// Deprecated

ola_tags_dictionary

See ola_tags_dictionary.h

ola_implem

See ola_implem.h

  • No labels