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.
  • Constructor Details

  • Method Details

    • printCopyTransactionDocument

      public void printCopyTransactionDocument​(cmdPinpad.DocTypeToCopy docTypeToCopy, java.lang.String docNumber) throws java.io.IOException, FiscalException
      Copy of document by type;
      Parameters:
      docTypeToCopy -
      docNumber -
      Throws:
      java.io.IOException
      FiscalException
    • makePurchase

      public cmdPinpad.PurchaseResult makePurchase​(java.lang.Double amount) throws java.io.IOException, FiscalException
      Make sale from pinpad
      Parameters:
      amount -
      Throws:
      java.io.IOException
      FiscalException
    • endOfDayReport

      public void endOfDayReport() throws java.io.IOException, FiscalException
      Throws:
      java.io.IOException
      FiscalException
    • printCopyOfLastTransactionDocument

      public void printCopyOfLastTransactionDocument() throws java.io.IOException, FiscalException
      Copy of last document;
      Throws:
      java.io.IOException
      FiscalException
    • checkPinpadConnection

      public boolean checkPinpadConnection() throws java.io.IOException, FiscalException
      Returns:
      true if pinpad is connected to fiscal device;
      Throws:
      java.io.IOException
      FiscalException
    • 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.Exception
      Number 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.Exception
      Baud 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.Exception
      Baud rate of COM port that has pinpad device assigned.
      Parameters:
      value - ( from 0 to 9 );
      Throws:
      java.lang.Exception
    • getPinpadType

      public cmdPinpad.PinpadType getPinpadType() throws java.lang.Exception
      Type of pinpad
      Returns:
      - 1 - BORICA; 2 - UBB; 3 - DSK ;
      Throws:
      java.lang.Exception
    • setPinpadType

      public void setPinpadType​(cmdPinpad.PinpadType value) throws java.lang.Exception
      Type of pinpad
      Parameters:
      value - 1 - BORICA; 2 - UBB; 3 - DSK ;
      Throws:
      java.lang.Exception
    • getPinpadConnectionType

      public int getPinpadConnectionType() throws java.lang.Exception
      Type 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.Exception
      Type of pinpad
      Parameters:
      value - 0-GPRS, 1-LAN
      Throws:
      java.lang.Exception
    • getPinpadReceiptInfo

      public int getPinpadReceiptInfo() throws java.lang.Exception
      Where 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.Exception
      Where 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.Exception
      Copies of the receipt from pinpad
      Returns:
      - ( 0 - 3 )
      Throws:
      java.lang.Exception
    • setPinpadReceiptCopies

      public void setPinpadReceiptCopies​(int value) throws java.lang.Exception
      Copies of the receipt from pinpad
      Parameters:
      value - ( 0 - 3 )
      Throws:
      java.lang.Exception
    • getPinpadPaymentMenu

      public int getPinpadPaymentMenu() throws java.lang.Exception
      Function 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.Exception
      Function 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.Exception
      Function 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.Exception
      Function 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.Exception
      Short 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

      public void printTransactionReceipt() throws java.io.IOException, FiscalException
      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.IOException
      FiscalException
    • 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.IOException
      FiscalException
    • 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.IOException
      FiscalException
    • voidTransactionDSK

      public void voidTransactionDSK​(java.lang.Double Amount) throws java.io.IOException, FiscalException
      Parameters:
      Amount - - The amount of the transaction;
      Throws:
      java.io.IOException
      FiscalException
    • returnTransaction

      public void returnTransaction​(boolean Operation) throws java.io.IOException, FiscalException
      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.IOException
      FiscalException