/** * Returns the payment url where the Payment message should be sent. * Returns null if no payment url was provided in the PaymentRequest. */ public @Nullable String getPaymentUrl() { if (paymentDetails.hasPaymentUrl()) return paymentDetails.getPaymentUrl(); return null; }
/** * Returns the payment url where the Payment message should be sent. * Returns null if no payment url was provided in the PaymentRequest. */ public @Nullable String getPaymentUrl() { if (paymentDetails.hasPaymentUrl()) return paymentDetails.getPaymentUrl(); return null; }
/** * Returns the payment url where the Payment message should be sent. * Returns null if no payment url was provided in the PaymentRequest. */ @Nullable public String getPaymentUrl() { if (paymentDetails.hasPaymentUrl()) return paymentDetails.getPaymentUrl(); return null; }
/** * 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. * @param txns list of transactions to be included with the Payment message. * @param refundAddr will be used by the merchant to send money back if there was a problem. * @param memo is a message to include in the payment message sent to the merchant. */ @Nullable public ListenableFuture<PaymentProtocol.Ack> sendPayment(List<Transaction> txns, @Nullable Address refundAddr, @Nullable String memo) throws PaymentProtocolException, VerificationException, IOException { Protos.Payment payment = getPayment(txns, refundAddr, memo); if (payment == null) return null; if (isExpired()) throw new PaymentProtocolException.Expired("PaymentRequest is expired"); URL url; try { url = new URL(paymentDetails.getPaymentUrl()); } catch (MalformedURLException e) { throw new PaymentProtocolException.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. * @param txns list of transactions to be included with the Payment message. * @param refundAddr will be used by the merchant to send money back if there was a problem. * @param memo is a message to include in the payment message sent to the merchant. */ @Nullable public ListenableFuture<PaymentProtocol.Ack> sendPayment(List<Transaction> txns, @Nullable Address refundAddr, @Nullable String memo) throws PaymentProtocolException, VerificationException, IOException { Protos.Payment payment = getPayment(txns, refundAddr, memo); if (payment == null) return null; if (isExpired()) throw new PaymentProtocolException.Expired("PaymentRequest is expired"); URL url; try { url = new URL(paymentDetails.getPaymentUrl()); } catch (MalformedURLException e) { throw new PaymentProtocolException.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. * @param txns list of transactions to be included with the Payment message. * @param refundAddr will be used by the merchant to send money back if there was a problem. * @param memo is a message to include in the payment message sent to the merchant. */ public @Nullable ListenableFuture<PaymentProtocol.Ack> sendPayment(List<Transaction> txns, @Nullable Address refundAddr, @Nullable String memo) throws PaymentProtocolException, VerificationException, IOException { Protos.Payment payment = getPayment(txns, refundAddr, memo); if (payment == null) return null; if (isExpired()) throw new PaymentProtocolException.Expired("PaymentRequest is expired"); URL url; try { url = new URL(paymentDetails.getPaymentUrl()); } catch (MalformedURLException e) { throw new PaymentProtocolException.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. * @param txns list of transactions to be included with the Payment message. * @param refundAddr will be used by the merchant to send money back if there was a problem. * @param memo is a message to include in the payment message sent to the merchant. */ @Nullable public ListenableFuture<PaymentProtocol.Ack> sendPayment(List<Transaction> txns, @Nullable Address refundAddr, @Nullable String memo) throws PaymentProtocolException, VerificationException, IOException { Protos.Payment payment = getPayment(txns, refundAddr, memo); if (payment == null) return null; if (isExpired()) throw new PaymentProtocolException.Expired("PaymentRequest is expired"); URL url; try { url = new URL(paymentDetails.getPaymentUrl()); } catch (MalformedURLException e) { throw new PaymentProtocolException.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. * @param txns list of transactions to be included with the Payment message. * @param refundAddr will be used by the merchant to send money back if there was a problem. * @param memo is a message to include in the payment message sent to the merchant. */ 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. * @param txns list of transactions to be included with the Payment message. * @param refundAddr will be used by the merchant to send money back if there was a problem. * @param memo is a message to include in the payment message sent to the merchant. */ @Nullable public ListenableFuture<PaymentProtocol.Ack> sendPayment(List<Transaction> txns, @Nullable Address refundAddr, @Nullable String memo) throws PaymentProtocolException, VerificationException, IOException { Protos.Payment payment = getPayment(txns, refundAddr, memo); if (payment == null) return null; if (isExpired()) throw new PaymentProtocolException.Expired("PaymentRequest is expired"); URL url; try { url = new URL(paymentDetails.getPaymentUrl()); } catch (MalformedURLException e) { throw new PaymentProtocolException.InvalidPaymentURL(e); } return sendPayment(url, payment); }
/** * <code>optional string payment_url = 6;</code> * * <pre> * URL to send Payment and get PaymentACK * </pre> */ public Builder clearPaymentUrl() { bitField0_ = (bitField0_ & ~0x00000020); paymentUrl_ = getDefaultInstance().getPaymentUrl(); onChanged(); return this; } /**
/** * <code>optional string payment_url = 6;</code> * * <pre> * URL to send Payment and get PaymentACK * </pre> */ public Builder clearPaymentUrl() { bitField0_ = (bitField0_ & ~0x00000020); paymentUrl_ = getDefaultInstance().getPaymentUrl(); onChanged(); return this; } /**
/** * <code>optional string payment_url = 6;</code> * * <pre> * URL to send Payment and get PaymentACK * </pre> */ public Builder clearPaymentUrl() { bitField0_ = (bitField0_ & ~0x00000020); paymentUrl_ = getDefaultInstance().getPaymentUrl(); onChanged(); return this; } /**
/** * <code>optional string payment_url = 6;</code> * * <pre> * URL to send Payment and get PaymentACK * </pre> */ public Builder clearPaymentUrl() { bitField0_ = (bitField0_ & ~0x00000020); paymentUrl_ = getDefaultInstance().getPaymentUrl(); onChanged(); return this; } /**
/** * <code>optional string payment_url = 6;</code> * * <pre> * URL to send Payment and get PaymentACK * </pre> */ public Builder clearPaymentUrl() { bitField0_ = (bitField0_ & ~0x00000020); paymentUrl_ = getDefaultInstance().getPaymentUrl(); onChanged(); return this; } /**
/** * Returns the payment url where the Payment message should be sent. * Returns null if no payment url was provided in the PaymentRequest. */ @Nullable public String getPaymentUrl() { if (paymentDetails.hasPaymentUrl()) return paymentDetails.getPaymentUrl(); return null; }
/** * Returns the payment url where the Payment message should be sent. * Returns null if no payment url was provided in the PaymentRequest. */ @Nullable public String getPaymentUrl() { if (paymentDetails.hasPaymentUrl()) return paymentDetails.getPaymentUrl(); return null; }
/** * Returns the payment url where the Payment message should be sent. * Returns null if no payment url was provided in the PaymentRequest. */ @Nullable public String getPaymentUrl() { if (paymentDetails.hasPaymentUrl()) return paymentDetails.getPaymentUrl(); return null; }