/** * 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 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. */ public static ListenableFuture<PaymentSession> createFromUrl(final String url) throws PaymentProtocolException { return createFromUrl(url, true, null); }
/** * 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. */ public static ListenableFuture<PaymentSession> createFromUrl(final String url, final boolean verifyPki) throws PaymentProtocolException { return createFromUrl(url, verifyPki, null); }
/** * 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. */ public static ListenableFuture<PaymentSession> createFromUrl(final String url, final boolean verifyPki) throws PaymentProtocolException { return createFromUrl(url, verifyPki, null); }
/** * 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. */ public static ListenableFuture<PaymentSession> createFromUrl(final String url, final boolean verifyPki) throws PaymentProtocolException { return createFromUrl(url, verifyPki, null); }
/** * 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. */ public static ListenableFuture<PaymentSession> createFromUrl(final String url, final boolean verifyPki) throws PaymentProtocolException { return createFromUrl(url, verifyPki, null); }
/** * 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 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. */ public static ListenableFuture<PaymentSession> createFromUrl(final String url) throws PaymentProtocolException { return createFromUrl(url, true, null); }
/** * 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 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. */ public static ListenableFuture<PaymentSession> createFromUrl(final String url) throws PaymentProtocolException { return createFromUrl(url, true, null); }
/** * 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 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. */ public static ListenableFuture<PaymentSession> createFromUrl(final String url) throws PaymentProtocolException { return createFromUrl(url, true, null); }
ListenableFuture<PaymentSession> future; if (location.startsWith("http")) { future = PaymentSession.createFromUrl(location, verifyPki); } else { BitcoinURI paymentRequestURI = new BitcoinURI(location);
session = new PaymentSession(request); } else if ("http".equals(uri.getScheme())) { session = PaymentSession.createFromUrl(arg).get(); } else if ("bitcoin".equals(uri.getScheme())) { BitcoinURI bcuri = new BitcoinURI(arg);
try { paymentSession = PaymentSession .createFromUrl(r, checkPKI, trustStoreLoader) .get(PAYMENT_REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS); break; log.debug("Treating as remote HTTP/S resource"); paymentSession = PaymentSession .createFromUrl(paymentRequestUri.toString(), checkPKI, trustStoreLoader) .get(PAYMENT_REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS);