@@ -0,0 +1,1832 @@
+package org.blackbananacoin.tools.privkeyshare;%0A%0Aimport java.math.BigInteger;%0Aimport java.util.concurrent.ExecutionException;%0A%0Aimport org.bitcoin.protocols.payments.Protos.PaymentRequest;%0A%0Aimport com.google.bitcoin.core.Utils;%0Aimport com.google.bitcoin.protocols.payments.PaymentRequestException;%0Aimport com.google.bitcoin.protocols.payments.PaymentSession;%0Aimport com.google.bitcoin.uri.BitcoinURI;%0Aimport com.google.bitcoin.uri.BitcoinURIParseException;%0Aimport com.google.common.util.concurrent.ListenableFuture;%0A%0Apublic class BitcoinPaymentTool %7B%0A%0A%09// test url from https://donate.libreoffice.org/%0A%0A%09public static void main(String%5B%5D args) throws PaymentRequestException,%0A%09%09%09BitcoinURIParseException, InterruptedException, ExecutionException %7B%0A%0A%09%09String url = %22bitcoin:13dbaDHdYUwDHP24Qg3fEa3yqCBWE5hd9y?amount=0.01&r=https%253A%252F%252Fbitpay.com%252Fi%252FT5P3671YhMuYsqbCt5LsPY%22;%0A%09%09ListenableFuture%3CPaymentSession%3E future = null;%0A%09%09if (url.startsWith(%22http%22)) %7B%0A%09%09%09future = PaymentSession.createFromUrl(url);%0A%09%09%7D else if (url.startsWith(%22bitcoin:%22)) %7B%0A%09%09%09future = PaymentSession.createFromBitcoinUri(new BitcoinURI(url));%0A%09%09%7D%0A%0A%09%09PaymentSession session = future.get(); // may throw%0A%09%09%09%09%09%09%09%09%09%09%09%09// PaymentRequestException.%0A%09%09%0A%09%09System.out.println(session);%0A%09%09%0A%09%09String memo = session.getMemo();%0A%09%09BigInteger amountWanted = session.getValue();%0A%09%09PaymentRequest pr = session.getPaymentRequest();%0A%09%09System.out.println(pr);%0A%09%09System.out.println(session.getPaymentDetails());%0A%0A%09%09if (session.isExpired()) %7B%0A%09%09%09System.out.println(%22session expired.%22);%0A%09%09%7D%0A%0A%09%09PaymentSession.PkiVerificationData identity = null;%0A%09%09try %7B%0A%09%09%09identity = session.verifyPki();%0A%09%09%09System.out.println(identity.name);%0A%09%09%09System.out.println(identity.orgName);%0A%09%09%09System.out.println(identity.rootAuthorityName);%0A%09%09%7D catch (Exception e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%0A%0A%09%7D%0A%0A%7D%0A

fix #3