Skip to main content

Application Development Kit (Version 4.8)


ManualEntry Class Reference

Last updated: 05-Mar-2025

Interface for SDI command MSR Card Data Entry (21-02)
More...

#include <sdi_if.h>

Inheritance diagram for ManualEntry:
Collaboration diagram for ManualEntry:

Public Member Functions

  ManualEntry ()
  ~ManualEntry ()
void  setLanguage (unsigned char language)
  Configure text language for manual card data entry (DFA008) More...
int  setTimeout (unsigned seconds)
  Configure timeout for manual card data entry (DFA005) More...
int  setCvvEntryDeactivation (unsigned char cvvEntry)
  Configure temporary Card Entry Value deactivation for manual card data entry (DFA017) More...
int  setCardDataEntryMode (unsigned char mode)
  Configure Card Data Entry mode (DFA018) More...
int  setCvvInputString (const std::string &inputString)
  Configure optional alternative input format string for CVV (DFA01A) More...
int  setTouchCoordinates (const unsigned char *array, unsigned size)
  Configure touch coordinate table for manual card entry (DFA024) More...
int  setMimimumDigits (unsigned char minimumDigits)
  Configure forcing of minimum number of Pan digits to 7 instead the default of 10 digits (DFA123) More...
int  setDoubleConfirmationMode (unsigned char mode)
  Configure skipping of double confirmation of PAN in headless mode (DFA033) More...
int  start ()
  Start manual card data entry (21-02) More...
int  receiveResult (std::string &obfuscatedPAN, std::vector< unsigned char > &token)
  Receive manual card data entry result. More...
int  getPluginResponseData (std::vector< unsigned char > &data)
  Access plugin response data (DFA101) in case one plugin has been triggered. More...
int  getPluginResponseData (unsigned index, int32_t &pluginId, int32_t &pluginResponseCode, std::vector< unsigned char > &data)
  Access plugin response data (FFA107, DFA101, DFA10C, DFA10D) More...
bool  getPluginResponseData (std::vector< PluginResult > &results)
  Access plugin response data (FFA107, DFA101, DFA10C, DFA10D) More...
- Public Member Functions inherited from SdiCmd
  SdiCmd ()
virtual  ~SdiCmd ()
enum SDI_SW12  sendReceive (unsigned char cla, unsigned char ins, unsigned char p1=0, unsigned char p2=0, unsigned maxResponseSize=2048)
  Generic SDI command exchange function combining sending of request, waiting and receiving the response. More...
int  send (unsigned char cla, unsigned char ins, unsigned char p1=0, unsigned char p2=0)
  Like sendReceive() but without waiting for response. More...
enum SDI_SW12  receive (unsigned maxResponseSize=2048)
  Receive SDI response after request has been send with send() and data availability has been signaled. More...
void  set (const char *path, int value, unsigned fixedLength=0)
  Set integer data object SDI command. More...
void  set (const char *path, uint32_t value, unsigned fixedLength=0)
  Set unsigned integer data object SDI command. More...
void  set (const char *path, const unsigned char *data, unsigned dataLen)
  Set byte array data object in SDI command. More...
void  set (const char *path, unsigned char byteValue)
  Set single byte value in SDI command. More...
void  set (const char *path, const std::vector< unsigned char > &data)
  Set byte array data object in SDI command. More...
void  set (const char *path, const std::string &value)
  Set character data object in SDI command. More...
void  setCommandDestination (bool epp, bool force=false)
  Set command destination for systems with EPP Unless force the command destination is set only if parameter epp is true. More...
virtual void  clear ()
  Remove all SDI command command input data. More...
virtual void  clear (const char *path)
  Remove single input data stored in dataIn. More...
virtual void  clearResults ()
  Remove all SDI response data. More...
void  importResults (const SdiCmd &intermediate)
  Transfer status word, client error and response data from an intermediate command while keeping command input data. More...
void  importResults (const unsigned char *sw12, const unsigned char *tlvData, unsigned tlvSize)
  Inject result data from a call back. More...
bool  get (const char *path, int &value)
bool  get (const char *path, uint32_t &value)
int  get (const char *path, unsigned char *buffer, unsigned bufferSize)
bool  get (const char *path, unsigned char &value)
bool  get (const char *path, std::vector< unsigned char > &buffer)
bool  get (const char *path, std::string &value)
std::string  getString (const char *path)
- Public Member Functions inherited from SdiBase
  SdiBase ()
enum SDI_SW12  getSdiSw12 ()
int  getAdditionalResultValue ()
  Access Additional Result Value if returned in SDI response. More...
SDICLIENT_ERROR  getClientError ()
  Access client side error codes. More...
enum SDI_SW12  receiveSW12 ()
  Receive SDI server response with no data. More...
void  clear ()
  clear result data obtained from SDI communication More...
void  importResults (const SdiBase &intermediate)
  set result data obtained from intermediate SDI communication More...

Additional Inherited Members

- Protected Member Functions inherited from SdiBase
void  setSdiSw12 (enum SDI_SW12 s)
void  setClientError (int libsdiprotocol_result)
- Protected Attributes inherited from SdiCmd
void *  dataIn
  Command input buffer collecting TLV data items. More...
void *  dataOut
  Command response TLV data items. More...
- Protected Attributes inherited from SdiBase
unsigned short  sw12
int  additionalResultValue
SDICLIENT_ERROR  clientErr


