public class TecsClient extends ECRBase
Response.GenerateReceipt()
.at.hobex.pos.ecr.tecs
Constructor and Description |
---|
TecsClient()
Default constructor using default values from configuration
|
TecsClient(java.lang.String Tid,
java.lang.String Password)
Constructor for setting tid and password manually.
|
TecsClient(java.lang.String TID,
java.lang.String Password,
java.lang.String Host,
int Port,
int Timeout,
boolean SSL)
Constructor for setting with communication parameters.
|
TecsClient(java.lang.String TID,
java.lang.String Password,
java.lang.String Host,
int Port,
int Timeout,
boolean SSL,
java.lang.String Language)
Constructor for setting all configurable parameters manually except currency and merchant header.
|
TecsClient(java.lang.String TID,
java.lang.String Password,
java.lang.String Host,
int Port,
int Timeout,
boolean SSL,
java.lang.String Language,
java.lang.String Currency)
Constructor for setting all configurable parameters manually except merchant header
|
TecsClient(java.lang.String TID,
java.lang.String Password,
java.lang.String Host,
int Port,
int Timeout,
boolean SSL,
java.lang.String Language,
java.lang.String Currency,
java.lang.String[] MerchantHeader)
Constructor for setting all configurable parameters manually.
|
Modifier and Type | Method and Description |
---|---|
Response |
abort(java.lang.String txId)
Aborts an already started purchase transaction
Please note that this works not for terminals in pinpad mode (communicate via tca.hobex.at or RestAPI)!
|
Response |
batchTotals(int client)
Command to force the terminal to send an overview about the stored turnover sum.
|
Response |
cancel(java.lang.String currency,
double amount,
java.lang.String txId,
java.lang.String originalTxId,
int client)
This method cancels a transaction.
|
Response |
capture(java.lang.String currency,
double amount,
java.lang.String txId,
java.lang.String originalTxId,
int client)
Used for capturing a preauthorization request with the default currency.
|
Response |
closeBatch(int client)
Triggers an end of day / close message.
|
Response |
connectionStatus()
Query the connection status of the terminal if terminal supports.
|
Response |
diagnosis()
Forces the terminal to send a diagnostic message to the host.
|
java.lang.String |
getMessage() |
Response |
getTransactionDetails(java.lang.String originalTxId)
Returns all transaction data from a previous transaction.
|
Response |
openSystemMenu()
Opens the System configuration menu if the terminal supports this feature
Please note that this works not for terminals in pinpad mode (communicate via tca.hobex.at or RestAPI)!
|
Response |
preauth(java.lang.String txId,
java.lang.String currency,
double amount,
java.lang.String reference,
int client)
This method performs a preauthorization.
|
Response |
preauth(java.lang.String txId,
java.lang.String currency,
double amount,
java.lang.String reference,
int client,
java.lang.String cardToken) |
Response |
preauthCancel(java.lang.String currency,
double amount,
java.lang.String txId,
java.lang.String originalTxId,
int client)
This method cancels a pre authorization.
|
Response |
purchase(java.lang.String txId,
java.lang.String currency,
double amount,
double tip,
java.lang.String reference,
int client,
boolean forceMotoTransaction)
This method performs a purchase request with currency, amount, reference and client ID to set.
|
Response |
purchase(java.lang.String txId,
java.lang.String currency,
double amount,
double tip,
java.lang.String reference,
int client,
boolean forceMotoTransaction,
java.lang.String cardToken) |
Response |
reconciliation()
Triggers an reconciliation message.
|
Response |
refund(java.lang.String txId,
java.lang.String originalTxId,
java.lang.String currency,
double amount,
java.lang.String reference,
int client)
This method performs a refund on a POS device.
|
Response |
refund(java.lang.String txId,
java.lang.String originalTxId,
java.lang.String currency,
double amount,
java.lang.String reference,
int client,
java.lang.String cardToken) |
Response |
restartPaymentApplication()
Restart the payment application of the terminal if terminal supports.
|
Response |
status()
Get the status of the device
|
abort, batchTotals, cancel, cancel, cancel, cancel, capture, capture, capture, capture, closeBatch, closeCommunication, getCurrency, getLastTransactionId, getTecsClient, getZVTClient, logoff, logon, moto, moto, moto, moto, moto, moto, moto, newTransactionId, openCommunication, pointsCollect, pointsCollect, preauth, preauth, preauth, preauth, preauthCancel, preauthCancel, preauthCancel, preauthCancel, purchase, purchase, purchase, purchase, purchase, purchase, purchase, purchase, purchase, purchase, purchase, purchase, purchase, purchase, purchase, refund, refund, refund, refund, refund, repeatReceipt, setLanguage, setSSLSocketFactory, startCTLSCardRead, startCTLSCardRead, stopCTLSCardRead, voucherBalance, voucherBalance, voucherLoad, voucherPay, voucherPay
public TecsClient()
public TecsClient(java.lang.String Tid, java.lang.String Password)
Tid
- String representation of terminal identification number for the POS device.Password
- String representation of password for selected POS device.public TecsClient(java.lang.String TID, java.lang.String Password, java.lang.String Host, int Port, int Timeout, boolean SSL)
TID
- String representation of terminal identification number for the POS device.Password
- String representation of password for selected POS device.Host
- String representation of the host's IP address.Port
- Port number of the host's socket as String.Timeout
- Communication timeout in milliseconds.SSL
- Boolean value for secure socket layer communication. "true" enables SSL communication, "false" disables it.public TecsClient(java.lang.String TID, java.lang.String Password, java.lang.String Host, int Port, int Timeout, boolean SSL, java.lang.String Language)
TID
- String representation of terminal identification number for the POS device.Password
- String representation of password for selected POS device.Host
- String representation of the host's IP address.Port
- Port number of the host's socket as String.Timeout
- Communication timeout in millisecondsSSL
- Boolean value for secure socket layer communication. "true" enables SSL communication, "false" disables it.Language
- String set the Terminal and Receipt language (DE, EN, ..)public TecsClient(java.lang.String TID, java.lang.String Password, java.lang.String Host, int Port, int Timeout, boolean SSL, java.lang.String Language, java.lang.String Currency)
TID
- String representation of terminal identification number for the POS device.Password
- String representation of password for selected POS device.Host
- String representation of the host's IP address.Port
- Port number of the host's socket as String.Timeout
- Communication timeout in millisecondsSSL
- Boolean value for secure socket layer communication. "true" enables SSL communication, "false" disables it.Language
- String set the Terminal and Receipt language (DE, EN, ..)Currency
- Set the terminal currency (if it is supported by the terminal)public TecsClient(java.lang.String TID, java.lang.String Password, java.lang.String Host, int Port, int Timeout, boolean SSL, java.lang.String Language, java.lang.String Currency, java.lang.String[] MerchantHeader)
TID
- String representation of terminal identification number for the POS device.Password
- String representation of password for selected POS device.Host
- String representation of the host's IP address.Port
- Port number of the host's socket as String.Timeout
- Communication timeout in millisecondsSSL
- Boolean value for secure socket layer communication. "true" enables SSL communication, "false" disables it.Language
- String set the Terminal and Receipt language (DE, EN, ..)Currency
- Set the terminal currency (if it is supported by the terminal)MerchantHeader
- Header for the payment receipt. Every field contains a line for the receipt header ([0] = "hobex Ag", [1] = "Tel: +43662-2255-0", ...)public Response abort(java.lang.String txId) throws ECRException, ECRCommunicationException
abort
in class ECRBase
txId
- Original transaction IDResponse
class.java.lang.UnsupportedOperationException
- if the terminal type/implementation not supports this kind of commandECRException
ECRCommunicationException
public Response batchTotals(int client) throws ECRException, ECRCommunicationException
batchTotals
in class ECRBase
client
- Client-Id used for multi-merchant-terminals, usually/default 1.Response
class.ECRException
ECRCommunicationException
public Response cancel(java.lang.String currency, double amount, java.lang.String txId, java.lang.String originalTxId, int client) throws ECRException, ECRCommunicationException
cancel
in class ECRBase
currency
- Currency for transaction, ISO-4217 currency code (alphabetic) e.g. EURamount
- Amount of transactiontxId
- unique Transaction Identifier see ECRBase.newTransactionId()
originalTxId
- original transaction id of the transaction to be canceledclient
- Client-Id used for multi-merchant-terminals, usually/default 1.Response
class.ECRException
ECRCommunicationException
public Response capture(java.lang.String currency, double amount, java.lang.String txId, java.lang.String originalTxId, int client) throws ECRException, ECRCommunicationException
capture
in class ECRBase
currency
- ISO-4217 Currency codes (alphabetic) e.g. EUR.amount
- Amount to capture, must be lower than amount of the original transaction.txId
- unique Transaction Identifier see ECRBase.newTransactionId()
originalTxId
- original transaction id of the transaction to be captureclient
- Client-Id used for multi-merchant-terminals, usually/default 1.Response
.ECRException
ECRCommunicationException
Response
public Response closeBatch(int client) throws ECRException, ECRCommunicationException
closeBatch
in class ECRBase
client
- Client-Id used for multi-merchant-terminals, usually/default 1.Response
class.java.lang.UnsupportedOperationException
- if the terminal type/implementation not supports this kind of commandECRException
ECRCommunicationException
public Response connectionStatus() throws ECRException, ECRCommunicationException
connectionStatus
in class ECRBase
Response
class.java.lang.UnsupportedOperationException
- if the terminal type/implementation not supports this kind of commandECRException
ECRCommunicationException
public Response diagnosis() throws ECRException, ECRCommunicationException
Response.getHost()
, Response.getNetworkMedia()
, Response.getSwVersion()
, Response.getPackageVersion()
, Response.getTerminalIpAddress()
, Response.getTerminalSubnetMask()
, Response.getTerminalGateway()
, Response.getMacAddress()
, Response.getSerialNo()
Please note that this works not for terminals in pinpad mode (communicate via tca.hobex.at or RestAPI)!diagnosis
in class ECRBase
Response
class.java.lang.UnsupportedOperationException
- if the terminal type/implementation not supports this kind of commandECRException
ECRCommunicationException
public java.lang.String getMessage()
public Response getTransactionDetails(java.lang.String originalTxId) throws ECRException, ECRCommunicationException
getTransactionDetails
in class ECRBase
originalTxId
- TransactionID of the referenced former transactionResponse
class.ECRException
ECRCommunicationException
Response
public Response openSystemMenu() throws ECRException, ECRCommunicationException
openSystemMenu
in class ECRBase
Response
class.ECRException
ECRCommunicationException
Response
public Response preauth(java.lang.String txId, java.lang.String currency, double amount, java.lang.String reference, int client) throws ECRCommunicationException, ECRException
preauth
in class ECRBase
txId
- Transaction Identifiercurrency
- ISO-4217 currency code (alphabetic) e.g. EURamount
- amount of preauthorizationreference
- reference number, usually a matching number for your environment. A maximum of 20 alphanumeric characters with the following special characters are allowed for the reference! -_+*#.()/%!\"$%\/=?:,;{[]}~<>|client
- Client-Id used for multi-merchant-terminals, usually/default 1.Response
class.ECRException
ECRCommunicationException
Response
,
ECRBase.capture(String, double, String)
,
ECRBase.cancel(String, double, String)
public Response preauth(java.lang.String txId, java.lang.String currency, double amount, java.lang.String reference, int client, java.lang.String cardToken) throws ECRCommunicationException, ECRException
public Response preauthCancel(java.lang.String currency, double amount, java.lang.String txId, java.lang.String originalTxId, int client) throws ECRException, ECRCommunicationException
preauthCancel
in class ECRBase
currency
- Currency for transaction, ISO-4217 currency code (alphabetic) e.g. EURamount
- Amount of transactiontxId
- unique Transaction Identifier see ECRBase.newTransactionId()
originalTxId
- original transaction id of the transaction to be canceledclient
- Client-Id used for multi-merchant-terminals, usually/default 1.Response
class.ECRException
ECRCommunicationException
public Response purchase(java.lang.String txId, java.lang.String currency, double amount, double tip, java.lang.String reference, int client, boolean forceMotoTransaction) throws ECRException, ECRCommunicationException
purchase
in class ECRBase
txId
- unique Transaction Identifier see ECRBase.newTransactionId()
currency
- Currency for transaction, ISO-4217 currency code (alphabetic) e.g. EURamount
- Amount to purchase/transaction amount (exclusive TIP)tip
- Amount of TIPreference
- Reference number, usually a matching number for your environment. A maximum of 20 alphanumeric characters with the following special characters are allowed for the reference! -_+*#.()/%!\"$%\/=?:,;{[]}~<>|client
- Client-Id used for multi-merchant-terminals, usually/default 1.forceMotoTransaction
- triggers a MOTO transaction if the terminal and terminal configuration supportsResponse
class.ECRException
ECRCommunicationException
public Response purchase(java.lang.String txId, java.lang.String currency, double amount, double tip, java.lang.String reference, int client, boolean forceMotoTransaction, java.lang.String cardToken) throws ECRException, ECRCommunicationException
public Response reconciliation() throws ECRException, ECRCommunicationException
Response
class.java.lang.UnsupportedOperationException
- if the terminal type/implementation not supports this kind of commandECRException
ECRCommunicationException
public Response refund(java.lang.String txId, java.lang.String originalTxId, java.lang.String currency, double amount, java.lang.String reference, int client) throws ECRException, ECRCommunicationException
refund
in class ECRBase
txId
- unique Transaction Identifier see ECRBase.newTransactionId()
originalTxId
- TransactionID of the referenced former transactioncurrency
- Currency for transaction, ISO-4217 currency code (alphabetic) e.g. EURamount
- Amount of transactionreference
- Reference # for transaction. A maximum of 20 alphanumeric characters with the following special characters are allowed for the reference! -_+*#.()/%!\"$%\/=?:,;{[]}~<>|client
- Client-Id used for multi-merchant-terminals, usually/default 1.Response
class.ECRException
ECRCommunicationException
Response
public Response refund(java.lang.String txId, java.lang.String originalTxId, java.lang.String currency, double amount, java.lang.String reference, int client, java.lang.String cardToken) throws ECRException, ECRCommunicationException
public Response restartPaymentApplication() throws ECRException, ECRCommunicationException
restartPaymentApplication
in class ECRBase
Response
class.java.lang.UnsupportedOperationException
- if the terminal type/implementation not supports this kind of commandECRException
ECRCommunicationException
public Response status() throws ECRException, ECRCommunicationException
status
in class ECRBase
Response
class.ECRException
ECRCommunicationException
Response