/** * Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url. * url is an address where the {@link Protos.PaymentRequest} object may be fetched. * If the payment request object specifies a PKI method, then the system trust store will * be used to verify the signature provided by the payment request. An exception is thrown by the future if the * signature cannot be verified. * If trustStoreLoader is null, the system default trust store is used. */ public static ListenableFuture<PaymentSession> createFromUrl(final String url, final boolean verifyPki, @Nullable final TrustStoreLoader trustStoreLoader) throws PaymentProtocolException { if (url == null) throw new PaymentProtocolException.InvalidPaymentRequestURL("null paymentRequestUrl"); try { return fetchPaymentRequest(new URI(url), verifyPki, trustStoreLoader); } catch(URISyntaxException e) { throw new PaymentProtocolException.InvalidPaymentRequestURL(e); } }
/** * Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url. * url is an address where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object may be fetched. * If the payment request object specifies a PKI method, then the system trust store will * be used to verify the signature provided by the payment request. An exception is thrown by the future if the * signature cannot be verified. * If trustStoreLoader is null, the system default trust store is used. */ public static ListenableFuture<PaymentSession> createFromUrl(final String url, final boolean verifyPki, @Nullable final TrustStoreLoader trustStoreLoader) throws PaymentProtocolException { if (url == null) throw new PaymentProtocolException.InvalidPaymentRequestURL("null paymentRequestUrl"); try { return fetchPaymentRequest(new URI(url), verifyPki, trustStoreLoader); } catch(URISyntaxException e) { throw new PaymentProtocolException.InvalidPaymentRequestURL(e); } }
/** * Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url. * url is an address where the {@link Protos.PaymentRequest} object may be fetched. * If the payment request object specifies a PKI method, then the system trust store will * be used to verify the signature provided by the payment request. An exception is thrown by the future if the * signature cannot be verified. * If trustStoreLoader is null, the system default trust store is used. */ public static ListenableFuture<PaymentSession> createFromUrl(final String url, final boolean verifyPki, @Nullable final TrustStoreLoader trustStoreLoader) throws PaymentProtocolException { if (url == null) throw new PaymentProtocolException.InvalidPaymentRequestURL("null paymentRequestUrl"); try { return fetchPaymentRequest(new URI(url), verifyPki, trustStoreLoader); } catch(URISyntaxException e) { throw new PaymentProtocolException.InvalidPaymentRequestURL(e); } }
/** * Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url. * url is an address where the {@link Protos.PaymentRequest} object may be fetched. * If the payment request object specifies a PKI method, then the system trust store will * be used to verify the signature provided by the payment request. An exception is thrown by the future if the * signature cannot be verified. * If trustStoreLoader is null, the system default trust store is used. */ public static ListenableFuture<PaymentSession> createFromUrl(final String url, final boolean verifyPki, @Nullable final TrustStoreLoader trustStoreLoader) throws PaymentProtocolException { if (url == null) throw new PaymentProtocolException.InvalidPaymentRequestURL("null paymentRequestUrl"); try { return fetchPaymentRequest(new URI(url), verifyPki, trustStoreLoader); } catch(URISyntaxException e) { throw new PaymentProtocolException.InvalidPaymentRequestURL(e); } }
/** * Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri. * uri is a BIP-72-style BitcoinURI object that specifies where the {@link Protos.PaymentRequest} object may * be fetched in the r= parameter. * If verifyPki is specified and the payment request object specifies a PKI method, then the system trust store will * be used to verify the signature provided by the payment request. An exception is thrown by the future if the * signature cannot be verified. * If trustStoreLoader is null, the system default trust store is used. */ public static ListenableFuture<PaymentSession> createFromBitcoinUri(final BitcoinURI uri, final boolean verifyPki, @Nullable final TrustStoreLoader trustStoreLoader) throws PaymentProtocolException { String url = uri.getPaymentRequestUrl(); if (url == null) throw new PaymentProtocolException.InvalidPaymentRequestURL("No payment request URL (r= parameter) in BitcoinURI " + uri); try { return fetchPaymentRequest(new URI(url), verifyPki, trustStoreLoader); } catch (URISyntaxException e) { throw new PaymentProtocolException.InvalidPaymentRequestURL(e); } }
/** * Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri. * uri is a BIP-72-style BitcoinURI object that specifies where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object may * be fetched in the r= parameter. * If verifyPki is specified and the payment request object specifies a PKI method, then the system trust store will * be used to verify the signature provided by the payment request. An exception is thrown by the future if the * signature cannot be verified. * If trustStoreLoader is null, the system default trust store is used. */ public static ListenableFuture<PaymentSession> createFromBitcoinUri(final BitcoinURI uri, final boolean verifyPki, @Nullable final TrustStoreLoader trustStoreLoader) throws PaymentProtocolException { String url = uri.getPaymentRequestUrl(); if (url == null) throw new PaymentProtocolException.InvalidPaymentRequestURL("No payment request URL (r= parameter) in BitcoinURI " + uri); try { return fetchPaymentRequest(new URI(url), verifyPki, trustStoreLoader); } catch (URISyntaxException e) { throw new PaymentProtocolException.InvalidPaymentRequestURL(e); } }
/** * Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri. * uri is a BIP-72-style BitcoinURI object that specifies where the {@link Protos.PaymentRequest} object may * be fetched in the r= parameter. * If verifyPki is specified and the payment request object specifies a PKI method, then the system trust store will * be used to verify the signature provided by the payment request. An exception is thrown by the future if the * signature cannot be verified. * If trustStoreLoader is null, the system default trust store is used. */ public static ListenableFuture<PaymentSession> createFromBitcoinUri(final BitcoinURI uri, final boolean verifyPki, @Nullable final TrustStoreLoader trustStoreLoader) throws PaymentProtocolException { String url = uri.getPaymentRequestUrl(); if (url == null) throw new PaymentProtocolException.InvalidPaymentRequestURL("No payment request URL (r= parameter) in BitcoinURI " + uri); try { return fetchPaymentRequest(new URI(url), verifyPki, trustStoreLoader); } catch (URISyntaxException e) { throw new PaymentProtocolException.InvalidPaymentRequestURL(e); } }
/** * Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri. * uri is a BIP-72-style BitcoinURI object that specifies where the {@link Protos.PaymentRequest} object may * be fetched in the r= parameter. * If verifyPki is specified and the payment request object specifies a PKI method, then the system trust store will * be used to verify the signature provided by the payment request. An exception is thrown by the future if the * signature cannot be verified. * If trustStoreLoader is null, the system default trust store is used. */ public static ListenableFuture<PaymentSession> createFromBitcoinUri(final BitcoinURI uri, final boolean verifyPki, @Nullable final TrustStoreLoader trustStoreLoader) throws PaymentProtocolException { String url = uri.getPaymentRequestUrl(); if (url == null) throw new PaymentProtocolException.InvalidPaymentRequestURL("No payment request URL (r= parameter) in BitcoinURI " + uri); try { return fetchPaymentRequest(new URI(url), verifyPki, trustStoreLoader); } catch (URISyntaxException e) { throw new PaymentProtocolException.InvalidPaymentRequestURL(e); } }