protected final void parseAndHandlePaymentRequest(@Nonnull final byte[] serializedPaymentRequest)
      throws PaymentRequestException {
    final PaymentIntent paymentIntent =
        PaymentProtocol.parsePaymentRequest(serializedPaymentRequest);

    handlePaymentIntent(paymentIntent);
  }
  private byte[] determinePaymentRequest(final boolean includeBluetoothMac) {
    final ECKey key = (ECKey) addressView.getSelectedItem();
    final Address address = key.toAddress(Constants.NETWORK_PARAMETERS);

    return PaymentProtocol.createPaymentRequest(
            amountCalculatorLink.getAmount(),
            address,
            null,
            includeBluetoothMac && bluetoothMac != null ? "bt:" + bluetoothMac : null)
        .toByteArray();
  }