Class cmdPinpad
java.lang.Object
com.datecs.fiscalprinter.SDK.model.DatecsFiscalDevice
com.datecs.fiscalprinter.SDK.model.UserLayerV2.cmdPinpad
public class cmdPinpad extends DatecsFiscalDevice
This class provides a shell for all pinpad operation commands connected directly to one of the
communication interfaces of the fiscal device (RS232 or Bluetooth).
Network interfaces of the cash register (LAN, or GPRS via user APN) is used,
to connect to your pinpad and bank servers.
To complete the pinpad transactions, provide an Internet connection to your fiscal device.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classcmdPinpad.DocTypeToCopystatic classcmdPinpad.PinpadTypestatic classcmdPinpad.PurchaseResult -
Constructor Summary
Constructors Constructor Description cmdPinpad() -
Method Summary
Modifier and Type Method Description booleancheckPinpadConnection()booleanCheckPinpadServerConnection()voidendOfDayReport()intgetPinpadComBaudRate()Baud rate of COM port that has pinpad device assigned.intgetPinpadComPort()intgetPinpadConnectionType()Type of connection between cash register and bank serverintgetPinpadLoyaltyPayment()Function of PY4 keyintgetPinpadPaymentMenu()Function of PY2 key in registrationintgetPinpadReceiptCopies()Copies of the receipt from pinpadintgetPinpadReceiptInfo()Where to print pinpad receiptbooleangetPinpadShortRec()cmdPinpad.PinpadTypegetPinpadType()Type of pinpadcmdPinpad.PurchaseResultmakePurchase(java.lang.Double amount)Make sale from pinpadvoidprintCopyOfLastTransactionDocument()Copy of last document;voidprintCopyTransactionDocument(cmdPinpad.DocTypeToCopy docTypeToCopy, java.lang.String docNumber)Copy of document by type;voidprintTransactionReceipt()Print receipt for pinpad after succesfull transaction.voidreturnTransaction(boolean Operation)Used when command 53( paying with pinpad ) and command 55 ( option 14 ) returns error along with sum and last digits of card numbervoidsetPinpadComBaudRate(int value)Baud rate of COM port that has pinpad device assigned.voidsetPinpadComPort(int value)Number of COM port for communication with pinpadvoidsetPinpadConnectionType(int value)Type of pinpadvoidsetPinpadDateTime(java.lang.String dateTime)voidsetPinpadLoyaltyPayment(int value)Function of PY4 keyvoidsetPinpadPaymentMenu(int value)Function of PY2 key in registrationvoidsetPinpadReceiptCopies(int value)Copies of the receipt from pinpadvoidsetPinpadReceiptInfo(int value)Where to print pinpad receiptvoidsetPinpadShortRec(boolean value)Short receipt or normal receipt from pinpad;voidsetPinpadType(cmdPinpad.PinpadType value)Type of pinpadvoidvoidTransactionBorica(java.lang.String PayType, java.lang.Double Amount, java.lang.String RRN, java.lang.String AC)voidvoidTransactionDSK(java.lang.Double Amount)voidvoidTransactionUBB(java.lang.String PayType, java.lang.Double Amount, java.lang.String Number)Methods inherited from class com.datecs.fiscalprinter.SDK.model.DatecsFiscalDevice
checkErrorCode, close, getConnectedECRV1, getConnectedModelV2, getConnectedPrinterV1, getCountryCode, getMaxDepartments, getMaxStockGroup, isCheckLastError, isConnectedDeviceV2, isConnectedECR, isConnectedPrinter, isEditItemPrice, isEditItemQTY, isFontSupported, isPaperCuttingDevice, setCheckLastError, setConnectedModel, setConnectedModel, setConnectedModel, setCountryCode
-
Constructor Details
-
cmdPinpad
public cmdPinpad()
-
-
Method Details
-
printCopyTransactionDocument
public void printCopyTransactionDocument(cmdPinpad.DocTypeToCopy docTypeToCopy, java.lang.String docNumber) throws java.io.IOException, FiscalExceptionCopy of document by type;- Parameters:
docTypeToCopy-docNumber-- Throws:
java.io.IOExceptionFiscalException
-
makePurchase
public cmdPinpad.PurchaseResult makePurchase(java.lang.Double amount) throws java.io.IOException, FiscalExceptionMake sale from pinpad- Parameters:
amount-- Throws:
java.io.IOExceptionFiscalException
-
endOfDayReport
- Throws:
java.io.IOExceptionFiscalException
-
printCopyOfLastTransactionDocument
Copy of last document;- Throws:
java.io.IOExceptionFiscalException
-
checkPinpadConnection
- Returns:
- true if pinpad is connected to fiscal device;
- Throws:
java.io.IOExceptionFiscalException
-
CheckPinpadServerConnection
public boolean CheckPinpadServerConnection() throws java.lang.Exception- Returns:
- true if pinapd test transaction is successful;
- Throws:
java.lang.Exception
-
getPinpadComPort
public int getPinpadComPort() throws java.lang.Exception- Returns:
- -( 1-COM1, 2-COM2, 4-Bluetooth );
- Throws:
java.lang.Exception
-
setPinpadComPort
public void setPinpadComPort(int value) throws java.lang.ExceptionNumber of COM port for communication with pinpad- Parameters:
value- ( 1-COM1, 2-COM2, 4-Bluetooth );- Throws:
java.lang.Exception
-
getPinpadComBaudRate
public int getPinpadComBaudRate() throws java.lang.ExceptionBaud rate of COM port that has pinpad device assigned.- Returns:
- -( from 0 to 9 );
- Throws:
java.lang.Exception
-
setPinpadComBaudRate
public void setPinpadComBaudRate(int value) throws java.lang.ExceptionBaud rate of COM port that has pinpad device assigned.- Parameters:
value- ( from 0 to 9 );- Throws:
java.lang.Exception
-
getPinpadType
Type of pinpad- Returns:
- - 1 - BORICA; 2 - UBB; 3 - DSK ;
- Throws:
java.lang.Exception
-
setPinpadType
Type of pinpad- Parameters:
value- 1 - BORICA; 2 - UBB; 3 - DSK ;- Throws:
java.lang.Exception
-
getPinpadConnectionType
public int getPinpadConnectionType() throws java.lang.ExceptionType of connection between cash register and bank server- Returns:
- 0-GPRS, 1-LAN
- Throws:
java.lang.Exception
-
setPinpadConnectionType
public void setPinpadConnectionType(int value) throws java.lang.ExceptionType of pinpad- Parameters:
value- 0-GPRS, 1-LAN- Throws:
java.lang.Exception
-
getPinpadReceiptInfo
public int getPinpadReceiptInfo() throws java.lang.ExceptionWhere to print pinpad receipt- Returns:
- - 1 - in fiscal receipt; 0 - separate from fiscal receipt
- Throws:
java.lang.Exception
-
setPinpadReceiptInfo
public void setPinpadReceiptInfo(int value) throws java.lang.ExceptionWhere to print pinpad receipt- Parameters:
value- 1 - in fiscal receipt; 0 - separate from fiscal receipt- Throws:
java.lang.Exception
-
getPinpadReceiptCopies
public int getPinpadReceiptCopies() throws java.lang.ExceptionCopies of the receipt from pinpad- Returns:
- - ( 0 - 3 )
- Throws:
java.lang.Exception
-
setPinpadReceiptCopies
public void setPinpadReceiptCopies(int value) throws java.lang.ExceptionCopies of the receipt from pinpad- Parameters:
value- ( 0 - 3 )- Throws:
java.lang.Exception
-
getPinpadPaymentMenu
public int getPinpadPaymentMenu() throws java.lang.ExceptionFunction of PY2 key in registration- Returns:
- - 0 - payment with card with pinpad ). Works only with configuration with BORICA. 1 - menu for payment with pinpad( card and loyalty scheme );
- Throws:
java.lang.Exception
-
setPinpadPaymentMenu
public void setPinpadPaymentMenu(int value) throws java.lang.ExceptionFunction of PY2 key in registration- Parameters:
value- 1 - menu for payment with pinpad( card and loyalty scheme ); 0 - payment with card with pinpad ). Works only with configuration with BORICA.- Throws:
java.lang.Exception
-
getPinpadLoyaltyPayment
public int getPinpadLoyaltyPayment() throws java.lang.ExceptionFunction of PY4 key- Returns:
- - 0 - payment PY4 ). Works only with configuration with BORICA. 1 - payment with pinpad with loyalty scheme;
- Throws:
java.lang.Exception
-
setPinpadLoyaltyPayment
public void setPinpadLoyaltyPayment(int value) throws java.lang.ExceptionFunction of PY4 key- Parameters:
value- 1 - payment with pinpad with loyalty scheme; 0 - payment PY4 ). Works only with configuration with BORICA.- Throws:
java.lang.Exception
-
getPinpadShortRec
public boolean getPinpadShortRec() throws java.lang.Exception- Returns:
- - Short receipt or normal receipt from pinpad;
- Throws:
java.lang.Exception
-
setPinpadShortRec
public void setPinpadShortRec(boolean value) throws java.lang.ExceptionShort receipt or normal receipt from pinpad;- Parameters:
value- True=short- Throws:
java.lang.Exception
-
setPinpadDateTime
public void setPinpadDateTime(java.lang.String dateTime) throws java.lang.Exception- Parameters:
dateTime- - Date and time in format: "DD-MM-YY hh:mm:ss DST"; DD - Day; MM - Month; YY - Year; hh - Hour; mm - Minute; ss - Second; DST - Text "DST" if exist time is Summer time;- Throws:
java.lang.Exception
-
printTransactionReceipt
Print receipt for pinpad after succesfull transaction. Must be executed after command 53( when paying with pinpad ) and after command 56( when paying with pinpad );- Throws:
java.io.IOExceptionFiscalException
-
voidTransactionBorica
public void voidTransactionBorica(java.lang.String PayType, java.lang.Double Amount, java.lang.String RRN, java.lang.String AC) throws java.io.IOException, FiscalException- Parameters:
PayType- - Type of payment: 7 - Return with money, 13 - Return with points from loyal scheme;Amount- - The amount of the transaction;RRN- - RRN of the transaction(12 digits max);AC- - AC of the transaction(6 digits max);- Throws:
java.io.IOExceptionFiscalException
-
voidTransactionUBB
public void voidTransactionUBB(java.lang.String PayType, java.lang.Double Amount, java.lang.String Number) throws java.io.IOException, FiscalException- Parameters:
PayType- -Type of payment: 16 - Return with AC number, 17 - Return with receipt number;Amount- - The amount of the transaction;Number- - depent on PayType( 16 - AC number, 17 - receipt number )- Throws:
java.io.IOExceptionFiscalException
-
voidTransactionDSK
public void voidTransactionDSK(java.lang.Double Amount) throws java.io.IOException, FiscalException- Parameters:
Amount- - The amount of the transaction;- Throws:
java.io.IOExceptionFiscalException
-
returnTransaction
Used when command 53( paying with pinpad ) and command 55 ( option 14 ) returns error along with sum and last digits of card number- Parameters:
Operation- for execution; if true - Print receipt; if false - Void transaction from pinpad;- Throws:
java.io.IOExceptionFiscalException
-