Class javaterminal

Inheritance diagram for com.payments.core.admin.JavaTerminal:

com.payments.core.CoreTerminal

Public Member Functions

JavaTerminal (CoreAPIListener listener)
void initialize (CoreAPIListener listener)
void initialize ()
void initWithConfiguration ()
void initWithConfiguration (String terminalId, String secret)
boolean initWithConfiguration (String terminalId, String secret, CoreSettings settings)
void initDevice (DeviceEnum device, DeviceConnectionType connectionType, HashMap< String, Object > data)
void startInitDevice (DeviceEnum device, HashMap< String, Object > data)
LinkedHashMap< String, String > listSupportedDevices ()
void setMode (CoreMode mode)
void processSale (CoreSale request)
void submitPort (String port)
boolean setConnectionTimeOut (int milliseconds)
void closeTransactionsBatch ()
Public Member Functions inherited from com.payments.core.admin.TerminalBase
void retrieveSettings ()
void registerLogListener (CoreAPILogsListener logMessageListener)
void unRegisterCoreAPIListener (CoreAPIListener listener)
void registerCoreAPIDeviceListener (CoreAPIDeviceListener listener)
void unRegisterCoreAPIDeviceListener (CoreAPIDeviceListener listener)
void registerCoreAPIReportingListener (CoreAPIReportingListener listener)
void unRegisterCoreAPIReportingListener (CoreAPIReportingListener listener)
void registerCoreAPISaleListener (CoreAPISaleListener listener)
void unRegisterCoreAPISaleListener (CoreAPISaleListener listener)
void registerCoreAPISecureCardListener (CoreAPISecureCardListener listener)
void unRegisterCoreAPISecureCardListener (CoreAPISecureCardListener listener)
void registerCoreAPISettingsListener (CoreAPISettingsListener listener)
void unRegisterCoreAPISettingsListener (CoreAPISettingsListener listener)
void registerCoreAPIRefundListener (CoreAPIRefundListener listener)
void unRegisterCoreAPIRefundListener (CoreAPIRefundListener listener)
void registerCoreAPIReversalListener (CoreAPIReversalListener listener)
void unRegisterCoreAPIReversalListener (CoreAPIReversalListener listener)
void registerCoreAPIUpdateListener (CoreAPIUpdateListener listener)
void unRegisterCoreAPIUpdateListener (CoreAPIUpdateListener listener)
void registerCoreAPIMessageListener (CoreAPIMessageListener listener)
void unRegisterCoreAPIMessageListener (CoreAPIMessageListener listener)
void processSale (CoreSale request)
void processRefund (CoreRefund request)
void processReversal (CoreReversal reversal)
void processUnreferencedRefund (CoreUnreferencedRefund request)
void sendUnreferencedRefundByPlugin (CoreUnreferencedRefund unreferencedRefund)
void updateSettings (CoreTerminalUpdate terminal)
void getTransactions (int page, CoreTransactionFilter filter)
void getTransactions ()
void submitSignature (CoreSignature coreSignature)
void requestSecuredUrl (String schema)
void updateTransaction (CoreUpdate update)
void cancelTransaction ()
void sendDeviceNotSupportedError (HashMap< String, Object > map)
void setPluginCallBack (Plugin pluginCallBack)
void setSettings (CoreSettings settings)
void sendSaleOnline (CoreSale coreSale)
void sendDeviceError (Object message)
void sendUserMessages (Object message)
void sendDeviceDisconnected (DeviceEnum device)
void sendDeviceConnected (HashMap< String, Object > data)
void sendSignatureRequired (CoreSale coreSale)
void sendUpdateRequest (HashMap< String, Object > data)
void sendSelectApplicationRequired (ArrayList< String > applications)
ArrayList< CoreApplication > getApplications ()
ArrayList< CoreCaCertificate > getCertificates ()
ArrayList< CoreEmvTag > getEmvTags ()
void sendLogLevelError (Object error)
CoreTerminal getTerminal ()
void sendConnectionError (Object error)
void sendAutoConfigProgressUpdate (String progress)
void sendTransactionFinished (CoreSaleResponse transaction)
void sendTransactionReversal (CoreReversal reversal)
void sendDeviceInfo (HashMap< String, String > deviceInfo)
void startInitDevice (DeviceEnum device, HashMap< String, Object > data)
void sendSelectSerialRequired (ArrayList< String > ports)
void log (String message, LogLevel logLevel)
void sendSelectBluetoothRequired (ArrayList< Object > pairedDevices)
void disconnectDevice ()
void releaseResources ()
void submitApplication (int app)
void startAutoConfig ()
void selectBTDevice (int device)
ArrayList< CoreTransactionInputMethod > listSupportedInputMethods ()
void sendGiftCardData (HashMap< String, String > giftCarddata)
void sendOnRequestAmount (CoreSale coreSale)
void submitAmount (CoreSale coreSale, boolean confirmation)
boolean isDelayedAuthEnabled ()
BigDecimal getDelayedAuthInitialAmount ()
void enableDelayedAuth (BigDecimal initialAmount)
void disableDelayedAuth ()
void enablePolling (BigDecimal initialAmount)
void disablePolling ()
boolean isPollingEnabled ()
BigDecimal getPollingInitialAmount ()
void setDebug (boolean debug)
void setMode (CoreMode mode)
void setLogLevel (LogLevel logLevel)
LogLevel getLogLevel ()
CoreMode getMode ()
void getDeviceInfo ()
String getSdkVersion ()
CoreSettings getSettings ()
Plugin getPluginCallBack ()
DeviceEnum getDevice ()
void registerSecureCard (CoreSecureCard coreSecureCard)
void editSecureCard (CoreSecureCard secureCard)
void deleteSecureCard (CoreSecureCard secureCard)
void retrieveSecureCard (String merchantReference)
void onCompleteReadSecureCard (CoreSecureCard coreSecureCard)
boolean setOfflineMode (boolean offline)
void loadFirmware ()
void loadFirmware (String absolutePath)
void loadConfiguration ()
void loadConfiguration (String absolutePath)
void loadAsset ()
void loadAsset (String absolutePath)
void loadRKI ()
void loadRKI (String absolutePath)
Public Member Functions inherited from com.payments.core.CoreTerminal
CoreTerminal (String terminalId, String secret, String url)
String getTerminalId ()
void setTerminalId (String terminalId)
String getSecret ()
void setSecret (String secret)
String getIsvToken ()
void setIsvToken (String isvToken)
Currency getCurrency ()
void setCurrency (Currency currency)
TerminalType getTerminalType ()
void setTerminalType (TerminalType terminalType)
String getToken ()
void setToken (String token)
String getTerminalUrl ()
String getAuthorizationUrl ()
String getPayconexSaleUrl ()
String getPayconexReportingUrl ()
String getUrl ()
void setUrl (String url)
boolean getRequiresTokenForRefunds ()
void setRequiresTokenForRefunds (boolean requiresTokenForRefunds)
boolean isRequiresTokenForReporting ()
void setRequiresTokenForReporting (boolean requiresTokenForReporting)
CoreMode getMode ()
boolean getRequiresTokenForTerminalUpdate ()
void setRequiresTokenForTerminalUpdate (boolean requiresTokenForTerminalUpdate)
boolean getOfflineMode ()
String getDeviceType ()
void setDeviceType (String value)

