Ejemplo n.º 1
0
  public void updateFirmware(String firmwareFileName) throws JposException {
    // Make sure control is opened
    if (!bOpen) {
      throw new JposException(JPOS_E_CLOSED, "Control not opened");
    }

    // Make sure service supports at least version 1.9.0
    if (serviceVersion < deviceVersion19) {
      throw new JposException(JPOS_E_NOSERVICE, "Device Service is not 1.9.0 compliant.");
    }

    // Perform the operation
    try {
      service19.updateFirmware(firmwareFileName);
    } catch (JposException je) {
      throw je;
    } catch (Exception e) {
      throw new JposException(JPOS_E_FAILURE, "Unhandled exception from Device Service", e);
    }
  }
Ejemplo n.º 2
0
  public long getSettledAmount() throws JposException {
    // Make sure control is opened
    if (!bOpen) {
      throw new JposException(JPOS_E_CLOSED, "Control not opened");
    }

    // Make sure service supports at least version 1.9.0
    if (serviceVersion < deviceVersion19) {
      throw new JposException(JPOS_E_NOSERVICE, "Device Service is not 1.9.0 compliant.");
    }

    // Perform the operation
    try {
      return service19.getSettledAmount();
    } catch (JposException je) {
      throw je;
    } catch (Exception e) {
      throw new JposException(JPOS_E_FAILURE, "Unhandled exception from Device Service", e);
    }
  }
Ejemplo n.º 3
0
  public void cashDeposit(int sequenceNumber, long amount, int timeout) throws JposException {
    // Make sure control is opened
    if (!bOpen) {
      throw new JposException(JPOS_E_CLOSED, "Control not opened");
    }

    // Make sure service supports at least version 1.9.0
    if (serviceVersion < deviceVersion19) {
      throw new JposException(JPOS_E_NOSERVICE, "Device Service is not 1.9.0 compliant.");
    }

    // Perform the operation
    try {
      service19.cashDeposit(sequenceNumber, amount, timeout);
    } catch (JposException je) {
      throw je;
    } catch (Exception e) {
      throw new JposException(JPOS_E_FAILURE, "Unhandled exception from Device Service", e);
    }
  }