public @Nullable ListenableFuture<Ack> sendPayment(List<Transaction> txns,@Nullable Address refundAddr,@Nullable String memo) throws PaymentRequestException, VerificationException, IOException {
  Protos.Payment payment=getPayment(txns,refundAddr,memo);
  if (payment == null)   return null;
  if (isExpired())   throw new PaymentRequestException.Expired("PaymentRequest is expired");
  URL url;
  try {
    url=new URL(paymentDetails.getPaymentUrl());
  }
 catch (  MalformedURLException e) {
    throw new PaymentRequestException.InvalidPaymentURL(e);
  }
  return sendPayment(url,payment);
}

public @ Nullable ListenableFuture < Ack > sendPayment ( List < Transaction > txns , @ Nullable Address refundAddr , @ Nullable String memo ) throws PaymentRequestException , VerificationException , IOException { Protos . Payment payment = getPayment ( txns , refundAddr , memo ) ; if ( payment == null ) return null ; if ( isExpired ( ) ) throw new PaymentRequestException . Expired ( "PaymentRequest is expired" ) ; URL url ; try { url = new URL ( paymentDetails . getPaymentUrl ( ) ) ; } catch ( MalformedURLException e ) { throw new PaymentRequestException . InvalidPaymentURL ( e ) ; } return sendPayment ( url , payment ) ; }
generates a payment message and sends the payment to the merchant who sent the paymentrequest . provide transactions built by the wallet . note : this does not broadcast the transactions to the bitcoin network , it merely sends a payment message to the merchant confirming the payment . returns an object wrapping paymentack once received . if the paymentrequest did not specify a payment_url , returns null and does nothing .