Static Public Member Functions

static JavaTerminal getInstance ()

Additional Inherited Members

Public Attributes inherited from com.payments.core.CoreTerminal
boolean offlineMode
Protected Member Functions inherited from com.payments.core.admin.TerminalBase
void initListener ()
void initWithConfiguration (String terminalId, String secret)
boolean isPluginNull ()
void sendCallback (EventTypeEnum eventType, HashMap< String, Object > map)
void sendCallback (EventTypeEnum eventType, String type, Object message)
HashMap< String, Object > createSecureCardRequestData (CoreSecureCard coreSecureCard, String action)
void addAPIListener (AdminListenerBase coreListener)
Protected Attributes inherited from com.payments.core.admin.TerminalBase
Plugin pluginCallBack
DeviceEnum device = DeviceEnum.NODEVICE
CoreSettings settings
DeviceEnum connectedDevice = DeviceEnum.NODEVICE
Protected Attributes inherited from com.payments.core.CoreTerminal
CoreMode mode = CoreMode.LIVE
Static Protected Attributes inherited from com.payments.core.admin.TerminalBase
static String action = “”

Detailed Description

This class represents public API which allows the integrator to perform actions.

JavaTerminal terminal = new JavaTerminal();
terminal.initWithConfiguration("terminalID", "secret");

Constructor & Destructor Documentation