Detailed Description

Interface for SDI command MSR Card Data Entry (21-02)

Use the setters to configure the command, then use SDI_SetDataAvailableCallback() to register a notification function. With start() the manual card data input begins. After data available notification call receiveResult() to read the SDI server response.

Constructor & Destructor Documentation

◆ ManualEntry()

◆ ~ManualEntry()

Member Function Documentation

◆ getPluginResponseData() [1/3]

bool getPluginResponseData ( std::vector< PluginResult > &  results )

Access plugin response data (FFA107, DFA101, DFA10C, DFA10D)

Parameters
[out] results plugin ids, response codes and response data
Returns
true if any plugin result has been found

◆ getPluginResponseData() [2/3]

int getPluginResponseData ( std::vector< unsigned char > &  data )

Access plugin response data (DFA101) in case one plugin has been triggered.

Parameters
[out] data plugin response data (Note: Data is appended to existing content)
Returns
length of appended data, -1 if not present

◆ getPluginResponseData() [3/3]

int getPluginResponseData ( unsigned  index,
int32_t &  pluginId,
int32_t &  pluginResponseCode,
std::vector< unsigned char > &  data 
)

Access plugin response data (FFA107, DFA101, DFA10C, DFA10D)

Parameters
[in] index for iterating the result data, starting with 0
[out] pluginId return value of a plugin's moduleID function also used as INS byte of SDI 26-xx command to invoke a plugin, 0 if not available
[out] pluginResponseCode plugin's processTrigger function return value, SDI_SW12_NONE if not available
[out] data plugin response data (Note: Data is appended to existing content)
Returns
length of appended data, -1 if not present = end of iteration

◆ receiveResult()

int receiveResult ( std::string &  obfuscatedPAN,
std::vector< unsigned char > &  token 
)

Receive manual card data entry result.

In case of problem, when '0' is returned use getSdiSw12() to retrieve the SDI Server SW1 SW2.

Parameters
[out] obfuscatedPAN an [7..19]
[out] token unique card specific token b20
Returns
0 if successful, negative value if an error has occurred, e.g. return value from SDI_Receive()
Getters - Manual Card Data Entry
getPluginResponseData() (DFA101)

getSdiSw12() inherited from SdiBase

getClientError() inherited from SdiBase

◆ setCardDataEntryMode()

int setCardDataEntryMode ( unsigned char  mode )

Configure Card Data Entry mode (DFA018)

Parameters
[in] mode Card Data Entry mode

0: Card Data Entry performed in one screen

1: Card Data Entry performed in separate screens
Returns
0

◆ setCvvEntryDeactivation()

int setCvvEntryDeactivation ( unsigned char  cvvEntry )

Configure temporary Card Entry Value deactivation for manual card data entry (DFA017)

Parameters
[in] cvvEntry temporary Card Entry Value deactivation during the current command execution

0 perform all input

1 skip card verification code

2 skip expiration and verification code

4 just enter CVV after card data read from mag. stripe
Returns
0

◆ setCvvInputString()

int setCvvInputString ( const std::string &  inputString )

Configure optional alternative input format string for CVV (DFA01A)

Parameters
[in] inputString alternative input string for CVV
Returns
0

◆ setDoubleConfirmationMode()

int setDoubleConfirmationMode ( unsigned char  mode )

Configure skipping of double confirmation of PAN in headless mode (DFA033)

Parameters
[in] mode double confirmation mode of PAN

0: Double confirmation active (default)

1: Double Confirmation skipped
Returns
0

◆ setLanguage()

void setLanguage ( unsigned char  language )

Configure text language for manual card data entry (DFA008)

If not set, default is current terminal/transaction language

Parameters
[in] language language to be used for manual entry

◆ setMimimumDigits()

int setMimimumDigits ( unsigned char  minimumDigits )

Configure forcing of minimum number of Pan digits to 7 instead the default of 10 digits (DFA123)

Parameters
[in] minimumDigits minimum number of Pan digits to be entered

0: Use default (10 digits)

1: Force to 7 digits
Returns
0

◆ setTimeout()

int setTimeout ( unsigned  seconds )

Configure timeout for manual card data entry (DFA005)

Parameters
[in] seconds PIN input dialog timeout
Returns
0

◆ setTouchCoordinates()

int setTouchCoordinates ( const unsigned char *  array,
unsigned  size 
)

Configure touch coordinate table for manual card entry (DFA024)

Each table entry consists of

  • x-position b2
  • y-position b2
  • button width b2
  • button height b2
  • associated key ASCII code b1 ("0" .. "9" = '30' .. '31', cancel = '1B', correction = '08', enter = '0D')
Parameters
[in] array coordinate table
[in] size byte count of coordinate table (= 9 * button count)
Returns
0

◆ start()

int start ( )

Start manual card data entry (21-02)

Before calling this function use the setters of this class to configure it and SDI_SetDataAvailableCallback() to register a notification function. Once result is available the notification function will be invoked and receiveResult() has to be called.

Setters
setLanguage() (DFA008)

setTimeout() (DFA005)

setCvvEntryDeactivation() (DFA017)

setCardDataEntryMode() (DFA018)

setCvvInputString() (DFA01A)

setTouchCoordinates() (DFA024)

setMimimumDigits() (DFA123)

setDoubleConfirmationMode() (DFA033)
Returns
return value from SDI_Send()

The documentation for this class was generated from the following file:

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo