Class ConfigByte
java.lang.Object
at.hobex.pos.ecr.zvt.ConfigByte
The Config-Byte is used to set different behavior of the payment terminal. The Config-Byte is send during the
Calculation of the config byte:
For example to request intermediate status-information set the Config-Byte to 8. If you want to request intermediate status information, control payment and control administration function you have to set the Config-Byte to int 56 or hex 0x38 (1000 (0x8) + 10000 (0x10) + 100000 (0x20)). Another way is to use the setter-Methods
logon command to
the terminal. The Config-Byte represents a bit field. To delete the configuration use ZVTClient.logoff().Calculation of the config byte:
| Config-Byte | Definition |
|---|---|
| 0000 0001 | reserved for further use |
| 0000 0010 | ECR assumes receipt-printout for payment functions (see also ECR Printing – ECR print-type) 0: payment receipt not printed by ECR 1: payment receipt printed by ECR |
| 0000 0100 | ECR assumes receipt-printout for administration functions (see also ECR print-type) 0: administration receipt not printed by ECR 1: administration receipt printed by ECR |
| 0000 1000 | ECR requires intermediate status-Information. The PT sends no intermediate statusinformation if not logged-on. |
| 0001 0000 | ECR controls payment function 0: Amount input on PT possible 1: Amount input on PT not possible |
| 0010 0000 | ECR controls administration function 0: Start of administration function on PT possible 1: Start of administration function on PT not possible |
| 0100 0000 | reserved for further use |
| 1000 0000 | ECR print-type (see also ECR assumes receipt-printout for payment functions and ECR assumes receipt-printout for administration functions): 0: Terminal will not send the receipt to the cash register. The receipt must be generated from the information in the ZVTResponse1: Terminal sends receipt to cash register. To get the receipts use ZVTResponse.getMerchantReceipt() or ZVTResponse.getCustomerReceipt() |
For example to request intermediate status-information set the Config-Byte to 8. If you want to request intermediate status information, control payment and control administration function you have to set the Config-Byte to int 56 or hex 0x38 (1000 (0x8) + 10000 (0x10) + 100000 (0x20)). Another way is to use the setter-Methods
setEcrRequestsReceipt(boolean) and so on.- Since:
- 1.3
- Author:
- Nicolai Rechberger
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic voidsetConfigByte(int configByte) static voidsetConfigByte(String configByte) static voidsetEcrControlsAdministrativeFunctions(boolean ecrControlsAdministrativeFunctions) static voidsetEcrControlsPaymentFunctions(boolean ecrControlsPaymentFunctions) static voidsetEcrPrintsAdministrativeReceipt(boolean ecrPrintsAdministrativeReceipt) static voidsetEcrPrintsPaymentReceipt(boolean ecrPrintsPaymentReceipt) static voidsetEcrRequestsReceipt(boolean ecrRequestsReceipt) static voidsetEcrRequiredStatusInformation(boolean ecrRequiredStatusInformation)
-
Method Details
-
getConfigByte
- Returns:
- The hex value representing the calculated Config-Byte setting.
-
setConfigByte
- Parameters:
configByte- To set the Config-Byte with the calculated hex value as string. eg. ConfigByte.setConfigByte("BE");
-
setConfigByte
public static void setConfigByte(int configByte) - Parameters:
configByte- To set the Config-Byte with the calculated hex value as int. eg. ConfigByte.setConfigByte(0xBE);
-
isEcrPrintsPaymentReceipt
public static boolean isEcrPrintsPaymentReceipt()- Returns:
- True if ecrPrintsPaymentReceipt is set, the receipt-printout for payment functions must be done by the cash register. The terminal will not print a receipt for these kind of transaction.
-
setEcrPrintsPaymentReceipt
public static void setEcrPrintsPaymentReceipt(boolean ecrPrintsPaymentReceipt) - Parameters:
ecrPrintsPaymentReceipt- If ecrPrintsPaymentReceipt is set, the receipt-printout for payment functions must be done by the cash register. The terminal will not print a receipt for these kind of transaction.
-
isEcrPrintsAdministrativeReceipt
public static boolean isEcrPrintsAdministrativeReceipt()- Returns:
- True if ecrPrintsAdministrativeReceipt is set, the receipt-printout for administrative functions must be done by the cash register. The terminal will not print a receipt for these kind of transaction.
-
setEcrPrintsAdministrativeReceipt
public static void setEcrPrintsAdministrativeReceipt(boolean ecrPrintsAdministrativeReceipt) - Parameters:
ecrPrintsAdministrativeReceipt- If ecrPrintsAdministrativeReceipt is set, the receipt-printout for administrative functions must be done by the cash register. The terminal will not print a receipt for these kind of transaction.
-
isEcrRequiredStatusInformation
public static boolean isEcrRequiredStatusInformation()- Returns:
- If intermediate status information is set the terminal will return intermediate status information. You must also implement the
IntermediateStatusInformationListenerinterface and add a intermediate status information listener. Status informations will distributed in theIntermediateStatusInformationListener.intermediateStatusInformation(IntermediateStatusInformation)method.
-
setEcrRequiredStatusInformation
public static void setEcrRequiredStatusInformation(boolean ecrRequiredStatusInformation) - Parameters:
ecrRequiredStatusInformation- To get intermediate status information set ecrRequiredStatusInformation. Also implement theIntermediateStatusInformationListenerinterface and add a listener. Status informations will distributed in theIntermediateStatusInformationListener.intermediateStatusInformation(IntermediateStatusInformation)method. The PT sends no intermediate status information if not logged-on (registered).
-
isEcrControlsAdministrativeFunctions
public static boolean isEcrControlsAdministrativeFunctions()- Returns:
- True if ecrControlsAdministrativeFunctions is set. If it is set the start of administrative functions on the terminal is not possible. On the terminal screen "ECR in use" appears.
-
setEcrControlsAdministrativeFunctions
public static void setEcrControlsAdministrativeFunctions(boolean ecrControlsAdministrativeFunctions) - Parameters:
ecrControlsAdministrativeFunctions- If ecrControlsAdministrativeFunctions is set the start of administrative functions on the terminal is not possible. On the terminal screen "ECR in use" appears.
-
isEcrRequestsReceipt
public static boolean isEcrRequestsReceipt()- Returns:
- If ecrRequestsReceipt is set, the terminal sends the receipts back to the ecr. To get the receipts use
ZVTResponse.getMerchantReceipt()orZVTResponse.getCustomerReceipt()
-
setEcrRequestsReceipt
public static void setEcrRequestsReceipt(boolean ecrRequestsReceipt) - Parameters:
ecrRequestsReceipt- If ecrRequestsReceipt is set, the terminal sends the receipts back to the ecr. To get the receipts useZVTResponse.getMerchantReceipt()orZVTResponse.getCustomerReceipt()
-
isEcrControlsPaymentFunctions
public static boolean isEcrControlsPaymentFunctions()- Returns:
- boolean True if ecrControlsPaymentFunctions is set. If it is set the start of payment functions on the terminal is not possible. On the terminal screen "ECR in use" appears.
-
setEcrControlsPaymentFunctions
public static void setEcrControlsPaymentFunctions(boolean ecrControlsPaymentFunctions) - Parameters:
ecrControlsPaymentFunctions- If ecrControlsPaymentFunctions is set the start of payment functions on the terminal is not possible. On the terminal screen "ECR in use" appears.
-