JavaTerminal()

    • com.payments.core.admin.JavaTerminal.JavaTerminal
    • (
    • CoreAPIListener
    • listener
    • )

  • inline

Initialise a new instance of JavaTerminal class.

Parameters

  • listener
  • class listener handles the callbacks

Member Function Documentation

closeTransactionsBatch()

    • void com.payments.core.admin.JavaTerminal.closeTransactionsBatch
    • (
    • )

  • inline

Request host to close the current transactions batch.

getInstance()

    • static JavaTerminal com.payments.core.admin.JavaTerminal.getInstance
    • (
    • )

  • inlinestatic

initDevice()

    • void com.payments.core.admin.JavaTerminal.initDevice
    • (
    • DeviceEnum
    • device,

    • HashMap< String, Object >
    • data

    • )

  • inline

Init the device.

Parameters

  • device
  • which is used to do the transaction (BBPosDevice, Rambler, Pinpad), allowed object is DeviceEnum

initialize() [1/2]

    • void com.payments.core.admin.JavaTerminal.initialize
    • (
    • CoreAPIListener
    • listener
    • )

  • inline

Initialize a new listener.

Parameters

  • listener
  • activity listener handles the callbacks

initialize() [2/2]

    • void com.payments.core.admin.JavaTerminal.initialize
    • (
    • )

  • inline

Initialize singleton.

initWithConfiguration() [1/3]

    • void com.payments.core.admin.JavaTerminal.initWithConfiguration
    • (
    • )

  • inline

Initialize listener and store the configuration in memory.Use this method only when terminal ID and secret are stored in payconfig file

initWithConfiguration() [2/3]

    • void com.payments.core.admin.JavaTerminal.initWithConfiguration
    • (
    • String
    • terminalId,

    • String
    • secret

    • )

  • inline

Initialize listener and store the configuration.

Parameters

  • terminalId
  • holds terminal ID.

  • secret
  • holds the secret name.

initWithConfiguration() [3/3]

    • boolean com.payments.core.admin.JavaTerminal.initWithConfiguration
    • (
    • String
    • terminalId,

    • String
    • secret,

    • )

  • inline

Initializes the configuration.This method should be used when terminal is offline.

AndroidTerminal terminal = new AndroidTerminal(this);
terminal.InitWithConfiguration(terminalId,secret,settings);

Parameters

  • terminalId
  • The terminal identifier.

  • secret
  • The secret password.

  • settings
  • Valid settings retrieved using initWithConfigurationMethod

Returns

true if successfully initialized.

listSupportedDevices()

    • LinkedHashMap<String, String> com.payments.core.admin.JavaTerminal.listSupportedDevices
    • (
    • )

  • inline

List the devices which are supported by the SDK

processSale()

    • void com.payments.core.admin.JavaTerminal.processSale
    • (
    • CoreSale
    • request
    • )

  • inline

Process the sendSaleOnline object.

JavaTerminal terminal = new JavaTerminal();
CoreSaleKeyed sale = new CoreSaleKeyed(1.12);
sale.setCardHolderName("Test ");
sale.setCardNumber("4111111111111111");
sale.setCardCvv("123");
sale.setCardType("VISA");
sale.setExpiryDate("1215");
terminal.processSale(sale);

Parameters

  • request
  • represents CoreSale object to be processed.

setConnectionTimeOut()

    • boolean com.payments.core.admin.JavaTerminal.setConnectionTimeOut
    • (
    • int
    • milliseconds
    • )

  • inline

Sets the connection timeout between SDK and host.Please note that value has to be greater or equal to 1000 (1 sec).Default 30000 (30 secs)

Parameters

  • milliseconds
  • timeout

Returns

true if timeout was set successfully

setMode()

    • void com.payments.core.admin.JavaTerminal.setMode
    • (
    • CoreMode
    • mode
    • )

  • inline

Sets different mode that the SDK supports

Parameters

  • mode
  • - supported modes are LIVE, DEMO, SELFTEST

startInitDevice()

    • void com.payments.core.admin.JavaTerminal.startInitDevice
    • (
    • DeviceEnum
    • device,

    • HashMap< String, Object >
    • data

    • )

  • inline

USED INTERNALLY

submitPort()

    • void com.payments.core.admin.JavaTerminal.submitPort
    • (
    • String
    • port
    • )

  • inline

Submits the serial port in response to onSelectSerialPort

Parameters

  • port
  • number